Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by pablothedolphin · Feb 01, 2017 at 11:02 AM · androidurldirectoryapplication.openurl

Browse to folder on Android via File Explorer

I'm using System.IO to read and write to a text file kept in the root of Application.persistentDataPath for my Unity Android app. Once the user is done making changes in the app, I would like them to be able to click a button and be taken straight to the folder where they can email themselves, or someone else, the text file. (This process is necessary. I am unable to use a database to store this data for unrelated reasons.)

Using Application.Openurl() I can browse directly to the text file which opens the file contents:

 Application.Openurl(Application.persistentDataPath + filename);

but from here the user is unable to share the file or go back a level to the folder the file is kept in.

What I want is this to work:

 Application.Openurl(Application.persistentDataPath);

Notice how I've removed the file name. I've tried using the "file://" protocol and adding "/" at the end but nothing seems to work. The error I get when attempting to open the folder is: "Cannot display PDF: (file is of invalid format)" which is strange because there are no pdf documents in my persistent data folder and the path is just to a folder.

Any ideas on making this work? Everything work's fine on desktop including opening just the folder. Opening the folder on Android is what I need help with.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MohammedAli91 · Mar 08, 2017 at 07:59 AM 0
Share

Same issue, Did you find a solution for this ?

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by imran4125 · Dec 05, 2018 at 10:55 AM

@pablothedolphine Did you find a solution to this ?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Open Android App from URL 3 Answers

Android - Access Video from StreamingAssets 0 Answers

How to find list of files in "StreamingAssets" folder in Android 1 Answer

Android app stuck opening url 0 Answers

GetDirectories() does not work on Android 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges