I need to pass a list of cookies from开发者_如何学Go one activity to the other using an Intent
. How would one go about achieving this?
Thanks.
Using Intent.putExtra(String name, String[] value)
would be the easiest way to pass a list of cookies. There are other putExtra signatures as well, depending on how you currently have your list implemented. On the other side, you would use getExtras()
to get values. If for some reason, you had a more complex setup, you could create a Cookie
class which extends Parcelable
.
Just pass it along in the setExtra()
method of the Intent
class.
Hope it helped, JQCorreia
精彩评论