android-smsmms icon indicating copy to clipboard operation
android-smsmms copied to clipboard

Event for MMS sent work but don't work if MMS not send

Open Anth06ny opened this issue 6 years ago • 4 comments

Hello

thank you for your library.

I use them to send MMS and it's work good. When i send MMS, I receive Broadcast event to told me that this mms correctly send action=com.klinker.android.messaging.MMS_SENT

But if i put phone in AirPlane mode, i didn't receive event to told me that MMS not send like i can have with SMS.

Is it normal ?

Anth06ny avatar Sep 05 '18 13:09 Anth06ny

MMS uses data, in airplane mode there is no data. So it sounds normal. Are you using version 5.0.1?

markandroid2999 avatar Sep 06 '18 18:09 markandroid2999

I use 5.0.1 and i try with 5.0.2 too. I know that in AirPlane mode we can't sand sms, but my question is why i didn't receive action=com.klinker.android.messaging.MMS_SENT in fail state.

If i done the same with sms, i receive a fail event that sms not send, but not with MMS.

Maybe it's normal ? Maybe phone keep mms for later ?

Anth06ny avatar Sep 07 '18 08:09 Anth06ny

So after some test, it's look like in airplane mode phone keep mms to send it later. That's why i didn't receive event

Anth06ny avatar Sep 15 '18 10:09 Anth06ny

For some reason when I upgraded to the 5 version, I get this exception when I send a MMS

    --------- beginning of crash
2018-10-02 13:13:30.320 4010-4010/com.klinker.android.send_message.sample E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.klinker.android.send_message.sample, PID: 4010
    java.lang.RuntimeException: Unable to instantiate receiver com.klinker.android.send_message.MmsSentReceiver: java.lang.InstantiationException: java.lang.Class<com.klinker.android.send_message.MmsSentReceiver> cannot be instantiated
        at android.app.ActivityThread.handleReceiver(ActivityThread.java:3013)
        at android.app.ActivityThread.-wrap18(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6123)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
     Caused by: java.lang.InstantiationException: java.lang.Class<com.klinker.android.send_message.MmsSentReceiver> cannot be instantiated
        at java.lang.Class.newInstance(Native Method)
        at android.app.ActivityThread.handleReceiver(ActivityThread.java:3008)
        at android.app.ActivityThread.-wrap18(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6123) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) 

I'm surprised that you are not getting this. Can you help me?

markandroid2999 avatar Oct 02 '18 17:10 markandroid2999