Cordova Slack Digest

Wed, 07 Dec 2022 08:21:21 GMT

User count: 4726

Join the conversation at slack.cordova.io

Channel #cordova-ios (1 messages)


Tue, 06 Dec 2022 13:55:16 GMT

@mario.kurzweil says

Hello, hopefully everyone is doing well 🙂 I’m currently facing some issue with tts after the update of iOS 16. My goal is, that the message of push notification should be automatically spoken. Here is my code snippet:


NSString *speakMessage = [additionalData valueForKey:@"reactTTSmsg"]; NSString *speakLanguage = [additionalData valueForKey:@"reactTTSlang"]; NSString *substrSpeakLanguage = @""; if (speakLanguage.length != 0 &amp;&amp; speakLanguage != nil &amp;&amp; speakMessage.length != 0) { substrSpeakLanguage = [speakLanguage substringWithRange:NSMakeRange(0, 2)]; } if (speakMessage.length == 0) { speakMessage = @"Content not available"; substrSpeakLanguage = @"en"; } // source: <https://stackoverflow.com/a/19200177/2352067> AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayback error:nil]; [session setActive:YES error:nil]; // source: <https://stackoverflow.com/a/41327252/2352067> AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init]; AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:speakMessage]; utterance.volume=1.0f; // relative volume! utterance.rate=0.4f; utterance.pitchMultiplier=0.7f; utterance.postUtteranceDelay = 0.2f; // overview of all supported languages: <https://gist.github.com/Koze/d1de49c24fc28375a9e314c72f7fdae4> // de or de-DE both will output the text correctly utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:substrSpeakLanguage]; [synthesizer speakUtterance:utterance]; NSLog(@"testing push notification already recieved");``` Log output: ```2022-12-06 14:51:13.361093+0100 REACT[5119:1421826] Notification received 2022-12-06 14:51:13.361256+0100 REACT[5119:1421826] Push Plugin key: alert 2022-12-06 14:51:13.361385+0100 REACT[5119:1421826] Push Plugin key: sound 2022-12-06 14:51:13.361474+0100 REACT[5119:1421826] Push Plugin key: content-available 2022-12-06 14:51:13.361581+0100 REACT[5119:1421826] Speak the message 2022-12-06 14:51:13.365087+0100 REACT[5119:1421826] testing push notification already recieved 2022-12-06 14:51:13.367797+0100 REACT[5119:1421826] {"additionalData":{"reactTTSenable":"true","gcm.notification.vibrate":"1","google.c.a.e":"1","reactTTSlang":"de-DE","google.c.fid":"esWd_8flOkwJlcyn_UiUpQ","gcm.message_id":"1670334673067212","google.c.sender.id":"238497043503","foreground":true,"coldstart":false,"reactTTSmsg":"Brandalarm","reactTTSos":"iOS","content-available":1,"gcm.notification.notid":"1670334673","criticalPush":"false"},"message":"POSTMAN BC600-Test-mea-IT\n\nBrandalarm - Handfeuermelder\n100/1\nAm LIF601-1 - Text der Gruppe 100\nBox 1 - erster Schalter LINKS\n2022-05-11 20:01:03","title":"POSTMAN Brandalarm","sound":"no_sound.wav"} 2022-12-06 14:51:13.371191+0100 REACT[5119:1421826] didReceiveNotification with fetchCompletionHandler 2022-12-06 14:51:13.452778+0100 REACT[5119:1424843] [AXTTSCommon] File file:///var/MobileAsset/AssetsV2/com_apple_MobileAsset_Trial_Siri_SiriTextToSpeech/purpose_auto/a56b3e3ae835db6d093c7bb3e16229a6c8df5fd3.asset/AssetData/vocalizer-user-dict.dat contained data that was not null terminated 2022-12-06 14:51:13.459114+0100 REACT[5119:1424843] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=u 2022-12-06 14:51:13.459305+0100 REACT[5119:1424843] [AXTTSCommon] MauiVocalizer: 11018 (Ruleset parse failed: Ignoring trailing string): trailingString=\e\\lang=ENG\\\e\\toi=lhp\\'wAp\e\\toi=orth\\\e\\lang=default\\" 2022-12-06 14:51:13.512450+0100 REACT[5119:1424843] [AXTTSCommon] MauiVocalizer: 11018 (Ruleset parse failed: Ignoring trailing string): trailingString="``` I’m getting the push notification, but tts is not working. Worked fine on previous ios versions. I’ve read a lot that I should move the declaration of ```AVAudioSession *session = [AVAudioSession sharedInstance];``` but it doesn’t work …

Channel #cordova-android (1 messages)


Tue, 06 Dec 2022 10:28:15 GMT

@jesper says

After upgrading to

&lt;preference name="android-targetSdkVersion" value="32" /&gt;```
For Android 12 my Android 9 emulators shows blank screen all of a sudden? (dom element has been loaded perfectly it seems, but not shown visually)

Anyone else experienced anything like this?

Setting css:

```.ion-page {
    width: 100% !important;
    height: 100% !important;
  }```
Fixes it…. just weird, but might be an error from my side somehow 😄
Seems position: absolute; top:0, right:0, left:0, bottom:0 somehow gets turned into inset: 0…. 🤷