How to send notification if the app is at the background in android?
问题 Currently I am working on bluetooth scan, that means I will keep scanning the device, if there is device nearby , I will show it on screen, however, if the app is at the background, I need to show notification to the user. And now my working logic is like this, there is a main class that fire the scan service, the scan service job is to return a list of scanned device. And the main class job is to display/ process the result. The code is like this: Service public class Detector extends