android-8.0-oreo

Cannot upgrade to latest support library Android Studio

久未见 提交于 2019-12-13 10:31:44
问题 I have installed the latest version of Android Support Repository (47.0.0), but I can't build my project because of the following error. ERROR Here is my build.gardle code compileSdkVersion 26 buildToolsVersion '26.0.1' defaultConfig { applicationId "ir.dones.dones" minSdkVersion 17 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary= true } buildTypes { release { minifyEnabled false

Android Firebase notification not appear in android version 8 or higher [duplicate]

本秂侑毒 提交于 2019-12-13 09:15:07
问题 This question already has answers here : Notification not showing in Oreo (20 answers) Closed 8 months ago . the notification doesn't show in android 8 or higher, but its works fine in android 8 lower This bellow what i tried String code,code1,code2,title,message,image,urlImage; @Override public void onMessageReceived(RemoteMessage remoteMessage) { kode = remoteMessage.getData().get("code"); kode1 = remoteMessage.getData().get("code1"); kode2 = remoteMessage.getData().get("code2"); title =

Oreo: how to catch location update from the background?

五迷三道 提交于 2019-12-13 06:30:54
问题 I migrate my app to oreo (as it's requiered by google play now), and i have now an error when i start my phone : Not allowed to start service Intent My app is listening in background any location update and send periodically those grabbed locations to a server. for this i do : in AndroidManifest.xml <receiver android:name="com.myapp.StartServiceBroadcastReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> in the

Can't get default account in OREO

人盡茶涼 提交于 2019-12-12 20:18:09
问题 In Android Oreo, AccountManager.getAccountsByType("com.google"); returns null . Its, working fine in below Android 8 versions. Below is my code: private static Account getAccount(AccountManager accManager) { Account[] accounts = accManager.getAccountsByType("com.google"); Account account; if (accounts.length > 0) { account = accounts[0]; } else { account = null; } return account; } Thanks in advance. 回答1: As per Android's update, from Oreo onwards we can not use AccountManager

GeoFence using PendingIntent.getBroadcast() not working

六眼飞鱼酱① 提交于 2019-12-12 19:13:18
问题 I am trying get a Geofence trigger to a BroadcastReceiver and the BroadcastReceiver has the code to read the data from the intent and act on the data sent in intent. My BroadCastReceiver is GeoLocationBroadCastReceiver . I am invoking this code when my activity is opened and the app is in background. public PendingIntent getPendingIntent(Context context){ Intent i = new Intent(context, GeoLocationBroadCastReceiver.class); return PendingIntent.getBroadcast(context, 0, i, PendingIntent.FLAG

android-O : app crash with webview

巧了我就是萌 提交于 2019-12-12 15:06:01
问题 I have simply put a WebView in layout. When I run the project in Android-O preview emulator, it gives below error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mvvmrecyclerview, PID: 3527 java.lang.SecurityException: Signature check failed for com.example.mvvmrecyclerview at android.os.Parcel.readException(Parcel.java:1915) at android.os.Parcel.readException(Parcel.java:1861) at com.google.android.gms.common.internal.zzv$zza$zza.zza(Unknown Source:41) at com.google.android.gms

Why is my notification icon not displayed properly in Oreo?

混江龙づ霸主 提交于 2019-12-12 14:26:52
问题 We have notifications in our app since a long time, which work fine. I have a small, multicoloured .png-icon we use for them, that have worked fine in the past. In Oreo, the icon is not displayed properly, it is just a grey square. Looking at the drawer on the device, it seems that the system, gmail etc. all now have single-colour icons, so i suspect that it has something to do with that. However, i can't find any documentation, design guidelines or anything that confirm this, so i am

Secure.getString(mContext.getContentResolver(), “bluetooth_address”) return null in Android O

谁都会走 提交于 2019-12-12 10:45:24
问题 When I'm trying to get Blutooth Address on Android O device by this way: private String getBlutoothAddress(Context mContext){ // Check version API Android BluetoothAdapter myBluetoothAdapter; String macAddress; int currentApiVersion = android.os.Build.VERSION.SDK_INT; if (currentApiVersion >= android.os.Build.VERSION_CODES.M) { macAddress = Settings.Secure.getString(mContext.getContentResolver(), "bluetooth_address"); } else { // Do this for phones running an SDK before lollipop macAddress =

Context.startForegroundService did not then call Service.startForeground

不羁岁月 提交于 2019-12-12 09:36:45
问题 It's mine BroadcastReciever class. The class working on Boot phone status. Code ; public class BroadCastRecieverBoot extends BroadcastReceiver { @Override public void onReceive(Context context, Intent ıntent) { if(Intent.ACTION_BOOT_COMPLETED.equals(ıntent.getAction())) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { context.startForegroundService(new Intent(context, MyService.class)); context.startForegroundService(new Intent(context, GPSTracker.class)); } else { context.startService

Issue Moving from IntentService to JobIntentService for Android O

早过忘川 提交于 2019-12-12 08:57:17
问题 I am using Intent Service to monitor Geofence transition. For that I am using following call from a Sticky Service. LocationServices.GeofencingApi.addGeofences( mGoogleApiClient, getGeofencingRequest(), getGeofencePendingIntent() ) and the Pending Intent calls Transition service (an IntentService) like below. private PendingIntent getGeofencePendingIntent() { Intent intent = new Intent(this, GeofenceTransitionsIntentService.class); // We use FLAG_UPDATE_CURRENT so that we get the //same