How can I call an external application from my application?
E.g: I need to call Shazam
(application) from my app.
I can see the package name of the application in the logcat
.
will that be useful for any purpose?
How can I call an external application from my application?
E.g: I need to call Shazam
(application) from my app.
I can see the package name of the application in the logcat
.
will that be useful for any purpose?
Specifically for Shazam, the following code works:
START_TAGGING
is the intent which is issued when you tap the Shazam widget.Create the Application's launcher intent object and say startActivity.
You can call a third party application's activity in the following way.
But, this is not a great way to go about it. In case the package name changes (which is a very remote possibility) or the activity name changes (
Splash
could change to something else) your application would break. If Shazam has an Intent which can be invoked to start listening to a song use that (not sure if they have one).Also, do necessary check in case Shazam is not installed so that your call doesn't crash.