Integration with Navegg technology is simple and happens by inserting the SDK into the application. It is highly advisable that a professional with programming knowledge to participate in this stage. The following is the SDK implementation:
Version: 1.1.7
1. Adding to your project
An android sdk file is available via JitPack.io in grandle/maven formats. Official documentation jitpack.io
Grandle
Add the repository to the build.gradle file.
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
Add the sdk as a dependency for your project.
dependencies { implementation 'com.github.Navegg:navegg-android:1.1.18' }
Maven
Add the repository.
<repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories>
Add any dependencies.
<dependency> <groupId>com.github.Navegg</groupId> <artifactId>navegg-android</artifactId> <version>1.1.18</version> </dependency>
Direct in Android Studio
2. Inserted the permission in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
3. Added in MainActivity.Class the import navegg.main.NaveggA that this in site http://search.maven.org.
after the import, declare the API NaveggApi and instantiate new NaveggApi that has two parameters, NaveggApi(Context, ID).
-
Added the code to set OnBoarding:
naveggApi.setOnBoarding("#param","#value");
Onboarding allows create a relation in database that syncs 1st party keys and 3rd party key.
Parameter “param” values:
prtusride – Email
prtusridc – Personal ID 1 (e.g. SSN);
prtusridr – Personal ID 2 (e.g. DMV);
prtusridt – Phone number;
prtusridf – User’s 1st party ID key;
Parameter “value” is require convert to HASH.
Ex:
naveggApi.setOnBoarding("prtusride","075d8cd74e0c6b1bf77e0a16c93fcdb7e5e37372");
-
Added the code to get data of the user.
naveggAPI.getSegments("#Criteria");
The event to get the segment should be declared inside the onCreate() or onResume().
The name of the segments criterias used to passed to parameter:
“gender”, “age”, “education”, “marital”, “income”, “city”, “region”, “country”, “connection”, “brand”, “product”, “interest”, “career”, “custom”, “everybuyer”, “everyone”
The return his method is a String “123”.
-
Added the code to set a custom segment.
naveggAPI.setCustom("#IDCustom");
Those segments are previously creates in DMP Navegg. After this is possbile mark the user in custom segment.