@hanwha-ss1/plugin 0.1.8 → 0.2.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/README.md CHANGED
@@ -11,6 +11,11 @@ npx cap sync
11
11
  ```javascript
12
12
  import { HanwhaPlugin } from "@hanwha-ss1/plugin"
13
13
 
14
+ // 앱 실행
15
+ await HanwhaPlugin.executeApp({
16
+ package: "패키지명"
17
+ })
18
+
14
19
  // 연락처 저장
15
20
  await HanwhaPlugin.addContact({
16
21
  name: "이름님",
@@ -7,7 +7,7 @@ import android.view.WindowManager;
7
7
 
8
8
  public class Bio {
9
9
 
10
- public interface OnResult {
10
+ public interface OnBioResult {
11
11
  void onSuccess();
12
12
  void onFail(String error);
13
13
  }
@@ -22,7 +22,7 @@ public class Bio {
22
22
  *
23
23
  * @param activity
24
24
  */
25
- public void authenticate(Activity activity, OnResult result) {
25
+ public void authenticate(Activity activity, OnBioResult result) {
26
26
  BioAuthManager.getInstance().authenticate(activity, result);
27
27
  }
28
28
  }
@@ -116,7 +116,7 @@ public class BioAuthManager {
116
116
  }
117
117
 
118
118
 
119
- public void authenticate(Activity activity, Bio.OnResult callback) {
119
+ public void authenticate(Activity activity, Bio.OnBioResult callback) {
120
120
 
121
121
  keyManager = KeyManager.getInstance();
122
122
  // api 28 ( ANDROID 9.0 ) 이상은 biometricPrompt 사용
@@ -25,7 +25,7 @@ public class BioPlugin extends Plugin{
25
25
  if(implementation == null) {
26
26
  implementation = new Bio();
27
27
  }
28
- implementation.authenticate(getActivity(), new Bio.OnResult() {
28
+ implementation.authenticate(getActivity(), new Bio.OnBioResult() {
29
29
  @Override
30
30
  public void onSuccess() {
31
31
  JSObject ret = new JSObject();
@@ -12,7 +12,7 @@ public class Linker {
12
12
  return value;
13
13
  }
14
14
 
15
- public interface OnResult {
15
+ public interface OnLinkerResult {
16
16
  void onSuccess();
17
17
  void onFail();
18
18
  }
@@ -23,7 +23,7 @@ public class Linker {
23
23
  * @param activity
24
24
  * @param packageName 패키지명
25
25
  */
26
- public void execute(Activity activity, String packageName, OnResult result) {
26
+ public void execute(Activity activity, String packageName, OnLinkerResult result) {
27
27
  try{
28
28
  Intent intent = activity.getPackageManager().getLaunchIntentForPackage(packageName);
29
29
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -21,12 +21,12 @@ public class LinkerPlugin extends Plugin{
21
21
  }
22
22
 
23
23
  @PluginMethod
24
- public void execute(PluginCall call) {
24
+ public void executeApp(PluginCall call) {
25
25
  String packageName = call.getString("package");
26
26
  if(implementation == null) {
27
27
  implementation = new Linker();
28
28
  }
29
- implementation.execute(getActivity(), packageName, new Linker.OnResult() {
29
+ implementation.execute(getActivity(), packageName, new Linker.OnLinkerResult() {
30
30
  @Override
31
31
  public void onSuccess() {
32
32
  JSObject ret = new JSObject();
@@ -1,4 +1,13 @@
1
1
  export interface Plugin {
2
+ /**
3
+ * 앱 실행
4
+ * @param options package : 패키지명
5
+ */
6
+ executeApp(options: {
7
+ package: string;
8
+ }): Promise<{
9
+ value: string;
10
+ }>;
2
11
  /**
3
12
  * 연락처 저장
4
13
  * @param options name : 성명
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Plugin {\n /**\n * 연락처 저장\n * @param options name : 성명\n * @param options phone : 전화번호\n * @param options email : 이메일\n * @param options dept : 소속\n * @param options ext : 내선번호\n */\n addContact(options: {\n name: string;\n phone: string;\n email: string;\n dept: string;\n ext: string;\n }): Promise<{ value: string }>;\n\n\n /**\n * 캡쳐 방지\n * @param options disabled : 캡쳐 방지 여부 (true, false)\n */\n setScreenCaptureDisabled(options: {\n disabled: string;\n }): Promise<{ value: string }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Plugin {\n /**\n * 앱 실행\n * @param options package : 패키지명\n */\n executeApp(options: {\n package: string;\n }): Promise<{ value: string }>;\n\n /**\n * 연락처 저장\n * @param options name : 성명\n * @param options phone : 전화번호\n * @param options email : 이메일\n * @param options dept : 소속\n * @param options ext : 내선번호\n */\n addContact(options: {\n name: string;\n phone: string;\n email: string;\n dept: string;\n ext: string;\n }): Promise<{ value: string }>;\n\n\n /**\n * 캡쳐 방지\n * @param options disabled : 캡쳐 방지 여부 (true, false)\n */\n setScreenCaptureDisabled(options: {\n disabled: string;\n }): Promise<{ value: string }>;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  import type { Plugin } from './definitions';
3
3
  export declare class PluginWeb extends WebPlugin implements Plugin {
4
+ executeApp(): Promise<any>;
4
5
  addContact(): Promise<any>;
5
6
  setScreenCaptureDisabled(): Promise<any>;
6
7
  }
package/dist/esm/web.js CHANGED
@@ -1,6 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { WebPlugin } from '@capacitor/core';
3
3
  export class PluginWeb extends WebPlugin {
4
+ async executeApp() {
5
+ return { results: {} };
6
+ }
4
7
  async addContact() {
5
8
  return { results: {} };
6
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,SAAU,SAAQ,SAAS;IAEtC,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,wBAAwB;QAC5B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport type { Plugin } from './definitions';\nexport class PluginWeb extends WebPlugin implements Plugin {\n\n async addContact(): Promise<any> {\n return { results: {} };\n }\n\n async setScreenCaptureDisabled(): Promise<any> {\n return { results: {} };\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,SAAU,SAAQ,SAAS;IAEtC,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,wBAAwB;QAC5B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nimport type { Plugin } from './definitions';\nexport class PluginWeb extends WebPlugin implements Plugin {\n\n async executeApp(): Promise<any> {\n return { results: {} };\n }\n\n async addContact(): Promise<any> {\n return { results: {} };\n }\n\n async setScreenCaptureDisabled(): Promise<any> {\n return { results: {} };\n }\n}\n"]}
@@ -10,6 +10,9 @@ const HanwhaPlugin = core.registerPlugin('Plugin', {
10
10
 
11
11
  /* eslint-disable @typescript-eslint/no-unused-vars */
12
12
  class PluginWeb extends core.WebPlugin {
13
+ async executeApp() {
14
+ return { results: {} };
15
+ }
13
16
  async addContact() {
14
17
  return { results: {} };
15
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async addContact() {\n return { results: {} };\n }\n async setScreenCaptureDisabled() {\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;AAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AAC3D,CAAC;;ACHD;AAEO,MAAM,SAAS,SAASC,cAAS,CAAC;AACzC,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n async setScreenCaptureDisabled() {\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;AAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AAC3D,CAAC;;ACHD;AAEO,MAAM,SAAS,SAASC,cAAS,CAAC;AACzC,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -7,6 +7,9 @@ var capacitorContact = (function (exports, core) {
7
7
 
8
8
  /* eslint-disable @typescript-eslint/no-unused-vars */
9
9
  class PluginWeb extends core.WebPlugin {
10
+ async executeApp() {
11
+ return { results: {} };
12
+ }
10
13
  async addContact() {
11
14
  return { results: {} };
12
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async addContact() {\n return { results: {} };\n }\n async setScreenCaptureDisabled() {\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,CAAC;;ICHD;IAEO,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n async setScreenCaptureDisabled() {\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,CAAC;;ICHD;IAEO,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanwha-ss1/plugin",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",