Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Universal File Association - Seamless File Activation

Discussion in 'Assets and Asset Store' started by ImaginationOverflowPT, Dec 17, 2019.

  1. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185

    Universal File Association plugin enables your apps and games to be configured as the default file handler (e.g .xpto) on iOS, Android, Windows 10 (UWP), Standalone (Linux, Mac, and Windows) and tvOS.​
    The plugin automatically configures the target file type or mime type on the target platform on build, making its usage simple and quick, the integration is as simple as registering a callback to an event.
    Under the hood, the plugin was made to ensure that it doesn't conflict with any other plugins on all platforms.

    Features:
    - Plug and play
    - Simple UI to configure your file associations
    - Built-in editor test tool
    - Global or per platform configurations
    - Steam Integration
    - Simple API

    Supported Platforms:
    - Android
    - iOS
    - Windows Store
    - Standalone (Linux, Windows, MacOs)
    - Steam (Linux, Windows, MacOs)
    - tvOS
     
    Last edited: Jan 3, 2020
  2. musicdeveloper

    musicdeveloper

    Joined:
    Oct 16, 2019
    Posts:
    68
    Thanks for this asset!

    Just purchased, and working perfectly on MacOS for me so far.


    1. Testing on Android -
    - Using the "Open With..." function from Google Drive on an Android phone, I'm trying to open a short .mp4 video file in the app.

    - I'm getting this as the filename and path from FileInformation, in my FileActivatedHandler() callback:

    File name: enc%3DnbApCXj8XERj3xBjMfDMelifnLYXYsxPtLYZwR7-3j92BewDaMB-viukhOFgwsMjURxpiTRxnnAP%0AEASGW7O5hVp-obAS5tHd4tDBkfhZwDMeSUVZSqZ2SRh3TBJqbAfviequSA%3D%3D%0A

    Path: content://com.google.android.apps.docs.storage.legacy/enc%3DnbApCXj8XERj3xBjMfDMelifnLYXYsxPtLYZwR7-3j92BewDaMB-viukhOFgwsMjURxpiTRxnnAP%0AEASGW7O5hVp-obAS5tHd4tDBkfhZwDMeSUVZSqZ2SRh3TBJqbAfviequSA%3D%3D%0A

    Is there any way to get the actual filename from FileInformation in the callback on Android?


    2. Testing on iOS -



    Thank you
     
    Last edited: Feb 11, 2020
  3. musicdeveloper

    musicdeveloper

    Joined:
    Oct 16, 2019
    Posts:
    68
    2. Testing on iOS -
    - Using the Files app to open a .mov file to my app, I'm getting

    System.IO.FileNotFoundException: Could not find file "/private/var/mobile/Containers/Data/Application/DF4AA09B-C94F-48E8-8E52-0380BBA70A8F/tmp/<APP NAME>/IMG_2240-SD%20for%20Apple%20Devices.mov"

    File name: '/private/var/mobile/Containers/Data/Application/DF4AA09B-C94F-48E8-8E52-0380BBA70A8F/tmp/<APP NAME>/IMG_2240-SD%20for%20Apple%20Devices.mov'

    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0

    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <00000000000000000000000000000000>:0

    at System.IO.File.OpenRead (System.String path) [0x00000] in <00000000000000000000000000000000>:0

    at ImaginationOverflow.UniversalFileAssociation.Providers.IosFileProvider.OnFileUrlReceived (System.String lastFileUrl) [0x00000] in <00000000000000000000000000000000>:0

    at ImaginationOverflow.UniversalFileAssociation.Providers.IosFileProvider.OnCompletionCallback (System.String fileUrl) [0x00000] in <00000000000000000000000000000000>:0


    - This is resulting in the callback not completing - (aka, nothing happening in the app).
     
  4. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi!
    Thanks for using one of our plugins!
    First of all sorry about this, we weren't fast enough for you XD.

    We actually found this out recently and have finished the fix today, tomorrow we will push to the asset store which can take 1-2 days until available.

    If you need it now, send us an email or reach out to me (@DvD) on our Discord server and I will send you the updated plugin :)

    Thanks for reporting it and sorry for the trouble
     
  5. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi guys!
    Just to let you know that we updated the plugin to 1.0.1 with the following changes:
    [New] Copy to Stream feature
    [Improvement] Updated UTI list
    [Improvement] Demo scene
    [Fixed] iOS issue with names with special characters
    [Fixed] Android activated file names now appear correctly
    [Fixed] Android issue regarding big files

    For more info, you can check the full changelog on our blog.
     
  6. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi guys
    We just updated the plugin with the following changes:
    • The plugin default behavior for iOS file associations is now "open with" instead of "copy to" (avoids unnecessary copies)
    • macOS build issues are now all fixed
    • Added special case for video files on macOS due to unwritten conventions regarding video file associations.
    For more info check our blog post
     
  7. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    231
    Hi,
    Im running into a couple of issues when building Asset Bundles. Im using Unity 2020.10b3 for iOS.

    Do you have any ideas about this?

    Thanks!!

    Code (CSharp):
    1. Assets\Plugins\ImaginationOverflow\UniversalFileAssociation\Scripts\Providers\WindowsFileProvider.cs(47,27): error CS0103: The name 'Registry' does not exist in the current context
    2.  
    3. Assets\Plugins\ImaginationOverflow\UniversalFileAssociation\Scripts\Providers\WindowsFileProvider.cs(57,59): error CS0103: The name 'RegistryValueKind' does not exist in the current context
    4.  
    5. Assets\Plugins\ImaginationOverflow\UniversalFileAssociation\Scripts\Providers\WindowsFileProvider.cs(91,36): error CS0103: The name 'Registry' does not exist in the current context
    6.  
    7. Error building Player because scripts had compiler errors
     
  8. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    That error usually appears when you are building using .net standard, for Windows Standalone we need some .Net framework APIs in order for it to work.
    Since you have the Pro you can download the regular version and simply use our Standalone DLL located in Assets\Plugins\ImaginationOverflow\UniversalDeepLinking\libs\Standalone\ImaginationOverflow.UniversalDeepLinking.Platform.dll if you really need to build using the .net standard.

    EDIT: I saw your reply on our Discord, it seems it was configuration issue at your end, thanks for letting us know!
     
  9. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi guys, we just updated the plugin to 1.0.3:
    • [New] il2cpp Mac support
    • [Improvement] iOS now defaults to "open with" when asking the user to open a file
    • [Improvement] Compatibility with Unity cloud build
    • [Fixed] Issue on macOS that prevented the same file to be open more than once per session.
    For more details check out our blog post.
     
  10. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi guys, the new update now available!
    1.0.4 changelog:
    • [Fixed] iOS warnings when submitting to the app store
    • [Fixed] MacOS library issues
    • [Fixed] Issues regarding Unity Cloud Build
    • [Fixed] Issues regarding batch-mode builds
    For more info on the update check our blog.
    You can download from today from Asset Store Regular | Pro
     
  11. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi guys!
    We just released 1.0.5 for both the Regular and Pro versions, fixing some issues and adding more support for more file types, you can read the full changelog on our blog.

    We are also already working on the 1.0.6 version which will extend the plugin functionality on Android but it also brings a price increase to $15, so if you are thinking of getting the plugin, do it now before the price increase :).
     
  12. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Today we just released the 1.1.0 version, in it a few additions to the Android integration, and overall improvement of its integration with other plugins, mainly with Universal Deep Linking. For more info check our blog.
    A big thanks to everyone that provided feedback on the plugin!
     
  13. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    We just updated the plugin with a few fixes on the macOS integration, you can read about the changes on our blog.
     
  14. MarcBosc

    MarcBosc

    Joined:
    Oct 3, 2016
    Posts:
    3
    Hello I purchased the plugin but it is not working in Android with the file extension .xyz mime type: chemical/x-xyz I created a build for android, a just added some other extension just in case like jpg. .pdf and with this ones is working but not with the one I want to use xyz, with the Debug tool in the editor and with an iOS build it works ok, my build was made with unity 2019.2.19f1 and with 2019.4.2f2, please can you help me ASAP to solve it, thanks

    Captura de pantalla 2020-07-31 a las 13.25.15.png
     
  15. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi, sorry for the delay, and thanks for using one of our plugins!

    It seems that Android doesn't recognize that mimetype, to fix this you simply need to remove the xyz mimetype from the plugin default mimetypes file, you can find it on:
    \Plugins\ImaginationOverflow\UniversalFileAssociation\Resources\mimeType.json,
    Open it using any text editor and simply remove the json object for the xyz mimetype (line 1319).
    After that delete it from your configuration and add it again to ensure that the configuration is refreshed.
    Then (even without a mimetype) it should work as expected ;).

    Sorry for the trouble,
    Let us know how it went, and feel free to reach out to us again with any question or issue
     
  16. MarcBosc

    MarcBosc

    Joined:
    Oct 3, 2016
    Posts:
    3

    Hello, the fix you suggested is not working, the problem is when I use the Samsung File Explorer application, I was reading some people are having the same problem as me with some mimetypes, also I have tested my own custom extension and is not working either with the samsung file explorer:

    https://stackoverflow.com/questions...amsung-file-explorer#comment95806841_52624829

    https://stackoverflow.com/questions...r-abnormal-behavior-with-samsung-file-browser

    https://stackoverflow.com/questions...ters-blank-mimetype-for-proprietary-file-type

    please can you help me to find a solution, because my app should be able to open xyz mimetype with the samsung file explorer, thanks.
     
  17. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi
    Samsung file explorer right now it's impossible to open files with custom extensions (as far as I know), we've searched and tried a bunch of different things without any success.
    The underlying issue here is how they send the open request intent, the simply send something like
    content://blabla/123
    So besides not including the actual file name, they also don't add any mime type info on the intent, so it doesn't matter how broad our intent filter is, the android OS will never match it to any app due to the bad and lack of configuration of the intent by the My Files app. (you can check this by simply saying that your app opens all file types, which is done using the generic mime type, even then app won't let you open a custom file type). This is an issue only with the Samsung file explorer app, using any other explorer the setup we make works as expected...

    Right now the plugin also registers to be the Share Target for custom files, so right now you can share a file from the My Files app directly into yours, unfortunately that seems what is possible right now.

    PS: the share target feature will be deprecated on the next update, since it isn't a feature shared with all platforms
     
  18. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    The 1.1.1 version is now online with a few more tweaks, we also started consolidating all our plugins in a single framework, you can read more about the plugin update and these changes on our blog.
     
    Last edited: Sep 21, 2021
  19. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi everyone, a new update of the Universal File Association plugin is online with a fix on macOS builds when using Unity 2019.4, for more information check out our blog.
     
  20. ImaginationOverflowPT

    ImaginationOverflowPT

    Joined:
    Sep 15, 2017
    Posts:
    185
    Hi everyone, 1.1.9 is online with the following changes:
    • [Improvement] link.xml requirements for il2cpp builds
    • [Improvement] Xcode builds on unity 2020
    • [Fixed] Windows standalone issues when there were configuration conflicts
    • [Fixed] MacOS builds on unity 2019.4
    You can get it on the asset store right now Regular (no source code included) and Pro (full source code project with native libs).

    Any issue or question check the plugin's documentation on our website and join us on Discord!!