Jquery Mobile App not displaying certain images on Android - android

I have a full Jquery Mobile app the currently builds and looks fine in multiple browsers. I am currently working on getting the version ported using phonegap for android. As it loads up on the phone, it has several images that are loaded depending on localStorage (I originally used cookies but found some android devices aren't too friendly with that). Now, almost all of these triggers load images fine, except the last page. A certain set of images won't load, and I get the error (when running in an emulator Unknown chromium error: -6. Others on the page use the same process and have no problem, and all the images are referred to locally.
Why would this be happening and what can I do to fix this?

Turns out in the android browser, under phonegap, file names are case-sensitive. So it wasn't able to load things with capital letters and such.

Related

mjpg link not rendering on mobile app when built using Meteor

I am currently trying to get a multi-image url to render in my app. It works when I am testing it out in the url, but when I deploy it on my android device it doesn't render at all. It shows that no image found icon.
I am able to successfully build it using Meteor and having Cordova build the mobile version for me.
Here is the url I am trying out for example.
<img src="http://193.85.239.147:86/mjpg/video.mjpg?COUNTER">
What I am particularly looking for is some sort of work around that could also render this similar to that of or some setting stuff I need to change.
I read that there is a version of Chrome that this bug is present, but the Cordova uses Chromium and I am unsure if the bug exist in that as well or not.
Edit:
Upon further test, when I build and use on android phone img won't render anything in which its src is a url/link. It renders properly when I use it in a web browser, but mobile it fails. This is an issue I have yet to figure out a work around.

Cordova/Phonegap and HTML5 App cache on Android

I'm trying to make an app which is available to users while offline, but updates if it's online . So i was thinking about using the HTML5 cache just for that, caching up the most recent version. The problem is , sometimes it works sometimes it doesnt. I have an index.html page in my Cordova App which sets your window.location to the http online link. Why wouldn't it work all the time? I have my manifest.appcache configured and mime-types enabled, sometimes it will just show a blank page not found ,even though it downloaded a page which included a manifest. Is there anything i'm missing? I put the link setting in index.html after the javascript body load event. It's android that i'm testing , so far i tried with an Iphone 1 time and it worked.
If you guys know more, please share

Ttitanium webview and HTML5 application cache

I am using Titanium to create a application for Android. The app uses webview to load external HTML5 webpages. The webpage uses a manifest to cache the page and some assets. This works fine on desktop browsers and third party app browsers in Android (Chrome).
When I view the page in a webview in the Titanium build app, it seems that the manifest is not used, the page just loads everything from the server. The same problem occurs when I use the build in browser of my phone (HTC one X).
What I am trying to accomplish is that the pages are offline available, so that internet is not required tot view cached pages. Is there a fix for this problem, or should I go look in another direction to solve my problem?
the manifest file:
CACHE MANIFEST
# version 1
leerlingen.html
jquery.js
style.css
handler.js
NETWORK:
*
First: Titanium provides much more than a WebView. If you planned to display only web pages you maybe should have a look at PhoneGap / Cordova which might fit your needs in a better way.
As you've noticed not all browsers support HTML5 Caching feature as expected. I can't say if it doesn't work for Android in general or only for your specific version because WebKit usually does support it but it depends of the used WebKit version. And this could be different.
EDIT: It seems that (in native android) this feature can be enabled as written here: Application cache in HTML5 doesn't work in Android PhoneGap application. This is currently not possible in Titanium (there might be inofficial tweaks i don't know but from http://docs.appcelerator.com this is not possible).
Personally i'd prefer another solution. Cache data by myself and display it if there is no network connection. But this depends on what you try to achieve. Having few content which doesn't change often this would make sense. Having dynamically changing data (like twitter stream for instance) this would be difficult. Also it depends on your users and where they want to access your app.
And there is an open question: When you want to use all the caching features why do you want to create an app? Creating a simple mobile webpage would do the same job. When creating an app i wouldn't use the Caching Features of HTML 5. You should keep all the static resources in your app and simply load data from the network. This can be achieved by both Titanium and PhoneGap / Cordova. Titanium is more useful for a native UI and some native Features while PhoneGap / Cordova would be more appropriate for HTML5 based layout.
Just in case someone else is running in the same problems that i was facing, here is what i've done. HTML5's application cache does not seem to work in the build-in browser of Android and with that the webviews. In Titanium there seems to be no way to control the webview as to enable the application cache.
The work around for me was to use Titanium and it's httpClient function (Titanium.Network.HTTPClient) to request the files (HTML, CSS, javascript) and store it in the local app filesystem (Titanium.Filesystem).

Using iFrames in Phonegap And App Crashes

I have created an app with PhoneGap 2.0.0 for Android on Eclipse but when I try run the application either on an emulator or my phone(signed application with no errors) it only shows up the static html pages. When I go to a page where I have used iFrame to load another webpage into it, it simply crashes.
This is the screen I get on the emulator and the same message is displayed on my phone as well(SE Xperia X10)
Screenshot of Emulator with The error :
After showing the message the app crashes instantly. Please let me know if I need to add any other permissions or add other settings or make any changes for this to function because the iFrame functions properly outside Phonegap on browser(including phone/desktop browsers)
At least some versions of PhoneGap use an iframe to communicate with the native layer.
I'm most familiar with the iOS version, where there are definite bugs in the browser's support of iframes ( https://issues.apache.org/jira/browse/CB-593 ). I don't know if there is a similar system level issue on android, but there could easily be some part of your code that doesn't expect that second iframe to be there.

CSS loading issue with Android ICS

I have an Android ICS 4.0.3 installed in my phone. I have created one Mobile Web Application (test url http://drupal.langoor.mobi), for which I serve the HTML page from the MySQL database in the backend dynamically.
Problem:
The html page is not rendered by the default stock browser of Android and Dolphin browser.
This problem does NOT occure in chrome, firefox, safari mobile browsers.
To figure out the problem, I followed these approaches:
Used Adobe Shadow to do remote inspect of the HTML Page, which did NOT help much becuase I was NOT able to see any error in content loading.
Assuming Javascript/jQuery conflicts to be a problem, I tried removing all the linked js files which are served dynamically from server (not Static), then the HTML page was rendering but with no style applied.
I tried searching and found this link but it's not helpful:
Android - html from android_assets in WebView, CSS not loading in ICS
Please help me out with this.
After digging more around Problem, I found that main cause for problem was, content being sent in Uncompressed format from Server and because of which Android ICS's default and Dolphin Browser are not able to render it properly.
Here is the link where i have mentioned exact cause of problem.
Enabling data compression for Apache2 + FastCGI setup
Thanks

Categories

Resources