android-7.1-nougat

Android N FileUriExposedException

寵の児 提交于 2019-12-11 05:13:37
问题 Guys My app uses the stock camera to take a picture I use the following code to take a picture public void takepic(View view) { TextView schtitle = (TextView) findViewById(R.id.Sitename); String schname = schtitle.getText().toString(); String[] tokens = schname.split(" "); String timeStamp = new SimpleDateFormat("dd-MM-yyyy-HH-mm-ss").format(new Date()); String imageFileName = tokens[0] + "-" + timeStamp + ".jpg"; TextView myAwesomeTextView = (TextView)findViewById(R.id.filetext); //in your

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

爷,独闯天下 提交于 2019-12-10 18:59:00
问题 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

Issue with DatagramSocket on Android 7.1.1

浪尽此生 提交于 2019-12-10 15:19:27
问题 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

App isn´t installed error when tapping app shortcut in Nougat 7.1.1

笑着哭i 提交于 2019-12-09 18:20:57
问题 I´m having some issues when adding an static app shortcut to an existing app. I followed the steps from https://developer.android.com/guide/topics/ui/shortcuts.html and the shortcut shows up, but when I tap it it doesn't launches the activity, instead it shows a toast message saying: " App isn´t installed ". Here is the relevant section of the manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mypackage"> <application android:allowBackup="true" android

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

How to set a2dp sink as a default (android 7.1)

依然范特西╮ 提交于 2019-12-08 05:16:09
问题 We made a custom board which has Android 7.1 operating system as a our custom board must act to a reciver with bluetooth(while a2dp sink profile in bluetooth can do this), but we have do many works over weeks on it , but it still not work, so i'd like to ask somebody who know or had similar expirence on it could help. Android 7.1 used the fluoride Bluetooth stack our works : 1. packages/apps/Bluetooth/res/values/config.xml <bool name="profile_supported_a2dp">true</bool> <bool name="profile

Missing Dialog Buttons under Android 7.1.1

若如初见. 提交于 2019-12-05 06:40:49
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

Launch Fragment (instead of Activity) from Android 7.1 App Shortcut

邮差的信 提交于 2019-12-05 03:53:43
I have decided to look at adding static shortcuts into an application, using this page as reference: https://developer.android.com/preview/shortcuts.html The XML for my shortcuts currently looks like so: <?xml version="1.0" encoding="utf-8"?> <shortcuts xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"> <shortcut android:shortcutId="id" android:enabled="true" android:icon="@drawable/icon" android:shortcutShortLabel="@string/short_label" android:shortcutLongLabel="@string/long_label" android:shortcutDisabledMessage="@string/disabled

Shortcuts for Nougat version

早过忘川 提交于 2019-12-05 03:15:49
I'm catching this fatal exception when I try to pass an Serializable inside an Intent bundle, and I think is related with the nougat shortcuts that I'm trying to implement. here the exception: 12-16 16:17:32.972 20461-20461/***.****.******.debug E/AndroidRuntime: FATAL EXCEPTION: main Process: ***.****.******.debug, PID: 20461 java.lang.IllegalArgumentException: Bad value in PersistableBundle key=shortcutId value=***.****.******.common.cta.CtaAccountSectionModel@1fb70dc at android.os.PersistableBundle.<init>(PersistableBundle.java:124) at android.os.PersistableBundle.<init>(PersistableBundle

App isn´t installed error when tapping app shortcut in Nougat 7.1.1

若如初见. 提交于 2019-12-04 07:28:30
I´m having some issues when adding an static app shortcut to an existing app. I followed the steps from https://developer.android.com/guide/topics/ui/shortcuts.html and the shortcut shows up, but when I tap it it doesn't launches the activity, instead it shows a toast message saying: " App isn´t installed ". Here is the relevant section of the manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mypackage"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="