I would like to pass an object from an activity to a fragment. I know how to pass the data but do not know which type of bundle i should use?
UPdate
In other words, I have an object of type mqttAndroidClient and that object i want to pass from my activity to a fragment through a bundle. Which bundle type I should use?
you should use something like this :
make your custom class that contains your desired data to be passed and
extendfromSerializableorParcelableand put your object as extra to yourBundleobject and setBundleas an argument to yourFragment.in your
Activityin your
Fragment