diff --git a/.travis.yml b/.travis.yml index ac875209..8aabc086 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ android: components: - platform-tools - tools - - build-tools-25.0.2 + - build-tools-25.0.3 - android-22 - android-25 - sys-img-armeabi-v7a-android-22 @@ -21,4 +21,4 @@ before_script: - android-wait-for-emulator - adb shell input keyevent 82 & -script: ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace \ No newline at end of file +script: travis_wait 30 ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace \ No newline at end of file diff --git a/README.md b/README.md index b4c2a80f..b1373018 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Wifi configuration and util library built for Android. [ ![Download](https://api.bintray.com/packages/isupatches/Maven/wisefy/images/download.svg) ](https://bintray.com/isupatches/Maven/wisefy/_latestVersion) - + ## Adding to your project @@ -41,7 +41,7 @@ Then add it as a dependency: Gradle: ``` -compile 'com.isupatches:wisefy:1.0.7' +compile 'com.isupatches:wisefy:1.0.8' ``` Maven: @@ -50,7 +50,7 @@ Maven: com.isupatches wisefy - 1.0.7 + 1.0.8 pom ``` @@ -73,6 +73,23 @@ To grab an instance with logging enabled: WiseFy mWiseFy = new WiseFy.withContext(getActivity()).logging(true).getSmarts(); ``` +## Permissions + +For the sake of transparency and because you're probably curious as to what permissions this library adds to your app, here are the additional expected permissions: + +```xml + + + + + + +``` + + * NOTE * + +If a search for an SSID is failing (returning false or NULL depending on the method) on >= 6.x devices but the network is visible, it's most likely because you haven't asked in your application for the `Manifest.permission.ACCESS_COARSE_LOCATION` permission which is what allows us to see the access points nearby. It has been up for debate on if it would be beneficial to move permission requests to the WiseFy library, but at this time, it remains as-is so users can determine their own UI/UX and to not add additional package bloat. + ## Commands To add an open network: diff --git a/build.gradle b/build.gradle index 1bfd7e73..a7ce65d1 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,8 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' - classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.3' + classpath 'com.android.tools.build:gradle:2.3.2' + classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.7.1' classpath "com.github.dcendents:android-maven-gradle-plugin:1.5" classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' classpath "org.jacoco:org.jacoco.core:0.7.8" @@ -46,7 +46,7 @@ subprojects { ext { GROUP = "com.isupatches" - VERSION_NAME = "1.0.7" + VERSION_NAME = "1.0.8" BINTRAY_REPO = "Maven" BINTRAY_NAME = "wisefy" diff --git a/gradle/jacoco.gradle b/gradle/jacoco.gradle index 6c0e533b..35661302 100644 --- a/gradle/jacoco.gradle +++ b/gradle/jacoco.gradle @@ -16,17 +16,28 @@ def classDirs = fileTree( '**/*Factory*.class', '**/*$Builder*']) -task jacocoDebugTestReport(type: JacocoReport, dependsOn: ["connectedDebugAndroidTest"]) { +task jacocoDebugTestReport(type: JacocoReport) { + dependsOn = ["connectedDebugAndroidTest"] group = "Reporting" - description = "Generate Jacoco coverage report for debug tests" + description = "Run tests and generate Jacoco coverage report for debug" classDirectories = classDirs additionalSourceDirs = files(coverageSourceDirs) sourceDirectories = files(coverageSourceDirs) executionData = files([fileTree(dir: 'build/outputs/code-coverage/connected', include: '**/*.ec')]) - onlyIf = { - true + reports { + xml.enabled = true + html.enabled = true } +} + +task jacocoDebugReport(type: JacocoReport) { + group = "Reporting" + description = "Generate Jacoco coverage report for debug" + classDirectories = classDirs + additionalSourceDirs = files(coverageSourceDirs) + sourceDirectories = files(coverageSourceDirs) + executionData = files([fileTree(dir: 'build/outputs/code-coverage/connected', include: '**/*.ec')]) reports { xml.enabled = true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 6bbd0019..39ca0351 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8c2272b3..0df11695 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Mar 25 21:27:42 CDT 2017 +#Sat Jul 01 22:48:36 CDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html index e917f75b..ecd7711e 100644 --- a/javadoc/allclasses-frame.html +++ b/javadoc/allclasses-frame.html @@ -2,9 +2,9 @@ - -All Classes (wisefy 1.0.7 API) - + +All Classes (wisefy 1.0.8 API) + @@ -12,8 +12,8 @@

All Classes

    -
  • GetManagerUtil
  • LogUtil
  • +
  • ManagerUtil
  • SSIDUtil
  • WiseFy
  • WiseFy.withContext
  • diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html index 573c635e..0c9f0a79 100644 --- a/javadoc/allclasses-noframe.html +++ b/javadoc/allclasses-noframe.html @@ -2,9 +2,9 @@ - -All Classes (wisefy 1.0.7 API) - + +All Classes (wisefy 1.0.8 API) + @@ -12,8 +12,8 @@

    All Classes

      -
    • GetManagerUtil
    • LogUtil
    • +
    • ManagerUtil
    • SSIDUtil
    • WiseFy
    • WiseFy.withContext
    • diff --git a/javadoc/com/isupatches/wisefy/WiseFy.html b/javadoc/com/isupatches/wisefy/WiseFy.html index 8dd27dfb..78f25aa3 100644 --- a/javadoc/com/isupatches/wisefy/WiseFy.html +++ b/javadoc/com/isupatches/wisefy/WiseFy.html @@ -2,9 +2,9 @@ - -WiseFy (wisefy 1.0.7 API) - + +WiseFy (wisefy 1.0.8 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 42705602..2280b7e1 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 1.0.7 API) - + +com.isupatches.wisefy (wisefy 1.0.8 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ + + + + + + + + + +
      +
      com.isupatches.wisefy.util
      +

      Class ManagerUtil

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • com.isupatches.wisefy.util.ManagerUtil
        • +
        +
      • +
      +
      +
        +
      • +
        +
        +
        public class ManagerUtil
        +extends java.lang.Object
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + + + + + +
          All Methods Static Methods Instance Methods Concrete Methods 
          Modifier and TypeMethod and Description
          android.net.ConnectivityManagergetConnectivityManager(android.content.Context context) +
          To get a Connectivity manger instance from an activity's context.
          +
          static ManagerUtilgetInstance() 
          android.net.wifi.WifiManagergetWiFiManager(android.content.Context context) +
          To get a WiFi manger instance from an activity's context.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            getInstance

            +
            public static ManagerUtil getInstance()
            +
            +
            Returns:
            +
            instance of GetManagerUtil
            +
            +
          • +
          + + + +
            +
          • +

            getConnectivityManager

            +
            public android.net.ConnectivityManager getConnectivityManager(android.content.Context context)
            +
            To get a Connectivity manger instance from an activity's context.
            +
            +
            Parameters:
            +
            context - - The context to use to retrieve a connectivity manager via getSystemService
            +
            Returns:
            +
            ConnectivityManager|null
            +
            See Also:
            +
            ConnectivityManager, +WiseFy
            +
            +
          • +
          + + + +
            +
          • +

            getWiFiManager

            +
            public android.net.wifi.WifiManager getWiFiManager(android.content.Context context)
            +
            To get a WiFi manger instance from an activity's context.
            +
            +
            Parameters:
            +
            context - - The context to use to retrieve a wifi manager via getSystemService
            +
            Returns:
            +
            WifiManager|null
            +
            See Also:
            +
            WifiManager, +WiseFy
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/javadoc/com/isupatches/wisefy/util/SSIDUtil.html b/javadoc/com/isupatches/wisefy/util/SSIDUtil.html index 3f1cfab8..818f6a23 100644 --- a/javadoc/com/isupatches/wisefy/util/SSIDUtil.html +++ b/javadoc/com/isupatches/wisefy/util/SSIDUtil.html @@ -2,9 +2,9 @@ - -SSIDUtil (wisefy 1.0.7 API) - + +SSIDUtil (wisefy 1.0.8 API) + @@ -12,7 +12,7 @@ @@ -13,8 +13,8 @@

      Classes

    diff --git a/javadoc/com/isupatches/wisefy/util/package-summary.html b/javadoc/com/isupatches/wisefy/util/package-summary.html index f570985e..832b19ca 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 1.0.7 API) - + +com.isupatches.wisefy.util (wisefy 1.0.8 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 0c819377..d40be120 100644 --- a/javadoc/overview-summary.html +++ b/javadoc/overview-summary.html @@ -2,9 +2,9 @@ - -Overview (wisefy 1.0.7 API) - + +Overview (wisefy 1.0.8 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@