Hi
i have developed an application and it smoothly running in all phones except Htc Eris, in Htc Eris i get out of memory exception, null pointer exception etc, but these problem i never see in my samsung galaxy or motrolloz milestone or spice mobile, i need to know any problem in Htc Eris, like low memory ,low processing power etc
The "Heap Size" on the Htc Eris's factory ROM is at 16M and the other phones are 24M and higher.
You need to try to optimize your application as best as possible so it cam run on the phones with a smaller heap ( ..or virtual memory - similar to the virtual disc size on Windows). A good place to start and easiest is to optimize all your drawables and don't put any PNG's in the drawable folder; these images are not compressed at run time like the other drawable folders. ie. drawable-hdpi. I discovered this by accident when I but a wallpaper in that folder - I was getting the same errors as you. Moving the PNG to the /drawable-hdpi folder alone cleared it.
Related
I've recently developed an Android app. For some reason the app icon does not show on the home screen on a HTC One device. The icon shows fine for my other devices.
Reading other forums, I have made sure the app is stored within the phone rather than the SD card, and tried rebooting but these do not seem to fix the issue.
I'm guessing that the HTC One is not picking up the icon file, but I'm not sure why - as the other devices including Galaxsy S3 and other HTC devices do? Any help would be appreciated.
Thanks in advance!
I suppose you've created folders to support various densities? ldpi,mdpi,hdpi,xhdpi? If that's the case, are you sure you've put your icon in XHDPI folder because HTC ONE will read it from there because it has very big density.
For example:
According to GSM Arena, Galaxy S3 Galaxy S3 has 306ppi pixel density. That's high density and this phone will read drawables from hdpi folder.
On the other hand, HTC ONE has 469ppi pixel density. That's extra large density and this phone will read drawables from x-hdpi folder. GSM Arena, HTC ONE
But this may not be the case, because if drawable is missing from one folder will just read it from another available. But please check again your x large folder.
In my project I am using a few drawables for creating good looking UI and the strange problem I got is it working good on Kindle Fire with 2.3.4 version properly and occupying just 2.8397MB only, but when I run the same application in nexus 4.2.1 device it is taking 23.45678MB to 30MB and running very slowly, I thought the problem would be on drawables so created 9 Patch for them but still getting same problem.
On pre-honeycomb devices (like the 2.3.4 Kindle Fire) bitmaps are stored in native heap, which doesn't show up when analyzing the dalvik heap memory usage in ddms.
This does not mean that it won't still count against the heap limit, however.
Honeycomb and later devices store bitmaps in the dalvik heap which will show up in ddms. That should explain why the memory usage is much "less" on the Kindle Fire. It isn't, it just appears that way.
Do you have different drawable folder per resolution ? if so, it could be that this is related to the resources you have in the different folders so that the drawables loaded on your Nexus are significantly larger than the ones loaded on your kindle fire (The kindle fire has a 1024x600 resolution while the Nexus 7 has a 1280x800 resolution)
I am working on an android Audio Recording application, our app is currently designed to work on all android phones, the Nexus 7 and the Motorola Xoom tablets.
I was wondering if there are any guidelines or best practices to re-design/modify our app for Nexus 10. More specifically, any pointers on the below points would be really helpful:
UI guidelines to support the new 2560x1600 resolution
Android resource files related modifications (based on similar guidelines)
Any sample or open sources apps that have been modified to work on the nexus 10
Best practices creating and running a nexus 10 emulator since there is no such AVD device by default (screenshot below). Any thoughts on creating one, keeping the high resolution in mind.
As long as you have xhdpi assets, and layouts made for 10" tablets, you shouldn't have to do anything (except add a new xxhdpi launcher icon, as #Mattias mentioned).
To make a Nexus 10 AVD, navigate to Device Definitions:
Then, click New Device. Fill it out something like this:
Now it will be listed in the devices drop-down that you show above.
Regarding your second point, resources:
While the nexus 10 is a xhdpi device, it will use the launcher icon from xxhdpi "one bucket up" if available, so make sure to provide one as it will look much better/clearer/sharper. Reason is that there is room for a bigger icon on this device. Launcher icon size at xxhdpi is 144x144 pixels.
For reference see:
https://plus.google.com/118292708268361843293/posts/ePQya3KsTjW
The best way to emulate the Nexus 10 is to use AndroVM. I am currently running Android on it with the full Nexus 10 2560x1600 resolution and it fits onto my HD screen if I set AndroVM to use 320dpi.
Oh.. and it's VERY fast :-)
I personally use it over emulators and real hardware devices as it's extremely responsive and the deployment of the APK is lightning fast.
I do not contribute to the AndroVM project myself by the way, but it has speeded up my own development cycle considerably. In all development cycles, a developer waiting to see if their code tweaks work using an emulator or a hardware device adds considerable time overhead. I would thoroughly recommend using AndroVM regardless of screen size during normal code development.
I made an android game with cocos2d-android.
When I test this game on different devices, the RAM usage is varied:
Samsung Galaxy Note (2.3.5):
Task-Manager show: about 17MB
Watchdog: about 23MB
Debug: about 10MB (Debug.getNativeHeapAllocatedSize() / 1048576L)
Samsung Galaxy I9000 (2.3.3):
Task-Manager: about 55MB
Watchdog: about 42MB
Debug: about 25MB
Emulator (2.3.3 && 3.2):
Debug: about 40MB
I don't have a clue why the memory consumption on different devices of the same game is varied like this. Has anybody an answer?
Each of those devices are running a different version of Android, and are likely running different types of software in the background.
If your not experiencing any problems, and your users aren't complaining - I dont see anything to worry about.
Samsung Galaxy I9000 has a heap size of 64MB. Galaxy Note has a heap size of 128MB. In the emulator a heap size of 24MB is default but of course you can choose any size.
I am still don't know exactly why the ram usage is that much different, but it seems to have something to do with the bitmaps I use for the game. In the newest version I added low resolution bitmaps for low-end devices. If I turn on the low resolution bitmaps on the I9000 the ram usage is decreasing strongly. If I start the game with low-resolution bitmaps on the galaxy note the ram usage decrease is much smaller, nonetheless the game works smooth on both devices with sd and hd graphics and the user feedback in the android market is positive too.
good day
we are developing game for android and have some trouble with resource loading on high dpi devices.
our resources are located in res/drawable directory
on a standart dpi device the game work properly, but on hdpi (tested on HTC Desire) all resources which located in res/drawable-hdpi load are loaded correctly, but the resources which miss in drawable-hdpi directory but present in res/drawable are ignored
but everything works fine on the virtual device with hdpi.
does anybody encounter this problem and know how to solve it?
Well from non device tester advice here, can You move those missing resources to drawable/nodpi if that does not conflicts your development strategy ?
Don't know to what extent it will work, but u can try!