Tag: push notification

奇怪的黑莓日志

我正在使用下面的代码,作为推送通知实现的一部分: private static final String BPAS_URL = “http://pushapi.eval.blackberry.com”; private static final String APP_ID = “3582-M4687r9k9k836r980kO2395i32i66y11a34”; String registerUrl = formRegisterRequest(BPAS_URL, APP_ID, null) + “;deviceside=false;ConnectionType=mds-public”; System.out.println(“\n\n\n !!msg registerBPAS URL is: “+ registerUrl + “\n\n”); 其中: private static String formRegisterRequest(String bpasUrl, String appId, String token) { StringBuffer sb = new StringBuffer(bpasUrl); sb.append(“/mss/PD_subReg?”); sb.append(“serviceid=”).append(appId); sb.append(“&osversion=”).append(DeviceInfo.getSoftwareVersion()); sb.append(“&model=”).append(DeviceInfo.getDeviceName()); if (token != […]

FCM:没有调用onMessageReceived,即使将msg发送到fcm后也没有通知?

我正在开发一个应用程序,我想通过PHP实现FCM推送通知。 所以我制作了两个java文件:1.FirebaseInstanceID(工作正常并在数据库中正确获取令牌)2.FirebaseMessagingSerivice(未调用) 我的FirebaseMessagingService.java package com.example.xyz; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.support.v4.app.NotificationCompat; import com.google.firebase.messaging.RemoteMessage; public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService{ @Override public void onMessageReceived(RemoteMessage remoteMessage) { showNotification(remoteMessage.getData().get(“message”)); } private void showNotification(String message) { Intent i = new Intent(this,Dashboard.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this,0,i,PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Builder builder = new NotificationCompat.Builder(this) .setAutoCancel(true) .setContentTitle(“FCM Test”) .setContentText(message) .setSmallIcon(R.drawable.common_google_signin_btn_icon_dark) .setContentIntent(pendingIntent); NotificationManager […]

使用Urban Airship从Java服务器向Android发送推送通知

我想使用Urban Airship 向Android发送推送通知 。 我可以从Urban Airship网站发送推送通知,但我不知道如何使用城市飞艇网络服务在Java应用程序中发送消息。 我不想去他们的网站并向任何Android设备发送消息我只想要我的个人网站(用Java EE开发)来使用他们的服务并向Android设备发送消息。 PLZ分享任何代码或toturial 提前致谢

WebSockets – 创建渠道和推送数据的正确方法

我有一个场景,我想通知我的网站用户,有人评论了他们也评论过的文章。 这有点像当有人回答问题时SO通知我的方式! 服务器端,我坚持评论,然后查找评论同一篇文章的所有用户。 然后我播出(我正在使用Atmosphere): PushContext pushContext = PushContextFactory.getDefault().getPushContext(); for(User u : users){ // channel name, message pushContext.push(“/user_” + u.id, “someone commented! blah blah”); } 我正在广播的“频道”是用户的“自己的”频道,因为我不希望每个用户都收到通知。 我在频道名称中使用用户ID来实现此目的。 这是确保只有相关用户得到通知的正确方法吗? 我想我还想再做两件事: 只推送我认为仍然在线的用户。 如果他们不在线,则浪费资源推动他们。 加密邮件,因为否则任何人都可以收听我的邮件,如果他们知道我的用户ID。 还有什么我需要考虑的吗?

收到致命警报:handshake_failure

我正在尝试使用liferay中的 javapns库向我的设备发送推送通知。 这是代码: private void pushNotification(ActionRequest actionRequest, ActionResponse actionResponse) { try { System.out.println(“Push”); Push.alert(“Hello World!”, “ck.p12”, “PASSPHRASE”, false, “TOKEN”); } catch (CommunicationException e) { System.out.println(“CommunicationException”); e.printStackTrace(); } catch (KeystoreException e) { System.out.println(“KeystoreException”); e.printStackTrace(); } } 调用pushNotification时出现此错误: ERROR [PushNotificationManager:450] Delivery error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 我用谷歌搜索但找不到任何解决方案。 有谁知道如何解决这个问题?

推送Java Web应用程序通知

目前我正在开发一个使用Spring 3.1和Hibernate 4的Web应用程序。 根据要求,我想在JSP页面上实现像Facebook这样的推送通知。 如果您有任何建议,请同时列出兼容的浏览器及其版本。

android oreo的后台服务

如何在没有显示通知点的情况下在android Oreo中继续后台服务? 我使用通知继续我的后台服务,但我不想显示运行服务的通知。

Exchange Web服务Java APi + RESTful推送通知侦听器

我试图让我的听众使用ews java API,但我不能..我希望你能帮助我! 我已经完成了以下步骤: 1)连接到交换Web服务 ExchangeService newService = new ExchangeService(ExchangeVersion.Exchange2010_SP2); newService.setUrl(“https://myurl/ews/Exchange.asmx”); ExchangeCredentials credentials = new WebCredentials(“user”,”password”); newService.setCredentials(credentials); 2)然后订阅推送通知: @Override public PushSubscription subscribeToPushNotifications(){ URI callback = null; PushSubscription pushSubscription = null; try{ logger.info(“Subscribing to push notifications.. Endpoint Listener URI = ” + config.getNotificationListenerURI()); callback = new URI(config.getNotificationListenerURI()); pushSubscription = service.subscribeToPushNotifications( getFoldersForSubscription(), callback , 5, null, EventType.NewMail, […]

android使用parse.com api通过推送通知实现聊天

我正在做一个聊天应用程序。 在应用程序中,我必须使用解析andorid sdk与推送通知的帮助聊天。 我成功地在不同用户之间生成推送通知。 但是无法接收推送并在列表视图中添加其数据。 这是maifest文件的代码 和我的自定义接收器的代码 public class MyCustomReceiver extends BroadcastReceiver { private static final String TAG = “MyCustomReceiver”; @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, “”+intent, Toast.LENGTH_LONG).show(); } } 从java代码我发送像这样的推送: ParseQuery query = ParseInstallation.getQuery(); query.whereEqualTo(“device_id”, target); ParsePush push = new ParsePush(); push.setQuery(query); push.setMessage(message); push.setExpirationTimeInterval(86400); push.sendInBackground(); 请告诉我使用接收器接收数据的错误,以及当我接受推送时该怎么做意味着任何逻辑或想法进一步移动。 提前致谢