Android-Proximity-SDK icon indicating copy to clipboard operation
Android-Proximity-SDK copied to clipboard

Handle notifications in the background in an Application, Error in RequirementsWizardFactory requires activity

Open HazirahAslam opened this issue 7 years ago • 1 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:
    • My beacons have Estimote Monitoring enabled (Check it in the Estimote Cloud, or via app)
    • My Android device/devices supports BLE and has Android OS version >= 5.0.0
    • My Android device/devices have bluetooth enabled
    • My app has Location Permissions granted

Basic information

Estimote SDK version: [com.estimote:proximity-sdk:1.0.3]

Description

Handle notifications in the background in an Application, Error in RequirementsWizardFactory requires activity.

How to call RequirementWizardFactory in application class since its requires activity? Is there any sample or way to show notification or handle proximity observer in application class.

HazirahAslam avatar Sep 05 '18 07:09 HazirahAslam

RequirementsWizard is designed to display default dialogs to the users, prompting them to give access to the Bluetooth, or grant Location permissions. You can't display views in Application class, so this is why it requires an Activity. If you need a custom bluetooth/permissions checking mechanism, you can implement it in your own way, and use it in your Application class.

If you want to keep your ProximityObserver in the Application class, then why you not hold a reference there, and start it from any other Activity?

pawelDylag avatar Sep 05 '18 09:09 pawelDylag