java - How launch bluecove programmically -


i'm trying lunch bluetooth stack manually(after closing bluetooh stack).

i after bluecoveimpl.java , find out bluetooth stack initialized in

private bluetoothstack detectstack() 

method, trying call calling

bluecoveimpl.instance().getbluetoothstack();  

but exception occures:

exception in thread "main" java.lang.error: illegal use of jsr-82 api     @ com.intel.bluetooth.utils.islegalapicall(utils.java:296)     @ com.intel.bluetooth.bluecoveimpl.getbluetoothstack(bluecoveimpl.java:1023) 

i tried bluecoveimpl.instance(); bluecoveimpl.getthreadbluetoothstackid();

but made no effect.

how can launch bluecove?

the method

getbluetoothstack() 

does sort of security check calling

utils.islegalapicall 

http://bluecove.googlecode.com/svn/trunk/bluecove/src/main/java/com/intel/bluetooth/utils.java

this method checks if call done class out of these packages

  1. javax.bluetooth.
  2. getpackage(microeditionconnector.class.getname())

otherwise throws

error("illegal use of jsr-82 api") 

i think calling

localdevice.getlocaldevice() 

http://bluecove.org/bluecove/apidocs/javax/bluetooth/localdevice.html#getlocaldevice()

will initialize stack needed. see https://code.google.com/p/bluecove/wiki/stacks more information how bluecove determine correct stack , how can configuration using "bluecove.stack" system property.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -