I want to change the language of the app and this works fine until API 26.
For api > 25 I put Locale.setDefault(Locale.Category.DISPLAY, mynewlanglocale);
Locale.setDefault(Locale.Category.DISPLAY, mynewlanglocale);
You need to use getApplicationContext() instead of getContext()
getApplicationContext()
getContext()