Comments (1)
The function does not return a promise, so you should not use .then()
constructor(private appAvailability: AppAvailability) {
this.appAvailability.check(
'com.facebook.katana',
() => { // success callback
console.log('TEST success: com.facebook.katana');
},
() => { // error callback
console.log('TEST error: com.facebook.katana');
}
);
}
However, if you want to use Promises, we can turn the callbacks into promises with a wrapper function like this:
async function checkAppPromisified(appId: string) {
return new Promise(resolve => {
window.appAvailability.check(appId, () => resolve(true), (error) => resolve(false));
});
}
from appavailability.
Related Issues (20)
- checkAvailability crashes with empty scheme HOT 2
- White screen in IOS application.
- 你好,能给下iOS写xcode的完整运行工程???
- Viber URL Scheme
- TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"]) is not a function.
- Not detecting any third party applications HOT 4
- App availability not working on ios.
- Not working on iOs with AngularJS HOT 4
- [Android] [com.facebook.katana] Package manager has died HOT 5
- npm ERR! 404 'com.ohh2ahh.plugins.appavailability' is not in the npm registry.
- plugin does not work with + iOS 11 HOT 4
- iOS - WhatsApp Business scheme HOT 1
- Targeting AndroidSdk 30, appAvailability.check is broken on Android phone With Android 11 HOT 1
- Not working on Android 11 HOT 4
- With android 10.1.1 it doesn't work.
- [Solved] Android 12 not work for AppAvailability HOT 2
- Wrong return type
- Plugin not working with Ionic 5 ?
- callback always "success" even uninstalling twiter app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appavailability.