How to get the minimum Hardware requirements for an android application
Asked Answered
T

6

16

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.

Tremble answered 12/3, 2013 at 9:55 Comment(2)
Does your app use the camera?Philomena
ya this application use camera. Network service, sqlite database, GPS by satellite and by by service provider....Tremble
I
16

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.

Illegitimate answered 24/3, 2013 at 15:41 Comment(1)
I think this is good answer among all others. But here I need to explore all the information regarding my application by trying again and again on different device as well as on emulator. 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.Tremble
T
3

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

Toplevel answered 25/3, 2013 at 7:32 Comment(0)
S
2

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 of http://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?

Skylark answered 19/3, 2013 at 16:7 Comment(0)
D
2

The best way to find out if your app will run on certain hardware, is to test on that hardware. Ask your friends if they have older android phones lying around, and test your app on them.

Worst case, make multiple Android Virtual Devices with varying memory. Beware though, the android emulator is disappointingly slow, even with hardware acceleration.

Decani answered 20/3, 2013 at 4:55 Comment(0)
Y
2

As @veon says, you can make some estimates. However, it will always be a bit unpredictable because you want to know how much it will use in different contexts, and you will need users to know the usage of others apps on their phones.

As I understand it, what you primarily need to provide is clear documentation. It might be a lot easier (for you and everyone) to document it as follows:

This application will run on all recent standard android phones (android version XXX and above). However, if other applications are running, in particular memory hungry ones are running, it's performance may be affected. If you are having performance issues, please remove other applications which are memory and processes heavy. If you need help determining that, please use an application such as ZDbox to help you.

For reference, I have no links to ZDbox, I'm just using it as an example.

Yseulte answered 20/3, 2013 at 12:24 Comment(0)
U
1

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

Use the monitoring tool from little eye labs. It monitors power consumption / memory consumption / CPU consumption / Network activity of your app among other things. You can download it for a 30 day trial. That should give you a fair idea of the resources that your app consumes. I have to say though that apps are not usually released with a set of hardware requirements. Keep your memory / battery usage in check and you should be fine.

As for low memory, does that happen when you display pictures that the camera takes or does the camera itself bring down the app ? Are you releasing resources held by the camera ? Take a look at this question - Android camera out of memory exception

Ursuline answered 24/3, 2013 at 16:0 Comment(1)
This answer contains a dead link.Substitution

© 2022 - 2024 — McMap. All rights reserved.