I have custom Application class in my Android project that is properly described in manifest and actually works.
But one small question: do I really need to call in this way methods implemented in my App class:
((App) getApplication()).callSomeMethod();
because IDEA doesn’t allow me to run application:
cannot find symbol method callSomeMethod()
or I can avoid it?
Thanks in advance!
You must typecast the result from
getApplication()to your subclass. This isn’t anything Android specific, but rather, how the Java language works.