本文整理匯總了TypeScript中@ionic-native/in-app-browser.InAppBrowser類的典型用法代碼示例。如果您正苦於以下問題:TypeScript InAppBrowser類的具體用法?TypeScript InAppBrowser怎麽用?TypeScript InAppBrowser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了InAppBrowser類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: onForgotPassword
onForgotPassword() {
var url = "https://hashtag.bigidea.co.il/account/password/forgot?type=1&locale=" + this.translate.currentLang;
let browser = InAppBrowser.create(url, "_system");
}
示例2: if
handler: () => {
this._store.dispatch(new AppVersionsActions.NotfiedUserAction());
if (this._platform.is("ios")) {
this._iab.create(APP_STORE_URL, "_system");
} else if (this._platform.is("android")) {
this._iab.create(GOOGLE_PLAY_URL, "_system");
}
return false;
}
示例3: rateApp
/**
* Open the app store page
*/
public rateApp() {
if (this.platform.is('android')) {
this.inAppBrowserPlugin.create('market://details?id=' + AppSettings.appId.android, '_system');
} else if (this.platform.is('ios')) {
this.inAppBrowserPlugin.create('itms-apps://itunes.apple.com/fr/app/vliller/id' + AppSettings.appId.ios + '?mt=8', '_system');
} else {
Raven.captureException(new Error('Rate app - Unknow platform?!'));
}
};
示例4: launchExternalApp
launchExternalApp(iosSchemaName: string, androidPackageName: string, appUrl: string, httpUrl: string, username: string) {
let app: string;
if (this.device.platform === 'iOS') {
app = iosSchemaName;
} else if (this.device.platform === 'Android') {
app = androidPackageName;
} else {
let browser = this.iab.create(httpUrl, '_system');
return;
}
this.appAvailability.check(app).then(
() => { // success callback
let browser = this.iab.create(appUrl + username, '_system');
},
() => { // error callback
let browser = this.iab.create(httpUrl, '_system');
}
);
}
示例5: Promise
return new Promise((resolve, reject) => {
this.logger.info(eicformatlog(EicOauth2AuthorizeService.name, "Config: " + this.config, true));
const uri = this.config.authorizeUrl +
"?client_id=" + this.config.params.clientId +
"&redirect_uri=http://localhost/callback&response_type=token";
const browserRef = this.appBrowser.create(uri,
"_blank", "location=no,clearsessioncache=yes,clearcache=yes");
this.logger.debug(eicformatlog(EicOauth2AuthorizeService.name, "URI: " + uri));
browserRef.on("loadstart").subscribe(event => {
if ((event.url).indexOf("http://localhost/callback") === 0) {
browserRef.on("exit").subscribe(event => {});
browserRef.close();
this.logger.debug(eicformatlog(EicOauth2AuthorizeService.name, "URL callback: " + event.url));
const responseParameters = ((event.url).split("#")[1]).split("&");
const parsedResponse = {};
for (const responseParameter of responseParameters) {
parsedResponse[responseParameter.split("=")[0]] = responseParameter.split("=")[1];
}
if (parsedResponse["access_token"] !== undefined) {
resolve(parsedResponse);
} else {
reject();
}
}
});
browserRef.on("exit").subscribe( event => {
reject();
});
});
示例6: launch
launch(url) {
this.iab.create(url, '_system');
}
示例7: openLink
/**
*
* @param {String} link
*/
public openLink(link) {
this.inAppBrowserPlugin.create(link, '_system');
};
示例8:
this.platform.ready().then(() => {
this.inAppBrowser.create(url, '_system');
});
示例9: openSelected
public openSelected(item: string) {
console.log(item);
this.iab.create(item);
}
示例10: volunteer
public volunteer() {
let url = this.settingsProvider.BaseUrl + "/Event/" + this.task.EventId;
this.iab.create(url, '_self');
}