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;
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
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
3 matches
Mail list logo