How to get the minimum Hardware requirements for an android application

Vinit ... picture Vinit ... · Mar 12, 2013 · Viewed 23.9k times · Source

I and some team members developed an android application which collects data on field with mobile.

Now this application is going to production. So general people will use this application. We also need to write a Documentation which will explain all the things introduced in the application and what the minimum hardware requirements are needed to run this application without error.

Now how do I know what the minimum hardware requirement is?

Basically in my application there are about four TextFields, Three Spinners, Dates, EditTexts and two ImageViews.

So how do I know what the minimum memory requirement is needed to run this application.

I have tried this application in one a mobile device where almost all the memory is used up by some other application. There my application is not able to capture photo. And when I remove some applications, my application works fine.

That's why I want to know what the minimum memory requirement is needed to run my application.

Answer

S.D. picture S.D. · Mar 24, 2013

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.