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)
Views
Replies
Total Likes
Hi @RobinJo2
I am not aware about solving issues for a device emulator. I think you can go for a general solution here so that you don't face above issue at other devices.
In these cases where advance/ or relatively new methods don't work. We can use
1. Polyfills :
Install as a dependency with npm i string.prototype.replaceall or yarn add string.prototype.replaceall;
Add the following code in your project. It need to be added in one place only.
import replaceAllInserter from 'string.prototype.replaceall';
replaceAllInserter.shim();
Checkout if you can find some workable solution here : https://stackoverflow.com/questions/62825358/javascript-replaceall-is-not-a-function-type-error/7004...
2. Use original replace method :
https://dmitripavlutin.com/replace-all-string-occurrences-javascript/
I rebuilt my Emulator making sure it was Android 13 API 33 - I had select Android 11 API 30.
And lo and behold the problem vanished.
I blame Android madness.
@RobinJo2 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes