android-7.0-nougat

Android S8+ warning message “does not support the current Display size setting and may behave unexpectedly”

纵然是瞬间 提交于 2019-12-05 20:03:49
I have this warning message in Samsung S8+ Android 7: APP_NAME does not support the current Display size setting and may behave unexpectedly. What it means and how can I remove it? Thank you Solved by adding in supports-screens android:xlargeScreens="true" and removing: android:requiresSmallestWidthDp="600" So you need to create different folders and maintain all xml in those folders. The following is a list of resource directories in an application that provides different layout designs for different screen sizes and different bitmap drawables for medium, high, and extra high density screens.

How to change view for multiple window display in Android N? How to check application is in multiwindow or not?

十年热恋 提交于 2019-12-05 19:57:19
How can we give separate layout or separate activity for Multiple window ? eg. I have checked below things with help of android developer site <activity android:name="com.configure.it.MyScreen"> <layout android:defaultHeight="400dp" android:defaultWidth="200dp" android:gravity="top|end" android:minimalSize="300dp" /> </activity> by declaring above things it affect how an activity behaves in multi-window mode. But how can I show different layout if my particular screen is activated on Multiple-Window ? From the Android Developer link . To make changes in UI or separate layout which should be

Android Speech Recognition API does not work in Android 7 Nougat

拜拜、爱过 提交于 2019-12-05 14:07:51
问题 I am using the android.speech.SpeechRecognizer API for speech. I works great in Android 4-5, In Android 6 it now has a bunch of bugs, like the chime that occurs when the mic turns on is detected as speech, so it exists (and loops indefinitely when it restarts because to speech was detected, we have a hack workaround for this that sets the volume to 0 before the chime is played...) In Android 6 the speech also dies with no error or anything after 5 seconds. We have another hack workaround for

Android 7.0 Nougat picks up default strings when device language is en_US

吃可爱长大的小学妹 提交于 2019-12-05 12:32:36
As per the documentation in Language and Locale there have been improvements to Resource-Resolution Strategy from Android 7.0(API level 24) which is easy to understand with the following table: Improved Resource-Resolution strategy As per my requirements, I want my app's default langauge to be en_US. So, I am not providing separate resources for en_US. I also have en_GB resources present separately. Now, as per the resolution strategy, if my device's language is en_US then the order in which it should look for resources is en_US -> en -> en_GB -> default which means for all locales of en, in

PagerTabStrip not showing in ViewPager in app targeting Android 6.X (N)

随声附和 提交于 2019-12-05 12:20:03
I have an existing app that makes use of ViewPager and PagerTabStrip and this has been working for a long time with various releases of the Android SDK and the com.android.support:appcompat-v7 library. I've just bumped up the compile and target SDK versions of my app from 23 to 24 and the com.android.support:appcompat-v7 library version from 23.4.0 to 24.0.0 ... and I now see that the PagerTabStrip is totally missing from the ViewPager . (Not just missing titles in the PagerTabStrip ... the PagerTabStrip is totally missing from the ViewPager when the views are rendered.) This is how I'm

android 7.0 Notification icon appearing white square

假如想象 提交于 2019-12-05 07:59:54
I am using the below snippet to generate notifications in my android app. private void sendNotification(String contentText, String message) { Intent resultIntent = new Intent(this, MainActivity.class); resultIntent.putExtra("clear","clear"); resultIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); PendingIntent piResult = PendingIntent.getActivity(this, 0, resultIntent,0); NotificationCompat.Builder builder=new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.icon) .setColor(ContextCompat.getColor(getApplicationContext(),R.color.red)) .setContentTitle(

Android Wear: Google Play services out of date. Requires 9256000 but found 8701534

♀尐吖头ヾ 提交于 2019-12-05 05:08:13
问题 I can't get my Android Wear app to work. Every time it tries to open something on the phone I keep getting this error in the logcat: W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534 Nothing should be wrong with my application, because it worked before. It stopped working when I did a factory reset on my LG G Watch. I checked the Google Play version codes on the watch with an app, and it is (as the logcat tells) 8701534 . (Why isn't it updating?)

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

Android 7 nougat, how to get the file path from uri of incoming intent?

左心房为你撑大大i 提交于 2019-12-05 01:45:26
问题 FileProvider:- Setting up file sharing I know that change the file policy in android nougat. The wanted app that file share to other apps generate the uri by FileProvider. The uri format is content://com.example.myapp.fileprovider/myimages/default_image.jpg . I want know that how can I get filepath from the uri that generate by FileProvider.getUriForFile() . because the my app is need to know the physical filepath in order to save, load, readinfo, etc. is it possible [In short] My app

Java 8 Stream API in Android N

送分小仙女□ 提交于 2019-12-05 01:14:09
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 SDK? It's not yet in the current preview, but it has already been merged into the AOSP Git master. See