how to integrate app action using actions.xml?

孤者浪人 提交于 2019-12-08 00:36:41

问题


I am trying to build a build-in-intent[actions.intent.CHECK_AIR_QUALITY]. I have already added the actions.xml in my project. Here is the code:

<?xml version ="1.0" encoding ="utf-8"?><!--  Learn More about how to use 
App Actions: https://developer.android.com/guide/actions/index.html -->
<actions>
    <!--Example Action -->
    <action intentName="actions.intent.CHECK_AIR_QUALITY">
    <action-display
        label="Check quality"
        />
    <fulfillment urlTemplate="https://www.google.co.in/order{?drop}">
        <parameter-mapping
            intentParameter="drop"
            urlParameter="drop" />
    </fulfillment>
    </action>
</actions>

Here I put a sample url in the place of urlTemplate . But after I install the app in my device the below option(APP ACTION TEST TOOL) is not coming. Here is the video link where I have taken the screen shot.

So I do R&D on that and I have found some link for the conversational action of google codelabs.

Please let me know if you need more information.


回答1:


At Google I/O 2019, some updates were posted about App Actions. The menu item you're looking for is enabled by installing the App Actions Test Tool plugin which you can find in the Android Studio plugin marketplace by searching for "App Actions" (web link).

  • Official documentation
  • Google I/O 2019 session on App Actions (video)
  • Sample application on github


来源:https://stackoverflow.com/questions/53757510/how-to-integrate-app-action-using-actions-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!