Repro - Mobile Analytics for growth
日本語
Resources
Growth Hack Journal (JA)
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
  • Development Guide
    • Signup
    • iOS/Android SDK
      • Get Started
      • Session Lifecycle
      • User ID
      • Device ID
        • Get Device ID
      • User Profile
      • Event Tracking
      • Push Notification
      • NewsFeed
      • In-App Message
      • Silver Egg Recommendation Messages
      • UX Optimizer (Beta version)
      • WebView
      • Opt-out feature
      • Set attribution data from Ajdust to Repro
      • Set attribution data from AppsFlyer to Repro
      • Log Level
      • Verification Method
    • Web
    • Audience API
    • Audience Import(β)
    • Push API
    • User Profile API
    • User Profile Bulk Import API
  • Release Notes
  • FAQ

Device ID¶

Device ID is an ID which Repro SDK uses to distinguish devices.

iOS

IDFV (Identifier for Vendor)

Warning

IDFV may change when reinstalling the app.

Android

ANDROID_ID (default). If using ANDROID_ID is not allowed by your privacy policy, you can make the ANDROID_ID hashed or use UUID generated by the SDK instead by adding the below tag to AndroidManifest.xml. Make sure to assign one of the followings to android:value.

  • "ANDROID_ID" : Use ANDROID_ID as the device ID (default)

  • "ANDROID_ID_MD5" : Use MD5 hashed ANDROID_ID as the device ID

  • "UUID" : Use UUID generated by the SDK as the device ID. This UUID will be saved in SharedPreferences.

<application>
  ...
  <meta-data
      android:name="io.repro.android.DeviceID.Mode"
      android:value="ANDROID_ID"> // Specify "ANDROID_ID", "ANDROID_ID_MD5" or "UUID"
  </meta-data>
  ...
</application>

Also, you can specify the hash salt with the below tag when using "ANDROID_ID_MD5". Set an arbitrary string to android:value.

<application>
  ...
  <meta-data
      android:name="io.repro.android.DeviceID.Salt"
      android:value="mysalt">
  </meta-data>
  ...
</application>

Warning

  • When changing the device ID type after SDK has been installed, the result of push notification measurements may temporarily get less accurate.

  • When using "UUID", the device ID will change to a new value after SharedPreferences being deleted after uninstalling/re-installing the app. This may also make the result of push notification measurement temporarily less accurate.

Get Device ID¶

Get the device ID described above.

NSString* deviceID = [Repro getDeviceID];
let deviceID = Repro.getDeviceID()
let deviceID = Repro.deviceID()
String deviceID = Repro.getDeviceID();
const char* deviceID = ReproCpp::getDeviceID();
string deviceID = Repro.GetDeviceID ();
// retrieve the deviceID via a callback function
Repro.getDeviceID(function(deviceID) {
  ...
});
// retrieve the deviceID via a callback function
Repro.getDeviceID((error, deviceID) => {
  ...
});
final deviceID = await Repro.getDeviceID();
  • « User ID
  • User Profile »

About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2020 Repro Inc.