Code Monkey home page Code Monkey logo

Comments (6)

JamesMcIntosh avatar JamesMcIntosh commented on May 10, 2024 6

@crazecoder That document does not have the information about docx, pptx, xlsx. I have tested the XLSX these value which worked successfully. The others are inferred by the naming convention.

docx: org.openxmlformats.wordprocessingml.document
pptx: org.openxmlformats.presentationml.presentation
xlsx: org.openxmlformats.spreadsheetml.sheet

from open_file.

crazecoder avatar crazecoder commented on May 10, 2024 2
OpenFile.open("/sdcard/example.txt", type: "text/plain", uti: "public.plain-text");

You can find the uti you need here:
https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1

from open_file.

RenanDelfanti avatar RenanDelfanti commented on May 10, 2024

Thanks @crazecoder

from open_file.

nilsreichardt avatar nilsreichardt commented on May 10, 2024

There is the same bug on android. Any solutions for this?

from open_file.

JamesMcIntosh avatar JamesMcIntosh commented on May 10, 2024

@AndroidNils Android just relies on you having an application which knows how to open the corresponding mime type. These are the mime types which the plugin advertises for the following extensions:

https://github.com/crazecoder/open_file/blob/master/android/src/main/java/com/crazecoder/openfile/OpenFilePlugin.java#L191
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
xslx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"

The match the ones listed in
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

@AndroidNils have you debugged the OpenFilePlugin.startActivity() to make sure everything looks ok for your use case?

from open_file.

The-Heyman avatar The-Heyman commented on May 10, 2024

I think this should have been stated in the docs upfront to save everybody time!

from open_file.

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.