AltBeacon / spec

AltBeacon Technical Specification
http://altbeacon.org
208 stars 34 forks source link

App Killed, service starts but no beacon detection #16

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi, I have an app derived from the beacon reference app, neither of which detect beacons when the app has been killed despite the service starting (I can see that in the application manager). It all works great with the app running in the background it is simply if the app is killed that the notification that I want to display is not. The manifest is all set up as I can see the service start and stop on the intent actions. Is there something else that needs doing to get this to work. The reference app doesn't seem to do this either. I am running a Galaxy Alpha (4.4).

CODE SNIPPETS:

mBeaconManager.setBackgroundScanPeriod(1100l); mBeaconManager.setBackgroundBetweenScanPeriod(1100l);

public void didEnterRegion(Region arg0) { if (mMonitoringActivity != null) { mMonitoringActivity.didEnterRegion(arg0); }else{ showNotification() ; //this function is supposed to put a notification in the notification tray and does so if app in background running but not if app killed. } ..

Manifest (merged)

davidgyoung commented 9 years ago

@mbeacons, I believe that on Android you may not be able to display a notification until after an Activity has been launched.

If you need further help, please post questions on how to use the Android Beacon Library to stackoverflow.com, as this forum is reserved for feedback on the AltBeacon specification.