Search contact by name recognized from input speech (exper)

Post your questions and help other users.

Moderator: Martin

Post Reply
Posts: 14
Joined: 11 Nov 2013 21:11

Search contact by name recognized from input speech (exper)

Post by etaon » 22 Nov 2013 08:53

Help please to create script
input speech (Experimental) gave me value with text (name of contact)
need search contact witn name(value) in database android and extract number of phone or other info.
I try do it with ... in-android
or like this code (i know, that search name by number)

Code: Select all

Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(contactNumber));
ContentResolver cr = getContentResolver();
Cursor c = cr.query(uri, new String[] {BaseColumns._ID, ContactsContract.PhoneLookup.DISPLAY_NAME }, null, null, null);

String contactName;

try {
    if (c != null && c.getCount() > 0) {
        contactName = c.getString(c.getColumnIndex(ContactsContract.Data.DISPLAY_NAME));
} finally {
    if (c != null) {
Ok. Scripts in program dont be work with this code.
How can i do it? Run outdoor scripts in storage/scripts?

Post Reply