What kind of a connection do realtime native mobile apps use? - android

I want to build a realtime native mobile app, which will be mostly operating through 3g.
I wonder how I can connect my back end (whatever that might be) to my native mobile app.
I looked into websockets (specifically SockJS with Node), but it seems that it won't operate well through a 3G connection, and also theres no native android client for the websockets.
If not websockets, what then?
p.s: I've heard of MQTT over websockets, is that a valid option?

Checkout the real time multi-player api. I think this is what you're looking for.
https://developers.google.com/games/services/common/concepts/realtimeMultiplayer

Related

How do I use firebase firestore for my desktop app?

I'm using the firebase-ui-android authentication flow for my mobile app.
I would like to do the same for my desktop app, but it doesn't seem like there is an equivalent framework; the closest seems to be firebase-ui-web.
Now I'm playing with the idea of (ab?)using firebase-ui-web to run locally on the client machine for authentication.
However, since firebase-ui-web seems to be aimed at the server I'm a bit wary running it on the client side.
The desktop app is fairly simple, it pretty much only needs to read some firestore data.
What are my options here?
The only ways to connect with Firebase are by an Android, an iOS and a web app.
There is no support for desktop apps.
But, you can create a native sync service to link your desktop app with Firebase users throught a web service.
It is feasible to have a desktop app to connect to Firebase. However you should create a hybrid desktop app using electron or other platforms that is by nature use web and javascript. Here is an example of using electron to manage firebase: https://www.electronjs.org/apps/firebase-admin
You can use Google Sign-In for TVs and Devices for that case.
This is not perfect, because you need to use additional access code, but it can work with desktop applications as well

Architecture for cross platform messaging app

i am looking to build a mobile messaging app firstly in android and then ios later, and am struggling with the backend architecture and need some advice on what would be best in my circumstance. Basically i am used to just developing apps through a basic web server and using mysql with php, but now i think and want to create something that not only is very reliable and fast but is also scalable and can be used by both the android and ios platforms.
I am thinking about developing it on google cloud platform using either their google app engine or google compute engine depending on what other architectures i use. Also i was going to use google cloud messaging as my main way of handling the messages, however i am now not sure of that as it is only supported by apps that run on android and not ios, also i have heard it can be unreliable in some messages getting lost.
My main problem is that i have heard so many things about different architectures like ejabberd, xmpp, socket i.o and databases like redis that all work well with messaging apps, however i am not sure which to go that will work well together.
Sorry if this seems a bit of a confused situation, but i dont want to start developing something that i am later going to have to change. Thanks for the help
Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0:
https://developers.google.com/cloud-messaging/
https://www.youtube.com/watch?v=gJatfdattno
You are asking about many different things.
Storage: can be a mysql database or something like mongo db
Transport protocol: XMPP is a chat protocol with many chat features included but it is not supported in browsers. WebSocket is more low level and more general but works inside the browser
webserver software: you basically need access to the database and be able to transmit XMPP or WebSocket. I'd recommend node.js for this. PHP is more for web pages

WebRTC using Peerjs with Native Android/iOS clients

We're trying to build an internal system which will provide us with simple chat/video features using WebRTC. We have successfully deployed Peer.js client and server which works great over the browser.
However, we can't seem to find a fairly simple Android/iOS client/SDK to make it compatible with our PeerJS server.
We've tried looking into AppRTC and got the Android client running with their server, however we can't understand how to connect it to our PeerJS server since that Android client (and server implementation) seems really complicated (we're not JAVA experts).
I've also looked into EasyRTC, however it seems that they've pulled back their native SDKs, but the technology stack looks really close to ours.
My question is, has anyone got and Android/iOS Client working with WebRTC running on a NodeJS server? What are the possible workarounds to get this up and running natively on Android?
We're looking for a fairly simple Android SDK (links to libraries/sample projects) which could work with a PeerJS server.
Edit: We could build a signaling server (on NodeJS) ourselves, but how can we build the Android/iOS clients from then on?
I'm offering a bounty of 200 rep to whoever can answer our questions.
I don't know PeerJS but it seems like using websockets. If that's the case you have to implement WebSocket client functionality in you native clients (and various PeerJS internal connection/signaling protocol).
For native to native signaling, it's really simple because we only have to exchange SDP and ICE candidate messages between clients (via WebSocket or any other messaging mechanisms).
To connect to PeerJS server, obviously, we need PeerJS client implemented in Java or C(ObjC).
I'll be surprised if such implementation or SDK exists.
I don't know current state of AppRTC source, but in its old version, it hosted a WebView to run a kind of HTML+JavaScript signaling client.
That is, you can host a WebView and reuse your PeerJS client in Android/iOS apps.
You can have look at Crosswalk project. By follow Tutorial: porting Android app from Web App for WebRTC using PeerJS library. I have done it and it worked perfectly.
There are another option which is using http://phonegap.com/ to port from web app to Android/iOS but I could not make it work event just with "getUserMedia" API.
Hope this help
I found a example in here https://github.com/pchab/AndroidRTC1
On the server they used nodejs + socket.io + AngurlarJs.
On the client they used libjingle_peerconnection + socket.io Client.

iOS/Android Syncing with Delphi/C# Desktop Application

Not sure if this is the correct Stack Exchange website but here goes..
A client has asked me to look into the possibility of having a iOS or Android App for typing in information storing that in a SQLLite database and then syncing up with the main desktop application when plugged in by cable or something other syncing technology.
The desktop application is a Windows one written currently in Delphi 7.
Are there any API's to sync data from a SQLLite database on iOS/Android that Delphi can use?
If not, then would it be better if the desktop application was written in C# as its a newer language that can consume the API's easier?
For unidirectional sync (device to desktop), I would start with a simple web service (HTTP based). The new Web Sockets standard, also based on HTTP, is a little more complicated, but would allow for bidirectional communication.
The devices can HTTP POST database changes to the server, and the desktop client can pull new data (using HTTP GET) or receive push notifications, for example using a Web Sockets client.
For desktop to device you could also check out Apple Push Notifications and the corresponding Android technology.
For high availability I recommend a cloud-based solution like Amazon Elastic Compute Cloud (EC2), Google App Engine (GAE) or Azure.
This question is rather broad, there are many things you could do here. There aare so many technologies to use it's blinding.
The prevailing technique for transferring information from mobile devices is REST (over http).
You could also whip something up rather swiftly in node.js or WFC to create a service to collect information from the mobile devices.
I'm not sure about Delphi libraries available but perhaps by including REST in your search term you may have more luck. You may want to take a look at https://stackoverflow.com/questions/3959851/using-rest-with-delphi for a start.
The mobile side may be more tricky. If you are developing for multiple devices you may wish to explore the cross platform developer framework by PhoneGap as there seems to be a few projects that aim to sync local databases to the cloud. How you tie these together will be an interesting task.
Good luck!!!

Android OS and postgreSQL

We are undertaking an Android project but need to connect to postgreSQL server which we use throughout our other projects.
Any suggestions on a starting point for this?
Is there anything out there (paid or unpaid) that will allow us to achieve this?
I realize that this is a pretty general question, and although we have extensive experience with writing desktop client/server apps, we have little experience with programming for mobile devices.
I would write a RestFUL API or WebService to be used as front end for your Android device to connect to your PostgreSQL backend.
I don't think you will be able to connect directly your Android App to a PostgreSQL database.
I'd go with a lightweight REST interface that would talk to PostgreSQL in the backend. Have a look at Simple.
I would approach this by implementing an intermediary web service. The Android application would send requests to the web service, which would serve as a gatekeeper to isolate the PostgreSQL server from the internet at large.

Categories

Resources