Forum Libraries, Components, and Plugins
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Acr.UserDialogs in a Service

Hi

Is it possible to use Acr.UserDialogs in an Android service class or from a broadcast receiver? My service does bluetooth stuff in the background for comms with a medical device, I wish to display alerts should the user turn off bluetooth. Toast .MakeText works, but I need something a little more obvious.

My issue is how to call Init - given that there is no activity.

Apologies if this is a daft question, I am new to Xamarin and to Mobile dev.

Regards

Nigel

Best Answer

  • KarenWKarenW USMember ✭✭✭
    Accepted Answer

    This is not possible - needs an activity (or an invisible activity) to be able to display dialogs from Acr.UserDialogs - just about the only thing a service can display on the UI is a toast.

Answers

  • KarenWKarenW USMember ✭✭✭
    Accepted Answer

    This is not possible - needs an activity (or an invisible activity) to be able to display dialogs from Acr.UserDialogs - just about the only thing a service can display on the UI is a toast.

Sign In or Register to comment.