Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

The API is not responding on android #1

Open
Chandrayee opened this issue Mar 19, 2015 · 3 comments
Open

The API is not responding on android #1

Chandrayee opened this issue Mar 19, 2015 · 3 comments

Comments

@Chandrayee
Copy link

I have installed this plugin using:
cordova plugin add org.chromium.bluetooth
Then I implemented the code following code in my index.html within the script tag.
function init() {
$("#btn-bt-discover").click(function(){
chrome.bluetooth.onDeviceAdded.addListener(function(device){
console.log(device)
})

        //bluetooth.startDiscovery(onSuccess)
       //chrome.bluetooth.startDiscovery(function(success){
        //  console.log(success)
        chrome.bluetooth.getAdapterState(function(adapterinfo){
            console.log(adapterinfo)
            console.log(chrome.run.lastError)
        })
 //})
    });
}
$(document).on("deviceready",init);

When I click on the "btn-bt-discover" button nothing happens. I am not able to see anything on chrome console log either.

@luisreyes
Copy link

Are you running the app through the App Development Tool? If so try running the app normally outside of the development tool.
i.e cca run android --device or --emulator

@Chandrayee
Copy link
Author

Hi, I am running it using Cordova as cordova run android

@jmorille
Copy link

jmorille commented Jul 8, 2015

I think that your problem is the same as #3

Look in your adb log to see the stacktrace.
In my case I have the stack with startDiscovery method, that do noting in the js apis bacause it in error before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants