Skip to content

personyze/personyzeandroidsdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

personyzeandroidsdk

This library allows you to use Personyze system on Android devices.

See reference manual.

See also:

How to get started with the Personyze Android SDK

  1. First you need to download the SDK files from here.
  2. Start Android Studio. This guide was using Android Studio version 2021.2.1. Create new project. Select “Phone and Tablet” > “Empty Activity” and click “Next”.
  3. Enter desired project name, or leave as suggested and click “Finish”.
  4. Unzip the SDK. There must be directory called “personyzeandroidsdk”. Put it to the project root directory.
  5. In the Project window on the left, where project files are listed, notice “Gradle Scripts”, expand it and edit the “settings.gradle” file.

Initially this file ends with such line:

include ':app'

Change this line to:

include ':app', ':personyzeandroidsdk'
  1. The IDE will prompt to sync the file. Click “Sync Now”.
  2. Find “app/build.gradle” file. This file starts with this line: “plugins { id 'com.android.application' }”. In the “dependencies” section add this line:
implementation project(path: ':personyzeandroidsdk')
  1. The IDE again will prompt to sync the file, so do it again.
  2. Your app must have INTERNET permission, so add it. In the “app/src/main/AndroidManifest.xml” file, in <manifest> tag, add:
<uses-permission android:name="android.permission.INTERNET" />
  1. Some applications also will need to add the following “uses-library” to “app/src/main/AndroidManifest.xml”:
<application
	...>
	<uses-library
			android:name="org.apache.http.legacy"
			android:required="false" />

This is according to Apache HTTP Legacy library

  1. Now the SDK must be usable.

To be sure add this code to your MainActivity, or elsewhere:

PersonyzeTracker.inst.initialize(this, "0011223344556677889900112233445566778899");
PersonyzeTracker.inst.navigate("MainActivity");
PersonyzeTracker.inst.done();

Use your API key instead of “0011223344556677889900112233445566778899”. API keys for your account can be found on Personyze in the “Settings” → “Integrations” page. You need the full-featured key.

The code above logs a navigation to page called “MainActivity”.

You can look up this request on Personyze Live Visits Dashboard. In filters, select “Pages” → “only containing” → “MainActivity”.

Receiving notifications

See this guide.

Releases

No releases published

Packages

No packages published

Languages