capacitor-autostartmanager 0.0.1
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/CapacitorAutostartmanager.podspec +17 -0
- package/README.md +66 -0
- package/android/build.gradle +63 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/io/github/asephermann/plugins/autostartmanager/AutoStartManager.kt +85 -0
- package/android/src/main/java/io/github/asephermann/plugins/autostartmanager/AutoStartManagerPlugin.kt +31 -0
- package/android/src/main/java/io/github/asephermann/plugins/autostartmanager/AutoStartPermissionHelper.kt +211 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +69 -0
- package/dist/esm/definitions.d.ts +9 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +11 -0
- package/dist/esm/web.js +13 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +29 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +32 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/AutoStartManager.swift +8 -0
- package/ios/Plugin/AutoStartManagerPlugin.h +10 -0
- package/ios/Plugin/AutoStartManagerPlugin.m +8 -0
- package/ios/Plugin/AutoStartManagerPlugin.swift +18 -0
- package/ios/Plugin/Info.plist +24 -0
- package/package.json +78 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapacitorAutostartmanager'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '12.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# capacitor-autostartmanager
|
|
2
|
+
|
|
3
|
+
Auto Start Manager, Check Automatic Date Time Zone, Check Camera
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install capacitor-autostartmanager
|
|
9
|
+
npx cap sync
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## API
|
|
13
|
+
|
|
14
|
+
<docgen-index>
|
|
15
|
+
|
|
16
|
+
* [`showStartManager()`](#showstartmanager)
|
|
17
|
+
* [`checkAutomaticDateTimeZone()`](#checkautomaticdatetimezone)
|
|
18
|
+
* [`checkCamera()`](#checkcamera)
|
|
19
|
+
* [Interfaces](#interfaces)
|
|
20
|
+
|
|
21
|
+
</docgen-index>
|
|
22
|
+
|
|
23
|
+
<docgen-api>
|
|
24
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
25
|
+
|
|
26
|
+
### showStartManager()
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
showStartManager() => Promise<void>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
--------------------
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### checkAutomaticDateTimeZone()
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
checkAutomaticDateTimeZone() => Promise<{ isAutomatic: Boolean; }>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Returns:** <code>Promise<{ isAutomatic: <a href="#boolean">Boolean</a>; }></code>
|
|
42
|
+
|
|
43
|
+
--------------------
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### checkCamera()
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
checkCamera() => Promise<{ isCameraOpen: Boolean; }>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Returns:** <code>Promise<{ isCameraOpen: <a href="#boolean">Boolean</a>; }></code>
|
|
53
|
+
|
|
54
|
+
--------------------
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Interfaces
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
#### Boolean
|
|
61
|
+
|
|
62
|
+
| Method | Signature | Description |
|
|
63
|
+
| ----------- | ---------------- | ---------------------------------------------------- |
|
|
64
|
+
| **valueOf** | () => boolean | Returns the primitive value of the specified object. |
|
|
65
|
+
|
|
66
|
+
</docgen-api>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
ext.kotlin_version = '1.7.20-Beta'
|
|
10
|
+
repositories {
|
|
11
|
+
google()
|
|
12
|
+
jcenter()
|
|
13
|
+
}
|
|
14
|
+
dependencies {
|
|
15
|
+
classpath 'com.android.tools.build:gradle:4.2.1'
|
|
16
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
apply plugin: 'com.android.library'
|
|
21
|
+
apply plugin: 'kotlin-android'
|
|
22
|
+
|
|
23
|
+
android {
|
|
24
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
|
|
25
|
+
defaultConfig {
|
|
26
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
|
|
27
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
|
|
28
|
+
versionCode 1
|
|
29
|
+
versionName "1.0"
|
|
30
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
31
|
+
}
|
|
32
|
+
buildTypes {
|
|
33
|
+
release {
|
|
34
|
+
minifyEnabled false
|
|
35
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
lintOptions {
|
|
39
|
+
abortOnError false
|
|
40
|
+
}
|
|
41
|
+
compileOptions {
|
|
42
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
43
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
repositories {
|
|
48
|
+
google()
|
|
49
|
+
mavenCentral()
|
|
50
|
+
jcenter()
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
dependencies {
|
|
55
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
56
|
+
implementation project(':capacitor-android')
|
|
57
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
58
|
+
testImplementation "junit:junit:$junitVersion"
|
|
59
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
60
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
61
|
+
implementation "androidx.core:core-ktx:1.6.0"
|
|
62
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
63
|
+
}
|
package/android/src/main/java/io/github/asephermann/plugins/autostartmanager/AutoStartManager.kt
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
package io.github.asephermann.plugins.autostartmanager
|
|
2
|
+
|
|
3
|
+
import android.app.Activity
|
|
4
|
+
import android.app.AlertDialog
|
|
5
|
+
import android.content.Context
|
|
6
|
+
import android.content.Intent
|
|
7
|
+
import android.hardware.Camera
|
|
8
|
+
import android.os.Build
|
|
9
|
+
import android.provider.Settings
|
|
10
|
+
import android.provider.Settings.SettingNotFoundException
|
|
11
|
+
import android.util.Log
|
|
12
|
+
|
|
13
|
+
const val TAG = "AutoStartManager"
|
|
14
|
+
|
|
15
|
+
class AutoStartManager {
|
|
16
|
+
|
|
17
|
+
fun showStartManager(activity: Activity) {
|
|
18
|
+
val context: Context = activity.applicationContext
|
|
19
|
+
AutoStartPermissionHelper().getAutoStartPermission(context)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
fun checkAutomaticDateTimeZone(activity: Activity): Boolean{
|
|
23
|
+
try {
|
|
24
|
+
val result = isAutomaticChecked(activity)
|
|
25
|
+
val context: Context = activity.applicationContext
|
|
26
|
+
if (!result) {
|
|
27
|
+
val alertDialog: AlertDialog = AlertDialog.Builder(activity).create()
|
|
28
|
+
alertDialog.setTitle("Enable Automatic Date Time")
|
|
29
|
+
alertDialog.setCancelable(false)
|
|
30
|
+
alertDialog.setMessage("Your Automatic Date Time or Time Zone Settings is set to 'Off'.\nPlease Enable to use this feature")
|
|
31
|
+
alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "Show Settings"
|
|
32
|
+
) { dialog, _ ->
|
|
33
|
+
val i = Intent(Settings.ACTION_DATE_SETTINGS)
|
|
34
|
+
i.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
|
35
|
+
context.startActivity(i)
|
|
36
|
+
dialog.dismiss()
|
|
37
|
+
}
|
|
38
|
+
alertDialog.show()
|
|
39
|
+
return false
|
|
40
|
+
} else {
|
|
41
|
+
return true
|
|
42
|
+
}
|
|
43
|
+
} catch (e: SettingNotFoundException) {
|
|
44
|
+
Log.d(TAG, "SettingNotFoundException")
|
|
45
|
+
}
|
|
46
|
+
return false
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@Throws(SettingNotFoundException::class)
|
|
50
|
+
fun isAutomaticChecked(activity: Activity): Boolean {
|
|
51
|
+
val dateTime: Int
|
|
52
|
+
val timezone: Int
|
|
53
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
|
54
|
+
dateTime =
|
|
55
|
+
Settings.Global.getInt(activity.contentResolver, Settings.Global.AUTO_TIME, 0)
|
|
56
|
+
timezone =
|
|
57
|
+
Settings.Global.getInt(activity.contentResolver, Settings.Global.AUTO_TIME_ZONE, 0)
|
|
58
|
+
} else {
|
|
59
|
+
dateTime = Settings.System.getInt(
|
|
60
|
+
activity.contentResolver,
|
|
61
|
+
Settings.System.AUTO_TIME_ZONE,
|
|
62
|
+
0
|
|
63
|
+
)
|
|
64
|
+
timezone = Settings.System.getInt(
|
|
65
|
+
activity.contentResolver,
|
|
66
|
+
Settings.System.AUTO_TIME,
|
|
67
|
+
0
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
return !(dateTime == 0 || timezone == 0)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
fun checkCamera(): Boolean{
|
|
74
|
+
var camera: Camera? = null
|
|
75
|
+
try {
|
|
76
|
+
camera = Camera.open()
|
|
77
|
+
} catch (e: RuntimeException) {
|
|
78
|
+
return false
|
|
79
|
+
} finally {
|
|
80
|
+
camera?.release()
|
|
81
|
+
}
|
|
82
|
+
return true
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package io.github.asephermann.plugins.autostartmanager
|
|
2
|
+
|
|
3
|
+
import com.getcapacitor.JSObject
|
|
4
|
+
import com.getcapacitor.Plugin
|
|
5
|
+
import com.getcapacitor.PluginCall
|
|
6
|
+
import com.getcapacitor.PluginMethod
|
|
7
|
+
import com.getcapacitor.annotation.CapacitorPlugin
|
|
8
|
+
|
|
9
|
+
@CapacitorPlugin(name = "AutoStartManager")
|
|
10
|
+
class AutoStartManagerPlugin : Plugin() {
|
|
11
|
+
private val implementation = AutoStartManager()
|
|
12
|
+
|
|
13
|
+
@PluginMethod
|
|
14
|
+
fun showStartManager(call: PluginCall) {
|
|
15
|
+
implementation.showStartManager(activity)
|
|
16
|
+
}
|
|
17
|
+
@PluginMethod
|
|
18
|
+
fun checkAutomaticDateTimeZone(call: PluginCall) {
|
|
19
|
+
val ret = JSObject()
|
|
20
|
+
val isAutomatic = implementation.checkAutomaticDateTimeZone(activity)
|
|
21
|
+
ret.put("isAutomatic", isAutomatic)
|
|
22
|
+
call.resolve(ret)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@PluginMethod
|
|
26
|
+
fun checkCamera(call: PluginCall) {
|
|
27
|
+
val ret = JSObject()
|
|
28
|
+
ret.put("isCameraOpen", implementation.checkCamera())
|
|
29
|
+
call.resolve(ret)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
package io.github.asephermann.plugins.autostartmanager
|
|
2
|
+
|
|
3
|
+
import android.content.ComponentName
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import android.content.Intent
|
|
6
|
+
import android.content.pm.ApplicationInfo
|
|
7
|
+
import android.os.Build
|
|
8
|
+
import java.util.*
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AutoStartPermissionHelper {
|
|
12
|
+
|
|
13
|
+
/***
|
|
14
|
+
* Xiaomi
|
|
15
|
+
*/
|
|
16
|
+
val BRAND_XIAOMI = "xiaomi"
|
|
17
|
+
private val PACKAGE_XIAOMI_MAIN = "com.miui.securitycenter"
|
|
18
|
+
private val PACKAGE_XIAOMI_COMPONENT = "com.miui.permcenter.autostart.AutoStartManagementActivity"
|
|
19
|
+
|
|
20
|
+
/***
|
|
21
|
+
* Letv
|
|
22
|
+
*/
|
|
23
|
+
val BRAND_LETV = "letv"
|
|
24
|
+
private val PACKAGE_LETV_MAIN = "com.letv.android.letvsafe"
|
|
25
|
+
private val PACKAGE_LETV_COMPONENT = "com.letv.android.letvsafe.AutobootManageActivity"
|
|
26
|
+
|
|
27
|
+
/***
|
|
28
|
+
* ASUS ROG
|
|
29
|
+
*/
|
|
30
|
+
val BRAND_ASUS = "asus"
|
|
31
|
+
val PACKAGE_ASUS_MAIN = "com.asus.mobilemanager"
|
|
32
|
+
val PACKAGE_ASUS_COMPONENT = "com.asus.mobilemanager.MainActivity"
|
|
33
|
+
|
|
34
|
+
/***
|
|
35
|
+
* Honor
|
|
36
|
+
*/
|
|
37
|
+
val BRAND_HONOR = "honor"
|
|
38
|
+
private val PACKAGE_HONOR_MAIN = "com.huawei.systemmanager"
|
|
39
|
+
private val PACKAGE_HONOR_COMPONENT = "com.huawei.systemmanager.optimize.process.ProtectActivity"
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Oppo
|
|
43
|
+
*/
|
|
44
|
+
val BRAND_OPPO = "oppo"
|
|
45
|
+
private val PACKAGE_OPPO_MAIN = "com.coloros.safecenter"
|
|
46
|
+
private val PACKAGE_OPPO_FALLBACK = "com.oppo.safe"
|
|
47
|
+
private val PACKAGE_OPPO_COMPONENT = "com.coloros.safecenter.permission.startup.StartupAppListActivity"
|
|
48
|
+
private val PACKAGE_OPPO_COMPONENT_FALLBACK = "com.oppo.safe.permission.startup.StartupAppListActivity"
|
|
49
|
+
private val PACKAGE_OPPO_COMPONENT_FALLBACK_A = "com.coloros.safecenter.startupapp.StartupAppListActivity"
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Vivo
|
|
53
|
+
*/
|
|
54
|
+
val BRAND_VIVO = "vivo"
|
|
55
|
+
private val PACKAGE_VIVO_MAIN = "com.iqoo.secure"
|
|
56
|
+
private val PACKAGE_VIVO_FALLBACK = "com.vivo.permissionmanager"
|
|
57
|
+
private val PACKAGE_VIVO_COMPONENT = "com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity"
|
|
58
|
+
private val PACKAGE_VIVO_COMPONENT_FALLBACK = "com.vivo.permissionmanager.activity.BgStartUpManagerActivity"
|
|
59
|
+
private val PACKAGE_VIVO_COMPONENT_FALLBACK_A = "com.iqoo.secure.ui.phoneoptimize.BgStartUpManager"
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Nokia
|
|
63
|
+
*/
|
|
64
|
+
val BRAND_NOKIA = "nokia"
|
|
65
|
+
private val PACKAGE_NOKIA_MAIN = "com.evenwell.powersaving.g3"
|
|
66
|
+
private val PACKAGE_NOKIA_COMPONENT = "com.evenwell.powersaving.g3.exception.PowerSaverExceptionActivity"
|
|
67
|
+
|
|
68
|
+
fun getAutoStartPermission(context: Context) {
|
|
69
|
+
val build_info = Build.BRAND.lowercase(Locale.getDefault())
|
|
70
|
+
println(build_info)
|
|
71
|
+
when (build_info) {
|
|
72
|
+
BRAND_ASUS -> autoStartAsus(context)
|
|
73
|
+
BRAND_XIAOMI -> autoStartXiaomi(context)
|
|
74
|
+
BRAND_LETV -> autoStartLetv(context)
|
|
75
|
+
BRAND_HONOR -> autoStartHonor(context)
|
|
76
|
+
BRAND_OPPO -> autoStartOppo(context)
|
|
77
|
+
BRAND_VIVO -> autoStartVivo(context)
|
|
78
|
+
BRAND_NOKIA -> autoStartNokia(context)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private fun isPackageExists(context: Context, targetPackage: String): Boolean {
|
|
83
|
+
val packages: List<ApplicationInfo>
|
|
84
|
+
val pm = context.packageManager
|
|
85
|
+
packages = pm.getInstalledApplications(0)
|
|
86
|
+
println(targetPackage)
|
|
87
|
+
for (i in packages.indices) {
|
|
88
|
+
println(packages[i].packageName)
|
|
89
|
+
if (packages[i].packageName == targetPackage) {
|
|
90
|
+
return true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return false
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@Throws(Exception::class)
|
|
97
|
+
private fun startIntent(context: Context, packageName: String, componentName: String) {
|
|
98
|
+
println(packageName)
|
|
99
|
+
println(componentName)
|
|
100
|
+
try {
|
|
101
|
+
val intent = Intent()
|
|
102
|
+
intent.component = ComponentName(packageName, componentName)
|
|
103
|
+
context.startActivity(intent)
|
|
104
|
+
} catch (exc: Exception) {
|
|
105
|
+
println(exc)
|
|
106
|
+
exc.printStackTrace()
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private fun autoStartXiaomi(context: Context) {
|
|
111
|
+
if (isPackageExists(context, PACKAGE_XIAOMI_MAIN)) {
|
|
112
|
+
try {
|
|
113
|
+
startIntent(context, PACKAGE_XIAOMI_MAIN, PACKAGE_XIAOMI_COMPONENT)
|
|
114
|
+
} catch (var3: java.lang.Exception) {
|
|
115
|
+
var3.printStackTrace()
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private fun autoStartAsus(context: Context) {
|
|
121
|
+
println("Masuk Asus")
|
|
122
|
+
println(isPackageExists(context, PACKAGE_ASUS_MAIN))
|
|
123
|
+
if (isPackageExists(context, PACKAGE_ASUS_MAIN)) {
|
|
124
|
+
try {
|
|
125
|
+
startIntent(context, PACKAGE_ASUS_MAIN, PACKAGE_ASUS_COMPONENT)
|
|
126
|
+
} catch (var3: java.lang.Exception) {
|
|
127
|
+
println(var3)
|
|
128
|
+
var3.printStackTrace()
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private fun autoStartLetv(context: Context) {
|
|
134
|
+
if (isPackageExists(context, PACKAGE_LETV_MAIN)) {
|
|
135
|
+
try {
|
|
136
|
+
startIntent(context, PACKAGE_LETV_MAIN, PACKAGE_LETV_COMPONENT)
|
|
137
|
+
} catch (var3: java.lang.Exception) {
|
|
138
|
+
var3.printStackTrace()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
private fun autoStartHonor(context: Context) {
|
|
144
|
+
if (isPackageExists(context, PACKAGE_HONOR_MAIN)) {
|
|
145
|
+
try {
|
|
146
|
+
startIntent(context, PACKAGE_HONOR_MAIN, PACKAGE_HONOR_COMPONENT)
|
|
147
|
+
} catch (var3: java.lang.Exception) {
|
|
148
|
+
var3.printStackTrace()
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private fun autoStartOppo(context: Context) {
|
|
154
|
+
if (isPackageExists(context, PACKAGE_OPPO_MAIN) || isPackageExists(
|
|
155
|
+
context,
|
|
156
|
+
PACKAGE_OPPO_FALLBACK
|
|
157
|
+
)
|
|
158
|
+
) {
|
|
159
|
+
try {
|
|
160
|
+
startIntent(context, PACKAGE_OPPO_MAIN, PACKAGE_OPPO_COMPONENT)
|
|
161
|
+
} catch (var7: java.lang.Exception) {
|
|
162
|
+
var7.printStackTrace()
|
|
163
|
+
try {
|
|
164
|
+
startIntent(context, PACKAGE_OPPO_FALLBACK, PACKAGE_OPPO_COMPONENT_FALLBACK)
|
|
165
|
+
} catch (var6: java.lang.Exception) {
|
|
166
|
+
var6.printStackTrace()
|
|
167
|
+
try {
|
|
168
|
+
startIntent(context, PACKAGE_OPPO_MAIN, PACKAGE_OPPO_COMPONENT_FALLBACK_A)
|
|
169
|
+
} catch (var5: java.lang.Exception) {
|
|
170
|
+
var5.printStackTrace()
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private fun autoStartVivo(context: Context) {
|
|
178
|
+
if (isPackageExists(context, PACKAGE_VIVO_MAIN) || isPackageExists(
|
|
179
|
+
context,
|
|
180
|
+
PACKAGE_VIVO_FALLBACK
|
|
181
|
+
)
|
|
182
|
+
) {
|
|
183
|
+
try {
|
|
184
|
+
startIntent(context, PACKAGE_VIVO_MAIN, PACKAGE_VIVO_COMPONENT)
|
|
185
|
+
} catch (var7: java.lang.Exception) {
|
|
186
|
+
var7.printStackTrace()
|
|
187
|
+
try {
|
|
188
|
+
startIntent(context, PACKAGE_VIVO_FALLBACK, PACKAGE_VIVO_COMPONENT_FALLBACK)
|
|
189
|
+
} catch (var6: java.lang.Exception) {
|
|
190
|
+
var6.printStackTrace()
|
|
191
|
+
try {
|
|
192
|
+
startIntent(context, PACKAGE_VIVO_MAIN, PACKAGE_VIVO_COMPONENT_FALLBACK_A)
|
|
193
|
+
} catch (var5: java.lang.Exception) {
|
|
194
|
+
var5.printStackTrace()
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
private fun autoStartNokia(context: Context) {
|
|
202
|
+
if (isPackageExists(context, PACKAGE_NOKIA_MAIN)) {
|
|
203
|
+
try {
|
|
204
|
+
startIntent(context, PACKAGE_NOKIA_MAIN, PACKAGE_NOKIA_COMPONENT)
|
|
205
|
+
} catch (var3: java.lang.Exception) {
|
|
206
|
+
var3.printStackTrace()
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
}
|
|
File without changes
|
package/dist/docs.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "AutoStartManagerPlugin",
|
|
4
|
+
"slug": "autostartmanagerplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "showStartManager",
|
|
10
|
+
"signature": "() => Promise<void>",
|
|
11
|
+
"parameters": [],
|
|
12
|
+
"returns": "Promise<void>",
|
|
13
|
+
"tags": [],
|
|
14
|
+
"docs": "",
|
|
15
|
+
"complexTypes": [],
|
|
16
|
+
"slug": "showstartmanager"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "checkAutomaticDateTimeZone",
|
|
20
|
+
"signature": "() => Promise<{ isAutomatic: Boolean; }>",
|
|
21
|
+
"parameters": [],
|
|
22
|
+
"returns": "Promise<{ isAutomatic: Boolean; }>",
|
|
23
|
+
"tags": [],
|
|
24
|
+
"docs": "",
|
|
25
|
+
"complexTypes": [
|
|
26
|
+
"Boolean"
|
|
27
|
+
],
|
|
28
|
+
"slug": "checkautomaticdatetimezone"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "checkCamera",
|
|
32
|
+
"signature": "() => Promise<{ isCameraOpen: Boolean; }>",
|
|
33
|
+
"parameters": [],
|
|
34
|
+
"returns": "Promise<{ isCameraOpen: Boolean; }>",
|
|
35
|
+
"tags": [],
|
|
36
|
+
"docs": "",
|
|
37
|
+
"complexTypes": [
|
|
38
|
+
"Boolean"
|
|
39
|
+
],
|
|
40
|
+
"slug": "checkcamera"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"properties": []
|
|
44
|
+
},
|
|
45
|
+
"interfaces": [
|
|
46
|
+
{
|
|
47
|
+
"name": "Boolean",
|
|
48
|
+
"slug": "boolean",
|
|
49
|
+
"docs": "",
|
|
50
|
+
"tags": [],
|
|
51
|
+
"methods": [
|
|
52
|
+
{
|
|
53
|
+
"name": "valueOf",
|
|
54
|
+
"signature": "() => boolean",
|
|
55
|
+
"parameters": [],
|
|
56
|
+
"returns": "boolean",
|
|
57
|
+
"tags": [],
|
|
58
|
+
"docs": "Returns the primitive value of the specified object.",
|
|
59
|
+
"complexTypes": [],
|
|
60
|
+
"slug": "valueof"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"properties": []
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"enums": [],
|
|
67
|
+
"typeAliases": [],
|
|
68
|
+
"pluginConfigs": []
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface AutoStartManagerPlugin {\n\n showStartManager(): Promise<void>;\n checkAutomaticDateTimeZone(): Promise<{isAutomatic: Boolean}>;\n checkCamera(): Promise<{isCameraOpen: Boolean}>;\n\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
const AutoStartManager = registerPlugin('AutoStartManager', {
|
|
3
|
+
web: () => import('./web').then(m => new m.AutoStartManagerWeb()),
|
|
4
|
+
});
|
|
5
|
+
export * from './definitions';
|
|
6
|
+
export { AutoStartManager };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,gBAAgB,GAAG,cAAc,CAAyB,kBAAkB,EAAE;IAClF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { AutoStartManagerPlugin } from './definitions';\n\nconst AutoStartManager = registerPlugin<AutoStartManagerPlugin>('AutoStartManager', {\n web: () => import('./web').then(m => new m.AutoStartManagerWeb()),\n});\n\nexport * from './definitions';\nexport { AutoStartManager };\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { AutoStartManagerPlugin } from './definitions';
|
|
3
|
+
export declare class AutoStartManagerWeb extends WebPlugin implements AutoStartManagerPlugin {
|
|
4
|
+
showStartManager(): Promise<void>;
|
|
5
|
+
checkAutomaticDateTimeZone(): Promise<{
|
|
6
|
+
isAutomatic: Boolean;
|
|
7
|
+
}>;
|
|
8
|
+
checkCamera(): Promise<{
|
|
9
|
+
isCameraOpen: Boolean;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class AutoStartManagerWeb extends WebPlugin {
|
|
3
|
+
async showStartManager() {
|
|
4
|
+
throw new Error('Method not implemented.');
|
|
5
|
+
}
|
|
6
|
+
async checkAutomaticDateTimeZone() {
|
|
7
|
+
throw new Error('Method not implemented.');
|
|
8
|
+
}
|
|
9
|
+
async checkCamera() {
|
|
10
|
+
throw new Error('Method not implemented.');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,0BAA0B;QAC9B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { AutoStartManagerPlugin } from './definitions';\n\nexport class AutoStartManagerWeb extends WebPlugin implements AutoStartManagerPlugin {\n async showStartManager(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n async checkAutomaticDateTimeZone(): Promise<{isAutomatic: Boolean}> {\n throw new Error('Method not implemented.');\n }\n async checkCamera(): Promise<{ isCameraOpen: Boolean; }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@capacitor/core');
|
|
6
|
+
|
|
7
|
+
const AutoStartManager = core.registerPlugin('AutoStartManager', {
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.AutoStartManagerWeb()),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
class AutoStartManagerWeb extends core.WebPlugin {
|
|
12
|
+
async showStartManager() {
|
|
13
|
+
throw new Error('Method not implemented.');
|
|
14
|
+
}
|
|
15
|
+
async checkAutomaticDateTimeZone() {
|
|
16
|
+
throw new Error('Method not implemented.');
|
|
17
|
+
}
|
|
18
|
+
async checkCamera() {
|
|
19
|
+
throw new Error('Method not implemented.');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
24
|
+
__proto__: null,
|
|
25
|
+
AutoStartManagerWeb: AutoStartManagerWeb
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.AutoStartManager = AutoStartManager;
|
|
29
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\nconst AutoStartManager = registerPlugin('AutoStartManager', {\r\n web: () => import('./web').then(m => new m.AutoStartManagerWeb()),\r\n});\r\nexport * from './definitions';\r\nexport { AutoStartManager };\r\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\r\nexport class AutoStartManagerWeb extends WebPlugin {\r\n async showStartManager() {\r\n throw new Error('Method not implemented.');\r\n }\r\n async checkAutomaticDateTimeZone() {\r\n throw new Error('Method not implemented.');\r\n }\r\n async checkCamera() {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;AAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;AACnD,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,0BAA0B,GAAG;AACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var capacitorAutoStartManager = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const AutoStartManager = core.registerPlugin('AutoStartManager', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.AutoStartManagerWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class AutoStartManagerWeb extends core.WebPlugin {
|
|
9
|
+
async showStartManager() {
|
|
10
|
+
throw new Error('Method not implemented.');
|
|
11
|
+
}
|
|
12
|
+
async checkAutomaticDateTimeZone() {
|
|
13
|
+
throw new Error('Method not implemented.');
|
|
14
|
+
}
|
|
15
|
+
async checkCamera() {
|
|
16
|
+
throw new Error('Method not implemented.');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
21
|
+
__proto__: null,
|
|
22
|
+
AutoStartManagerWeb: AutoStartManagerWeb
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.AutoStartManager = AutoStartManager;
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
28
|
+
|
|
29
|
+
return exports;
|
|
30
|
+
|
|
31
|
+
})({}, capacitorExports);
|
|
32
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\nconst AutoStartManager = registerPlugin('AutoStartManager', {\r\n web: () => import('./web').then(m => new m.AutoStartManagerWeb()),\r\n});\r\nexport * from './definitions';\r\nexport { AutoStartManager };\r\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\r\nexport class AutoStartManagerWeb extends WebPlugin {\r\n async showStartManager() {\r\n throw new Error('Method not implemented.');\r\n }\r\n async checkAutomaticDateTimeZone() {\r\n throw new Error('Method not implemented.');\r\n }\r\n async checkCamera() {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,gBAAgB,GAAGA,mBAAc,CAAC,kBAAkB,EAAE;IAC5D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;IACrE,CAAC;;ICFM,MAAM,mBAAmB,SAASC,cAAS,CAAC;IACnD,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,0BAA0B,GAAG;IACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
|
|
3
|
+
//! Project version number for Plugin.
|
|
4
|
+
FOUNDATION_EXPORT double PluginVersionNumber;
|
|
5
|
+
|
|
6
|
+
//! Project version string for Plugin.
|
|
7
|
+
FOUNDATION_EXPORT const unsigned char PluginVersionString[];
|
|
8
|
+
|
|
9
|
+
// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
|
|
10
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <Capacitor/Capacitor.h>
|
|
3
|
+
|
|
4
|
+
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
|
+
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
|
+
CAP_PLUGIN(AutoStartManagerPlugin, "AutoStartManager",
|
|
7
|
+
CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
|
|
8
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Please read the Capacitor iOS Plugin Development Guide
|
|
6
|
+
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
|
+
*/
|
|
8
|
+
@objc(AutoStartManagerPlugin)
|
|
9
|
+
public class AutoStartManagerPlugin: CAPPlugin {
|
|
10
|
+
private let implementation = AutoStartManager()
|
|
11
|
+
|
|
12
|
+
@objc func echo(_ call: CAPPluginCall) {
|
|
13
|
+
let value = call.getString("value") ?? ""
|
|
14
|
+
call.resolve([
|
|
15
|
+
"value": implementation.echo(value)
|
|
16
|
+
])
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>FMWK</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>1.0</string>
|
|
19
|
+
<key>CFBundleVersion</key>
|
|
20
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
21
|
+
<key>NSPrincipalClass</key>
|
|
22
|
+
<string></string>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "capacitor-autostartmanager",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Auto Start Manager, Check Automatic Date Time Zone, Check Camera",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"unpkg": "dist/plugin.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"android/src/main/",
|
|
11
|
+
"android/build.gradle",
|
|
12
|
+
"dist/",
|
|
13
|
+
"ios/Plugin/",
|
|
14
|
+
"CapacitorAutostartmanager.podspec"
|
|
15
|
+
],
|
|
16
|
+
"author": "Asep Herman Nursalam",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/asephermann/capacitor-autostartmanager.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/asephermann/capacitor-autostartmanager/issues"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"capacitor",
|
|
27
|
+
"plugin",
|
|
28
|
+
"native"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
32
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
|
|
33
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
34
|
+
"verify:web": "npm run build",
|
|
35
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
36
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
37
|
+
"eslint": "eslint . --ext ts",
|
|
38
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
39
|
+
"swiftlint": "node-swiftlint",
|
|
40
|
+
"docgen": "docgen --api AutoStartManagerPlugin --output-readme README.md --output-json dist/docs.json",
|
|
41
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
|
|
42
|
+
"clean": "rimraf ./dist",
|
|
43
|
+
"watch": "tsc --watch",
|
|
44
|
+
"prepublishOnly": "npm run build"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@capacitor/android": "^3.6.0",
|
|
48
|
+
"@capacitor/core": "^3.0.0",
|
|
49
|
+
"@capacitor/docgen": "^0.0.18",
|
|
50
|
+
"@capacitor/ios": "^3.0.0",
|
|
51
|
+
"@ionic/eslint-config": "^0.3.0",
|
|
52
|
+
"@ionic/prettier-config": "^1.0.1",
|
|
53
|
+
"@ionic/swiftlint-config": "^1.1.2",
|
|
54
|
+
"eslint": "^7.11.0",
|
|
55
|
+
"prettier": "~2.2.0",
|
|
56
|
+
"prettier-plugin-java": "~1.0.0",
|
|
57
|
+
"rimraf": "^3.0.2",
|
|
58
|
+
"rollup": "^2.32.0",
|
|
59
|
+
"swiftlint": "^1.0.1",
|
|
60
|
+
"typescript": "~4.0.3"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@capacitor/core": "^3.0.0"
|
|
64
|
+
},
|
|
65
|
+
"prettier": "@ionic/prettier-config",
|
|
66
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
67
|
+
"eslintConfig": {
|
|
68
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
69
|
+
},
|
|
70
|
+
"capacitor": {
|
|
71
|
+
"ios": {
|
|
72
|
+
"src": "ios"
|
|
73
|
+
},
|
|
74
|
+
"android": {
|
|
75
|
+
"src": "android"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|