You can't do this, nor should you. This would pop your UI in front of the user, disrupting whatever they are doing. This is highly discouraged. The proper way to do this is to post a notification, which the user can respond to when desired and can cause your own activity to be launched, which can then launch the other activity.
On Thu, Feb 11, 2010 at 11:17 AM, Menny <[email protected]> wrote: > Hi, > I have a Service which needs to receive data from external packages. > So, to locate the data providing external packages, I use activity- > filter and PackageManager.queryIntentActivities function to locate the > interesting packages. > Now, from each such package, I need to get a ContentProvider URI. > So I want to start the external Activity and the external activity > will return a result to my service - something like > "startActivityForResult". > The problem is that there is no way to call "startActivityForResult" > from a Service, only Activity can do that, and my project does not > have any Activity, and probably can't show UI for the user. > > The bottom line: > Can anyone suggest a way to get ContentProvider URI from an external > package, while my package has only a Service? > > Thanks, > Menny. > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

