On Fri, May 4, 2012 at 3:05 PM, guich <[email protected]> wrote:
> I have a service that is called at boot time. This service then calls
> an intent this way:
>
>      Intent myStarterIntent = new Intent(getApplicationContext(),
> Loader.class);
>      myStarterIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>      getApplicationContext().startActivity(myStarterIntent);
>
> Is the Loader class also running as a service?

Either Loader inherits from Activity, in which case it is an Activity,
or Loader inherits from Service, in which case your startActivity()
call crashes.

Ergo, if your code is running, Loader is an Activity.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

-- 
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

Reply via email to