android-8.0-oreo

I am not able to receive “android.provider.Telephony.SMS_RECEIVED” this broadcast in Android Oreo

天涯浪子 提交于 2019-12-29 00:41:50
问题 This is my Menifest file <receiver android:name="com.agribazaar.android.receivers.OTPReceiver" android:exported="true"> <intent-filter> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter> </receiver> This is my Broadcast Receiver class public class OTPReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")){ } } 回答1: This fixed the issue for me

Setting up Gradle for api 26 (Android)

纵然是瞬间 提交于 2019-12-28 04:53:06
问题 Since I have upgraded my Nexus 5x to Android O DP3 I am not able to test my applications. I get the error for not having configured my Gradle-file to work with the new API-level (26). So I changed this and the dependencies, but I keep getting errors on ALL my support libraries like Failed to resolve: com.android.support:design:26.0.0-beta2 Clicking on Install repository and sync project Pops up a progressdialog for downloading the right dependency but does not remove the error. Cleaning up

Android 8.0: java.lang.IllegalStateException: Not allowed to start service Intent

依然范特西╮ 提交于 2019-12-27 09:07:52
问题 On application launch, app starts the service that should to do some network task. After targeting API level 26, my application fails to start service on Android 8.0 on background. Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=my.app.tt/com.my.service }: app is in background uid UidRecord{90372b1 u0a136 CEM idle procs:1 seq(0,0,0)} as I understand it related to: Background execution limits The startService() method now throws an IllegalStateException if

Android 8.0: java.lang.IllegalStateException: Not allowed to start service Intent

偶尔善良 提交于 2019-12-27 09:03:09
问题 On application launch, app starts the service that should to do some network task. After targeting API level 26, my application fails to start service on Android 8.0 on background. Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=my.app.tt/com.my.service }: app is in background uid UidRecord{90372b1 u0a136 CEM idle procs:1 seq(0,0,0)} as I understand it related to: Background execution limits The startService() method now throws an IllegalStateException if

Android 8.0: java.lang.IllegalStateException: Not allowed to start service Intent

情到浓时终转凉″ 提交于 2019-12-27 09:03:02
问题 On application launch, app starts the service that should to do some network task. After targeting API level 26, my application fails to start service on Android 8.0 on background. Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=my.app.tt/com.my.service }: app is in background uid UidRecord{90372b1 u0a136 CEM idle procs:1 seq(0,0,0)} as I understand it related to: Background execution limits The startService() method now throws an IllegalStateException if

ScanJob continues beign invoked after the 15 min period and stops when a region matches

此生再无相见时 提交于 2019-12-25 17:45:05
问题 From what I understand in the documentation of AltBeacon library, the ScanJob should stop beign called after 15min of last interaction with the application. I have started to monitor and range some regions and I have disabled all the beacons, so no beacons are beign detected. After starting the application, I have killed it and I am seeign in the logcat that the ScanJob is beign invoked continuosly even after 15 minutes. 03-22 14:17:46.047 10755-10755/ I/ScanJob: Using immediateScanJobId from

Background execution in Oreo Android devices

╄→尐↘猪︶ㄣ 提交于 2019-12-25 01:19:22
问题 Mine is a Cordova based hybrid app. Inside our activity(say A), there is a button which when clicked launches another activity, say B. B is actually inside a cordova plugin. So of course we use javascript to initiate B. So when B is running, A wants to know the last active timestamp. A triggers a javascript call(since B is inside a plugin) to get the last active stamp every 1 minute. In devices below Oreo, everything works fine. In devices with Oreo, the javascript call gets blocked after 5

How to run background service for Instant Messaging using Kurento API in Oreo?

天涯浪子 提交于 2019-12-25 00:33:52
问题 Android Oreo has released with many restrictions on running background services/Task. Services now don't behave like normal in Oreo as they used to before. But what if I have to run a service in background for 24*7 for Instant Messaging. I am developing an application for Instant messaging using kurento Third Party API. To achieve this I will have to run a background service which communicate with server for new messages. Lower then Oreo its working fine. How do I prevent android system to

NotificationListenerService works intermittently for Oreo

試著忘記壹切 提交于 2019-12-24 10:46:31
问题 I have a class public class NotifClass extends NotificationListenerService{ @Override public IBinder onBind(Intent intent) { return super.onBind(intent); } @Override public void onNotificationPosted(StatusBarNotification sbn){ String notifiTitle = getActiveNotifications()[i].getNotification().extras.getString("android.title"); } } I've put a breakpoint at String notificationTitle = getActiveNotifications()[i].getNotification().extras.getString("android.title"); inside onNotificationPosted

Push notification issue in Oreo 8.0

泄露秘密 提交于 2019-12-24 10:23:12
问题 After updating the app to 8.1 the notification was not shown and I fixed it. Now, pending intent is not working as expected. After receiving the notification, I am not able to navigate to the app if it is in background and if it is closed it is not launching. private void sendNotify(String messageBody) { Intent intent = new Intent(); intent.setAction(Constants.NOTIFY); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); int uniqueId = (int) System.currentTimeMillis(); Uri defaultSoundUri =