-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce MapTelemetry.getUserTelemetryRequestState API - MAPSAND-645 #1877
Conversation
7049fce
to
97e4367
Compare
sdk-base/api/sdk-base.api
Outdated
@@ -540,6 +540,7 @@ public abstract interface class com/mapbox/maps/extension/style/StyleInterface : | |||
|
|||
public abstract interface class com/mapbox/maps/module/MapTelemetry { | |||
public abstract fun disableTelemetrySession ()V | |||
public fun getTelemetryCollectionState ()Z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 this is not abstract
👍
|
||
/** | ||
* Definition of map telemetry | ||
*/ | ||
interface MapTelemetry { | ||
public interface MapTelemetry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that MapTelemetry interface is rewritten in Java: for more context in #1670 (comment), as we want to make the default interface backwards-compatible with Java, writing default method with @JvmDefault
in Kotlin will require -Xjvm-default compiler option
.
As summarised by @kmadsen
The -Xjvm-default compiler flag may do what we want in the future. But right now, it does not generate default interfaces in an SDK. The app developer has to include the flag in their app to make the app compile when it uses an sdk that is relying on the flag.
sdk-base/src/main/java/com/mapbox/maps/module/MapTelemetry.java
Outdated
Show resolved
Hide resolved
1472861
to
8f93307
Compare
…#1877) * Introduce MapTelemetry.getTelemetryCollectionState API. * Add JavaInterfaceChecker for the default function. * Address review comments.
…#1877) * Introduce MapTelemetry.getTelemetryCollectionState API. * Add JavaInterfaceChecker for the default function. * Address review comments.
Note that there was a response from the kotlin team when I asked about this. https://youtrack.jetbrains.com/issue/KT-54239/-Xjvm-defaultall-for-sdk-development
|
Co-authored-by: Kiryl Dzehtsiarenka <kiryl.dzehtsiarenka@mapbox.com>
Summary of changes
This PR introduce
MapTelemetry.getUserTelemetryRequestState
API.Note that MapTelemetry interface is rewritten in Java: for more context in #1670 (comment), as we want to make the default interface backwards-compatible with Java, writing default method with
@JvmDefault
in Kotlin will require-Xjvm-default compiler option
.As summarised by @kmadsen
User impact (optional)
Pull request checklist:
@JvmOverloads
,@file:JvmName
, etc).make update-api
to update generated api files, if there's public API changes, otherwise theverify-api-*
CI steps might fail.check changelog
CI step will fail.v10.[version]
release branch fix / enhancement, merge it tomain
firstly and then port tov10.[version]
release branch.Fixes: < Link to related issues that will be fixed by this pull request, if they exist >
PRs must be submitted under the terms of our Contributor License Agreement CLA.