android-8.0-oreo

How instagram or direct not change shape in icon launcher to circle in android oreo

与世无争的帅哥 提交于 2020-01-15 07:07:18
问题 How instagram not change shape in your icon to different mask (circle square, teardrop) in Android oreo. screen shot of device with instagram installed: I create the design of icon that Android indicate in this page Designing Adaptive Icons screen shot of device with Direct installed: This the code! <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@color/ic_launcher_background"/> <foreground android

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

偶尔善良 提交于 2020-01-11 16:40:06
问题 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? 回答1: The ARM images for API 26 and 27 are not available yet. ARM images available till API 25 only. Note: Google recommended an x86 system image on an x86 host for better emulation performance. 回答2: You should build Android sources for specific platform by yourself 回答3: Recent updates enabled computers with AMD processors to

i want to update my sqlite and firebase database every hour?

独自空忆成欢 提交于 2020-01-11 11:17:54
问题 I want to update my local sqlite and firebase database every hour. But I can't use the broadcast receiver as it was ban in android o. I can't use Job scheduler and work manager as it is a timebase application. I don't want to foreground service because it will use lots of resources and required to show a notification that I can't show. 来源: https://stackoverflow.com/questions/57826280/i-want-to-update-my-sqlite-and-firebase-database-every-hour

How to use StorageStatsManager.queryStatsForPackage on Android O?

五迷三道 提交于 2020-01-11 06:55:31
问题 Background Before Android O, in order to get an app size, you had to have a special permission for it, and use a hidden API. The problem Such a solution won't work anymore, but instead, Google provides an official API that's less granular: queryStatsForPackage , which returns StorageStats object. However, I can't find any information of how to use it. As opposed to the hidden API, which only required the package name of the app, this one also requires "String volumeUuid" and "UserHandle user"

API 26+: WRITE_EXTERNAL_STORAGE permission is always denied

假如想象 提交于 2020-01-10 08:10:30
问题 I have switched my app to target API 27 and now it can't be granted WRITE_EXTERNAL_STORAGE permission -- grantResult is always -1 . My app needs this permission since it doesn't use apps private external storage space (which doesn't require WRITE_EXTERNAL_STORAGE starting from API 19). I know that in API 26 there have been behavior changes for permissions. However this doesn't explain my problem. I'm requesting both READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions in a standard

facebook + android : Only fullscreen opaque activities can request orientation

混江龙づ霸主 提交于 2020-01-09 19:36:28
问题 Facebook SDK version 4.27.0 Android OS version 8.0 App crashes with exception, this is the trace log I have found over Crashlytics: Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.yyy/com.facebook.FacebookActivity}: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2822) at android.app.ActivityThread.handleLaunchActivity(ActivityThread

Notifications fail to display in Android Oreo (API 26)

家住魔仙堡 提交于 2020-01-09 02:14:11
问题 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. 回答1: 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

Android 8 - How to know what side the Navigation Bar is when going from LANDSCAPE to REVERSE_LANDSCAPE?

牧云@^-^@ 提交于 2020-01-06 05:51:12
问题 In Android 8, when the phone goes to LANDSCAPE the navigation will be on the right side of the screen, and when its in REVERSE_LANDSCAPE , it'll be on the left side. What I did to find out which side of the screen it is on was to have the root View of my activity and check it's size and position in these ways: if (rootView.width == deviceScreenWidth) { // device is tablet and the navigation bar is at the bottom, or // its a samsung device with no navigation bar } else if (rootView

java.io.FileNotFoundException: (Permission denied) Only in Oreo

爱⌒轻易说出口 提交于 2020-01-06 05:25:10
问题 I am downloading photos to smartphone. For versions lower than Oreo, there's no problem. But for Oreo, my code isn't not working. I tried this code in Emulator: I implemented a function to save an image to external storage. private void saveImageToExternalStorage(Bitmap finalBitmap,String name) { String root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString(); File myDir = new File(root + "/xx"); myDir.mkdirs(); String fname = name + ".jpg"; File file =

Sharing file in Oreo not working

江枫思渺然 提交于 2020-01-05 07:05:14
问题 I'm trying to share an audio file in Oreo. If the file is in internal storage of the device, it runs fine but if the file is present on the external storage it crashes giving this exception - android.os.FileUriExposedException. How to solve this problem: public void shareSong(SongInfoModel songInfoModel){ Uri uri = Uri.parse(""); File f = new File(songInfoModel.getData()); if(Build.VERSION.SDK_INT<=Build.VERSION_CODES.N_MR1) { uri = Uri.parse("file://" + f.getAbsolutePath()); }else { uri =