android-7.0-nougat

Android 7.0 Doze is it stop all notification?

て烟熏妆下的殇ゞ 提交于 2019-12-08 07:24:28
问题 I am trying to learn Android 7.0 but i see this comment. "When a device is on battery power, and the screen has been off for a certain time, the device enters Doze and applies the first subset of restrictions: It shuts off app network access, and defers jobs and sync" I dont understand exactly. İf it stop network in Doze mode ,how can i get whatsapp or email push message. Is it also restrict all in this mode? Thank you for comment 回答1: Android 7.0 Doze mode does block network access and other

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

∥☆過路亽.° 提交于 2019-12-08 05:13:27
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. 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 Google APIs by default. So, the message shown in the "Recommendation" section when creating an AVD appears

Android N change language programmatically

痞子三分冷 提交于 2019-12-08 01:49:15
问题 I found really weird bug that is reproduced only on Android N devices. In tour of my app there is a possibility to change language. Here is the code that changes it. public void update(Locale locale) { Locale.setDefault(locale); Configuration configuration = res.getConfiguration(); if (BuildUtils.isAtLeast24Api()) { LocaleList localeList = new LocaleList(locale); LocaleList.setDefault(localeList); configuration.setLocales(localeList); configuration.setLocale(locale); } else if (BuildUtils

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

一笑奈何 提交于 2019-12-07 10:06:47
问题 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

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

本小妞迷上赌 提交于 2019-12-07 08:46:06
问题 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

Open PDF on Nougat

喜你入骨 提交于 2019-12-07 04:11:09
问题 I have a file path: file:///storage/emulated/0/Android/data/rocks.v d .*****.develop/files/1Q 2017 financial results.pdf this is code: Intent intent = new Intent(Intent.ACTION_VIEW); try { String newFilePath = filePath.replaceAll("%20", " "); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { intent.setDataAndType(Uri.parse(newFilePath), "application/pdf"); } else { Uri uri = Uri.parse(newFilePath); File file = new File(uri.getPath()); if (file.exists()){ uri = FileProvider.getUriForFile

Getting the path to SD card

为君一笑 提交于 2019-12-06 09:40:34
Please read the whole post before down-voting and/or marking it as a duplicate! I'm working on an app that reads files from within a specific folder on the user's phone - either from the SD card (if there's one) or from the built in storage. Yes, the "READ_EXTERNAL_STORAGE" is mentioned in the manifest and I'm also handling the permission popup for API>23. I used to simply use File folder = new File(Environment.getExternalStorageDirectory(), "myfolder"); to get the path of the folder that is stored in the built in storage (32gb for an S7) but now I want to get the path to the SD card.

Android RunTime exception “Font asset not found” for .woff font files in android nougat

♀尐吖头ヾ 提交于 2019-12-06 09:25:33
I am developing one application, where I need to use .woff fonts. I have written the following code to get font type face from .woff file and set into textview. hellofont = getFont("fonts/AvenirLTStd-Black.woff"); //welcomefont = getFont ( "fonts/AvenirLTStd-Heavy.woff"); thankufont = getFont("fonts/RobotoCondensed-Bold.ttf"); TextView text1 = (TextView) findViewById(R.id.text1id); text1.setTypeface(hellofont); TextView text2 = (TextView) findViewById(R.id.text2id); text2.setTypeface(thankufont); public Typeface getFont( String fontName){ try { Typeface content = Typeface.createFromAsset(this

SipManager.newInstance returns null

好久不见. 提交于 2019-12-06 05:33:48
问题 I implement simple SIP client app for receiving calls. I go through official manual and get code from it. I noticed that SipManager.newInstance(getApplicationContext()); returns null. Documentation says that it happens when SIP API is not supported by device. However I use LG G6 with Android 7.0 and I successfully test third-party SIP clients from Google Play. So I doubt that API is not supported really. How could I check that? My manifest has all permissions ( INTERNET and USE_SIP )

“Connection closed by peer” error occurs in Android 7.0 Nougat while connecting to SHA256 CA installed Windows 2003 Server SP2 through HTTPS

与世无争的帅哥 提交于 2019-12-06 03:02:40
问题 My app communicates with server interface (classic ASP) through HTTPS. It has been workd very well in prior version of Android 7.0 Nougat. (until 6.0) But, Connection closed by peer Error occurs in Android 7.0 phone and AVD(Android virtual device). Server is Windows 2003 Server SP2 (SSL Certificate was updated from SHA1 to SHA256 in Jul 23th, 2016), HTTPS, Classic ASP Server's SSL certificate installation check status of GeoTrust is like below (cryptoreport.geotrust.com/checker/views