Pick the fix
You need to pass a small Filter object to another Activity. What's the best choice?
Hint 1 of 1
Which one is built for Binder transfer?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Annotate it with @Parcelize and implement Parcelable
Correct. Generated, fast, and made for Intents.
Why not the others?
- B Implement Serializable. It works but is slower and bulkier.
- C Convert it to a JSON string by hand every time. It works but adds code and cost for no benefit here.
- D Put it in a global singleton. It won't survive process death.