https://github.com/balzack/react-native-unifiedpush-connector
A react-native unified push connector library
https://github.com/balzack/react-native-unifiedpush-connector
react-native unifiedpush
Last synced: 12 months ago
JSON representation
A react-native unified push connector library
- Host: GitHub
- URL: https://github.com/balzack/react-native-unifiedpush-connector
- Owner: balzack
- License: mit
- Created: 2023-06-11T19:48:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-28T18:06:19.000Z (almost 3 years ago)
- Last Synced: 2025-06-17T07:53:01.115Z (12 months ago)
- Topics: react-native, unifiedpush
- Language: Java
- Homepage: https://www.npmjs.com/package/react-native-unifiedpush-connector
- Size: 473 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# react-native-unifiedpush-connector
UnifiedPush library connector for react-native
## Installation
```sh
npm install react-native-unifiedpush-connector
```
## Usage
```js
// Javascript App
import { Platform, PermissionsAndroid } from 'react-native';
import { initUnifiedPush } from 'react-native-unifiedpush-connector';
...
React.useEffect(() => {
if (Platform.OS !== 'ios') {
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS
);
initUnifiedPush()
}
}, []);
...
useEffect(() => {
DeviceEventEmitter.addListener('unifiedPushURL', (e) => {
// register push url
// pushURL = e.endpoint;
});
// AndroidManifest
...
...
```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
Apache-2
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)