This is a ReactNative application that Najva-ReactNative-plugin implemented in it.
If you want test Najva Push Notification Service in reactnative application you should:
-
Clone this project and rename package name of it. this link can be useful.
-
Register this app after login in najva panel.(to register any app, its package name must be unique!)
-
After register najva panel gives you
websiteId,apiKeywhich is specific to your app -
Go to
android\app\src\main\AndroidManifest.xmland add the following toapplicationtag:
<meta-data
android:name="com.najva.sdk.metadata.API_KEY" android:value="[YOUR_API_KEY_GOES_HERE]"/>
<meta-data
android:name="com.najva.sdk.metadata.WEBSITE_ID" android:value="[YOUR_WEBSITE_ID_GOES_HERE]"/>
put websiteId , apiKey here!
- Go to
App.jsfile and put this parameters ininitializeNajvamethod that looks like the following then save it.
Najva.initializeNajva(true); //true:enable Najva Location Service - false:disable Najva Location Service
- Now you can run application and send notification from your panel to it!
Notice: npm install can be usefull for some error