According to the Android docs Intent extra name must have a package prefix. I’ve been using Intent extra names without prefixes for a long time and it seems like there is no chance of collision since what really matters is the Intent action being unique. So are the docs just wrong or am I missing something?
The docs for putExtra say:
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like “com.android.contacts.ShowAll”.
I believe the Android docs recommend using fully-qualified extras is to handle an uncommon edge case. The edge case is when you are:
AND
Phew, it all sounds very unlikely. If you aren’t handling public Intent actions then it still seems as though there is no need to fully-qualify your extras, but I guess it doesn’t hurt to do it all the time if you are the paranoid type.