I have an older app that writes out a text file. Filename is
Document/motiontrack.csv
Since Android 10 that worked on my .Motorola phones including Android 15.
However my fiend cannot run it on his pixel9 pro max and gets error 908 permission write external storage denied.
I remember spending hours way back get this to work on the Motorola, so is there a new trick?
Thanks
Erhard
it is important to use the correct path to shared storage...usually it is /Documents/motiontrack.csv (see the s in Documents)
Also make sure the file does not already exist before trying to write the first time
which Android version? is this an older version? then you have to ask for write external storage permission
thanks for the reply. on my motorola it was from version 10 to 15 - always worked.
his pixel 9 is 16.
i checked my filename it is
Documents/MotionTrack.csv
sorry for the missing 's'
here the blocks i use for the writing .
ok this app runs when installed with no issue but in companion if i run the permission block --> error 908
if i run appendtofile: error 2104
ok i understand and i was searching for the issue but there is so much stuff and often older so it seems not to bad to reopen a specific topic.
also as you know sometimes the companion does behave differently than the complete installation but i will improve.
for example when i was testing the contactpicker in companion and i dwelled in the selection process for more than 2sec the companion disconnected
oh that brings up another question - how to upgrade an extension? last time i did remove the extension and that deleted all the related blocks - that was bad.
sadly AI tells me that is the only way still today
erhard
good news - the switch to filescope=legacy fixed the problem on the pixel9 xl android16
so should i update the taifunfile1? are there other fixes in there that benefit my later?
I doubt it. You shpuld get the same permission error on any Android 11+ device, because WRITE permission no longer exists on Android 11+. It can/may only be requested on Android < 11. Storage permissions are no longer required for app-created (non-media) files on Android 11+.
Hmm, I doubt that too. Show your recent blocks and post the aia (and let me check this on my Pixel Pro device with Android 16).
the program opens in the scientific calculator. click on the upper right MAIN and then chose (6) Motiontracker.
before (filescope=shared) that caused the immediate 908 error - gone with 'legacy' setting on pixel andoroid 16 and my motorola android 15. my motorola never had any issues with 'shared'. i think i started the project with android 10 way back
ok aren't you a little bit harsh now?
not sure why you say supposedly fixed?
it always worked on my motorola phones from the last 10 years. it only showed error 908 on my friends pixel 9 xl (android 16) while i was using SHARED instead of LEGACY in the 4 FILESCOPE blocks that is all i am saying.
the 3 errors were 3 orphaned GETs which i now put into the trash so no more errors.
that should not ruin the project right and i assume the warnings are just warnings and should also not harm the project, right?
the write issues are related to the filescope = legacy which only happens in 4 locations - it is very time consuming for me to reduce the project artificially down because it also is not anymore the same project.
you can easily search to the 4 locations and see the blocks of interest.
as i said the program at this point works but you don't believe it. so when you install and run it does it give you an error or not - it should not?
i understand if you do not want to waste your time further on this issue so please accept my thanks for the help that made it work.
erhard
btw: your messages have a special positive effect on me because my niece name is ANKE too.
As I already said, if you request WRITE_EXTERNAL_STORAGE permission on an Android 11+ device you will definitively get a permission error. Changing FileScope doesn't change anything.
I don't think anyone wants to waste time unnecessarily here, and I certainly don't. But my interest is not to mislead or confuse (other) users, but to ensure they receive practical and understandable solutions.