1,043 questions
0
votes
1
answer
73
views
What permission do I need for /storage?
I have already requested to be an external storage manager and get true for
Environment.isExternalStorageManager()
However, when trying to read /storage e.g. Environment.getStorageDirectory() I get ...
1
vote
0
answers
160
views
Google Photos Edit intent is limited for Media Uri only, why?
I'm trying to edit (Intent.ACTION_EDIT) app's media file from app's private folder in Google Photos,
but it seems Google Photos supports only Media Uri, and we can't get one for app's private storage, ...
0
votes
1
answer
101
views
android pdf printing using PrintedPdfDocument and webview doesn't work as expected
I am trying to achieve generating a pdf file from the rendered html within webview, but it gives me a pdf with single page but page is blank instead of showing the html content.
fun createPdfFromHtml(
...
1
vote
1
answer
118
views
In Android Studio, How Do You Display Files Saved Into An Internal Directory In A Column List?
I've developed a simple application in Android Studio that attempts to display files saved in an internal directory in a column list but it's not working.
Here is the code
// File ...
0
votes
0
answers
132
views
Android. How to save a file in a public directory of external storage correctly?
I want to save file in a public external storage. For this I use the following code:
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
However, starting with Android 10, ...
1
vote
1
answer
234
views
Why can't I copy/delete a file which I created using flutter?
Using a flutter app, I created a db file in 'storage/emulated/0/Documents/Keep/cs.db' path. I deleted the app. I again installed the app and want to delete/copy the file I created. But now I can't do ...
1
vote
0
answers
44
views
App installer activity not starting in android
I'm trying to launch app installer from my app via intent. Every thing is working expect the popup to install app is not showing. I have write down logs to configure the issue, but according to logs, ...
0
votes
0
answers
82
views
Android Worker Class Not Restoring Media Files from ZIP After Successful Database Restoration
I'm working on an Android project that involves a Worker class designed to process a ZIP file input. This ZIP file is structured to include a database file located at /databases/GazeApp.db and various ...
0
votes
1
answer
162
views
How to open a GmsDocumentScanningResult.Pdf
I would like to open a GmsDocumentScanningResult.Pdf object with my default PDF app.
I've tried the following:
resultIntent?.pdf?.let { pdf: GmsDocumentScanningResult.Pdf ->
val pdfUri = pdf....
0
votes
0
answers
558
views
Trouble Opening File with FileProvider in Android 13 - "File not found" Error
I'm encountering an issue when trying to open a file from the download folder using FileProvider in Android 13. The problem is that even though the file exists (confirmed with file.exists()), I'm ...
1
vote
1
answer
254
views
DocumentFile.canWrite(), DocumentFile.exists() - poor performance (takes too much CPU time) when working with local built-in phone storage (not cloud)
I'm not really sure but why the following DocumentFile's exist and canWrite functions takes too much CPU time compare to File when working with built-in phone external storage (it's not a cloud)?
It's ...
0
votes
1
answer
198
views
Get available space of a connected USB Drive through USB OTG
With StorageManager we can access removable flash drives connected via USB OTG to Android smartphones:
val storageManager = context.getSystemService(Context.STORAGE_SERVICE) as StorageManager
...
0
votes
0
answers
46
views
App-specific files on Android are deleted at startup
I create a file at the onCreate callback following the Android guide
File folderSamples = new File(getApplicationContext().getFilesDir().getAbsolutePath());
File test = new File(folderSamples, &...
0
votes
0
answers
204
views
I can't retrieve the real path for file uploads on Android version 13 phones
I used this object to get the real path of a selected file from its URI:
object RealPathUtil {
fun getRealPath(context: Context, fileUri: Uri): String? {
val realPath: String?
// SDK < ...
0
votes
1
answer
356
views
Android - Share intent with file manager as option
I want the following functionality:
In my application's internal storage I have a file and the user should be able to save it to another app (ex. Google Drive) OR save it to the phone's external ...