I want to start one of my existing activities and force the activity to call a specific method after it starts. Is this possible?
Can I define a method that should b
No, I don't think you can have something like this:
Intent intent = new Intent(this, com.app.max.Home.class.method);
but you can do this:
Intent intent = new Intent(this, com.app.max.Home.class);
intent.putExtra("methodName","myMethod");
startActivity(intent);
and then in the called activity (where you need to start the method), you can take the intent and decide which method to call like this:
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if(intent.getStringExtra("methodName").equals("myMethod")){
mymethod();
}
}