Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
637 views
in Technique[技术] by (71.8m points)

api ai - Make google actions development project preview persist longer

I want to make google voice actions app for my Google Home. But, based on quick research, as of Dec 11, google does not allow private projects for Google Home.

References:

I understand that I can preview the app from API.ai project, and it deployes to the linked Google Home device.

API.ai preview

But the issue is, the deployed app does not persist. It is no longer available after hour or so. How can I make it permanent (if there is a way)?

UPDATE

Based on Leon's answer, I just wanted to extend the steps on how to enable the sample for 24 hours.

  1. Click on the "Google Home Web Simulator" link on bottom right corner.
  2. Then you will be presented with google home device - click on "Start" button on that page
  3. On next page, top right corner you have the "ACTION PACKAGE" button Leon is talking about. Click on that and extend expiration time by clicking on "Preview for 24 hours" button. See screenshot below:

Extend for 24 hours

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have found a way to create the Action on API.ai and then preview it indefinitely.

From API.ai:

  1. Open browser dev console (Network tab)
  2. Go to Integrations
  3. Turn on "Actions on Google" integration
  4. Click "Authorize"
  5. Click "Preview"
  6. Inspect the XHR response from https://console.api.ai/api/agent/googleassistant/preview in the Network dev console

    {  
      "status":{  
      "code":401,
      "errorType":"unauthorized",
      "errorDetails":"You are not authorized for this operation. ",
      "webhookTimedOut":false
       }
    }
    
  7. Copy/paste the content of the response into a file called action.json

Then, download and install the gactions CLI from here - gactions CLI and then run this command:

gactions preview --action_package action.json --preview_mins 9999999 
  --invocation_name [your_own_invocation_name_here] 

The preview_mins value of 9999999 makes the preview effectively indefinite.

Here is a video demonstrating it:

Export action.json from API.ai for Google Action


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...