title: how to convert android.bluetooth.socket inputstream to python string in Kivy?
body: <p>I'm working on Kivy app.</p>
  
  <p>Since I want to get data from bluetooth adapter, I used code below.</p>
  
  <pre><code>from kivy.app import App
  from kivy.uix.label import Label
  from kivy.uix.scatter import Scatter
  from kivy.properties import ObjectProperty,NumericProperty
  from kivy.clock import Clock
  from kivy.lang import Builder
  from jnius import cast,autoclass
  from kivy.logger import Logger
  
  BluetoothAdapter = autoclass('android.bluetooth.BluetoothAdapter')
  bufferedreader = autoclass('android.bluetooth.BluetoothAdapter')
  BluetoothDevice = autoclass('android.bluetooth.BluetoothDevice')
  BluetoothSocket = autoclass('android.bluetooth.BluetoothSocket')
  InputStreamReader = autoclass('java.io.InputStreamReader')
  BufferedReader = autoclass('java.io.BufferedReader')
  UUID = autoclass('java.util.UUID')
  StringBuilder = autoclass('java.lang.StringBuilder')
  
  Builder.load_string('''
  &lt;bluetooth&gt;:
      Button:
          pos:root.width/3,root.height/2
          text: root.data
          size: (300,100)
  
  
  ''')
  
  class bluetooth(Scatter):
      socket = ObjectProperty(None,allownone = True)
      data = ObjectProperty('getting data',allownone = True)
      recv = ObjectProperty(None,allownone = True)
      counter = NumericProperty(0)
  
      def change_data(self,dt):
          Logger.info('Im in the change_data!!')
          self.data = 'change_data'
          paired_devices = BluetoothAdapter.getDefaultAdapter().getBondedDevices().toArray()
          for device in paired_devices:
              self.data = str(device.getName())
              Logger.info('Im in the loop!!'+str(device))
              if device.getName() == 'HC-06':
  
                  self.socket = device.createRfcommSocketToServiceRecord(UUID.fromString('00001101-0000-1000-8000-00805F9B34FB'))
                  bufferedreader = BufferedReader(InputStreamReader(self.socket.getInputStream(),"UTF-8"))
  
                  StringBuilder.append(bufferedreader.read())
                  self.data = StringBuilder.toString()
  
          #if self.socket == None:
          #   pass
          #else:
          #   self.socket.connect()
  class myApp(App):
      def build(self):
          bt = bluetooth()
          Clock.schedule_interval(bt.change_data,1)
          return bt
  myApp().run()
  </code></pre>
  
  <p>Maybe I missed some code..
  I can't find out how to get bluetooth.socket inputstream to python string.
  Can someone please help?</p>