I've seen this done in Java from this SO response ...
# android
r