Closed ghost closed 7 years ago
The permissions to read/write external storage are set in the Manifest, so reading a CSV from SD card usually works.
However, it is definitely missing permissions on the file, which leads me to some questions:
Please could you also post the output of following command on adb command line
ls -l /storage/emulated/0/
Thx
I have Android 6 and all files permissions on /sdcard are: -rw-rw---- (AFAIR, /sdcard has FAT which doesn't have permissions so are set/masked by the system during mount and cannot be changed).
The 2nd answer from https://stackoverflow.com/questions/8854359/exception-open-failed-eacces-permission-denied-on-android could be relevant:
For API 23+ you need to request the read/write permissions even if they are already in your manifest.
What do you think?
-rw-rw---- 1 root sdcard_rw 12 2016-12-01 01:42 a.csv
(created with Android's text editor)
(there's no real SD card in my phone, it's all internal memory)
This should be fixed now with the latest commit.
Unfortunately I don't have any Android 6+ device available for testing. Do you have a chance to build from the sources and test it?
I get the following exception when pressing the search icon:
AndroidRuntime: FATAL EXCEPTION: main
AndroidRuntime: Process: com.fr3ts0n.stagefever, PID: 14821
AndroidRuntime: android.os.FileUriExposedException: file:///storage/emulated/0/com.fr3ts0n.stagefever exposed beyond app through Intent.getData()
AndroidRuntime: at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)
AndroidRuntime: at android.net.Uri.checkFileUriExposed(Uri.java:2346)
AndroidRuntime: at android.content.Intent.prepareToLeaveProcess(Intent.java:8981)
AndroidRuntime: at android.content.Intent.prepareToLeaveProcess(Intent.java:8942)
AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1519)
AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:4225)
AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:4183)
AndroidRuntime: at com.fr3ts0n.stagefever.MainActivity.selectFileToLoad(MainActivity.java:189)
AndroidRuntime: at com.fr3ts0n.stagefever.MainActivity.onOptionsItemSelected(MainActivity.java:162)
AndroidRuntime: at android.app.Activity.onMenuItemSelected(Activity.java:3204)
AndroidRuntime: at com.android.internal.policy.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1215)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
AndroidRuntime: at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
AndroidRuntime: at android.widget.ActionMenuView.invokeItem(ActionMenuView.java:616)
AndroidRuntime: at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:152)
AndroidRuntime: at android.view.View.performClick(View.java:5637)
AndroidRuntime: at android.view.View$PerformClick.run(View.java:22433)
AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6126)
AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
ActivityManager: Force finishing activity com.fr3ts0n.stagefever/.MainActivity
I was wandering if it would be useful to use an emulator to test the program on Android M or N.
I don't have SDK setup to build the app from the source. I'm not sure, if I know how to do it.
Yes, they changed quite a bit in the file management. I will be able to emulate Android >= M after Christmas (with a new PC)
Thank your for fixing it!
I get the following error when opening a csv file: