-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I have installed cordova 3.4 and build my project.
Here are my steps:
1.npm install -gd cordova
2.cordova create myapp
3.cd myapp
4.cordova platform add android
5.cordova plugin add https://github.com/InQBarna/WebIntent.git
and then edit my file index.js to add follow these codes:
var app = {
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
app.receivedEvent('deviceready');
},
receivedEvent: function(id) {
var parentElement = document.getElementById(id);
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id);
document.onclick=function(){
alert(new Date);
CDV.WEBINTENT.startActivity({
action: CDV.WEBINTENT.ACTION_VIEW,
url: 'geo:0,0?q=' + 'new york'},
},
function() {},
function() {alert('Failed to open URL via Android Intent')};
);
}
}
};
6.cordova run android
but my device always stop in "connecting to device" status.
I dont know how to make it work. Is it a issue?
Metadata
Metadata
Assignees
Labels
No labels