Receive and respond to intents

Many apps use the android.speech.action.RECOGNIZE_SPEECH intent to use the Google app's voice to text service. I however don't have the Google app installed, so I am trying to make an app that will provide the voice-to-text functionality to other apps. I have gotten the recognition part done, how can I handle the intent?

you might want to try the Voice Recognition Extension without Google Dialogue by ScorpioNormal
see also the extensions directory here https://puravidaapps.com/extensions.php

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

The recognizer part of the currently works and looks like this: https://imgur.com/a/ofym0JO and it is powered by the Mozilla talktome API. I need to know how to make it so when other apps use android.speech.action.RECOGNIZE_SPEECH, my app opens to handle the intent.

Probably you will have to register a broadcast receiver.

How does that work? Can you link the docs?

When anything happens in android, it shares the action with other apps.It is called broadcast and if it is defined in android api then you can easily catch it else you will have to use any workaround.

It is not possible to listen to broadcasts so you need an extension for it.
However, I have no idea whether

provide a broadcast or not.

It does not provide a broadcast. It is launched by ordinary Android apps using startActivityForResult. I think what I need is an intent filter but Android dev isn't my strong suit, so I'm not sure.

If a specific action has intent defined in android then it is what we call broadcast because you can catch it using Intent Filter.

I downloaded a broadcast viewer and it did not appear as a broadcast. It is started as an activity, not with sendBroadcast.

It seems that this is not something I can do with app inventor, so I attempted to export the project and load it into java bridge to do the rest in java. However it appears that java bridge is out of date and incompatible with current app inventor projects. What is the best course of action? Should I decompile the built apk? Or can an extension do what I need? (handling and responding to intents)

OK, I looked at the source of @vknow360's CustomWebview extension to see how it handles intents for web links, and it appears that extensions will be able to do what I need.

Glad to hear that.
Also share the solution here.

I will once I write the extension. I have zero android dev experience, but I know java. I'll take a crack at it tomorrow.

UPDATE: The extension will work, it's not done yet tho.

Nevermind, found it.