I have created a service interface:
public interface IMessageDialogService
{
void ShowDialog(object context,string title,string message,string buttonTitle);
}
I have implemented that interface on both Android and iOS. The context is only used on Android where an Android Context is needed to display a message dialog. I pass this interface into my ViewModel to be injected by IoC. My problem is in my platform independent ViewModel which calls a WebService and then handles the return value. It checks the return value for an error condition and needs to display a message dialog. iOS does not need any context to display a UIAlertView, but on Android how do I get a hold of an Android context to pass in as the first argument?
Is there an easier way to display a simple informational dialog from a ViewModel?