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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -