diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 00000000..22e7b11b
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,84 @@
+version: 2.1
+
+orbs:
+ codecov: codecov/codecov@1.0.5
+
+jobs:
+ ci_checks:
+ working_directory: ~/code
+ docker:
+ - image: circleci/android:api-28-alpha
+ environment:
+ JVM_OPTS: -Xmx3200m
+ steps:
+ - checkout
+ - restore_cache:
+ key: jars-{{ checksum "build.gradle" }}-{{ checksum "wisefy/build.gradle" }}-{{ checksum "wisefysample/build.gradle" }}
+ - run:
+ name: Chmod permissions
+ command: sudo chmod +x ./gradlew
+ - run:
+ name: Download dependencies
+ command: ./gradlew androidDependencies
+ - run:
+ name: Clean build
+ command: ./gradlew clean assembleDebug wisefy:assembleDebugAndroidTest wisefysample:assembleDebugAndroidTest --stacktrace
+ - run:
+ name: Static code analysis
+ command: ./gradlew staticAnalysisSanityCheck
+ - run:
+ name: Unit tests
+ command: ./gradlew :wisefy:jacocoDebugUnitTest :wisefysample:jacocoDebugUnitTest --stacktrace
+ - run:
+ name: Store Service Account
+ command: echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
+ - run:
+ name: Firebase Testing
+ command: |
+ sudo pip install -U crcmod
+ sudo gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
+ sudo gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
+ sudo gcloud firebase test android run \
+ --type instrumentation \
+ --app wisefysample/build/outputs/apk/debug/wisefysample-debug.apk \
+ --test wisefy/build/outputs/apk/androidTest/debug/wisefy-debug-androidTest.apk \
+ --device model=Pixel2,version=28,locale=en,orientation=portrait \
+ --device model=Nexus6,version=23,locale=en,orientation=portrait \
+ --device model=Nexus5,version=19,locale=en,orientation=portrait \
+ --environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" \
+ --directories-to-pull=/sdcard \
+ --results-dir=${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}
+ sudo gsutil -m cp -r -U gs://${GCLOUD_BUCKET_LOCATION}/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}/Nexus5-19-en-portrait/artifacts/coverage.ec wisefy/build/outputs/code-coverage/connected/wisefy-Nexus5-sdk19-coverage.ec
+ sudo gsutil -m cp -r -U gs://${GCLOUD_BUCKET_LOCATION}/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}/Nexus6-23-en-portrait/artifacts/coverage.ec wisefy/build/outputs/code-coverage/connected/wisefy-Nexus6-sdk23-coverage.ec
+ sudo gsutil -m cp -r -U gs://${GCLOUD_BUCKET_LOCATION}/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}/Pixel2-28-en-portrait/artifacts/coverage.ec wisefy/build/outputs/code-coverage/connected/wisefy-Pixel2-sdk28-coverage.ec
+ sudo gcloud firebase test android run \
+ --type instrumentation \
+ --app wisefysample/build/outputs/apk/debug/wisefysample-debug.apk \
+ --test wisefysample/build/outputs/apk/androidTest/debug/wisefysample-debug-androidTest.apk \
+ --device model=Pixel2,version=28,locale=en,orientation=portrait \
+ --environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" \
+ --directories-to-pull=/sdcard \
+ --results-dir=${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}
+ sudo gsutil -m cp -r -U gs://${GCLOUD_BUCKET_LOCATION}/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}/Pixel2-28-en-portrait/artifacts/coverage.ec wisefysample/build/outputs/code-coverage/connected/wisefysample-coverage.ec
+ sudo gsutil rm -r gs://${GCLOUD_BUCKET_LOCATION}/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM}
+ - run:
+ name: Generate coverage report
+ command: ./gradlew :wisefy:jacocoDebugCombinedTestReport :wisefysample:jacocoDebugCombinedTestReport --stacktrace
+ - codecov/upload:
+ file: /reports/jacoco/*.xml
+ - store_artifacts:
+ path: wisefy/build/reports
+ destination: reports/wisefy
+ - store_artifacts:
+ path: wisefysample/build/reports
+ destination: reports/wisefysample
+ - save_cache:
+ key: jars-{{ checksum "build.gradle" }}-{{ checksum "wisefy/build.gradle" }}-{{ checksum "wisefysample/build.gradle" }}
+ paths:
+ - ~/.gradle
+
+workflows:
+ version: 2
+ workflow:
+ jobs:
+ - ci_checks
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md
index d7695c64..f7f69d36 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.md
+++ b/.github/ISSUE_TEMPLATE/bug-report.md
@@ -6,7 +6,7 @@ about: Create a report to help us improve
Thank you for creating an issue to improve this library! Please check Please check [the current issues](https://github.com/isuPatches/WiseFy/issues) to make sure that the improvement isn't already being worked on.
-It will be _EXTREMELY_ helpful if you also take a look at the [sample app](/wisefysample) to see how it behalves and if you can reproduce there.
+It will be _EXTREMELY_ helpful if you also take a look at the [sample app](/wisefysample) to see how it behaves and if you can reproduce there.
**Description**
A clear and concise description of the bug.
diff --git a/.idea/dictionaries/patches.xml b/.idea/dictionaries/patches.xml
index 533095c3..f7cb0dd3 100644
--- a/.idea/dictionaries/patches.xml
+++ b/.idea/dictionaries/patches.xml
@@ -3,9 +3,12 @@
An API for querying for nearby access points and related information. An API for adding networks as saved configurations on a device. Callbacks for adding a network as a saved configuration on a device. An API for managing the network connection of a device. Callbacks for attempting to connect to a network. An API for querying about the different network statuses of a device. Callbacks for disabling a device's wifi. An API for querying about a network's frequency. Callbacks for retrieving a device's current network. Callbacks for retrieving a saved network on a device. Callbacks for retrieving a list of saved networks on a device. Callbacks for retrieving a list of saved networks on a device. An API for querying about a device's current network information. An API for removing a network as a saved configuration. Callbacks for removing a saved network on a device. An API for querying saved network information on a device. Callbacks for finding a nearby access point on a device. Callbacks for retrieving a saved network on a device. Callbacks for retrieving a list of saved networks on a device. Callbacks for finding a nearby SSID on a device. An API for querying about a network's security details. An API for functionality relating to signal strength. An API for functionality relating to Wifi. Main class for WiseFy that provides a synchronous and asynchronous API to manipulate and query
@@ -185,6 +269,14 @@ A class used to synchronize logic. The interface that is the public facing API for WiseFy. It is composed of various other sub-apis for separation
+of functionality.
+Author: Chintan Rathod <4371780+ChintanRathod@users.noreply.github.com>
+Date: Sun Apr 21 19:45:20 2019 +0530
+
+#### Delete -verbose, -dontobfuscate
+commit 95e3b8d1d2609822d0eb12aa3fa5f4c408977a4a
+Author: Jungwook Park (Victor)
+Date: Sun Nov 4 12:20:21 2018 +0900
+
+#### issue-113 & issue-114 Update dependencies and adjust manifest
+commit 07a93f06f9ad6efa05245cfa426d1551c024586b
+Author: Patches
+Date: Sat Sep 15 12:07:14 2018 -0500
+
+#### Update README.md
+commit 491a53d8014a1211e74d222c6d165d8fd450de3b
+Author: Patches
+Date: Sat Sep 8 14:37:47 2018 -0500
+
+#### Add new logo/icon
+commit 2dda2fe8409f63ad1400093ebde56ca842c8608d
+Author: mansyaprime <33461607+mansya@users.noreply.github.com>
+Date: Sun Sep 9 02:35:50 2018 +0700
+
+#### Update 3.x changes for release
+commit 1331e9f9e929405f5050b9419dc0986427adb201
+Author: isuPatches
+Date: Sun Aug 19 18:57:25 2018 -0500
+
## v3.0.0 - 08/19/2018
#### Enable XML for CodeCov
diff --git a/changes/4.x.md b/changes/4.x.md
index cf967710..2f75f83c 100644
--- a/changes/4.x.md
+++ b/changes/4.x.md
@@ -1 +1,2 @@
-## v4.0.0 - 05/x/2019
\ No newline at end of file
+## v4.0.0 - 06/22/2019
+
diff --git a/codecov.yml b/codecov.yml
index 4364e18e..df0169d2 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,2 +1,2 @@
codecov:
- branch: 3.x
\ No newline at end of file
+ branch: 4.x
diff --git a/config/checkstyle/import-control.xml b/config/checkstyle/import-control.xml
deleted file mode 100644
index e84397fa..00000000
--- a/config/checkstyle/import-control.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
_With Kotlin_
```kotlin
-val wisefy.searchForAccessPoint("regex for SSID", 3000, true);
+val wisefy.searchForAccessPoint("regex for SSID", 3000, true)
```
_With Java_
diff --git a/documentation/saved_networks.md b/documentation/saved_networks.md
index 541380de..6cde2baa 100644
--- a/documentation/saved_networks.md
+++ b/documentation/saved_networks.md
@@ -1,17 +1,17 @@
#### Via The Synchronous API
-To get the first saved network that matches a given regex:
+To search for the first saved network that matches a given regex:
_With Kotlin_
```kotlin
-val savedNetwork = wisefy.getSavedNetwork("regex for SSID")
+val savedNetwork = wisefy.searchForSavedNetwork("regex for SSID")
```
_With Java_
```java
-WifiConfiguration savedNetwork = wisefy.getSavedNetwork("regex for SSID");
+WifiConfiguration savedNetwork = wisefy.searchForSavedNetwork("regex for SSID");
```
To retrieve all of the saved networks:
@@ -33,13 +33,13 @@ To return all saved networks that match a given regex:
_With Kotlin_
```kotlin
-val savedNetworks = wisefy.getSavedNetworks("regex for SSID")
+val savedNetworks = wisefy.searchForSavedNetworks("regex for SSID")
```
_With Java_
```java
-ListAll Types
+
+com.isupatches.wisefy.AccessPointApi
+
+
+
+
+
+com.isupatches.wisefy.AddNetworkApi
+
+
+
+
com.isupatches.wisefy.callbacks.AddNetworkCallbacks
All Types
+
+com.isupatches.wisefy.ConnectionApi
+
+
+
+
com.isupatches.wisefy.callbacks.ConnectToNetworkCallbacks
All Types
+
+com.isupatches.wisefy.DeviceApi
+
+
+
+
com.isupatches.wisefy.callbacks.DisableWifiCallbacks
All Types
+
+com.isupatches.wisefy.FrequencyApi
+
+
+
+
com.isupatches.wisefy.callbacks.GetCurrentNetworkCallbacks
All Types
-com.isupatches.wisefy.callbacks.GetSavedNetworkCallbacks
+com.isupatches.wisefy.callbacks.GetSavedNetworksCallbacks
-
-com.isupatches.wisefy.callbacks.GetSavedNetworksCallbacks
+com.isupatches.wisefy.NetworkInfoApi
-
@@ -123,6 +158,13 @@
All Types
+
+com.isupatches.wisefy.RemoveNetworkApi
+
+
+
+
com.isupatches.wisefy.callbacks.RemoveNetworkCallbacks
All Types
+
+com.isupatches.wisefy.SavedNetworkApi
+
+
+
+
com.isupatches.wisefy.callbacks.SearchForAccessPointCallbacks
All Types
+
+com.isupatches.wisefy.callbacks.SearchForSavedNetworkCallbacks
+
+
+
+
+
+com.isupatches.wisefy.callbacks.SearchForSavedNetworksCallbacks
+
+
+
+
com.isupatches.wisefy.callbacks.SearchForSSIDCallbacks
All Types
+
+com.isupatches.wisefy.SecurityApi
+
+
+
+
+
+com.isupatches.wisefy.SignalStrengthApi
+
+
+
+
+
+com.isupatches.wisefy.WifiApi
+
+
+
+
+
com.isupatches.wisefy.WiseFy
All Types
+
+com.isupatches.wisefy.WiseFyPublicApi
+
+
+
interface SearchForSavedNetworkCallbacks : BaseCallback
+Callbacks for retrieving a saved network on a device.
+See Also
+
com.isupatches.wisefy.WiseFy.searchForSavedNetwork
+ +Author
+Patches
+ + | +
+abstract fun retrievedSavedNetwork(savedNetwork: WifiConfiguration): Unit
+Called when WiseFy has successfully retrieved a matching saved network configuration. + |
+
+ + | +
+abstract fun savedNetworkNotFound(): Unit
+Called when there are no saved network configurations matching search criteria. + |
+
+ + | +
+abstract fun wisefyFailure(wisefyFailureCode: Int): Unit
+Called when com.isupatches.wisefy.WiseFyPrechecks determines that there +is an issue and an operation cannot be completed. + |
+
diff --git a/javadoc/wisefy/com.isupatches.wisefy.callbacks/-base-callback/index.html b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-base-callback/index.html index 18776513..e041183d 100644 --- a/javadoc/wisefy/com.isupatches.wisefy.callbacks/-base-callback/index.html +++ b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-base-callback/index.html @@ -134,15 +134,6 @@
interface GetSavedNetworkCallbacks : BaseCallback
-Callbacks for retrieving a saved network on a device.
--
interface SearchForSavedNetworkCallbacks : BaseCallback
+Callbacks for retrieving a saved network on a device.
++
interface SearchForSavedNetworksCallbacks : BaseCallback
+Callbacks for retrieving a list of saved networks on a device.
++
abstract fun retrievedCurrentNetworkInfo(currentNetworkDetails: NetworkInfo): Unit
+abstract fun retrievedCurrentNetworkInfo(currentNetworkInfo: NetworkInfo): Unit
Called when WiseFy has successfully retrieved the device's current network info.
diff --git a/javadoc/wisefy/com.isupatches.wisefy.callbacks/-get-current-network-info-callbacks/retrieved-current-network-info.html b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-get-current-network-info-callbacks/retrieved-current-network-info.html
index b069b94d..1ee56dae 100644
--- a/javadoc/wisefy/com.isupatches.wisefy.callbacks/-get-current-network-info-callbacks/retrieved-current-network-info.html
+++ b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-get-current-network-info-callbacks/retrieved-current-network-info.html
@@ -9,7 +9,7 @@
-abstract fun retrievedCurrentNetworkInfo(currentNetworkDetails: NetworkInfo): Unit
+abstract fun retrievedCurrentNetworkInfo(currentNetworkInfo: NetworkInfo): Unit
Called when WiseFy has successfully retrieved the device's current network info.
See Also
diff --git a/javadoc/wisefy/com.isupatches.wisefy.callbacks/-search-for-saved-network-callbacks/index.html b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-search-for-saved-network-callbacks/index.html new file mode 100644 index 00000000..63d6c39c --- /dev/null +++ b/javadoc/wisefy/com.isupatches.wisefy.callbacks/-search-for-saved-network-callbacks/index.html @@ -0,0 +1,58 @@ + +
+ +
+ + +
+