Skip to content

Commit

Permalink
Merge branch 'android-onDestroy'
Browse files Browse the repository at this point in the history
  • Loading branch information
transistorsoft-pkg committed Jul 8, 2023
2 parents 42a4b80 + 4e0596a commit 046f04e
Show file tree
Hide file tree
Showing 24 changed files with 25 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [7.1.3] — 2023-07-07
* [Android] Add Cordova `onDestroy` listener to manually set `LifecycleManager.setHeadless(true)`.

## [7.1.2] — 2022-10-11
* [Android] Use `LifecycleManager` for modern headless-detection instead of legacy mechanism requiring permission `GET_TASKS`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-background-fetch",
"version": "7.1.2",
"version": "7.1.3",
"description": "A plugin to periodically awaken your app in the background every 15 minutes to perform some work.",
"main": "./src/typescript/index.js",
"types": "./src/typescript/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-background-fetch"
version="7.1.2">
version="7.1.3">
<name>CDVBackgroundFetch</name>
<description>Cordova Background Fetch Plugin</description>
<license>MIT</license>
Expand Down
7 changes: 7 additions & 0 deletions src/android/CDVBackgroundFetch.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.transistorsoft.tsbackgroundfetch.BackgroundFetch;
import com.transistorsoft.tsbackgroundfetch.BackgroundFetchConfig;
import com.transistorsoft.tsbackgroundfetch.LifecycleManager;

import org.json.JSONArray;
import org.json.JSONObject;
Expand Down Expand Up @@ -147,4 +148,10 @@ private BackgroundFetchConfig.Builder buildConfig(JSONObject options) throws JSO
}
return config;
}

@Override
public void onDestroy() {
LifecycleManager.getInstance().setHeadless(true);
super.onDestroy();
}
}
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c0d21c6af7b284747942f3a30ea6ae62
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c8806041c133bc8e3d50a02f0a935673c19ba584
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3ee1f66eb965f7a21f410b5752735f88cea9d4227e8e1a052fd748719369db38
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2982e2fab647332673c0ff8179004d37ca39b17e4986781139f0063c0e5408dd0e3f18e919d555d8e02af61bf76959045b513084f98af826551d0c489d16fde1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.transistorsoft</groupId>
<artifactId>tsbackgroundfetch</artifactId>
<version>0.5.6</version>
<version>0.5.7</version>
<packaging>aar</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
86676d215a5112a36ed2e63445224329
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ee201a24e14db8e87f45c42cf21ab07ee97c9b88
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9c50689b497910bfae3e2a43e1421d85731a63334eb0453d9f4a5b5ab5162350
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3438c927a482e27f3802e7eeda6ab03570c12e893fcc7470fc7e75f19bdff3ec4f78ef382c856afb2c02181c033c46c568607e8b948108f1a06068743fe3c713
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
<groupId>com.transistorsoft</groupId>
<artifactId>tsbackgroundfetch</artifactId>
<versioning>
<latest>0.5.6</latest>
<release>0.5.6</release>
<latest>0.5.7</latest>
<release>0.5.7</release>
<versions>
<version>0.5.1</version>
<version>0.5.2</version>
<version>0.5.3</version>
<version>0.5.4</version>
<version>0.5.5</version>
<version>0.5.6</version>
<version>0.5.7</version>
</versions>
<lastUpdated>20220930140521</lastUpdated>
<lastUpdated>20230707165915</lastUpdated>
</versioning>
</metadata>

0 comments on commit 046f04e

Please sign in to comment.