Questions tagged [android-8.1-oreo]

Android 8.1 Oreo MR1 (API level 27), successor of Android 8.0 Oreo.

231 questions
255
votes
36 answers

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

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…
Shubham Sejpal
  • 3,556
  • 2
  • 14
  • 31
73
votes
7 answers

Interstitial Admob ads: "IllegalStateException: Only fullscreen activities can request orientation"

Background I have an app with Admob SDK used in it, to show Interstitial ads (full screen ads). Reccently Google has updated the SDK, along with many other things (build tools, gradle plugin, IDE, etc...), including admob (firebase ads). compile…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
57
votes
10 answers

Android 8.1 screen orientation issue: flipping to landscape a portrait screen

I have all activities in portrait mode except the one that I use to play a video that is always landscape. I found that on Android 8.1 every time I open the video activity and close it the previous activity go to landscape even it's set to…
Sol
  • 833
  • 1
  • 9
  • 17
47
votes
6 answers

Is there an API to detect which theme the OS is using - dark or light (or other)?

Background On recent Android versions, ever since Android 8.1, the OS got more and more support for themes. More specifically dark theme. The problem Even though there is a lot of talk about dark mode in the point-of-view for users, there is almost…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
44
votes
4 answers

Notifications fail to display in Android Oreo (API 26)

I get this message when trying to display a notification on Android O. Use of stream types is deprecated for operations other than volume control The notification is straight from the example docs, and displays fine on Android 25.
Sky Kelsey
  • 19,192
  • 5
  • 36
  • 77
42
votes
4 answers

Can't find Android 8.0-8.1 (Oreo) API 26-27 ARM System Images

Are there anywhere Android 8.0 (Oreo) API 26 and Android 8.1 (Oreo) API 27 ARM System images (ARM, not x86 Intel) for AVD Manager? Thanks. Unofficial? Beta? Alpha? Any?
34
votes
4 answers

BLE scan is not working when screen is off on Android 8.1.0

I am using pixel with latest android 8.1.0 update. I am facing issue related to BLE advertisement scanning. Whenever I turned off the screen(i.e power button press) my scanning will stop. it will restart immediately after turn on the screen. I have…
Parth
  • 1,908
  • 1
  • 19
  • 37
28
votes
2 answers

Oreo DocumentsContract.getDocumentId(uri) returns path instead of Long

I'm trying to get the real path of a file stored in the Android file system (I'm testing on an Emulator with Android 8.1) here is my code: final String id = DocumentsContract.getDocumentId(uri); final Uri contentUri =…
Ale
  • 2,282
  • 5
  • 38
  • 67
19
votes
3 answers

Service not starting on Oreo in app widget using PendingIntent

I'm using Android app widgets. I'm creating a PendingIntent object and use it in the method RemoteViews#setOnClickPendingIntent(). This is the pending intent: // The below code is called in the onUpdate(Context, AppWidgetManager, int[]) method of…
15
votes
7 answers

No custom sound with Android Firebase Notification

I am using Firebase push notifications in my Android App. I can send correctly notification with custom icon, but I have not managed to play my custom sound. I always get the default sound of my device. { "registration_ids": "myToken", …
kurtko
  • 1,978
  • 4
  • 30
  • 47
14
votes
1 answer

App crashing when using android data-binding on android 8

The code work on pre-oreo devices, but Crashlytics saying it crashing on android 8 devices @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getAppComponent().inject(this); …
13
votes
5 answers

Bad notification for start Foreground, Invalid channel for service notification:

So, i have an app on store with 50000 users. Recently i updated my android studio and compiled SDK to 27. I made some changes to support android 8 changes including Notification changes(e.g. Notification should have unique channel). Tested this on…
12
votes
2 answers

Why do I get RemoteServiceException for creating/updating a notification?

Background I have a spare time app that I've been working on for some years (here), and I try to handle as many crashes as I can (I hate seeing crash reports!). The problem One recent crash that seem quite new, is this…
12
votes
1 answer

Toasts overlap issue on Oreo (8.1)

I have a problem with toasts. For API 26 and below toasts are displayed properly (next toast is waiting for previous to disappear) but on Android 8.1 (API 27) they are covering each other. I have notification channel set up like this: if…
Kacper Opyrchał
  • 349
  • 3
  • 13
12
votes
1 answer

Android Oreo Does not Play Custom Sound for Notification

I am trying to add a custom sound to notification for API > 26. Below is the code NotificationChannel notificationChannel = new NotificationChannel("channel id","channel…
1
2 3
15 16