I DID IT!!! I DID IT!!! I DID IT!!!
I didnt get dizzy, pass out, OR fall over. Not even ONCE :D
OK so....the trick to detecting keyboard with AutoInput was via a Profile, not a Task, so, ive made 2 profiles and 2 tasks:
Profile 1, launches Task 1 which enables Profile 2 when "OK Google" is spoken to the phone.
Profile 2 then performs the AutoInput virtual keyboard present test, if its positive, its launches Task 2, which reports error detected and auto launches OK Googles voice command screen:
Profile 1 Step 1
Profile: AV:OK GOOGLE FAIL (331)
Event: AutoVoice Recognized [ Configuration:Easy Commands: ok google ]
Enter: OK GOOGLE Error ON (334)
A1: Profile Status [ Name:*Set Moon Image Set:On ]
Task 1 Step 2
OK GOOGLE Error ON (334)
A1: Profile Status [ Name:AI:OK GOOGLE ERROR Set:On ]
Profile 2 Step 3
Profile: AI:OK GOOGLE ERROR (335)
Event: AutoInput UI Action [ Configuration:Action Types: Input Element Focused,Input Element Focus Lost ]
Enter: OK GOOGLE ERROR (336)
A1: If [ %aifocus ~ true ]
A2: Beep [ Frequency:420 Duration:1000 Amplitude:100 Stream:3 ]
A3: Say [ Text:Failure detected Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A4: Launch App [ App:OK Google Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
A5: End If
A6: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ]
A7: Profile Status [ Name:AI:OK GOOGLE ERROR Set:Off ]
Task 2 Step 4 final
OK GOOGLE ERROR (336)
A1: If [ %aifocus ~ true ]
A2: Beep [ Frequency:420 Duration:1000 Amplitude:100 Stream:3 ]
A3: Say [ Text:Failure detected Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A4: Launch App [ App:OK Google Data: Exclude From Recent Apps:Off Always Start New Copy:Off ]
A5: End If
A6: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ]
A7: Profile Status [ Name:AI:OK GOOGLE ERROR Set:Off ]
I had to sit in front of my phone and bark out "OK Google" for 10 minutes before it errored and proved the set of Profiles and Tasks to be working but it seems to be problem free!
Whatcha guys think :)