Java control Windows Media Player with Java - java

I have seen some Java servers which can control WMP with an Android device or such. But how do you make a server that controls WMP?
What do you need for it?

Windows Media Player supports UPnP for server discovering and DLNA for remote controlling.
Say if you want to create a client app (Android or whatsoever using Java) to remote control Windows Media Player:
Use UPnP to discover available WMP server on network with zero configuration.
Use DLNA to remote control available WMP server on network, for example, expose playlist, control volume and etc.
Java library implements UPnP/DLNA: Cling
Hope this make sense.

Related

Can an iOS application communicate with a Java application on my Mac via bluetooth without creating an OS X application?

I have an iOS application with a tableview which I would like to send text strings via bluetooth to my Macbook indicating which cell was selected by the user. Both have bluetooth 4.0. This information will be fed into a Java application. From a CoreBluetooth perspective, the iOS device will be a peripheral and my Mac would be the central.
The problem I'm having is around setting up the central. Apple documentation gives a lot detail around building a central manager within a Mac OS X application (xcode, CBCentralManager). However, I'd like the data to be pulled into a Java application running on my Mac.
Do I need to build a Mac OS X application to wrap my Java application to build this type of communication? Should I consider another method of bluetooth communication i.e. BluetoothManager.Framework? I do not need to submit this to the Apple Store. Is this a TCP/IP problem?
I figured it out. My solution is based on Ray Wenderlich's Network Tutorial for iOS. I created the python server, tethered my iOS device via bluetooth to my Mac, and transmitted messages via port 80 on my Bluetooth PAN IP address. Then I created a Java client to connect to the python server to receive the messages!

android application that allows text and voice communication between devices on a same LAN

i want to develop an android application that allows people on the same wifi network to text and call each other. i looked around and found a few theories which suggested setting up a server client network.i want the devices on the network to scan other devices with the application installed and initiate a chat. i have been using desktop version of such applications which includes outlook messenger, LAN Messenger and a few other and want to apply the same logic to mobile devices.
i have basic knowledge of java to a point where i had to develop a Point Of Sale Application for a store. I need some pointers, a starting point on how this can be achieved and what protocols i have to research to do so.
Have you tried Peer-to-Peer framework ? ..
I am developing a similar app right now, however I am not sure about voice call (although, android support SIP) but I am heading toward messaging ..

Can Android support Zeroconf/Bonjour over Bluetooth? How about TCP/IP?

On iPhone if I create custom service for example "_test._tcp.local." in Bonjour I can seek/broadcast this service through WiFi or/and Bluetooth.
It is possible on Android ?
I know that there is jmDNS but from what I understand it works only through WiFi/Network,
not Bluetooth.
Thanks
EDIT by Seva Alekseyev, who offered the bounty: I'm not after workarounds (like Zeroconf sans Bluetooth or Bluetooth sans Zeroconf). I'm after the real thing.
Not on bluetooth, because Android currently doesn't support TCP/IP over bluetooth, and Android's native NSD support (network service discovery) works over IP.
It DOES, however, work over Wi-Fi. Also, Android supports service discovery over Wi-Fi Direct, which gives you greater range and battery efficiency than bluetooth. For a guide on how to integrate service discovery into a wi-fi direct enabled application, check out the Android Training lesson.
Portions of this answer are duplicated from our Dear Android video response to this question
You can use BluetoothSocket and BluetoothServerSocket to create TCP like sockets over Bluetooth.
Here is a sample of android dnssd :
https://github.com/twitwi/AndroidDnssdDemo
You may need to modify the jmdns library such that it creates bluetooth sockets if bluetooth is ON, otherwise creates simple sockets. Encapsulate the socket communication in a different class that creates socket conditionally.
There's a couple of reasons why this is not possible currently. The one most related to your question is that - as you probably experienced - jmDNS requires a TCP/IP link to publish or browse services (it requires an IP address to bind to). As the other answers & comments state, you'd need an established PANU link for that, which Android currently doesn't provide.
The other reasons it will not work are:
Apple uses a couple of mechanisms to assure iOS devices will only talk to other iOS devices. So even if you'd get Android into talking Bonjour-over-Bluetooth, it would only work Android-to-Android.
Apple certified devices in the MFi program have a special crypto chip which is supplied by Apple. I'm not sure if this applies to Bonjour-over-Bluetooth connections as well, but I'd assume it does.
You could instead look into using Bluetooth 4 LE - at least there's an Apple API for that starting in iOS 5 providing a Slave profile, and extended to support a Master profile in iOS 6.

Can a web page access data being sent to a computer via USB

What are the options (or is it possible at all) for a web page (running on a remote server, not localhost) to access a data stream (not video) coming in via the USB port of the local computer?
Ideally this would work cross-platform (Windows, Unix, Mac anyway) and the local computer would not have to download/install anything to make it work (beyond what you can reasonably expect a computer to have)
An embedded Java applet seems the only way, but I'm wondering if there's any other technologies that could do it.
If the restriction is lifted so that the user can install something (basic for non-techies, not setting up a local server running node.js for example) does that make more things possible (Flash?)
You can probably create an ActiveX component to do this. I am not sure if it can be portable on different OS.
I can think of one way that you can interact with the usb port: You would have to set up a socket server on the remote host which would redirect your network traffic to the serial / usb port and vice versa.
This doesn't completely fulfil the requirement, but I think it's the only way to do it in Actionscript

Controlling a USB device from a web application

I would like to be able to control a USB device from a web application.
I was hoping to use Adobe Flex but I don't think that Flex can support access to USB devices.
Is this possible using Java applets, or a similar approach using .NET?
Thanks.
I don't think any web client platform will allow this. On purpose.
If you find one that does, I will uninstall from all my machines.
With .NET, you could
Create a WinForm control and host it in IE with an object tag. This requires security settings to be set using CASPOL or ActiveDirectory, but you would have full-trust to the machine after this
http://weblogs.asp.net/spano/archive/2007/09/19/hosting-a-windows-form-control-in-a-web-page.aspx
If there is already a COM object on the machine that does what you need, you can access it via Silverlight with elevated permissions.
http://www.silverlightshow.net/items/Silverlight-4-elevated-permissions.aspx
With Applets, you could do it with a trusted applet.
Using a lot of different technologies, you could create ActiveX objects, plugins or browser extensions to do it.
We successfully connected POS devices with a Flex UI... for this we created a bridge application with Merapi which connects Flex (either Air or Web) with Java, and left the connection with the devices to Java... this was for a controlled environment where we where sure that the client had the bridge configured...
Other option is to try Air 2.0 which allows to execute Native code (e.g. Java) to connect to the devices, and you could release your app in Air or develop a bridge this time in Air instead of Java to connect with the browser app
HTH
Gus
Your question is a little unclear because you did not say what computers the web application is running on, what computer the USB device is on, and what computer is yours.
Depending on the details, one possible solution would be to write a Chrome Packaged App and use Chrome USB API. The app would need to be installed on the computer that has the USB device and then it could present a UI to the user or just connect to a remote server and allow the device to be controlled remotely.

Categories