How To Grant Write Settings Permission In Android

When you write an android app, you sometimes may need to change system settings. For example, change the android device screen brightness. But such action needs your app to have android.permission.WRITE_SETTINGS permission, otherwise you may encounter the exception with the message java.lang.SecurityException: com.dev2qa.example was not granted this permission: android.permission.WRITE_SETTINGS.

How To Grant Write Settings Permission In Android Read More »

Android Fragment Save / Retrieve Instance State Example

The android activity provides a method to save/retrieve instance state data. Please read the article Android Save Retrieve Activity Instance State Example to learn more. The fragment also provides a method for you to save/retrieve related instance state data. This article will show you an example of how to save/retrieve instance state data in android

Android Fragment Save / Retrieve Instance State Example Read More »