Android aviary converting to fragment

77 views Asked by At

How Can I convert the code below so it can work in Fragment.

@Override
protected void onResume() {
    Log.i( LOG_TAG, "onResume" );
    super.onResume();

    if ( getIntent() != null ) {
        handleIntent( getIntent() );
        setIntent( new Intent() );
    }
}

I have tried this. but It doesn't worked.

public void onResume() {
    Log.i( LOG_TAG, "onResume" );
    super.onResume();

    if ( getActivity().getIntent() != null ) {
        handleIntent( getActivity().getIntent() );
        getActivity().setIntent( new Intent() );
    }
}
0

There are 0 answers