Implementing new BGS Plugin into my project... reworking some js portions to work as Android Service