Code Monkey home page Code Monkey logo

Comments (2)

selankon avatar selankon commented on August 15, 2024 1

FTR the problem was that the flutter plugin to handle sharing intents was returning the absolute file for a copy-cache of the sent file.

I created a POC implementing receive sharing intent using PickiT library for Flutter.

https://gitlab.com/elRepo.io/receive_sharing_intent_pickit/-/merge_requests/1

from pickit.

HBiSoft avatar HBiSoft commented on August 15, 2024

The problem with this is that PickiT is intended for native Android MediaStore.
When selecting media from from MediaStore an Uri gets returned.

Where as what you are doing - val uri: Uri = Uri.parse(absoluteUriPath!!) parses a String to a Uri. I can't get the absoluteUriPath from your Uri to check if the file exists.

What I can suggest is to check if the file exists before passing it to PickiT. I'm not that familiar with Flutter, but you can do something like this:

if (await File(absoluteUriPath).exists()) {
    // File path exists (You can use absoluteUriPath)  
} else {
    // File path doesn't exist (Pass absoluteUriPath to PickiT)
}

Like I said above, I will not be able to implement this and will, unfortunately, have to close this issue since there is nothing I can do from my side.

from pickit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.