Periodically scan for bluetooth devices on android -


i wonder how scan periodically bluetooth devices, when app closed? tried register receiver , tried not unregister in ondestroy() method, hope countinue working in background. when close app sends error:

are missing call unregisterreceiver()?

and there no more scanning. so, please, can tell me how this? maybe has services? send me on right path :)

you want create intent service responds intent have in filter (i apologize not remember intent). service run each time intent broadcast.

here docs create intent service

https://developer.android.com/training/run-background-service/create-service.html


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -