perform user authentication on first page of first run (#572)
* perform user authentication on first page of first run * additional firebase events for first run
This commit is contained in:
parent
309b1e70e6
commit
7e136faea5
7 changed files with 145 additions and 92 deletions
src/main/java/io/lbry/browser/reactmodules
|
@ -4,12 +4,15 @@ import android.content.Context;
|
|||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.facebook.react.bridge.Promise;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
|
||||
import io.lbry.browser.MainActivity;
|
||||
|
||||
public class FirstRunModule extends ReactContextBaseJavaModule {
|
||||
|
@ -40,5 +43,11 @@ public class FirstRunModule extends ReactContextBaseJavaModule {
|
|||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putBoolean("firstRun", false);
|
||||
editor.commit();
|
||||
|
||||
FirebaseAnalytics firebase = FirebaseAnalytics.getInstance(context);
|
||||
if (firebase != null) {
|
||||
Bundle bundle = new Bundle();
|
||||
firebase.logEvent("first_run_completed", bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue