add ReactMethod to call firebase setCurrentScreen
This commit is contained in:
parent
fd97ba3ae9
commit
a8309ffaf5
1 changed files with 9 additions and 1 deletions
|
@ -11,6 +11,7 @@ import com.facebook.react.bridge.ReadableMap;
|
|||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
|
||||
import io.lbry.browser.BuildConfig;
|
||||
import io.lbry.browser.MainActivity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -33,7 +34,14 @@ public class FirebaseModule extends ReactContextBaseJavaModule {
|
|||
public String getName() {
|
||||
return "Firebase";
|
||||
}
|
||||
|
||||
|
||||
@ReactMethod
|
||||
public void setCurrentScreen(String name) {
|
||||
if (firebaseAnalytics != null) {
|
||||
firebaseAnalytics.setCurrentScreen(MainActivity.getActivity(), name, null);
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void track(String name, ReadableMap payload) {
|
||||
Bundle bundle = new Bundle();
|
||||
|
|
Loading…
Reference in a new issue