Commit 7958723c authored by yogevbd's avatar yogevbd

Add send local notification on android example app

parent ecb81f51
......@@ -6,6 +6,7 @@ import {
StyleSheet,
Text,
View,
Button,
TouchableHighlight
} from 'react-native';
......@@ -129,6 +130,7 @@ class MainComponent extends Component {
<TouchableHighlight onPress={() => this.onCheckPermissions()}>
<Text style={styles.plainButtonText}>Check permissions</Text>
</TouchableHighlight>
<Button title={'Send local notification'} onPress={this.sendLocalNotification} testID={'sendLocalNotification'}/>
</View>
)
}
......@@ -142,6 +144,14 @@ class MainComponent extends Component {
}
}
sendLocalNotification() {
NotificationsAndroid.localNotification({
title: "Local notification",
body: "This notification was generated by the app!",
extra: "data"
});
}
onPushRegistered() {
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment