The incoming SMS was complete received, i can see the senders numbers and the body (text).
But then the App crashes with following error ( i am using V6.8)
Here is my manifest content:
But then the App crashes with following error ( i am using V6.8)
B4X:
MessageReceived: From = +491234567890, Body = This is a test
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED flg=0x8000010 (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$2@293a410
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:932)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$2.onReceive(PhoneEvents.java:398)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:922)
... 7 more
Here is my manifest content:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddManifestText(<uses-feature android:name="android.hardware.location.gps"/>)
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="secret :-)"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
AddManifestText(<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="23" />
AddPermission(android.permission.RECEIVE_SMS)
AddReceiverText(s1,
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
)
'End of default text.