pubnub

Pubnub Push Notification not working for cross platform mobile app

守給你的承諾、 提交于 2019-12-04 12:59:17
We are developing a cordova based android application which has chat capability. We are sending test chat messages from a server and we received the messages just fine when the app is in foreground. We would like to get a notification about chat message when app is in background. However we are not getting any Push Notification about chat message. The steps we followed are mentioned below. Kindly let us know the mistake we're making. We have referred this link to get notification on device when app is in background. We use cordova PushPlugin to register device for push notification. And

Publishing messages from Parse via PubNub

旧城冷巷雨未停 提交于 2019-12-04 09:32:38
问题 I would like to use PubNub with Parse for a chat module. Could somebody explain me how can i send messages with text and images via PubNub to a user (only one-to-one)? I wanna use the PFUser usernames as the id of a user's private channel. I've found this code in the PubNub help docs, but i've never seen code like this in objective-c. Where/how should i use this line? curl https://pubsub.pubnub.com/publish/<PUB-KEY>/<SUB-KEY>/0/<CHANNEL-NAME>/0/%22Hellooooooo%22 It's also unclear for me that

Is leaving a pubnub subscription open in a service optimal

谁说我不能喝 提交于 2019-12-04 03:40:54
问题 I have a choice to either use GCM for push notifications but I have decided to leave a pubnub subscription opened in a running service in the background. It's a chat interface where every user leaves his channel open in the background and only publish to the destination channel when the chat screen is opened. What are the drawbacks to this and if this is not the optimal way, what can I do to optimize it? 回答1: PubNub Android Background Service vs GCM Using GCM might be a more acceptable way

PubNub best practice: How to manage private rooms?

故事扮演 提交于 2019-12-03 09:00:00
I'm learning pubnub and I read their documentation but I just can't find how to manage a multi room chat box. By default, a channel can be listened by anyone. Subscribing to it and publishing on it is easy. What I want is to have a main public room (so far so good) but anyone should also be able to talk privately to anyone else without the risk of being read by other users. These dynamic rooms would be tabbed and the user should be able to go from one to another. Another requirement would be that talking privately to someone doesn't kick you out of the other rooms you subscribed to (you can

Socket.io with PubNub…why?

自古美人都是妖i 提交于 2019-12-03 08:52:21
问题 I see that PubNub say they support Socket.io - http://blog.pubnub.com/node-js-supercharged-by-pubnub/#socket.io-github Can someone explain to me what is going on here because I thought PubNub serves the same purpose as Socket.io in that they are both an abstraction layer for realtime messaging. On their GitHub page it says it makes Socket.io faster but why are they integrating with another platform in the first place? This seems to me like Microsoft Windows saying they now support Linux. And

Best practices for pubnub on android

这一生的挚爱 提交于 2019-12-03 05:19:26
问题 I'm using pubnub as a publish/subscribe channel between an android app and a server. Currently I'm thinking of how I will implement this. I'm using the provided library for android (https://github.com/pubnub/pubnub-api/tree/master/android) but I think there will be some problems with the application lifecycle if I use it like it is now. (Correct me if i'm wrong) I was thinking of implementing it as a service What I want The service has to keep on running until an hour (negotiable) after the

PubNub long polling vs sockets - mobile battery life

 ̄綄美尐妖づ 提交于 2019-12-02 23:01:26
I recently began using PubNub in my iOS app, and am very happy with it. However, I have been looking at the other options available, such as Pusher and Realtime.co, which use Websockets. PubNub, on the other hand, uses long polling. I have done my own little speed comparisons and for my purposes, I find that they are all fast enough. PubNub offers some nice features like message history and a list of everyone in the channel , so barring everything else I am leaning toward them. My question is, should I be concerned with battery life and heavy usage with a long-polling solution like PubNub?

How to implement Pubnub Access Manager in swift

淺唱寂寞╮ 提交于 2019-12-02 10:38:41
I am doing R&D on how to implement a pubnub access manager in swift, and after some research, I come to know : Swift SDK does not include pubnub.grant I need to achieve this using a pubnub function for serverless computing I have created one function in the pubnub dashboard and created a module PubNub, also created a function with event type "On Request" and added code of grant. export default (request, response) => { const pubnub = require('pubnub'); const kvstore = require('kvstore'); let headersObject = request.headers; let paramsObject = request.params; let methodString = request.method;

Cannot get PubNub WebRTC tutorial to work

梦想的初衷 提交于 2019-12-02 07:51:09
问题 I'm trying to build my first WebRTC app by following a PubNub tutorial (https://www.pubnub.com/blog/2015-08-25-webrtc-video-chat-app-in-20-lines-of-javascript/); however, it has failed to work at all. I'm fairly new to programming so any help would be greatly appreciated. Below is my code. Please note that I have created an account and have my own "pub" and "sub", which I have inserted appropriately. <!DOCTYPE html> <html> <div id="vid-box"></div> <form name="loginForm" id="login" action="#"

Cannot get PubNub WebRTC tutorial to work

*爱你&永不变心* 提交于 2019-12-02 03:22:18
I'm trying to build my first WebRTC app by following a PubNub tutorial ( https://www.pubnub.com/blog/2015-08-25-webrtc-video-chat-app-in-20-lines-of-javascript/ ); however, it has failed to work at all. I'm fairly new to programming so any help would be greatly appreciated. Below is my code. Please note that I have created an account and have my own "pub" and "sub", which I have inserted appropriately. <!DOCTYPE html> <html> <div id="vid-box"></div> <form name="loginForm" id="login" action="#" onsubmit="return login(this);"> <input type="text" name="username" id="username" placeholder="Pick a