Building 3rd party server app to connect GCM from Android over xmpp - java

I am building android app1 and app2, which will send data to each other based on this tutorial. The tutorial on GCM and xmpp is pretty straightforward. Google requires 3rd party server app with a backend to send upstream and downstream data to and from the android apps, which is something I couldn't understand. Should that app be an android app to? Or java app on a desktop(because it should run always nonstop)? I couldn't find a tutorial on building that server app. Can someone give me a hint or example?

Related

how to create nodejs xmpp server and android xmpp client

I want to add chat module to android app. Firstly I want to use XMPP using Nodejs. How nodejs xmpp server works with android client.
Can nodejs xmpp server can communicate with android app? if yes than, how can i create simple nodejs xmpp server and simple android app that both can communicate.
If you have any other solution please let me know.
I am tried socket.io but i dont want to use that. It is not worked stable on android client side. Some messages send some not send. I am used few solutions for solve this problem (ping pong, heartbeath, change java client libraries for socket io, ...). But nothing changed.
My aim is to create stable fast chat module to android and ios application using with nodejs server.
Please guide me, thank you in advance.
Have you tried checking other solutions like ConnectyCube, Firebase, Layer, etc.?
They provide a ready backend and all you need to care about is configuring your client-side app.
Some of them even have ready Android client-side libraries which can be integrated in your app and speed up the development.

Send message from Android mobile app to Azure IoT Hub

For an IoT project, we need to send messages from mobile application (iOS and Android) to Azure IoT Hub. We were able to do it connecting as a device using MQTT library. However, the device simulator too connect as a device and since both uses same device ID, the existing connection is dropped when both connect to IoT Hub at the same time.
We realized we need to connect mobile apps as a service (not as a device) and for that some research shows we need to use following library.
https://github.com/Azure/azure-iot-sdk-java
https://github.com/Azure/azure-iot-sdk-java/blob/master/service/iot-service-samples/service-client-sample/src/main/java/samples/com/microsoft/azure/sdk/iot/ServiceClientSample.java
However, this java sample uses lot of java specific implementations and which are not supported by Android.
Has anyone faced the same problem?
Which library can we use to achieve above from Android mobile application?
Which library can we use to achieve above from iOS mobile application?
Please let me know if any alternate solution is available.
You can use a REST API for sending a D2C message to the Azure IoT Hub. The following screen snippet shows an example of this call. Note, that no library is required for this request.
another solution for your scenario is to use an Azure Function as a pre-processor to the Azure IoT Hub, see the following example:
Thanks
Roman
Just as additional content about another solution for your scenario. Based on my understanding and per my experience, I think you can try to create an App service, such as Mobile App for using Custom API at the side of client & backend, or WebApps, etc, to receive the payload which includes custom json properties from your Android App, and forward the payload message using Azure IoTHub SDK for NodeJS or Java to IoTHub.

Send Data from Android App to Google App Engine Python, Need code for both Android App as well as the Python code on the server side

I need the code for sending data from android app to google app engine server (python).
I'm not able to get the HttpPost request correctly so please help me with the code for both android app as well as Python code at the server side in google app engine
Better to use Google Cloud Endpoint to communicate between Server and Android client. Sample code can be found here.
https://cloud.google.com/appengine/docs/python/endpoints/
and for android client:
https://cloud.google.com/appengine/docs/python/endpoints/consume_android

What are the prerequisites for using Google App Engine with Android?

I am new to Android Application Development and know all the stuff, which is required to build an Application which can use the local resources (databases and all that stuff). I want to build an Application, which will interact with the Application server. And I chose Google App Engine as my Application server. As I am slightly new to this topic, I just want to know, what are the prerequisites for doing both client and server side programming.
I would require to store some data on Google App Engine and interact with the apps with reference to the same.
P.S. I have chosen Java as my language with Google App Engine.
I don't think that there is any prerequisites for using android with google app engine.
Google App Engine is a PAAS, u can write the server side and it should work irrespective of Android, iPhone or any other device. For data transfer you can use XML or JSON format, see this if u are interested in creating REST services.Create and Deploy a JAX-RS REST service on Google App Engine
For data transfer from server to android device, u can use Google Cloud Messaging Google Cloud Messaging for Android

XMPP in Google App Engine and Android for a chat application

I want to build a simple chat app where users can send messages to each other.
Can I do it with XMPP service from Google App Engine?
In their tutorials and all the tutorials I found on the web it was an implementation of a bot server. I also found similar tutorials but they are in python.
Is there a good and full tutorial that can guide in server and client side?
Yes, you can use XMPP/Smack library available as a third party library. With this you can create you own custom chat application same like the one's available in the market.
You probably want to use the Channel API if you want to build your own chat app. That's for sending messages to browers.
The XMPP API is for sending messages to XMPP clients. ie if you want to send a message to the chat client that's built into gmail, or a gchat client, or facebook chat.

Categories