diff --git a/android/build.gradle b/android/build.gradle index 70660b2..d374b27 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,7 @@ +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + buildscript { repositories { google() @@ -12,12 +16,14 @@ buildscript { apply plugin: 'com.android.library' android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion safeExtGet('compileSdkVersion', 23) + //noinspection GradleDependency + buildToolsVersion safeExtGet('buildToolsVersion', '23.0.1') defaultConfig { - minSdkVersion 16 - targetSdkVersion 26 + minSdkVersion safeExtGet('minSdkVersion', 16) + //noinspection OldTargetApi + targetSdkVersion safeExtGet('targetSdkVersion', 23) versionCode 1 versionName "1.0" } diff --git a/app-installed-checker.js b/app-installed-checker.js index e08be30..4515545 100644 --- a/app-installed-checker.js +++ b/app-installed-checker.js @@ -21,11 +21,9 @@ class AppInstalledChecker { Linking .canOpenURL(proto + '://' + query || '') .then((isInstalled) => { - console.log('isInstalled', isInstalled); resolve(isInstalled); }) .catch((err) => { - console.log('erroer', err); reject(err); }); }); @@ -39,7 +37,7 @@ class AppInstalledChecker { } static isAppInstalledAndroid(key) { - return this.checkPackageName(APP_LIST[key] != null ? APP_LIST[key].pkgName : key); + return this.checkPackageName(key); } static isAppInstalledIOS(key) {