{"id":8112,"date":"2022-12-14T09:09:57","date_gmt":"2022-12-14T09:09:57","guid":{"rendered":"https:\/\/www.beaconzone.co.uk\/blog\/?p=8112"},"modified":"2024-10-20T13:34:36","modified_gmt":"2024-10-20T13:34:36","slug":"background-scanning-on-android","status":"publish","type":"post","link":"https:\/\/www.beaconzone.co.uk\/blog\/background-scanning-on-android\/","title":{"rendered":"Background Bluetooth Scanning on Android"},"content":{"rendered":"\n<p>There was a time when it was very easy to scan for beacons in background on Android. You just set up a service using the standard Bluetooth APIs. Over the years, Google has crippled the ability to perform reliable background processing to the point where it&#8217;s nearly as bad as on iOS. <a rel=\"noreferrer noopener\" href=\"http:\/\/www.davidgyoungtech.com\/\" target=\"_blank\">David Young<\/a> says:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>&#8220;Today, Android Services are often more trouble than they are worth&#8221;<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>David has an answer to the problem in the form of using Android BroadcastReceivers and threads. He explains the problem and <a rel=\"noreferrer noopener\" href=\"http:\/\/www.davidgyoungtech.com\/2022\/06\/25\/the-rise-and-fall-of-the-foreground-service\" target=\"_blank\">solution on his blog<\/a>. David also has a <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/davidgyoung\/Serviceless\" target=\"_blank\">useful Github app<\/a> demonstrating the technique. <\/p>\n\n\n\n<p><a href=\"https:\/\/beaconzone.consulting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Read about custom solutions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There was a time when it was very easy to scan for beacons in background on Android. You just set up a service using the standard Bluetooth APIs. Over the years, Google has crippled the ability to perform reliable background processing to the point where it&#8217;s nearly as bad as on iOS. David Young says: &hellip; <a href=\"https:\/\/www.beaconzone.co.uk\/blog\/background-scanning-on-android\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Background Bluetooth Scanning on Android&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"_links":{"self":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/8112"}],"collection":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=8112"}],"version-history":[{"count":6,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/8112\/revisions"}],"predecessor-version":[{"id":9561,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/posts\/8112\/revisions\/9561"}],"wp:attachment":[{"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=8112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=8112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beaconzone.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=8112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}