May I ask what the difference between these two methods to start an intent is?
StartActivity seems to be able to start intents in other processes, so they look similar to me.
There are three types of intents. Intents that start activities, intents that start services and intents that are intercepted by broadcast receivers. Depending on the target, you should use the correct "sending" method.
There are three types of intents. Intents that start activities, intents that start services and intents that are intercepted by broadcast receivers. Depending on the target, you should use the correct "sending" method.
I see.
I used to think that StartActivity also broadcasts the intent and the OS checks for each intent filter and activates the (first) activity it finds.
However, that was wrong and StartActivity only sends the intent to the correct package/application activity and does not broadcast for everyone to listen.
SendBroadcastIntent on the other hand broadcasts the intent for any/all apps to see therefore sensitive information should not be broadcast.
That is not 100% accurate. You can use StartActivity to start an unknown app. Only if you call Intent.SetComponent, you explicitly set the app that will handle the intent (when you call StartActivity with one of your activities then the component is also set).