Ok I was listening at the wrong parameters...

Now, i've set MESSAGE_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";

and

<receiver android:name="MessageReceiver">
       <intent-filter>
               <action
android:name="android.provider.Telephony.SMS_RECEIVED"/>
       </intent-filter>
</receiver>

2010/1/26 mfc_alpha <mathieu.ma...@gmail.com>

> Hello,
>
> I'm writing an application which send SMS and I can get delivery
> reports working:
>
> Here is how is send my message:
>
>
> ArrayList<PendingIntent> deliveryIntents = new ArrayList<PendingIntent>
> (messageCount);
> ArrayList<PendingIntent> sentIntents = null;
> if (haveDeliveryReports) {
>        long entryId = mDbHelper.createEntry(mDbHelper.nameFromNumber(newN),
> newN, deliveryId);
>        for (int j = 0; j < messageCount; j++) {
>                        Intent intent = new
> Intent(MessageReceiver.MESSAGE_RECEIVED, null,
> this, MessageReceiver.class);
>                        intent.putExtra(PARAM_ENTRY_ID, entryId);
>                        deliveryIntents.add(PendingIntent.getBroadcast(
>
>    this, 0, intent , PendingIntent.FLAG_UPDATE_CURRENT));
>        }
>
> }
> manager.sendMultipartTextMessage(newN, null, messages, sentIntents,
> deliveryIntents);
>
>
> So I *Should* have my MessageReceiver class called.
> But this receiver is never called....
>
> More strange, if I switch deliveryIntents and sentIntents in
> sendMultipartTextMessage (so manager.sendMultipartTextMessage(newN,
> null, messages, deliveryIntents, sentIntents) )
> my receiver is called!
>
>
> My AndroidManifest contains those permission:
>
>        <uses-permission android:name="android.permission.READ_CONTACTS"></
> uses-permission>
>        <uses-permission android:name="android.permission.SEND_SMS"></uses-
> permission>
>        <uses-permission
> android:name="android.permission.RECEIVE_SMS"></uses-
> permission>
>        <uses-permission android:name="android.permission.WRITE_SMS"></uses-
> permission>
>
> and this receiver
>
> <receiver android:name="MessageReceiver">
>        <intent-filter>
>                <action
> android:name="com.openwide.android.mutliSmsSend.message_received"/>
>        </intent-filter>
> </receiver>
>
>
> Any body can figure out why my  MessageReceiver is never called ?
>
> Thanks in advance!
>
>
> Mathieu
>
>
>

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

Reply via email to