Selaa lähdekoodia

android: persist Amplitude device id when not set externally

Co-authored-by: Titus-Andrei Moldovan <moldovan.titus@gmail.com>
master
tmoldovan8x8 5 vuotta sitten
vanhempi
commit
2085851179
No account linked to committer's email address

+ 4
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/AmplitudeModule.java Näytä tiedosto

@@ -66,6 +66,10 @@ class AmplitudeModule
66 66
         String android_id = sharedPreferences.getString(AMPLITUDE_DEVICE_ID_KEY, "");
67 67
         if (!TextUtils.isEmpty(android_id)) {
68 68
             Amplitude.getInstance(instanceName).setDeviceId(android_id);
69
+        } else {
70
+            String amplitudeId = Amplitude.getInstance(instanceName).getDeviceId();
71
+            SharedPreferences.Editor editor = sharedPreferences.edit();
72
+            editor.putString(JITSI_PREFERENCES, amplitudeId).apply();
69 73
         }
70 74
     }
71 75
 

Loading…
Peruuta
Tallenna