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

Receiving parameters from custom mime type in Unity apps on mobile

Discussion in 'Scripting' started by EddieOffermann, Sep 13, 2015.

  1. EddieOffermann

    EddieOffermann

    Joined:
    Sep 13, 2015
    Posts:
    13
    I'm having a hard time finding the answer to this specific problem because I get too many hits for too many things that are only peripherally related.

    I have a web page delivering data with a custom mime type. To keep things simple, we'll say my app is a PNG viewer and the mimetype is image/png - I can register the app to be an option for opening PNG files and my app will show up as an option to open the hyperlink in.

    So I understand how to launch my app when a user clicks on a link that delivers that mime type. I need to get the corresponding URL when the application launches. If I want to get the path to the PNG that the app then needs to open, I know it's passed by the mobile OS - but I don't know where to get that data from in Unity.

    This seems like a simple problem but I haven't found where it's discussed either in the Unity docs or online. Can someone point me in the right direction? I've found a couple tools for handling deep linking (which is similar), but this ought to be a little more straightforward.

    In my specific usecase, I'm on iOS but I'll need this for Android as well in the immediate future.
     
    Last edited: Sep 13, 2015
  2. knmanas6

    knmanas6

    Joined:
    Sep 8, 2019
    Posts:
    1
    hey Eddie did you find a solution for the same? stuck in the same problem.