android-9.0-pie

Android 9 WebView (also admob ads) not loading after Chrome update

荒凉一梦 提交于 2021-02-18 21:11:58
问题 We have an application that depends heavily on web views we noticed after last week that if an android 9 user spent some time loading webviews about 10 to 30 after that webviews just show blank page and loading progress gets stock at 10% Also admobe native ads stop showing the only thing changed was chrome update to 77.0.3865.73 we tested on android 9 that has not updated to that version everything works perfectly ( chrome 74.0.3729.136) when debugging the only message I get is : E/chromium:

Android 9 WebView (also admob ads) not loading after Chrome update

人走茶凉 提交于 2021-02-18 21:10:03
问题 We have an application that depends heavily on web views we noticed after last week that if an android 9 user spent some time loading webviews about 10 to 30 after that webviews just show blank page and loading progress gets stock at 10% Also admobe native ads stop showing the only thing changed was chrome update to 77.0.3865.73 we tested on android 9 that has not updated to that version everything works perfectly ( chrome 74.0.3729.136) when debugging the only message I get is : E/chromium:

Is there a new, official API for rejecting calls on Android?

限于喜欢 提交于 2021-02-17 20:36:14
问题 Background For a very long time, there wasn't an official API for blocking calls on Android. What developers did for CallerId and call-blocking apps, is to use some reflection tricks, as shown here. The problem It seems no blocking app works on Android P DP3 (tested on Pixel 2). Even very popular apps such as TrueCaller fail to block calls. I believe this is because it might be replaced with an official API, as there are some articles that talk about built in call blocking capability for

Access microphone in android 9 while the app is in the background

无人久伴 提交于 2021-02-17 05:24:07
问题 Android 9 limits the ability for background apps to access user input. If your app is running in the background on a device running Android 9, the system applies the following restrictions to your app: Your app cannot access the microphone or camera. Is there any way to access microphone in android 9 while the app is in the background. 回答1: One more change was added in Android 9: only apps running in the foreground (or a foreground service) could capture the audio input. Reference: https:/

How to programatically turn on wifi when aeroplane(airplane) mode is on in Android?

瘦欲@ 提交于 2021-02-11 15:28:16
问题 I am developing a wifi search application. Whenever the device is in aeroplane mode wifi is turned off automatically. I found that system apps can turn on the wifi even if the device is in aeroplane mode. I am testing it on Android 9. How do I make my app can able to turn on the wifi? 回答1: In android 9, you cannot turn on wifi programmatically when the device is in airplane mode or is tethering hotspot. In this case, the boolean retVal = mWifiManager.setWifiEnabled(true); always returns false

showInputMethodPicker from notification not working in Android 9

拟墨画扇 提交于 2021-02-09 12:31:46
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

showInputMethodPicker from notification not working in Android 9

耗尽温柔 提交于 2021-02-09 12:29:22
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

showInputMethodPicker from notification not working in Android 9

蹲街弑〆低调 提交于 2021-02-09 12:29:07
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

Incorrect displayCutout in landscape orientation when you hold your device at some angle

耗尽温柔 提交于 2021-02-05 11:23:11
问题 So we can get for example safe inset top value (useful for devices which have notch/cutout): override fun onAttachedToWindow() { super.onAttachedToWindow() if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { val safeInsetTop = window.decorView.rootWindowInsets?.displayCutout?.safeInsetTop if (DEBUG) Timber.d("onAttachedToWindow, safeInsetTop: $safeInsetTop") } } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) if (DEBUG) Timber.d("onCreate") if

How to open PDF file from internal storage in Pie?

£可爱£侵袭症+ 提交于 2021-01-29 22:19:57
问题 I try to open PDF file in Pie? but it does not open. I don't get any error. What is the issue? PDF file does not open. Only black screen is shown. In logcat no errors show. What is wrong? Intent intent = new Intent(Intent.ACTION_VIEW); Uri outputFileUri; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { outputFileUri = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", file); } else outputFileUri = Uri.fromFile(file); Log.e("TAG", "outputFileUri-> " + outputFileUri