protected void startActivityForResult(Intent intent, int code) {
        if (fragment != null) {
            fragment.startActivityForResult(intent, code);
        } else if (supportFragment != null) {
            supportFragment.startActivityForResult(intent, code);
        } else {
            activity.startActivityForResult(intent, code);
        }
    }
Start an activity. This method is defined to allow different methods of activity starting for
newer versions of Android and for compatibility library.

@param intent Intent to start.
@param code   Request code for the activity
@see android.app.Activity#startActivityForResult(Intent, int)
@see android.app.Fragment#startActivityForResult(Intent, int)
zxing-android-embedded/src/com/google/zxing/integration/android/IntentIntegrator.java