Quite often in Android you need to call a 3rd party Intent or activity.
For example, to scan a barcode using the Barcode Scanner application, or to start the "hidden" Field Test application in HTC phones.
In order to make the life of a user easier, it is a good idea to check if the Intent Receiver/Activity exists before you attempt to invoke it. Some of the reasons being:
For example, to scan a barcode using the Barcode Scanner application, or to start the "hidden" Field Test application in HTC phones.
In order to make the life of a user easier, it is a good idea to check if the Intent Receiver/Activity exists before you attempt to invoke it. Some of the reasons being:
- If a non-existent intent, you application will force close.
- If the intent receiver is not present, you might want to redirect the user to the market to download the necessary application.
- Depending on the existence of an intent you might want to make menu options appear/disappear.