I am creating a module that extends from another class but i need to use getBaseContext(). how can I use it in my own module? If I have to run the activity then how to do that if not how to solve the problem thanks
public class TelcoModule extends KrollModule
{
...
// Methods
@Kroll.method
public String GetTelco()
{
TelephonyManager tm =(TelephonyManager)getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
String operatorName = tm.getNetworkOperatorName();
return operatorName ;
}
}
Context mContext;public TelcoModule(Context context) {mContext =context;// use mContext..}
. pass likenew TelcoModule(ActivityName.this)
– Boswell