Hello.
I'm working on a Xamarin.Forms PCL Android project and am trying to restore alarms after boot-up by reading from a database and creating alarms (via AlarmManager).
I have a broadcast receiver set to run when the boot up is completed (android.intent.action.BOOT_COMPLETED).
That part works fine. The problem is I am trying to access the local SQLite database that is defined in the "Core" project as a static member.
In the OnReceive event I attempt to read from the database but I get the exception "You MUST first call Xamarin.Forms.Init(); prior to using it.
Problem is "Init()" requires an Activity and a Bundle. I have neither at this point in the broadcast receiver.
I'm a little confused. Any suggestions are appreciated.
Thanks in advance,
Mike