I have developed a webview in android application which renders existing web application. I considered target sdk as 8. After development application works perfect in Samsung devices(ICS) but when I test the same in my Asus(ICS) tablet the quality is very poor, everything looks blurred whereas the same looks perfect when i test in it's system browser.
Any relation to hardware? please suggest me some way..
Thanks in Advance
Try to change the minSDK level to 11. and enable hardware Acceleration in the application manifest at application level.
Related
I am currently working on a mobile android app containing webcontent into a WebView.
As far as i understood well, some phones used WebChromeClient, some other WebViewClient, I guess depending on Android version.
My app works well, but I found some CSS rendering issues. If i fix them on classical webview, chromeClient is broken, and opposite :)
Tested on my S3 (android 4.3) seems to use WebViewClient
and MotoG (android 4.4) seems to use WebChromeClient.
Any advice to deal with that ? Is there anything to do to force one of webview client on every device ?
Thanks a lot
Android 4.4 (API level 19) has introduced a new version of the WebView that is based on Chromium. That might be the reason why you get different renders on your S3 and your Moto G.
Setting your targetSdkVersion in your manifest file to 18 or lower will make your WebView for API 19 and higher operate in "quirks mode" which means that it will try to have the same behavior as you would have on a lower API device.
See the android documentation for more details. I hope that solves your problem.
All,
My webpage contains html5, it is OK on ANDROID 4.4, while something wrong on ANDROID 4.3.
After google it, I found
Android 4.4 update the webview.
Is it possible to use new webview on ANDROID 4.3(or 4.X)?
No, not directly.
You may like to investigate the XWalk Project[1]. However, some things to be aware of:
it is not a drop in replacement for WebView. Some APIs are missing or work differently
there is a significant increase (~25MB) to your APK size, and RAM size will increase too.
[1] https://crosswalk-project.org/
I have wrote an application using android 2.2 in eclipse.
My app is working fine on the samsung galaxy mini android 2.2. However, it is not working on samsung galaxy s3 android 4.1.
My app is only taking up half of the screen on the samsung galaxy s3.
Why is my app not working on higher resolution devices?
How can i make the app compatible with other devices running
different versions of android?
Sounds like it's most likely you just have a LinearLayout at the top of your layout XML and it just takes up less space on the S3.
I would advise taking a look at the two links below; if you want a specific starting point, you could adjust your layout to match_parent and use the l/m/h/xhdpi folders to place different size graphics in. Also worth checking whether you are using dp or dip (density independent pixels)
http://developer.android.com/training/multiscreen/index.html
http://android-developers.blogspot.co.uk/2012/11/designing-for-tablets-were-here-to-help.html
The best way to ensure that your app will work on other devices is to get access to other devices and test your application on those devices before you release.
Another way is to make sure that you are targeting the correct SDK you need to target and use the AndroidSupportLibrary when needing to have backwards compatibility.
For us to help with your specific problem we would need more details as to what exactly is going on, but make sure the packages and libraries you are using are compatible with the android versions you are trying to target.
And make good use of the AndroidSupportLibrary.
Did you check the resolution compatibility? This seems more like an Android Manifest issue then an Android version issue.
I'm running the same exact web app on Android under PhoneGap and under the built in Browser. The app runs fine on the built-in browser but is unbelievably slow under PhoneGap. Even basic scrolling on the page stutters under PhoneGap.
Is there anything, in general, that I might be doing wrong? I was under the impression that PhoneGap just uses the same WebKit renderer as the normal Browser app, so why would the same HTML and JavaScript run much slower inside PhoneGap?
P.S. This has been asked before, but due to wording I think the original question was misunderstood.
I may have inadvertently stumbled on an answer to this. Turns out that the apps I was working on had android:targetSdkVersion in AndroidManifest.xml set to a really low value (i.e. my target Android version was something like 2.2). Increasing this to 14 (Android 4.0) appears to have hugely improved PhoneGap performance, at least on newer Android devices running ICS or Jelly Bean.
Setting a low targetSdkVersion seems to disable at least some of the performance improvements introduced in newer versions of Android.
So, if you want to see a big performance boost in PhoneGap, make sure your targetSdkVersion matches the max SDK version supported by the phone you're testing on.
I don't know phoneGap, but you can try these:
Adding android:hardwareAccelerated="true" in the manifest
If you use webview webview.getSettings().setRenderPriority(RenderPriority.HIGH); and webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
It is counter-intuitive but you may actually need to turn off hardware acceleration for your webview. Hardware acceleration as of Android 4.0.4 does nothing for canvas and other redraw events, but actually removes CPU resources for those events.
Try adding this line of code in your app java file:
super.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Also set android:hardwareAccelerated="false" in the manifest.
Same exact thing I experienced! Previously I was using Android 3.x for testing. As soon as I upgraded to 4.4.2 my Canvas was dead slow! Looking at the Rendering timeline I could see many Rasterization calls taking over 100ms and reducing my FPS to about 8! android:hardwareAccelerated="false" solved my issues. Is there a way to set hardwareAccelerated="true" depending on android version?
i don't know it is right place to ask question in stackoverflow .but i fell its best place to get quick answer for my query.
for getting more downloads i developed my application in android 1.5 version,minSDK 3. if i place application into android market.it will visible 1.5 and higher version mobile android market.it is good way for develop application in 1.5.how to make application good ui for all screen resolution
Thanks in Advance
Aswan
I am not 100% sure what your question is. But if you are asking if you develop your app against android 1.5, and you put it on the market, will everyone with 1.5+ see your app?
Yes, but just because it works on 1.5 doesn't mean it will work correctly on 1.6 or even 2.x. For example, one of my apps works in 1.5, 1.6, 2.0, 2.1 but stopped working correctly in 2.2 (froyo). So make sure you at least make sure it works in the emulator for each version. That will not give you 100% result if it will work on all devices, but it will be a start.