Google Assistant working only my real device

Viewed 74

I made a sample application for test google assistant. I uploaded my app into google play, downloaded it and it's working perfect on my phone. On the other hand I tried this app on other real devices and its not working. Application opening but I can't use app features.

My actions XML:

<?xml version ="1.0" encoding ="utf-8"?><!--  Learn More about how to use App Actions: https://developer.android.com/guide/actions/index.html -->
<actions>
    <action intentName="actions.intent.OPEN_APP_FEATURE">

        <fulfillment urlTemplate="https://trivias.page.link/open{?featureName}">
            <parameter-mapping
                intentParameter="feature"
                urlParameter="featureName" />
        </fulfillment>
        <parameter name="feature">
            <entity-set-reference entitySetId="FeatureEntitySet" />
        </parameter>
    </action>

    <entity-set entitySetId="FeatureEntitySet">
        <entity
            name="Open cat facts"
            identifier="Open cat facts" />
        <entity
            name="Open dog facts"
            identifier="Open dog facts" />
        <entity
            name="Open bird facts"
            identifier="Open bird facts" />
        <entity
            name="Open general facts"
            identifier="Open general facts" />
        <entity
            name="Surprise me"
            identifier="Surprise me" />
    </entity-set>
</actions>

My handler :

fun Intent.handleIntent() {
    when(action) {
        Intent.ACTION_VIEW  -> handleDeepLink(data)
        else -> gotoDefaultView()
    }
}
private fun gotoDefaultView() {

}
private fun handleDeepLink(data: Uri?) {
    when(data?.path) {
        "/open" -> {
            val featureType = data.getQueryParameter("featureName").orEmpty()
         
            useFeature(featureType)

        }
    }
}
0 Answers
Related