天道酬勤,学无止境

android-7.1-nougat

App Icon Launcher not showing in Android 7.1.1

We are implementing a round icon (with a foreground and a background) and icon. <application android:allowBackup="false" tools:replace="android:allowBackup" android:label="@string/app_name" android:supportsRtl="true" android:icon="@mipmap/logo" //normal logo android:roundIcon="@mipmap/logo_o" //Our logo with foreground and background android:name=".MyApplication"/> Works for every version but not for API 25 Our code for Foreground with Background is the next one <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android

2021-08-12 05:09:02    分类:问答    android   android-7.1-nougat

Unable to sign apk “with only the traditional scheme” even after setting 'v2SigningEnabled' as false

I updated my android-studio to latest stable version i.e. 'Android Studio 2.3' and also the gradle to 2.3.0. Now, when I am trying to generate a signed apk of my app's release build, this "extra" thing (Signature versions:) is getting shown in the last step: I clicked on 'Signature Help' and this page got opened. I followed the doc and made changes to my build.gradle file like this: apply plugin: 'com.android.application' //Put Fabric plugin after Android plugin apply plugin: 'io.fabric' android { signingConfigs { config { keyAlias 'xxxxxx' keyPassword 'xxxxxx' storeFile file('/Users/xxxxx')

2021-08-11 03:37:12    分类:问答    android   android-studio   android-7.0-nougat   android-7.1-nougat   android-studio-2.3

Pre-install some apps so they can be uninstalled without root by user

Can I (As an AOSP builder) pre install some apps so after burning on device, they can easily be uninstalled (like regular downloaded apps)? I am already familiar with system apps and priv-apps but as they lie in system partition they can not be removed! (only disabled in settings menu) P.S. I know huawei for example uses /system/delapp to install such apps. But I seek for a general way or for AMLogic platform specifically which I am working on!

2021-07-31 07:46:36    分类:问答    android-source   android-7.1-nougat

Issue with DatagramSocket on Android 7.1.1

I'm faced with a very strange issue on QA's Google Pixel with Android 7.1.1 (N_MR1). We use UDP Server and Client for handshake during establish the TCP connection. QA reports that handshake to Pixel doesn't work. After exploring Logcat I found that UdpServerTask throws an exception: java.net.BindException: Address already in use at java.net.PlainDatagramSocketImpl.bind0(Native Method) at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:96) at java.net.DatagramSocket.bind(DatagramSocket.java:387) What I tried so far: enabled Reuse address feature (see code) -

2021-07-31 01:07:58    分类:问答    android   udp   android-7.1-nougat

I always see “E ActivityManager: Sending non-protected broadcast from system” in android 7. What does this mean?

I am trying to send an intent from a non system app using the following function. public static void sendIntent() { if (null != _context) { Intent intent = new Intent("com.test.testApp.testIntent"); intent.setPackage(_context.getPackageName()); _context.sendBroadcast(intent); } } But I always see there is an error message from ActivityManager as below. The same intent broadcasting(app) works fine in andorid 6.0 but throws an error in android 7.1.1. I am required to change anything for android 7.1.1? 4-10 15:06:34.423 1615 2921 E ActivityManager: Sending non-protected broadcast com.test.testApp

2021-07-30 04:33:10    分类:问答    android   android-intent   android-broadcastreceiver   android-7.1-nougat

Android Nougat PhoneStateListener 未触发(Android Nougat PhoneStateListener is not triggered)

问题 在 Android(目标 25)中,我有一个后台服务,在 onCreate 函数中,我已经初始化了一个电话状态侦听器。 它在 Nougat 之前的 Android 版本上运行良好,但在 Nougat 中它不起作用,即使授予了权限。 public class Service extends IntentService { class PhoneListener extends PhoneStateListener { String TAG = getClass().getName(); @Override public void onCallStateChanged(int state, String incomingNumber) { super.onCallStateChanged(state, incomingNumber); switch (state) { case TelephonyManager.CALL_STATE_IDLE: Log.d(TAG,"IDLE" ); break; case TelephonyManager.CALL_STATE_OFFHOOK: Log.d(TAG,"OFFHOOK"); break; case TelephonyManager.CALL_STATE_RINGING: Log.d(TAG,"RINGING"); break; }

2021-06-28 11:18:28    分类:技术分享    android   telephonymanager   android-7.0-nougat   android-7.1-nougat   android-doze

以编程方式接受牛轧糖中的呼叫(Programmatically accept call in Nougat)

问题 从一年开始,我一直在研究物联网产品,所附的应用程序运行良好。 现在我无法在更高版本的 android 中以编程方式接受呼叫。 功能对产品非常重要。 任何帮助都受到高度赞赏。 在2016 年 11 月安全补丁更新之前, Runtime.getRunTime.exec("Command")工作正常,可以以编程方式接受调用。 Runtime.getRuntime().exec("input keyevent " +Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK)); 如何在 Android 的牛轧糖版本中使其成为可能。 寻找任何类型的黑客。 我已经为增强功能打开了一个线程。 https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=231938 注意*如果你们中的任何一个人面临同样的问题,那么请请求Android Dev Team参与进来并提供获得用户运行时许可的条款。 按照上面提到的 URL 请求。 回答1 由于我也在研究 IOT 产品,这是我面临的最大问题之¸

2021-06-27 07:52:19    分类:技术分享    android   android-7.0-nougat   android-security   android-7.1-nougat

图标未显示在 Android 牛轧糖的通知中(Icon is not getting displayed in notification in Android nougat)

问题 我对此进行了研究,发现addAction (int icon, CharSequence title, PendingIntent intent)已被弃用,因此我使用了addAction (Notification.Action action) 。 在这两种情况下,都无法看到图标。 NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_share, "", pendingIntent).build(); notificationBuilder.addAction(action); 文本似乎正在工作,但我将其留空,因此主图像下方有一个空白空间,应该显示图标 回答1 这不是错误,而是 Android Nougat 的设计更改。 设备不再显示由addAction (Notification.Action action)定义的图标。 旧设备和 Android Wear 设备仍然需要它们! 引用 android 开发者 google 博客 您会注意到新通知中没有这些图标; 相反,在通知栏的受限空间中为标签本身提供了更多空间。 但是,通知操作图标仍然是必需的,并且会继续在旧版本的 Android 和 Android Wear 等设备上使用。 如果您一直使用

2021-06-27 07:23:01    分类:技术分享    android   android-notifications   android-7.1-nougat

Android SDK 版本 25 - android.support v7:25 给出“找不到与 @color/hint_foreground_material_light 匹配的资源” Adob​​e Creative SDK?(Android SDK Version 25 - android.support v7:25 gives “No resource found that matches @color/hint_foreground_material_light” Adobe Creative

问题 在将 compileSdkVersion 切换到 25 并使用最新的 android.support 库版本后,gradle 同步/构建时出现以下错误。 compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.android.support:design:25.0.0' compile 'com.android.support:recyclerview-v7:25.0.0' 错误: No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light'). 任何想法? 编辑:我认为那是因为 Adob​​e Creative SDK ......不确定。 其他人在 SDK 25 上运行良好。 相关问题:将支持库与 adobe creative SDK for android 一起使用时出错 我们不应该等待解决方案......也许我正在使用更新版本('com.adobe.creativesdk:image:4.6.3') EDIT2:我发现这是来自 Adob​​e SDK 依赖项的“fengdai alertdialog”。 但已弃用!

2021-06-25 14:10:10    分类:技术分享    android   android-support-library   adobecreativesdk   android-7.1-nougat

Missing Dialog Buttons under Android 7.1.1

This is a picture of an AlertDialog that is shown within my app. It should have a deny and an accept button. As you can see it has not: I cannot reproduce this error as I dont have a phone with Android 7.1. The picture was taken on a Google Pixel and send to me. All other Android versions this App was tested upon did not encounter this bug. (Versions 4.1, 6.0.1) Here is code of the method creating the dialog: /** * Creates a 2 options dialog. * @param context * @param title headline of the dialog * @param message main text of the dialog * @param accept listener for the accept button * @param

2021-06-14 09:50:02    分类:问答    android   android-7.1-nougat