How to plot live location with device map widget using ibm bluemix iot service? - watson-iot

I am Unable to populate Lat-Long fields in device map card, no update methods are suggested when tried to map values when device info card is selected as a source.

The device map card reads the latitude and longitude values from events published to the Watson IoT Platform from the device in question. The card needs to be configured to specify which properties on the event contain the latitude and longitude values. To do this, you need to:
Open the settings for the device map card
From the left hand navigation panel of the Edit Device map Card dialog, select Device list
In the content panel, you should see two entries, Data point for longitude property and Data point for latitude property. Click on Data point for longitude property to expand it.
You are now able to specify the Device type and Property that contains the longitude value.
Repeat this process to define which property contains the latitude value.
NOTE: The Device type drop-down is only populated with device types that have a schema defined for them. You can define a schema for a device type by navigating to DEVICES -> Manage Schemas and clicking the Add Schema button in the top right hand corner.

Related

Focus and UnFocus is not working in Xamarin Android

I am using Entry control for numeric field as below structure
enter image description here
In above structure I am inheritance "XXXEditor" from Entry in renderer and binding dynamically with n numbers of items.
But when we enter something in numeric field and go to some other numeric field then enter something, when we come back to previous numeric text to make some changes so by that time if we try to enter something so textchange event will fire then
unfocus-->focus -->unfocus-->focus
in Nexus 5 but it will behave some thing in Samsung Galaxy S7.
Please suggest the solution to handle these events.
Thanks

How can I get information about any object clicked by the mouse cursor ?

Programmatically on Windows, How can I get information about any object clicked by the mouse cursor, ex: type (textbox, file, folder, icon), property (name, innertext).
I have used SetWindowsHookEx in order to get mouse click information like (X,Y) and (RightClick, LeftClick), but I'm trying now to know what is under this click, however the programming language was?
The most general (and therefore mostly useless) information is just the X,Y coordinates. From there you need to be more specific to know what kind of information you want to get. If you want window information, there is WindowFromPoint.

How to update the volume indicator provided by the MinimalMediaRouteProvider

When registering the MinimalMediaRouteProvider/MediaRouteButton from Androids Chromecast SDK, we get a standard dialog for connecting to existing Cromecast Devices. Once connected to the device, same dialog also provides a way to set the volume using a draggable seek bar. I am having trouble synchronizing the position of this volume seek bar with the actual volume that is already set in the Chromecast device.
As part of registering the MinimalMediaRouteProvider we provide a com.google.cast.MediaRouteAdapter implementation. The onSetVolume(volume) of this interface is called when the user drags the volume seekBar above. This gives us a god way to update the volume level of the connected chromecast channel by using messageStream.setVolume(volume).
The problem is that once we update the volume, there is no way to tell back the MinimalMediaRouteProvider UI that the volume has changed so it can position itself accordingly - currently it always shows the volume as 0.
What is the proper way to notify the MinimalMediaRouteProvider about the current volume level so it can update its volume UI?
Looking at the MediaRoute sample included with support library 7, there seem to be a way to create MediaRouteDescriptor, update the volume there and thus communicate this back to the MediaRouteProvider, but but it is not very clear how to do this in the content of Chromecast/MinimalMediaRouteProvider.
You can call MediaRouteStateListener.onVolumeChanged() to update the volume seekbar.
I have a more detailed answer here:
https://stackoverflow.com/a/18867128/1334870
To get volume immediately from VideoCastManager:
mVolume = (int) (mCastManager.getVolume() * 100) // cast volume is double
To receive system-based volume changes in the receiver (i.e. the on-screen volume slider pop-up, other connected devices changing the volume), you'll need to add a cast consumer in your controller activity:
private VideoCastConsumerImpl mCastConsumer = new VideoCastConsumerImpl() {
public void onVolumeChanged(double volume, boolean isMute)
{
mVolumeSeekBar.setProgress((int) (volume *100));
}
};
For more details:
Android Sender App Development (Aug '14)

What kind of icons are available to depict object specific states

What kind of icons can be used to show an object specific state
e.g. user who has just been created, user who has been activated so that he can use the portal, user who has been removed from the system
e.g an object which has just been created and still in the draft stage and an object which has been activated or de-activated and cannot be used
I'm not really sure how to reply...to best get an idea, get an icon archive such as Oxygen Icons or Crystal Icons.
new user: a user icon with a green + in bottom-right corner
new object: depends on the type of object, a generic icon would be an object icon (maybe a circle) and a green + in the bottom right
normal object: object a with a green tick sign
archived object: object a with a gray tick sign

Detect if user presses button on a Wacom tablet

I was wondering if it is possible in Cocoa/Carbon to detect whether a key combination (e. g. Ctrl + Z) comes from a Wacom button or the keyboard itself.
Thanks
best
xonic
I can only assume a Wacom tablet's driver is faking keyboard events that are bound to specific buttons. If this is the case, I don't think you'll be able to distinguish them as -pointingDeviceID, -tabletID, and friends are only valid for mouse events (which a keyboard event - faked or real - is not).
For the "Express Keys", Wacom provides custom events with the driver version 6.1+
From the Wacom developer docs:
WacomTabletDriver version 6.1.0 provides a set of Apple Events that enable applications to take control of tablet controls. There are three types of tablet controls: ExpressKeys, TouchStrip, and TouchRing. Each control has one or more functions associated with it. Do not make assumption of the number of controls of a specific tablet or the number of functions associated with a control. Always use the APIs to query for the information.
An application needs to do the following to override tablet controls:
Create a context for the tablet of interest.
Register with the distributed notification center to receive the overridden controls’ data from user actions.
Query for number of controls by control type (ExpressKeys, TouchStrip, > or TouchRing).
Query for number of functions of each control.
Enumerate the functions to find out which are available for override.
Set override flag for a control function that’s available.
Handle the control data notifications to implement functionality that the application desires for the control function.
Must destroy the context upon the application’s termination or when the application is done with it.
To create an override context for a tablet, send to the Tablet Driver an Apple Event of class / type {kAECoreSuite, kAECreateElement} with the keyAEObjectClass Param of the Apple Event filled with a DescType of cContext, the keyAEInsertHere Param filled with an object specifier of the index of the tablet (cWTDTablet) and the keyASPrepositionFor Param filled with a DescType of pContextTypeBlank.
To destroy a context, send to the Tablet Driver an Apple Event of class / Type {kAECore, kAEDelete} with the keyDirect Apple Event Parameter filled with an object specifier of the context’s (cContext) uniqueID (formUniqueID).
Most of this only makes sense in context of the documentation page where lots of C structs and helper functions are defined for both Carbon and Cocoa. (This particular part in the docs is pretty far down.)

Resources