yayaa / LocationManager

Simplify getting user's location for Android
807 stars 187 forks source link

change text of "update google play service" dialog #20

Closed masooddalman closed 7 years ago

masooddalman commented 7 years ago

hi at first thank you for your great job. it's awesome.

i run my application and a dialog pop up that say , "update your google play service" with an "update" button.

how to change text of this dialog ?

sorry for my bad English.

yayaa commented 7 years ago

Hey,

I'm afraid you cannot, it is provided by GooglePlayServices Api as

GoogleApiAvailability.getInstance()
                            .getErrorDialog(activity, gpServicesAvailability, 
                                         RequestCode.GOOGLE_PLAY_SERVICES, 
                                         new DialogInterface.OnCancelListener() { ... });
masooddalman commented 7 years ago

thanks a lot. for those how want to change language of this dialog.

 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
// from here 
        String languageToLoad  = "fr"; // your language
        Locale locale = new Locale(languageToLoad);
        Locale.setDefault(locale);
        Configuration config = new Configuration();
        config.locale = locale;
        getBaseContext().getResources().updateConfiguration(config,
                getBaseContext().getResources().getDisplayMetrics());
//to here
        setContentView(R.layout.activity_maps);