0

In my manifest I added in my activity:

<intent-filter>
 <action android:name="webradio.disneychannel.ACTION_DIALOG_CLOSE" />
 <category android:name="android.intent.category.DEFAULT" />
</ intent-filter>

And in my service I launch :

Intent close = new Intent(ACTION_DIALOG_CLOSE);
close.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(close);

where ACTION_DIALOG_CLOSE is an String = webradio.disneychannel.ACTION_DIALOG_CLOSE

But when the activity start, in the resume, this.getIntent().getAction() always return null...

Vinay
  • 6,891
  • 4
  • 32
  • 50
letroll
  • 1,059
  • 1
  • 14
  • 36
  • Is your activity already running when the service calls `startActivity()`? – David Wasser Aug 07 '12 at 15:38
  • What you have posted should work fine, would you post more code so we can see what is happening? – Sam Aug 07 '12 at 16:51
  • it's possible there is an other instance of this activity in background, this may be the cause? – letroll Aug 07 '12 at 19:53
  • If this Intent starts the Activity then the action will be `"webradio.disneychannel.ACTION_DIALOG_CLOSE"`, if you are starting the Activity another way then the action will be different. Without any more code, I just don't know what is happening. – Sam Aug 09 '12 at 21:11

0 Answers0