Android Integration

Configure FCM's Sender ID and Private Key

Select the 'Cloud Messaging' tab to find out the 'SENDER ID' for FCM.

1347

Select the 'Service Accounts' tab to generate 'PRIVATE KEY' for FCM.

Click on the 'Generate new private key' button. This will download a JSON file. Refer below for sample JSON file format.

Store this JSON file on your system.

Login to your NotifyVisitors Account.

Navigate to Settings > App Push > Android tab.

Upload your downloaded private key JSON file in the 'Upload Auth File' section.

Add 'Sender ID' from your 'Cloud Messaging' section.

Add 'App ID (project ID)' from your downloaded private key JSON file.

Save the changes i.e., click on the button titled 'Save Changes'.

Push Notification Icon

Create a monochrome png icon and the size must be 200Γ—200. The name of the icon should be sm_push_logo.png Paste into your-project/android/app/src/main/res/drawable/.

πŸ“˜

Note

In the case of Cordova Integration, keep this icon in your project root folder

Configure AndroidManifest.xml

/* Open the app Config.xml file and paste the below code */

/* Under Android Platform Section */
<config-file parent="application" target="AndroidManifest.xml">
           <meta-data android:name="notifyvisitors_bid" android:value="5499" />
           <meta-data android:name="notifyvisitors_bid_e" android:value="DAXXXXXXXXXXXXXXXXXXXXXXXXX" />          
</config-file>


/* Under IOS Platform Section */
<config-file parent="nvBrandID" target="*-Info.plist">
       <string>54XX</string>
</config-file>
<config-file parent="nvSecretKey" target="*-Info.plist">
       <string>DA85XXXXXXXXXXXXXXXXXXXXXXXXX8</string>
</config-file>

πŸ“˜

Note:

In the above example, dummy Brand ID and Encryption keys are shown. Kindly login to your Notifyvisitors account to see your credentials.