0

I want to do BroadcastReceiver class and implementation of some commands I implemented class but and not found the filter to make onReceived method work only when received data via Bluetooth

How can I do the filter that allow to onReceived method work only when received data via Bluetooth?

  • you can add a filter in the androidmanifest.xml file...you should also probably follow this questions answer step by step to implement a broadcast receiver http://stackoverflow.com/a/8875292/3731795 – penduDev Sep 04 '16 at 09:47
  • Possible duplicate of [Android Broadcast Receiver bluetooth events catching](http://stackoverflow.com/questions/30222409/android-broadcast-receiver-bluetooth-events-catching) – Rajen Raiyarela Sep 04 '16 at 09:58
  • Please understand me , I just want filter who used to work function 'onreceived' work only when android phone receive Bytes via Bluetooth @penduDev – Ahmed Safaa Sep 04 '16 at 10:01
  • This does not work when receiving data @RajenRaiyarela – Ahmed Safaa Sep 04 '16 at 10:04
  • can you also put relevant bits of code in this question for better understanding? – penduDev Sep 04 '16 at 10:16
  • a common mistake people make is using LocalBroadcastReceiver instead of using a global BroadcastReceiver...you can google about it – penduDev Sep 04 '16 at 10:20

0 Answers0