AppLoader(options)

new AppLoader(options)

Mobile App loader

Parameters:
Name Type Description
options object

Option object

Properties
Name Type Attributes Default Description
usageStatistics boolean <optional>
true

Let us know the hostname. If you don't want to send the hostname, please set to false.

See:
Examples

node, commonjs

var Apploader = require('tui-app-loader');
var appLoader = new AppLoader();
appLoader.exec(...);

brower, global namespace

var appLoader = new tui.AppLoader();
appLoader.exec(...);

Methods

exec(options)

Call app

Parameters:
Name Type Description
options object

The option for app

Properties
Name Type Description
ios object

IOS app information

android object

Android information

timerSet object

A timer time set for callback deley time

etcCallback function

If unsupportable mobile

notFoundCallback function

It not found

Example
var loader = new tui.AppLoader();
loader.exec({
     ios: {
         scheme: '<app-scheme>://', // iphone app scheme
         url: 'https://itunes.apple.com/app/<id-app>', // app store url,
         universalLink: 'app:///<universal-link>/'
     },
     android: {
         intentURI: 'intent://<action>#Intent;scheme=<app-scheme>;package=<package-name>;end' // android intent uri
     },
     timerSet: { // optional values
         ios: 2000, // default: 2000
         android: 1000 // default: 800
     },
     notFoundCallback: function() { // if not installed
         alert('not found');
     },
     etcCallback: function() { // if not mobile
         alert('etc');
     }
});