Exemple #1
0
 _onSearchButtonClick: function btdpp__onSearchButtonClick() {
   Debug('_onSearchButtonClick():');
   BtContext.startDiscovery().then(() => {
     Debug('_onSearchButtonClick(): startDiscovery successfully');
   }, (reason) => {
     Debug('_onSearchButtonClick(): startDiscovery failed, ' +
           'reason = ' + reason);
   });
 },
Exemple #2
0
      onShow: function() {
        debug('onShow():');

        if (!this._leftApp) {
          // If settings app is still in the forground,
          // we start discovering device automatically
          // while Bluetooth panel is onShow.
          BtContext.startDiscovery().then(() => {
            debug('onShow(): startDiscovery successfully');
          }, (reason) => {
            debug('onShow(): startDiscovery failed, ' +
                  'reason = ' + reason);
          });
        }
        this._leftApp = false;
      },