MAUI Contact

This service is used to provide MAUI Essentials functionality to those using the trellispark MAUI application. Specifically the IPhoneDialer, IEmail, and ISms interfaces are used which allow the ability to open and use the devices phone dialer to call a number, open and use the devices default email application to send an email to a specific address, or open the devices default SMS messaging application to send a message to a specific number when using the MAUI application.

This service is registered as a singleton service in the website and hybrid projects.

All methods in this service will return a string. If the returned string is empty, then the operation was successful. Otherwise, there was an issue, and the error is logged. The returned string can be displayed in an error notification to give the user visual feedback that something went wrong.

This service implements the IGI_Contact interface and it’s reference name is ContactFunctions. Key properties and methods this service provides are the following:

  • bool IsAvailable – The value True is returned since the user is using the trellispark MAUI application.
  • Task<string> CallPhoneNumber(string phoneNumber) – When called this method will open the devices dialer and enter the passed phone number.
  • Task<string> ComposeEmail(string recipient) – When called this method will open the devices default email application and compose a new email to the passed address.
  • Task<string> ComposeSMS(string phoneNumber) – When called this method will open the devices messaging application and compose a new message to the passed phone number.

The images below are examples of what the methods above visually do

Updated on January 30, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment