简体   繁体   中英

Android - Google Assistant not providing the number for CREATE_CALL BII

I am trying to integrate CREATE_CALL BII I can trigger my app using the voice command “Call <CONTACT_NAME> on <APP_NAME>” but I am facing a problem that the BII is only sending me the CONTACT_NAME but not the PHONE_NUMBER even though that contact is in android native Addressbook.

Following is my action:

<action intentName="actions.intent.CREATE_CALL">
    <fulfillment urlTemplate="https://fit-actions.firebaseapp.com/call{?callFormat,name,telephone}">
        <parameter-mapping urlParameter="callFormat" intentParameter="call.callFormat"/>
        <parameter-mapping urlParameter="name" intentParameter="call.participant.name" />
        <parameter-mapping urlParameter="telephone" intentParameter="call.participant.telephone" />
    </fulfillment>
</action>

Action is working perfectly with

App Actions Test Tool

I am following https://developers.google.com/assistant/app/reference/built-in-intents/communications/create-call , even though I copied the same code from that link to my sample to make it work but I am getting the same result, the only name is there in my deep link but no phone number is there.

What I want to achieve the way Google Duo is doing shown in the following gif使用 Duo 拨打电话

App Actions doesn't know how to look up additional information about the contact in the query. The phone number is only provided if it was spoken in the request.

If you need a phone number for the contact, you will have to write code to query your address book using the name provided in the user's query. You might find that the user's query is not specific enough to locate one specific contact, and in that case, you will have to provide a UI to disambiguate the request (eg if there are two people named "Lee", the user will need to be able to choose which one they meant).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM