HERE Android SDK Developer's Guide

OnSendSMSListener

The interface OnSendSMSListener is a member of com.here.android.mpa.nlp.Nlp.

Interface Summary

public static abstract interface Nlp.OnSendSMSListener

   extends com.here.android.mpa.nlp.Nlp.ListenerBase

The send SMS event listener interface

[For complete information, see the section Interface Details]

Method Summary

Table 1. Methods in OnSendSMSListener
Methods

public abstract void onSendSMS (Error error, String message, String recipient)

A callback with the message to be sent to the specified recipient through SMS.

Interface Details

The send SMS event listener interface

Method Details

public abstract void onSendSMS (Error error, String message, String recipient)

A callback with the message to be sent to the specified recipient through SMS. Notes:

  • This feature requires Contacts, and SMS permissions from the users.
  • Contacts are loaded once during NLP initialization into memory. Any changes made thereafter will not be reflected until the next startup.
  • Contact's display name and nickname are used for recipient lookup. For example, for "send my location to mom" use case to work, user needs have a contact with display name "mom" or nickname "mom".
  • Levenshtein distance is used for recipient lookup with fault tolerance of 1 character. For example, if a contact has nickname, "mum", it will be matched to recipient "mom".
  • If the specified recipient is matched to multiple contacts, the first matched contact will be used and the first match may not be the best match. For example, first match is "mum" and second match is "mom" and the specified recipient is "mom", the first match will be used even though it's not the best match.

Parameters:

  • error

    NONE if SMS is successfully sent; otherwise FAILED

  • message

    The message for sending request; otherwise null.

  • recipient

    Recipient of the SMS.