android-9.0-pie

DownloadManager requests delayed on Android Pie

廉价感情. 提交于 2019-11-30 20:11:00
I have been using the DownloadManager APIs to handle downloads in one app for about 3 years. Recently I had some users on Android Pie complaining that sometimes downloads get stuck for several minutes before actually starting, thus compromising the UX: some of them had to reinstall the app to make them work correctly, some others had the issue fixed itself over time. Please note that I haven't set any special settings to the DownloadManager.Request instances (e.g. allowedNetworkTypes , setRequiresCharging , ...). My understanding of the problem is that requests get stuck in the pending or

Admob banner ad not loading in android P

▼魔方 西西 提交于 2019-11-30 15:22:53
I am using AdMob banner ads in multi-process. It is working fine on API version lower than 29 but on android-P, it is giving this error. com.google.android.gms.ads.internal.webview.s: Webview initialization failed. at com.google.android.gms.ads.internal.webview.o.a(:com.google.android.gms.policy_ads_fdr_dynamite@6000@6000.204543870.204543870:5) at com.google.android.gms.ads.internal.i.a(:com.google.android.gms.policy_ads_fdr_dynamite@6000@6000.204543870.204543870:6) at com.google.android.gms.ads.internal.y.a(:com.google.android.gms.policy_ads_fdr_dynamite@6000@6000.204543870.204543870:4) at

Unable to open database in Android Pie (Android 9)

感情迁移 提交于 2019-11-30 14:56:18
I used checkDataBase function to ensure if the database already exist to avoid re-copying the file each time you open the application in Oreo. But in Android Pie it is not working. private boolean checkDataBase (String dbName, int dbVersion) { SQLiteDatabase checkDB = null; try { String myPath = DB_PATH + dbName; checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.CONFLICT_ABORT); if (checkDB.getVersion() < dbVersion) { Timber.d("Delete database called"); myContext.deleteDatabase(dbName); return false; } } catch(SQLiteException e) { } if(checkDB != null){ checkDB.close(); }

Admob banner ad not loading in android P

点点圈 提交于 2019-11-30 14:15:47
问题 I am using AdMob banner ads in multi-process. It is working fine on API version lower than 29 but on android-P, it is giving this error. com.google.android.gms.ads.internal.webview.s: Webview initialization failed. at com.google.android.gms.ads.internal.webview.o.a(:com.google.android.gms.policy_ads_fdr_dynamite@6000@6000.204543870.204543870:5) at com.google.android.gms.ads.internal.i.a(:com.google.android.gms.policy_ads_fdr_dynamite@6000@6000.204543870.204543870:6) at com.google.android.gms

Android P Beta - AlarmManager Notifications not working

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 14:02:26
I'm testing my application on Android P beta release 4. My app's targetSdkVersion is 27 It has been observed that alarm manager notifications are not working as expected. I'm using below code to set the notifications - if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, AlarmIntentBuilder.buildPendingIntent(context, uri)); } else if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { alarmManager.setExact(AlarmManager.RTC_WAKEUP, triggerAtMillis,

Android Pie (9.0) WebView in multi-process

偶尔善良 提交于 2019-11-30 05:03:59
Starting Android Pie (API 28), Google isn't allowing using a single WebView instance in 2 different processes. Documentation: https://developer.android.com/reference/android/webkit/WebView.html#setDataDirectorySuffix(java.lang.String) As required, I called WebView.setDataDirectorySuffix("dir_name_no_separator") but unfortunately, I get an exception. I tried to call this method inside the 2nd process Service onCreate(). java.lang.RuntimeException: Unable to create service com.myapp.service.MyService: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized

Android P visibilityawareimagebutton.setVisibility can only be called from the same library group

半城伤御伤魂 提交于 2019-11-29 22:44:01
I'm trying to use the new Android P FloatingActionButton that's part of the com.google.android.material.floatingactionbutton.FloatingActionButton and I'm getting this warning: VisibilityAwareImageButton.setVisibility can only be called from the same library group (groupId=com.google.android.material) import com.google.android.material.floatingactionbutton.FloatingActionButton import android.view.View class MainActivity : AppCompatActivity() { lateinit var demoFab: FloatingActionButton override fun onCreate(savedInstanceState: Bundle?) { demoFab = findViewById(R.id.demoFab) demoFab.visibility =

Android P Beta - AlarmManager Notifications not working

喜欢而已 提交于 2019-11-29 19:49:36
问题 I'm testing my application on Android P beta release 4. My app's targetSdkVersion is 27 It has been observed that alarm manager notifications are not working as expected. I'm using below code to set the notifications - if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { alarmManager.set(AlarmManager.RTC_WAKEUP, triggerAtMillis, AlarmIntentBuilder.buildPendingIntent(context, uri)); } else if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && Build.VERSION.SDK

Android P: UsageStatsManager getAppStandbyBucket

笑着哭i 提交于 2019-11-29 18:10:05
I want to display the current bucket of my application with a device under Android P beta. Therefore, I try to use the UsageStatsManager class like this : @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (Build.VERSION.SDK_INT >= 28) { UsageStatsManager usageStatsManager = (UsageStatsManager) getSystemService(USAGE_STATS_SERVICE); if (usageStatsManager != null) { Log.d(TAG, "getAppStandbyBucket():" + usageStatsManager.getAppStandbyBucket()); } } } My Manifest possesses the permission android.permission

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