Why result.setResultCallback(new ResultCallback<Status>() is not getting called?

881 Views Asked by At

Currently i am implementing App indexing for android, onCreate,onStart and onStop methods are being called correctly but, result.setResultCallback(new ResultCallback<Status>() is not being called. what can be the reason for this?

result.setResultCallback(new ResultCallback<Status>() {
        @Override
        public void onResult(Status status) {
            Log.d("onresult","in On Result");
            if (status.isSuccess()) {
                Log.d(AppIndexingActivity.class.getName(), "App Indexing API Recorded page " + mTitle + " view end successfully.");
            }
            else {
                Log.e(AppIndexingActivity.class.getName(), "App Indexing API: There was an error recording the page view." + status.toString());
            }
        }
});

not reaching at onResults ..

1

There are 1 best solutions below

1
On

if the specified url path is correct then whenever that url specified page is viewed on success the page is recorded .