Hi folks
Can some one give me a direction or some sort of code to get android cpu info and memory info for my app please. I am in the wilderness and have no idea which route to take
Is there an API or CLASS that I can use?
Thanks shiraz
Sent from my Desire HD using XDA App
Don't know if this will help, but on linux:
Code:
$ cat /proc/cpuinfo; cat /proc/meminfo
So if there is no API, you could parse the output of those commands.
Code:
private String ReadCPUinfo()
{
ProcessBuilder cmd;
String result="";
try{
String[] args = {"/system/bin/cat", "/proc/cpuinfo"};
cmd = new ProcessBuilder(args);
Process process = cmd.start();
InputStream in = process.getInputStream();
byte[] re = new byte[1024];
while(in.read(re) != -1){
System.out.println(new String(re));
result = result + new String(re);
}
in.close();
} catch(IOException ex){
ex.printStackTrace();
}
return result;
}
hisheeraz said:
Hi folks
Can some one give me a direction or some sort of code to get android cpu info and memory info for my app please. I am in the wilderness and have no idea which route to take
Is there an API or CLASS that I can use?
Thanks shiraz
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
You can try any android benchmark app. Search android benchmark apps.you will find bunch of it.
Sent from my LG-P500 using XDA Premium App
Related
Lots of keyboard shortcuts appear in many different threads that allow us to access information like software ect, so add your short cut with a brief description of what it does.
YOU CAN CHANGE THINGS INSIDE CERTAIN SETTING SO BE CAREFULL I CANNOT BE HELD RESPONSIBLE.
*#*#4636#*#* = testing menu.
*#197328640# = service menu
*#34971539# = camera firmware
Sent from my GT-I9300 using xda premium
A whole bunch of codes are in this thread:
http://forum.xda-developers.com/showthread.php?t=1687249
Sent from my GT-I9300 using xda premium
Spent three days looking for that . Mods please delete.
Sent from my GT-I9300 using xda premium
Hi guys,
Is there any way to port the float caller feature to cm9 devices?
http://youtu.be/rne_twxwoLY?t=1m20s
Exactly! Sorry for bumping this but i need this as well. Any ideas guys?
Try CallHeads or Call Popup on Play Store.
Sent from my GT-I9300 using Tapatalk 4
Here is the apk: http://db.tt/266LZgHm
Now just edit the build.prop using your favorite app to the following and restart:
ro.build.product = GT-I9300
ro.product.device = GT-I9300
ro.product.model = GT-I9300
ro.product.name = GT-I9300
and voila! it works on my Verizon Razr HD Maxx.
thanks
it works on my desire hd as well, thank you!
hickmanje2 said:
Here is the apk:
Now just edit the build.prop using your favorite app to the following and restart:
ro.build.product = GT-I9300
ro.product.device = GT-I9300
ro.product.model = GT-I9300
ro.product.name = GT-I9300
and voila! it works on my Verizon Razr HD Maxx.
Click to expand...
Click to collapse
Facebook home sucks. Put it on my girls note and couldn't figure it out. Liked every post in her tl by the time it was done
Sent from my DROID RAZR HD using xda premium
That's funny cause the thing I hate about it is it's simplicity. Worked perfectly for me in my tests however which is a brave new world for FB.
Sent from my NUNYA using Tapatalk 2
just for fun?
This is a sample
Code:
<?xml version="1.0" encoding="UTF-8"?><class><Student id="10"><firstname>ak</firstname><percentage>96.0</percentage></Student><Student id="1"><firstname>at</firstname><percentage>96.0</percentage></Student><Student id="20"><firstname>t</firstname><percentage>96.0</percentage></Student><Student id="510"><firstname>aepit</firstname><percentage>96.0</percentage></Student><Student id="90"><firstname>apit</firstname><percentage>96.0</percentage></Student><Student id="110"><firstname>pit</firstname><percentage>96.0</percentage></Student></class>
Now i want to print all data of student of particular id.please tell me how to do this.please prefer dom parser
Sent from my GT-S5570 using XDA Premium 4 mobile app
The documentation has a nice sample on this here. You probably just need to replace entry with student.
I originally asked this question in Srackoverflow. But I did not get any answers.
I am trying to set a text view number value to shared preferences using a string to get the values. Can anyone help with this?
Sent from my SGH-M919 using XDA Premium 4 mobile app
mistere372002 said:
I am trying to set a text view number value to shared preferences using a string to get the values
Click to expand...
Click to collapse
Could you elaborate on this?
You want to store the text (which is a number) in the textview to shared preferences?
Code:
mPrefs.edit().putInt("my-key", Integer.parse(mTextView.getText().toString())).commit();
That's correct. I forgot to mention that the number could be a decimal also.
Sent from my SGH-M919 using XDA Premium 4 mobile app
Thanks painless, that worked perfectly!
Sent from my SGH-M919 using XDA Premium 4 mobile app
Storing Chronometer time in SharedPreferences
mistere372002 said:
Thanks painless, that worked perfectly!
Sent from my SGH-M919 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I am actually trying to store the value of a chronometer in SharedPreferences but admittedly I have not worked with SharedPreferences much.
My end goal is to be able to close the Chronometer app and have the chronometer pick up from where it left off when the app is close.
Any help is appreciated.
Code:
chronometer = (Chronometer) findViewById(R.id.Chronometer1);
public void startClick (View view){
chronometer.setBase(SystemClock.elapsedRealtime());
chronometer.start();
Vibrator vib = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
vib.vibrate(100);
}