Contact

The novomind iAGENT Mail module of this SDK provides the functionality to create tickets in various formats.

iOS

Present contact

This method displays the contact view controller inside a navigation controller with full screen view

presentContact(parentViewController: UIViewController, animated: Bool, mailContactCustomParameters: [(String, String)])
  • parentViewController: parent view controller that will hold the navigation controller of the novomind iAGENT view controller
  • animated: display the view controller with animation or not
  • mailContactCustomParameters: custom parameters to be sent with the mail, in the message body

mailContactEmailInput, mailContactEmailInputEnabled and mailContactAttachmentsEnabled in CustomiAGENTConfiguration used in SDK initialization are used in this view controller.

Integrate contact form in custom view

You can use our API if you want to send a request using your own UI:

SendContactApi.start(senderEmail: String, carbonCopyEmail: String, subject: String, messageText: String, messageHtml: String, mailContactCustomParameters: [(String, String)], attachments: [AttachmentData], completionBlock:@escaping (_ res:String?, _ error:String?)->Void)
  • attachments: array of AttachmentData, holding files to be attached with the mail

AttachmentData contains:

  • fileName String: name of the file
  • fileType String: type of the file, eg: image/png
  • fileExt String: extension of the file
  • fileData Data: file data

Android

Present contact

public void presentContact(Context context, ArrayList<Pair<String, String>> mailContactCustomParameters)
  • context: application context
  • mailContactCustomParameters: custom parameters to be sent with the mail, in the message body

mailContactEmailInput, mailContactEmailInputEnabled and mailContactAttachmentsEnabled in CustomiAGENTConfiguration used in SDK initialization are used in this activity.

Integrate contact form in custom view

If you want to send a request using your own UI, please implement ApiProtocol in your Activity, then create instance of SendMailApi:

SendMailApi api = new SendMailApi(this);
public void start(String senderEmail, String carbonCopyEmail, String subject, String messageText, String messageHtml, ArrayList<Pair<String, String>> mailContactCustomParameters, ArrayList<File> files)

By implementing the ApiProtocol you can react on listeners to check the status of your request.