I need to know code to fix my example below to initiate a method within my activity.
Code:
public void onInit(int status) {
HowDoIStartThisMethodCorrectly?(); <-- because this doesn't start that method.
}
I need a method within my main activity to run when program starts, so I add to onCreate my onInit method, but it’s not working.
Only the code in
onCreate()is guaranteed to run:Or you could do: