Reputation: 21
I'm developing a cross-platform mobile application using HTML5 Javascript & Phonegap. It's supposed to be an application which can display the Device Information and RAM & CPU status (using & free RAM CPU, name, size,...). But I can find any API which can get the status of CPU&RAM. I'm just a beginner in Mobile HTML5&JavaScript. So, if you guys know anything that can help, please tell me. I'll be very appriciated. Thank you!
Upvotes: 2
Views: 7739
Reputation: 2839
In a plain web app you don't have access to this information. But since you mentioned Phonegap in your question, you can get basic device info using this:
http://docs.phonegap.com/en/3.0.0/cordova_device_device.model.md.html#device.model
There are also 2 cordova plugins which you can look into. Neither has iOS support at the time of this writing.
http://plugins.cordova.io/#/package/com.ankamagames.plugins.sysinfo http://plugins.cordova.io/#/package/org.chromium.system.memory
You may want to look at Chrome packaged apps and the chrome.* apis for cross platform and mobile development here https://developer.chrome.com/apps/about_apps
Upvotes: 1
Reputation: 444
Although I never worked on such area. But what I can suggest is- You will need to write android native plugin to achieve the same.
I think there should be android api to read memoryinfo and cpuinfo file if not you can directly read /proc/cpuinfo and /proc/memoryinfo to get ram and cpu related information. Hope it will give you some insight. Below is the link of related question - Android How do you get total memory RAM in the device?
Upvotes: 0