AEM Forms App MobileWorkspace: Running APK in Emulator throwing "Uncaught TypeError: text.replaceAll is not a function"
Using adobe-lc-mobileworkspace-src-2.5.22 APK (AEM Forms App)
Android Studio Hedgehog | 2023.1.1 Patch 1 running on Windows 10 Desktop
Galaxy Tab S7 FE API 33 (Emulator) - We use that Tablet for our application (our employees)
I had to futz with the Gradle version (upgraded to 4.10.3/3.3.3) to get the APK to build - compatibility with Android Studio - but seems fine.
When accessing one of start points (that has been unmodified for several years) and works fine using the standard APK on our existing tablets... I get this error.
[INFO:CONSOLE(39890)] "Uncaught TypeError: text.replaceAll is not a function", source: http://fincare-dev.healthcareit.net:8080/lc/etc.clientlibs/fd/xfaforms/clientlibs/profile.js (39890)
The cordova.js has a standard fix (shim of sorts)
String.prototype.replaceAll = function(match, replace) {
return this.replace(new RegExp(match, 'g'), () => replace);
}
}