Fix casting android application to base interface

Some app instances were not being cast correctly,
causing a crash when using android fragments.
Merge pull request #1365 from andzdroid/master

Fix casting android application to base interface