Skip to content
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

Android setCurrentTime always returns Must provide a time #8

Open
KyleSmith0905 opened this issue Jan 2, 2025 · 1 comment
Open

Comments

@KyleSmith0905
Copy link

KyleSmith0905 commented Jan 2, 2025

So I am on my own branch and I encountered this, I am confident I didn't change anything to create this error. Though I would like to have confirmation that an error exists.

For me setCurrentTime on Android always returned the "Must provide a time" error.

I am new to Android programming and Capacitor so idk if what you had was correct, but I changed:

Long time = call.getLong("time");

to

Long time = Long.parseLong(String.format("%.0f", call.getDouble("time")) );

Again, not sure if this is an issue experienced by real people, I am too lazy to check right now, lol.
Thank you!

@eduardoRoth
Copy link
Owner

Hi @KyleSmith0905 , thanks for working on this error! I already had identified it to Capacitor not reading the value if I used "getLong", so I had to change that to getDouble.

It's already fixed in v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants