本文整理汇总了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');
}