I try to create an android application GPS tracker.When the user admin call the phone...the phone send back to admin the location with sms.I create the part when user admin call , send sms with broadcast receiver and an intent service.How i add pass inside sms the location?I have read examples with location manager but send location when location changed to text.I want get the current location variables from UI when phone ringing from admin and send it back sms (sms intent service)...My problem is how i pass location variables to intent service...My way is store variables to file periodically and read when i want send sms.Another better way?Any idea,help for this?Thanks.
Asked
Active
Viewed 784 times
-1
-
Deleted answer since it is not helpful for you – Jan 26 '13 at 16:08
1 Answers
0
http://www.mkyong.com/android/how-to-send-sms-message-in-android/
you can use SmsManager API or device’s Built-in SMS application to send a SMS message. In this tutorial, we show you two basic examples to send SMS message :
SmsManager API
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);
Built-in SMS application
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "default content");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);

user2129416
- 15
- 6