草庐IT

firebase-notifications

全部标签

android - 什么 Firebase-cloud-messaging Intent-filter 用于 BroadcastReceiver?

我试图让AndroidBroadcastReceiver在Android系统收到FirebaseCloud消息通知时运行。publicclassMyBroadcastReceiverextendsBroadcastReceiver{privatestaticfinalStringTAG="MyBroadcastReceiver";@OverridepublicvoidonReceive(finalContextcontext,Intentintent){Toast.makeText(context,"EVENTOCCURED",Toast.LENGTH_LONG).show();}}在

android - 如何从 Android 在 Firebase 数据库中的现有数组中插入新数据?

我正在使用Android学习Firebase数据库,Firebase数据库中的数据数组如下图所示。cineIndustry是一个数据数组。在JSON中它看起来像这样"cineIndustry":[{"type":"Hollywood"},{"type":"Kollywood"},{"type":"Bollywood"}]我想在此数组中插入新数据。POJO类@IgnoreExtraPropertiespublicclassCineIndustry{voidCineIndustry(){}publicStringtype;}保存新数据CineIndustrycineIndustry=new

php - 从网站发送 "alert/notification"到手机

我想知道是否有一种方法可以让网站向手机(智能手机、android、iphone...之类的东西)发送警报/通知,通知会向用户提问,他们有回答问题,响应被发送回网站,他们的答案被记录在数据库中。我也想知道这个通知是否可以有复选框?我的项目需要这个,想知道是否有这样的东西。如果您需要更多描述,请告诉我。提前致谢! 最佳答案 没有为每部特定手机构建应用程序来处理此警报,不是真的。如果我是你,我会怎么做...允许用户订阅这些提醒。发送给他们时,请向他们发送指向移动网页的链接。现在请记住,大多数人没有数据计划,甚至不知道如何使用它。最好也允许

android - 如何在 "Notifications"窗口中没有扩展消息的情况下在状态栏中进行通知? (只想要图标)

如何在状态栏中发出通知,但“通知”窗口中没有展开的消息?我的意思是,我只需要图标,仅此而已有办法吗? 最佳答案 Quotingthedocumentation:Astatusbarnotificationrequiresallofthefollowing:AniconforthestatusbarAtitleandexpandedmessagefortheexpandedview(unlessyoudefineacustomexpandedview)APendingIntent,tobefiredwhenthenotificatio

android - Android平台有类似iOS本地Notification的等效解决方案吗?

我的应用需要在未来的某个指定时间(可能几个月后)向用户显示通知。在iOS中,我需要做的就是:UILocalNotification*localNotification=[[UILocalNotificationalloc]init];localNotification.fireDate=[NSDatedateWithTimeIntervalSinceNow:60];localNotification.alertBody=@"Youralertmessage";localNotification.timeZone=[NSTimeZonedefaultTimeZone];[[UIAppli

android - 如何获取刚刚在 Firebase 中推送的对象的键?

我想创建一种没有密码和电子邮件的注册。我只使用昵称。所以,我有一个具有昵称字段和其他字段的用户类。所以,我想推送新用户,我想要的是保存它的key,因为将来我需要获取一些用户数据时需要它。那么如何获取已推送的对象的键呢?这是我如何推送的代码:Useruser=newUser();user.setNick(nick.getText().toString());user.setScore(0);Firebasefire=newFirebase(FirebaseConfig.URL);//howtogetkeyofthisobject?Isitpossiblebeforepushing?fir

android - Firebase Dynamic Link 的短链接数量有限制吗?

在Firebase动态链接中可以创建的短URL的数量是否有上限?https://firebase.google.com/docs/dynamic-links/android/create#create-a-dynamic-link-from-parameters比如每天做成几百到几千个单位的短网址... 最佳答案 配额列在DynamicLinksdocumentation中:Requestsarelimitedto50queriespersecond5requests/IPaddress/second,and100,000200,0

android - Firebase 动态链接 ShortUrl 在 Android 中不起作用

我无法使用AndroidFirebaseInviteSDK创建ShortDynamicLink。我可以很好地创建长DynamicLink,但它始终无法创建ShortDynamic链接,总是给出BadRequest的错误消息。这是代码:privatevoidsendInvite(Stringuid,finalStringdisplayName){Stringlink="https://appdomain.com/?invitedby="+uid;com.google.android.gms.tasks.TaskshortLinkTask=FirebaseDynamicLinks.getI

java - 使用 getValue(Boolean.class) 时的 Firebase 数据库 NullPointerException

这个问题在这里已经有了答案:WhatisaNullPointerException,andhowdoIfixit?(12个答案)关闭5年前。我使用Firebase数据库并使用一个boolean字段将消息对象写入其中。当我尝试使用getValue(Boolean.class)读取该对象时,出现异常。只有在获取此boolean值时才会发生,我可以毫无问题地获取字符串。导致异常的方法:@OverridepublicvoidonDataChange(DataSnapshotdataSnapshot){message.setSenderId(dataSnapshot.child("senderI

android - gcloud Firebase Android 测试 : Unable to access the test environment catalog: ResponseError 403: Not authorized for project

我做了什么:我使用本指南在jenkinsdocker容器上设置了gcloud:https://firebase.google.com/docs/test-lab/continuous我要执行的是:gcloudfirebasetestandroidrun--app./app/build/outputs/apk/app-debug.apk我得到的错误:ERROR:(gcloud.firebase.test.android.run)Unabletoaccessthetestenvironmentcatalog:ResponseError403:Notauthorizedforproject问