forked from jordanbyron/react-native-quick-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.android.js
35 lines (31 loc) · 864 Bytes
/
index.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
var ReactAppShortcuts = require('react-native').NativeModules.ReactAppShortcuts;
module.exports = {
/**
* An initial action will be available if the app was cold-launched
* from an action.
*
* The first caller of `popInitialAction` will get the initial
* action object, or `null`. Subsequent invocations will return null.
*/
popInitialAction: function() {
return ReactAppShortcuts.popInitialAction();
},
/**
* Adds shortcut items to application
*/
setShortcutItems: function(items) {
ReactAppShortcuts.setShortcutItems(items);
},
/**
* Clears all previously set dynamic icons
*/
clearShortcutItems: function() {
ReactAppShortcuts.clearShortcutItems();
},
/**
* Check if quick actions are supported
*/
isSupported: function(callback) {
ReactAppShortcuts.isSupported(callback);
}
};