Skip to content

Commit

Permalink
Merge pull request #49 from isuPatches/develop
Browse files Browse the repository at this point in the history
v1.0.8
  • Loading branch information
isuPatches authored Jul 2, 2017
2 parents 0b7a808 + d18109d commit a0f8a3b
Show file tree
Hide file tree
Showing 38 changed files with 1,021 additions and 401 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,4 +21,4 @@ before_script:
- android-wait-for-emulator
- adb shell input keyevent 82 &

script: ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace
script: travis_wait 30 ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<a href="http://www.methodscount.com/?lib=com.isupatches%3Awisefy%3A1.0.5"><img src="https://img.shields.io/badge/Methods and size-core: 104 | deps: 16517 | 55 KB-e91e63.svg"/></a>
<a href="http://www.methodscount.com/?lib=com.isupatches%3Awisefy%3A1.0.8"><img src="https://img.shields.io/badge/Methods and size-core: 105 | deps: 19372 | 56 KB-e91e63.svg"/></a>

## Adding to your project

Expand Down Expand Up @@ -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:
Expand All @@ -50,7 +50,7 @@ Maven:
<dependency>
<groupId>com.isupatches</groupId>
<artifactId>wisefy</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
<type>pom</type>
</dependency>
```
Expand All @@ -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
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
```

<strong> * NOTE * </strong>

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:
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
19 changes: 15 additions & 4 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions javadoc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>All Classes (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:57 CDT 2017 -->
<title>All Classes (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/isupatches/wisefy/util/GetManagerUtil.html" title="class in com.isupatches.wisefy.util" target="classFrame">GetManagerUtil</a></li>
<li><a href="com/isupatches/wisefy/util/LogUtil.html" title="class in com.isupatches.wisefy.util" target="classFrame">LogUtil</a></li>
<li><a href="com/isupatches/wisefy/util/ManagerUtil.html" title="class in com.isupatches.wisefy.util" target="classFrame">ManagerUtil</a></li>
<li><a href="com/isupatches/wisefy/util/SSIDUtil.html" title="class in com.isupatches.wisefy.util" target="classFrame">SSIDUtil</a></li>
<li><a href="com/isupatches/wisefy/WiseFy.html" title="class in com.isupatches.wisefy" target="classFrame">WiseFy</a></li>
<li><a href="com/isupatches/wisefy/WiseFy.withContext.html" title="class in com.isupatches.wisefy" target="classFrame">WiseFy.withContext</a></li>
Expand Down
8 changes: 4 additions & 4 deletions javadoc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>All Classes (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:57 CDT 2017 -->
<title>All Classes (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/isupatches/wisefy/util/GetManagerUtil.html" title="class in com.isupatches.wisefy.util">GetManagerUtil</a></li>
<li><a href="com/isupatches/wisefy/util/LogUtil.html" title="class in com.isupatches.wisefy.util">LogUtil</a></li>
<li><a href="com/isupatches/wisefy/util/ManagerUtil.html" title="class in com.isupatches.wisefy.util">ManagerUtil</a></li>
<li><a href="com/isupatches/wisefy/util/SSIDUtil.html" title="class in com.isupatches.wisefy.util">SSIDUtil</a></li>
<li><a href="com/isupatches/wisefy/WiseFy.html" title="class in com.isupatches.wisefy">WiseFy</a></li>
<li><a href="com/isupatches/wisefy/WiseFy.withContext.html" title="class in com.isupatches.wisefy">WiseFy.withContext</a></li>
Expand Down
44 changes: 39 additions & 5 deletions javadoc/com/isupatches/wisefy/WiseFy.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>WiseFy (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:56 CDT 2017 -->
<title>WiseFy (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="WiseFy (wisefy 1.0.7 API)";
parent.document.title="WiseFy (wisefy 1.0.8 API)";
}
}
catch(err) {
Expand Down Expand Up @@ -150,6 +150,14 @@ <h3>Field Summary</h3>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/isupatches/wisefy/WiseFy.html#MAX_FREQUENCY_5GHZ">MAX_FREQUENCY_5GHZ</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/isupatches/wisefy/WiseFy.html#MIN_FREQUENCY_5GHZ">MIN_FREQUENCY_5GHZ</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/isupatches/wisefy/WiseFy.html#WIFI_MANAGER_FAILURE">WIFI_MANAGER_FAILURE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
Expand Down Expand Up @@ -202,7 +210,7 @@ <h4>WISEFY_FAILURE</h4>
<a name="WIFI_MANAGER_FAILURE">
<!-- -->
</a>
<ul class="blockListLast">
<ul class="blockList">
<li class="blockList">
<h4>WIFI_MANAGER_FAILURE</h4>
<pre>public static final&nbsp;int WIFI_MANAGER_FAILURE</pre>
Expand All @@ -212,6 +220,32 @@ <h4>WIFI_MANAGER_FAILURE</h4>
</dl>
</li>
</ul>
<a name="MIN_FREQUENCY_5GHZ">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MIN_FREQUENCY_5GHZ</h4>
<pre>public static final&nbsp;int MIN_FREQUENCY_5GHZ</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.isupatches.wisefy.WiseFy.MIN_FREQUENCY_5GHZ">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MAX_FREQUENCY_5GHZ">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MAX_FREQUENCY_5GHZ</h4>
<pre>public static final&nbsp;int MAX_FREQUENCY_5GHZ</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.isupatches.wisefy.WiseFy.MAX_FREQUENCY_5GHZ">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
Expand Down
58 changes: 50 additions & 8 deletions javadoc/com/isupatches/wisefy/WiseFy.withContext.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>WiseFy.withContext (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:57 CDT 2017 -->
<title>WiseFy.withContext (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="WiseFy.withContext (wisefy 1.0.7 API)";
parent.document.title="WiseFy.withContext (wisefy 1.0.8 API)";
}
}
catch(err) {
Expand Down Expand Up @@ -75,13 +75,13 @@
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
Expand Down Expand Up @@ -123,6 +123,25 @@ <h2 title="Class WiseFy.withContext" class="title">Class WiseFy.withContext</h2>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/isupatches/wisefy/WiseFy.withContext.html#withContext-android.content.Context-">withContext</a></span>(android.content.Context&nbsp;context)</code>
<div class="block">Mandatory - The public constructor for the builder that requires a context</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
Expand Down Expand Up @@ -166,6 +185,29 @@ <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="withContext-android.content.Context-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>withContext</h4>
<pre>public&nbsp;withContext(android.content.Context&nbsp;context)</pre>
<div class="block">Mandatory - The public constructor for the builder that requires a context</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - - The activity or application context to get a WifiConfiguration and
ConnectivityManager instance</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
Expand Down Expand Up @@ -260,13 +302,13 @@ <h4>logging</h4>
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
Expand Down
6 changes: 3 additions & 3 deletions javadoc/com/isupatches/wisefy/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>com.isupatches.wisefy (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:57 CDT 2017 -->
<title>com.isupatches.wisefy (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
Expand Down
8 changes: 4 additions & 4 deletions javadoc/com/isupatches/wisefy/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Sat Mar 25 21:42:17 CDT 2017 -->
<title>com.isupatches.wisefy (wisefy 1.0.7 API)</title>
<meta name="date" content="2017-03-25">
<!-- Generated by javadoc (1.8.0_102) on Sun Jul 02 14:57:57 CDT 2017 -->
<title>com.isupatches.wisefy (wisefy 1.0.8 API)</title>
<meta name="date" content="2017-07-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.isupatches.wisefy (wisefy 1.0.7 API)";
parent.document.title="com.isupatches.wisefy (wisefy 1.0.8 API)";
}
}
catch(err) {
Expand Down
Loading

0 comments on commit a0f8a3b

Please sign in to comment.