Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change the language of runtime permission

How to change the language of runtime permissions in android?

When I'm trying to change the language using

Configuration config = getBaseContext().getResources().getConfiguration();
        locale = new Locale(lang);
        Locale.setDefault(locale);
        Configuration conf = new Configuration(config);
        conf.locale = locale;
        getBaseContext().getResources().updateConfiguration(conf, getBaseContext().getResources().getDisplayMetrics());

It changes the application language but the permissions for camera such dialogs showing in english only.

Is there any way to change the permission dialog language?

like image 633
krishna chaitanya Avatar asked Mar 16 '16 11:03

krishna chaitanya


People also ask

How do I change the language of runtime app?

On Android, there is no official support, documentation or API to change an entire app's language at runtime. When a user opens an app, the resource framework automatically selects the resources that best match the device language settings.

What is run time permission in Android?

Runtime permissions prevent apps from gaining access to private data without a user's consent, and provide them with additional context and visibility into the types of permissions that applications are either seeking, or have been granted.


1 Answers

Is there any way to change the permission dialog language?

Have the user change their device language.

At most, your approach will change the language used by your app's process (though that may change on Android N). Any system-supplied UI, such as the permission dialog, will use the language chosen by the user for their device.

like image 134
CommonsWare Avatar answered Oct 23 '22 05:10

CommonsWare