android-8.0-oreo

How to find out if mobile has a notch or not

北城余情 提交于 2020-08-05 04:13:09
问题 I need to modify the app's toolbar if the notch is present. Right now that notch hides bit of content in toolbar. if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP || Build.VERSION.SDK_INT == Build.VERSION_CODES.M) { setTheme(R.style.AppTheme_NoActionBarHello); getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setTintColor(ContextCompat

How to update an already created Wi-Fi configuration (or “UID XXX does not have permission to update [Wi-Fi] configuration error”)?

佐手、 提交于 2020-08-02 10:48:36
问题 I am developing an app which manages the Wi-Fi connections. My scenario is as follows: Let's say, the entire building has a Wi-Fi network named “testing-tls”. My app should be able to connect to only selected access points (based on BSSID or MAC ID). We use TLS authentication mechanism to verify the user (Custom CA Certificates). I am able to establish a connection through the app, but failing when I try to connect to a different access point (different BSSID). Even though I created the Wi-Fi

Android “O” (Oreo, 8) media buttons issue

孤街醉人 提交于 2020-08-02 06:25:06
问题 The code for handling media buttons from headsets that I use in my Text-to-Speech app works great under Android API 22 through 25 (in older versions of Android they are handled by other, now depreciated means). However under Android 8 "Oreo", both public beta and final release, it does not work. Here is the relevant code: When the service starts, I create MediaSessionCompact object: mSession = new MediaSessionCompat(getApplicationContext(), "my.package.name._player_session"); mSession

Android “O” (Oreo, 8) media buttons issue

孤者浪人 提交于 2020-08-02 06:24:50
问题 The code for handling media buttons from headsets that I use in my Text-to-Speech app works great under Android API 22 through 25 (in older versions of Android they are handled by other, now depreciated means). However under Android 8 "Oreo", both public beta and final release, it does not work. Here is the relevant code: When the service starts, I create MediaSessionCompact object: mSession = new MediaSessionCompat(getApplicationContext(), "my.package.name._player_session"); mSession

Xamarin Oreo Adaptive Icons

冷暖自知 提交于 2020-07-18 04:22:09
问题 Did any of you successfully make use of the "Adaptive Icons" for xamarin android, introduced in Oreo? I managed to make it work, if the .png images are placed in the Drawable-folders, but not if they are placed in the MipMap-folders. I have followed the guidelines in this link, and it works when using Android Studio... weird I think? https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive.html 回答1: Thanks to this blog post I was able to use adaptive Icons in my

using altbeacon library on android 8(oreo), background beacon scan not working

六眼飞鱼酱① 提交于 2020-06-28 05:08:20
问题 My app using Altbeacon library for beacon scanning. my code working well to api level 24(android 7) but doesn't not working on oreo(8.0.0) at first, my gradle setting compileSdkVersion and targetSdkVersion is 26, i thought it was because of this. so, i reference this**https://developer.android.com/about/versions/oreo/background.html#services**, fix my gradle setting(compileSdkVersion 25, targetSdkVersion 25). and install this app on device (apilevel 24, 26) on 24 level device working well,

using altbeacon library on android 8(oreo), background beacon scan not working

孤人 提交于 2020-06-28 05:08:13
问题 My app using Altbeacon library for beacon scanning. my code working well to api level 24(android 7) but doesn't not working on oreo(8.0.0) at first, my gradle setting compileSdkVersion and targetSdkVersion is 26, i thought it was because of this. so, i reference this**https://developer.android.com/about/versions/oreo/background.html#services**, fix my gradle setting(compileSdkVersion 25, targetSdkVersion 25). and install this app on device (apilevel 24, 26) on 24 level device working well,

Calendar Provider: Permission Denial on Android 8

女生的网名这么多〃 提交于 2020-06-23 03:40:07
问题 I'm experiencing app crashes on Oreo Android 8.0/8.1 devices when using the calendar provider. The problem does not show on my devices running Nougat and below. Permission Denial: reading com.android.providers.calendar.CalendarProvider2 uri content://com.android.calendar/calendars from pid=8522, uid=10197 requires android.permission.READ_CALENDAR, or grantUriPermission() What puzzles me is that crashes happen even though the system requests persmissions in runtime, they are confirmed by the