I am just building a very simple application. Three buttons. The first opens a browser, the second opens the phone and the third opens the Maps application. The purpose is to learn more about intents triggering the start up of other applications.
public void openBrowser(){
//Create intent
Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://www.facebook.com"));
startActivity(i);
}
public void openPhone(){
Intent i = new Intent(android.content.Intent.ACTION_DIAL, Uri.parse("tel: +3531234567890"));
startActivity(i);
}
public void openMap(){
Intent i = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:53.2803, -6.1529"));
startActivity(i);
}
Should there be an entry in the manifest file for these particular intents? Thanks for the help!
No you don’t need ManifestEntrys for built-in Intents.
What you may need are permissions:
An Activity (especially if it is not your own) may require you to have permissions to call this functionallity. A Barcode-scan App (i.e. BarcodeScanner from the XZing Team) which you can call via an Intent for the resultString inside a Barcode may require, that the caller has the Permission
CAMERA. If you want to pick a Contact from the default Android Contact App, it will require you to have theREAD_CONTACTSPermission. Otherwise it could be considered as kind of local exploit, if an App with no Permission is able to read Contacts via the Contacts-App – which of course – has this permission.