private void MessageQuickActionsButton_Tapped(object sender, EventArgs e) { HideQuickActionControls(); Image image = (Image)sender; ContactFieldItem item = image.BindingContext as ContactFieldItem; if (item != null) { Actions.ComposeSms(item.Value, string.Empty, this); } }
private void PhoneCallQuickActionsButton_Tapped(object sender, EventArgs e) { HideQuickActionControls(); Image image = (Image)sender; ContactFieldItem item = image.BindingContext as ContactFieldItem; if (item != null) { Actions.DialPhone(item.Value, this); } }
private async void ContactListView_ItemTapped(object sender, ItemTappedEventArgs e) { HideQuickActionControls(); ContactFieldItem item = e.Item as ContactFieldItem; if (item != null) { if (item.Key.Contains("MOBILE")) { return; } if (item.Key.Contains("EMAIL")) { Actions.ComposeEmail(item.Value, string.Empty, string.Empty, this); } else if (item.Key.Contains("WEBSITE")) { Actions.VisitWebsite(item.Value, this); } else if (item.Key.Contains("NUMBER")) { Actions.DialPhone(item.Value, this); } else if (item.Key.Contains("ADDRESS")) { // Apple store asks to have the location permissions asked for even for firing the maps app, but play store doesn't, so just do it for iOS. if (Device.RuntimePlatform == Device.iOS) { var results = await DependencyService.Get <IPermissions>().VerifyPermissionsAsync(false, PermissionType.Location); if (results == null || results[PermissionType.Location] != PermissionStatus.Granted) { return; } } Actions.LocateAddressOnMap(item.Value, this); } } }