#1 2016-04-26 00:00:17

m.napo
Member
Registered: 2016-04-25
Posts: 1

How to implement a custom URL scheme in App Builder

hi david  ,

i need this plugin to appbuilder :

https://github.com/EddyVerbruggen/Custo … escription

please help me, thanks napo

Offline

#2 2016-04-26 00:18:45

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: How to implement a custom URL scheme in App Builder

Hello,

Thanks for your interest in my work at App Builder. Certainly this plugin is not included "out of the box" in App Builder, however, as you know (take a look at the CordovaPlugins app sample) we can use virtually any Cordova's plugin even if they are not included by default.

Take a look at the below app sample:

UrlScheme.zip

In that application we use the Cordova's Extra Batch option to add the plugin to our application. We use this action and not the Custom plugins because this plugin is a bit special: we need to append certain variable (the URL scheme identifier) along the plugin ID.

Then, take a look at the app's Ready event:

StartJS
  window.handleOpenURL = function(url) {
    alert("received url: " + url);
  };
EndJS

What we can see is quite simple. The "handleOneUrl" function that we prepared is fired by the plugin when a custom URL is open in the system. That is, once our application is installed in Android, for example, we can navigate to an URL like this using the system browser or Firefox, for example:

mycoolapp://somepath

Then the system open our application and the plugin fired the refered function, then we can do whatever we wanted.

Maybe I add this plugin "out of the box" in the future, or incorporate it as a App Builder's Javascript plugin. Anyway, we can always use a Cordova's plugin, just by preparing the plugin ID and use the plugin Javascript provided API.

Hope this information can help you and thanks again for your interest in my work at App Builder.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.