Slacker Active Member Licensed User Longtime User Oct 16, 2012 #1 Hello Folks, i'm going to develop an application like MSN style but it should be interfaced with my web site community in REAL TIME; i'm going to give the user almost the possibilty to send/receive msg, in similar way as MSN Messenger or another IM, as it was connected directly to the web site with browser....but by an App The problem is if i develop an application using http and web services to interacting with server i have to poll every "x" time interval the remote web service to check if the user has messages for him and send them, to simulate the "state" (http is stateless); the other solution is create a middleware software server in some language (eventually C#) using WCF with TCP Binding. The main role is creating an IM application partially connected to the my web site community. What is the best choice i can do ? Any suggestions ? Thank you in advance to all.
Hello Folks, i'm going to develop an application like MSN style but it should be interfaced with my web site community in REAL TIME; i'm going to give the user almost the possibilty to send/receive msg, in similar way as MSN Messenger or another IM, as it was connected directly to the web site with browser....but by an App The problem is if i develop an application using http and web services to interacting with server i have to poll every "x" time interval the remote web service to check if the user has messages for him and send them, to simulate the "state" (http is stateless); the other solution is create a middleware software server in some language (eventually C#) using WCF with TCP Binding. The main role is creating an IM application partially connected to the my web site community. What is the best choice i can do ? Any suggestions ? Thank you in advance to all.
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2012 #2 Consider using the Push messages framework: Android push notification (GCM) framework and tutorial Probably the simplest solution. Upvote 0
Consider using the Push messages framework: Android push notification (GCM) framework and tutorial Probably the simplest solution.
Slacker Active Member Licensed User Longtime User Oct 16, 2012 #3 Thanks Erel ! I will look for it. In first instance i wonder: with "message text" i can send just simply text message or i can send also "text commands" which belong to some my type of custom application protocol ? Upvote 0
Thanks Erel ! I will look for it. In first instance i wonder: with "message text" i can send just simply text message or i can send also "text commands" which belong to some my type of custom application protocol ?
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2012 #4 Both options are possible. You can also send raw data (binary) by converting it to Base64 string. Upvote 0
Slacker Active Member Licensed User Longtime User Oct 27, 2012 #6 I reopen this thread because reading about GCM i have found some little perplexity. Using GCM everything pass through a google channel....this does not seem a good solution except one encode the message; the second problem is that as documentation says, is necessary to have a google account except Android version higher than 4.0.3; this is not pretty good....each of my customers should have a google account to use the application/service ??? This is madness....:BangHead: I think a polling through http on the client app, should be the best solution to create an app without all these stuff...what do you think about ?? Last edited: Oct 27, 2012 Upvote 0
I reopen this thread because reading about GCM i have found some little perplexity. Using GCM everything pass through a google channel....this does not seem a good solution except one encode the message; the second problem is that as documentation says, is necessary to have a google account except Android version higher than 4.0.3; this is not pretty good....each of my customers should have a google account to use the application/service ??? This is madness....:BangHead: I think a polling through http on the client app, should be the best solution to create an app without all these stuff...what do you think about ??
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2012 #7 GCM works with Android 2.2+ devices that have Google Play app installed. Upvote 0
Slacker Active Member Licensed User Longtime User Oct 28, 2012 #8 "The device that is running an Android application that uses GCM. This must be a 2.2 Android device that has Google Play Store installed, and it must have at least one logged in Google account if the device is running a version lower than Android 4.0.4." Should each user have an account google in order to make it runs on the device ? Upvote 0
"The device that is running an Android application that uses GCM. This must be a 2.2 Android device that has Google Play Store installed, and it must have at least one logged in Google account if the device is running a version lower than Android 4.0.4." Should each user have an account google in order to make it runs on the device ?
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2012 #9 You cannot access Google Play without a Google account so most devices already have a user account. Upvote 0
Slacker Active Member Licensed User Longtime User Nov 3, 2012 #10 Hello Erel, i have reflected about using for my project the GCM Framework, but i would like create a indipendent solution to adjust in future when we will make the app version for windows phone 8 too; i would like use the server side code in WCF .NET keeping the protocol always the same and changing just client code in order to use the relative Framework/APIs. Excluding GCM, how could i reach this result in a better smooth way ? Keep in mind the real time textual chat is the my main target. Thank you of all. Upvote 0
Hello Erel, i have reflected about using for my project the GCM Framework, but i would like create a indipendent solution to adjust in future when we will make the app version for windows phone 8 too; i would like use the server side code in WCF .NET keeping the protocol always the same and changing just client code in order to use the relative Framework/APIs. Excluding GCM, how could i reach this result in a better smooth way ? Keep in mind the real time textual chat is the my main target. Thank you of all.
Erel B4X founder Staff member Licensed User Longtime User Nov 4, 2012 #11 You can use Network library (with AsyncStreams) to open a socket and connect to your server. You can keep this socket open as long as you need. The problem is that eventually the OS may close your socket so you need to handle this case and reopen it. Upvote 0
You can use Network library (with AsyncStreams) to open a socket and connect to your server. You can keep this socket open as long as you need. The problem is that eventually the OS may close your socket so you need to handle this case and reopen it.
Slacker Active Member Licensed User Longtime User Nov 4, 2012 #12 Ah...i will look it. Regards to Http stuff and WCF (with http-binding), should you exclude a http-push/pull solution eventually using ajax and call WCF any Services ? It should simplify the things a bit and bypass OS socket closing i think.... Upvote 0
Ah...i will look it. Regards to Http stuff and WCF (with http-binding), should you exclude a http-push/pull solution eventually using ajax and call WCF any Services ? It should simplify the things a bit and bypass OS socket closing i think....