R ronell Well-Known Member Licensed User Longtime User Aug 30, 2017 #1 this error raise when i send sms using android version 6.0 and up, already added the permission in manifest AddPermission(android.permission.SEND_SMS) java.lang.SecurityException: Sending SMS message: uid 10197 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:1190) at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:362) at android.telephony.SmsManager.sendTextMessage(SmsManager.java:329) at anywheresoftware.b4a.phone.Phone$PhoneSms.Send2(Phone.java:628) at b4a.example.main._btnbutton_click(main.java:592) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:153) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78) at android.view.View.performClick(View.java:5272) at android.view.View$PerformClick.run(View.java:21528) 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:5867) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1026) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:887) Click to expand... code for sending sms Code: Copy p.Send2("*********","sample",True,False)
this error raise when i send sms using android version 6.0 and up, already added the permission in manifest AddPermission(android.permission.SEND_SMS) java.lang.SecurityException: Sending SMS message: uid 10197 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:1190) at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:362) at android.telephony.SmsManager.sendTextMessage(SmsManager.java:329) at anywheresoftware.b4a.phone.Phone$PhoneSms.Send2(Phone.java:628) at b4a.example.main._btnbutton_click(main.java:592) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:153) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78) at android.view.View.performClick(View.java:5272) at android.view.View$PerformClick.run(View.java:21528) 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:5867) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1026) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:887) Click to expand... code for sending sms Code: Copy p.Send2("*********","sample",True,False)
Computersmith64 Well-Known Member Licensed User Longtime User Aug 30, 2017 #2 What is the targetSdkVersion set to in your manifest? If it's 23 & up, you will also need to use the Runtime Permissions to get the user to allow it. - Colin. Upvote 0
What is the targetSdkVersion set to in your manifest? If it's 23 & up, you will also need to use the Runtime Permissions to get the user to allow it. - Colin.
R ronell Well-Known Member Licensed User Longtime User Aug 30, 2017 #3 Computersmith64 said: What is the targetSdkVersion set to in your manifest? If it's 23 & up, you will also need to use the Runtime Permissions to get the user to allow it. - Colin. Click to expand... thanks for the reply, il try that Upvote 0
Computersmith64 said: What is the targetSdkVersion set to in your manifest? If it's 23 & up, you will also need to use the Runtime Permissions to get the user to allow it. - Colin. Click to expand... thanks for the reply, il try that
DonManfred Expert Licensed User Longtime User Aug 30, 2017 #4 ronell said: il try that Click to expand... don´t try. CHECK and answer. What is targetsdk is set to as yet? Upvote 0
ronell said: il try that Click to expand... don´t try. CHECK and answer. What is targetsdk is set to as yet?
R ronell Well-Known Member Licensed User Longtime User Aug 30, 2017 #5 DonManfred said: don´t try. CHECK and answer. What is targetsdk is set to as yet? Click to expand... sorry i didnt answer the question. targetsdk = 25 works now using runtime permissions, many thanks @DonManfred and @Computersmith64 Upvote 0
DonManfred said: don´t try. CHECK and answer. What is targetsdk is set to as yet? Click to expand... sorry i didnt answer the question. targetsdk = 25 works now using runtime permissions, many thanks @DonManfred and @Computersmith64
DonManfred Expert Licensed User Longtime User Aug 30, 2017 #6 ronell said: sorry i didnt answer the question. targetsdk = 25 Click to expand... That´s the point. Using 23 or higher you need to use runtimepermission. Upvote 0
ronell said: sorry i didnt answer the question. targetsdk = 25 Click to expand... That´s the point. Using 23 or higher you need to use runtimepermission.
Computersmith64 Well-Known Member Licensed User Longtime User Aug 30, 2017 #7 DonManfred said: don´t try. CHECK and answer. What is targetsdk is set to as yet? Click to expand... Oohhh - you're a fiesty taskmaster! Upvote 0
DonManfred said: don´t try. CHECK and answer. What is targetsdk is set to as yet? Click to expand... Oohhh - you're a fiesty taskmaster!
DonManfred Expert Licensed User Longtime User Aug 30, 2017 #8 Computersmith64 said: fiesty Click to expand... What is fiesty? Tried LEO but no result Upvote 0
Computersmith64 Well-Known Member Licensed User Longtime User Aug 30, 2017 #9 DonManfred said: What is fiesty? Tried LEO but no result Click to expand... Demanding Upvote 0