Skip to content

Commit 09fc61a

Browse files
committed
location v6.1.0
1 parent a5adbfc commit 09fc61a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+322
-197
lines changed

docs/location/_includes/add-manual-appdescriptor.mdx

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,52 +30,64 @@ This is generally your AIR application id prefixed with `air.`
3030

3131
```xml
3232
<manifest android:installLocation="auto">
33-
<uses-permission android:name="android.permission.INTERNET"/>
34-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
35-
36-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
37-
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
33+
<uses-permission android:name="android.permission.INTERNET"/>
34+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
35+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
36+
37+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
38+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
3839

39-
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
40+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
4041

4142

42-
<application>
43-
44-
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
45-
46-
<receiver android:name="com.distriqt.extension.location.receivers.LocationReceiver" android:exported="false" >
47-
<intent-filter>
48-
<action android:name="APPLICATION_PACKAGE.LOCATION_UPDATE" />
49-
</intent-filter>
50-
</receiver>
51-
<service
52-
android:name="com.distriqt.extension.location.services.LocationUpdateService"
53-
android:foregroundServiceType="location"
54-
android:enabled="true"
55-
android:exported="true" />
43+
<application>
44+
45+
<service android:name="com.distriqt.extension.location.services.LocationUpdateService" android:foregroundServiceType="location" android:exported="true" android:enabled="true" />
5646

57-
<receiver android:name="com.distriqt.extension.location.receivers.GeofenceTransitionReceiver" android:exported="true" >
58-
<intent-filter>
59-
<action android:name="APPLICATION_PACKAGE.GEOFENCE_TRANSITION_ACTION" />
60-
</intent-filter>
61-
</receiver>
62-
<receiver android:name="com.distriqt.extension.location.receivers.BootReceiver" android:exported="true" >
47+
<receiver android:name="com.distriqt.extension.location.receivers.GeofenceTransitionReceiver" android:exported="true" android:enabled="true" />
48+
<service android:name="com.distriqt.extension.location.services.GeofenceRestartService" android:exported="true" android:enabled="true" />
49+
50+
<receiver android:name="com.distriqt.extension.location.receivers.BootReceiver" android:exported="true" android:enabled="true" >
6351
<intent-filter>
6452
<action android:name="android.intent.action.BOOT_COMPLETED"/>
6553
<action android:name="android.location.PROVIDERS_CHANGED"/>
6654
</intent-filter>
6755
</receiver>
68-
<service android:name="com.distriqt.extension.location.services.GeofenceRestartService" android:exported="false" />
69-
70-
<activity android:name="com.distriqt.extension.location.permissions.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
7156

72-
73-
</application>
74-
57+
<activity android:name="com.distriqt.core.auth.AuthorisationActivity" android:exported="false" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
58+
59+
</application>
60+
7561
</manifest>
7662
```
7763

7864

65+
#### Android Gradle Version
66+
67+
We have updated the required gradle version used to build your application to be higher than the default AIR currently uses (April 2025).
68+
69+
To specify a higher version add the following to your android node in your application descriptor:
70+
71+
```xml
72+
<android>
73+
<gradleVersion>8.9</gradleVersion>
74+
<androidGradlePluginVersion>8.7.3</androidGradlePluginVersion>
75+
76+
...
77+
</android>
78+
```
79+
80+
If you don't do this you will see the following error when building your application:
81+
82+
```
83+
Unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed:
84+
FAILURE: Build failed with an exception.
85+
86+
...
87+
88+
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
89+
```
90+
7991

8092

8193
### iOS

docs/location/_includes/add-manual.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ These libraries are specific to Android. There are no issues including these on
3737
This extension requires the following extensions:
3838

3939
- [`androidx.core`](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/androidx.core.ane)
40+
- [`com.jetbrains.kotlin`](https://github.com/distriqt/ANE-AndroidSupport/raw/master/lib/com.jetbrains.kotlin.ane)
4041

4142
You can access these extensions here: [https://github.com/distriqt/ANE-AndroidSupport](https://github.com/distriqt/ANE-AndroidSupport).
4243

docs/location/add-the-extension.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ Edit the `config/android/AndroidManifest.xml` file that was generated to resembl
9898
<?xml version="1.0" encoding="utf-8"?>
9999
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
100100

101-
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
101+
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
102+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
102103

103104
</manifest>
104105
```
@@ -116,6 +117,7 @@ If you require access to the location data in the background or if you are using
116117
```xml
117118
<!-- NEEDED FOR BACKGROUND LOCATION AND GEOFENCES -->
118119
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
120+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
119121
```
120122

121123

docs/location/changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### 2025.09.24 [v6.1.0]
2+
3+
```
4+
## Major Update
5+
6+
This version brings a rebuild of the android implementation to use the latest Google Play Services libraries and support the latest Android OS versions.
7+
8+
Migration guide: https://docs.airnativeextensions.com/docs/location/migrating-to-v6.1
9+
10+
11+
### Updates
12+
13+
feat(android): rewrite of the geofences implementation (resolves https://github.com/distriqt/ANE-Location/issues/79, resolves https://github.com/distriqt/ANE-Location/issues/77)
14+
feat(android): update location update service for background / persistent updates
15+
feat(android): correct foreground service permission and notification
16+
```
17+
118
### 2024.12.19 [v6.0.0]
219

320
```
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Migrating to v6.1
3+
sidebar_label: Migrating to v6.1
4+
---
5+
6+
import Tabs from '@theme/Tabs'
7+
import TabItem from '@theme/TabItem'
8+
9+
This version brings a rebuild of the android implementation to use the latest Google Play Services libraries and support the latest Android OS versions.
10+
11+
We have tweaked the location update and geofence implementations so you should get a more reliable and consistent experience with location updates and geofences on Android.
12+
13+
14+
<Tabs
15+
groupId="packagemanager"
16+
defaultValue="apm"
17+
values={[
18+
{label: 'APM', value: 'apm'},
19+
{label: 'Manual', value: 'manual'},
20+
]}>
21+
22+
<TabItem value="apm" >
23+
24+
If you are using [`apm`](https://github.com/airsdk/apm) all you need to do is update to the latest build and regenerate your application descriptor. `apm` will handle the rest.
25+
26+
```
27+
apm update
28+
apm generate app-descriptor
29+
```
30+
31+
There is one note to this however, if you are attempting to receive background updates you will need to make sure you add the `POST_NOTIFICATIONS` permission to your application descriptor. This is required for recent Android versions, where a notification is required to be displayed for your foreground service which receives the location while your application is in the background.
32+
33+
This will mean your `config/android/AndroidManifest.xml` file will need to look like the following:
34+
35+
```xml
36+
<?xml version="1.0" encoding="utf-8"?>
37+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
38+
39+
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
40+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
41+
42+
</manifest>
43+
```
44+
45+
</TabItem>
46+
<TabItem value="manual" >
47+
48+
If you are manually managing your application descriptor (and manifest additions) then you will need to update your manifest additions to include the following.
49+
We suggest you clear all previous manifest additions and replace them with the following:
50+
51+
```xml
52+
<manifest android:installLocation="auto">
53+
<uses-permission android:name="android.permission.INTERNET"/>
54+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
55+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
56+
57+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
58+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
59+
60+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
61+
62+
63+
<application>
64+
65+
<service android:name="com.distriqt.extension.location.services.LocationUpdateService" android:foregroundServiceType="location" android:exported="true" android:enabled="true" />
66+
67+
<receiver android:name="com.distriqt.extension.location.receivers.GeofenceTransitionReceiver" android:exported="true" android:enabled="true" />
68+
<service android:name="com.distriqt.extension.location.services.GeofenceRestartService" android:exported="true" android:enabled="true" />
69+
70+
<receiver android:name="com.distriqt.extension.location.receivers.BootReceiver" android:exported="true" android:enabled="true" >
71+
<intent-filter>
72+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
73+
<action android:name="android.location.PROVIDERS_CHANGED"/>
74+
</intent-filter>
75+
</receiver>
76+
77+
78+
</application>
79+
80+
</manifest>
81+
```
82+
83+
If you are using background location updates you will also need to add the `ACCESS_BACKGROUND_LOCATION` and `POST_NOTIFICATIONS` permission:
84+
85+
```xml
86+
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
87+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
88+
```
89+
90+
</TabItem>
91+
92+
</Tabs>
93+

static/asdocs/location/all-classes.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html>
22
<head>
33
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4-
<title>All Classes - distriqt // Location</title>
4+
<title>All Classes - Location</title>
55
<base target="classFrame">
66
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
77
<link rel="stylesheet" href="print.css" type="text/css" media="print">
@@ -64,4 +64,4 @@ <h3><a href="class-summary.html" target="classFrame" style="color:black">All Cla
6464
</table>
6565
</body>
6666
</html>
67-
<!--Copyright distriqt 2016<br/>Thu Dec 19 2024, 08:51 AM +10:00 -->
67+
<!--Copyright Michael Archbold 2025<br/>Wed Sep 24 2025, 02:28 PM +10:00 -->

0 commit comments

Comments
 (0)