Correctly set minimum Android API requirement to 16, as code uses field introduced in version 16
Improved error logging

Simplifies debugging and extending the code
Report (unlikely) encoding exception
Fix Entry implements Comparable but not equals

Would result in errors if Entry objects are put in a (Sorted) Set.
Must implement hashCode() when implementing equals().
Both methods auto-generated by Android Studio.
Avoid comparing strings by reference value

String contents should be compared by contents.
The current code compared the object references instead and likely worked because of the JVM/Dalvik String cache.
Use isEmpty() for readability.