I'm an Android newbie so I apologize if this is a dumb question . . .
Intents are essentially messaging objects that can be used to activate 3 kinds of components: Activities, Services or Applications.
Especially with regard to Activities, are intents always the preferred way to activate an Activity, despite the overhead of constructing an intent object and using the overhead of the built-in Android OS for passing it?
If the Activity in question is known by the programmer to be the only legitimate one to perform a particular activity is it ever acceptable to invoke it by some more direct means such as a direct invocation via a method call?
Thanks in advance.
despite the overhead of constructing an intent object and using the overhead of the built-in Android OS for passing it?
The intent object is pretty simple, it is the last thing you should worry about when you think for "overhead"
direct invocation via a method call?
It just won't work out, Android is a framework it is not just a pile of classes, it is like trying to use the constructor of an Activity.
But why do you have something against the Intents, why you decided that they should be "workaround" , and not the Toast.makeText or whatever ?
To my knowledge, and somebody please correct me if I am wrong here, the only way to start another Activity is by using an Intent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With