-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Desktop) UI to connect Mobile to desktop application #581
Comments
Discussed this with sojharo on how Android makes connection with desktop app. Found that we are using socket for communicating. This is an issue for iOS because on iOS socket is not open always. It is closed by iOS some time after app goes in background. |
Thought more on this. Here is the solution how we can have a persistant socket connection: 1- On server, we will maintain a history which devices are connected to Desktop KiboChat through socket. If mobile app goes in background and socket gets disconnected after 5-10 minutes, server will get to know. At that time, server will send a silent push notification to mobile. Mobile will receive silent push(or voip push) and reconnect its socket. We will have to experiment further on this if connecting socket again will keep it connected for next 5-10 minutes or it will be immediately disconnected as app was still in background. Another solution i have thought of is this: |
I want one design for both Android and iOS. @sojharo Please review this and come up with one design that will for both iOS and Android. @sumairasaeed There are lots of task that run in Back groud in iOS so why we cannot use the same technique. |
@sumairasaeed please post the links here that you have reviewing to know how background service work in iOS. Also please post the links that you reviewed for this task. |
iOS app can run in background, we will need to either add a voip, audio or location tag to info.plist (that is UIBackgroundModes). This was discussed in this answer: I am not sure if we had done this on iOS or not. Looks like this is the way our app can run in the background on iOS. I have read few articles and I am reading more to understand the problem. The issue is not with use of socket as we can see in the above link. The people using xmpp are also having this problem. So if we replace our socket with something different, the issue will remain on iOS. The real problem here is to keep the app running in the background so that it could get message from socket.io (in our case) or xmpp (in case of above link) |
I have reviewed the articles and also thought more on this. The use of push notification is not suitable option as push notification has data limit of 200 KB and it doesn't support binary. The chat done on desktop application will possibly include big text messages and image/video attachments. This can't be handled using push notification. I think it would be better to use socket.io and make it run in the background so that it avoids connection drops. The solution that I have found in above comment should be tried. This solution can let background tasks run in iOS. This is the standard way to allow communication apps run in background for iOS. The communication apps i.e. which do calls or messages, need to be alive to listen to incoming calls or alerts. |
Worked on UI and logic for connecting to desktop application. App gets
connected to Desktop app using socket. Mobile app takes ID displayed on
Desktop app as input from user. Followed same flow as on Android and app
joins room successfully.
We have already done settings and added tag of 'Voip' into our app.
Next will try backgrounding solution as discussed in link provided above.
…On Mon, May 1, 2017 at 5:52 PM, Sojharo ***@***.***> wrote:
I have reviewed the articles and also thought more on this. The use of
push notification is not suitable option as push notification has data
limit of 200 KB and it doesn't support binary. The chat done on desktop
application will possibly include big text messages and image/video
attachments. This can't be handled using push notification.
I think it would be better to use socket.io and make it run in the
background so that it avoids connection drops. The solution that I have
found in above comment should be tried. This solution can let background
tasks run in iOS. This is the standard way to allow communication apps run
in background for iOS. The communication apps i.e. which do calls or
messages, need to be alive to listen to incoming calls or alerts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#581 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKbhp-Wy_Pyu0XE-O5ZbMyT7Hu2BXfyYks5r1dWIgaJpZM4M7IOL>
.
|
I will review and get back to both of you. I may not happen today. |
i have read more on 581 and looked at solution provided by sojharo. Solution provided in above comment by sojharo talks of adding a 'voip' tag in our app. On this, I have found a link that it is no longer supported on iOS 10 http://stackoverflow.com/questions/8261135/how-to-keep-iphone-ios-xmpp-connection-alive-while-in-the-background/11022682#11022682" |
How are we avioding iOS ruiing in background when we are doing the instal? or back up? Why we cannot send a push notification to keep the iOS app from going into background. |
Yes sir. I have already reviewed these articles. Apple allows certain type of background modes only for apps with specific purpose. Example: news apps, apps which track location, apps which plays audio in background, apps which needs to fetch some data at regular intervals(we used this for taking backup), apps which need to make phonecalls over internet(voip) so needs stable connectivity. Out of these, most suitable for us was Voip and register our socket with voip enabled. I tried this and found that socket was alive for 5-10 minutes in background. However, in future Apple might remove and replace it completely with PushKit-based architecture Here is the article about it: https://developer.apple.com/library/content/qa/qa1938/_index.html#//apple_ref/doc/uid/DTS40017564 Article from Apple clearly says: The legacy VoIP architecture was replaced by a new PushKit-based architecture in iOS 8. It was then formally deprecated with the iOS 9 SDK. In iOS 10 it is only available as a compatibility measure; it continues to work (as well as it ever did) if your app is linked with an old SDK, but is disabled if you link with the iOS 10 SDK. For the moment you can work around this by building your app with Xcode 7. However, this is not a good long-term solution because:
Important: This move away from the legacy VoIP architecture is motivated by specific technical concerns. Our experience is that the legacy architecture is unreliable and, when it does work, has a strong negative effect on standby battery life. The new PushKit-based architecture addresses both of these concerns. Solution to implement: Note: Voip pushs are different from standard push and Voip push are currently not supported by azure hub. Comparison of Voip and standard push:
|
As part of this task, Dependencies: |
I am very confused what we are doing on this task and what is the next step. Send me the design document that we are trying to implement. This is URGENT |
Here is a design document: |
Have we done enough investigation to make sure this wold work? If so proceed. |
Yes sir. Yesterday I did work on this. Generated Voip push certificate for our app and configured it on Xcode for proof of concept. Captured device token and using an online testing tool, I sent a sample Voip push notification. It was correctly received by mobile, application got awake and socket got connected in background. |
Need to spend some time on this today. Need to generate required keys/tokens from certificate to provide to server so server can configure voip push. working on it |
Generated certificate files, keys and token required by @sojharo for server-side work on Cloudkibo/CloudKibo#511 to configure Voip push . |
what is the next step here? |
Next, will work to receive data from desktop when app awakes ,once server-side tasks are done : |
What is the ETA for these task? |
Completed work on this. Need to test it with @sojharo |
Create UI that allows the user to connect to the desktop application.
The text was updated successfully, but these errors were encountered: