// Handle the completed intent (required). public void HandleSendMessage(INSendMessageIntent intent, Action <INSendMessageIntentResponse> completion) { // Implement your application logic to send a message here. var userActivity = new NSUserActivity("com.trinetix.handlemessage"); // Define details var info = new NSMutableDictionary(); info.Add(new NSString("message"), new NSString(intent.Content)); // Populate Activity userActivity.UserInfo = info; // Add App Search ability //userActivity.EligibleForHandoff = true; //userActivity.EligibleForSearch = true; //userActivity.EligibleForPublicIndexing = true; //userActivity.BecomeCurrent(); // Assemble response and send it var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.InProgress, userActivity); completion(response); }
// Handle the completed intent (required). public void HandleSendMessage(INSendMessageIntent intent, Action <INSendMessageIntentResponse> completion) { // Implement your application logic to send a message here. var userActivity = new NSUserActivity("INSendMessageIntent"); var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Success, userActivity); completion(response); }
public void ConfirmSendMessage(INSendMessageIntent intent, Action <INSendMessageIntentResponse> completion) { // Verify user is authenticated and your app is ready to send a message. var userActivity = new NSUserActivity("INSendMessageIntent"); var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Ready, userActivity); completion(response); }
public void ConfirmSendMessage (INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion) { // Verify user is authenticated and your app is ready to send a message. var userActivity = new NSUserActivity (nameof (INSendMessageIntent)); var response = new INSendMessageIntentResponse (INSendMessageIntentResponseCode.Ready, userActivity); completion (response); }
// Handle the completed intent (required). public void HandleSendMessage (INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion) { // Implement your application logic to send a message here. //var userActivity = new NSUserActivity (nameof (INSendMessageIntent)); var userActivity = new NSUserActivity ("com.appracatappra.askquestion"); // Define details var info = new NSMutableDictionary (); info.Add (new NSString ("question"), new NSString (intent.Content)); // Populate Activity userActivity.Title = "Ask Eliza a Question"; userActivity.UserInfo = info; // Add App Search ability userActivity.EligibleForHandoff = true; userActivity.EligibleForSearch = true; userActivity.EligibleForPublicIndexing = true; userActivity.BecomeCurrent (); // Assemble response and send it var response = new INSendMessageIntentResponse (INSendMessageIntentResponseCode.InProgress, userActivity); completion (response); }