Skip to content

Commit f6bcd96

Browse files
pengdevactions-usermaios
authored andcommitted
[geofencing] Remove experimental from Geofencing APIs. (#8323)
Fixes https://mapbox.atlassian.net/browse/MAPSSDK-914 This PR promotes the Geofencing API to stable by removing the `experimental` attribute across several layers. ## Core Changes * IDL Updates: The [Experimental] attribute is removed from all Geofencing API Interface Definition Languages (IDLs). * Maps SDKs: The MapboxExperimental attribution is removed from both the Android and iOS Maps SDKs. ## ⚠️ Potential Breaking Changes (C++) Action Required for C++ Consumers: The removal of the experimental flag includes the removal of the experimental C++ namespace. Consumers integrating the Geofencing C++ API must update their code to reflect the new, stable namespace to avoid compilation errors. cc @mapbox/core-sdk cc @mapbox/maps-android cc @mapbox/sdk-ci cc @mapbox/maps-ios --------- Co-authored-by: Changelog autocreator bot <[email protected]> Co-authored-by: Mai Mai <[email protected]> GitOrigin-RevId: 1cebb6718082ef08870e8a416f9cc452c954cbb3
1 parent d19ee36 commit f6bcd96

File tree

9 files changed

+10
-29
lines changed

9 files changed

+10
-29
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ Mapbox welcomes participation and contributions from everyone.
55
> **16 KB Page Size Support:** Starting with version 11.7.0 and 10.19.0, **NDK 27 is supported** with dedicated artifacts that include [support for 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes). If your app does not require 16 KB page size support, you can keep using our default artifacts without `-ndk27` suffix. For more information about our NDK support, see https://docs.mapbox.com/android/maps/guides/#ndk-support
66
77
# main
8-
98
## Breaking changes ⚠️
109
* Remove line-cutout-width and change line-cutout-opacity default to 1.0
1110

11+
# 11.17.0
12+
## Features ✨ and improvements 🏁
13+
* Promote Geofencing APIs to stable, remove `MapboxExperimental` annotations from Geofencing APIs.
14+
1215
# 11.17.0-rc.1 November 20, 2025
1316

1417
# 11.17.0-rc.1

app/src/main/java/com/mapbox/maps/testapp/examples/geofence/ExtendedGeofencingActivity.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import com.mapbox.maps.CameraOptions
3838
import com.mapbox.maps.ClickInteraction
3939
import com.mapbox.maps.EdgeInsets
4040
import com.mapbox.maps.InteractionContext
41-
import com.mapbox.maps.MapboxExperimental
4241
import com.mapbox.maps.MapboxMap
4342
import com.mapbox.maps.Style
4443
import com.mapbox.maps.extension.style.layers.generated.fillLayer
@@ -73,8 +72,6 @@ import java.util.Date
7372
* even when GeofenceActivity or the whole app is closed.
7473
* [MapboxApplication.ENABLE_BACKGROUND_GEOFENCING] flag turns ON/OFF showcase of background behavior of the geofence engine.
7574
*/
76-
77-
@com.mapbox.annotation.MapboxExperimental
7875
class ExtendedGeofencingActivity : AppCompatActivity() {
7976

8077
private var requestNotificationPermissionLauncher: ActivityResultLauncher<String> =
@@ -213,7 +210,6 @@ class ExtendedGeofencingActivity : AppCompatActivity() {
213210
}
214211

215212
@SuppressLint("SetTextI18n")
216-
@OptIn(MapboxExperimental::class)
217213
override fun onCreate(savedInstanceState: Bundle?) {
218214
super.onCreate(savedInstanceState)
219215

app/src/main/java/com/mapbox/maps/testapp/examples/geofence/SimpleGeofencingActivity.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import android.view.View
66
import androidx.appcompat.app.AppCompatActivity
77
import androidx.lifecycle.lifecycleScope
88
import com.google.gson.JsonObject
9-
import com.mapbox.annotation.MapboxExperimental
109
import com.mapbox.bindgen.Expected
1110
import com.mapbox.common.geofencing.GeofencingError
1211
import com.mapbox.common.geofencing.GeofencingEvent
@@ -46,7 +45,6 @@ import java.lang.ref.WeakReference
4645
* Geofence callbacks are called when device location enters, dwells, or leaves loaded geofence zone.
4746
* Each aforementioned event is accompanied by rendering received feature (Blue, Green, Red colors ).
4847
*/
49-
@MapboxExperimental
5048
class SimpleGeofencingActivity : AppCompatActivity() {
5149

5250
private lateinit var locationPermissionHelper: LocationPermissionHelper

extension-compose/api/Release/metalava.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ package com.mapbox.maps.extension.compose.ornaments.attribution {
11781178

11791179
@androidx.compose.runtime.Immutable @com.mapbox.maps.extension.compose.MapboxMapScopeMarker public final class MapAttributionScope {
11801180
method @androidx.compose.runtime.Composable public void Attribution(androidx.compose.ui.Modifier modifier = Modifier, androidx.compose.foundation.layout.PaddingValues contentPadding = PaddingValues(92.dp, 4.dp, 4.dp, 4.dp), androidx.compose.ui.Alignment alignment = androidx.compose.ui.Alignment.Companion.BottomStart, long iconColor = Color(4280192171), kotlin.jvm.functions.Function3<? super java.util.List<com.mapbox.maps.plugin.attribution.Attribution>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function1<? super com.mapbox.maps.plugin.attribution.Attribution,kotlin.Unit>,kotlin.Unit> attributionDialog = { attributions, onDismissRequest, onAttributionClick -> AttributionDialog(attributions, onDismissRequest, onAttributionClick) }, kotlin.jvm.functions.Function4<? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> telemetryDialog = { onDismissRequest, onMoreInfo, onDisagree, onAgree -> TelemetryDialog(onDismissRequest, onMoreInfo, onDisagree, onAgree) });
1181-
method @androidx.compose.runtime.Composable @com.mapbox.annotation.MapboxExperimental @com.mapbox.maps.MapboxExperimental public void Attribution(androidx.compose.ui.Modifier modifier = Modifier, androidx.compose.foundation.layout.PaddingValues contentPadding = PaddingValues(92.dp, 4.dp, 4.dp, 4.dp), androidx.compose.ui.Alignment alignment = androidx.compose.ui.Alignment.Companion.BottomStart, long iconColor = Color(4280192171), kotlin.jvm.functions.Function3<? super java.util.List<com.mapbox.maps.plugin.attribution.Attribution>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function1<? super com.mapbox.maps.plugin.attribution.Attribution,kotlin.Unit>,kotlin.Unit> attributionDialog = { attributions, onDismissRequest, onAttributionClick -> AttributionDialog(attributions, onDismissRequest, onAttributionClick) }, kotlin.jvm.functions.Function4<? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> telemetryDialog = { onDismissRequest, onMoreInfo, onDisagree, onAgree -> TelemetryDialog(onDismissRequest, onMoreInfo, onDisagree, onAgree) }, kotlin.jvm.functions.Function4<? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super java.lang.Boolean,kotlin.Unit> geofencingConsentDialog = { onDismissRequest, onDisagree, onAgree, currentUserConsent -> GeofencingConsentDialog(onDismissRequest, onDisagree, onAgree, currentUserConsent) });
1181+
method @androidx.compose.runtime.Composable public void Attribution(androidx.compose.ui.Modifier modifier = Modifier, androidx.compose.foundation.layout.PaddingValues contentPadding = PaddingValues(92.dp, 4.dp, 4.dp, 4.dp), androidx.compose.ui.Alignment alignment = androidx.compose.ui.Alignment.Companion.BottomStart, long iconColor = Color(4280192171), kotlin.jvm.functions.Function3<? super java.util.List<com.mapbox.maps.plugin.attribution.Attribution>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function1<? super com.mapbox.maps.plugin.attribution.Attribution,kotlin.Unit>,kotlin.Unit> attributionDialog = { attributions, onDismissRequest, onAttributionClick -> AttributionDialog(attributions, onDismissRequest, onAttributionClick) }, kotlin.jvm.functions.Function4<? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> telemetryDialog = { onDismissRequest, onMoreInfo, onDisagree, onAgree -> TelemetryDialog(onDismissRequest, onMoreInfo, onDisagree, onAgree) }, kotlin.jvm.functions.Function4<? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super kotlin.jvm.functions.Function0<kotlin.Unit>,? super java.lang.Boolean,kotlin.Unit> geofencingConsentDialog = { onDismissRequest, onDisagree, onAgree, currentUserConsent -> GeofencingConsentDialog(onDismissRequest, onDisagree, onAgree, currentUserConsent) });
11821182
method @androidx.compose.runtime.Composable public void AttributionDialog(java.util.List<com.mapbox.maps.plugin.attribution.Attribution> attributions, kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, kotlin.jvm.functions.Function1<? super com.mapbox.maps.plugin.attribution.Attribution,kotlin.Unit> onAttributionClick);
11831183
method @androidx.compose.runtime.Composable public void GeofencingConsentDialog(kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, kotlin.jvm.functions.Function0<kotlin.Unit> onDisagree, kotlin.jvm.functions.Function0<kotlin.Unit> onAgree, boolean currentUserConsent);
11841184
method @androidx.compose.runtime.Composable public void TelemetryDialog(kotlin.jvm.functions.Function0<kotlin.Unit> onDismissRequest, kotlin.jvm.functions.Function0<kotlin.Unit> onMoreInfo, kotlin.jvm.functions.Function0<kotlin.Unit> onDisagree, kotlin.jvm.functions.Function0<kotlin.Unit> onAgree);

extension-compose/src/main/java/com/mapbox/maps/extension/compose/ornaments/attribution/MapAttributionScope.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import androidx.compose.ui.unit.sp
4646
import androidx.compose.ui.window.DialogProperties
4747
import com.mapbox.common.geofencing.GeofencingError
4848
import com.mapbox.maps.MapView
49-
import com.mapbox.maps.MapboxExperimental
5049
import com.mapbox.maps.extension.compose.MapboxMapScopeMarker
5150
import com.mapbox.maps.extension.compose.R
5251
import com.mapbox.maps.extension.compose.ornaments.attribution.internal.AttributionComposePlugin
@@ -142,8 +141,6 @@ public class MapAttributionScope internal constructor(
142141
* @param telemetryDialog Defines TelemetryDialog when the Mapbox telemetry is clicked.
143142
* @param geofencingConsentDialog Defines GeofencingConsentDialog when the Mapbox Geofencing is clicked.
144143
*/
145-
@com.mapbox.annotation.MapboxExperimental
146-
@MapboxExperimental
147144
@Composable
148145
public fun Attribution(
149146
modifier: Modifier = Modifier,

plugin-attribution/src/main/java/com/mapbox/maps/plugin/attribution/AttributionDialogManagerImpl.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import androidx.appcompat.app.AlertDialog
1818
import androidx.appcompat.view.ContextThemeWrapper
1919
import androidx.core.content.ContextCompat
2020
import com.mapbox.common.geofencing.GeofencingUtilsUserConsentResponseCallback
21-
import com.mapbox.maps.MapboxExperimental
2221
import com.mapbox.maps.geofencing.MapGeofencingConsent
2322
import com.mapbox.maps.logW
2423
import com.mapbox.maps.module.MapTelemetry
@@ -45,12 +44,10 @@ class AttributionDialogManagerImpl(
4544
internal var geofencingDialog: AlertDialog? = null
4645
private var mapAttributionDelegate: MapAttributionDelegate? = null
4746
private var telemetry: MapTelemetry? = null
48-
@OptIn(MapboxExperimental::class)
4947
private var geofencingConsent: MapGeofencingConsent? = null
5048
/**
5149
* Invoked when the map attribution should be shown to the end user
5250
*/
53-
@OptIn(MapboxExperimental::class)
5451
override fun showAttribution(mapAttributionDelegate: MapAttributionDelegate) {
5552
this.mapAttributionDelegate = mapAttributionDelegate
5653
this.telemetry = mapAttributionDelegate.telemetry()
@@ -140,7 +137,6 @@ class AttributionDialogManagerImpl(
140137
telemetryDialog = builder.show()
141138
}
142139

143-
@OptIn(MapboxExperimental::class, com.mapbox.annotation.MapboxExperimental::class)
144140
private fun showGeofencingConsentDialog() {
145141
val builder = prepareDialogBuilder()
146142
builder.setTitle(R.string.mapbox_attributionGeofencingTitle)

sdk-base/api/Release/metalava.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,10 @@ package com.mapbox.maps.extension.style {
763763

764764
package com.mapbox.maps.geofencing {
765765

766-
@com.mapbox.annotation.MapboxExperimental @com.mapbox.maps.MapboxExperimental public interface MapGeofencingConsent {
767-
method @com.mapbox.maps.MapboxExperimental public boolean getUserConsent();
768-
method @com.mapbox.maps.MapboxExperimental public void setUserConsent(boolean isConsentGiven, com.mapbox.common.geofencing.GeofencingUtilsUserConsentResponseCallback callback);
769-
method @com.mapbox.maps.MapboxExperimental public boolean shouldShowConsent();
766+
public interface MapGeofencingConsent {
767+
method public boolean getUserConsent();
768+
method public void setUserConsent(boolean isConsentGiven, com.mapbox.common.geofencing.GeofencingUtilsUserConsentResponseCallback callback);
769+
method public boolean shouldShowConsent();
770770
}
771771

772772
}
@@ -1797,7 +1797,7 @@ package com.mapbox.maps.plugin.attribution {
17971797
}
17981798

17991799
public final class AttributionParserConfig {
1800-
ctor public AttributionParserConfig(boolean withImproveMap = true, boolean withCopyrightSign = true, boolean withTelemetryAttribution = true, boolean withMapboxAttribution = true, boolean withMapboxPrivacyPolicy = true, @com.mapbox.maps.MapboxExperimental boolean withMapboxGeofencingConsent = true);
1800+
ctor public AttributionParserConfig(boolean withImproveMap = true, boolean withCopyrightSign = true, boolean withTelemetryAttribution = true, boolean withMapboxAttribution = true, boolean withMapboxPrivacyPolicy = true, boolean withMapboxGeofencingConsent = true);
18011801
ctor public AttributionParserConfig(boolean withImproveMap = true, boolean withCopyrightSign = true, boolean withTelemetryAttribution = true, boolean withMapboxAttribution = true, boolean withMapboxPrivacyPolicy = true);
18021802
ctor public AttributionParserConfig(boolean withImproveMap = true, boolean withCopyrightSign = true, boolean withTelemetryAttribution = true, boolean withMapboxAttribution = true);
18031803
ctor public AttributionParserConfig(boolean withImproveMap = true, boolean withCopyrightSign = true, boolean withTelemetryAttribution = true);
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package com.mapbox.maps.geofencing
22

33
import com.mapbox.common.geofencing.GeofencingUtilsUserConsentResponseCallback
4-
import com.mapbox.maps.MapboxExperimental
54

65
/**
76
* Definition of map Geofencing consent utilities
87
*/
9-
@com.mapbox.annotation.MapboxExperimental
10-
@MapboxExperimental
118
interface MapGeofencingConsent {
129

1310
/**
@@ -16,22 +13,19 @@ interface MapGeofencingConsent {
1613
* @param isConsentGiven true if user consents Geofencing, false if not (this will disable Geofencing).
1714
* @param callback Callback called when state is updated.
1815
*/
19-
@MapboxExperimental
2016
fun setUserConsent(isConsentGiven: Boolean, callback: GeofencingUtilsUserConsentResponseCallback)
2117

2218
/**
2319
* Get the Geofencing user consent state.
2420
*
2521
* @return `true` if end-user has given consent of Geofencing, `false` otherwise. `true` by default.
2622
*/
27-
@MapboxExperimental
2823
fun getUserConsent(): Boolean
2924

3025
/**
3126
* Checks if the Geofencing user consent dialog should be shown.
3227
*
3328
* @return `true` to show the option to opt-out Geofencing. That is, Geofencing is active or the user revoked the consent.
3429
*/
35-
@MapboxExperimental
3630
fun shouldShowConsent(): Boolean
3731
}

sdk-base/src/main/java/com/mapbox/maps/plugin/attribution/AttributionParserConfig.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.mapbox.maps.plugin.attribution
22

3-
import com.mapbox.maps.MapboxExperimental
4-
53
/**
64
* Config class for Attribution
75
*/
@@ -31,6 +29,5 @@ class AttributionParserConfig @JvmOverloads constructor(
3129
* Note that the entry will be shown only if the Geofencing is currently active or the user has
3230
* previously opted out.
3331
*/
34-
@MapboxExperimental
3532
var withMapboxGeofencingConsent: Boolean = true,
3633
)

0 commit comments

Comments
 (0)