java - How can I make a service that activates over bluetooth? -


i have made myself familiar how services work , how bluetooth works. code works if in app, want work when not open.

so want make service. when running app open bluetoothsocket , wait until other device sends it's ready.

here questions:

  1. would opening bluetoothsocket device in service long it's nearby big battery issue?

  2. is there downside leaving socket up?

  3. would listening inputstream whole day drain lot of battery? assume so, , if yes there better way activate service?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -