android-7.0-nougat

Java 8 Stream API in Android N

时光毁灭记忆、已成空白 提交于 2019-12-10 01:38:20
问题 According to Google's introduction, starting with Android N, the Android API is supposed to support Java streams. However, using the Android N preview SDK, I am unable to use any of the Stream APIs in my project (which is configured with Android N as minimum, target and build SDK version). The java.util.stream package seems to be missing, as are the stream() methods of all collection implementations I've tried. Are the necessary classes not yet included in the current preview release of the

Bad Notification: Couldn't expand RemoteViews for: StatusBarNotification. on Android Nougat

混江龙づ霸主 提交于 2019-12-09 09:04:05
问题 I use OneSignal SDK to show notifications. I do it in OneSignalPushService.java . OneSignalPushService.java: public class OneSignalPushService extends NotificationExtenderService { @Override protected boolean onNotificationProcessing(OSNotificationReceivedResult notification) { if (!TinyDbWrap.getInstance().isPushEnabled()) { KLog.d(this.getClass().getSimpleName(), "Notification will not displayed"); return true; } OverrideSettings overrideSettings = new OverrideSettings(); overrideSettings

How to utilize Android Nougat's Direct Reply feature with a NotificationListener?

喜夏-厌秋 提交于 2019-12-09 08:36:35
问题 My app is using a NotificationListener to read out messages from various 3rd party apps, for example WhatsApp. So far I was able to send a reply if only one chat is unread, the code is below. However, in the case with WhatsApp, getNotification().actions returns a null object when more than two chats are unread, as the messages are bundled together. As you can see in the pictures below, if the notifications are extended there is an option to send a direct reply as well, therefore I am certain

Regd : Support of Answer call in Android Nougat

牧云@^-^@ 提交于 2019-12-09 07:33:29
问题 I want to implement Answer call functionality in Android Nougat. The answer call is not supported in Google Nexus 5x. We tried using the code Runtime.getRuntime().exec("input keyevent " + Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK)); The answer call is supported in Google Nexus 6 using the above code. Has anyone worked on the above? Thanks! 回答1: There is a security patch that is added as an update on many devices above 5.0 from November 2016 onwards, after updating the devices with this

Programmatically install an apk in Android 7 / api24

♀尐吖头ヾ 提交于 2019-12-09 05:26:08
问题 I am trying to get my app to automatically install an apk. This works fine for api<24. But for 24, it is failing. Android has implemented extra security: For apps targeting Android 7.0, the Android framework enforces the StrictMode API policy that prohibits exposing file:// URIs outside your app. If an intent containing a file URI leaves your app, the app fails with a FileUriExposedException exception. So I tried this: Uri myuri; if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N){ myuri = Uri

My notification action icons don't be shown in android 7

五迷三道 提交于 2019-12-08 20:31:37
问题 My notification action icons don't be shown in android 7 (N)! Is it a change in Android 7? Can not I use them anymore? I see this problem when I run my app (That targeted API23) on Nexus 6P with Android 7. 回答1: Yes, Google redesigned notifications in Android 7 and abort icon for actions. You can also check this: https://developer.android.com/about/versions/nougat/android-7.0.html#notification_enhancements 来源: https://stackoverflow.com/questions/42082882/my-notification-action-icons-dont-be

TransactionTooLargeException only on Nougat [duplicate]

柔情痞子 提交于 2019-12-08 19:49:34
问题 This question already has answers here : android.os.TransactionTooLargeException on Nougat (13 answers) Closed last year . I've go an app that works well on devices with Android versions lower than Nougat. When I launch the app on a device with Nougat and I press home button, the app crashes and in logcat I have: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1819712) Unhandled exception java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1819712 bytes at

Android 7 BroadcastReceiver onReceive intent.getExtras missing data

强颜欢笑 提交于 2019-12-08 16:19:42
问题 My app isn't working on Android 7. My BroadcastReceiver.onReceive method is called but the contents of the intent.getExtras is missing. I've verified that the data was correctly loaded. Here's a snippet from my onReceive method, where intent is passed as a parameter to onReceive. Bundle bundle = intent.getExtras(); textMessage = bundle.getString("TEXT_MESSAGE"); ArrayList<MyPhoneNumber> phoneNumbersToText = bundle.getParcelableArrayList("PHONE_NUMBERS"); Both textMessage and

Android Send SMS Permission working on other 23+ devices but not with the OnePlus 5

风格不统一 提交于 2019-12-08 09:54:19
问题 I have an application that requests permission to send SMS from the user then sends a formatted SMS in the background. This works on all other 23+ devices except my new OnePlus 5. Does anyone know what might be going on? 回答1: May be it is happening because of the third party app permission. One plus uses Oxygen Os and Settings are managed from a custom settings view in Oxygen OS. You should open the application Settings page instead Intent intent = new Intent(); intent.setAction(Settings

How to create AVD with Android & (7.0) with Google APIs?

蓝咒 提交于 2019-12-08 08:48:54
问题 When I downloaded and select "N" (API = 24) for the AVD, I see the following message on bottom right: Consider using a System Image with Google APIs to enable testing with Google Play Services. Is this image not available yet? or am I missing something? I dont see it in the SDK Manager yet. 回答1: As of SDK Tools 25.1.7 and Intel x86 Atom_64 System Image Rev. 6, it appears that there is no longer a separate emulator image for the Google APIs - instead, the normal emulator image now includes the