Skip to content

Instantly share code, notes, and snippets.

@consp1racy
Created November 23, 2020 17:40
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 consp1racy/6477d13fbdf597d299280cc8788d4e5c to your computer and use it in GitHub Desktop.
Save consp1racy/6477d13fbdf597d299280cc8788d4e5c to your computer and use it in GitHub Desktop.
import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
public class ProcessAwareApplication extends Application {
@Override
public Context getApplicationContext() {
return this;
}
@Override
public void attachBaseContext(@NonNull Context base) {
super.attachBaseContext(base);
onProcessStarted();
}
@CallSuper
protected void onProcessStarted() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment