No.
Don't set targetSdkVersion to 23 unless you want to use runtime permissions:
https://www.b4x.com/android/forum/threads/67689
Indeed I want to use runtimepermissions and targetsdkversion 23, otherwise it won´t work on Marshmallow. As mentioned, it worked before when it was all in the main activity and all set up following the guide lines in the link you sent:
1. Use RuntimePermissions.GetSafeDirDefaultExternal("") instead of File.DirDefaultExternal. The parameter passed is an optional subfolder that will be created under the default folder.
2. Add this code to the manifest editor:
Code:
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
This is (also) in my manifest:
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
The only difference is that file handling is now taking place in a service module - no longer in the main activity.
Is there maybe anything which should be added here in the service module:
#Region Service Attributes
#StartAtBoot: False
#ExcludeFromLibrary: True
#End Region
Edit: Something else must be wrong. Just tried doing this from activity_create in the main activity, and the same happens so after all not related to the type of module inside which it´s running...