Find out how to management display brightness stage via your {custom} Android App? – Full supply code

This video exhibits the steps to jot down your code to manage and set the brightness stage of your cellphone display via your {custom} Android App. The brightness stage of your cellphone display is an integer between zero and 255.

For any question, solutions or appreciations, we can be glad to listen to from you at:

Supply Code:

bundle com.instance.mybrightnesscontrol;

import android.content material.ContentResolver;
import android.content material.Intent;
import android.internet.Uri;
import android.os.Bundle;
import android.supplier.Settings;
import android.view.View;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
non-public EditText editText;

protected void onCreate(Bundle savedInstanceState) {

Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
intent.setData(Uri.parse(“bundle:” + this.getPackageName()));
editText = findViewById(;

public void setButton(View view){
ContentResolver contentResolver = this.getApplicationContext().getContentResolver();
Settings.System.putInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS, Integer.parseInt(editText.getText().toString()));