android-10.0

java.lang.UnsupportedOperationException Albums cannot be directly modified

|▌冷眼眸甩不掉的悲伤 提交于 2020-08-09 19:52:31
问题 How to update album metadata of audio file in Android Q media store? I tried the answer suggested, https://stackoverflow.com/a/60152702/4732846, it worked. But this works for individual tracks. If I use the same logic and form the uri for albums, val uri = ContentUris.withAppendedId(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, albumId) and try to edit. I get this exception. java.lang.UnsupportedOperationException Albums cannot be directly modified This is the closest link that I could find

Android ACTIVITY_RECOGNITION Permission SDK 28 running on Android 10/Q (SDK 29)

本秂侑毒 提交于 2020-08-02 04:15:35
问题 My Android app targets SDK 28 and connects to Google Fit to upload data and read some other data. The app uses the HistoryAPI to read com.google.step_count.delta data. This documentation claims that "com.google.android.gms.permission.ACTIVITY_RECOGNITION permission is converted into a pre-granted runtime permission" if the app targets SDK 28 but runs on SDK 29: https://developers.google.com/fit/android/authorization#android_permissions I have added to the app's manifest like the documentation

Android ACTIVITY_RECOGNITION Permission SDK 28 running on Android 10/Q (SDK 29)

*爱你&永不变心* 提交于 2020-08-02 04:14:36
问题 My Android app targets SDK 28 and connects to Google Fit to upload data and read some other data. The app uses the HistoryAPI to read com.google.step_count.delta data. This documentation claims that "com.google.android.gms.permission.ACTIVITY_RECOGNITION permission is converted into a pre-granted runtime permission" if the app targets SDK 28 but runs on SDK 29: https://developers.google.com/fit/android/authorization#android_permissions I have added to the app's manifest like the documentation

Android 10: What are my options to save files on external storage into a directory called “/sdcard/my-app/”

旧巷老猫 提交于 2020-07-31 07:28:52
问题 Up until Android Pie I always stored files which the app needed to get stored on /sdcard/my-app/ , which I got via File fBaseDir = new File(Environment.getExternalStorageDirectory(), "my-app"); One of my App stores hundreds (up to multiple thousands) of favicons in /sdcard/my-app/favicons , and when the user creates a backup of the app, it gets stored in /sdcard/my-app/backups . Webpage-Screenshots taken by Google Chrome when shared with my app are stored in /sdcard/my-app/screenshots , and

Is adb remount broken on android api 29?

风流意气都作罢 提交于 2020-07-31 06:57:08
问题 adb remount does not work correctly on api 29 when running from the emulator. The command works fine on all other emulators that have been tried (18, 23, 25, 26, 27 and 28). Any ideas why this might be? Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting partition: /product Skip mounting partition: /product_services Skip mounting

android 10 BitmapFactory.decodeFile(ImageFilePath) return null

只谈情不闲聊 提交于 2020-07-20 06:22:12
问题 I'm building an android application which allow user to pick Image from camera or From Gallery then display the image in a Imageview.My application working fine if the user take the picture from camera, but if the user pick the image from gallery my application only work on android 9 and bellow,BitmapFactory.decodeFile(ImageFilePath) always return null on android 10 with the imageFilePath = "/storage/emulated/0/DCIM/Camera/20200629_114552.jpg"(path is the same on android 9 and 10). I've

android 10 BitmapFactory.decodeFile(ImageFilePath) return null

穿精又带淫゛_ 提交于 2020-07-20 06:21:23
问题 I'm building an android application which allow user to pick Image from camera or From Gallery then display the image in a Imageview.My application working fine if the user take the picture from camera, but if the user pick the image from gallery my application only work on android 9 and bellow,BitmapFactory.decodeFile(ImageFilePath) always return null on android 10 with the imageFilePath = "/storage/emulated/0/DCIM/Camera/20200629_114552.jpg"(path is the same on android 9 and 10). I've

WiFi Network Connection keeps disconnecting on Android Q

久未见 提交于 2020-07-19 05:58:52
问题 I use the WiFi Network Request API to connect to a network on android Q. The connection becomes available but gets lost. Here is my code public void registerNetworkCallback() { try { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); WifiNetworkSpecifier specifier = new WifiNetworkSpecifier.Builder() .setSsid("r_guest").setWpa2Passphrase("guest").build(); NetworkRequest networkRequest = new NetworkRequest.Builder()

How to access clipboard data programmatically in Android Q (10)?

为君一笑 提交于 2020-07-19 04:01:05
问题 As we know read data by Clipboard Manager in the background was stopped by Google in android Q, so I need anyway to paste data copied directly in edit text when a user returns to activity without user make a paste and without paste button. The issue is that trying to read the data with getPrimaryClip() returns null . @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_copy_and_paste); ed_editText = findViewById(R

API 29 Mediastore Access

醉酒当歌 提交于 2020-07-17 08:19:54
问题 My app creates playlists in the android mediastore. All is well for api's including 28 however, api 29 seems to require additional permissions. Inserting a new playlist name and id works without issue. When it comes to inserting track id and play order, an access permission exception is thrown. In verifying the Uri, i found that when resolver.insert for API 29 the exception error is: java.lang.SecurityException: myapp_name has no access to content://media/external_primary/audio/media/146 The