<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>It seems to be more stable with build from the web, but it seems
      that callbacks are not called.</p>
    <p>Do i understand it well when i thing that if i register watcher
      e.g. <br>
    </p>
    <div style="background-color:#1e1f22;color:#bcbec4">
      <pre
      style="font-family:'JetBrains Mono',monospace;font-size:9,0pt;"><span
      style="color:#c77dbb;">deviceModel parameter, then my watcher should be called whenewer device model changes? E.g. when some braille device connects via bluetooth, then there is a new device name?
It seems that watcher is called immediately after registration, but not later, when there is connection or disconnection of braille device.
Thanks for answers
</span></pre>
    </div>
    <div class="moz-cite-prefix">On 11. 3. 2025 21:00, Peter Lecky
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:a70c4bc1-1c93-43e8-ae56-5233642424a1@stopka.sk">Hello,
      <br>
      <br>
      I have my own build of brlapi from latest stable release. Will try
      to use that older, which is on the web.
      <br>
      <br>
      Thank You
      <br>
      <br>
      On 11. 3. 2025 20:43, Dave Mielke wrote:
      <br>
      <blockquote type="cite">[quoted lines by Peter Lecky on 2025/03/11
        at 12:46 +0100]
        <br>
        <br>
        <blockquote type="cite">My code:
          <br>
          <br>
          Parameter.WatcherHandle
          h=connection.getParameters().deviceModel.watch(new
          ParameterWatcher() {
          <br>
              @Override public void onParameterUpdated(int i,long
          l,Object o) {
          <br>
                 U.i("parameterwatch","id:"+i);
          <br>
              }
          <br>
          });
          <br>
        </blockquote>
        I just executed this code successfully, i.e. I can't reproduce
        the problem. I also had a quick look at the underlying code and
        it looks right.
        <br>
        <br>
        <blockquote type="cite">the JNI crash:
          <br>
        </blockquote>
        [...]
        <br>
        <blockquote type="cite">  k.stopka.corvus: java_vm_ext.cc:616]
          JNI DETECTED ERROR IN APPLICATION:
          <br>
          input is not valid Modified UTF-8: illegal continuation byte
          0x7f
          <br>
            k.stopka.corvus: java_vm_ext.cc:616]     string: 'Ě>x'
          <br>
            k.stopka.corvus: java_vm_ext.cc:616]     input: '0xcc
          <0x7f> 0x3e 0x02 0x78'
          <br>
            k.stopka.corvus: java_vm_ext.cc:616]     in call to
          NewStringUTF
          <br>
            k.stopka.corvus: java_vm_ext.cc:616]     from long
          <br>
          org.a11y.brlapi.ConnectionBase.watchParameter(int, long,
          boolean,
          <br>
          org.a11y.brlapi.ParameterWatcher)
          <br>
        </blockquote>
        The UTF-8 is definitely bad, i.e. 0XCC can't be followed by
        0X7F.
        <br>
        <br>
        The "from long" makes no sense since the object for the
        primitive long type isn't involved.
        <br>
        <br>
        I'm wondering, therefore, if there might be a serious mismatch
        between the jar and the shared object for the JNI that you're
        using.
        <br>
        <br>
      </blockquote>
    </blockquote>
    <div class="moz-signature">-- <br>
      Peter Lecký
      Stopka n. o.</div>
  </body>
</html>