Launch application with parameters

Would like to request a way to launch an application with parameters. For example, URL Schemes on both Android/iOS when we want to launch the application with additional parameter(s) (viewUser?Id=1) or send a user to the playstore/Appstore if they do not currently have the application installed.

Another use case would be when using Two-Way authentication. User gets an e-mail, presses the link, and in our case the application launches and sends the SessionID as a parameter.

Hi Kim,

This is defintely something we can and will support, and I have raised an issue to make sure we get to it. Thanks for the suggestion,

Chris

Hey Chris,

Is it possible to get this feature until mid-august?

As Kim stated it would improve our register process but also would it be one step further to web-integration (Facebook, twitter…).

Basicly if someone opens a link it would send him to the app-stores if he doesn’t have the app installed. If it is, it would open the app with parameters.

I did some research: For this feature it has to be possible to define Custom URL Schemes (iOS) and register Intent-filters (Android)

Hey folks, I’ve been looking into this too :slight_smile: Whilst we will want to support the full range of startup features for both platforms I’m going to start by adding support for something that will be consistent across android and ios, namely custom url schemes.

I’ll then look into how best to expose android’s intent filters and ios’ airdrop. We could of course put this kind of stuff in the unoproj file, but I’d rather not recreate the monsters that are the Android Manifest or iOS plist files, if there is another alternative.

Thanks for you patience and suggestions & if you have any thoughts on good ways of presenting these options do feel free to suggest them :slight_smile:

It’s now done and it will be in next week’s update

To use it you do the following:

  • Under the “Mobile” section of your unoproj add UrlSceme entry. The value is the unique url scheme you want to use. For example in my test app called Purple I have this:
"Mobile": {
    "UriScheme": "Purple",
    "Orientations": "Auto",
},

This means that any url that starts Purple:// will be routed to my app.

To receive the url in your app you attach a function to the ReceivedURI event on Application.

For example: Uno.Platform2.Application.ReceivedURI += OnUri;

Where OnUri looks like:

public void OnUri(object sender, string uri)
{
    debug_log "URI = " + uri;
}

Currently this is only exposed to Uno will will be coming to javascript shortly.

Is there any way to combine custom URI’s with WebView ? e.g. allowing to have the app run a localhost server which responds to all requests via “purple://*” or just to intercept all requests to a given URI scheme by the app and route the requests through a router within the app ?

> **Chris Bagley wrote:** > >

It’s now done and it will be in next week’s update

To use it you do the following:

  • Under the “Mobile” section of your unoproj add UrlSceme entry. The value is the unique url scheme you want to use. For example in my test app called Purple I have this:
"Mobile": {
>     "UriScheme": "Purple",
>     "Orientations": "Auto",
> },
> 

This means that any url that starts Purple:// will be routed to my app.

To receive the url in your app you attach a function to the ReceivedURI event on Application.

For example: Uno.Platform2.Application.ReceivedURI += OnUri;

Where OnUri looks like:

public void OnUri(object sender, string uri)
> {
>     debug_log "URI = " + uri;
> }
> 

Currently this is only exposed to Uno will will be coming to javascript shortly.

> Hi Chris; I couldn’t manage to apply your suggested method and couldn’t really find a how to in docs, could you please elaborate on how to do this?

You can use the FuseJS/InterApp module to do this from JavaScript.