android-8.0-oreo

Oreo: disable Activity transition animation

南笙酒味 提交于 2019-12-04 08:56:11
I need to disable Activity transition animation for all the screens in my application. Previous solution worked fine for all Android version: <style name="base_theme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowAnimationStyle">@null</item> </style> ... but for Android 8 "Oreo" it cause black screen blinking for every transition (forward or back move). I.e. there is still no any animation, but very annoying blinking take place (90% chance, ~20-30 milliseconds, the whole screen). According to my "research": it does not depends on activity content and reproduced with

How to create shortcuts on Android O, when targetting less than it?

心不动则不痛 提交于 2019-12-04 08:33:33
Background Android O has various changes of how shortcuts work: https://developer.android.com/preview/behavior-changes.html#as The problem According to recent changes on Android O, the broadcast intent to create shortcuts is completely ignored : https://developer.android.com/reference/android/content/Intent.html#ACTION_CREATE_SHORTCUT https://developer.android.com/preview/behavior-changes.html#as The com.android.launcher.action.INSTALL_SHORTCUT broadcast no longer has any effect on your app, because it is now a private, implicit broadcast. Instead, you should create an app shortcut by using

Android O, Background Service is running for more than 30 minutes. Why?

你说的曾经没有我的故事 提交于 2019-12-04 08:20:35
I am using FusedLocationProvider API to register some Geofences with PendingIntent, when my app gets started (app was manually killed to trigger this behavior) via Geofence event, I start a background service to do some work. In this Service I create a separate background thread to do some long running tasks and I acquire a wake-lock so that I am sure my tasks are completed. The Service keeps running for longer period of times (30 - 50 minutes) even though It shouldn't be. It shouldn't be white-listed and keep itself running for longer period of times according to my understanding of recent

Android 8.0 Oreo - Accounts

泄露秘密 提交于 2019-12-04 06:44:27
In my app, I need to known if there is any Google account or any Samsung account. Up to Android 7 it was easy to get this information with something like: Account[] accounts = AccountManager.get(getContext()) .getAccountsByType("com.google") But with the event of Oreo this does not work anymore. EDIT: see official information on this subject: In Android 8.0 (API level 26), apps can no longer get access to user accounts unless the authenticator owns the accounts or the user grants that access. The GET_ACCOUNTS permission is no longer sufficient. To be granted access to an account, apps should

Android O issues with WiFi Peer Discovery

前提是你 提交于 2019-12-04 05:21:20
I am developing an Android Application that employs WiFi (Direct) for service discovery and P2P peer discovery/connection. My development enviromment is as follows:- Android Studio 3.0 Beta 4 Build #AI-171.4304935, built on August 29, 2017 JRE: 1.8.0_152-release-915-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 My Gradle build:- apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.research.wifi_direct" minSdkVersion 19 targetSdkVersion 26 versionCode 1

How to find out the Notification channel Id from RemoteMessage

三世轮回 提交于 2019-12-04 02:50:53
问题 I registered notification channel in Android app following GoogleSamples https://github.com/googlesamples/android-NotificationChannels However how can I get notification channel Id from RemoteMessage, so I can set it to NotificationBuilder. public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { //int id = remoteMessage.getNotificationChannel(); // -something like this I could

Adaptive Icon not working

喜夏-厌秋 提交于 2019-12-03 16:30:07
问题 manifest: <application android:name="..." android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/MyTheme" tools:replace="icon,label,theme,name,allowBackup"> under the folder mipmap-anydpi-v26 I have defined ic_launcher.xml : <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@color/white"/> <foreground android:drawable="@mipmap/ic_launcher_foreground"/> </adaptive-icon> here is

No response received in startscan method at WifiManager in Android 8 Oreo

旧巷老猫 提交于 2019-12-03 15:35:56
According to official Android documentation, the method startScan at WifiManager is deprecated in API level P. However I am trying to use this method in API level 26 (previous to P) without success. I have developped an app which requires the scanning of the WiFi networks, if the user agree with the required permissions, and this behaviour is paramount for the appropriate functioning of the app. However I do not receive any response when calling the startScan method. ¿Can anyone help me to solve this problem or find an alternative solution? This is a link to the documentation. https:/

Foreground app killed by OS after ~ 1 hour in standby mode

可紊 提交于 2019-12-03 13:15:35
问题 I have an application where the user is requested to sign in and then presented with an activity. A service is also started on the sign in which uses the location manager to track his current location. everything works perfectly until the application is left in standby mode (screen off an app in background for more than ~ 1 hour) how can I prevent this? as I understand, if I have a foreground service running, the OS should not kill the app.. so what am I doing wrong? the OS I am testing on is

Why does Android OS 8 WebVew with HTML select tag crash the app

浪子不回头ぞ 提交于 2019-12-03 11:27:19
I've got a hybrid Cordova Android app, and the app crashes when user tap on a drop-down box in my WebView running on Android OS 8. I've created a simple page with a <select> tag and the issue is reproducible. I've got a workaround which is to do my own pop up alert to select, but just wondering if this is happening to anyone else and whether this is an OS8 WebView bug. Below is a simple page with <select> tag https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select Below is my crash log 11:04:58.643 3208-3208/com.****.****E/AndroidRuntime: FATAL EXCEPTION: main Process: com.****.****,