I am using this plugin in my mobile app and getting this error:
Cannot read properties of undefined (reading 'backgroundMode')
Any tips how to fix this?
Hello Raymond Vermeer,
That error is a typical error of plugin not loaded well.
Use the
to verify is plugin is loaded correctly.
Best Regards.
Hi Raymond Vermeer,
After adding the new plugin to your mobile application Rebuild your Application via Distribute tab or service center After tag your application to the newer version at lifetime and then test it again with New Build of application. Please share the feedback with us.
Additionally, as suggested by @OTS POC, please include a check for plugin integration before invoking the plugin or when the application is ready.
Best Regards,
Sakti Selvakumar.
I added the CheckPlugin and generated the APK again.
Also added some LogMessage actions in CheckPlugin.
In the general log I see messages from LogMessage2
Why is the javascript CheckPlugin returning false?
if((typeof(cordova.plugins.backgroundMode) === "undefined")) $parameters.IsLoaded = false;else $parameters.IsLoaded = true;
I generated the app with MABS 10.0 and the device has this versions:
OperatingSystem: Android 9NativeShell: 13.9.2Cordova: 12.0.0