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

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

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

Html.fromHtml deprecated in Android N

update: as @Andy mentioned below Google has created HtmlCompat which can be used instead of the method below. Add this dependency implementation ‘androidx.core:core:1.0.1 to the build.gradle file of your app. Make sure you use the latest version of androidx.core:core. This allows you to use: HtmlCompat.fromHtml(html, HtmlCompat.FROM_HTML_MODE_LEGACY); You can read more about the different flags on … Read more

android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData()

If your targetSdkVersion >= 24, then we have to use FileProvider class to give access to the particular file or folder to make them accessible for other apps. We create our own class inheriting FileProvider in order to make sure our FileProvider doesn’t conflict with FileProviders declared in imported dependencies as described here. Steps to … Read more