Is there any disadvantage in transferring values from Activity A
to Activity B
with static fields of a third class instead of the ExtraBundle
?
In my application, sometimes I have like 15 - 20 values that I need to transfer between two Activity
s. In my oppinion, it is more lucid solving this with static fields from a sort of TransferHandler
.
At the moment, I have one disadvantage in mind: When a value is not put into the Extras
before starting Activity
B, I will get an Exception
. Solving it with static fields, it it possible that I forget to assign a value, and if that value was assigned before from somewhere else, it might be that a wrong value is used in Activity
B. Nonetheless, I think this is a "programmer problem" and not a "program problem". So are there any further minusses or am I free to choice a way? How's with the performance of the two variants?