android: persist Amplitude device id when not set externally
Co-authored-by: Titus-Andrei Moldovan <moldovan.titus@gmail.com>
This commit is contained in:
parent
47bc6f0470
commit
2085851179
|
@ -66,6 +66,10 @@ class AmplitudeModule
|
|||
String android_id = sharedPreferences.getString(AMPLITUDE_DEVICE_ID_KEY, "");
|
||||
if (!TextUtils.isEmpty(android_id)) {
|
||||
Amplitude.getInstance(instanceName).setDeviceId(android_id);
|
||||
} else {
|
||||
String amplitudeId = Amplitude.getInstance(instanceName).getDeviceId();
|
||||
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
editor.putString(JITSI_PREFERENCES, amplitudeId).apply();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue