Moved the android related js code to extensions.js

Added the android related js extensions to a separated javascript
file. This way the code is more platform agnostic.