Studio Pro Mendix Docs: Writing a TextToSpeech Promise action

Hi, I was wondering, is this guide only meant for responsive browsers? When i view the example in my browser it works fine, but when i run it in the MakeItNative app i keep getting the error "Possible Unhandled Promise Rejection (id:0)” & "TypeError: undefined is not an object”. Is this because i need to require it first? This is not made clear to me from the guide. Thanks
1 answers

Hi Richard,


I believe the reason it only works in the browser is because the javascript action leverages a HTML5 function:


The library it is using is only available when using web technology, so it’ll work in hybrid and responsive mode but not Native:

You’d have to use a different React Native library to achieve the same functionality. Something like this:

I hope this helps? I agree the documentation should have a warning. If you submit a feedback, i’m sure someone will pick it up and change it for you.