Can we Connect two android Devices without Sockets? - java

Is there any other way of Communication between Two Android Devices without Using Sockets Programmed in Java ? Does Java provide some other way to do this stuff ?

Assuming Bluetooth is also not allowed, you can still connect two Android devices together.
You can do this with USB OTG. Some Android devices support this and Android has an official API that supports this.
You need an OTG Connector, a USB cable and one of those Android devices must support OTG.
API reference and examples:
https://developer.android.com/guide/topics/connectivity/usb/index.html
http://android-developers.blogspot.com/2011/05/bright-idea-android-open-accessories.html
Android USB host and hidden devices

Related

PC to Android USB streaming data using OTG USB - How?

I am trying to accomplish communication between PC Java Application and an Android Application as shown in the diagram.
I want to be able to send streams of Strings from PC JAVA app to Android Application (Android studio).
How can this be accomplished using OTG USB and direct communication (COM port) (I know it can be done over TCP and also using ADB protocol, but I am looking for something else, directly using USB/OTG).
Any suggestions/references ?
you have use this application
https://play.google.com/store/apps/details?id=info.dvkr.screenstream&hl=en_IN
this application code also avelable on Github
https://github.com/dkrivoruchko/ScreenStream

Bluetooth limitations

While using bluetooth to share files from one android mobile as server and many mobiles (20-30) can download files simultaneously from that server.
What are the limitation of bluetooth api in android ?
Is it possible ?
How do you prefer to do this? On bluetooth or via wifi ?
Thanks
You can only have 7 slaves for a bluetooth master, so if if you need 20-30 simultaneous connections this may not work. This is a bluetooth restriction, not Android.

How to develop/code WIFI Direct with Android 2.36 (Gingerbread)?

Some phones have Wifi Direct apps while having Android OS 2.3.x. But Wifi direct APIs is supported by Android 4.0 or later.
So Can I develop(code) for Wifi direct with Android 2.3, is there any such library or way to do so (for e.g using NDK or else)? Pls give the links or detail! Thanks.
You should see the following links:
WiFi Direct for Android Version 2.3+.
can we have wifi direct api working in 2.3 version.
The answer is NO. You can use built-in wifi direct apps in devices with Android 2.3. Note that in official website, Google only supports Wifi Direct API from Android 4.0.
Strictly speaking no, Wi-Fi Direct is not supported on Gingerbread. Devices running this version of Android will neither be able to act as group owners, nor will they be able to connect to other Wi-Fi Direct devices using Wi-Fi Direct calls.
That said, it is possible for a Gingerbread device to connect to a Wi-Fi Direct device using its standard Wi-Fi interface. On Wi-Fi Direct devices, the WifiP2pManager class defines a createGroup method that makes the device a Group Owner that can not only accept connections from other Wi-Fi Direct devices but also legacy Wi-Fi ones. To achieve this, the device effectively acts as an access point and can be connected to by any Wi-Fi device, including a Gingerbread device.
You would need to devise a mechanism to transfer the SSID and key from the Wi-Fi Direct device to the Gingerbread device. With this, the device could then use Wi-Fi to programatically connect to the Wi-Fi Direct group.

write to android USB port and send it to a RS232 microbot port

I have an old android phone (2.2) and I need to use it to transfer a (.tok) file to Basic Stamp micro RS232 using a USB-Serial converter in between. So bluetooth is out of question. My only option is to write to the USB port of my android and make the BS2 micro receive it.
I`ve never programmed Android so need some guidance as to how I do this, specially when my api level is 8. I need a simple program that reads a downloaded (from the processing local linux PC) file from sdcard and then send it to USB port without any processing. That file is then received by the RS232 port of bot.
Android 2.2 API does not have USB host capabilities.
Host capabilities was not made available until Android 3.1.
This means you can't write an android program on your v2.2 phone that will control the USB communication.
I'm also guessing that even if you did update your OS, the phone doesn't have a USB-A port necessary to power the bus.
no need "usb host", work an older android devices like 2.2 http://code.google.com/p/android-serialport-api/

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.

Categories

Resources