Wed, 08 Dec 2021 08:21:25 GMT
Join the conversation at slack.cordova.io
Tue, 07 Dec 2021 08:29:14 GMT
@mario.kurzweil says
Hello everyone, I’m using https://github.com/katzer/cordova-plugin-background-mode plugin to send background information to the server constantly (every 60sec). At some point (a few hours) the plugin seems to stop working. I also tried the fork: https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background/src/master/
Snippet:
cordova.plugins.backgroundMode.enable();
cordova.plugins.backgroundMode.disableBatteryOptimizations();
cordova.plugins.backgroundMode.on('activate', *function* () {
cordova.plugins.backgroundMode.disableWebViewOptimizations();
intervalForBackground = $interval(*function* () {
// send backgrorund information to the server
}, 60000);
});
Added to AndroidManifest.xml:
<manifest android:hardwareAccelerated="true" android:versionCode="XXXXXXX" android:versionName="XXXXXXXX" package="XXXXXXXXX" xmlns:android="<http://schemas.android.com/apk/res/android>"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true"> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"> <intent-filter android:label="@string/launcher_name"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:exported="true" android:name="com.adobe.phonegap.push.PushHandlerActivity" android:permission="${applicationId}.permission.PushHandlerActivity" /> <activity android:exported="true" android:name="com.adobe.phonegap.push.BackgroundHandlerActivity" android:permission="${applicationId}.permission.BackgroundHandlerActivity"> <intent-filter> <action android:name="com.adobe.phonegap.push.background.MESSAGING_EVENT" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" /> <receiver android:name="com.adobe.phonegap.push.PushDismissedHandler" /> <service android:name="com.adobe.phonegap.push.FCMService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <service android:name="com.adobe.phonegap.push.PushInstanceIDListenerService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> <service android:name="de.appplant.cordova.plugin.background.ForegroundService" /> </application> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-feature android:name="android.hardware.location.gps" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> </manifest>``` As I mentioned it works fine for about 5-10 hours, after that the app seems to be closed (Depends on the device - Android >= 9). The notification “App is running in background” disappears. Does anyone have any suggestions on this? Installed version: - cordova - 10.0.0 - cordova-ios: 6.1.1 - cordova-android: 9.1.0
Wed, 08 Dec 2021 05:47:07 GMT
@cadis630 says
Hi folks, what is the best way to log plugin/native crashes in cordova based production apps android and iOS? Does cordova-plugin-firebase-crashlytics will help or not. Please guide.
Tue, 07 Dec 2021 13:37:46 GMT
@info300 says
@niklasmerz any releasemap for new release of
cordova-plugin-fingerprint-aio
?and, is it possible to use face-ID on android devices together with fingerprint with this plugin?