好吧,我正在开发一个应用程序,如果我得到任何消息的单词(位置),它将通过类扩展广播接收器发回经度纬度。谁能请帮忙 提前致谢
locationmanager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
String provider = locationmanager.getBestProvider(criteria, true);
mylocation = locationmanager.getLastKnownLocation(provider);
longitude = mylocation.getLongitude();
latitude = mylocation.getLatitude();
发送部分
if(msgBody.equals("Location")){
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendDataMessage(destinationAddress, scAddress, destinationPort, data, sentIntent, deliveryIntent)
} catch (Exception e) {
e.printStackTrace();
}
如何处理smsManager.sendDataMessage()?