Incompatibility with Android #19

Changes made to the java part to be compatible with Android. This pull request fixes #19