android-7.0-nougat

Calibration of gravity and magnetic field sensor in Android

烂漫一生 提交于 2019-12-11 15:37:32
问题 I have a Huawei P9 Plus smartphone running Android 7.0 and I have written an App which collects sensor data. For the gravity sensor Android is telling me that the accuracy is unreliable. For the magnetic field sensor I'm getting medium accuracy. For all other sensor I have high accuracy. Is there a way to calibrate the gravity and magnetic field sensor? 来源: https://stackoverflow.com/questions/54770132/calibration-of-gravity-and-magnetic-field-sensor-in-android

After dismissing the alert appium is no longer detecting any element on the screen

半世苍凉 提交于 2019-12-11 07:38:16
问题 Basically everything works until a notification is displayed on screen. After i dismiss the alert i, appium is no longer detecting any of my buttons, fields, etc. The only things that works is if i put the app in background and resume it. After resume everything works. (i`m using Appium 1.6.4, with Android 7.0). Any hint here? 回答1: It is known issue in appium project. Workaround that I use: get coordinates (x, y) of any element on screen before opening dialog interact with dialog (e.g. select

How to get all visible running applications package names?

霸气de小男生 提交于 2019-12-11 06:43:31
问题 I have a custom launcher which is always visible and it starts 3 different apps. Starting from Android N on each app icon click (on the custom launcher) I must check whether any of the 3 applications is currently running. If no app is running, the clicked icon should start the app normally. If any of them is currently running multi window mode must be turned on and show both of them. If 2 of them are running, the inactive one (which is in "onPause" state) should be replaced with the third.

DownloadManager and Android 7.0 Cancel feature

坚强是说给别人听的谎言 提交于 2019-12-11 04:28:50
问题 Android N brought the "cancel" feature directly on the download notification if you're using the DownloadManager . Did they add any intent-filter action to catch this event ? At this point DownloadManager gets only 3 actions : ACTION_DOWNLOAD_COMPLETE ACTION_NOTIFICATION_CLICKED ACTION_VIEW_DOWNLOADS I tried to use ACTION_NOTIFICATION_CLICKED to cancel manually my download but if the user clicks on the "Cancel" button, I'm not notified. 回答1: The DownloadManager should send ACTION_DOWNLOAD

Why does Android N throw TransactionTooLargeException when using Bundles? [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-11 01:44:54
问题 This question already has an answer here : TransactionTooLargeException when trying to send binary content, using Intents [closed] (1 answer) Closed 2 years ago . On Android N whenever I pass some binary or large data in bundle I get a TransactionTooLargeException , however it runs without issues on android M and below. How can I solve this? 回答1: There has been a behavior change in Android N Quoting the docs: Many platform APIs have now started checking for large payloads being sent across

Not able to use dagger-injected objects in attachBaseContext() to update locale

情到浓时终转凉″ 提交于 2019-12-10 23:39:09
问题 I am using dagger and I have to update the locale in the attachBaseContext of the activity , I am keeping the locale update logic inside LocaleManager and LocaleManager instance is already inside appModule when I try to use this LocaleManager instance inside attachBaseContext I get null pointer exception as the activity's injections happen after attachBaseContext inside onCreate() . 回答1: This is happening, as you said, because the injection is happening after attachBaseContext is called. I'm

InCallService - Not working in Android Nougat

蹲街弑〆低调 提交于 2019-12-10 23:33:06
问题 I used InCallService to replace default call service, It is working fine in Android 6 (Marshmallow). But, in Samsung S8 with Android Nougat (version 7.0) not working. Doesn't get any call back of InCallService . Do I need any additional permissions for Android Nougat to access InCallService ? 来源: https://stackoverflow.com/questions/45079210/incallservice-not-working-in-android-nougat

Android-7.0: EditText wrong actionId in editor actionlistener

限于喜欢 提交于 2019-12-10 17:36:36
问题 I have an edit text declared in xml like this with following properties and i have set android:imeOptions="actionNext" <EditText android:id="@+id/ui_row_create_poll_edit_text_txt_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginLeft="@dimen/margin_normal" android:layout_toLeftOf="@id/ui_row_create_task_user_info" android:background="@android:color/transparent" android:paddingBottom="@dimen/padding_large

OnCreateOptionsMenu doesn't get called on Android 7.0

纵饮孤独 提交于 2019-12-10 16:27:56
问题 As in the title mentioned the OnCreateOptionsMenu method doesn't get called after I updated my system to Android 7.0. Before the update I used Android 6.0 and it worked without any issues. If I test it on my other phone with 6.0 it is still working (same code). Is there any problem with this method on Android 7.0 or is something wrong in my code? The part of my MainActivity.cs where I set the toolbar [Activity(Label = "App", Icon = "@drawable/icon", MainLauncher = true, Theme = "@style/Theme

Is Android N Stream API backported to lower versions?

情到浓时终转凉″ 提交于 2019-12-10 16:08:49
问题 Latest version of Android N has stream package but when i'm trying to use it is saying min Sdk version which i should use is 24 (N) and my min SDK is 16. I enabled JackOptions with which Lambda expressions , Method References are working fine ( even for versions less than N minsdk) but still has problem is only with Stream package . The link below https://developer.android.com/guide/platform/j8-jack.html says lambda, method references are available to 23 n lower also but no clarity on Stream