android-external-storage

My developer app problem with opening database on Android 9

别来无恙 提交于 2021-02-11 14:13:11
问题 Can you help my? I have created and published the app on Google play store that contains a database, I have tested it on different android phones. My app works perfect on android version (Android 10,8,5 etc...) except on Android 9, do you know how can I fix that problem? I find that problem on Huawei Smart Z, Honor P20, Samsung Y6,Xiaomi Mi. Play store console says that my app can run on that models. I am beginner in app development. This happening on mine Huawei Smart: when I install the app

How to retrieve a single media file from external storage using Mediastore?

巧了我就是萌 提交于 2021-01-29 08:10:14
问题 Before API 29, we could have easily retrieved a media file from external storage using these lines of code. val dirName = Environment.getExternalStorageDirectory().absolutePath + "/$appName/" val fileName = "$appName_$timeStamp.$extension" val dir = File(dirName) val file = File(dir, fileName) But I was unable to find a code snippet which can achieve the same thing using Mediastore API. Since getExternalStorageDirectory is deprecated in API 29, I don't know how to do. I have searched about

Read Text file From Download Folder Failed

时光总嘲笑我的痴心妄想 提交于 2021-01-29 05:43:55
问题 When I click a load button, the file content does not load in TextView There appears to be an error uploading the file in BufferedReader in ReadText method. And this is a picture from "Logcat" public class MainActivity extends AppCompatActivity private static final int READ_REQUEST_CODE = 42; private static final int PERMISSION_REQUEST_STORAGE = 1000; Button b_load; TextView tv_output; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

How to get “Never ask Again” option in runtime permission

孤人 提交于 2021-01-28 01:40:39
问题 In my app I have created a class name Untility where I wrore the code for permission of READ_EXTERNAL_STORAGE. But the problem is when I click Deny on the app, I am not finding the alert notification to set it allow again. Initialy I have the option "Never ask Again". Once I clicked on it, the dialog desapperas. and now after running the app if I click on deny, I cannot find Dialog message anymore to make it allow again. How can I modify my code to show this message every time. My Utility

Cant find the saved data to text file in internal storage, How to save file in internal storage android studio?

拟墨画扇 提交于 2020-12-12 04:04:46
问题 I want to create a text file on my android phone and write some text into it. When I click on the button it says saved to /data/user/0/com.example.savetotextfile/files/example.txt But I can't find these folders. Most apps are in Device storage > Android > data, but the apps that I created myself are not in there. Am I missing a permission? I don't want to write to an sd card. public class MainActivity extends AppCompatActivity { private static final String FILE_NAME = "example.txt"; EditText

No such file or directory in Android 10 (api 29)

[亡魂溺海] 提交于 2020-11-28 08:25:56
问题 I am working on a photo editor app in which after editing my picture I save it into my local storage. It is working fine till android 9 but not on android 10. It shows exception of "No such file or directory found" in Android 10. After some research I found that getExternalFilesDir() is deprecated in android Q+. But I cannot find any proper way to do it in android 10. So please if anyone can provide a tutorial it would be really helpful. I've added and granted uses-permission android:name=

No such file or directory in Android 10 (api 29)

坚强是说给别人听的谎言 提交于 2020-11-28 08:23:51
问题 I am working on a photo editor app in which after editing my picture I save it into my local storage. It is working fine till android 9 but not on android 10. It shows exception of "No such file or directory found" in Android 10. After some research I found that getExternalFilesDir() is deprecated in android Q+. But I cannot find any proper way to do it in android 10. So please if anyone can provide a tutorial it would be really helpful. I've added and granted uses-permission android:name=