android-8.0-oreo

Google Analytics service Intent crashes on Android Oreo

依然范特西╮ 提交于 2019-11-29 13:10:18
I have upgraded my app to support SDK 26 and now Google Analytics causes crashes when running on Android Oreo: Fatal Exception: java.lang.RuntimeException: Unable to start receiver com.google.android.gms.analytics.AnalyticsReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.gms.analytics.ANALYTICS_DISPATCH cmp=com.example.android/com.google.android.gms.analytics.AnalyticsService }: app is in background uid UidRecord{3f302e5 u0a107 RCVR idle procs:1 seq(0,0,0)} at android.app.ActivityThread.handleReceiver(ActivityThread.java:3259) at android

ForegroundService on android Oreo gets killed

杀马特。学长 韩版系。学妹 提交于 2019-11-29 12:54:19
I'm trying to build up a service which requests the device location every minute. I need this to work in background even when the application is closed. So far I managed to make it work on devices which has a pre-Oreo android OS but now I'm testing the service on android Oreo device and is not working when I close or put the application in background. In my research I found that for Oreo devices a Foreground Service with an ongoing notification should be used to achieve this so to start with I've implemented a simple Foreground Service like the below which while started it shows an ongoing

Android BiometricPrompt Compat library [closed]

六眼飞鱼酱① 提交于 2019-11-29 11:25:37
问题 Hi as mention in this post there is BiometricPrompt API for devices supporting Android O and lower but I am unable to find out BiometricPrompt Compat Library (as mention in image), is anyone able to help me to point out where is that support library, any link or guide? 回答1: I'm assuming it will be released soon as the source code for it appears here: https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/biometric/src/main/java/androidx/biometrics/BiometricPrompt

How long is the “JobService execution time limit” mentioned in Android's JobIntentService docs?

此生再无相见时 提交于 2019-11-29 09:06:48
问题 While converting an app to be ready for Android Oreo, I read the docs on JobIntentService over here. In there I find (important part emphasised): When running as a pre-O service, the normal service execution semantics apply: [...] When running as a Job, the typical JobService execution time limit will apply, after which the job will be stopped (cleanly, not by killing the process) and rescheduled to continue its execution later. If I look at the documented limitations there is no word about

Android Crash on Android 8.0 Oreo: SecurityException: Permission Denial: null asks to run as user 450 but is calling from user 0

拥有回忆 提交于 2019-11-29 07:52:37
I upgrade my phone to Android Oreo. When I'm running my app on this device. My app crashes. While it's running well on Android 7 and lower devices. This is the log: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.test.test, PID: 28271 java.lang.SecurityException: Permission Denial: null asks to run as user 450 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS at android.os.Parcel.readException(Parcel.java:1942) at android.os.Parcel.readException(Parcel.java:1888) at android.view.autofill.IAutoFillManager

How can I reliably simulate touch events on Android without root (like Automate and Tasker)?

点点圈 提交于 2019-11-29 07:46:25
How can I reliably simulate touch events on Android (without rooting) from Java outside my app which runs as a background service? While this question has been asked before, most answers utilise ADB . (such as How to simulate touch events on Android device? ) https://github.com/chetbox/android-mouse-cursor offers a good solution using Accessibility, but is not very reliable as not all views respond to it, and games do not respond at all most of the time. private void click() { AccessibilityNodeInfo nodeInfo = getRootInActiveWindow(); if (nodeInfo == null) return; AccessibilityNodeInfo

Custom notification sound , android Oreo?

谁说胖子不能爱 提交于 2019-11-29 02:06:35
I want to set a custom notification sound from a raw mp3 or wav file in my app. Below is my code private void sendMyNotification(String message) { Intent intent; if (sharedPreferences.getBoolean(SPConstants.IS_LOGGED_IN, false)) { intent = new Intent(this, ActivityNotification.class); } else { intent = new Intent(this, ActivitySplash.class); } intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT); Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); soundUri = Uri.parse(

facebook + android : Only fullscreen opaque activities can request orientation

点点圈 提交于 2019-11-29 01:06:42
Facebook SDK version 4.27.0 Android OS version 8.0 App crashes with exception, this is the trace log I have found over Crashlytics: Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.yyy/com.facebook.FacebookActivity}: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2822) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897) at android.app.ActivityThread.-wrap11(Unknown Source) at android.app.ActivityThread$H

java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

落花浮王杯 提交于 2019-11-28 23:49:59
I am facing the problem while retrieving the contacts from the contact book in Android 8.0 Oreo java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation I am trying to get the contact in my activity from the phone contact book and it works perfect for Lollipop, Marshmallow, Nougat, etc but it will gives me the error for Oreo like this please help me. My code is here below. Demo Code :- private void loadContacts() { contactAsync = new ContactLoaderAsync(); contactAsync.execute(); } private class ContactLoaderAsync extends AsyncTask<Void, Void, Void> { private

“Not enough information to infer parameter T” with Kotlin and Android

大兔子大兔子 提交于 2019-11-28 19:25:58
问题 I'm trying to replicate the following ListView in my Android app using Kotlin: https://github.com/bidrohi/KotlinListView. Unfortunately I'm getting an error I'm unable to resolve myself. Here's my code: MainActivity.kt: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val listView = findViewById(R.id.list) as ListView listView.adapter = ListExampleAdapter(this) } private class ListExampleAdapter(context: Context) :