Is BASE64 in all Android versions supported?

BASE64 results not consequent on all Android versions.
Trying to use BASE64 calculations (decode) I found out that a Samsung S5 with Android 6.0.1 (companion and APK) gives errors while a Samsung A6 tablet with Android 8.0.1 does the work.
To be sure after the first errors that the problem was not because of malfunctioning of the S5, I did a complete factory reset of the Samsung S5. Still the same errors occur.
I tested different extensions to decode BASE64 but they give this error. The Kodular internal BASE64 calculations (code and decode) of the security package is working on all tested platforms, but some extensions use their own BASE64 calculations which I cannot change.

Results are fine in Android 8


Results in Android 5 are different

Base64 was added in API level 8 (Android 2.2.x) as developer docs say:
Base64  |  Android Developers

There are many APIs for Base64. Those which are failing are from Java Standard Library, which were added later into the Android platform

1 Like

Thanks for this information.

Then it should work Fahad, because I tested it on Android 5.0 and Android 8.0. Only 8.0 works.

Unbenannt
what is the correct Do it result in Android 8?
Taifun

Do It Result: YWJjZA== (TaifunTools Base64 Encode on Android 8)

which means, the TaifunTools.Base64Encode method provides the same value in Android 8 and 5
see again the screenshot


Taifun

I corrected the original text because it was not clear enough. TaifunTools extension EncodeBase64 function works on both Android 5 and 8.

thank you for confirming, that my extension provides the correct results… :sweat_smile:
Taifun