Theres three different scenerios for obtaining a Bundle.
If you want to use Bundle arguments to initialize your fragment, you have to use
myfragment.setArguments(mybundle);when you first create your fragment.If you want your fragment to use the intent that was passed to the activity you can call:
getActivity().getIntent()
If you want only your fragment to intercept an intent then you have to register your fragment using the LocalBroadcastManager.
Read full article from android - Send/get intent extras in fragment class - Stack Overflow
No comments:
Post a Comment