NotifyVisitors

Integration

Integrate NotifyVisitors SDK to your android app.

1) Installation

Import the NotifyVisitors SDK in your project
Add the following dependency to your app'sbuild.gradle file,in case you have upgraded your app to AndroidX :

repositories {
   maven {
       url  "https://dl.bintray.com/notifyvisitors/notifyvisitors"
   }
}

dependencies {
        implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v29-5.0.3'
        implementation 'com.android.installreferrer:installreferrer:1.1.2'

 //Add the following required libraries if not using currently (skip those which are already added)

        implementation 'com.google.android.gms:play-services-location:17.0.0'
        implementation 'com.google.firebase:firebase-core:17.2.1'
        implementation 'com.google.firebase:firebase-messaging:20.0.1'
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'com.google.android.material:material:1.0.0'
        implementation 'androidx.recyclerview:recyclerview:1.0.0'
        implementation 'androidx.cardview:cardview:1.0.0'       
}

If your app isn’t using AndroidX, then add the following dependency to your app’s build.gradle file:

repositories {
   maven {
       url  "https://dl.bintray.com/notifyvisitors/notifyvisitors"
   }
}

dependencies {
      implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:5.0.4'
      implementation 'com.android.installreferrer:installreferrer:1.1'

//Add the below required libraries if not using currently (skip those which are already added)

      implementation 'com.android.support:design:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'
      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.google.android.gms:play-services-location:16.0.0'
      implementation 'com.google.firebase:firebase-core:16.0.5'
      implementation 'com.google.firebase:firebase-messaging:17.3.4'       
 }

Configure AndroidManifest.xml

Insert the below XML snippet inside application tag of your AndroidManifest.xml file :

<application>
     <meta-data android:name="notifyvisitors_bid" 
                android:value="11xx" />
     <meta-data android:name="notifyvisitors_bid_e" 
                android:value="F8665C849AB6xxxxxxxxxxxxxxxxxx" />
.......

</application>

📘

Info

In above example Dummy Brand ID and Secret keys are shown. Kindly login your NV_account to see your credentials.

Insert the below XML snippet inside manifest tag of your AndroidManifest.xml file:

<manifest>
       <uses-permission android:name="android.permission.INTERNET" />
       <uses-permission android:name="android.permission.WAKE_LOCK" />
       <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
       <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
       <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
       <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
       <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

2) Initialization

In case,you don’t have your own application class, then you can register our application class in the manifest file.

<application android:name="com.notifyvisitors.notifyvisitors.NotifyVisitorsApplication">

Now you can initialize the SDK onCreate method of your Application class.

NotifyVisitorsApplication.register(this);

Updated 28 days ago


What's Next

Tracking Events

Integration


Integrate NotifyVisitors SDK to your android app.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.