I'm trying to build a live updating dashboard in rails 5 with a actioncable. I was searching for some example which might guide me into implementing this but all i found was some chatting apps. I'm planning to use Google Charts. How would i be create an polling Channel which will an API will get data from server and display in my app. Because chat app are calling when user send a message. I want to make it automate polling every X seconds. Any links or reference will be quite helpful. Thanks!!!
Related
Currently building a mobile application that ideally would have functionality that allows one user to "nudge" another user, pretty much the equivalent to a Facebook "poke." For the sake of building quickly, we'd like to use as many third-party libraries/services as possible. So far we were looking into using pusher and expo, but to be totally honest, we are a bit confused as to how to architecture this.
From what I understand, the front-end (ios app) would subscribe (open a socket) to a specific channel/server and the server would then send messages to the client(s) that subscribed whenever necessary. How this works with users being subscribed to every other user they are friends with, I don't understand. What's the proper way to architecture this?
I also read that on the front end, when a user doesn't have the ios application open you can't have any websockets open to the server, so how does that work?
Additionally, how does one bundle notifications??
Really confused with this, any help would be greatly appreciated.
Chris
Well, push notifications now mostly are implemented with Firebase. This is a service inside most of mobiles, so you only need use these libraries to implement your client application.
From the server, you only need to consume a rest api of Firebase.
Now there are permissions to allow mobile applications receive push notifications in background. You do not need to implement a socket or websocket, that is a feature of Firebase.
Read more about this.
https://medium.com/google-cloud/push-notification-for-react-native-bef05ea4d1d0
https://dzone.com/articles/how-to-add-push-notifications-on-firebase-cloud-me
I'm currently developing an iOS app with a custom Django REST backend. Using REST calls I can create/login users and make blog entries. I wanted to implement a chat feature so that my users could send private real time messages to each other.
I have no experience with web sockets and how they work. I wanted to know what is the best way to go about developing the chat feature.
Current set-up:
- iOS app using swift 3
- Django 1.10 for server
Well i am new to IOS development and want to create a realtime application. In my app i want to update data of tableview cell with real time information like we do with Google Drive shared sheet.
I am not using google drive but its an example. In my app i have a tableview which cell should be updated by realtime data. I have thousands of user groups and any member of group with access to modify can edit that data. So i need to reflect real time change to all other users of particular group.
The data can be anything like image, any formula or anything.
Well for that i have googled and found two options but i am confused which one should i go with.
PubNub library
NSTimer
Well i am not sure which one will be best suited for me. I have tried to create a demo app with PubNub but with heard luck i can't do more.
So can so please suggest me which should i choose or is there any other alternative. I am using Xcode 7.3 with swift 2.3
Thanx in advance.
PubNub is not based on Node, however we have many SDKs for over 70+ different languages/platforms, like Node and Swift. The network is a hosted realtime, data stream network (DSN) that the SDKs connect to allowing your app to send and receive messages in realtime around the world in < 1/4 second to 1 or millions of clients.
For more on this, read How PubNub Works?
You can use PubNub for free for up to 100 daily active devices and up to 1 million messages per month (plenty for a demo app).
You would use the PubNub Swift SDK to subscribe to publish and subscribe to some channel to update your app.
Please check out our Swift SDK docs to get started.
I have been checking out the Alexa Skills kit the past few days. I have also been poring through the documentations for both the Skills kit and the Voice Service. I am just having a little hiccup trying to understand the flow. I have implemented one of amazon's sample skills (favourite colour sample) in the developer console and also wrote a sample lambda function to handle the type of response that will be delivered. Its working on the test simulator and what left is basically getting lambda running through my ios app. However I have the impression that I don't have to use the voice service. Am I wrong? I am quite confused, it would be awesome if anybody who has some more clarity could shed some light on the matter. If I get lambda working also, I think it will accept requests that are in a particular format. Where do I have to send the encoded audio to get a json response to send to the skills kit? To the Alexa Voice Service?
Also I am authenticating my app using cognito and dynamo db. If I were to use Alexa Voice Service, then it is mentioned that the user will have to also login to amazon. So do I still have to work with the login with amazon sdk? Or is there a workaround?
Based on Amazon documentation there are two ways to interact with Alexa:
Sounds like you want to implement the app thru the Companion method.
As far as the JSON goes, i am currently resolving that issue now, (will post answer once I have it resolved).
Basically you have to use AVFoundation to capture audio from iPhone and send 2 https messages to Alexa (One message with JSON Body & the second message with audio captured as body.) Bases on Documentation
Companion App
(You have a device (such as a smart speaker) that you want to add Alexa to. So, you build in support for AVS. Great! Now you need a way to authorize it and associate it with the user's account. This is the "companion app" approach. The companion app connects to your smart product and allows the user to login and authorize the speaker to use Alexa and connect to their Amazon account.)
Mobile OR Website
AVS App
(You don't have a device you need to authorize - instead you want to speak to Alexa from within your Android/Iphone application.)
Android or Iphone
You can find a swift example on github on how to implement a iOS AVS client
https://github.com/chintan1891/iOS-Alexa
I am in the process of developing a Twitter App on iOS, which will connect Twitter API in every 15 minutes, to Collect some data. I'm really not planing to have any server side script to Collect that data as I want everything inside the app itself.
Any idea on how to keep the app Running in Background?
Thanks.
You can follow the Apple's guideline before proceeding to create such background jobs. If it fits with all such requirements then you can go ahead. Follow this link for further details:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html