@maximilien0405/capacitor-android-launcher 7.0.6 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
@@ -11,18 +11,18 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.13.0'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
-
namespace "com.maximilien0405.androidlauncher"
|
|
22
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
21
|
+
namespace = "com.maximilien0405.androidlauncher"
|
|
22
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
|
|
23
23
|
defaultConfig {
|
|
24
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
25
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
26
26
|
versionCode 1
|
|
27
27
|
versionName "1.0"
|
|
28
28
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -34,7 +34,7 @@ android {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
lintOptions {
|
|
37
|
-
abortOnError false
|
|
37
|
+
abortOnError = false
|
|
38
38
|
}
|
|
39
39
|
compileOptions {
|
|
40
40
|
sourceCompatibility JavaVersion.VERSION_21
|
|
@@ -111,8 +111,17 @@ public class AndroidLauncher {
|
|
|
111
111
|
PackageManager packageManager = activity.getPackageManager();
|
|
112
112
|
Intent intent = new Intent(Intent.ACTION_MAIN);
|
|
113
113
|
intent.addCategory(Intent.CATEGORY_HOME);
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
|
|
115
|
+
// Get the default launcher by resolving the HOME intent
|
|
116
|
+
ResolveInfo defaultLauncher = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
|
|
117
|
+
|
|
118
|
+
if (defaultLauncher == null) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Check if the default launcher is our app
|
|
123
|
+
String myPackageName = activity.getPackageName();
|
|
124
|
+
return defaultLauncher.activityInfo.packageName.equals(myPackageName);
|
|
116
125
|
}
|
|
117
126
|
|
|
118
127
|
// Listen to system UI changes and hide UI if swiped
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst AndroidLauncher = registerPlugin('AndroidLauncher', {\n web: () => import('./web').then(m => new m.AndroidLauncherWeb()),\n});\nexport * from './definitions';\nexport { AndroidLauncher };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AndroidLauncherWeb extends WebPlugin {\n async openLauncherSettings() {\n throw new Error('openLauncherSettings is not supported on the web.');\n }\n async startImmersiveMode() {\n throw new Error('startImmersiveMode is not supported on the web.');\n }\n async stopImmersiveMode() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n async isLauncherApp() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC;AAC5E;
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst AndroidLauncher = registerPlugin('AndroidLauncher', {\n web: () => import('./web').then(m => new m.AndroidLauncherWeb()),\n});\nexport * from './definitions';\nexport { AndroidLauncher };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AndroidLauncherWeb extends WebPlugin {\n async openLauncherSettings() {\n throw new Error('openLauncherSettings is not supported on the web.');\n }\n async startImmersiveMode() {\n throw new Error('startImmersiveMode is not supported on the web.');\n }\n async stopImmersiveMode() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n async isLauncherApp() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC;AAC5E,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC;AAC1E,IAAI;AACJ,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC;AACzE,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC;AACzE,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst AndroidLauncher = registerPlugin('AndroidLauncher', {\n web: () => import('./web').then(m => new m.AndroidLauncherWeb()),\n});\nexport * from './definitions';\nexport { AndroidLauncher };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AndroidLauncherWeb extends WebPlugin {\n async openLauncherSettings() {\n throw new Error('openLauncherSettings is not supported on the web.');\n }\n async startImmersiveMode() {\n throw new Error('startImmersiveMode is not supported on the web.');\n }\n async stopImmersiveMode() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n async isLauncherApp() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC;IAC5E;
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst AndroidLauncher = registerPlugin('AndroidLauncher', {\n web: () => import('./web').then(m => new m.AndroidLauncherWeb()),\n});\nexport * from './definitions';\nexport { AndroidLauncher };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class AndroidLauncherWeb extends WebPlugin {\n async openLauncherSettings() {\n throw new Error('openLauncherSettings is not supported on the web.');\n }\n async startImmersiveMode() {\n throw new Error('startImmersiveMode is not supported on the web.');\n }\n async stopImmersiveMode() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n async isLauncherApp() {\n throw new Error('stopImmersiveMode is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC;IAC5E,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC;IAC1E,IAAI;IACJ,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC;IACzE,IAAI;IACJ,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC;IACzE,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maximilien0405/capacitor-android-launcher",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Capacitor plugin to request your app to be the main launcher.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,23 +46,23 @@
|
|
|
46
46
|
"prepublishOnly": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@capacitor/android": "^
|
|
50
|
-
"@capacitor/core": "^
|
|
51
|
-
"@capacitor/docgen": "^0.3.
|
|
52
|
-
"@capacitor/ios": "^
|
|
49
|
+
"@capacitor/android": "^8.0.0",
|
|
50
|
+
"@capacitor/core": "^8.0.0",
|
|
51
|
+
"@capacitor/docgen": "^0.3.1",
|
|
52
|
+
"@capacitor/ios": "^8.0.0",
|
|
53
53
|
"@ionic/eslint-config": "^0.4.0",
|
|
54
54
|
"@ionic/prettier-config": "^4.0.0",
|
|
55
55
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
56
|
-
"eslint": "^8.57.
|
|
57
|
-
"prettier": "^3.
|
|
58
|
-
"prettier-plugin-java": "^2.
|
|
59
|
-
"rimraf": "^6.0
|
|
60
|
-
"rollup": "^4.
|
|
56
|
+
"eslint": "^8.57.1",
|
|
57
|
+
"prettier": "^3.6.2",
|
|
58
|
+
"prettier-plugin-java": "^2.7.7",
|
|
59
|
+
"rimraf": "^6.1.0",
|
|
60
|
+
"rollup": "^4.53.2",
|
|
61
61
|
"swiftlint": "^2.0.0",
|
|
62
|
-
"typescript": "
|
|
62
|
+
"typescript": "^5.9.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@capacitor/core": ">=
|
|
65
|
+
"@capacitor/core": ">=8.0.0"
|
|
66
66
|
},
|
|
67
67
|
"prettier": "@ionic/prettier-config",
|
|
68
68
|
"swiftlint": "@ionic/swiftlint-config",
|