Skip to content

Commit bfab85e

Browse files
authored
docs: Adding updated install and update information (#85)
1 parent 11124d2 commit bfab85e

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.changeset/rotten-items-beam.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,18 @@
66
More reliability fixes for the JS Engine used in the Background Runner:
77
- (Android) Fixes in runtime during background execution
88
- (Android) Improvements in native lib handling for testing
9+
10+
When updating, if you have an existing Android app, be sure to delete the `android-js-engine-release.aar` from `android/src/main/libs`, and add the following to `android/app/build.gradle`:
11+
12+
```diff
13+
...
14+
15+
repositories {
16+
flatDir{
17+
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
18+
+ dirs '../../node_modules/@capacitor/background-runner/android/src/main/libs', 'libs'
19+
}
20+
}
21+
...
22+
23+
```

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configura
6969

7070
## Android
7171

72+
Insert the following line to `android/app/build.gradle`:
73+
74+
```diff
75+
...
76+
77+
repositories {
78+
flatDir{
79+
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
80+
+ dirs '../../node_modules/@capacitor/background-runner/android/src/main/libs', 'libs'
81+
}
82+
}
83+
...
84+
85+
```
86+
87+
If you are upgrading from 1.0.5 with an existing Android project, be sure to delete the `android-js-engine-release.aar` from `android/src/main/libs`.
88+
7289
### Geolocation
7390

7491
This API requires the following permissions be added to your `AndroidManifest.xml`:
@@ -151,6 +168,8 @@ addEventListener('remoteNotification', (resolve, reject, args) => {
151168

152169
Calling `resolve()` \ `reject()` is **required** within every event handler called by the runner. Failure to do this could result in your runner being killed by the OS if your event is called while the app is in the background. If the app is in the foreground, async calls to `dispatchEvent` may not resolve.
153170

171+
For more real world examples of using Background Runner, check out the [Background Runner Test App](https://github.com/ionic-team/background-runner-testapp).
172+
154173
## Configuring Background Runner
155174

156175
<docgen-config>
@@ -256,6 +275,7 @@ It’s not possible to run persistent, always running background services on mob
256275

257276
- Each invocation of your task has approximately up to 30 seconds of runtime before you must call `completed()` or your task is killed.
258277
- While you can set an interval to define when your task runs after the app is backgrounded, or how often it should run, this is not guaranteed. iOS will determine when and how often you task will ultimately run, determined in part by how often you app is used.
278+
- Background tasks are not executed in the simulator.
259279

260280
### Android
261281

packages/capacitor-plugin/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configura
6969

7070
## Android
7171

72+
Insert the following line to `android/app/build.gradle`:
73+
74+
```diff
75+
...
76+
77+
repositories {
78+
flatDir{
79+
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
80+
+ dirs '../../node_modules/@capacitor/background-runner/android/src/main/libs', 'libs'
81+
}
82+
}
83+
...
84+
85+
```
86+
87+
If you are upgrading from 1.0.5 with an existing Android project, be sure to delete the `android-js-engine-release.aar` from `android/src/main/libs`.
88+
7289
### Geolocation
7390

7491
This API requires the following permissions be added to your `AndroidManifest.xml`:
@@ -151,6 +168,8 @@ addEventListener('remoteNotification', (resolve, reject, args) => {
151168

152169
Calling `resolve()` \ `reject()` is **required** within every event handler called by the runner. Failure to do this could result in your runner being killed by the OS if your event is called while the app is in the background. If the app is in the foreground, async calls to `dispatchEvent` may not resolve.
153170

171+
For more real world examples of using Background Runner, check out the [Background Runner Test App](https://github.com/ionic-team/background-runner-testapp).
172+
154173
## Configuring Background Runner
155174

156175
<docgen-config>
@@ -256,6 +275,7 @@ It’s not possible to run persistent, always running background services on mob
256275

257276
- Each invocation of your task has approximately up to 30 seconds of runtime before you must call `completed()` or your task is killed.
258277
- While you can set an interval to define when your task runs after the app is backgrounded, or how often it should run, this is not guaranteed. iOS will determine when and how often you task will ultimately run, determined in part by how often you app is used.
278+
- Background tasks are not executed in the simulator.
259279

260280
### Android
261281

0 commit comments

Comments
 (0)