Your other components can access the application from
Context.getApplication(). You could have your MainActivity register
itself with your Application class when it is active and unregister
when it is stopped/paused.
On Jun 25, 10:24 am, Tina <tina...@gmail.com> wrote:
> Hi all,
> I have small simple Service and big MainActivity with UI.
> Service is called periodically from AlarmManager.
>
> My Service need to know if MainActivity is on the screen and inform
> MainActivity about state changing.
>
> How can I do it?
>
> Thanks for any infornation,
> Tina
--
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