Well, all-you-gotta-do is:
Register your receiver in the manifest, like so:
<receiver android:name=".YourSmsMessageReceiverClassName">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
( Taken from:
http://developer.android.com/resources/samples/ApiDemos/AndroidManifest.html
)
Receivers declared in the manifest are active all the time, for as long
as the application is installed (and not disabled in the manifest). You
don't need to take any kind of special action for them to receive events.
In the onReceive() method of your broadcast receiver, you are free to do
whatever you like: such as starting a service to do some kind of
processing (I actually recommend this).
The application process will be started by Android as necessary.
-- Kostya
11.09.2010 22:25, tony obrien пишет:
I am hoping someone may respond and say … "Well, all-you-gotta-do is
Blah_Blah…" Is there a way to make the OS "not" clean me out of
memory? Is the answer to make the b-receiver a "service"? And is that
allowable in Android?
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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