MDM Development - java

I am developing the MDM server in java for android devices. I found that we can able to establish communication between server to device with Google Cloud Messaging Server.
Is there any way for server communication to android device in java? Please provide any solution apart from GCM.

You have to implement your own way of doing this. You might look at MQTT for this.

Related

Can GCM be used as a two way communication?

Can GCM (Google Cloud Messaging) be used as a two way communication between the device and the server?
Please Help with the links.
Yes it can. That's what GCM CCS (Cloud Connection Server) is all about. It enables you to use GCM both both cloud to device and device to cloud messaging. The older version of GCM (the HTTP version) only supports messages from the server to the device (cloud to device).
Yes you can use XMPP and HTTP to complete what you are looking for. GCM offers both services. You can find a great starter tut here http://www.grokkingandroid.com/xmpp-server-google-cloud-messaging/
The google documentation isn't bad either. https://developer.android.com/google/gcm/server.html
The Smack API is what you will use to get XMPP working on the server side. You can find that here http://www.igniterealtime.org/projects/smack/
We also use Retrofit http://square.github.io/retrofit/ which is great for handing off objects via http.
Good luck, be sure to ask questions, figuring it all out in the beginning is a bit painful but worth it in the end. Also checkout RabitMQ http://www.rabbitmq.com/, it's similar to GCM

How to implement GCM CCS(XMPP) server on app engine?

I am Developing CCS server using XMPP,I followed all steps given on the developer.android website.This code(using java smack library) runs perfectly,as I am getting notification on my android mobile app.I have CCS service enabled on my App Engine Project.But when I tried to deploy it on App engine I am getting.
java.lang.NoClassDefFound Exception for
org/jivesoftware/Smack/XMPPException !!!!!!
after going through some websites (including this also)and developer.android site I found that
Note that Google App Engine does not support connections to CCS
My question is:
1>>.App Engine doesn't support java smack library or it don't support connection to ccs(xmpp)end point at all?
google has also provided XMPP service to App Engine
2>>.Is it possible to implement GCM CCS(XMPP) server using googles XMPP library?If it is possible please give some reference or tutorial.
I can really use some help with this questions,because I am so confused what do next!!!
thanks in advance!!!
It seems that GAE does not support connections to CCS. https://developer.android.com/google/gcm/server.html
This documentation gives a hint that it is possible. Also have a look into that post.

Android USB application

I have a have been doing my research on a program in which an android application makes a communication with a Desktop computer through a USB connection. I did find out that Android 3.1 allows USB communication, but I have no idea how to proceed on it. I'd be very helpful if someone could tell me how this is done.
Thanks
Nik
You can use this API.
Accessory Development Kit
More detailed information can be had from this link as well.
Android apps, communicating with a device plugged in the USB port
I am not sure you can test this using an emulator.So develop an application and deploy it in a real device and connect that device to your PC via USB port for testing.

How to implement Beluga or WhatsApp like messaging system in Android 2.1

I am trying to develop a message app within my android app. The message will be like whatsapp and beluga. I googled it and found C2DM Android 2.2 can send the push notifications to the device. However, this is not available on Android 2.1. Anyone knows how whatsapp send the notifications for 2.1 devices?
For Android: Whatsapp is build upon C2DM and when the app opens it opens an XMPP connection to their service to deliver the messages instantly. They also might use MQTT as a protocol to minimize battery usage. That's basically it.
Edit: I learned more, Facebook uses MQTT in their messaging app. Whatsapp is build upon XMPP with their own extensions. Their server side runs on top of ejabbard (XMPP implementation in erlang). http://www.ejabberd.im/
On pre 2.1 devices WhatsApp probably keeps a connection open to their XMPP servers in the background but this is not really good for battery life.
C2DM is replaced by GCM (google cloud messaging) now . you can use it for delivering the notifications to your app . For the exchange of message one should rely on protocols like xmpp (whatsapp), mqtt(facebook messenger), mtproto (telegram) etc.
if you are looking to familiarize yourself with GCM . try out this tutorial by appsrox - Create an Instant Messaging app using Google Cloud Messaging (GCM)
they are using GCM for the message delivery as well. it won't suit for production, but its an excellent resource for people who want to develop an instant messaging android app .
I don't know what exact technology is used in whatsapp. However, if i am to implement notifications where there is no support for push notifications from the OS, i can do two things:
Poll a remote server every X seconds and check for new notifications (this is the more expensive choice).
Run a background service, maintain a connection with a remote server, which will pump me any notifications that are to be received (sort of my like my own push notification implementation).

Android app and native desktop app comunication

I have a native application written in C++. I would like to write an Android application that would be able to comunicate with my native application when user is in connected to the same WiFi network as my PC.
How this things are done. I mean what technologies are used behind it. Maybe you have some samples?
You could use a peer-to-peer library, like AllJoyn from Qualcomm. The idea is that both your PC and the Android device will use TCP/IP to communicate with each other. You still need a protocol above that however that will handle discovery, session establishment and exchange of data.

Categories

Resources