1 Reply Latest reply on Mar 17, 2019 1:21 PM by Dmitry Prokhorov

    TC51 Cannot discovery Bluetooth printer ZQ320 pls Help

    Amornsak Kornlikhitpaisarn

      my TC51 using Android API 26

       

      1. I already added AndroidManifest.xml

      <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
      <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
      <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
      <uses-permission android:name="android.permission.BLUETOOTH"/>

       

      2. also added code to my activity

       

      try {

        System.out.println("Looking for Printer");
         BluetoothDiscoverer.findPrinters(BluetoothDiscovery.this, new DiscoveryHandler() {

         @Override
         public void foundPrinter(DiscoveredPrinter discoveredPrinter) {

        System.out.println("Found Printer");
         }

       

         @Override
         public void discoveryFinished() {

        System.out.println("Done Find");
         }

       

         @Override
         public void discoveryError(String s) {

        System.out.println("Error Printer "+s);
         }

        });
      } catch (ConnectionException e) {

        System.out.println(e.getMessage());
      }

       

       

      Callback work only discoveryFinished

       

      Cannot find any printer. What else i have to do? i missed something?

       

      ps. I test with ZebraDemo and it works

       

       

      Thank you