Dear friends,
I am using SDK=26 and phone with Android 8.
Before I CheckandRequest permission I am using this code:
Everything is OK
if I compile same software with SDK=24 or SDK=19 then I get error message in B4A v8.30:
and this message I get in LOGS if I run APP in phone with Android 7.1.2. This version of APP is perfectly functined with Android 8.
I am doing mistake with
or with using some bad SDK?
In manifest I have
I have tried to change this to 10 or 15, but I get same errors
If I compile program with >=SDK26 then it is not compatibile with older Android version?
Thank you very much
p4ppc
I am using SDK=26 and phone with Android 8.
Before I CheckandRequest permission I am using this code:
B4X:
If myphone.SdkVersion>=26 Then
if I compile same software with SDK=24 or SDK=19 then I get error message in B4A v8.30:
C:\aaa\Objects\bin\extra\res1\res\values-v21\values-v21.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Material.Notification'.
C:\aaa\Objects\bin\extra\res1\res\values-v21\values-v21.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Material.Notification.Info'.
and this message I get in LOGS if I run APP in phone with Android 7.1.2. This version of APP is perfectly functined with Android 8.
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main$ResumableSub_Activity_Createresume (java line: 1336)
java.lang.SecurityException: getLine1NumberForDisplay: Neither user 10145 nor current process has android.permission.READ_PHONE_STATE or android.permission.READ_SMS.
at android.os.Parcel.readException(Parcel.java:1684)
at android.os.Parcel.readException(Parcel.java:1637)
at com.android.internal.telephony.ITelephony$Stub$Proxy.getLine1NumberForDisplay(ITelephony.java:4136)
at android.telephony.TelephonyManager.getLine1Number(TelephonyManager.java:2317)
at android.telephony.TelephonyManager.getLine1Number(TelephonyManager.java:2294)
at anywheresoftware.b4a.phone.Phone$PhoneId.GetLine1Number(Phone.java:450)
at test.app.mobile.main$ResumableSub_Activity_Create.resume(main.java:1336)
at test.app.mobile.main._activity_create(main.java:1094)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at test.app.mobile.main.afterFirstLayout(main.java:104)
at test.app.mobile.main.access$000(main.java:17)
at test.app.mobile.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6221)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
I am doing mistake with
B4X:
If myphone.SdkVersion>=26 Then
In manifest I have
B4X:
<uses-sdk android:minSdkVersion="4"/>
If I compile program with >=SDK26 then it is not compatibile with older Android version?
Thank you very much
p4ppc