In Android 7 (API level 24) my app is not allowed to mute phone (set ringer mode to silent)

Thanks for your answers, here is a little more detail. To be able to set ringer mode to silent, you must ask permission to access notification policy (like @ucsunil said). <uses-permission android:name=”android.permission.ACCESS_NOTIFICATION_POLICY” /> Then, check if you have this permission. If you do not, open the settings for “Do Not Disturb access” for your app: … Read more

Android N change language programmatically

Ok. Finally i managed to find a solution. First you should know that in 25 API Resources.updateConfiguration(…) is deprecated. So instead you can do something like this: 1) You need to create your own ContextWrapper that will override all configuration params in baseContext. For example this is mine ContextWrapper that changes Locale correctly. Pay attention … Read more

SSLHandshakeException: Handshake failed on Android N/7.0

This is a known regression in Android 7.0, acknowledged by Google and fixed sometime before the release of Android 7.1.1. Here is the bug report: https://code.google.com/p/android/issues/detail?id=224438. To be clear, the bug here is that 7.0 only supports ONE elliptic curve: prime256v1 aka secp256r1 aka NIST P-256, as Cornelis points out in the question. So if … Read more

Unable to resume activity with java.lang.IllegalArgumentException on Android api >=24

catch (Exception e) { if (!mInstrumentation.onException(r.activity, e)) { throw new RuntimeException( “Unable to resume activity ” + r.intent.getComponent().toShortString() + “: ” + e.toString(), e); } } it’s a chained exeption so inspect e.getCause() stacktrace -> till cause will be null if you’ll not find it look at the method in activity thread which invokes try … Read more

Expand/Collapse Lollipop toolbar animation (Telegram app)

Edit : Since the release of the Android Design support library, there’s an easier solution. Check joaquin’s answer — Here’s how I did it, there probably are many other solutions but this one worked for me. First of all, you have to use a Toolbar with a transparent background. The expanding & collapsing Toolbar is … Read more

Android – WebView language changes abruptly on Android 7.0 and above

Ted Hopp’s answer managed to solve the problem, but he didn’t address the question of why this occurs. The reason is the changes made to the WebView class and its support package in Android 7.0. Background: Android’s WebView is built using WebKit. While it was originally a part of AOSP, from KitKat onwards a decision … Read more

Android install apk with Intent.VIEW_ACTION not working with File provider

After a lot of trying I have been able to solve this by creating different Intents for anything lower than Nougat as using the FileProvider to create an install intent with Android Versions before Nougat causes the error: ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.INSTALL_PACKAGE dat=content://XXX.apk flg=0x1 } While using a normal Uri … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)