Hi
Every time I receive a SMS I get the following error and my app stops:
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1@44c1cd50
at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:934)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: java.lang.String
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1.onReceive(PhoneEvents.java:362)
at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:917)
... 9 more
My SmsInterceptor “sms_lyt” is created in my main activity:
Dim sms_lyt As SmsInterceptor
Under Process_Globals
The MessageReceived event is comply empty: (places in a service)
Sub sms_lyt_event_MessageReceived (From As String, Body As String)
End Sub
If I place a log(“test”) massage in sms_lyt_event_MessageReceived it will be executed before the error !
Can anyone help ?
Best regards
Kent
Every time I receive a SMS I get the following error and my app stops:
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1@44c1cd50
at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:934)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: java.lang.String
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1.onReceive(PhoneEvents.java:362)
at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:917)
... 9 more
My SmsInterceptor “sms_lyt” is created in my main activity:
Dim sms_lyt As SmsInterceptor
Under Process_Globals
The MessageReceived event is comply empty: (places in a service)
Sub sms_lyt_event_MessageReceived (From As String, Body As String)
End Sub
If I place a log(“test”) massage in sms_lyt_event_MessageReceived it will be executed before the error !
Can anyone help ?
Best regards
Kent