Marc Ortiz
Marc Ortiz

Reputation: 2412

Android - Open native android apps from PHONEGAP

Does anyone knows how can I open a native android app from a button in phonegap? I'm creating an Activity that opens your phone apps so I need something to open the apps. Thanks!

Upvotes: 1

Views: 2148

Answers (2)

Simon MacDonald
Simon MacDonald

Reputation: 23273

Well if you want to open any native Android app then you'll need to write a plugin to call the apps Intent.

Although if you just want to open the Dialer app you can do:

<button onclick="document.location='tel:'">Phone</button>

and if can specify a phone number as well:

<button onclick="document.location='tel:411'">Phone</button>

Upvotes: 1

Christian Kuetbach
Christian Kuetbach

Reputation: 16060

Create a plugin, that starts an Intent.

This blog may be a good entry: http://tannerburson.com/blog/2012/05/28/IntentChooser-my-first-PhoneGap-Cordova-plugin/

Upvotes: 2

Related Questions