android-10.0

How to handle SAF when I can only handle File or file-path?

落花浮王杯 提交于 2021-02-19 02:43:06
问题 Background Up until Android Q, if we wanted to get information about an APK file, we could use WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE to get access to the storage, and then use PackageManager.getPackageArchiveInfo function on the file-path. Similar cases exist, such as using ZipFile class on a compressed file, and probably countless framework APIs and third party libraries. The problem Google announced a huge amount of restrictions recently on Android Q. One of them is called Scoped

What is proper usage of requestCellInfoUpdate()?

本小妞迷上赌 提交于 2021-02-18 08:23:24
问题 Utilizing onSignalStrengthsChanged , getAllCellInfo() , and related methods, my app monitors cell signal data and displays the results in realtime. My code works very well when targeting API 28 and lower, automatically refreshing the data as it changes. Targeting API 29 results in some Android 10 devices failing to update the data -- but not all. I discovered TelephonyManager.requestCellInfoUpdate() was added to API 29, which may(?) be needed to resolve this issue. However, I have been unable

In Android 10 devices, Biometric prompt is failing with ERROR_CANCELED all the time on top of lock screen

試著忘記壹切 提交于 2021-02-18 07:57:49
问题 In Android 10 devices, Biometric prompt is failing with BiometricPrompt.ERROR_CANCELED all the time on top of the lock screen. Error is returned in onAuthenticationError callback of BiometricPrompt.AuthenticationCallback class. The biometric prompt authentication is working when the device is unlocked. is it possible to have biometric prompt authentication done on top of device lock screen in Android 10 when setDeviceCredentialAllowed is set to true? Update: The issue is only when

DownloadManager not working for Android 10 (Q)

喜夏-厌秋 提交于 2021-02-18 06:34:07
问题 I've been beating my head against this issue for quite awhile... I am updating an app that uses DownloadManger to do a simple task like downloading a file to the external storage public directory i.e: Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) Everything works fine here from Android api 19-28. Its when testing on API 29 (Q/10) is where issues occur. Android implemented scoped storage and so deprecated the getExternalStoragePublicDirectory... As a result I

How can a closed application perform periodic work with WorkManager on Android 10?

岁酱吖の 提交于 2021-02-11 12:47:33
问题 I have asked a question about periodic work here: How can a closed application receive periodic broadcasts?. The answer has been to use WorkManager and this has been a great solution on Android 9. On another device using Android 10 the solution of this former question does not work anymore. This seems to be a common problem. The question here has been upvoted a lot, but its single answer is not accepted and it also didn't help me: WorkManager not working when app killed in Android 10 although

java.net.ConnectException after switching accesspoint using WifiNetworkSpecifier on Android 10

混江龙づ霸主 提交于 2021-02-10 21:30:26
问题 Unable to make connection after configuring wifi accespoint using WifiNetworkSpecifier, Below is the trace Caused by: java.net.ConnectException: failed to connect to /10.123.45.1 (port 443) from /:: (port 0) after 120000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:143) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net

java.net.ConnectException after switching accesspoint using WifiNetworkSpecifier on Android 10

[亡魂溺海] 提交于 2021-02-10 21:26:08
问题 Unable to make connection after configuring wifi accespoint using WifiNetworkSpecifier, Below is the trace Caused by: java.net.ConnectException: failed to connect to /10.123.45.1 (port 443) from /:: (port 0) after 120000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:143) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net

java.net.ConnectException after switching accesspoint using WifiNetworkSpecifier on Android 10

孤人 提交于 2021-02-10 21:16:54
问题 Unable to make connection after configuring wifi accespoint using WifiNetworkSpecifier, Below is the trace Caused by: java.net.ConnectException: failed to connect to /10.123.45.1 (port 443) from /:: (port 0) after 120000ms: connect failed: ENETUNREACH (Network is unreachable) at libcore.io.IoBridge.connect(IoBridge.java:143) at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) at java.net

Vimeo Networking Library Crash for Android 10 platform (api29)

爱⌒轻易说出口 提交于 2021-02-10 06:16:10
问题 I implemented vimeo networking using vimeo networking library(https://github.com/vimeo/vimeo-networking-java), exoplayer and explained in this post https://stackoverflow.com/a/65737556/8814924 Now the problem is when I was checking with API 30 it was getting error java.lang.RuntimeException: Unable to start activity ComponentInfo{com.emergingit.emergingstudy/com.emergingit.emergingstudy.activities.course.ExoPlayerActivity}: java.lang.IllegalStateException: Unable to extract the trust manager

Is MediaStore.MediaColumns#DATE_TAKEN only available from API level 29?

好久不见. 提交于 2021-02-10 04:56:16
问题 I am trying to use MediaStore.Images.Media.DATE_TAKEN and getting warning from Android Studio IDE that it requires API 29 (Android Q). The official Google documentation here says this was Added in API level 29. Is this really true? I've checked the Google Sources from past releases all the way back until API 19 (KitKat) and I saw MediaStore.MediaColumns#DATE_TAKEN field being available since then. Why is the official documentation saying something different? Android 4.4 (KitKat) MediaStore