我很沮丧OnStart运行了两次,我不知道为什么

时间:2019-07-26 21:18:27

标签: android firebase firebase-realtime-database onstart

@Override
    public void onStart() {
        super.onStart();
        if(bundle != null){

            if(!bundle.containsKey(Constants.EXTRA_RECIPE_KEY) && !bundle.containsKey(Constants.EXTRA_RECIPE_CREATOR_ID)){

                Log.i(TAG, "onStart: bundle does not contain the recipe key and recipe creator id.");

            }else{
                String RECIPE_CREATOR_ID = bundle.getString(Constants.EXTRA_RECIPE_CREATOR_ID);
                String RECIPE_KEY = bundle.getString(Constants.EXTRA_RECIPE_KEY);
                mRecipeKey = RECIPE_KEY;
                mRecipeCreatorId = RECIPE_CREATOR_ID;
                Log.i(TAG, "RecieveRecipeCreatorId: Creator Key = " + mRecipeCreatorId);
                Log.i(TAG, "RecieveRecipeKey: Recipe Key = " + mRecipeKey);
                SetDetailsForIncomingRecipe();
            }

        }else{
            Log.i(TAG, "onStart: bundle is null");
        }


    }

enter image description here

0 个答案:

没有答案