I am programming an an android app.
I have a class that extends Application called ApplicationContext
when I make this call it blows up with a class cast execption
ApplicationContext appContext = (ApplicationContext) getApplicationContext();
Does anyone know why this might be happening?
Thanks
I don’t believe Android’s
ApplicationContextclass is even public, I believe it’s an abstract class private to Android SDK classes.Also, you wouldn’t be able to assign a Context to an extended Application class. You’ll have to extend
Context.