Job Scheduler not running on Android N

In Android Nougat the setPeriodic(long intervalMillis) method call makes use of setPeriodic (long intervalMillis, long flexMillis) to schedule periodic jobs. As per the documentation: JobInfo.Builder setPeriodic (long intervalMillis, long flexMillis) Specify that this job should recur with the provided interval and flex. The job can execute at any time in a window of flex length … 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

How to get charles proxy work with Android 7 nougat?

The solution is do not use .p12, just navigate with Chrome (with configured proxy on wifi) to http://charlesproxy.com/getssl and install downloaded .pem file. I had exactly the same problem on my Nexus 5X running Android 7.0. There was previously exported .p12 from Charles 3.11.5 (Help->SSL Proxying->Export Charles Root certificate and Private key). When I tried … Read more

Detect CONNECTIVITY CHANGE in Android 7 and above when app is killed/in background

Nougat and Above: We have to use JobScheduler and JobService for Connection Changes. All I can divide this into three steps. Register JobScheduler inside activity. Also, Start JobService( Service to handle callbacks from the JobScheduler. Requests scheduled with the JobScheduler ultimately land on this service’s “onStartJob” method.) public class NetworkConnectionActivity extends AppCompatActivity { @Override protected … 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

Android N requires the IDE to be running with Java 1.8 or later?

I got the same error you describe but on OS X. I know this may not solve your problem (because I don’t know the equivalent for Windows), but since this is not OS specific I am leaving the solution for any OS X fellow out there. Edit the file /Applications/Android\ Studio.app/Contents/Info.plist, and remove the 1.6 … 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

“Canvas: trying to draw too large bitmap” when Android N Display Size set larger than Small

I my case, moving the (hi-res) splash bitmap from drawable to drawable-xxhdpi was the solution. I had the same problem. I didn’t suspect my splash screen to be the problem, since it is displayed when the app is started, but it turned out the splash screen is the problem. The splash screen in my case … Read more

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

tech