I have a base64 encoded string and inserting it in a hashmap but the value stored in the hashmap is just 10% of the base64 string. While debugging, I can confirm that the string has the entire value. Only when I 'put' the string in the hashmap it stores only 10% of it.
Hashmap<String, String> hashmap = new Hashmap<>();
String base64 = bitmapToString(mBitmap); // function is working properly and Im getting the entire string.
hashmap.put("image", base64); // Storing just 1005 characters for every image
Is there any limit to hashmap values? Its always storing strings not more than 1005 characters. FYI this code is used in an IntentService
It was a limitation(?) of the Android Studio debugger where it only shows around 1000 characters when viewing all keys and values but if you expand an element in the hashmap then it displays the whole string. It was complacency from my part and I thank @assylias for his advice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With