cordova-plugin-mserviceinterface-2.0 1.0.26 → 1.0.30

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.
Files changed (59) hide show
  1. package/package.json +28 -28
  2. package/plugin.xml +154 -153
  3. package/src/android/CallbackProgressDialog.java +53 -53
  4. package/src/android/FileProvider.java +7 -7
  5. package/src/android/backgroundNotification.java +120 -120
  6. package/src/android/doubleogradle.gradle +5 -5
  7. package/src/android/mInterface.java +2206 -2087
  8. package/src/android/mInterfaceReceiver.java +59 -59
  9. package/src/android/mInterfaceService.java +752 -749
  10. package/src/android/mInterfaceUtil.java +1686 -1686
  11. package/src/android/res/xml/network_security_config.xml +8 -8
  12. package/src/android/res/xml/opener_paths.xml +16 -16
  13. package/src/ios/InternetConnection.h +64 -64
  14. package/src/ios/InternetConnection.m +242 -242
  15. package/src/ios/SSZipArchive.h +146 -146
  16. package/src/ios/SSZipArchive.m +1180 -1180
  17. package/src/ios/SSZipCommon.h +66 -66
  18. package/src/ios/UICKeyChainStore.h +64 -64
  19. package/src/ios/UICKeyChainStore.m +434 -434
  20. package/src/ios/XMLConverter.h +61 -61
  21. package/src/ios/XMLConverter.m +243 -243
  22. package/src/ios/ZipArchive.h +19 -19
  23. package/src/ios/aes/aes.h +270 -270
  24. package/src/ios/aes/aes_ni.c +687 -687
  25. package/src/ios/aes/aes_ni.h +59 -59
  26. package/src/ios/aes/aescrypt.c +301 -301
  27. package/src/ios/aes/aeskey.c +554 -554
  28. package/src/ios/aes/aesopt.h +776 -776
  29. package/src/ios/aes/aestab.c +418 -418
  30. package/src/ios/aes/aestab.h +173 -173
  31. package/src/ios/aes/brg_endian.h +127 -127
  32. package/src/ios/aes/brg_types.h +191 -191
  33. package/src/ios/aes/fileenc.c +145 -145
  34. package/src/ios/aes/fileenc.h +121 -121
  35. package/src/ios/aes/hmac.c +209 -209
  36. package/src/ios/aes/hmac.h +119 -119
  37. package/src/ios/aes/prng.c +155 -155
  38. package/src/ios/aes/prng.h +82 -82
  39. package/src/ios/aes/pwd2key.c +181 -181
  40. package/src/ios/aes/pwd2key.h +45 -45
  41. package/src/ios/aes/sha1.c +283 -283
  42. package/src/ios/aes/sha1.h +72 -72
  43. package/src/ios/mInterface.h +1 -0
  44. package/src/ios/mInterface.m +15 -3
  45. package/src/ios/minizip/crypt.c +146 -146
  46. package/src/ios/minizip/crypt.h +66 -66
  47. package/src/ios/minizip/ioapi.c +353 -353
  48. package/src/ios/minizip/ioapi.h +154 -154
  49. package/src/ios/minizip/ioapi_buf.c +452 -452
  50. package/src/ios/minizip/ioapi_buf.h +52 -52
  51. package/src/ios/minizip/ioapi_mem.c +167 -167
  52. package/src/ios/minizip/ioapi_mem.h +52 -52
  53. package/src/ios/minizip/minishared.c +292 -292
  54. package/src/ios/minizip/minishared.h +50 -50
  55. package/src/ios/minizip/unzip.c +2007 -2007
  56. package/src/ios/minizip/unzip.h +254 -254
  57. package/src/ios/minizip/zip.c +2007 -2007
  58. package/src/ios/minizip/zip.h +215 -215
  59. package/www/mInterface.js +3 -3
@@ -1,59 +1,59 @@
1
- package com.selfservit.util;
2
-
3
- import android.app.ActivityManager;
4
- import android.content.BroadcastReceiver;
5
- import android.content.Context;
6
- import android.content.Intent;
7
- import android.os.Build;
8
-
9
- public class mInterfaceReceiver extends BroadcastReceiver {
10
- public mInterfaceReceiver() {
11
- //constructor
12
- }
13
-
14
- @ Override
15
- public void onReceive(Context context, Intent intent) {
16
- try {
17
- if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {
18
- Intent serviceIntent = new Intent(context, mInterfaceService.class);
19
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
20
- context.startForegroundService(serviceIntent);
21
- } else {
22
- context.startService(serviceIntent);
23
- }
24
- }
25
- if (intent.getAction().equalsIgnoreCase("com.example.checkservice")) {
26
- if (!isServiceRunning(context) || !isProcessRunning(context)) {
27
- Intent serviceIntent = new Intent(context, mInterfaceService.class);
28
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
29
- context.startForegroundService(serviceIntent);
30
- } else {
31
- context.startService(serviceIntent);
32
- }
33
- }
34
- }
35
-
36
- }catch (Exception e){
37
- e.printStackTrace();
38
- }
39
- }
40
- private boolean isServiceRunning(Context context) {
41
- ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
42
- for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
43
- if (mInterfaceService.class.getName().equals(service.service.getClassName())) {
44
- return true;
45
- }
46
- }
47
-
48
- return false;
49
- }
50
- private boolean isProcessRunning(Context context) {
51
- ActivityManager manager1 = (ActivityManager)context.getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
52
- for (ActivityManager.RunningAppProcessInfo processInfo : manager1.getRunningAppProcesses()) {
53
- if (processInfo.processName.equals(context.getPackageName())) {
54
- return true;
55
- }
56
- }
57
- return false;
58
- }
59
- }
1
+ package com.selfservit.util;
2
+
3
+ import android.app.ActivityManager;
4
+ import android.content.BroadcastReceiver;
5
+ import android.content.Context;
6
+ import android.content.Intent;
7
+ import android.os.Build;
8
+
9
+ public class mInterfaceReceiver extends BroadcastReceiver {
10
+ public mInterfaceReceiver() {
11
+ //constructor
12
+ }
13
+
14
+ @ Override
15
+ public void onReceive(Context context, Intent intent) {
16
+ try {
17
+ if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {
18
+ Intent serviceIntent = new Intent(context, mInterfaceService.class);
19
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
20
+ context.startForegroundService(serviceIntent);
21
+ } else {
22
+ context.startService(serviceIntent);
23
+ }
24
+ }
25
+ if (intent.getAction().equalsIgnoreCase("com.example.checkservice")) {
26
+ if (!isServiceRunning(context) || !isProcessRunning(context)) {
27
+ Intent serviceIntent = new Intent(context, mInterfaceService.class);
28
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
29
+ context.startForegroundService(serviceIntent);
30
+ } else {
31
+ context.startService(serviceIntent);
32
+ }
33
+ }
34
+ }
35
+
36
+ }catch (Exception e){
37
+ e.printStackTrace();
38
+ }
39
+ }
40
+ private boolean isServiceRunning(Context context) {
41
+ ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
42
+ for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
43
+ if (mInterfaceService.class.getName().equals(service.service.getClassName())) {
44
+ return true;
45
+ }
46
+ }
47
+
48
+ return false;
49
+ }
50
+ private boolean isProcessRunning(Context context) {
51
+ ActivityManager manager1 = (ActivityManager)context.getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
52
+ for (ActivityManager.RunningAppProcessInfo processInfo : manager1.getRunningAppProcesses()) {
53
+ if (processInfo.processName.equals(context.getPackageName())) {
54
+ return true;
55
+ }
56
+ }
57
+ return false;
58
+ }
59
+ }