Example usage for android.support.v4.app AppLaunchChecker onActivityCreate

List of usage examples for android.support.v4.app AppLaunchChecker onActivityCreate

Introduction

In this page you can find the example usage for android.support.v4.app AppLaunchChecker onActivityCreate.

Prototype

public static void onActivityCreate(Activity activity) 

Source Link

Document

Records the parameters of an activity's launch for later use by the other methods available on this class.

Usage

From source file:com.asy.applaunchcheckersample.AppLaunchCheckerActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_app_launch_checker);

    tvAppState = (TextView) findViewById(R.id.tv_app_state);

    if (AppLaunchChecker.hasStartedFromLauncher(this)) {

        tvAppState.setText(R.string.app_started_from_launcher);

    } else {//from  www.j  a  va 2 s  .  c  o  m

        tvAppState.setText(R.string.app_not_started_from_launcher);

    }

    AppLaunchChecker.onActivityCreate(this);

}