New to android programming. Could you please let me know how to pass the view as parameter?
public class MainActivity extends ActionBarActivity {
...
public void stopService(View view) {
stopService(new Intent(getBaseContext(), MyService.class));
}
}
public class MySmsReceiver extends BroadcastReceiver {
...
MainActivity obj = new MainActivity();
obj.stopService();
}
I have coded MyService.java correctly.
Thank you