Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Commit

Permalink
Merge pull request #47 from spark/token_release
Browse files Browse the repository at this point in the history
Session token release
  • Loading branch information
CityVibes authored Jul 15, 2017
2 parents 72a3bde + 48b89ca commit b3deed3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.4.6
=====
* Adding refresh and inject session token methods.


0.4.5
=====
* Exposing iccid and data usage for electron.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.2'
Expand Down
4 changes: 2 additions & 2 deletions cloudsdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'

// This is the library version used when deploying the artifact
version = '0.4.5'
version = '0.4.6'

ext {
bintrayRepo = 'android'
Expand Down Expand Up @@ -36,7 +36,7 @@ ext {

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
buildToolsVersion '25.0.3'

dexOptions {
javaMaxHeapSize "2g"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ public Date getLastHeard() {

@WorkerThread
public float getCurrentDataUsage() throws ParticleCloudException {
Response response = mainApi.getCurrentDataUsage(deviceState.lastIccid);
float maxUsage = 0;
try {
Response response = mainApi.getCurrentDataUsage(deviceState.lastIccid);
JSONObject result = new JSONObject(new String(((TypedByteArray) response.getBody()).getBytes()));
JSONArray usages = result.getJSONArray("usage_by_day");

Expand All @@ -268,7 +268,7 @@ public float getCurrentDataUsage() throws ParticleCloudException {
}
}
}
} catch (JSONException e) {
} catch (JSONException | RetrofitError e) {
throw new ParticleCloudException(e);
}
return maxUsage;
Expand Down
11 changes: 8 additions & 3 deletions example_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'me.tatarka.retrolambda'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
buildToolsVersion '25.0.3'

defaultConfig {
applicationId "io.particle.cloudsdk.example_app"
Expand Down Expand Up @@ -41,9 +41,14 @@ dependencies {
// UNCOMMENT THE FOLLOWING TO USE A PUBLISHED VERSION OF THE SDK:
// compile 'io.particle:cloudsdk:0.3.3'

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-fragment:25.3.1'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:support-fragment:25.4.0'

retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0'
}

repositories {
maven {
url 'https://maven.google.com'
}
}

0 comments on commit b3deed3

Please sign in to comment.