mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-07 19:32:51 +08:00
spelling mistakes
This commit is contained in:
parent
1af99fe4bf
commit
213e5b7bb1
@ -37,7 +37,7 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
"setCustomPushNotificationBuilder",
|
"setCustomPushNotificationBuilder",
|
||||||
"setPushTime",
|
"setPushTime",
|
||||||
"init",
|
"init",
|
||||||
"setDebugable",
|
"setDebugMode",
|
||||||
"stopPush",
|
"stopPush",
|
||||||
"resumePush",
|
"resumePush",
|
||||||
"isPushStopped",
|
"isPushStopped",
|
||||||
@ -143,7 +143,7 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
callbackContext.success();
|
callbackContext.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDebugable(JSONArray data, CallbackContext callbackContext) {
|
void setDebugMode(JSONArray data, CallbackContext callbackContext) {
|
||||||
String mode;
|
String mode;
|
||||||
try {
|
try {
|
||||||
mode = data.getString(0);
|
mode = data.getString(0);
|
||||||
@ -173,8 +173,8 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
|
|
||||||
void isPushStopped(JSONArray data,
|
void isPushStopped(JSONArray data,
|
||||||
CallbackContext callbackContext){
|
CallbackContext callbackContext){
|
||||||
boolean isStoped =JPushInterface.isPushStopped(this.cordova.getActivity().getApplicationContext());
|
boolean isStopped =JPushInterface.isPushStopped(this.cordova.getActivity().getApplicationContext());
|
||||||
if(isStoped){
|
if(isStopped){
|
||||||
callbackContext.success(1);
|
callbackContext.success(1);
|
||||||
}else{
|
}else{
|
||||||
callbackContext.success(0);
|
callbackContext.success(0);
|
||||||
@ -200,13 +200,13 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
void setPushTime(JSONArray data,
|
void setPushTime(JSONArray data,
|
||||||
CallbackContext callbackContext){
|
CallbackContext callbackContext){
|
||||||
Set<Integer> days = new HashSet<Integer>();
|
Set<Integer> days = new HashSet<Integer>();
|
||||||
JSONArray dayArr;
|
JSONArray dayArray;
|
||||||
int startHour = -1;
|
int startHour = -1;
|
||||||
int endHour = -1;
|
int endHour = -1;
|
||||||
try {
|
try {
|
||||||
dayArr = data.getJSONArray(0);
|
dayArray = data.getJSONArray(0);
|
||||||
for (int i = 0; i < dayArr.length(); i++) {
|
for (int i = 0; i < dayArray.length(); i++) {
|
||||||
days.add(dayArr.getInt(i));
|
days.add(dayArray.getInt(i));
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -238,8 +238,8 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
tags= new HashSet<String>();
|
tags= new HashSet<String>();
|
||||||
}else{
|
}else{
|
||||||
tagStr = data.getString(0);
|
tagStr = data.getString(0);
|
||||||
String[] tagArr = tagStr.split(",");
|
String[] tagArray = tagArray.split(",");
|
||||||
for (String tag : tagArr) {
|
for (String tag : tagArray) {
|
||||||
tags.add(tag);
|
tags.add(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -270,8 +270,8 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
String alias;
|
String alias;
|
||||||
try {
|
try {
|
||||||
alias = data.getString(0);
|
alias = data.getString(0);
|
||||||
JSONArray tagsArr = data.getJSONArray(1);
|
JSONArray tagsArray = data.getJSONArray(1);
|
||||||
for (int i = 0; i < tagsArr.length(); i++) {
|
for (int i = 0; i < tagsArray.length(); i++) {
|
||||||
tags.add(tagsArr.getString(i));
|
tags.add(tagsArr.getString(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,10 +374,6 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
.format("cordova.fireDocumentEvent('jpush.setTagsWithAlias',%s)",
|
.format("cordova.fireDocumentEvent('jpush.setTagsWithAlias',%s)",
|
||||||
data.toString());
|
data.toString());
|
||||||
instance.webView.sendJavascript(jsEvent);
|
instance.webView.sendJavascript(jsEvent);
|
||||||
// String js = String
|
|
||||||
// .format("window.plugins.jPushPlugin.pushCallback('%s');",
|
|
||||||
// data.toString());
|
|
||||||
// instance.webView.sendJavascript(js);
|
|
||||||
|
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
@ -74,15 +74,15 @@ JPushPlugin.prototype.setAlias = function(data){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JPushPlugin.prototype.recieveMessageIniOSCallback = function(data){
|
JPushPlugin.prototype.receiveMessageIniOSCallback = function(data){
|
||||||
try{
|
try{
|
||||||
console.log("JPushPlugin:recieveMessageIniOSCallback--data:"+data);
|
console.log("JPushPlugin:receiveMessageIniOSCallback--data:"+data);
|
||||||
var bToObj = JSON.parse(data);
|
var bToObj = JSON.parse(data);
|
||||||
var content = bToObj.content;
|
var content = bToObj.content;
|
||||||
console.log(content);
|
console.log(content);
|
||||||
}
|
}
|
||||||
catch(exception){
|
catch(exception){
|
||||||
console.log("JPushPlugin:recieveMessageIniOSCallback"+exception);
|
console.log("JPushPlugin:receiveMessageIniOSCallback"+exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -184,7 +184,7 @@ JPushPlugin.prototype.resumePush = function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JPushPlugin.prototype.clearAllNoticication = function(){
|
JPushPlugin.prototype.clearAllNotification = function(){
|
||||||
if(device.platform == "Android") {
|
if(device.platform == "Android") {
|
||||||
data=[]
|
data=[]
|
||||||
this.call_native("clearAllNotification",data,null);
|
this.call_native("clearAllNotification",data,null);
|
||||||
@ -211,13 +211,13 @@ JPushPlugin.prototype.init = function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JPushPlugin.prototype.setDebugable = function(mode){
|
JPushPlugin.prototype.setDebugMode = function(mode){
|
||||||
if(device.platform == "Android") {
|
if(device.platform == "Android") {
|
||||||
this.call_native("setDebugable",[mode],null);
|
this.call_native("setDebugMode",[mode],null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//ios single
|
//iOS single
|
||||||
|
|
||||||
|
|
||||||
if(!window.plugins){
|
if(!window.plugins){
|
||||||
|
Loading…
Reference in New Issue
Block a user