I have a class which already inherits another class. Now from within this class, I want to start an activity, which needs activity class to be inherited. Which is not possible since my class has already inherited one.
In this situation, whats the best way to start an activity?
Some suggested me to use getBaseContext() method, but its saying “getBaseContext can not be resolved”. Could anyone suggest a way…?
create a constructor for this class which takes Activity Instance as arguement.. and if u r creating object of this class in an activity.. pass its instance and then use that to get Context… or u can just say
if its a reciever then its very easy.. reciever gets a context object in its onRecieve method.. which u can use like this