public static void UserAuthenticated(User user) { //TODO: Xamarin.Insights.Identify() //The UID can be any identifier you use to identify a user. Email can be a good option //The Table parameter allows you to send any other traits about your users. //Check Insights.Traits for some reccomended/supported traits. //Feel free to track any additional data you need to about your user throw new NotImplementedException (); }
public UserInformationPage () { BindingContext = new User (); var stack = new StackLayout { VerticalOptions = LayoutOptions.FillAndExpand }; var name = new Entry {Placeholder = "Name"}; name.SetBinding (Entry.TextProperty, "Name"); stack.Children.Add (name); var email = new Entry {Placeholder = "Email"}; email.SetBinding (Entry.TextProperty, "Email"); stack.Children.Add (email); var photoUrl = new Entry {Placeholder = "Photo Url"}; photoUrl.SetBinding (Entry.TextProperty, "ImageUrl"); stack.Children.Add (photoUrl); var button = new Button { Text = "Play Game", Command = new Command(()=>{ //TODO: report user Analytics.UserAuthenticated(BindingContext as User); Navigation.PushModalAsync(new LockScreen()); }) }; stack.Children.Add (button); ScrollView scrollview = new ScrollView { Orientation = ScrollOrientation.Vertical, VerticalOptions = LayoutOptions.FillAndExpand, Content = stack }; this.Content = new StackLayout { Children = { scrollview } }; }