草庐IT

NOTIFICATION

全部标签

android - NotificationCompat.setStyle() 无法获取 Notification.MediaStyle

我发现MediaStylesetStyle在我使用时不起作用NotificationCompat.builder(this)发出通知。我的意思是,当在NotificationCompat.Builder(this)上使用它时:.setStyle(newNotification.MediaStyle().setMediaSession(mySession))它说它想获得NotificationCompat.style而不是Notification.MediaStyle。你能帮我解决这个问题吗?NotificationCompat有替代品吗?谢谢。 最佳答案

android - java.lang.NullPointerException : Attempt to invoke interface method 'java.util.Iterator java.lang.Iterable.iterator()' when starting a notification

我注意到我的一些用户遇到了这个异常。我不知道如何重现它,我只有关于Crashlytics的报告。似乎深入谷歌的代码。在使用此代码的数千人中,只有39人出现异常。知道可能出了什么问题吗?FatalException:java.lang.NullPointerException:Attempttoinvokeinterfacemethod'java.util.Iteratorjava.lang.Iterable.iterator()'onanullobjectreferenceatandroid.app.ApplicationPackageManager.getUserIfProfile(

android - 如何实现Notification的弃用方法

我有一个小问题,但不明白如何解决这个问题。我创建了一个用于提供通知的类,但这些行被标记为已弃用:...Notificationnotification=newNotification(icon,text,time);//deprecatedinAPIlevel11...notification.setLatestEventInfo(this,title,text,contentIntent);//deprecatedinAPIlevel11...替代方法是:...Notificationnoti=newNotification.Builder(mContext).setContentT

android - Firebase (FCM) : open activity and pass data on notification click. 安卓

应该明确实现如何使用Firebase通知和数据。我阅读了很多答案,但似乎无法使其发挥作用。这是我的步骤:1.)我正在用PHP向android传递通知和数据,这似乎很好:$msg=array("body"=>$body,"title"=>$title,"sound"=>"mySound");$data=array("user_id"=>$res_id,"date"=>$date,"hal_id"=>$hal_id,"M_view"=>$M_view);$fields=array('registration_ids'=>$registrationIds,'notification'=>$m

java - 我应该使用哪个 Apple Push Notification Service Java 库?

已结束。此问题不符合StackOverflowguidelines.它目前不接受答案。我们不允许提出有关书籍、工具、软件库等方面的建议的问题。您可以编辑问题,以便用事实和引用来回答它。关闭8年前。Improvethisquestion我需要使用ApplePushNotificationService(APNS)从我的Java服务器向iOS设备发送推送通知我找到了两个用Java发送APNS推送通知的库:java-apnsjavapns但两者似乎都被放弃了(或者至少它们有错误,最后一个版本是一年前的)。java-apns有很多forks.该库是否有任何更新的分支正在积极开发中?还有其他更好

ios - Flutter iOS 应用提交问题警告 : Missing Push Notification Entitlement

将Flutter应用上传到AppStoreConnect后,我​​收到以下电子邮件警告:DearDeveloper,Weidentifiedoneormoreissueswitharecentdeliveryforyourapp,"[APPNAME]".Yourdeliverywassuccessful,butyoumaywishtocorrectthefollowingissuesinyournextdelivery:MissingPushNotificationEntitlement-YourappappearstoregisterwiththeApplePushNotificat

push-notification - Flutter:即使应用关闭也会推送通知

我已经构建了一个带有Flutter的应用程序,它就像一个提醒一样工作。即使应用程序关闭,如何向用户显示通知? 最佳答案 对于提醒,我会推荐FlutterLocalNotificationsPlugin.它有一个强大的调度API。来自本地通知的文档:Schedulingwhennotificationsshouldappear-Periodicallyshowanotification(interval-based)-Scheduleanotificationtobeshowndailyataspecifiedtime-Schedul

Android Push Notifications : Icon not displaying in notification, 显示为白色方 block

我的应用程序生成通知,但我为该通知设置的图标没有显示。相反,我得到一个白色方block。我已尝试调整图标的png大小(尺寸720x720、66x66、44x44、22x22)。奇怪的是,当使用较小的尺寸时,白色方block会更小。我已经用谷歌搜索了这个问题,以及生成通知的正确方法,从我阅读的内容来看,我的代码应该是正确的。可悲的是,事情并非如此。我的手机是装有Android5.1.1的Nexus5。这个问题也出现在模拟器上,一台装有Android5.0.1的三星Galaxys4和一台装有Android5.0.1的摩托罗拉MotoG(我都借了,现在没有)通知代码如下,以及两个屏幕截图。如

ruby-on-rails - delayed_job 的 exception_notification

delayed_job是否有类似exception_notification的gem?最好与REE-1.8.7和Rails2.3.10一起使用。 最佳答案 我过去曾为延迟的工作佣金任务做过类似的事情:require'action_mailer'classExceptionMailer:environment)doResort.sync_all!result=Delayed::Job.work_offunlessresult[1].zero?ExceptionMailer.deliver_exception_message("[SYN

java - "|="是什么意思? (管道等号运算符)

我尝试使用Google搜索和StackOverflow进行搜索,但没有显示任何结果。我在开源库代码中看到了这一点:Notificationnotification=newNotification(icon,tickerText,when);notification.defaults|=Notification.DEFAULT_SOUND;notification.defaults|=Notification.DEFAULT_VIBRATE;“|=”(管道等号运算符)是什么意思? 最佳答案 |=的读取方式与+=相同。notificat