android-10.0

Black screen emulator Android Q Preview (Pixel 2)

拈花ヽ惹草 提交于 2019-12-12 20:07:43
问题 Strange issue here. I've just downloaded Android Q preview in my Android Studio to try it within an emulator. However, no matter what device type I select, when I start the emulator with the selected Q image I get black screen on the emulator without any kind of feedback. I've already tried to delete and recreate the emulator, as well as wiping its data. Below a picture of my emulator state at the moment. If I select another image of a different api version, everything works fine. Below the

Save and Insert video to gallery on Android 10

天大地大妈咪最大 提交于 2019-12-11 20:14:11
问题 I'm trying to save a video to the gallery,the following code works well an all Android versions except the Android Q : private void getPath() { String videoFileName = "video_" + System.currentTimeMillis() + ".mp4"; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { ContentResolver resolver = getContentResolver(); ContentValues contentValues = new ContentValues(); contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, videoFileName); contentValues.put(MediaStore.MediaColumns.MIME_TYPE,

WRITE_EXTERNAL_STORAGE permission is not required in AndroidQ with target API level 29, does it breaks security?

一笑奈何 提交于 2019-12-11 13:18:17
问题 I have stored image file into External Directory through Media store but it doesn't required permission for AndroidQ, even i have not mention permission in manifest. compileSdkVersion 29 defaultConfig { minSdkVersion 21 targetSdkVersion 29 } Note: Any application can store files on external storage without requesting permission to user, so is it break down security violation? 回答1: The argument, as I understand it, is that with MediaStore you are only supposed to be able to write to a few

Android Q (API level 29) doesn't load HTTPS websites. Gives error: (net::ERR_ACCESS_DENIED) [duplicate]

可紊 提交于 2019-12-11 07:38:42
问题 This question already has answers here : Android 8: Cleartext HTTP traffic not permitted (20 answers) Closed 22 days ago . I was trying fix an issue here on Stackoverflow as the person was trying to make use of WebView to load Facebook's website "https://facebook.com/" but couldn't get it done. I looked at the code and saw that the onReceivedSslError() method was not overridden. I overrode it and tested it out myself on Android emulators running Android 9 (API level 28) and lower and it

android Q content above navigation bar

…衆ロ難τιáo~ 提交于 2019-12-11 06:27:43
问题 we are targeting our application at api 28 and draw content under status bar , for this we are using following flag and styles : window.addFlags(FLAG_LAYOUT_NO_LIMITS) <item name="windowNoTitle">true</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">false</item> <item name="android:windowDrawsSystemBarBackgrounds">false</item> everything is okay under Q ( content lay out under status bar and above navigation bar). In android Q ,

Webview's loadData() is not working in android 10.0 (Q)

懵懂的女人 提交于 2019-12-11 04:17:13
问题 Here i am trying to load Html code as string in webview's loadData() .Nothing is happen over this mehtod but same method is working like charm in below sdk 29. webview.loadData(html_code,"text/html",null); Note : Here i am not performing any encoding or decoding operation on string.I am simply passing it as string to above method. 回答1: Use This code it will work. String newhtml_code = Base64.encodeToString(html_code.getBytes(), Base64.NO_PADDING); testWebView.loadData(newhtml_code,"text/html"

How to use “libsu” library (or adb) to install split APK files on Android Q?

自作多情 提交于 2019-12-11 01:07:21
问题 Background Using root, I know that for a single APK file, we can use the "libsu" library (here) to install as such: val installResult = Shell.su("pm install -t \"$filePath\"").exec() And if that failed (fails on new Android versions, not sure from which), as such (written about this here): val installResult = Shell.su("cat \"$filePath\" | pm install -t -S ${apkSource.fileSize}").exec() I also know that things got quite messy when it comes to installing split APK files (as shown here). First

No IMEI for Android Developers in Android 10

非 Y 不嫁゛ 提交于 2019-12-08 04:44:55
问题 As Android is serious about security and trying to make new android versions more secure, its becoming tough for developers to keep up-to date with new security features and find old methods alternatives to make their app compatible with old features. This question is about IMEI in New Android 10! The old method was super easy to get IMEI number by using below code String deviceId = ""; if (Build.VERSION.SDK_INT >= 26) { if (telMgr.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {

Acccess to /proc/net/tcp in Android Q

China☆狼群 提交于 2019-12-08 00:25:39
问题 In my VPN application up until Android-9, it was possible to read the /proc/net/tcp files from apps targeting API level < 28. Access from apps no longer seems to work in Android Q. I'm getting an error /proc/net/tcp: open failed: EACCES (Permission denied) while trying to read the file. In Android-Q privacy change google has addressed Restriction on access to /proc/net filesystem And I think ConnectivityManager.getConnectionOwnerUid() can be used if the apps compileSDK version is 29. But

Is there an API to detect which theme the OS is using - dark or light (or other)?

只谈情不闲聊 提交于 2019-12-06 21:51:07
问题 Background On recent Android versions, ever since Android 8.1, the OS got more and more support for themes. More specifically dark theme. The problem Even though there is a lot of talk about dark mode in the point-of-view for users, there is almost nothing that's written for developers. What I've found Starting from Android 8.1, Google provided some sort of dark theme . If the user chooses to have a dark wallpaper, some UI components of the OS would turn black (article here). In addition, if