Actually I have LOGGING all over the place. I was able to determine that the SMS Receiver is actually getting called ... but it has trouble doing the NM.Notify(); (I'm still trying to decode what *that* error is all about...)
And I have Thread.sleep(lots-o'seconds) and Thread.yeild() in the runnable so I am being careful regarding your concerns. What I would REALLY like to do is a startActivity() from inside the Receiver... but I don't suppose that's possible? (In my first timid attempts to do that awhile ago I could not get it to compile, I think the "extends BroadcastReceiever" makes the compiler not understand what startActivity() means.) On Sep 11, 5:02 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > 12.09.2010 0:37, tony obrien пишет:> Well, that was a bust ... > > > I am pretty sure that*my* BR is not getting called... pls check my > > work:: > > > This is the Manifest => (assume the correct permissions in that I do > > get the SMS when this is working in the foreground) > > > <receiver android:name=".clsSMSRCV"> > > <intent-filter> > > <action > > android:name="android.provider.Telephony.SMS_RECEIVED" /> > > </intent-filter> > > </receiver> > > Looks good. Assuming that your tags are nested correctly (<receiver> > should be inside <application>), and that you also have this at the end > of the manifest, inside <manifest>: > > <uses-permission android:name="android.permission.RECEIVE_SMS"/>> My > MAINACTIVITY declares the BR as so... > > > private clsSMSRCV myClsSMSRCV; > > > and then in the MainActivity.onCreate() == > > > myClsSMSRCV = new clsSMSRCV(); > > No need to do this - Android will instantiate your receiver as > necessary, and call its onReceive().> This is the clsSMSRCV definition with > the receive override: > > > public class clsSMSRCV extends BroadcastReceiver { > > > �...@override > > public void onReceive(Context context, Intent intent) { > > // I tear apart the SMS message(s) here... and alter Statics for > > review outside this routine > > } > > } > > Have you tried logging this? > > Just a simple > > Log.i("clsSMSRCV", "Inside onReceive") > > would be immensely helpful. > > > > > One last thing, I can think of... > > > Main has a runnable which is essentially monitoring the Statics and so > > can then act upon them changing in ClsSMSRCV. > > > In my last experiment I had the onReceive() try to express a > > Notification.... nuttin happened. > > Polling for events is bad - it ties the CPU, uses up the battery, and > doesn't work when the phone is asleep. You could broadcast an intent > with your own action string to notify other components of your application. > > -- > 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 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