本文整理汇总了TypeScript中@ionic-native/core.checkAvailability函数的典型用法代码示例。如果您正苦于以下问题:TypeScript checkAvailability函数的具体用法?TypeScript checkAvailability怎么用?TypeScript checkAvailability使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkAvailability函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: createAuthenticationContext
createAuthenticationContext(authority: string, validateAuthority: boolean = true) {
let authContext: any;
if (checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) === true) {
authContext = new (MSAdal.getPlugin()).AuthenticationContext(authority);
}
return new AuthenticationContext(authContext);
}
开发者ID:sourbell,项目名称:ionic-native,代码行数:7,代码来源:index.ts
示例2: create
/**
* Creates a new instance of FlurryAnalyticsObject
* @param options {FlurryAnalyticsOptions} options
* @return {FlurryAnalyticsObject}
*/
create(options: FlurryAnalyticsOptions): FlurryAnalyticsObject {
let instance: any;
if (checkAvailability(FlurryAnalytics.pluginRef, null, FlurryAnalytics.pluginName) === true) {
instance = new (window as any).FlurryAnalytics(options);
}
return new FlurryAnalyticsObject(instance);
}
开发者ID:clintj42,项目名称:ionic-native,代码行数:16,代码来源:index.ts
示例3: switchMap
switchMap(() => {
/**
* Native HTTP Cordova plugin doesn't like local requests
*/
const isExternalRequest = checkExternalRequest(req);
if (
isExternalRequest &&
checkAvailability('cordova.plugin.http') === true
) {
return this.cordovaHttpBackend.handle(req);
} else {
return this.fallbackBackend.handle(req);
}
}),
开发者ID:achubutkin,项目名称:ionic-native-http-connection-backend,代码行数:15,代码来源:native-http-fallback.ts
示例4: constructor
constructor(title: string, options: LocalNotificationOptions) {
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
this._objectInstance = new Notification(title, options);
}
}
开发者ID:clintj42,项目名称:ionic-native,代码行数:5,代码来源:index.ts
示例5: constructor
constructor(options: PushOptions) {
if (checkAvailability('PushNotification', 'init', 'PushNotification') === true) {
this._objectInstance = window.PushNotification.init(options);
}
}
开发者ID:sourbell,项目名称:ionic-native,代码行数:5,代码来源:index.ts
示例6: constructor
constructor() {
if (checkAvailability('navigator.contacts', 'create', 'Contacts') === true) {
this._objectInstance = navigator.contacts.create();
}
}
开发者ID:gunsteaeuy,项目名称:ionic-native,代码行数:5,代码来源:index.ts
注:本文中的@ionic-native/core.checkAvailability函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论