Android Question issue with SetActivityAttribute(ListenToCommands, android:noHistory, "true")

RichyK68

Active Member
Licensed User
Longtime User
Hi,

I have a main activity with a button which starts an activity called ListenToCommands. This uses the VoiceRecognition object and is working great. However, I don't want this sub-activity to show in history. So I thought I'd use this:

SetActivityAttribute(ListenToCommands, android:noHistory, "true")

I do the same with my Settings activity. This works fine, but the ListenToCommands activity's VoiceRecognition event of Result is never called when the VR completes. If I take the above line out of the manifest, my code behaves as normal.

Why would the VR Result event never fire with this line in the manifest? I've stepped through the code and it is definitely initializing the object, it's exactly the same code that runs with or without the additional line in the manifest. The end result is different, however.

Any ideas?

Thank you :)

Richard
 

RichyK68

Active Member
Licensed User
Longtime User
I'm calling Activity.Finish afterwards but the activity, which isn't the main one, shows in my task history, but I don't want it to. So I use the attribute to tell it not to appear in the history. But then the VR event never gets raised, even though the activity shows and goes through its paces. It doesn't make sense why the event wouldn't get raised, I'm only telling it to not keep the activity in the history stack. I'll have to look for another way...
 
Upvote 0
Top