Skip to content

iBeacon's sensor doesn't work properly on Glass. #10

@Exal117

Description

@Exal117

Hi, i was trying to set on the ibeacon sensor for glass and the code on this documentation doesn't work.
The code:

WS.sensorOn(WS.sensor('ibeacon'), 1000).

The error:

WebView: Uncaught Error: Error calling method on NPObject. -- From line 1 of

I found a possible solution here:

WS.beaconOn();
WS.subscribe('ibeacon', function (channel, uuid, rssid, major, minor, proximity) {
    WS.log(channel + ' ' + uuid + ' ' + rssid + ' ' + major + ' ' + minor + ' ' + proximity)           
    WS.say(proximity)
})

but it doesn't work either, it says:

WebView: Uncaught TypeError: Object #<WearScript> has no method 'beaconOn' -- From line 27 of file:///storage/emulated/0/wearscript/scripting/glass.html

Finally, the solution appears to be here

I would like to know which is the correct way, or if there is some kind of unknown problem.

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions