Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the minimum Hardware requirements for an android application

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.

like image 816
Vinit ... Avatar asked Mar 12 '13 09:03

Vinit ...


People also ask

What is the hardware requirements for an Android application?

Minimum System Requirements for Android Studio GNOME or KDE or Unity desktop on Ubuntu or Fedora or GNU/Linux Debian. 2GB RAM. 4GB RAM recommended. 1 GB for Android SDK.


2 Answers

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.

like image 82
S.D. Avatar answered Oct 12 '22 02:10

S.D.


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

like image 39
minhaz Avatar answered Oct 12 '22 01:10

minhaz