Connection between two android devices on different networks - java

we have two android device A and B on different network and different IPs, we donot know the phone number of device A.Device B want to connect with device A i only know the application ID of the android Device A and Device installed the app and connected to internet. is there any technique to find device A on network through his application iD in a secured way using java language?

Maybe Google Cloud Messaging?

Related

How to make a bluetooth connection between Android Phone and PC without knowing server UUIDs?

I am making an app to sync my PC and Phone together with bluetooth when they are paired. Since I want to be able to use multiple devices, I want to generate unique UUIDs to identify each phone/computer in the mix. However, according to the Android Doc pages, if I want to connect to a device, I need its UUID. Is there some way to connect hard coding in a UUID? Can I create a server connection just based on the mac address of the device?

how to write android program to detect all the Devices connected in a WiFi network? [duplicate]

I am developing an app in which I need to scans WiFi network and display the list of all connected devices.
Allow a use to tap on a device and the app should show all the hardware info of that particular device. Here by hardware I mean - RAM, Storage Media, Storage Capacity, Device Name, Device IP address, etc.
Now this device can be anything like xbox, a laptop with Linux/Windows, mobile phone like iPhone or any Andorid based smart phone or even a printer.
How can I scans WiFi network and query/detect all the devices attached to it?
What are the protocols that I need to use to get list of hardware in a particular device irrespective of the OS running on it?
Check requestPeers of
WifiP2pManager
As per documents it seeks
PeerListListener which returns WifiP2pDeviceList carrying list of WifiP2pDevice which carries deviceAddress, deviceName, primaryDeviceType, secondaryDeviceType, status and other attributes.
Maybe the Network Discovery github project could help you. It lists all users connected to WiFi with IP and MAC addresses and gathers even some information like open ports, device name, ping, etc.
Hope it helps
In my opinion, you can use Wi-Fi Peer-to-Peer
https://developer.android.com/guide/topics/connectivity/wifip2p.html
"Wi-Fi peer-to-peer (P2P) allows Android 4.0 (API level 14) or later devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point (Android's Wi-Fi P2P framework complies with the Wi-Fi Alliance's Wi-Fi Direct™ certification program). Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi P2P, then communicate over a speedy connection across distances much longer than a Bluetooth connection. This is useful for applications that share data among users, such as a multiplayer game or a photo sharing application."
Blockquote

Communication desktop between multiple android devices on lan

I'm coding a java app which consists 2 parts (android and desktop). There will be one desktop and multiple android devices.
I want to;
send data from desktop to android device which I choose,
send data from one of android devices to desktop app only.
I want to send data by using local area network. All devices will be connected same network.
It must work on different places. If I use socket programming (I guess I have to);
is it possible to find lan ip addresses all of android devices which is connected on network?
how can these android devices know the desktop's ip address? Because you know it changes network to network.
How about this:
On all devices, send pings to broadcast address.
Try to connect (TCP) to all clients that answered (not sure if every device will answer to broadcast ping). If connection is established, the other client is one of yours, running your application
Find out whether it's Desktop or Android by the messages itself.

Mobile to Mobile Remote Access using Android

i am developing an APP in Android which share screen to all android mobile phone connected in a session.
i want to know that android provides any sdk which provides same service like desktop to dektop access as in team View ?
or any Idea, which SDK i have to used?
Thank you.
Smartphones can't directly connect to each others since they are running in different networks. The common way to solve this is an additional server component. All phones need to connect to the server and send their data. The server is pushing this data to other connected clients, probably by using push notifications. In Android Push Notifications are known as C2DM.
Android developers blog:
http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html
Here's another tutorial on the topic:
http://www.zylinc.com/blog-reader/items/c2dm-a-simple-introduction-using-a-java-server.html
I like 2X RDP a lot. It works very well on phone and tablet and connects to the regular Windows RDP server, so don’t have to install anything else on the server machine.

HTTP interface for Android application

Hi: I want to implement a http remote control for an Android application: From a browser on a computer in the local area network the application running on the Android device should be controlled.
Are there any recommendation how to implement this? I heard about i-jetty but it is not uncomplex to integrate it into an existing app.
The problem you're going to run into here are:
Android devices are mobile. They do not have a fixed IP address or DNS address. You'd need to implement some sort of discovery service.
Android devices move between networks, and some networks will have NAT. You won't always be able to contact the device.
My advice here would be to use the new Android C2DM service and push a command down to the device telling your application that there's a request waiting. Once the notification arrives, have your application contact a web server at a known address to see what the request actually is.
In other words, you'd be running an intermediary web server that proxies requests on behalf of your Android device.
More information about C2DM can be found here:
http://code.google.com/android/c2dm/

Categories