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: unable to resolve content:// URL #8

Open
robert-virkus opened this issue Jan 17, 2021 · 1 comment
Open

Android: unable to resolve content:// URL #8

robert-virkus opened this issue Jan 17, 2021 · 1 comment

Comments

@robert-virkus
Copy link

Hi, I try to open content:// paths on Android that I receive as a share target.

With an input of content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2F1607722645567.jpg I get the following error:

 E/MethodChannel#flutter_absolute_path(21745): Failed to handle method call
E/MethodChannel#flutter_absolute_path(21745): java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/1607722645567.jpg"
E/MethodChannel#flutter_absolute_path(21745): 	at java.lang.Long.parseLong(Long.java:594)
E/MethodChannel#flutter_absolute_path(21745): 	at java.lang.Long.valueOf(Long.java:808)
E/MethodChannel#flutter_absolute_path(21745): 	at com.kasem.flutter_absolute_path.FileDirectory.getAbsolutePath(FileDirectory.kt:47)
E/MethodChannel#flutter_absolute_path(21745): 	at com.kasem.flutter_absolute_path.FlutterAbsolutePathPlugin.onMethodCall(FlutterAbsolutePathPlugin.kt:42)
E/MethodChannel#flutter_absolute_path(21745): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#flutter_absolute_path(21745): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_absolute_path(21745): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
@robert-virkus
Copy link
Author

Sorry, this actually works on a real device, but not on the emulator. Not sure if this is a valid bug - keeping it open for now.

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

1 participant