First of all,
I have read the following topics about Persmissions:
https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/
and
https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
But none of them make sense to me how to visualize this into my project.
Adding permission lines to the manifest did not work.
like:
All I want to do is save the following to cfg.txt
and get this error.
this is my Manifest:
I have read the following topics about Persmissions:
https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/
and
https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
But none of them make sense to me how to visualize this into my project.
Adding permission lines to the manifest did not work.
like:
B4X:
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="19" />
)
All I want to do is save the following to cfg.txt
B4X:
Sub SaveINI
Dim List1 As List
List1.Initialize
List1.Add(Timeslot_Spinner1.SelectedIndex)
List1.Add(Timeslot_Spinner2.SelectedIndex)
List1.Add(Timeslot_Spinner3.SelectedIndex)
List1.Add(Timeslot_Spinner4.SelectedIndex)
List1.Add(Timeslot_Spinner5.SelectedIndex)
List1.Add(Timeslot_Spinner6.SelectedIndex)
List1.Add(Timeslot_Spinner7.SelectedIndex)
List1.Add(Timeslot_Spinner8.SelectedIndex)
List1.Add(Timeslot_Spinner9.SelectedIndex)
List1.Add(Timeslot_Spinner10.SelectedIndex)
File.WriteList(File.DirRootExternal,FileINI,List1)
End Sub
and get this error.
B4X:
java.io.FileNotFoundException: /storage/emulated/0/cfg.txt (Permission denied)
this is my Manifest:
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: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="19" />
)