iOS app not rendering correctly on Android 4.3 - android

I build an iOS app using Cordova and it renders as expected on any iOS device. Now I'm using the same framework jQuery for the Android version and when i run the Android simulator it renders completely different. As you can see from the screen shots. This is my first android app so I'm not sure if I should be coding differently. Any thoughts or suggestions are welcome. Thanks.
https://www.dropbox.com/s/daigevqmmhwttdc/iOS.png
https://www.dropbox.com/s/b9p9ewqee68ty8b/Android.png

It's impossible to have the completely same behavior on all devices with HTML.

They are not that much different really. Also users using Android may not expect the same look-and-feel as those using iOS and vice-versa. Do they really need to be identical?

Related

UI Element (Font, button, images) size issue on Mobile first platform Hybrid app on android devices

I am supporting a hybrid app built using IBM mobile first platform v7.1 and jQueryMobile framework in which we are facing UI element size issues on android platform. The font, button and all the other elements appearing too large on android app since last 2 weeks. However, the app was working fine few days back.This app is on google playstore and this issue persist over there as well
I don't know what has broken the app since nothing has been changed from the code perspective and its happening only on android OS version 6.0 and above. This might be an android OS version issue
Any Guidance or suggestions will be appreciated to identify the root cause or fixing the issue

Samsung S4 Update has completely disfigured phonegap application

I'm currently developing my final year project, which is due this month, using phonegap and the most recent update to the Samsung Galaxy S4 seems to have completely disfigured everything in my application.
Has anyone come across this issue before or have any idea how to fix this ASAP?
Thanks lots,
Paula
I have come across this when using phonegap and sencha touch. First thing to do is make sure you update your app to the current version of phonegap. Typically they will release new version along side of android.
If your still getting the issues after the phonegap update. I would suggest looking into what browser it is using. Several phone manufacturers put their own flavor into the web browser which can affect your code. I previously had an issue with htc do to the browser handling css differently. Android APIs are the same, some will use different browser code so you will have to test it against each to make sure it works.
I also believe phonegap allows you to modify what browser it uses. It may default to chromium now but in the past you could switch it depending on what api version it was.

PhoneGap - Bad Performance compared to Browser on Android

I developed an application for android using jquery mobile and phonegap.
I deployed the app to my device over usb. The performance of the app ist really bad, especially while scrolling a longer list.
The strange thing is: The whole app runs smooth if i just open up the browser on my phone and access the index.html directly. Same technology, same content. I do not use the phonegap native api or anything similar.
Tested with phonegap 1.5.0 and 1.7.0rc1, jquery mobile 1.1.0 on android 4.0.2.
Any ideas?
On honeycomb (3.0), Ice cream (4.0) and posterior devices, you can boost performance by adding the following in the < Application ... > tag:
android:hardwareAccelerated="true"
You could set the minSdk to 8 (Android 2.2) for compatibility and the targetSdk to 15 (Android 4.0) and that would make hardware acceleration work when its available on the device only.
I believe that with this flag the performance of my apps is equal to running them in the browser, so I guess its because the browser was coded with hardware acceleration :)
I had a similar problem: a page with a longer list of "medium complex" themed divs. The browser of HTC phone had no problems in displaying. But within the phonegap app rendering failed completely. I saw a kind of WSOD, which disappeared only after touching the display. After touching, the page was displayed correct.
The problem was not in place, when I shortened the div-list to one or two div-elements or when I reduced the sub elements within the divs and reduced the render effort caused by the css complexity.
The white screen looked like, if the whole body was invisible, since only the documents background-color was displayed (I added a light pink for this). So I guess, the rendering was the problem after reading this thread
I tried the various proposals I found in this thread to make the app work without the "WSOD". But nothing worked. Some of them made the app displaying really worse.
Finally, after a whole day of searching, I made it. I set within the tag (not the tag) of my AndroidManifest
<application android:hardwareAccelerated="false" ...
Now the app behaves in the same fast way as my webbrowser. Seems like, if hardware acceleration is not always the best feature...
My versions:
phonegap 3.5.0, Android 4.0.3, jQuery v2.1.0, HTC Sense 3.6
Found an answer here: http://groups.google.com/group/phonegap/browse_thread/thread/94da1cf881abe995/6d4f7aea7aeba523?lnk=gst&q=performance
There is probably a difference between the native browser and the webview in terms of javascript performance.
If you can confirm the browser performs better (that it's not something suboptimal in your code frustrating one but not the other), you could consider deploying as an html5 offline application so that you will actually run in the browser.
We bumped into performance issues while scrolling the same amount of list items with jquery mobile. The performance was so poor (we didn't even try in PhoneGap environment) that we rewrote the app using iScroll library... now the app scrolls really smoothly.
If you are at the beginning of the development, you could try to change the UI library.
After this situation we deploy our apps to test devices quite often to manage performance issues in time... this became a "policy" :)

Is PhoneGap slow or it is a bug?

After I have compiled and deployed the demo application to my Samsung Galaxy S II I noticed that the Sample PhoneGap App which comes with PhoneGap was not very responsive when pressing buttons and scrolling.
I also made a little app using PhoneGap and jQuery Mobile, with 4 buttons everything was ok, but when I added more than 7 and my viewport needed to be scrolled, scrolling become to be very slow, the more buttons/widgets I had the slower the srolling was.
Is this a bug specific to my mobile device or it is just how PhoneGap works:
The fact that PhoneGap apps feel slow on my phone including the demo?
EDIT:
The same PhoneGap app served by an HTTP server from my laptop and launched in the standard Android browser works very smoothly
Try setting your targetSdkVersion higher. Changing mine from "8" (i.e. Android 2.2) to "14" (Android 4.0) dramatically improved PhoneGap performance on phones running newer versions of Android. Most likely this enables certain performance-enhancing features such as hardware graphics acceleration.
For more info see my other answer about this here: https://stackoverflow.com/a/12397768/233370
Since PhoneGap and the frameworks that is used with it (JQM,Sencha Touch etc) are just working in a WebKit browser they can be slow if there's too much to render.
There's actually no bug with your device or etc.It's just that PhoneGap and the frameworks are not so good if you want fast response and so on.You can try your app in other devices and can observe that they behave the same.
I had the same Problems, after Update to Android 4.0.4 my Phonegap (Cordova 2.0.0) & Sencha Touch 2 - APP was very very slow.
But after I insert
super.appView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
the APP works fine, as before the update.
http://developer.android.com/guide/topics/graphics/hardware-accel.html
For improved performance you may not need Phonegap.
If what you need is quick cross platform styling but fast native components try a tool like nativecss.com It keeps the styling in CSS, but uses native components for everything else - so no HTML rendering delays or clunky animations.

Google Android Fragmentation: Inconsistent CSS Rendering

Working on a mobile web application, I have found that some Android devices are rendering CSS differently than others. The detail on the site renders perfectly on every desktop browser I have tried on Windows & Mac, on iPhone, on every Android SDK Emulator I have tried, and even BlackBerry. While some Android devices render it perfectly, about half do not - and these "misrender" it in consistent ways. (For example, it looks great in a Galaxy, but is offset when using a G2.)
Aside from purchasing every single Android device on the market, is there any way to test CSS across all the devices available?
Thanks in advance!
In fact: you can use the emulator to replicate CSS differences. I didn't try enough variations.

Categories

Resources