Bluetooth Low Energy device to trigger webservice call - automation

I am looking for a software or easy to use library where I can connect to a BLE device (simple button, like key finder) that could trigger http request upon click.
I already have rest api available on my local network. I need to be able to call it from the device. It can be software for android or windows. Anyone has ideas?

Related

Using Java to communicate to a USB device from browser

We have a java web application and now we have a new request: the client wants to communicate with their USB device using our application. They plug the device into their PCs, open a page of our web application and the page will communicate with the device to get some input. Communication here means reading some input from the device. This should be support on every script supported browser. Can someone give me a guide or a link that tells me how to do it? Thank you for reading.
You can use the WebUSB API to communicate with USB devices in the Web app. However, WebUSB is only implemented in Chromium.

IBM Worklight Offline Support

we have an app which uses JSONStore to support offline, if device is offline and user submit data it stores it offline, now when device is online and when user login to the app it sync with server and submit all data to server.
the question is, Is it possible when device comes online then my offline data sync with server without user open my app ?
Does worklight support that? Or I have to do something else?
please advice
Like Idan said, Worklight does not support this, but depending on the OS, it could support it.
For instance, on Android, you could use BroadcastReceivers to detect changes in network connectivity, and execute an action when it happens, regardless of whether your app is closed or not.
Here is the API for the receiver: http://developer.android.com/reference/android/content/BroadcastReceiver.html and here is a SO answer explaining how to use it to detect WiFi connectivity: https://stackoverflow.com/a/22626736/2245921 So you can modify this BroadcastReceiver to run the sync code that you would normally do if your app was already open.
If you are using any other platform (iOS, Windows) there might be an equivalent that you can use.
Also, keep in mind that if you are doing a hybrid application, you can create your own Cordova plugin to execute native code from Javascript. Here is the documentation on how to do so: http://cordova.apache.org/docs/en/3.5.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide

Get type of device inserted to windows 8 pc via USB port

I've been asked to work on a project for Windows 8 where I have to detect:
Type of device inserted to USB port (mass storage drive or android phone or windows phone etc.)
Port in which device was inserted. (if I have 4 USB ports in PC then identify which port received new device)
Detect when the device was ejected from the PC
Are there some managed C# API's that can be used to query or if there are some callbacks that can be subscribes to.
Any help or direction will be very useful.
Thanks
You don't specify whether you are writing a desktop app, or a Modern UI app. If it is the latter, I'm afraid you are going to be out of luck as this level of information is simply not passed down to the app's sandbox.
You may have better luck with a desktop app. I don't have any direct experience of doing what you ask for, but I do remember having read that it may be possible through .NET.

How to call a voice xml application?

I have a local installation of Voxeo's Prophecy platform, and a voice xml application that runs on the voicexml browser of the platform. How can i call the application to listen to the message, without having a sip phone, and without using the voxeo's hosting capability? I just want to call the application at the local installation without using a phone. When i try this from the browser, i just get the xml file containing the dialog.
Why are you trying to start the application without a SIP phone? The developer version of Prophecy comes with a SIP phone that works great for testing and debugging. Are you trying to access the application from a regular telephone or POTS. If that is the case you will need additional hardware, such as a Cisco VoIP Gateway to translate the land-line signal to SIP. There are a number of VoIP Gateways available. Another option is to put Dialogic cards in your server and use a software that translates between SIP and the Dialogic API. If you purchase Prophecy from Voxeo as an appliance there are options they can sell you to achieve this. The advantage of getting this from Voxeo is that they will help configure it, which is not trivial depending upon the type type of telephone lines you are using and whether they are behind a PBX or not.
The telephony/communications interface to Prophecy is SIP so that is the only way to communicate with it. You could use any open source SIP stacks to develop something yourself, but the easiest thing to do is to use a software based SIP phone. It is not like you could just start talking and the VXML app would know what you intended, or if the if the voice input was really intended for the VXML app. You still need to maintain things like sessions and routing to the correct application which is easily handled by a SIP phone. Prophecy is designed for a telephony environment. If you are trying to use it for something like a home automation system, which some people have, I would think you would have to provide some type of SIP front end that is voice activated.

GPRS on iPhone Simulator

I want to activate/enable GPRS on the iPhone programmatically. What are the APIs I can look into? There is no "Network" option in the settings application on the simulator so do I need to test out the application on the device itself?
Using the SDK, you can't "activate" any sort of network access. Simply try to connect to the remote server.
If the device can connect, it will. If it cannot, you need to detect this and display a warning to the user.
Apple's sample code has plenty of examples on how to detect if a network is active.
The Simulator always connects through the host Mac's internet connection. If you are asking how to test GPRS performance on the simulator then you should buy a USB GPRS radio and test rhrough that. You could also use the built in ipfw to throttle network bandwidth to the simulator and simulate GPRS bandwidth (note that latency would still be that of your hows connection). Throttled provides an easier UI than bare ipfw: http://www.intrarts.com/throttled.html
As August says, you can't switch the network on and off from code however, you can test the connection and suggest the user goes and switches on the connection.
There is good sample code from Apple for testing the connection availability and type: http://developer.apple.com/iphone/library/samplecode/Reachability/index.html