Need your help!
How do I in my application to call the function only once when opening?
I do:
private boolean is_first = true;
@Override
public void onCreate(Bundle savedInstanceState) {
if ( is_first ) {
MyFirstFunction();
}
}
public void onResume(Bundle savedInstanceState) {
super.onResume();
is_first = false;
}
Also in the manifest file added to the activity android:configChanges="orientation" but still function when you turn the device restarts
I hope for your help!
you can use Application class to do that in the
onCreatemethod you can call your functionthen add this class to the manifest