Bluetooth limitations - java

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.

Related

PC to Android communication over USB cable

I need to make communication between PC software (written in java) and android app over usb cable. The PC software will send some data (Strings) to Android app witch will accept those strings and do some action depending on the message received.
What is the best way to do this?
I am looking all over the internet and can't find any solution to this. If someone has example of this communication i would be very grateful.
I already done this communication over sockets, put i need to cover situation if there is no router or internet connection.
Thank you
Check following article. I guess similar question to your on SO.
If you want to communicate between Android USB device and some USB host you need to use the accessory mode (https://developer.android.com/guide/topics/connectivity/usb/). But this mode requires special driver support on the USB host side (which is your PC).

Android 9: Ethernet and Wifi simulataneously

I have a scenario where I want to use wifi to connect to the internet (comfortably via androids settings) and ethernet for accessing local network which is not connected to the internet.
Thus I want to have both ethernet and wifi up simultaneously and use the routing table to send all the local requests to the ethernet and the default to wifi.
I found out android disables wifi when ethernet is enabled...
There has been a fix for an old android version on https://android.googlesource.com/platform/frameworks/base/+/refs/heads/pie-release/services/core/java/com/android/server/ConnectivityService.java
Problem: In Android 9 the file looks different and I cannot find the lines mentioned...
I am using a Khadas Vim3 and their android build.
Can you please help me, which lines need to be changed?
This is the file:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android10-c2f2-release/services/core/java/com/android/server/ConnectivityService.java
Thanks in advance

Data transfer between android device and Linux based hardware

I want to send and receive data from a Linux based hardware piece to an android device. The hardware device is connected to Hotspot created by android device. Can you please suggest some links or tutorial from where I can get idea how to establish communication between hardware device and the android device to send and receive data through WI-FI .Please Help any sample code or links
There is an enormous amount of ways to do it. The easiest one is running an ftp server on the linux machine and upload the file to it from the Android app via the FTPClient class from Apache Commons.
While this is very easy to establish it is very unsecure, and should only be used in your local wifi.

Can we Connect two android Devices without Sockets?

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

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/

Categories

Resources