community-cordova-plugin-wifi 1.0.7 → 1.0.8

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.
@@ -8,6 +8,7 @@
8
8
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
9
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
10
10
  <change beforePath="$PROJECT_DIR$/plugin.xml" beforeDir="false" afterPath="$PROJECT_DIR$/plugin.xml" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/src/android/PingTask.java" beforeDir="false" />
11
12
  <change beforePath="$PROJECT_DIR$/src/android/WifiPlugin.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/android/WifiPlugin.java" afterDir="false" />
12
13
  </list>
13
14
  <option name="SHOW_DIALOG" value="false" />
@@ -24,14 +25,12 @@
24
25
  &quot;assignee&quot;: &quot;EYALIN&quot;
25
26
  }
26
27
  }</component>
27
- <component name="GithubPullRequestsUISettings">
28
- <option name="selectedUrlAndAccountId">
29
- <UrlAndAccount>
30
- <option name="accountId" value="554cb47e-af38-4ebf-8263-4816fa246779" />
31
- <option name="url" value="https://github.com/EYALIN/community-cordova-plugin-cpu.git" />
32
- </UrlAndAccount>
33
- </option>
34
- </component>
28
+ <component name="GithubPullRequestsUISettings"><![CDATA[{
29
+ "selectedUrlAndAccountId": {
30
+ "url": "https://github.com/EYALIN/community-cordova-plugin-cpu.git",
31
+ "accountId": "554cb47e-af38-4ebf-8263-4816fa246779"
32
+ }
33
+ }]]></component>
35
34
  <component name="MarkdownSettingsMigration">
36
35
  <option name="stateVersion" value="1" />
37
36
  </component>
@@ -44,23 +43,24 @@
44
43
  <option name="hideEmptyMiddlePackages" value="true" />
45
44
  <option name="showLibraryContents" value="true" />
46
45
  </component>
47
- <component name="PropertiesComponent">{
48
- &quot;keyToString&quot;: {
49
- &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
50
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
51
- &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
52
- &quot;git-widget-placeholder&quot;: &quot;main&quot;,
53
- &quot;last_opened_file_path&quot;: &quot;/Volumes/Development/Git/forked/community-cordova-plugin-wifi/src/android&quot;,
54
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
55
- &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
56
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
57
- &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
58
- &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
59
- &quot;settings.editor.selected.configurable&quot;: &quot;preferences.lookFeel&quot;,
60
- &quot;ts.external.directory.path&quot;: &quot;/Applications/WebStorm.app/Contents/plugins/javascript-impl/jsLanguageServicesImpl/external&quot;,
61
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
46
+ <component name="PropertiesComponent"><![CDATA[{
47
+ "keyToString": {
48
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
49
+ "RunOnceActivity.ShowReadmeOnStart": "true",
50
+ "RunOnceActivity.git.unshallow": "true",
51
+ "WebServerToolWindowFactoryState": "false",
52
+ "git-widget-placeholder": "main",
53
+ "last_opened_file_path": "/Volumes/Development/Git/forked/community-cordova-plugin-wifi/src/android",
54
+ "node.js.detected.package.eslint": "true",
55
+ "node.js.detected.package.tslint": "true",
56
+ "node.js.selected.package.eslint": "(autodetect)",
57
+ "node.js.selected.package.tslint": "(autodetect)",
58
+ "nodejs_package_manager_path": "npm",
59
+ "settings.editor.selected.configurable": "preferences.lookFeel",
60
+ "ts.external.directory.path": "/Applications/WebStorm.app/Contents/plugins/javascript-plugin/jsLanguageServicesImpl/external",
61
+ "vue.rearranger.settings.migration": "true"
62
62
  }
63
- }</component>
63
+ }]]></component>
64
64
  <component name="RecentsManager">
65
65
  <key name="CopyFile.RECENT_KEYS">
66
66
  <recent name="$PROJECT_DIR$/src/android" />
@@ -70,6 +70,13 @@
70
70
  <recent name="$PROJECT_DIR$/src" />
71
71
  </key>
72
72
  </component>
73
+ <component name="SharedIndexes">
74
+ <attachedChunks>
75
+ <set>
76
+ <option value="bundled-js-predefined-d6986cc7102b-f27c65a3e318-JavaScript-WS-251.23774.424" />
77
+ </set>
78
+ </attachedChunks>
79
+ </component>
73
80
  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
74
81
  <component name="TaskManager">
75
82
  <task active="true" id="Default" summary="Default task">
@@ -103,7 +110,8 @@
103
110
  <workItem from="1724268174858" duration="4603000" />
104
111
  <workItem from="1725518446319" duration="57000" />
105
112
  <workItem from="1725611591287" duration="21000" />
106
- <workItem from="1731667624026" duration="469000" />
113
+ <workItem from="1731667624026" duration="1162000" />
114
+ <workItem from="1751262475820" duration="786000" />
107
115
  </task>
108
116
  <task id="LOCAL-00001" summary="update plugin">
109
117
  <option name="closed" value="true" />
@@ -201,7 +209,15 @@
201
209
  <option name="project" value="LOCAL" />
202
210
  <updated>1723350242605</updated>
203
211
  </task>
204
- <option name="localTasksCounter" value="13" />
212
+ <task id="LOCAL-00013" summary="* add export to all interfaces">
213
+ <option name="closed" value="true" />
214
+ <created>1731669745130</created>
215
+ <option name="number" value="00013" />
216
+ <option name="presentableId" value="LOCAL-00013" />
217
+ <option name="project" value="LOCAL" />
218
+ <updated>1731669745130</updated>
219
+ </task>
220
+ <option name="localTasksCounter" value="14" />
205
221
  <servers />
206
222
  </component>
207
223
  <component name="TypeScriptGeneratedFilesManager">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "community-cordova-plugin-wifi",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "types": "./types/index.d.ts",
5
5
  "readme": "README.md",
6
6
  "repository": "EYALIN/community-cordova-plugin-wifi/tree/master",
package/plugin.xml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
4
  id="community-cordova-plugin-wifi"
5
- version="1.0.7">
5
+ version="1.0.8">
6
6
  <name>Cordova Plugin Wifi</name>
7
7
  <description></description>
8
8
  <license>MIT</license>
@@ -37,7 +37,6 @@
37
37
 
38
38
  <source-file src="src/android/WifiPlugin.java" target-dir="src/android" />
39
39
  <source-file src="src/android/IpInfoUtils.java" target-dir="src/android" />
40
- <source-file src="src/android/PingTask.java" target-dir="src/android" />
41
40
  <source-file src="src/android/WifiDetailsUtils.java" target-dir="src/android" />
42
41
  <source-file src="src/android/WifiUtils.java" target-dir="src/android" />
43
42
  </platform>
@@ -39,7 +39,7 @@ public class WifiPlugin extends CordovaPlugin {
39
39
  String address = args.getString(0);
40
40
  int count = args.getInt(1);
41
41
  int timeout = args.getInt(2);
42
- PingTask.ping(address, count, timeout, callbackContext, cordova);
42
+ // PingTask.ping(address, count, timeout, callbackContext, cordova);
43
43
  return true;
44
44
  } else if ("getIpInfo".equals(action)) {
45
45
  IpInfoUtils.getIpInfo(cordova, callbackContext);
@@ -1,56 +0,0 @@
1
- package wifiplugin;
2
-
3
- import org.apache.cordova.CallbackContext;
4
- import org.apache.cordova.PluginResult;
5
- import java.io.BufferedReader;
6
- import java.io.InputStreamReader;
7
- import org.json.JSONObject;
8
- import org.apache.cordova.CordovaInterface;
9
-
10
- public class PingTask {
11
-
12
- public static void ping(String address, int count, int timeout, CallbackContext callbackContext, CordovaInterface cordova) {
13
- cordova.getThreadPool().execute(() -> {
14
- try {
15
- String command = "/system/bin/ping -c " + count + " -W " + timeout + " " + address;
16
- Process process = Runtime.getRuntime().exec(command);
17
- BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
18
-
19
- int linesRead = 0;
20
- String line;
21
- String fullResponse = "";
22
- while ((line = reader.readLine()) != null) {
23
- int progress = (int) (((double) linesRead / count) * 100);
24
- linesRead++;
25
- JSONObject progressUpdate = new JSONObject();
26
- // Ensure progress does not exceed 100
27
- progress = Math.min(progress, 100); // Cap progress at 100
28
- progressUpdate.put("line", line);
29
- if (fullResponse != null && !fullResponse.isEmpty()) {
30
- fullResponse = fullResponse + "\n" + line;
31
- } else {
32
- fullResponse = line;
33
- }
34
- progressUpdate.put("line", line);
35
- progressUpdate.put("fullResponse", fullResponse);
36
- progressUpdate.put("progress", progress);
37
- PluginResult progressResult = new PluginResult(PluginResult.Status.OK, progressUpdate);
38
- progressResult.setKeepCallback(true);
39
- callbackContext.sendPluginResult(progressResult);
40
- }
41
-
42
- process.waitFor();
43
- JSONObject finalResult = new JSONObject();
44
- finalResult.put("line", "");
45
- finalResult.put("fullResponse", fullResponse);
46
- finalResult.put("progress", 100);
47
- finalResult.put("status", "completed");
48
- finalResult.put("linesRead", linesRead);
49
- PluginResult result = new PluginResult(PluginResult.Status.OK, finalResult);
50
- callbackContext.sendPluginResult(result);
51
- } catch (Exception e) {
52
- callbackContext.error("Error during ping: " + e.getMessage());
53
- }
54
- });
55
- }
56
- }