Git Product home page Git Product logo

search-samples's Introduction

search-samples

Sample code for integrating with Search to help grow your business.

search-samples's People

Contributors

devunwired avatar gkaldev avatar naokigoogle avatar narphorium avatar paolorotolo avatar tjohns avatar zayna-shahzad avatar zaynashahzad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

search-samples's Issues

Indexing doesn't work for Public content and Personal content

Steps to reproduce:

  1. Open the app-indexing project in Android Studio
  2. Launch the app indexing app on a device
  3. Run the following command from terminal:

adb -s 01a4968dd882b783 shell am start -a android.intent.action.VIEW -d "http://recipe-app.com/recipe/pierogi-poutine" com.recipe_app

  1. Add a note on the recipe activity that opens

Expected result
public and personal content should be indexed and searchable like described here: https://codelabs.developers.google.com/codelabs/app-indexing/#12

Actual result
content isn't indexable nor showing up google search results on the device

Please update to API 21 and Gradle 0.14.0.

Hi!
In order to make the sample app compatible with latest Android Studio (0.9.0) and Android Lollipop, please update API level to 21 and add Gradle 0.14.0 support.

Thank you.

adb command to launch voice command not working

Hello,

On step 3 where it says to execute this command:

adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION \
--es query "salad" com.recipe_app

If I execute it as a one single line, I get the following result:

>adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION \ --es query "salad" com.recipe_app
Starting: Intent { act=com.google.android.gms.actions.SEARCH_ACTION pkg= --es }
Error: Activity not started, unable to resolve Intent { act=com.google.android.gms.actions.SEARCH_ACTION flg=0x10000000 pkg= --es }

If I copy/paste it directly from the tutorial (two lines) I get the following result:

>adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION \
--es query "salad" com.recipe_appStarting: Intent { act=com.google.android.gms.actions.SEARCH_ACTION }

Plus I get the app prompted but not showing the results nor the filtered search as you can see here:
screenshot_20170630-094610

Any idea what am I doing wrong?
Thanks in advance!

Missing .gitignore means unwanted files

I'm doing the App Indexing codelab and I've noticed that all the sample code here contains local.properties files... You get warning from AS when importing the code because of course the SDK location is not the one defined in that file (points to some guy's Linux home folder). The repo also contains some .gradle and .idea folders and .iml files than shouldn't be there. Please clean up the repo.

AMP docs should specify whether fallback 'image' is OK for newsArticle

Relevant Stack Overflow: http://stackoverflow.com/questions/35710385/image-missing-and-required-wordpress-amp-structure-doesnt-add-image-attribute

I'm in the same situation. Thousands of posts on a site where I'm enabling AMP. Most of back-catalog has missing "featured image" in WP because the feature didn't exist at the time AND because some posts just don't have images (also applies to some new posts, though most have images because we make it a publishing condition now). Whenever there's no featured image the WP plugin does the right thing and leaves the 'image' field empty.

From what I can tell, this is acceptable from a schema.org perspective, and isn't an "error". Correctly, Webmaster Tools doesn't treat a missing image as an "error".

What it DOES do is treat it as an "issue" of type "Info: Invalid structured data element", and lists it along with errors in the AMP section of Webmaster Tools.

I want to get rid of these warnings, and it would be pretty easy to do so by setting a default image to go in that field of the structured data. This is exactly how we use Open Graph's image field for Facebook and friends, so our logo shows on posts with no image.

IS THAT ACCEPTABLE IN THE CONTEXT OF AMP?

That's the question I find unclear when reading the docs: https://developers.google.com/search/docs/data-types/articles

It says "The representative image of the article. Only a marked-up image that directly belongs to the article should be specified." but this doesn't clarify my question, nor does it express how warnings will constantly show if you fail to specify an image.

Obviously if I set a default image I risk people seeing our logo in the carousel and finding it useless, but from our perspective this is still better than not being shown at all. On the other hand if Google is going to PUNISH us somehow for re-using a generic image then it wouldn't be worth it at all.

Any clarity here would be very useful, a clarification in the docs would be even better.

Thanks for any feedback,

Using of deprecated API in AppIndexing sample

The AppIndexing sample uses the view/viewEnd API from AppIndexApi. These methods are marked as deprecated in the API documentation and it is suggested that start/end should be used instead.

Voice Command Does not work with unpublished apps

The overview has the following point

An existing Android app that you can publish in the Play Store. (optional)

This is misleading since I spent hours trying to make this run on my app and it did not. Any voice commands issued to Google Now could not be redirected to my app. I changed the namespace of the example app and tried to run it and the same thing happened.

The app is published on Play Store as "Recipe Sample" as a result the Google now only works for "Search for salad on Recipe Sample". I cannot change the label of the app and use that instead. This must be clearly mentioned in the tutorial.

Disconnecting ApiClient Kills ResultCallback

In the app-indexing sample, onStop() has the following code to end the indexing action and log the result:

final String TITLE = recipe.getTitle();
final Uri APP_URI = BASE_APP_URI.buildUpon().appendPath(recipe.getId()).build();

Action viewAction = Action.newAction(Action.TYPE_VIEW, TITLE, APP_URI);
PendingResult<Status> result = AppIndex.AppIndexApi.end(mClient, viewAction);

result.setResultCallback(new ResultCallback<Status>() {
    @Override
    public void onResult(Status status) {
        if (status.isSuccess()) {
            Log.d(TAG, "App Indexing API: Recorded recipe "
                    + recipe.getTitle() + " view end successfully.");
        } else {
            Log.e(TAG, "App Indexing API: There was an error recording the recipe view."
                    + status.toString());
        }
    }
});

mClient.disconnect();

The problem with this is that immediately disconnecting from the client means the ResultCallback will never fire, making it pointless. Either the ResultCallback should be removed from this sample, or the code should wait until the result is received to disconnect, a la:

result.setResultCallback(new ResultCallback<Status>() {
    @Override
    public void onResult(Status status) {
        if (status.isSuccess()) {
            Log.d(TAG, "App Indexing API: Recorded recipe "
                    + recipe.getTitle() + " view end successfully.");
        } else {
            Log.e(TAG, "App Indexing API: There was an error recording the recipe view."
                    + status.toString());
        }

        mClient.disconnect();
    }
});

Google Listing News Websites with Non Standard AMP Logos

The websites NDTV Scroll and times now are having non standard AMP Logos. Does these websites pay google to show their stories even when yhe logo is not as per standard. Google had given a documentation describing about logo. Action and words are different when cases of bigger companies come up

getAllRecipes() method is ambiguous

Hello,
there is an ambiguous method - getAllRecipes() in AppIndexingService.java. It is not clear what the implementation of this method should look like, or whether it is mandatory for this sample. Can you please advise?

Igor

android P Activity finish delay

my phone is android p. when I use Deeplink jump to my App, start a new Activity and finish it. it delay 3 - 4 s to back. I tested that all my mobile phones were the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.