diff --git a/.travis.yml b/.travis.yml index aa69371a..1ec588ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ android: components: - platform-tools - tools - - build-tools-25.0.3 + - build-tools-26.0.0 - android-22 - android-26 - sys-img-armeabi-v7a-android-22 @@ -21,4 +21,4 @@ before_script: - android-wait-for-emulator - adb shell input keyevent 82 & -script: travis_wait 60 ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace \ No newline at end of file +script: travis_wait 90 ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace \ No newline at end of file diff --git a/README.md b/README.md index 64713aac..45258159 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,20 @@ Wifi configuration and util library built for Android. [![Android Weekly](https://img.shields.io/badge/Android%20Weekly-%23230-blue.svg)](http://androidweekly.net/issues/issue-230) [![Build Status](https://travis-ci.org/isuPatches/WiseFy.svg?branch=master)](https://travis-ci.org/isuPatches/WiseFy) [ ![Download](https://api.bintray.com/packages/isupatches/Maven/wisefy/images/download.svg) ](https://bintray.com/isupatches/Maven/wisefy/_latestVersion) +## What's New in 2.x + +- Asynchronous API + - Certain methods have callbacks and are run on background thread +- Ability search by regex + - Nearby access points + - Saved Configurations + - SSIDs +- Ability to query for RSSI +- Ability to query for if device is roaming +- Additional methods to query for network security +- Full fledged documentation directory +- Tested against Android O + ## Adding to your project Make sure you have one of the following repositories accessible: diff --git a/build.gradle b/build.gradle index 054fc123..9991176b 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ subprojects { ext { GROUP = "com.isupatches" - VERSION_NAME = "2.0.0-BETA1" + VERSION_NAME = "2.0.0" BINTRAY_REPO = "Maven" BINTRAY_NAME = "wisefy" diff --git a/changes/1.x.md b/changes/1.x.md index cdf4efd6..64e80797 100644 --- a/changes/1.x.md +++ b/changes/1.x.md @@ -1,3 +1,5 @@ +## v1.0.10 - 07/04/2017 + ## v1.0.9 - 07/03/2017 #### Undo bintray props diff --git a/changes/2.x.md b/changes/2.x.md index e69de29b..a7a1aafd 100644 --- a/changes/2.x.md +++ b/changes/2.x.md @@ -0,0 +1,4 @@ +## v2.0.0 - 07/22/2017 + + +## v2.0.0-BETA1 - 07/20/2017 \ No newline at end of file diff --git a/documentation/adding_and_removing_networks.md b/documentation/adding_and_removing_networks.md index fcff666e..92bbd2de 100644 --- a/documentation/adding_and_removing_networks.md +++ b/documentation/adding_and_removing_networks.md @@ -41,7 +41,7 @@ mWiseFy.addOpenNetwork("Open Network", new AddOpenNetworkCallbacks() { } @Override - public void openNetworkAdded(WifiConfiguration wifiConfiguration) { + public void openNetworkAdded(WifiConfiguration openNetwork) { } }); @@ -62,7 +62,7 @@ mWiseFy.addWEPNetwork("WEP Network", "123456", new AddWEPNetworkCallbacks() { } @Override - public void wepNetworkAdded(WifiConfiguration wifiConfiguration) { + public void wepNetworkAdded(WifiConfiguration wepNetwork) { } }); @@ -83,7 +83,7 @@ mWiseFy.addWPA2Network("WPA2 Network", "12345678", new AddWPA2NetworkCallbacks() } @Override - public void wpa2NetworkAdded(WifiConfiguration wifiConfiguration) { + public void wpa2NetworkAdded(WifiConfiguration wpa2Network) { } }); diff --git a/documentation/checking_device_connectivity.md b/documentation/checking_device_connectivity.md index 8044ce76..de282a43 100644 --- a/documentation/checking_device_connectivity.md +++ b/documentation/checking_device_connectivity.md @@ -24,6 +24,12 @@ To check and see if the device is connected to a wifi network: boolean isConnected = mWiseFy.isDeviceConnectedToWifiNetwork(); ``` +To check and see if the device is roaming: + +```java +mWiseFy.isDeviceRoaming(); +``` + To check and see if Wifi is enabled on a device: ```java diff --git a/documentation/nearby_access_points.md b/documentation/nearby_access_points.md index c4440098..784f430c 100644 --- a/documentation/nearby_access_points.md +++ b/documentation/nearby_access_points.md @@ -1,12 +1,26 @@ #### Via The Synchronous API To get nearby access points:

-Setting filterDuplicates to true will not return SSIDs with a weaker signal strength (will always take the highest) +Setting filterDuplicates to true will exclude access points for an SSID that have a weaker RSSI (will always take the highest signal strength) ```java List nearbyAccessPoints = mWiseFy.getNearbyAccessPoints(true); ``` +To search for an access point given a regex (will return first match):

+Setting filterDuplicates to true will return the access point with the highest RSSI for the given SSID + +```java +mWiseFy.searchForAccessPoint("regex for SSID", 3000, true); +``` + +To search for all access points matching a given regex:

+Setting filterDuplicates to true will exclude access points for an SSID that have a weaker RSSI (will always take the highest signal strength) + +```java +mWiseFy.searchForAccessPoints("regex for SSID", true); +``` + To search for an SSID given a regex (will return first match): ```java @@ -21,8 +35,8 @@ List ssids = mWiseFy.searchForSSIDs("regex for SSIDs"); #### Via The Asynchronous API -To get all nearby access points:

-Setting filterDuplicates to true will not return SSIDs with a weaker signal strength (will always take the highest) +To get nearby access points:

+Setting filterDuplicates to true will exclude access points for an SSID that have a weaker RSSI (will always take the highest signal strength) ```java WiseFy.getNearbyAccessPoints(true, new GetNearbyAccessPointsCallbacks() { @@ -38,6 +52,51 @@ WiseFy.getNearbyAccessPoints(true, new GetNearbyAccessPointsCallbacks() { }); ``` +To search for an access point given a regex (will return first match):

+Setting filterDuplicates to true will return the access point with the highest RSSI (will always take the highest signal strength) + +```java +mWiseFy.searchForAccessPoint("regex for SSID", 3000, true, new SearchForAccessPointCallbacks() { + @Override + public void searchForAccessPointWiseFyFailure(Integer wisefyReturnCode) { + + } + + @Override + public void accessPointFound(ScanResult accessPoint) { + + } + + @Override + public void accessPointNotFound() { + + } +}); +``` + +To search for all access points matching a given regex:

+Setting filterDuplicates to true will exclude access points for an SSID that have a weaker RSSI (will always take the highest signal strength) + + +```java +mWiseFy.searchForAccessPoints("regex for SSID", true, new SearchForAccessPointsCallbacks() { + @Override + public void searchForAccessPointsWiseFyFailure(Integer wisefyReturnCode) { + + } + + @Override + public void foundAccessPoints(List accessPoints) { + + } + + @Override + public void noAccessPointsFound() { + + } +}); +``` + To search for an SSID given a regex (will return first match): ```java @@ -62,7 +121,7 @@ mWiseFy.searchForSSID("regex for SSID", 3000, new SearchForSSIDCallbacks() { To search for all SSIDs matching a given regex: ```java -mWiseFy.searchForSSIDs("regex for SSIDs", new SearchForSSIDsCallbacks() { +mWiseFy.searchForSSIDs("regex for SSID", new SearchForSSIDsCallbacks() { @Override public void searchForSSIDsWiseFyFailure(Integer wisefyReturnCode) { diff --git a/documentation/rssi.md b/documentation/rssi.md index 5246672d..7c828d5d 100644 --- a/documentation/rssi.md +++ b/documentation/rssi.md @@ -12,7 +12,8 @@ To compare the signal strength of two networks: int result = mWiseFy.compareSignalLevel(-35, -70); ``` -To get the RSSI of the first SSID matching a given regex: +To get the RSSI of the first SSID matching a given regex:

+Setting takeHighest to true will return the access point with the highest RSSI for the given SSID ```java Integer rssi = mWiseFy.getRSSI("regex for SSID", true, 3000); diff --git a/documentation/saved_networks.md b/documentation/saved_networks.md index 415ddde9..e5404e6d 100644 --- a/documentation/saved_networks.md +++ b/documentation/saved_networks.md @@ -46,6 +46,7 @@ To get the first saved network that matches a given regex: } }); ``` + To retrieve all of the saved networks: ```java @@ -66,6 +67,7 @@ mWiseFy.getSavedNetworks(new GetSavedNetworksCallbacks() { } }); ``` + To return all saved networks that match a given regex: ```java @@ -86,6 +88,7 @@ mWiseFy.getSavedNetwork("regex for SSID", new GetSavedNetworkCallbacks() { } }); ``` + ***Notes*** - Will return a WiseFy error code if parameter is missing diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html index 5496fcfb..7cd17840 100644 --- a/javadoc/allclasses-frame.html +++ b/javadoc/allclasses-frame.html @@ -2,9 +2,9 @@ - -All Classes (wisefy 2.0.0-BETA1 API) - + +All Classes (wisefy 2.0.0 API) + @@ -28,9 +28,11 @@

All Classes

  • GetRSSICallbacks
  • GetSavedNetworkCallbacks
  • GetSavedNetworksCallbacks
  • +
  • Internal
  • LogUtil
  • ManagerUtil
  • NetworkTypes
  • +
  • PublicAPI
  • RemoveNetworkCallbacks
  • SearchForAccessPointCallbacks
  • SearchForAccessPointsCallbacks
  • diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html index 5e22bb95..ffd6d7b3 100644 --- a/javadoc/allclasses-noframe.html +++ b/javadoc/allclasses-noframe.html @@ -2,9 +2,9 @@ - -All Classes (wisefy 2.0.0-BETA1 API) - + +All Classes (wisefy 2.0.0 API) + @@ -28,9 +28,11 @@

    All Classes

  • GetRSSICallbacks
  • GetSavedNetworkCallbacks
  • GetSavedNetworksCallbacks
  • +
  • Internal
  • LogUtil
  • ManagerUtil
  • NetworkTypes
  • +
  • PublicAPI
  • RemoveNetworkCallbacks
  • SearchForAccessPointCallbacks
  • SearchForAccessPointsCallbacks
  • diff --git a/javadoc/com/isupatches/wisefy/WiseFy.brains.html b/javadoc/com/isupatches/wisefy/WiseFy.brains.html index 156e3c21..1d8c1224 100644 --- a/javadoc/com/isupatches/wisefy/WiseFy.brains.html +++ b/javadoc/com/isupatches/wisefy/WiseFy.brains.html @@ -2,9 +2,9 @@ - -WiseFy.brains (wisefy 2.0.0-BETA1 API) - + +WiseFy.brains (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,13 +12,13 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ + + + + + + + + + +
    +
    com.isupatches.wisefy.annotations
    +

    Annotation Type Internal

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Inherited
      + @Retention(value=RUNTIME)
      +public @interface Internal
      +
    • +
    +
    +
    + + + + + + + diff --git a/javadoc/com/isupatches/wisefy/annotations/PublicAPI.html b/javadoc/com/isupatches/wisefy/annotations/PublicAPI.html new file mode 100644 index 00000000..50321286 --- /dev/null +++ b/javadoc/com/isupatches/wisefy/annotations/PublicAPI.html @@ -0,0 +1,164 @@ + + + + + +PublicAPI (wisefy 2.0.0 API) + + + + + + + + + + + + +
    +
    com.isupatches.wisefy.annotations
    +

    Annotation Type PublicAPI

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Inherited
      + @Retention(value=RUNTIME)
      +public @interface PublicAPI
      +
    • +
    +
    +
    + + + + + + + diff --git a/javadoc/com/isupatches/wisefy/annotations/Sync.html b/javadoc/com/isupatches/wisefy/annotations/Sync.html index a2357295..885de5a4 100644 --- a/javadoc/com/isupatches/wisefy/annotations/Sync.html +++ b/javadoc/com/isupatches/wisefy/annotations/Sync.html @@ -2,9 +2,9 @@ - -Sync (wisefy 2.0.0-BETA1 API) - + +Sync (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -15,6 +15,8 @@

    Annotation Types

    • Async
    • CallingThread
    • +
    • Internal
    • +
    • PublicAPI
    • Sync
    • WaitsForTimeout
    • WiseFyThread
    • diff --git a/javadoc/com/isupatches/wisefy/annotations/package-summary.html b/javadoc/com/isupatches/wisefy/annotations/package-summary.html index 8e03f0fc..a3ac68c8 100644 --- a/javadoc/com/isupatches/wisefy/annotations/package-summary.html +++ b/javadoc/com/isupatches/wisefy/annotations/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy.annotations (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy.annotations (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/com/isupatches/wisefy/callbacks/package-summary.html b/javadoc/com/isupatches/wisefy/callbacks/package-summary.html index eefe2cc4..fdabd339 100644 --- a/javadoc/com/isupatches/wisefy/callbacks/package-summary.html +++ b/javadoc/com/isupatches/wisefy/callbacks/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy.callbacks (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy.callbacks (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/com/isupatches/wisefy/constants/package-summary.html b/javadoc/com/isupatches/wisefy/constants/package-summary.html index 9b0fd860..7ed1c3fc 100644 --- a/javadoc/com/isupatches/wisefy/constants/package-summary.html +++ b/javadoc/com/isupatches/wisefy/constants/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy.constants (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy.constants (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/com/isupatches/wisefy/package-summary.html b/javadoc/com/isupatches/wisefy/package-summary.html index 8411d537..b508b894 100644 --- a/javadoc/com/isupatches/wisefy/package-summary.html +++ b/javadoc/com/isupatches/wisefy/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/com/isupatches/wisefy/threads/package-summary.html b/javadoc/com/isupatches/wisefy/threads/package-summary.html index 7fd0de30..20bafad3 100644 --- a/javadoc/com/isupatches/wisefy/threads/package-summary.html +++ b/javadoc/com/isupatches/wisefy/threads/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy.threads (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy.threads (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/com/isupatches/wisefy/util/package-summary.html b/javadoc/com/isupatches/wisefy/util/package-summary.html index fa79abed..13cbd4d7 100644 --- a/javadoc/com/isupatches/wisefy/util/package-summary.html +++ b/javadoc/com/isupatches/wisefy/util/package-summary.html @@ -2,9 +2,9 @@ - -com.isupatches.wisefy.util (wisefy 2.0.0-BETA1 API) - + +com.isupatches.wisefy.util (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/javadoc/overview-summary.html b/javadoc/overview-summary.html index a628c6c7..b80b580b 100644 --- a/javadoc/overview-summary.html +++ b/javadoc/overview-summary.html @@ -2,9 +2,9 @@ - -Overview (wisefy 2.0.0-BETA1 API) - + +Overview (wisefy 2.0.0 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@