Code example for DialogFragment

Methods: getActivity, onStart

0
        return builder.create();
    } 
 
    @Override 
    public void onStart() { 
        super.onStart(); 
        EasyTracker.getInstance().setContext(getActivity());
        EasyTracker.getTracker().sendView(getClass().getSimpleName());
    } 
 
    private void launchAppSettings(String app) {
        Intent intent = new Intent();
        intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
        intent.setData(Uri.fromParts("package", app, null));
        startActivity(intent);
    } 
 
}