1

我正在尝试在 android 上使用 Firebase App Check。遵循链接中提到的步骤可以防止应用程序按预期工作,并且只需从依赖项中删除库,并且上述链接中提到的三行代码应用程序就可以按预期重新开始工作。我有一个从 Firebase UI 数据库库中使用的,它只是停止RecyclerView工作MainActivityFirebaseRecyclerAdapter我的RecyclerView. 我的Application班级onCreate方法中有以下代码。我应该怎么做才能在不破坏应用功能的情况下使 Firebase App Check 正常工作?

 FirebaseApp.initializeApp(this);
        FirebaseAppCheck firebaseAppCheck = FirebaseAppCheck.getInstance();
        firebaseAppCheck.installAppCheckProviderFactory(
                SafetyNetAppCheckProviderFactory.getInstance());
4

1 回答 1

-1

Also install DebugAppCheckProviderFactory

 FirebaseApp.initializeApp(context)
        val firebaseAppCheck = FirebaseAppCheck.getInstance()
        firebaseAppCheck.installAppCheckProviderFactory(
            DebugAppCheckProviderFactory.getInstance())
        firebaseAppCheck.installAppCheckProviderFactory(
            SafetyNetAppCheckProviderFactory.getInstance())

NOTE : Make sure your Firebase Libraries are upto updated.. then try again.. it should work.

于 2021-07-28T13:55:54.257 回答