android-10.0

Install self-signed certificates no longer working in Android Q

妖精的绣舞 提交于 2020-05-13 07:48:09
问题 I have generated a self-signed certificate which I tried to install on my phone running Android 10, but a snack appears telling me that Private key required to install certificate . I have tried on a phone running Android 9 with the same certificate and it works as expected. Any idea if there is any workaround to get the CA installed? 回答1: Here's how I created a self-signed cert that will work with Android, iOS, and Chrome, from this answer: openssl commands: openssl req -new -newkey rsa:2048

Can't update MediaStore on Android 10

六月ゝ 毕业季﹏ 提交于 2020-05-13 04:57:33
问题 I've been updating meta data in the MediaStore through a ContentResolver, but this no longer works with Android Q (API 29). The following code gives me a warning, and the description is not updated: ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DESCRIPTION, "Some text"); int res = getContext().getContentResolver().update( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values, MediaStore.Images.Media._ID + "= ?", new String[]{sImageId}); android.process.media W

Can't update MediaStore on Android 10

给你一囗甜甜゛ 提交于 2020-05-13 04:57:10
问题 I've been updating meta data in the MediaStore through a ContentResolver, but this no longer works with Android Q (API 29). The following code gives me a warning, and the description is not updated: ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DESCRIPTION, "Some text"); int res = getContext().getContentResolver().update( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values, MediaStore.Images.Media._ID + "= ?", new String[]{sImageId}); android.process.media W

Notification does not get cancelled in Android 10

試著忘記壹切 提交于 2020-05-05 05:35:49
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. Maulik Dodia wants to draw more attention to this question. Problem: I want to cancel a Notification when I directly reply to that Notification. It works in Android N but doesn't work on Android 10. My Code is like below: MainActivity.java public class MainActivity extends AppCompatActivity { public static final int NOTIFICATION_ID = 1256; public static final String CHANNEL_1_ID = "channel1";

Android 10 L2CAP connection IOException timeout Wii Balance Board

ぃ、小莉子 提交于 2020-04-11 17:48:46
问题 Background A long time ago I was tasked with making a android app for the Wii Balance Board, after some screwing around I found that android no longer supported L2CAP. More research lead to understand that it was being re-added in Android 10. With Android 10 out I've been trying to give it a crack now. Problem So my simple goal at the moment is to create a connection with the Wii Balance Board. My approach for connection is: Start discovery Add discovered bluetooth devices to list When you

Full screen intent not starting the activity but do show a notification on android 10

有些话、适合烂在心里 提交于 2020-04-10 03:21:18
问题 I try to launch activity for a broadcastReceiver by using the next code Intent i = new Intent(context, AlarmNotification.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { // This is at least android 10... NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (mgr.getNotificationChannel(CHANNEL_WHATEVER)==null) { mgr.createNotificationChannel(new

Android Q (10) ask permission to get access all storage. Scoped storage

不打扰是莪最后的温柔 提交于 2020-03-21 16:21:10
问题 In Android 10 apps that need to access storage need to ask permission to concrete path. But apps like file explorer can ask permission for root storage and gain permission to read/write all storage. That is what I am trying. According to Android we must use "ACTION_OPEN_DOCUMENT_TREE" for this. The problem I have is that everything seems correct, but the permission is finally not granted to the app. private void askAndroid10Perm() { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)

Android Q (10) ask permission to get access all storage. Scoped storage

核能气质少年 提交于 2020-03-21 16:20:51
问题 In Android 10 apps that need to access storage need to ask permission to concrete path. But apps like file explorer can ask permission for root storage and gain permission to read/write all storage. That is what I am trying. According to Android we must use "ACTION_OPEN_DOCUMENT_TREE" for this. The problem I have is that everything seems correct, but the permission is finally not granted to the app. private void askAndroid10Perm() { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)

AndroidQ : How to access Dynamic Depth Format

耗尽温柔 提交于 2020-03-18 08:57:26
问题 Android Q features blogs mentions about a new feature Dynamic Depth Format. Starting in Android Q, apps can request a Dynamic Depth image which >consists of a JPEG, XMP metadata related to depth related elements, >and a depth and confidence map embedded in the same file on devices >that advertise support. But i am not able to find this file format . I tried parsing the jpeg for any metadata associated but i could not place the file. Has anyone tried accessing the file? 来源: https:/

Writing files to publicly accessible documents folder in Android Q - Scoped Storage

霸气de小男生 提交于 2020-03-14 02:57:30
问题 Background After migrating to Android Q I can no longer find a suitable way to gain write access to the documents folder ( /storage/emulated/0/Documents ) And before anyone mentions the many other questions on scoped storage I've read through many of them and from what I've seen so far all of the solutions use a app specific directory or accessing a media directory only (not documents folder access). From what I understand in Android Q I can either choose: Use a app specific directory that is