Android USB to Java (PC) - java

I am looking for a simple direction pointer here. I am wanting to try communicating from an android tabled to a java program. send/receiving data over USB interface. Help would include API references (like libraries i should look into for both android java and standard java) or links to tuts if you know any or simple ideas. Thanks in advance! I contonue searching.
**EDIT**
I am still lost. I don't know where to begin so I will restate my question in hopes for more answers. I am looking to connect an android tablet to my computer through usb and be able to send/receive string data to a custom java application. I have to use usb as the situation will not permit Bluetooth or wifi. An example would be a java(PC) application that sends an x,y coordinate to an android tablet, and the tablet draws that coordinate and a user touches the screen and the android tablet sends an x,y coordinate to the java application to the pc. I can do this with an arduino so the PC java application is not an issue, just the android java app.

A good place to start would be the "USB Host and Accessory" guide in the Android developer guides.

If data volume is low you might just copy files back and forth by using MTP file transfer protocol which is readily available on almost any Android device and easy to use.

Related

Data transfer via Bluetooth

I'm trying to develop a memo app for my Gear S2 that shows my memo written on my phone. Though, I don't know how to send the text to my smartwatch. Doing so via Bluetooth might be the solution. The question is, how can I program it to use it? Thanks for the help.
Edit: Could you give me the code in java or in any other type of language? Beacuse i'm having trouble with that.
You can transfer data between Tizen(Gear) and Android(Mobile) via SAP(Samsung Accessary Protocol). SAP supports both Bluetooth and WiFi.
You can learn about SAP in below site, Samsung Developer official site.
http://developer.samsung.com/gear/develop/creating-your-first-app/native-companion/setup-sdk
You can also get a simple useful sample application to adopt quickply to your project.
http://developer.samsung.com/gear/develop/samples/companion
Good luck to you.

WP10 Detected Bluetooth device functions

As all users of Windows Phone 10 know, the Bluetooth connectivity on this system is cutted to the simplest for end-user, which ends for programmers as a horror to create anything. When connecting to a device, system automatically looks for a "functions" that device has, for ex. audio. The questions are as following:1. How to define a function like that on external Android device? The main goal is, to control all types of music playback from it (ex. Groove music playing)2. Where can i find a list of things like this, for future app functions?
And to get ahead of answers, I already tried the easier ways, which came to nothing due to UWP limits of controlling other apps playback.
Main target of project is to make a xamarin c# (or java, I can "translate" from one to another with ease) android app for a smartwatch and in c# uwp for windows phone to do most common tasks, like - as mentioned before - music playback control and notifications reciever.
Based on your description, you want to develop an Android app to send Bluetooth command to control the music player of a windows phone device, then it depends on your Bluetooth of your android device.
But control music player by Bluetooth need the profile Avrcp I have check the google Bluetooth API I did not find the profile of Avrcp, I think it is may be hard to send the Avrcp command at the android application level.
And Android is source opened, many device factories prefer to customize their own Android system, it is possible that the device uses a Bluetooth module as a serial device, then the official Bluetooth APIs are not suitable for this scenario, the develop protocol of this Bluetooth module is in need.

How to control a rc toy with Android app

I have a rc drone. I want to create an Android app to control it but I do not know where to begin and how. I browsed the internet and found only one useful tutorial but it required use of Adruino and was through Bluetooth but I want to create my own Android app and not use Adruino or Raspberry Pi. Please help
First you need to connect via bluetooth (If you have no documentation of your RC drone it will be had to figure out the commands etc).
Maybe you can find a bluetooth sniffer program on the www to record what is going on when using the original hardware.
But I think its not worth the effort. To figure all this out will most likely take a lot of time and might not lead to success at all. So I recommend: next time by a drone where the communication protocol is documented or better a SDK is provided with it.
First, you have to figure out, if this drone uses Wifi or Bluetooth for control, or, some custom- build wireless device. If it use custom adapter, working on another frequency, you won't be able to do anything from software, only reverse- engineer control schematics.

Live video stream from Android to server , pc and, android device

I'm going to do my final project on android video streaming ,so i need your help guys.
actually i want to send Live video streaming from Android to server , pc and, android device. Can any body refer to similar code or doc. related to this topic. I'll appreciate that.
+
Sounds like a job for a UPnP server.
http://teleal.org/projects/cling
Open Source DLNA/UPnP stack, libraries, and tools for Java and Android developers

Simple application that simulates a bluetooth accessory

I'm looking for a no-brain application that allows me to send a pre-defined list of commands through a bluetooth connection, or an equivalent Java/Scala library that works decently in OSX (64bits).
In short, I want to use my computer to "simulate" a bluetooth accessory, so I must be able to control the pairing, the exchanged code, and so on...
Thoughts?
Simulating jsr-82 can be done with the BlueCove Emulator Module:
http://bluecove.org/bluecove-emu/
http://bluecove.org/ works on OS/X and am sure there wouldn't be any issues with a 64bit OS.
I'd refer you to this Answer: https://askubuntu.com/questions/20195/bluetooth-emulator
You may want to reconsider your question...
To emulate a bluetooth device you would need to develop a bluetooth driver getting it's input from a different source, this would be far more complex than buying a real device.
If you are looking to get some NMEA data though, you may be interested in this:
Most bluetooth enabled phones have apps that do that:
Android: https://market.android.com/details?id=com.cajax.gps2bt2
Any J2ME: http://www.digitalmobilemap.com/bluetooth-gps-simulator-for-j2me-phone
Haven't found one for iPhone, only reference it can be done: http://spench.net/drupal/software/iphone-gps
Hope that helps!
Can you be more exact?
Simulate a Bluetooth accessory for ..?
There are different BT accessories for different smartphones...
Making a BT accessory for iPhone usually requires an authentication chip from Apple...I don't know if a Mac can do it, probably it could - however I'm pretty sure it couldn't describe itself as an accessory.
Accessories usually imply a piece of hardware, in my understanding at least.

Categories