Thursday, September 17, 2009

AndroidInfo to retrieve various system info. for Android Phone

Expend from previous exercises, AndroidInfo is a integrated application to retrieve various Android information, such as OS Version, System Information, CPU Information, Screen Resolution, Memory, Disk Space.













OS: Ubuntu 9.04
Java: Sun JDK 6
Eclipse version: 3.5 Galileo
Android SDK: Android 1.6 SDK r1

Fill in the project details with the following values:

* Project name: AndroidInfo
* Application name: Hello World, AndroidInfo!
* Package name: com.exercise.AndroidInfo
* Create Activity: AndroidInfo
* Min SDK Version: 4 (using Android 1.5 SDK for trial)

It contents one main class to handle the selection of function (AndroidInfo.java), and six class for each function (AndroidInfoOSVersion.java, AndroidInfoSys.java, AndroidInfoCpu.java, AndroidInfoScreen.java, AndroidInfoMemory.java, and AndroidInfoDisk.java).
It can be download here and extract to the folder /AndroidInfo/src/com/exercise/AndroidInfo/

Two layout files, main.xml for AndroidInfo.java, and panel.xml shared by all other classes.
Download here and extract to the folder /AndroidInfo/res/layout/

also remember to include the added classes in AndroidManifest.xml
Download here and replace the original AndroidManifest.xml.

Or, The whole project can be downloaded here.

No comments: