Hi,
This is an outdated code sample indeed. You probably want
Intent.FLAG_ACTIVITY_NEW_TASK instead.
On Mon, Nov 24, 2008 at 12:39 PM, steve_macleod
<[EMAIL PROTECTED]> wrote:
>
> 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;
> }
> }
>
> >
>
--
Romain Guy
www.curious-creature.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---