草庐IT

notification-listener

全部标签

android - 如何在android中创建我们自己的Listener接口(interface)?

有人可以帮我用一些代码fragment创建用户定义的监听器接口(interface)吗? 最佳答案 创建一个新文件:MyListener.java:publicinterfaceMyListener{//youcandefineanyparameterasperyourrequirementpublicvoidcallback(Viewview,Stringresult);}在您的Activity中,实现接口(interface):MyActivity.java:publicclassMyActivityextendsActivit

javascript - 移动优化 : Make notification menu with position:absolute scrollable

我最近买了Moltran这很好但有一个很大的缺点:通知菜单在移动设备上消失,这不适合我。所以我了解到,这可以通过删除li通知元素的hidden-xs类来完成。这将变成至,效果很好。现在我将小菜单拉伸(stretch)到屏幕的整个宽度如果用户使用较小的设备以获得更好的可用性:@media(max-width:767px){.nav>li.dropdown:not(.hidden-xs).open.dropdown-menu{width:100vw;}}一切正常,直到出现一件事:我无法在菜单中滚动。使用现代5"智能手机水平,最后的3个元素被隐藏。相反,滚动会影响由绝对位置引起的背景。关于o

ios - 来自 Apple 的电子邮件 - "Missing Push Notification Entitlement"

这个问题在这里已经有了答案:Apprejectedbecauseof"MissingPushNotificationEntitlement"(10个答案)关闭9年前。我已经尝试向我的应用程序提交更新3天了,每次我这样做时,我都会收到一封来自Apple的电子邮件,内容是:MissingPushNotificationEntitlement-YourappappearstoincludeAPIusedtoregisterwiththeApplePushNotificationservice,buttheappsignature'sentitlementsdonotincludethe"ap

python - 使用 Python 向 Apple Notification Service 发送消息

我正在关注以下pyAPNS库提供的文档:https://github.com/djacobs/PyAPNsapns=APNs(use_sandbox=True,cert_file='ThePushCertificate.pem',key_file='ThePushKey.pem')payload=Payload(alert="Checkingifitworks",sound="default",badge=1)apns.gateway_server.send_notification(some_string,payload)我收到以下错误:SSLError:[Errno1]_ssl.c

Ios 推送通知 : Null would like to send you notifications

我对通知推送Alert有问题。它向我显示“null”而不是Appname。有一个屏幕截图:你知道为什么吗?我的产品模块名称与产品名称不一样,是否可能与问题有关?如何解决? 最佳答案 检查info.plist文件中的“Bundlename”。该应用程序将首先使用该属性,然后是您的应用程序图标的目标名称。图标上的名称应与通知提示中显示的名称相同 关于Ios推送通知:Nullwouldliketosendyounotifications,我们在StackOverflow上找到一个类似的问题:

ios - iPhone : Daily local notifications

我正在尝试实现本地通知这是我设置的//CurrentdateNSDate*date=[NSDatedate];//AddoneminutetothecurrenttimeNSDate*dateToFire=[datedateByAddingTimeInterval:20];//Setthefiredate/time[localNotificationsetFireDate:dateToFire];[localNotificationsetTimeZone:[NSTimeZonedefaultTimeZone]];我想设置一个固定时间(每天)开始推送,而不是20。例如:我想在每早上6:0

ios - iOS 10.3 中的备用图标 : avoid notification dialog for icon change

我正在使用这个新功能,当对事件应用程序进行更改时,会显示一个通知对话框,说明图标已被修改。如何禁用此对话框? 最佳答案 如果你不介意使用私有(private)方法,你可以试试下面的代码。-(void)lc_setAlternateIconName:(NSString*)iconName{//antiappleprivatemethodcallanalyseif([[UIApplicationsharedApplication]respondsToSelector:@selector(supportsAlternateIcons)]&

ios - 如何使用从 Swift 到 Objective-C 的 Notification.Name 扩展?

我为Notification.Name创建了一个扩展,如下所示:publicextensionNotification.Name{publicstaticletblahblahblah=Notification.Name(rawValue:"blahblahblah")}现在我想在Objective-C中使用这个扩展,但即使它是公开的也无法访问。如何在Objective-C和Swift中访问和使用这个Swift扩展?以前我在Objective-C中使用常量值,但现在我正在升级我的代码并想使用这个扩展。 最佳答案 我在swift文件中

ios - NSNotificationCenter 是否 removeObserver : deregister a VC from receiving MemoryWarning Notifications?

我刚刚在我的应用程序中偶然发现了一个问题:我测试了didReceiveMemoryWarning调用UIViewController包括后续电话viewDidUnload.这曾经在我的应用程序的旧版本中运行良好,但现在在iPhone模拟器中无法运行:didReceiveMemoryWarning只是不再被调用了。这是调用[NSNotificationCenterdefaultCenter]removeObserver:self]引起的在viewWillDisappear(自己是UIViewController)取消注册我在viewDidAppear中添加的一些生命周期通知.那个全局re

ios - Cordova 如何在 iOS 上删除 "Push notification"

我使用ApacheCordova向AppleStore提交了我的应用程序,我收到了来自苹果的警告“缺少推送通知授权”。但我似乎从未在我的应用程序中使用过“推送通知”。我怎样才能将它从我的应用程序中删除?它在ApacheCordova中是默认的吗? 最佳答案 如何“正确地”为CORDOVA应用程序执行此操作:我也遇到过这个问题。@michaelb提出的解决方案有效,但看到整个事情都包含在条件编译中(即#ifndefDISABLE_PUSH_NOTIFICATIONS),我感到非常沮丧,我决定学习如何添加“预处理器宏”,它基本上告诉XC