User Profiling by Android SDK


Our mobile User Profiling Technology calculates your users' demographics segmentation and their interests based on the apps they have installed.

The 42matters profiler sdk has a tiny footprint under 40k, and the integration requires only several lines of code. Only the accessing internet and networks states permission is required.

Demo

If you simply want to check out what 42matters profiler would infer about you, try the Google Play Version

How to integrate in your app

Prerequisites

  • Your app has a minimum sdk level of 10 (Android 2.3.3+).
  • You registered your app, and you have its app id.
  • The app's status is ON.

Integrate the library

  1. Download and reference it or put the following repository and dependency in your build.gradle:

    repositories {
        maven {
            url "http://dl.bintray.com/42matters/android"
        }
        ...
    }
    
    dependencies {
        compile 'com.core42matters.android:profiler:1.2.4@jar'
        ...
    }
  2. Configure your app's AndroidManifest.xml like this

    <?xml version="1.0" encoding="utf-8"?>
    <manifest ... >
        ...
        <!-- Permissions -->
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
        <application ... >
            ...
            <!-- You app id  -->
            <meta-data
            android:name="42:appid"
            android:value="YOUR_APP_ID" />
        </application>
    
    </manifest>

    Replace YOUR_APP_ID with the app id you get on your app page

  3. If you use proguard, add these into your proguard-rules.pro if your app does not use Google Play Services

    -dontwarn com.google.android.gms.**
  4. Call Profiler.getProfile(Context context) to get the inferred profile about the user installed your app. This method returns cached profile immediately and start a background thread to update the profile if necessary. This means the first call normally returns an empty profile, as there's no cached profile on a fresh install.

To get the profile synchronously, use Profiler.getProfileSync(Context context). This method will block until a profile is returned from our servers. It needs to be called on a non-UI thread, and will ensure your first call get a profile back.

Sample Code

Checkout our github sample

Privacy

You need to provide a preference in the default shared preferences for users to opt out at any time. The default key for the preference is com.core42matters.android.profiler.personalized. The github sample also shows how to implement this in the preferences. Furthermore you need to state the SDK and it's usage in your data privacy policy.

What's inside a profile (1.2.4)

Gender

profile.isMale() and profile.isFemale() tells the inferred gender. It could happen both of them return false, when we are not confident about our prediction for example.

Interests

profile.getInterests() would return a List<String> containing the interests of this user we predict.

The 1.2.4 supports following interests:

  • Auto enthusiasts
  • Beauty
  • Books
  • Comics
  • Commuting
  • Cooking
  • Dieting
  • Education
  • Fashion
  • Finance
  • Fitness
  • Gastronomy
  • Health
  • Job market
  • Medical
  • Movies
  • Music consumption
  • News
  • Photography
  • Productivity
  • Real Estate
  • Running
  • Singles
  • Sports activity
  • Sports entertainment
  • Techies
  • Traveling
  • Value shopper

Contact us

If you have any questions when implementing these, feel free to contact us.


Last Modified: 2016-09-26


Get Free Support


We offer free email support to all our customers, with the 42matters team glad to provide you prompt, professional support. We’re here to help.


CONTACT US    KNOWLEDGE BASE