@capacitor-community/background-geolocation
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@capacitor-community/background-geolocation", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Receive geolocation updates even while app is backgrounded.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -119,9 +119,4 @@ # Background Geolocation | ||
```typescript | ||
// Capacitor v3 | ||
import {BackgroundGeolocationPlugin} from "@capacitor-community/background-geolocation"; | ||
const BackgroundGeolocation = registerPlugin<BackgroundGeolocationPlugin>("BackgroundGeolocation"); | ||
// Capacitor v2 | ||
import {BackgroundGeolocationPlugin} from "@capacitor-community/background-geolocation"; | ||
const BackgroundGeolocation = Plugins.BackgroundGeolocation as BackgroundGeolocationPlugin; | ||
``` | ||
@@ -138,2 +133,4 @@ | ||
Read the documentation for v0.3 [here](https://github.com/capacitor-community/background-geolocation/tree/0.3.x). | ||
```sh | ||
@@ -163,22 +160,3 @@ npm install @capacitor-community/background-geolocation | ||
### Android | ||
If you are using Capacitor v2, you must import the plugin in `MainActivity.java`. This step is __not__ required for Capacitor v3. | ||
```java | ||
import com.equimaps.capacitor_background_geolocation.BackgroundGeolocation; | ||
public class MainActivity extends BridgeActivity { | ||
@Override | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
// Initializes the Bridge | ||
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ | ||
// Additional plugins you've installed go here | ||
// Ex: add(TotallyAwesomePlugin.class); | ||
add(BackgroundGeolocation.class); | ||
}}); | ||
} | ||
} | ||
``` | ||
Configure `AndroidManifest.xml`: | ||
@@ -234,3 +212,3 @@ ```xml | ||
- BREAKING: The plugin is imported via Capacitor's `registerPlugin` function, rather than from the `Plugins` object. | ||
- Adds support for Capacitor v3 | ||
- Drops support for iOS v11 | ||
- BREAKING: Drops support for iOS v11 and Capacitor v2. | ||
- Adds support for Capacitor v3. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43592
211