android data sharing in a building - android

I have some questions on android data sharing of multiple devices. Currently, I have a personal project on android application which require multiple device can sharing data offline. You can look at the photo to get more understand about this.
View Image Here
I have a device A running my application which it use for entry data in one activity (entry activity) and device B running the same application which use other activity (result activity). I want the data from device A can be send to device B without internet connection.
For example, when device A entry data and save it. Device B will receive that data. Both devices are in difference room which quite hard to connect via Bluetooth. Both devices do not have NFC.
Does anybody have the idea of this requirement?
Can you give me some advice?
Thanks.

Please try http://developer.android.com/guide/topics/connectivity/wifip2p.html. This might fit your needs. Sample data is also provided there.

Related

Is this even Possible to do using BLE and smartphone APP

I've an idea for an App but not sure if it's actually possible to do, any help or advice would be most appreciated.
I would like my APP (BLEAPPX) to open Bluetooth, then list other BLE devices it can 'see' within range. The list would be filtered to ONLY include other devices that had the same BLEAPPX loaded on its device. Is this possible to 'know' that the device has the APP loaded?
I would then like to be able to tap on one of these devices in the list - and assuming the other device does have the same BLEAPPX loaded, to be able to send a request - and have the other device pass back some data - maybe the owners name or App id. In effect - say Hi to someone who also has the same APP loaded and find out who they are.
Can this be done without having to ask the other device to allow Pairing to take place?
Thanks for any help
Phil

Sync between two devices without Internet connection: Is it possible?

My coursework requirement is to build an Android application that lists all available mobile devices within close proximity. None of the devices have access to the internet.
To make things easier, the assumption is that all devices have my application installed.
When user first installs my app, they must define a user name and upload a profile picture.
When they launch my app, it should display the following profile info about other devices nearby:
User Name Profile picture
Now, I know this is an open ended question, but I'm totally stumped and need some guidance.
Specifically, I find these points challenging:
How to establish communication between devices/my app without internet?
How to retrieve other devices' profile picture without having to store everything locally on the device
I did some research and found Wi-Fi Peer to Peer, but not sure if this will be suitable for my use case as I don't have internet access. Bluetooth is another option but I think devices would have to be paired first before exchanging data.
You can starting Wifi hotspot with name like "YourAppName".
And create simple brodcasting this data inside this network.
So:
user opens your app and registering;
your application, checks if there is WIFI "YourAppName".
if NO, your app start hot spot "YourAppName".
if YES, your app promt user to connect to this network.
If connection successfully established, you will need to think how to transmit the list of data to your app, and represent it to user
Hope that this steps will helps you! Good luck

Transfer data between android device over wifi

I want to send data (for an example it contains the information: name,address) from my app to another hotspot enabled android device using the same app and display the information in it. So, how do I transfer? If it is not possible please tell me if there any possible way to transfer data via WiFi. Since I am new, procedure with code help me a lot.
This is what you need. P2P communication can only by performed by devices that run android 4.0 and up.

Sharing Data Between two Android Apps using Network Sockets

I'm totally new to network sockets so any help is appreciated.
I'd like to know how to setup a network socket on an Android device and use it to pass data generated by an App to another App on the device.
This is because the App receiving the Data will at some point have to be able to receive data from an external source, so I'd like to build in the basics of this before I get to that point.
Any example code etc. would be great and I'll edit my question as I go if required.
I don't think using sockets can solve your problem. Only one app can be active at a given time, and the connection won't work. Unless you create some sort of service, but this approach seems wrong.
I believe you have 2 basic options in front of you:
A server that both apps communicate with.
Writing information to the disk in a globally readable place.
The server option is better IMO.

How to connect two android devices and show text from A's clipboard on B's screen - all approaches?

Basically - the task:
On device one, text is copied to clipboard.
Device two must perform some actions with the text just copied on device one, for example invoke a browser with search engine page and query ?q=text-from-clipboard-just-copied-on-device-A.
First question: is it possible to do with out-of-the box applications?
Second question: if not, what are different approaches to do that?
Both devices are on the same local wi-fi network (connected via router). Connection via external ip server is not what I want, I would prefer a server running on device A or device B (android) if there's any, so there would be not need in working internet connection.
I see there's an option of Wi-fi direct (my devices are 4.0 and 4.2 Android versions, so it's possible). Is there a source code how to send a message with wifi direct and receive it on the other side?
First question: is it possible to do with out-of-the box applications?
No it is not possible with out of box applications. I would be surprised if there would be one!
Second question: if not, what are different approaches to do that?
One approach will be to implement Bluetooth Server and Client applications that can communicate between them and excange data. Ofcourse you will be able to implement different functionalities for example opening a webpage with the text as you mentioned in your question.
Or you can also have a look at NFC Communication explained here: (Remember the devices will have to be at very short distances to achieve such communication) http://developer.android.com/guide/topics/connectivity/nfc/index.html
I guess question 1 is not possible. I can't imagine that an out of the box app knows what action you want to perform with the received data.
Solution for question two could be working with tcp sockets. One device as server one as client, so that you can send your sting, link or whatever to the other device, which receives this and performs some action.
edit: Sorry, just read that you don't want to do it with internet permission, so data exchange via bluetooth, sms... could be possible

Categories

Resources