protected void startActivityForResult ( Intent intent , int code ) { if ( fragment == null ) { activity . startActivityForResult ( intent , code ) ; } else { fragment . 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 .