Skip to content

[Bug]: stopWatchPositionAsync parameter type mismatch #2588

@MajStc

Description

@MajStc

Required Reading

  • Confirmed

Plugin Version

5.1.1

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

Samsung Galaxy S21 5G

Device operating-systems(s)

Android 15

React Native / Expo version

Expo 53

What happened?

Calling

BackgroundGeolocation.stopWatchPosition?.();

Can throw an error with expected argument to be a number

Typescript

stopWatchPosition?(watchId?: number): void;

Java typing

@ReactMethod
    public void stopWatchPosition(double watchId, final Promise response) {
        // TODO Implement watchId for android.
        getAdapter().stopWatchPosition(new TSCallback() {
            @Override public void onSuccess() {
                response.resolve(true);
            }
            @Override public void onFailure(String error) {
                response.reject(error);
            }
        });
    }

Plugin Code and/or Config

irrelevant

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions