Closed gadgetreviews closed 1 year ago
I found that this problem occurs when device's language is Turkish. Maybe another language would effect. I tested with English and French. There was no problem with English and French. But I didn't test it with other languages.
The problem was with No enum constant com.vk.api.sdk.auth.VKScope.EMAİL
Is should be No enum constant com.vk.api.sdk.auth.VKScope.EMAIL
or No enum constant com.vk.api.sdk.auth.VKScope.email
. But when language was Turkish EMAIL transform to EMAİL. And this causes exception. Any idea how to solve this?
Thanks
does EMAIL
at com.vk.api.sdk.auth.VKScope.EMAIL
have to be uppercase?
There are 2 different i and I letters in Turkish. One with dot and one without dot. And this causes problem when transposing uppercase:
In Turkish: lower case i's capital is İ (with dot) lower case ı's capital is I (without dot)
English rule uppercase function should be used when converting email to uppercase.
in MethodCallHandler.kt file
val scope = VKScope.valueOf(item.uppercase(Locale.getDefault()))
uppercase function takes Locale.getDefault() parameter. I don't know kotlin good enough. But is it possible to call this uppercase without locale or with English locale?
I removed Locale.getDefault() parameter and it worked. I created a PR.
I have a problem. When I run in debug mode with emulator, vk login works fine. But when I build a release build apk and run it on a real device I get following error at this code. res.isError is false and res.isValue is false: And error message instantly happens, there is no delay. I guess it does not communicate with vk servers.