Wednesday, September 12, 2012

Re: [android-developers] Can I prelaunch an app?

Hm, it's not really clear what you mean here.

Apps have a kind of dynamic "living forever" feeling to them. You get
a 'poke' (your onStart(), etc...) gets called when you send an intent
to fire up the app on it's main screen. If you're asking if there is
any intent that allows you to bring up an app into memory and position
it so that it's lying in the background waiting to come back to with
an onResume(), the answer is no. However, you *can* send an intent
which is caught by a broadcast receiver or a service within the app.
This will effectively bring it into memory, but not an associated
screen.

What is the use case for this? I can imagine that it's possible to do
something annoying "pop under" thing, but the fact that the framework
doesn't support the kind of thing I just mentioned also implies that
what you really want to do should be able to be accomplished by some
other means..

kris

On Sun, Sep 9, 2012 at 8:56 PM, Jilong Liao <jilong.liao@gmail.com> wrote:
> Hi everyone,
>
> I am wondering if I can write a Service that enable the user to prelaunch a
> different app while he is using the current app. For example, if I am using
> gmail, can I prelaunch Angry Bird when I am using gmail? Here prelaunch
> means launch the app in the backgroup but not put it on the screen.
>
> Thanks.
> Jilong
>
> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment