Fix casting android application to base interface

Some app instances were not being cast correctly,
causing a crash when using android fragments.