How to get subscription respond on webApp?

i added permissions to use ble apis like below

"id": "",
"version": "0.0.1",
"vendor": "ssafy",
"type": "web",
"main": "index.html",
"title": "test-rssi",
"icon": "icon.png",
"requiredPermissions": [

and made variables like this,
(all beacon names are "ESP" same and major&minor number different.)

var getRssiApi = 'luna://com.webos.service.bluetooth2/le/startScan';
var getBEACONParams = '{"subscribe": true,"name":"ESP"}'

but idk how to get Subscription responses...

Response :

"subscribed": true,
"returnValue": true,
"adapterAddress": "b8:27:eb:1b:4f:01",

and thats all.

by using WebOSServiceBridge, how can i get Subscription responses?

do i need to make js service or native service?
is making js service while running webApp possible?

i finally made my app receive real-time rssi datas,

by making JS service to subscribe


but I was not satisfied with refreshing rate...

idk how to keep Bluetooth2 API active.

Any solution?

can i use com.webos.service.activitymanager to


Hi @ChangyongAhn,

Below snippet is the sample code for subscribing response.

function test(){

       var bridge = new WebOSServiceBridge();
       var url = 'luna://com.webos.service.bluetooth2/le/startScan';
       var params = '{"subscribe":true,"name":"ESP"}';

       function callback(msg){
           var arg = JSON.parse(msg);

       bridge.url = url;
       bridge.onservicecallback = callback;, params);


1 Like