Hi,
I am getting "Intent.NEW_TASK_LAUNCH cannot be resolved" from the
following code. I am working through the Apress Android Essentials
book... is this another outdated code example?


package com.stevemacleod.prankapp;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class PrankSMSReciever extends BroadcastReceiver {


        public void onReceive(Context context, Intent intent) {

                //SmsMessage msg[] = Telephony.Sms.Intents.getMessagesFromIntent
(intent);

                //just start on any recieve text message!

                Intent startActivity = new Intent();
                startActivity.setLaunchFlags(Intent.NEW_TASK_LAUNCH);
                startActivity.setAction("com.apress.START_THE_MUSIC");
                context.startActivity(startActivity);

                return;
        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to