> On the whole, that's not a good idea. Popping up an Activity in the
> middle of whatever the user is doing will not be popular. There are
> certain circumstances where this is appropriate -- incoming VOIP calls,
> etc. -- but should not be done in general. Users will attack you with
> sharp pointy things.

The reason I need the Activity is because I'm making some queries to
the Contact database and I need to the ContentResolver. Is there a
better way? Can't it launch "minimized"?

> > How
> > do I actually start the Activity? The code above only starts the
> > AlarmManager and Service.
>
> startActivity() from some Context (e.g., the Service).
>
Do you mean the AppService class? I'm trying to do "startActivity()"
from the doWakefulWork but there doesn't appear to be a Context.
OnAlarmReceiver seems to have a context though.


> > And what about the situation where the user first installs your
> > application and may not even reboot their phone for a week. In that
> > case, do you have to start the Service from the Activity?
>
> Probably not. You probably schedule your alarm from the Activity. So, on
> first run, you set up your alarm when the user fires off the Activity
> for the first time. After that, you let the BOOT_COMPLETED receiver
> handle scheduling the alarms.

Your example code has the Alarm scheduled from the BootReceiver, how
do I make the Activity schedule it? And what about issues were I'm
trying to start an Activity that is already running, like the second
time they launch the app.

Thanks again

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to