Migrated from Phonegap to Android native Java