Hi I am testing an app (android 2.1 level7) on a HTC Hero phone (via Perfecto Mobile). I get the Foce Close msg and look at the log which says:-
11-30 18:41:25.765: ERROR/dalvikvm(2158): Could not find method android.telephony.SmsManager.getDefault, ref开发者_如何学Pythonerenced from method com.AccidentAlert.ListViewLoader.sendSMS
The code which calls this is:_
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneno,null, message, sentPI, deliveredPI);
Can anyone suggest why the phone should have a problem like this? Thanks Ron
Perhaps your HTC Hero hasn't been updated to Android 2.1? I believe they were 1.5 originally, which would cause this problem since the SmsManager wasn't introduced until API Lvl4 (Android 1.6).
精彩评论