-
-
Save sessionm-docs/11046722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.sessionmexamplelifecyclecalls; | |
import com.sessionm.api.SessionM; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.view.Menu; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
SessionM.getInstance().onActivityStart(this); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
SessionM.getInstance().onActivityResume(this); | |
} | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
SessionM.getInstance().onActivityPause(this); | |
} | |
@Override | |
protected void onStop() { | |
super.onStop(); | |
SessionM.getInstance().onActivityStop(this); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
// Inflate the menu; this adds items to the action bar if it is present. | |
getMenuInflater().inflate(R.menu.main, menu); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment