2

I want to access result of *#0228# (I use samsung galaxy i9000, maybe its for samsung..) I can call this number with

Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:"+ "*" + Uri.encode("#") + "0228" + Uri.encode("#")));
startActivity(intent);

It calls *#0228# after I can see battery info and gsm info (i.e. hsdpa)

I want to get these information as instant. I dont know what is the best way for it. you know, it will always open some activitiy and will close and i will get info. maybe there must be another and easy way..

ertan2002
  • 1,458
  • 1
  • 32
  • 68

3 Answers3

1

Depending on what kind of information you want you should look at http://developer.android.com/reference/android/telephony/TelephonyManager.html

and

http://developer.android.com/reference/android/os/BatteryManager.html

I don't think it's possible to intercept the result of USSD calls ( as described here: Can the android API be used to intercept and read operator messages (USSD messages)? ) and I also don't think it's necessary especially for the info that you seem to look for (gsm and battery info).

Community
  • 1
  • 1
jpm
  • 3,300
  • 1
  • 19
  • 29
  • thank you for your explanation about ussd. I didnt know that there is no any api. Actually i didnt even know name is ussd :) and yes there is telephonymanager.. I think i will use this. But I was thinking that something is special for samsung, such as: #*197328640*# thank you again – ertan2002 Apr 26 '12 at 13:06
0

There is a solution here too:

How to read USSD messages in android?

Some guys hacked the ussd class. but I haven't tried it yet.

Community
  • 1
  • 1
unbalanced
  • 1,192
  • 5
  • 19
  • 44
0

Samsung Y doesn t provide a correct battery voltage, But the ussd call *#0228# is correct. The only way for me was to access to /sys/class/power_supply/battery/volt

JcV
  • 179
  • 1
  • 8