Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented in-app search with Google Assistant #2

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

mgborowiec
Copy link
Owner

This pull request implements the “Get thing” built-in intent (https://developers.google.com/assistant/app/reference/built-in-intents/common/get-thing) to enable users to use the in-app search of AntennaPod directly from the Google Assistant with queries of type “Search for BBC on AntennaPod”.

It can be tested with the App Actions test tool plugin in Android Studio (https://developers.google.com/assistant/app/test-tool). App Actions are supported on Android 5 (API level 21) and higher, and can only be tested with a physical device.

@@ -542,40 +544,54 @@ public Snackbar showSnackbarAbovePlayer(int text, int duration) {
}

/**
* Handles the incoming deep link and loads the relevant fragment.
* By default, opens the "Add Podcast" feature.
* Handles the deep link incoming via App Actions and according to the query
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: What about splitting the long sentence, e.g., like

Handles the deep link incoming via App Actions. Performs an in-app search or opens the relevant feature of the app depending on the query.

}
switch (uri.getPath()) {
case "/search":
String query = uri.getQueryParameter("query");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider to extract a method for this case?

break;
default:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not needed anymore?

@mgborowiec mgborowiec merged commit ec12286 into appActions Sep 9, 2020
mgborowiec added a commit that referenced this pull request Sep 10, 2020
* Implemented in-app search with Google Assistant

* Updated a comment to split long sentences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants