For android 6 and above, if you want to perform some actions, for example set sound as ringtone, it’s not possible until user manually grants write permission for an app.
The problem is, this option is very hard to find for non-experienced android user. Accessing this option from application level is a must if it (app) needs such permission.
Original threads:
Makeroid forum -->
Thunkable forum -->
Few days ago found a solution for this problem.
Performed tests:
Android 4 - emulator - not working / there is no such setting. All apps have write permissions already granted.
Android 5 - emulator - the same as above
Android 6 - physical device (LG G4) - OK
Android 6 - emulator - OK
Android 7 - emulator - OK
Android 8 - emulator - OK
SOLUTION
Just use these blocks -->
Activity Class is “com.android.settings.Settings$AppWriteSettingsActivity”
Set Data Uri with package name of your application (“package name” property of Screen 1 - in designer mode).
This won’t work with companion, app must be compiled to apk.
In this example, slider on “modify system settings” screen will be inactive. Because this application doesn’t ask for write permission.
AIA file and compiled APK -->
writepermissionsolution.aia (1,9 KB)
systemsettingstest.apk (4,1 MB)