mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-31 14:32:51 +08:00
add platform
This commit is contained in:
parent
60eefc2b5b
commit
7e68e86d21
@ -12,6 +12,7 @@
|
||||
<script type="text/javascript">
|
||||
var onDeviceReady = function(){
|
||||
console.log("Device ready!")
|
||||
console.log("iOS is "+window.plugins.jPushPlugin.isPlatformIOS());
|
||||
initiateUI();
|
||||
}
|
||||
var onTagsWithAlias = function(event){
|
||||
|
@ -2,6 +2,10 @@ cordova.define("cn.jpush.phonegap.JPushPlugin.JPushPlugin", function(require, ex
|
||||
var JPushPlugin = function(){
|
||||
};
|
||||
|
||||
JPushPlugin.prototype.isPlatformIOS = function(){
|
||||
return device.platform == "iPhone" || device.platform == "iPad" || device.platform == "iPod touch" || device.platform == "iOS"
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.error_callback = function(msg){
|
||||
console.log("Javascript Callback Error: " + msg)
|
||||
}
|
||||
@ -14,7 +18,6 @@ JPushPlugin.prototype.call_native = function(name, args, callback){
|
||||
JPushPlugin.prototype.getRegistrationID = function(callback){
|
||||
this.call_native("getRegistrationID",null,callback);
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.startLogPageView = function(data){
|
||||
this.call_native( "startLogPageView",[data],null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user