Code example for FragmentActivity

Methods: onActivityResult

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        JREngage.logd(TAG, "requestCode: " + requestCode + " resultCode: " + resultCode);
        super.onActivityResult(requestCode, resultCode, data);
        /* Sometimes this activity starts an activity by proxy for its fragment, in that case we 
         * delegate the result to the fragment here. 
        if (requestCode <= 1<<16) mUiFragment.onActivityResult(requestCode, resultCode, data);
        /* However, the Fragment API munges activityForResult invocations from fragments by bitshifting 
         * the request code up two bytes. This method doesn't handle such request codes; they dispatch 
         * by the Fragment API path. 
    public boolean onKeyDown(int keyCode, KeyEvent event)  {
        if (AndroidUtils.isCupcake() && keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
            // Take care of calling this method on earlier versions of 
Contextual code suggestions in your IDE  Get Codota for Java