Client is not authorized when changing my phone language from english to arabic

0 votes
when I run my application on my phone in english it works perfectly and I get connected to server But when I switch to arabic it to arabic it gives me this message: {"app42Fault":{httpErrorCode":401,"appErrorCode":1401,"message":"UnAutorized Access","dtails":"Client is not authorized"}} time and apikey and secretKey are correct and the userName, passord, email are saved in preferences xml file Itried to use Base64 but the problem persist Thank you in advance
asked Jun 5, 2016 in Android by nacerbmn (10 points)

1 Answer

0 votes
Hi Nacer,

Greetings!!!!!!!!!!

Will you please share more details about the API, you are using for create User. Also let me know are you using same language through the application to pass the API parameter values.

Let me know the details so that I can help you in better manner.

Thanks

Vishnu Garg
answered Jun 6, 2016 by Vishnu Garg (674 points)
Hi Vishnu

Thank you for your answer
Finally I found the answer by changing Locale configuration in android
the problem was on numbers format
MiddleEast numbers format are not accepted in App42 clouds
this code solved my problem:

String languageToLoad  = "ar"; // your language
        String current = Locale.getDefault().toString();
        if(current.charAt(0) == 'a' && current.charAt(1) == 'r'){
            Locale locale = new Locale(languageToLoad, "TN");
            Locale.setDefault(locale);
            Configuration config = new Configuration();
            config.locale = locale;
            getBaseContext().getResources().updateConfiguration(config,
                    getBaseContext().getResources().getDisplayMetrics());
        }
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...