草庐IT

firebase_authentication

全部标签

java - 如何解决 Android Firebase 错误 "Default FirebaseApp is not initialised in this process"?

我正在使用FirebaseAuth通过电子邮件和密码进行用户注册,并且我已经在我的项目中添加了插件和依赖项。MainActivity.javapublicclassMainActivityextendsAppCompatActivityimplementsView.OnClickListener{EditTexted_email,ed_pass;Buttonbut_login;ProgressDialogprogressDialog;FirebaseAuthfirebaseAuth;Contextcontext;@OverrideprotectedvoidonCreate(Bundle

android - 更新 PlayServices 和 Firebase 的新版本 10.2.0 时出现问题

我使用AndroidStudio开发了一个Android应用程序,今天我收到消息说有新版本的GooglePlay服务和Firebase。From10.0.1to10.2.0.我仅使用GooglePlay服务分析和广告。我已经在第9分钟选择了API,现在我认为广告无法在API我的build.gradle文件:applyplugin:'com.android.application'android{compileSdkVersion25buildToolsVersion"25.0.0"defaultConfig{applicationId"com.ilyo.x1application"mi

android - 无法以列表形式读取 Firebase 数据库中的数据

firebase中的数据是这样的我想将标记为userId的数据作为列表或数组获取。我的方法是:publicstaticvoidwritePostToFriends(finalStringuserId,finalStringuserName,finalStringtitle,finalStringbody,finalStringauthorPhoto){DatabaseReferencempostRef=FirebaseDatabase.getInstance().getReference().child("social/user/"+userId+"/friends");mpostRe

android - Firebase Remote Config fetch 不会从云端更新值

我正在尝试为我的项目设置Firebase远程配置。我通过助手添加了Firebase。我在GoogleCloudConsole上向服务器值添加了值:我在res/xml中创建了默认值xmltextView_send_textyourphrasegoeshere.那是我的MainActivity:finalprivateFirebaseRemoteConfigmFirebaseRemoteConfig=FirebaseRemoteConfig.getInstance();protectedvoidonCreate(BundlesavedInstanceState){//..code..//f

android - FireBase 云消息传递不工作

我正在尝试使用FireBase云消息传递。我收到了一个token,但没有从控制台收到任何通知。这是我的list:我的代码与示例中的代码几乎相同:publicclassNotificationServiceextendsFirebaseMessagingService{privatevoidsendNotification(Stringmessagebody){Intentintent=newIntent(this,MainActivity.class);intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);PendingIntentpendin

android - 即使安装了应用程序,Firebase 深层链接也会打开 Play 商店

我正在开发一个安卓应用。点击按钮后,会生成一个深层链接并与friend分享。问题是,在单击该共享深层链接后,即使安装了该应用程序,Play商店也会打开。我关注了this文档。这是intent-filter:这是我创建url的方式(手动):UriBASE_URI=Uri.parse("https://domainname.com/");packageName=getBaseContext().getPackageName();APP_URI=BASE_URI.buildUpon().path(requestID.getText().toString().trim()).appendQue

Android Firebase 根据群组成员资格创建列表

我正在尝试创建一个仅包含特定组项目的列表。例如,我自己在数据库控制台中创建/编写了一个“水果”节点和一个“组”节点(包括组的键)。对于Firebase来说相对较新,所以我仍在努力围绕扁平化数据结构展开工作。JSON(显示“水果”和“组”)如下所示:{"fruits":{"apple":{"color":"appleColorValueHere","groups":{"GroupABCKey":true,"GroupXYZKey":true},"origin":"appleOriginValueHere","size":"appleSizeValueHere"},"orange":{"c

android - GoogleApiAvailability 错过了 firebase-messaging :9. 4.0

声明依赖为compile'com.google.firebase:firebase-messaging:9.4.0'我在Activity的导入行中收到“无法解析符号GoogleApiAvailability”消息importcom.google.android.gms.common.GoogleApiAvailability;怎么了?不是问题的重复:GooglePlay服务已经是最新版本 最佳答案 将此行添加到您的构建文件依赖项中:compile'com.google.android.gms:play-services-base:9

android - 您可以查询 Firebase App Indexing 个人内容吗?

我有一个实现FirebaseAppIndexing的应用。它还具有自己的全文搜索实现。谷歌的显然更好,我很乐意杀死我正在使用的那个支持他们的。是否可以为我自己的应用程序的个人内容查询FirebaseAppIndexing?我不需要/不想要任何其他应用程序的内容,只需要我自己的内容。 最佳答案 无法查询个人内容索引数据库。这是一个很棒的功能请求-您可以直接通过Firebase支持门户提交它们:https://firebase.google.com/support/contact/bugs-features/

java - 在 Firebase GenericTypeIndicator 中使用泛型类型时为 "Unknown type encountered"

我尝试创建具有通用类型的类,我在其中创建函数来读取实体列表。我知道我有两种方法可以做到这一点:(#1)通过循环读取每个实体或(#2)直接创建实体映射。第二种方法看起来更有效,但不幸的是GenericTypeIndicator不适用于泛型类型-它返回IllegalStateException:Unknowntypeencountered:T当我在代码中使用它时:MapentityMap=dataSnapshot.getValue(newGenericTypeIndicator>(){});所以:有什么方法可以将通用类型的实体直接读取到map中吗?(#2)或者只是在循环中读取实体时它们在性