草庐IT

push-notification

全部标签

使用vue-router出现Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘push‘)

1.首先展示一下控制台的报错信息: 2.项目中代码constlogout=async()=>{conststore=useUserStore()constrouter=useRouter()console.log(router)//通过log打印出来的router是undefined//弹出框提示awaitshowConfirmDialog({title:'温馨提示',message:'您确定要退出当前账号吗?'})store.delUserInfo()router.push('/login')}总结:出现错误的原因是:constrouter=useRouter()写在了函数里面,正确代码:c

android - 使用推送通知 IntentService 中的 GoogleApiClient 将数据发送到 Android Wear

这是一个跟进问题...AndroidWearBundledNotificationsandBackgroundImages我想创建一个AndroidWearGridViewPager布局,它会在收到新的推送通知时创建。下面是我的代码,它在收到新消息时初始化GoogleApiClient连接,这样我就可以将数据发送到wear应用程序,然后创建GridViewPager。我的问题是GoogleApiClient从未获得连接。我已成功运行sdk文件夹中的SynchonizedNotifications示例应用程序,因此我知道我的设备和watch已正确配对。下面是当前代码...publiccl

Android推送通知如何播放默认声音

我正在使用MixPanel发送推送通知,并在自定义负载上添加以下代码:{"sound":"default"}问题是当我收到通知时没有播放声音。有人对此有解决方案吗? 最佳答案 也许这有助于找到here代码将如下所示。Urinotification=RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);Ringtoner=RingtoneManager.getRingtone(getApplicationContext(),notification);r.pl

android - 即使应用程序关闭(滑动/滑动)也会收到 GCM 通知

这是在我的MainActivity中用作BroadcastReceiver的代码mRegistrationBroadcastReceiver=newBroadcastReceiver(){//Whenthebroadcastreceived//WearesendingthebroadcastfromGCMRegistrationIntentService@OverridepublicvoidonReceive(Contextcontext,Intentintent){//Ifthebroadcasthasreceivedwithsuccess//thatmeansdeviceisreg

Android - 如何在小米设备中以编程方式启用自动启动选项?

我正在开发一个android应用程序,我想在其中显示推送通知。除了小米手机(我用的是红米Note4)外,它在大多数设备上都显示良好。我发现的问题是,这是因为小米提供的自动启动选项默认情况下会被禁用,用户需要手动启用它。但我想知道我可以看到一些Android应用程序在没有任何用户交互的情况下启用此选项,例如:WhatsApp。如果我尝试重新安装WhatsApp并看到自动启动选项,它已启用!我无法通过告诉客户这是Xiomi类设备的功能来说服我们的客户,因为他指出了一些运行良好的应用程序,就像我上面提到的示例一样。有人问过这个问题AddmyapptoAutoStartappslistinan

android - 安卓开发App Key和App Secret

我正在尝试使用带Hel​​ium选项的UrbanAirship为Android应用程序设置推送通知。但是,我需要为我的应用程序找到这些信息,但我不知道从哪里可以找到。任何意见或建议将不胜感激。谢谢!ForsettingupHelium,makesureyourtransportissetcorrectly.Validanswersfortransportare:heliumorc2dm.Thefollowingshouldgointheassets/airshipconfig.propertiesofyourproject.transport=heliumdevelopmentAppK

android - 是否可以在不构建任何应用程序的情况下向 Android 发送推送通知?

我不想为我的网站构建应用程序。但是,我想向Android设备发送推送通知。这可能吗? 最佳答案 问题的答案是否定的,您需要向googleC2DM服务器注册一个应用程序,才能向该设备发送推送通知。 关于android-是否可以在不构建任何应用程序的情况下向Android发送推送通知?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/17320592/

android - GCM 连接服务器如何向 Android 设备发送消息?

我正在阅读有关Google云消息传递(GCM)的信息。GCM连接服务器收到的推送通知被发送到支持GCM的Android设备。我假设它在内部使用设备ID(然后使用ARP协议(protocol)从MAC解析为IP)来发送推送通知。GCM在内部使用哪种协议(protocol)来传递通知?如果是TCP/IP那么它如何解析设备的IP(考虑到用户切换wifi网络和移动数据,这不是唯一的)。谁能帮我理解从GCM到客户的沟通? 最佳答案 GCM通过GooglePlay服务工作(没有GooglePlay服务就没有GCM)设备通过端口5228上的TCP

android - 无法读取解析推送通知包数据

我正在尝试使用Parse推送通知服务发送自定义数据,但从Bundle中提取时总是返回空值。自定义广播接收器:@OverridepublicvoidonReceive(Contextcontext,Intentintent){Log.e("Receiver","Invoked");Bundlebundle=intent.getExtras();IntentcontentIntent=newIntent(context,MainPage.class);StringalertMsg=bundle.getString("heading");//nevergetthisvalueStringur

android - FCM onMessageReceived 在应用程序运行时返回空白消息和标题

正如您在标题中所写,当应用程序关闭时它运行良好并且onMessageReceived获取消息正文和标题但是如果应用程序处于前台模式(运行模式)则通知可以发送但没有消息和标题!请问怎么办?代码:@OverridepublicvoidonMessageReceived(RemoteMessageremoteMessage){super.onMessageReceived(remoteMessage);Stringtitle=remoteMessage.getData().get("title");Stringmessage=remoteMessage.getData().get("body