-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRCTMiPush.android.js
85 lines (65 loc) · 1.6 KB
/
RCTMiPush.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/**
* Stub of RCTMiPush for Android.
*
* @providesModule RCTMiPush
* @flow
*/
'use strict';
const MiPush = require('react-native').NativeModules.MiPush;
var RCTMiPush = {
getInitialMessage: function() {
return MiPush.getInitialMessage();
},
setAlias(alias, category) {
MiPush.setAlias(alias, category);
},
unsetAlias(alias, category) {
MiPush.unsetAlias(alias, category);
},
setUserAccount(userAccount, category) {
MiPush.setUserAccount(userAccount, category);
},
unsetUserAccount(userAccount, category) {
MiPush.unsetUserAccount(userAccount, category);
},
subscribe(topic, category) {
MiPush.subscribe(topic, category);
},
unsubscribe(topic, category) {
MiPush.unsubscribe(topic, category);
},
pausePush(category) {
MiPush.pausePush(category);
},
resumePush(category) {
MiPush.resumePush(category);
},
setAcceptTime(startHour, startMin, entHour, endMin, category) {
MiPush.setAcceptTime(startHour, startMin, entHour, endMin, category);
},
getAllAlias() {
return MiPush.getAllAlias();
},
getAllTopics() {
return MiPush.getAllTopics();
},
reportMessageClicked(msgId) {
MiPush.reportMessageClicked(msgId);
},
clearNotification(notifyId) {
MiPush.clearNotification(notifyId);
},
clearAllNotification() {
MiPush.clearAllNotification();
},
setLocalNotificationType(notifyType) {
MiPush.setLocalNotificationType(notifyType);
},
clearLocalNotificationType() {
MiPush.clearLocalNotificationType();
},
getRegId() {
return MiPush.getRegId();
}
};
module.exports = RCTMiPush;