问题
In my Xamarin.Forms.Page I have a DependencyService that must activate an activity in my .Droid project. How do I activate the Activity? I've tried
StartActivity(typeof(FacebookActivity));
but I get
Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
What do I have to initialize?
回答1:
Found out the problem. I have to put an explicit constructor
public FacebookActivity(){}
来源:https://stackoverflow.com/questions/28874892/xamarin-forms-start-an-activity-using-dependencyservice