pubnub

PubNub publish not working

霸气de小男生 提交于 2020-01-06 19:49:42
问题 I am trying to integrate PubNub with KaaIoT platform where the publish API is throwing the following error/exception: Following is the code showing a sample message that I am trying to publish: PNConfiguration pnConfiguration = new PNConfiguration(); pnConfiguration.setSubscribeKey("sub-c-7c052466-04ea-11e5-aefa-0619f8945XXX"); pnConfiguration.setPublishKey("pub-c-12a0e504-b46c-4c9c-ba5d-089ae589bYYY"); PubNub pubNub = new PubNub(pnConfiguration); try { HashMap<String, String> data = new

PubNub publish not working

匆匆过客 提交于 2020-01-06 19:49:10
问题 I am trying to integrate PubNub with KaaIoT platform where the publish API is throwing the following error/exception: Following is the code showing a sample message that I am trying to publish: PNConfiguration pnConfiguration = new PNConfiguration(); pnConfiguration.setSubscribeKey("sub-c-7c052466-04ea-11e5-aefa-0619f8945XXX"); pnConfiguration.setPublishKey("pub-c-12a0e504-b46c-4c9c-ba5d-089ae589bYYY"); PubNub pubNub = new PubNub(pnConfiguration); try { HashMap<String, String> data = new

Running an artisan command forever with laravel forge?

大憨熊 提交于 2020-01-04 18:11:47
问题 Can someone possibly advise how I can keep my custom artisan command running forever with the daemon? I saw the many tutorials with queues, however it doesn't exactly fit. I am trying to accomplish "subscribe" with pubnub's php library and this seems like the best way, unless I missed something? Thanks in advance! 回答1: If you run the artisan command from the command line - it can already run indefinitely/forever. You dont need to do anything. I have an application that has been running the

Running an artisan command forever with laravel forge?

ⅰ亾dé卋堺 提交于 2020-01-04 18:09:05
问题 Can someone possibly advise how I can keep my custom artisan command running forever with the daemon? I saw the many tutorials with queues, however it doesn't exactly fit. I am trying to accomplish "subscribe" with pubnub's php library and this seems like the best way, unless I missed something? Thanks in advance! 回答1: If you run the artisan command from the command line - it can already run indefinitely/forever. You dont need to do anything. I have an application that has been running the

How to implement callback in ngHistory in Pubnub?

て烟熏妆下的殇ゞ 提交于 2020-01-04 14:19:41
问题 When trying to retrieve the history message in the on event , the loading time is too long. The spinner show and hides too fast. But the message is not yet loaded. How can we calculate or get the exact time to make the history load? $scope.limit = 100 PubNub.ngHistory( { channel : $scope.channel, limit : $scope.limit }); $rootScope.$on(PubNub.ngMsgEv($scope.channel), function(ngEvent, payload) { **ActivityIndicator.showSpinner();** $scope.$apply(function(){ $scope.messages.push(payload

iOS / Swift : Receive callbacks from data streaming service without push notifications while app is in background

╄→尐↘猪︶ㄣ 提交于 2020-01-03 03:34:06
问题 The Background Information: I am writing an application that uses the PubNub framework to directly couple one Raspberry Pi with one iPhone, for each individual user. The Raspberry Pi uses an Arduino as a slave to gather analog data, then uses the PubNub network to publish that data to the one and only iPhone that is on the same channel. With the data that the iPhone receives, it determines (locally) if the user needs to be alerted. Then, when the user is alerted, they have the ability to

How to use Xirsys Hosting in Pubnub Android Example?

天涯浪子 提交于 2020-01-02 08:18:14
问题 https://github.com/GleasonK/android-webrtc-api I am a student in Korea. I am working on my school project. I am using example from website above. I'm curious about how to connect my Xirsys hosting server and above example project. I read all about descriptions about Pubnub and Xirsys. When I make a call between my phones on this example. I can make a call and receive call, but they don't get connected. This is how it looks like. 来源: https://stackoverflow.com/questions/37835110/how-to-use

Rails + Pubnub Integration Architecture

假装没事ソ 提交于 2019-12-25 03:26:27
问题 I am new to Pubnub and real-time application. I wrote some ruby application before and I am currently research an option to integrate pubnub into my rails application. I read pubnub docs already and have an basic architecture in my head but not quite sure if it is good or even feasible. I appreciate any opinions. In the application, there will be a peer to peer chat window, and one person can talk to any person he wants. 1) Rails will not store any messages, and it will only stores which

PubNub AngularJS service fires repeatedly

…衆ロ難τιáo~ 提交于 2019-12-24 06:47:42
问题 I have the following event listener in my AngularJS Controller (as shown in the PubNub SDK docs) that fires multiple times on one message if the browser is refreshed after the message comes in. But the data is empty after the original call to Pubnub.getMessageEventNameFor() so besides for just checking data (which seems like a hack covering up another issue), how/why is this function being repeatedly called? $scope.$on(Pubnub.getMessageEventNameFor($scope.myChannel), function(ngEvent, data) {

Pubnub subscribe stops receiving messages after some time

孤街醉人 提交于 2019-12-24 05:46:44
问题 I have some remote devices which communicate with a central Meteor application running on a Digital Ocean Ubuntu 14.04 droplet in a Docker container. Each device has it's own channel, and the server is subscribed to all the channels plus a "telemetry" channel common to all devices. Everything works fine for a while (a few days to a few weeks), but then the subscribe callback on the server stops firing whenever there's a message sent (the messages show up in the PubNub debug console). The