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

Open location from Android intent with geo: url #770

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

starsep
Copy link
Contributor

@starsep starsep commented Aug 19, 2024

Draft Android implementation of #387

Currently it is still buggy:

  • sometimes current geolocation is opened, not the one shared from another app
  • sometimes previous shared geolocation is opened

Please let me know if such an approach even makes sense.

I tried using https://pub.dev/packages/receive_sharing_intent but it wouldn't compile due Java version mismatch.

PS I don't really know Flutter so any advices are welcome 😄

@Zverik
Copy link
Owner

Zverik commented Sep 21, 2024

Hmm, what's the problem with Java version? In the future ED will need to be a file target as well, so maybe receive_sharing_intent is still the way to go?

@starsep
Copy link
Contributor Author

starsep commented Sep 22, 2024

  1. Add receive_sharing_intent: ^1.8.0 to depencies in pubspec.yaml
  2. Build project
  3. Error:
Running Gradle task 'assembleDebug'...
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':receive_sharing_intent:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

@Zverik
Copy link
Owner

Zverik commented Sep 22, 2024

Your error is weird, because by SO answers, ED has enough version buffer to not have this.

I get another issue with the package:

Execution failed for task ':receive_sharing_intent:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

Seems like the package is unmaintained at the moment, judging by the number of pull requests hanging. Also, it doesn't seem to support iOS 18.

Maybe there's an alternative?..

What I don't like about the ad-hoc solution is that it doesn't support iOS. I'd prefer to have identical features for both OS-es.

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

Successfully merging this pull request may close these issues.

2 participants