Atiar Talukdar
Atiar Talukdar

Reputation: 746

Is there any way to use google speech API (default free version) from android widget?

I'm trying to enable google speech API from the android widget. My idea is like if some click on a button from widget it will the API will start listening.

Upvotes: 1

Views: 64

Answers (1)

HeyAlex
HeyAlex

Reputation: 1746

AppWidgetProvider is just a BroadcastReceiver. Seems like google speech api need to bind to his service. But you can't bind to service from broadcast receiver. So the way is to use another service and bindService will work.

So just start your service (on button click from remoteViews) and make all your stuff with speech api here.

Upvotes: 1

Related Questions