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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -