How to get the minimum Hardware requirements for an android application How to get the minimum Hardware requirements for an android application android android

How to get the minimum Hardware requirements for an android application


Minimum requirements would depend on, and will mostly include testing and documentation of the following points:

  1. API level: Minimum android version supported, its mostly known by the developer. There have been many major changes between API's in android. support v4 and v7-compat libraries do help a lot, but they don't cover all aspects.

  2. Device capabilities: Note down all the features your app uses. (like has touch screen, has camera, accelerometer, network connectivity etc). Luckily, you can declare that in App manifest (uses-feature) and play store will filter out unsupported devices.

  3. RAM: Use DDMS/Android Studio to see real time memory usage, on emulator and on a real device. Try to use as much as ram you can use, by triggering various functions of the App, keep it running for long intervals of time. Take that min and max usage as an estimate. DDMS tools like TraceView etc also let you see object allocations on heap, threads, and do method profiling. Run Monkey Tool for long periods of time to stress out the app.

  4. CPU Speed: IF the app does Intensive computing, data conversion etc, you might want to program some time stamp logs in such computing code. Make sure you set the CPU speed such that whatever computing needs to be done, completes in sufficient time, without making the device lag too much. Also in case of visual rendering, (games) good frame rate is main factor. In this case you can benchmark real devices for frame rates, and choose high end Chip-sets. You can also recommend users for multi-core devices.

  5. CPU/GPU Compatibility: Another important detail is that if an App has C/C++ code, that code might not run on some of the CPU types (MIPS, ARM or x86). Same is true for Apps using OpenGL ES versions and available extensions. Devices do have different cpu/graphic chip-set.

  6. Disk: Estimate the size of the app after installation, Note that the minimum disk requirement for App is the space required to store the app itself, so that it can at least start, and does not include caches, databases or the user content it creates on usage.

  7. Display Size: While a responsive and flexible UI is always recommended, your app may be only usable with certain screen sizes. So, compatible screen sizes can be taken into account.

  8. What you can't control: Remember you have no control over what other Apps user might run, so, its safe to declare that your app requires this much free ram on device, and assuming the best scenario, declare that device has at least that much ram installed. For example you noted that you app takes 200 mb when maxed out, so requirement would be 512mb+ devices only. Also you can't control what size of sd-card user will have, so App should promptly tell user that it cannot function when disk is full.

Finally, good testing is what turns estimates into real benchmarks. And its better to base requirements on benchmarks instead on only estimates.

UPDATE:

Is there any API or class by android which give the information what is the minimum memory requirement depending on how may fields I am using in my application and what the permission I am taking bt the mobile phone.

  1. API cannot predict runtime accurately . There would be many if's and else's in your code, plus user input, you cannot predict which exact path the object creation and execution will go along. You can only monitor runtime externally using tools like DDMS.

  2. Unlike Apple, Android is an open system, the possibilities of device hardware, that manufacturers are free to choose, are massive. Add to that the customizations they do in their device's ROM's. No common API is going to keep track of all that. Simply stick to android API and standard specifications, avoid usage of hidden API etc.


Question you should ask your self

1. What are my memory requirements? Do you need lot of memory (Not physical it is in heap) to process data or it is minimum? Now a day’s most of devices come with 64 MB heap size but this varies from Manufactures to manufactures. Even for same API level it is different. Find out your minimum and then make sure you have that amount heap memory available.

To monitor memory you are consuming at runtime check this

to find out how much heap memory available on current device check this and this.

Remember android is not like windows and every app start with same amount of heap memory, and it is constant for every app on that device. That means apps are not allowed to grow beyond this available memory. You can request for extra memory by this tag in manifest android:largeHeap="true" but this feature is not available for pre 3.0 OS version .

I have try this application in one of the mobile where almost all memory are used by some other application. There my application not able to capture photo. And when I remove some application then my application work fine.

Above assumption is quite confusing because, when your app running Android put all other app side that means your app will have memory defined by you heap size, and if OS thought it needed more memory or failed to allocate more it would kill those process. Android give high priority to the task currently running. So if you are interacting with an app it highly unlikely that it will have less memory then heap size. their could some different reason for having trouble with other apps.

2. What are my API requirements? If you are using any special API which is not available to older API and level then, you have two options either you say you app simply not going to support that API version or you can back port that specific feature.

3. What are my hardware requirements?Ask yourself if you are using any specialty software or hardware, if that special hard available to all devices or not? Example, NFC, bluetooth.

4. What are my display requirements? Is this app only for mobile or for both mobile and tablet? What about those 7 inch which fall in-between tablet and mobile.

5. What are my localization requirements? Is this app relying on any special character set? What if a certain device do not have those characters.

And, FYI amount of object you mentioned that should not occupied more then few MB. But careful when working with bitmap. Read this


It seems it guaranteed that any process in Android will have at least 16MB of memory, most of modern devices allow heap grow to 24+MB

please see description ofhttp://developer.android.com/reference/android/app/ActivityManager.html#getMemoryClass()

Memory management all on the OS side, and there are priorities for processes and threads described in http://developer.android.com/guide/components/processes-and-threads.html#Lifecycle

so if your app is on foreground it most likely you have enough resources to handle image from camera.

what API do you use to capture the image?