-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (28 loc) · 997 Bytes
/
index.js
File metadata and controls
34 lines (28 loc) · 997 Bytes
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
import { AppRegistry } from 'react-native';
import App from './src/App';
import { name as appName } from './app.json';
import Airship, { EventType } from '@ua/react-native-airship';
Airship.addListener(EventType.PushReceived, (event) => {
// Handle push received
console.log("PushReceived");
Airship.channel.editAttributes()
.setAttribute("ulrich_first_param", "Ulrich RN 25")
.apply();
Airship.channel.editTags()
.addTags(["Ulrich RN Receive 25"])
.apply()
});
// Set up event listeners
Airship.addListener(EventType.NotificationResponse, (event) => {
// Handle notification responses
});
Airship.addListener(EventType.PushReceived, (event) => {
// Handle push received
});
Airship.addListener(EventType.ChannelCreated, (event) => {
// Handle channel creation
});
Airship.addListener(EventType.PushNotificationStatusChangedStatus, (event) => {
// Handle push notification status changes
});
AppRegistry.registerComponent(appName, () => App);