Sorry, there is no support for this, besides ensuring you are always running
with a service...  and you should really really avoid that.  We deliberately
don't allow apps to be launched from content changes due to significant
concerns about how this can impact performance if a number of apps end up
getting launched each time there is a change in some content provider.

On Fri, Jul 10, 2009 at 7:14 AM, [email protected] <
[email protected]> wrote:

>
> Hey guys,
>
> Quick question: I am trying to make a permanent contentObserver that
> observes content://sms. The way I do it atm is have an initial
> configure Activity with my application that calls the following code:
>
>                ContentResolver contentResolver = getContentResolver();
>                SMSHandler handler = new SMSHandler();
>                SMSObserver resolver = new SMSObserver(handler);
>                resolver.setApplication(this.getApplication());
>
>  contentResolver.registerContentObserver(Uri.parse("content://sms"),
> true, resolver);
>
> Now this all works fine...for a while; it seems that about 20 minutes
> after exiting said activity the ContentObserver will get removed and I
> will need to re-launch the Configure Activity to re-attach it.
>
> Is there any way that I can make sure that this content observer can
> permanently listen for changes without ever being killed?
>
> Thanks in advance!
>
> -James
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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