Answer the question
In order to leave comments, you need to log in
Push notifications in build.phonegap. what and how?
You need to add Push notifications to the androyd project on build.phonegap
went through all the registration in Google
made this page for the test
<html>
<meta charset="UTF-8" />
<head>
<title>Push</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" charset="utf-8" src="cordova.js"> </script>
<script type="text/javascript" src="PushNotification.js"> </script>
<script type="text/javascript">
var pushNotification;
function onDeviceReady()
{
pushNotification = window.plugins.pushNotification;
pushNotification.register(successHandler, errorHandler, {"senderID":"856966176914","ecb":"onNotification"});
function successHandler (result) {alert('s= '+result);};
function errorHandler (error) {alert('e= '+error);};
function onNotification(e) {
alert(e.event+' - '+ e.regid);
};
};
document.addEventListener("deviceready", onDeviceReady, false);
</script>
</head>
<body>
PUSH
</body>
</html>
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0"
id="com.simplecall.example"
version="1.0.1" >
<name>PUSH</name>
<description>PUSH</description>
<gap:plugin name="com.phonegap.plugins.pushplugin" version="2.4.0" />
<preference name="permissions" value="none"/>
</widget>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question