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

Can't get voice search result in onActivityResult inside Fragment #24

Open
vkotovv opened this issue Jan 23, 2020 · 0 comments
Open

Can't get voice search result in onActivityResult inside Fragment #24

vkotovv opened this issue Jan 23, 2020 · 0 comments

Comments

@vkotovv
Copy link
Contributor

vkotovv commented Jan 23, 2020

Currently voice search is initiated via this call:

activity.startActivityForResult(intent, REQUEST_VOICE_SEARCH);

Currently this is an implementation detail and cannot be overridden.

But if we want to get result in Fragment's onActivityResult(), we need to call startActivityForResult from Fragment. Otherwise we will not get the results (see this answer on SO).

In my case I had to modify the source code to get the desired behaviour (I have a Fragment with SimpleSearchView, not Activity). I think it makes sense to support this case in the library.

Library version: 0.1.4

@vkotovv vkotovv changed the title Can't get voice search result in onActivityResult inside Fragments Can't get voice search result in onActivityResult inside Fragment Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant