How to send string of data from one android device to another? - android

I need to implement a simple messaging functionality in my app . Two users who have installed my app should be able to message each other inside/outside my app . It doesnt need to be real time like a chat app. A bit of latency is acceptable . Should I implement this using a central server and a Google Cloud Messaging service like UrbanAirPush ? Or Should I use socket programming(not very familiar with this ,but I dont mind learning) .
Also , I dont want to use SMS or bluetooth for this . Please advise me on the correct approach to this . UrbanAirpush has a limit , So any other option would be wonderful .

You can create a free web service in cross-copy
You can use this api as a guide
or just Google it.

Use wifi direct or Network service discovery.
Use wifip2p can allow you easily send message/audio/picture to other device nearby, you can check this tutorial: WIFI DIRECT, the NSD is also list there. You can even find sample codes(WIFIServiceDiscoveryActivty) from Android SDK to check some more information.

Related

Connection to a wear : Receive data from network

I'd like to send and receive data from a wearOS 3 compose app using only a network connection. According to what I read, I need to use a network connection and not the Wearable Data Layer as it works only for Android devices (and I want to make it work also on iPhone). Also, I don't think using Firebase Cloud Messaging works for user that refuse notification.
To give you an exemple of what I want to do, I already developed an Android/iOS App in which users create an account. I want the watch to be linked with that account. I thougth of using a Qr code on the watch that users will have to scan thanks to the app. Then, I'll record in the database the link between the code from the QrCode and a specific user.
To sum up, how can I notify (and send data) to the wear thanks to the network? If you have a step by step tutorial, it'll be greatlty appreciated!

How to implement live chat in android without using any third party API?

I want to implement chatting in my android app without using any third party API's like Jabber etc., How can I do it?
I want to implement it using Socket programming, but no exact Ideas to do it, Please help me!
Thanks in advance...
Just create a server in one device and a client in another device and connect the both using wifi hotspot in one of your android device.regarding the server and client code u will get many easily if u google it once. remember the client and server should be connected to a same network(wifi hotspot of any one of your android device).

connect an android application to a JEE6 application

I want to connect my web application (developped with EJB 3.1 and JSF2.0) , to an android application. In the first application I'm planificating an intervention to each employee and I want to communicate a notification to his android device. Please help me to find the best way to connect them.
I think GCM is generally the best approach for this. http://developer.android.com/google/gcm/index.html

Send data from web browser to android app

I am working on an home automation system my android application can turn lights on and off using bluetooth, i want to add another feature of controlling the devices from webpage.
Can anyone tell me what is the easiest way to do this, i know GCM(Google Cloud Messaging) is the best solution but is there any other better or easy way of doing it.
And if anyone has some working piece of code, please share it with me; I want to finish this project as soon as possible
If you have a backend built using PHP, Rails etc you can have API's that the app can call and check for instructions. However, this has the side effect of draining he battery due to continous polling.
If you don't wanna go the "polling the server periodically" way, you can use GCM as you mentioned.
You can send data using the JSON data format. This is easily the lighest and most versatile data format used by many web and android apps and has tremendous support from third party libraries as well.
Here are some tutorials for this:
http://developer.android.com/guide/google/gcm/demo.html
http://android.amolgupta.in/2012/07/google-cloud-messaging-gcm-tutorial.html
http://www.londatiga.net/featured-articles/how-to-send-message-to-google-cloud-messaging-gcm-server-using-json-and-php/
http://fundroiding.wordpress.com/2012/06/29/google-cloud-messaging-for-android-gcm-simple-tutorial/
http://androidjayavelu.blogspot.in/2012/07/google-cloud-messaging-gcm-tutorial_27.html

Remote wipe data using Device Administrator Application+ android

I am working on android device policies, i am able to implement wipe data, force lock using sample given at below link
http://developer.android.com/guide/topics/admin/device-admin.html. I am not able understand how to wipe, force lock, change pwd Remotly from server. I spent lot of time in searching to get information but i am not suceed. Please give any information to implement policies Remotely.
Thanks in advance.
I've googled around a bit today as well, and I've come up with the following solution:
First, write a device administrator app, like the one referenced in the link you provided.
Then you will have to implement some technique so that you can push messages from a server to the android client. As of Android 2.2, you can use C2DM (Cloud to device messaging) provided by Google, I guess it isn't to hard to configure and get going. If you do not want to use this, there is the option to use some other kind of messaging framework, that allows you to push data, like XMPP or MQTT. The facebook messenger app for iOS uses MQTT, so that can't be all bad. It will however require more work setting up, than C2DM for example.
Finally you will have to push some kind of message from your server to the client via the method you chose and let your device administrator app listen to these messages and respond with the correct action, depending on message. So you can decide on your own what the messages will look like and contain.
There is also the option of using Exchange, but I do not know how that works.
So that is basically what I found out from my little research, I'd love to hear other ideas from someone else as well.

Categories

Resources