boot_completed not working on Android 10 Q API level 29

I know that this may be old but I have faced the same problem and according to this: https://developer.android.com/guide/components/activities/background-starts The easiest solution I came up with was simply adding <uses-permission android:name=”android.permission.SYSTEM_ALERT_WINDOW”/> And setting up the receiver: <receiver android:name=”.BootReceiver”> <intent-filter> <action android:name=”android.intent.action.BOOT_COMPLETED” /> </intent-filter> </receiver> To the manifest. Receiver code: @Override public void onReceive(Context context, Intent … Read more

Rename file of the Mediastore which is created by app in android 10. Working on Android API 30 but shows error in API 29

java.lang.IllegalArgumentException: Movement of content://media/external/file/116 which isn’t part of well-defined collection not allowed So it is for Android Q not allowed if you use the collection; Uri extUri = MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL); But is is allowed for a ‘well-defined collection’ like: Uri extUri = MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL); // Use “Pictures/MyFolder” for RELATIVE_PATH I leave it to you to find other … Read more

Accessing external storage in Android API 29

On Android 10 Environment.getExternalStorageDirectory() and Environment.getExternalStoragePublicDirectory() will return storage paths but paths are not readable or writable. For Android 10 you can continue to use paths provided by Environment.getExternalStorageDirectory() and Environment.getExternalStoragePublicDirectory() if you add android:requestLegacyExternalStorage=”true” to application tag in manifest file. At runtime your app can call Environment.isExternalStorageLegacy() to check if the request has been … Read more