java - Files not saving if app is installed from APK -


my app doesn't save files in internal storage if installed apk if installed ide adb saving. apk generated build/build apk

i solved problem. don't know why when using

fileoutputstream fos = new fileoutputstream(file); 

it wasnt working, when changed to:

fileoutputstream fos = context.openoutputstream("file.txt", context.mode_private); 

it works fine.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -