Skip to content

Instantly share code, notes, and snippets.

@deRonbrown
Created January 15, 2015 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deRonbrown/d392418360b7c80fa57a to your computer and use it in GitHub Desktop.
Save deRonbrown/d392418360b7c80fa57a to your computer and use it in GitHub Desktop.
package com.example;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class ExampleActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// parse intent for tracking info
trackStuff(getIntent());
// Launch main activity and finish
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(getPackageName());
startActivity(launchIntent);
finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment