Android is passing values with explicit intent safe

1k views Asked by At

Is it secure to pass String between activities via Bundle given that device is not rooted and considered secure? Can other processes like hacker's malware gain access to the data somehow?

1

There are 1 answers

2
Niko Adrianus Yuwono On

There are two types of intent that you can use to exchange data between activities :

  • Explicit Intents : have specified a component (via setComponent(ComponentName) or setClass(Context, Class)), which provides the exact class to be run.
  • Implicit Intents : have not specified a component; instead, they must include enough information for the system to determine which of the available components is best to run for that intent. (e.g. intent-filter)

If you are using Implicit Intent, there is a risk of Intent Spoofing or Intent Interception.