Reputation: 2412
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
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
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