Android Open Source - ApplicationSessionActivity Main Example Activity Application

From Project

Back to project page ApplicationSessionActivity.


The source code is released under:

Copyright (C) 2012 Apptentive Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the So...

If you think the Android project ApplicationSessionActivity listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//from   w w  w .ja va  2  s .  c  o m
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainExampleActivityApplication extends ApplicationSessionActivity {

  public void onCreate(Bundle savedInstanceState) {

    // Pass a listener in so we can be notified of session starts.
    setOnSessionStartedListener(new SessionStartedListener() {
      public void onSessionStarted() {
        Log.e("ApplicationSessionExample", "Starting session.");

    // Pass a listener in so we can be notified of session stops.
    setOnSessionStoppedListener(new SessionStoppedListener() {
      public void onSessionStopped() {
        Log.e("ApplicationSessionExample", "Stopping session.");

   * Referenced from main.xml
   * @param view
  public void launchChildActivity(View view) {
    Intent intent = new Intent();
    intent.setClass(this, ChildExampleActivityApplication.class);

Java Source Code List