[android-developers] I found the way how to SmsReceiver invoke my Application

2009-05-22 Thread doananhtai
public class MyActivity extends Activity { public static MyActivity myactivity; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myactivity = this;

[android-developers] Re: Start Application with SMS

2009-05-21 Thread doananhtai
Try this code in SmsReceiver // Invoke MyActivityName Intent i = new Intent(context, MyActivityName.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); But after start my application, I don't know how to let it process the received sms content...hic On May

[android-developers] How to specify both message body and Destination Number in SMS intent.

2009-05-21 Thread doananhtai
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(sms: 1234567890)); intent.putExtra(sms_body, the SMS text); startActivity(intent); NOTE: without Intent.setType(vnd.android-dir/mms-sms); this will erase the destination number. --~--~-~--~~~---~--~~ You