Skip to content

IntentUtils

Shanti Ranjan Das edited this page Jan 25, 2020 · 2 revisions
  • getOpenURLIntent(url: String): Intent
    Get open intent url.

  • openURL(url: String, selectionTitle: String, exceptionMessageIfOccurs: String?)
    open an url by throwing a url and a string exception msg. Requires Context to call this function.

  • getCallPhoneIntent(number: String): Intent
    Get call phone intent.

  • callPhone(context: Context, number: String, selectionTitle: String, exceptionMessageIfOccurs: String?)
    Call phone no. with provided number and exception msg if occurs. Requires Context to call this function.

  • getSendSMSIntent(number: String, body: String): Intent
    Get send SMS intent.

  • sendSMS(number: String, body: String, selectionTitle: String, exceptionMessageIfOccurs: String?)
    Send sms with string body, title and exception msg if occurs. Make sure you have necessary permission for sending an sms.

  • getEmailIntent(address: String, subject: String, content: CharSequence): Intent
    Get email Intent to send a email.

  • sendEmail(address: String, subject: String, content: CharSequence, selectionTitle: String, exceptionMessageIfOccurs: String?)
    Send an email with email address, subject and content, selection title and exception message if occurs.Requires Context to call this function.

  • toGooglePlaystore()
    Send directly to your app which is listed in Google playstore. It will redirect you to your page in Google playstore. Requires Context to call this function.

  • isGooglePlayInstalled(): Boolean
    Returns true if Google playstore is installed in your phone. Requires Context to call this function.

Clone this wiki locally