android largeheap equated to true based on devices - android

I want to add in my manifest android:largeheap="true" based on some devices. Mostly devices running probably os 5.1 and below.Because alot of my clients are using samsung s3 , chinese , indian , pakistani phones.And I am getting lots of crashes in my firebase console. However this issue is not faced on top notch devices like google pixel samsung s8 etc.
How can I detect which devices i run largeheap, and how i run it on those devices only? I do not want to run it on devices i dont need to.

Well, you can't set this flag depending on the device. That's the true. But you can set it depending on OS version, screen size and etc. Check this answer to see how it can be done.

Related

App crashes on Kindle Fire but not on Nexus 5. Both run 4.2.2 and SDK 17. What is the difference?

I working on my first Android app (published on iOS and Windows Phone before). When testing the app on a Nexu 5 eveything works fine but on a Kindle Fire the app crashes:
java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
This is NOT about the exception itself. I could easily solve the problem by simple using listView.addHeaderView(...) before using listView.setAdapter(...). Not a big deal, but why does the same code runs without any problem on one device but crashes on the other?
I would understand the problem if the devices would use different Android/SDK versions but this is not the case. Both devices run Android 4.2.2 with SDK Level 17...
I would understand the problem if it would be related to something close to the hardware or some vendor specific system calls, but this not the case. It is just about setting up a ListView...
So, what is the difference?
Of course I have only a limited set of test devices. How can I be sure that the app will work on all devices that are running a supported SDK Level?
EDIT:
Of course one device is a phone and the other a tablet. To app uses different layouts for large screens at some places but problem also shows up in Activities/Fragments that have the same layout on both devices. Additionally no separated code for large devices is used. Using the same code and the same layout on both devices leads to a crash on the Kindle but runs on the Nexus...

Will coding done in android 2.2 work in 4.1 Jellybean Phones?

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.

Android app not comptible but listed to be compatible

I developed an Android app and released it on Google Play yesterday. The only problem is that I can't install the applicatien from the market on my own phone (HTC DESIRE/BRAVO). It is listed to be compatible with htc desire but when I try to download it it says it isn't.
I rooted my phone and have BCM ICS 4.0.3 CM9 installed. Could this cause the issue? How can I make it compatible? Thanks
Edit: Is it possible to adjust something in the code?
Yes a custom rom can make apps appear to be incompatible even when they are. A common issue is when it uses a non standard screen density setting in an attempt to gain more screen real estate.
If you do have a modified density, you could try setting it back to the default for your device. http://wccftech.com/article/increase-screen-dpi/

Custom app installed onto Galaxy Nexus doesn't look anything like it should

I am developing an app in Android that I hope to release. I've got most of my GUI done, but it does not look even close to correct on the device when installed and opened. I have a screenshot of how it looks, and a screengrab of how it should look (taken from the Emulator in Eclipse) at the links at the bottom of this post. It's best to take a look at the two images rather than me try to describe how screwed up the app becomes on my device.
I had a friend with the exact same device, including hardware and Android version, and his loads up just fine. Does anyone have any idea what's going on here? Both devices are Galaxy Nexuses, running Android 4.0.2, GSM on AT&T (unlocked).
Installed on my device: http://i.stack.imgur.com/x66Jo.png
In the emulator: http://i.stack.imgur.com/qE0J6.png
I've seen this occur in some Galaxy Nexus' and I put it down to a bug/glitch in the OS on that Galaxy Nexus. Try a Factory Reset of your Galaxy Nexus, if that fails, try reinstalling the current OS version you have (if you can get your hands on it), if that fails, get it fixed under warranty.
Does your app use multiple activities?
Can you compare on your two devices if this setting is the same?
Settings > Developer Options > Don't keep activities checkbox.
I realise this is an old question now but I was having the same problem as you and stumbled across a solution. I didn't particularly want to factory reset my phone as per straya's instructions, so I started playing around options in the Settings > Developer Options menu.
As it turns out, this problem occurs for some applications if you have the Force GPU rendering option checked. Disable this (I'm not sure why it was enabled anyway) and everything displays as it should.

Does anyone know why my app won't show on the android market for an Acer Liquid Mini?

I just put an app on the market and it is showing on all phones I have except for my Acer Liquid Mini. This one:
http://www.gsmarena.com/acer_liquid_mini_e310-3711.php
I have phones with the same res screens, Android 2.2, and close enough to the same hardware specs yet this is the only phone that it doesn't show for. It is running on factory defaults. When I try to install by the browser Google just says that the app isn't compatible and no more information.
I have the minSDK set to 4, maxSDK set to 10, I'm not specifying any screen resolutions in the Manifest (as recommended by the Android Doc post Android 1.6) and install location is set to "auto".
Does anyone have any ideas?
Apparently Google has problems with knowing the hardware constraints on some devices, such as this one, my Desire with the 2.3 upgrade and my Irish Galaxy 10.1" tab. They are working to sort it out
You could try deploying you app on appslib, they got a list of devices supported. You can choose a set of features required by your app and see the devices that will be able to run it.
I can't promise that both Android Market and appslib will give you the same results, i.e. will associate a device to the same requirements but that's a track to follow.

Categories

Resources