Activity can't be started from the service without
FLAG_ACTIVITY_NEW_TASK flag. Probably there is some alternative to
this flag, but activity from the service doesn't started simple
without this flag and without any other flag.
Read about this flag here 
http://developer.android.com/guide/topics/fundamentals.html
and here 
http://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent)
"Note that if this method is being called from outside of an Activity
Context, then the Intent must include the FLAG_ACTIVITY_NEW_TASK
launch flag. This is because, without being started from an existing
Activity, there is no existing task in which to place the new activity
and thus it needs to be placed in its own separate task."

Anyway, I have experimented with some combinations of flags,
unfortunately without result.

On Jul 3, 11:38 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Sat, Jul 3, 2010 at 5:54 AM, alex.tchumel <alex.tchu...@gmail.com> wrote:
> > Could you say more about your idea - what kind of the flags can be
> > helpfull?
>
> Position the cursor of  your editor at the end of the line containing
> you setFlags() call. Press the backspace key enough times to eliminate
> all characters on that line. Save the file. Recompile, and test the
> modified application.
>
> > Do you think an alternative to FLAG_ACTIVITY_NEW_TASK flag or some
> > additional flag(s) to FLAG_ACTIVITY_NEW_TASK?
>
> Most startActivity() calls do not need setFlags(). Hence, I am
> suggesting that perhaps the flag you are presently setting is not
> merely "not needed" but also may be interfering with what you are
> trying to accomplish.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 2.2 Programming Books:http://commonsware.com/books

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

Reply via email to