Hi, I too am interested in knowing how to launch applications on the first level when you receive a sms or a call. Who knows to remove the applications that are launched by default when a call comes in or SMS? I would like to be informed on the subject.
Thank you. 2009/4/2 Gulfam <[email protected]> > > Hi thesquib, > > I am trying to receive sms like you. My requirements this I dont > want to show my specific messqage in default Inbox. Can you help me > regarding this. can you share your sms receiving code with me ?.I Have > used xml for receiver as you mentioned above but my receiver is not > invoking on receiving SMS on emulator and sms is going to default > inbox. can you help me regarding this. > > Thanks, > Gulfam > > On Apr 2, 2:02 am, thesquib <[email protected]> wrote: > > It should be noted that there is a spelling mistake in the code > > version, this is how it should read: > > IntentFilter mFilter = new IntentFilter > > ("android.intent.action.DATA_SMS_RECEIVED"); > > I typed it up in a browser and made the mistake. > > > > Thanks. > > > > On Mar 30, 11:24 am, thesquib <[email protected]> wrote: > > > > > I have created a broadcast receiver statically by specifying it within > > > the Manifest, and I have also created the "same" broadcast receiver in > > > code and have registered it with the application context. The static > > > way works very well, but the dynamic way does not receive the expected > > > broadcast. It could be that I am not creating the intent filter > > > correctly, or that I need to register it with some other context > > > somewhere. Please see the code examples to see what I am doing. This > > > is related to receivingdataSMS, it works very well on a device using > > > a broadcast receiver defined in the Manifest. The correct permissions > > > are set for both examples. > > > > > The following is from the Manifest, and the resulting receiver gets > > > the expected broadcasts: > > > <receiver android:name=".MyReceiver"> > > > <intent-filter> > > > <action android:name="android.intent.action.DATA_SMS_RECEIVED" /> > > > <dataandroid:scheme="sms" android:host="localhost" > > > android:port="6432"/> > > > </intent-filter> > > > </receiver> > > > > > The following is the code example that doesn't work (it does work with > > > an intent like "android.provider.Telephony.SMS_RECEIVED" but not > fordatasms): > > > MyReceiver mReceiver = new MyReceiver(); > > > IntentFilter mFilter = new IntentFilter > > > ("android.intent.action.DATA_SMS_RECEIVER"); //also tried an empty > > > filter > > > intentFilter.addDataAuthority("localhost", "6432"); > > > intentFilter.addDataScheme("sms"); > > > context.registerReceiver(mReceiver, mFilter); > > > > > The question is - why does this broadcast receiver get notified of the > > > incomingdatamessages? It seems some other resource is notified when > > > the Manifest version of the receiver is created... > > > > > Thank you, > > > Squib > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

