android-8.1-oreo

Background service is not working in Oreo

為{幸葍}努か 提交于 2019-11-27 20:57:36
I want to run my app in background if I kill the app instance also. But after I kill my app the service also stops working. Here is my code please any one help me to solve my issue. I followed this link for running in the background but it is not working if I remove the instance. Please can any one show me how to run a background service if the instance is removed also? This is my MainActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ctx = this; setContentView(R.layout.activity_main); Intent alarmIntent = new Intent(MainActivity.this,

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

那年仲夏 提交于 2019-11-27 18:28:17
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 "portrait" on the manifest. Sometimes goes to portrait then to landscape and stay on landscape. Sometimes goes to portrait then to landscape and finally portrait again. This is only happening when a go back from a activity that it's landscape. There is anyone who is experiencing this? Thanks. EDIT I report the bug on Google: https://issuetracker.google.com

Notifications fail to display in Android Oreo (API 26)

半城伤御伤魂 提交于 2019-11-27 04:10:40
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. Per the comments on this Google+ post : those [warnings] are currently expected when using NotificationCompat on Android O devices ( NotificationCompat always calls setSound() even if you never pass in custom sound). until the Support Library changes their code to use the AudioAttributes version of setSound , you'll always get that warning. Therefore there's nothing

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

两盒软妹~` 提交于 2019-11-27 02:58:49
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

Interstitial Admob ads: “IllegalStateException: Only fullscreen activities can request orientation”

断了今生、忘了曾经 提交于 2019-11-26 23:54:40
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 'com.google.firebase:firebase-ads:11.4.2' The problem After updating, I noticed that whenever the app tries to show an Interstitial ad, it crashes. The crash log is as such: 10-28 14:01:01.394 4523-4523/... I/Ads: Ad opening. 10-28 14:01:01.400 1606-2154/? E/ActivityManager: Activity Manager Crash. UID:10080 PID:4523 TRANS:63 java.lang

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

喜你入骨 提交于 2019-11-26 15:42:45
问题 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 "portrait" on the manifest. Sometimes goes to portrait then to landscape and stay on landscape. Sometimes goes to portrait then to landscape and finally portrait again. This is only happening when a go back from a activity that it's landscape. There is

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

本秂侑毒 提交于 2019-11-26 11:54:45
问题 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();

Interstitial Admob ads: “IllegalStateException: Only fullscreen activities can request orientation”

爱⌒轻易说出口 提交于 2019-11-26 09:17:49
问题 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 \'com.google.firebase:firebase-ads:11.4.2\' The problem After updating, I noticed that whenever the app tries to show an Interstitial ad, it crashes. The crash log is as such: 10-28 14:01:01.394 4523-4523/... I/Ads: Ad opening. 10-28 14:01:01.400 1606