Create custom google now cards

北战南征 提交于 2019-12-02 14:09:30

Actually Google announced last week that developers can now develop custom Google Now cards:

http://www.google.com/landing/now/integrations.html

However, a developer guide seems not available yet.

Edit: On the end of the page they point out that:

We'll let you know when we are able to onboard more partners

There is currently no way to do that. Google makes its own cards and custom application cannot register any cards. But I hope it will be possible in future.

There is a work-around that will soon allow you to place cards in Google Now's stream at a particular time or a particular location: Use Google Keep (https://drive.google.com/keep/)

You can create a new card at Google Keep with a time based or location based reminder, depending on which the relevant card will show up in Google Now.

Since Google Keep is now in Drive, the API is expected to be available soon (keep a lookout for it at http://discovery-check.appspot.com/ )

There is not way to do this by your own at the moment. If you really want to do it you can fill in this form: https://services.google.com/fb/forms/nowintegrations/. You can ask Google if they want to cooperate to create a Google Now card.

Note quite an answer, as it is still not possible to create Google Now cards, but you can now hook into the Google Now search function (basically Android's Siri) and provide custom search results. For example you can say "show me the lyrics to..." and it opens a lyrics app.

Here is a link to the project which is based on the Xposed framework.

Just guessing from my impression of the Google Search apk (which includes all the Google Now functionality and even the home screen on KitKat), it should be possible to use a similar technique to inject cards into the app - however since the app is huge and very complicated, it will be a lot of work. I'd keep my eyes open on the xda-developers forums, wouldn't be surprized if someone there solves this in the future.

It appears that there is developer documentation on how to push google now info via email, eg. flight details, restaurant reservations etc.

https://developers.google.com/schemas/now/cards

I have yet to dig into this, but may update this answer if I discover anything significant.

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