Why are you wanting to detect this? Perhaps there is a better way to accomplish what you are trying to do....
Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Aug 22, 2012 at 9:14 AM, Carlos A. M. dos Santos < [email protected]> wrote: > On Wed, Aug 22, 2012 at 10:58 AM, user123 <[email protected]> wrote: > > This will not be executed always. Android lets apps running in the > > background, although user "closed" it. When you launch the app it will > not > > necessarily be created. > > I suggest you to get satisfied with what you have. The world is cruel. > > --8<-- > >> @Override > >> public void onCreate(Bundle savedInstanceState) { > >> super.onCreate(savedInstanceState); > >> Intent intent = getIntent(); > >> boolean fromLauncher = savedInstanceState == null && > >> Intent.ACTION_MAIN.equals(intent.getAction()) && > >> > intent.getCategories().contains(Intent.CATEGORY_LAUNCHER); > > > > -- > "The flames are all long gone, but the pain lingers on" > > -- > 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 > -- 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

