Ad

Access Intent To Subtitles

- 1 answer

I'm trying to access the subtitle settings, so I can change them.

But I'm not managing to find a way to access these settings.

Some advice?

Ad

Answer

You can use an Intent object like this to open Caption Settings:

NOTE: Minimum API level is 19

Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS);
startActivity(intent);

For example, if you have a button to open Caption Settings on click.

Button button = (Button) findViewById(R.id.btn);

    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS);
            startActivity(intent);
        }
    });

You can return by pressing back button on device.

Ad
source: stackoverflow.com
Ad