Template:URL-scheme

From iRidium Mobile Wiki
Jump to: navigation, search

URL-scheme is an indicator to the resource which you need to activate with the iRidium command.

You can perform standard commands of the OS: launch an application, open a link in the browser, open a mail-agent, make calls, send SMS and etc.

There are different types of commands for different OS. Consider the type of the OS the project will work when selecting the commands.


Examples of URL-schemes:

  • Execute(http://iridiummobile.net)
– open the link in the browser (iOS/Windows/Android/OS X)
  • Execute(c:\Program Files\iRidium mobile2\iRidium\iRidium.exe)
– launch the application (Windows)
  • Execute(tel:+123456789)
– call the number (iPhone, Android)
  • Execute(sms:+123456789)
– send an SMS to the phone number (iPhone, Android)
  • Execute(mailto:test@example.com)
– send a message to the email address (iOS/Windows/Android/OS X)


Start iRidium from third-party apps or browsers

  • iridium:// - to start and open i2 Control V2.2. The command works in the browser of iOS/Android devices with installed i2 Control V2.2, in application with support of URL-schemes activation on iOS/Android
  • iridium://webupdate?https://s3.amazonaws.com/irmarketing/iPhone5_Metro.irpz - upload the project to i2 Control V2.2
    • iridium://webupdate? - the scheme of i2 Control V2.2 activation with the "update the project" command
    • https://s3.amazonaws.com/irmarketing/iPhone5_Metro.irpz - the HTTP(s) link to the resource where the project is stored
  • iridium://script?data1&data2
    • iridium://script? - the scheme of i2 Control V2.2 activation with writing data in the script
    • data1&data2 - any data string which will be sent to the script, to the query parameter
    • IR.AddListener(IR.EVENT_RECIEVE_SCHEME,0,function(query, source) {}); - the listener which received the sent query string and executes actions corresponding to it. source - the name of the resource which sent the data to the script.
iridium://script?Page1
IR.AddListener(IR.EVENT_RECIEVE_SCHEME,0,function(query, source) {
   if (query == "Page1")   {
      IR.ShowPage("Page 1");
   }
});


Open an external app from iRidium

  • Execute(app://)

- URL-scheme for launching applications. <app> - the application name. For example: youtube://
Possibility of launching an application depends on the application itself (if the developer included this function or not).
URL-schemes on iOS and Android are not identical. The application you can launch on iOS might not launch on Android.

>>> List of URL-schemes for iPhone >>>


Call the URL-scheme from iRidium Script:

  • IR.Execute("command");