android-8.0-oreo

On Oreo (8.1.0) not getting the correct Wifi SSID. It's showing <unknown ssid> though it is connected to a wifi with SSID

你。 提交于 2019-12-21 08:22:16
问题 I need to check the current connected wifi SSID on android. I checked with Nokia 6 and OnePlus 5 with respectively Oreo 8.1.0 and Oreo 8.0. Other phones with different OS version is working fine with this code. Is there anything wrong with my code? private WifiInfo wifiInfo; private String ssid = ""; private WifiManager wifiManager; private boolean getWifiStatus() { wifiManager= (WifiManager) context.getSystemService(Context.WIFI_SERVICE); wifiInfo = wifiManager.getConnectionInfo(); ssid = ""

SecurityException: Failed to find provider null for user 0; on ActiveAndroid on Android 8.0

这一生的挚爱 提交于 2019-12-21 06:47:30
问题 I have an app that is using ActiveAndroid and it's been working fine. However; now when I try to save a model to the database I'm getting a SecurityException. The stack is: Error saving model java.lang.SecurityException: Failed to find provider null for user 0; expected to find a valid ContentProvider for this authority at android.os.Parcel.readException(Parcel.java:1942) at android.os.Parcel.readException(Parcel.java:1888) at android.content.IContentService$Stub$Proxy.notifyChange

Android Oreo WebView renders layout too small after 2nd loading

牧云@^-^@ 提交于 2019-12-21 06:01:12
问题 On some Android Oreo devices, when I load an url on webview for the first time, the URL page loads properly. However, when I load the URL again, the page is zoomed out. On devices lower than android oreo, the page loads properly for all devices. Also, when you kill the app on the background and load again, the URL loads properly. On the second and succeeding tries, it shows the zoomed out version again. I attached the images of loaded URL below Below is the correct loading of webpage on the

Oreo, BLE scanner startScan with PendingIntent not working on Samsung device

做~自己de王妃 提交于 2019-12-21 03:01:40
问题 I am trying to scan for beacons using startScan(filters, settings, callbackIntent). I have an implementation that works fine for Sony Xperia XZ, and Nexus 5X. The only other device with Android O I have available is a Samsung Galaxy S8, and what works for the other devices produce nothing on the Samsung. (The bluetooth scan is really imbedded in a library module, but even when creating a dummy app the samsung fails, so I'll use that in this example). I have removed the filter and the settings

Starting JobIntentService from PendingIntent (Notification button)?

主宰稳场 提交于 2019-12-20 10:35:01
问题 In my app, I have a notification button that fires off a short network request in the background using an IntentService. It does not make sense to show a GUI here, which is why I use the service instead of an Activity. See the code below. // Build the Intent used to start the NotifActionService Intent buttonActionIntent = new Intent(this, NotifActionService.class); buttonActionIntent.setAction(NotifActionService.ACTION_SEND_CONFIRM); buttonActionIntent.putExtra(NotifActionService.EXTRA

FCM Notifications not getting called in background for Oreo

北战南征 提交于 2019-12-19 11:37:12
问题 I am using FCM notifications for chat when user is not connected to xmpp. There are 2 modes of Notifications in FCM 1. Notifications Message 2. Data Messages I an using Data messages as Notification messages won't come if my app is cleared from recents This approach is working fine for all the version except Oreo. For Oreo, I only get notifications if the app is not connected to xmpp and in foreground. My onMessageReceived method is getting called. But the same is not happening when the app

Package id platform: android-O not available

情到浓时终转凉″ 提交于 2019-12-19 07:43:46
问题 While trying to clone Android O sample from github, project can't able to sync and give below error. Android studio give package unavailable , which can't able to install missing platform (android o). I am using android studio 2.3 and cloning android o example: https://developer.android.com/preview/o-samples.html#nc Can any one suggest, how can I able to run cloned example? 回答1: To add the Android O items to Android Studio 2.3, I had to temporarily switch to the Canary channel in Android

How to check if a service is running on Android 8 (API 26)?

半世苍凉 提交于 2019-12-19 06:41:29
问题 I had some functionalities of my app broken once upgrading to Android 8, even not targeting the API 26 explicitly. In particular, the good old function to check if a Service is running (as documented on StackOverflow here: How to check if a service is running on Android?) is not working anymore. Just to refresh our collective memory, it was this classic method: private boolean isMyServiceRunning(Class<?> serviceClass) { ActivityManager manager = (ActivityManager) getSystemService(Context

Android O - fingerprint gesture callback not working

纵饮孤独 提交于 2019-12-19 05:46:23
问题 I am testing on Pixel device with Fingerprint Gestures ON from accessibility. I am trying to get the gesture callbacks using FingerprintGestureController but never getting any gestures in return even after I turn the accessibility ON for this app from Settings->Accessibility. isGestureDetectionAvailable() is always returning false to me. Can someone please help. Here is the code: my_gesture_service.xml <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" android

Unable to change language in Oreo

点点圈 提交于 2019-12-19 02:42:12
问题 I'm trying to use Arabic and English in my app. Its working fine on devices running on android Nougat or below. But it's not working on oreo devices. Is there some new code requirement in API 26? I am using the code below. public void changeLanguage(Context context, String language) { Locale locale = new Locale(language); Locale.setDefault(locale); Configuration config = context.getResources().getConfiguration(); config.setLocale(locale); context.createConfigurationContext(config); context