Skip to content

Commit 6fe991b

Browse files
authored
Merge pull request #9 from freshbits/relase/2.3.2
Release 2.3.2
2 parents d16c17c + 81c674a commit 6fe991b

File tree

9 files changed

+48
-43
lines changed

9 files changed

+48
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 2.3.2 - 2020-04-03
4+
### Changed
5+
- Added better error handling
6+
37
## 2.3.1 - 2020-01-31
48
### Changed
59
- Added manufacturer specific support

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repositories {
3838
3939
dependencies {
4040
...
41-
compile 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.1'
41+
compile 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.2'
4242
}
4343
```
4444

@@ -102,7 +102,7 @@ Pathshare.client().saveUser("Candice", "[email protected]", "+12345678901", UserType.
102102
}
103103

104104
@Override
105-
public void onError() {
105+
public void onError(@NonNull Throwable throwable) {
106106
// ...
107107
}
108108
});
@@ -115,7 +115,7 @@ Pathshare.client().saveUser("SDK User Android", "[email protected]", "+12345678901",
115115
// ...
116116
}
117117

118-
override fun onError() {
118+
override fun onError(throwable: Throwable) {
119119
// ...
120120
}
121121
})
@@ -265,7 +265,7 @@ session.inviteUser("Customer", UserType.CLIENT, "[email protected]", "+12345678
265265
Log.d("URL", url.toString()); // => https://m.pathsha.re/12s83a
266266
}
267267

268-
public void onError() {
268+
public void onError(@NonNull Throwable throwable) {
269269
// ...
270270
}
271271
});
@@ -279,7 +279,7 @@ session.inviteUser("Customer", UserType.CLIENT, "[email protected]", "+12345678901
279279
Log.d("URL", url.toString()) // => https://m.pathsha.re/12s83a
280280
}
281281

282-
override fun onError() {
282+
override fun onError(throwable: Throwable) {
283283
// ...
284284
}
285285
})
@@ -320,7 +320,7 @@ Pathshare.client().findSession(identifier, new SessionResponseListener() {
320320
}
321321
322322
@Override
323-
public void onError() { ... }
323+
public void onError(@NonNull Throwable throwable) { ... }
324324
}
325325
```
326326
@@ -331,6 +331,6 @@ Pathshare.client().findSession(identifier, object: SessionResponseListener {
331331
session.sessionExpirationListener = SessionExpirationListener { ... }
332332
}
333333
334-
override fun onError() { ... }
334+
override fun onError(throwable: Throwable) { ... }
335335
})
336336
```

android-example-app/app-kotlin/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "ch.freshbits.pathshare.example"
1010
minSdkVersion 21
1111
targetSdkVersion 28
12-
versionCode 131
13-
versionName "2.3.1"
12+
versionCode 132
13+
versionName "2.3.2"
1414

1515
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1616
}
@@ -51,6 +51,6 @@ dependencies {
5151
implementation fileTree(dir: 'libs', include: ['*.jar'])
5252
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
5353
testImplementation 'junit:junit:4.13'
54-
implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
55-
implementation 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.1'
54+
implementation 'androidx.appcompat:appcompat:1.2.0-beta01'
55+
implementation 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.2'
5656
}

android-example-app/app-kotlin/src/main/java/ch/freshbits/pathshare/example/MainActivity.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class MainActivity : AppCompatActivity() {
5959
createSession()
6060
}
6161

62-
override fun onError() {
63-
Log.e("User", "Error")
62+
override fun onError(throwable: Throwable) {
63+
Log.e("User", "Error: ${throwable.localizedMessage}")
6464
}
6565
})
6666
}
@@ -105,7 +105,7 @@ class MainActivity : AppCompatActivity() {
105105
leaveButton.isEnabled = true
106106
}
107107

108-
override fun onError() {
108+
override fun onError(throwable: Throwable) {
109109
showToast("Something went wrong")
110110
}
111111
})
@@ -137,8 +137,8 @@ class MainActivity : AppCompatActivity() {
137137
leaveButton.isEnabled = true
138138
}
139139

140-
override fun onError() {
141-
Log.e("Session", "Error")
140+
override fun onError(throwable: Throwable) {
141+
Log.e("Session", "Error: ${throwable.localizedMessage}")
142142
}
143143
})
144144
}
@@ -170,8 +170,8 @@ class MainActivity : AppCompatActivity() {
170170
leaveButton.isEnabled = true
171171
}
172172

173-
override fun onError() {
174-
Log.e("Invite", "Error")
173+
override fun onError(throwable: Throwable) {
174+
Log.e("Invite", "Error: ${throwable.localizedMessage}")
175175
}
176176
})
177177
}
@@ -190,8 +190,8 @@ class MainActivity : AppCompatActivity() {
190190
deleteSessionIdentifier()
191191
}
192192

193-
override fun onError() {
194-
Log.e("Leave", "Error")
193+
override fun onError(throwable: Throwable) {
194+
Log.e("Leave", "Error: ${throwable.localizedMessage}")
195195
}
196196
})
197197
}
@@ -212,8 +212,8 @@ class MainActivity : AppCompatActivity() {
212212
leaveButton.isEnabled = true
213213
}
214214

215-
override fun onError() {
216-
Log.e("Join", "Error")
215+
override fun onError(throwable: Throwable) {
216+
Log.e("Join", "Error: ${throwable.localizedMessage}")
217217
}
218218
})
219219
}
@@ -248,6 +248,6 @@ class MainActivity : AppCompatActivity() {
248248
}
249249

250250
private fun preferences(): SharedPreferences {
251-
return applicationContext.getSharedPreferences(SESSION_PREFERENCES, Context.MODE_MULTI_PROCESS)
251+
return applicationContext.getSharedPreferences(SESSION_PREFERENCES, MODE_PRIVATE)
252252
}
253253
}

android-example-app/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "ch.freshbits.pathshare.example"
88
minSdkVersion 25
99
targetSdkVersion 28
10-
versionCode 131
11-
versionName "2.3.1"
10+
versionCode 132
11+
versionName "2.3.2"
1212
}
1313

1414
packagingOptions {
@@ -46,6 +46,6 @@ repositories {
4646
dependencies {
4747
implementation fileTree(dir: 'libs', include: ['*.jar'])
4848
testImplementation 'junit:junit:4.13'
49-
implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
50-
implementation 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.1'
49+
implementation 'androidx.appcompat:appcompat:1.2.0-beta01'
50+
implementation 'ch.freshbits.pathshare.sdk:pathshare-sdk:2.3.2'
5151
}

android-example-app/app/src/main/java/ch/freshbits/pathshare/example/MainActivity.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public void onSuccess() {
6565
}
6666

6767
@Override
68-
public void onError() {
69-
Log.e("User", "Error");
68+
public void onError(@NonNull Throwable throwable) {
69+
Log.e("User", "Error: " + throwable.getLocalizedMessage());
7070
}
7171
}));
7272
}
@@ -118,8 +118,8 @@ public void onSuccess() {
118118
}
119119

120120
@Override
121-
public void onError() {
122-
Log.e("Session", "Error");
121+
public void onError(@NonNull Throwable throwable) {
122+
Log.e("Session", "Error: " + throwable.getLocalizedMessage());
123123
}
124124
});
125125

@@ -157,8 +157,8 @@ public void onSuccess(URL url) {
157157
}
158158

159159
@Override
160-
public void onError() {
161-
Log.e("Invite", "Error");
160+
public void onError(@NonNull Throwable throwable) {
161+
Log.e("Invite", "Error: " + throwable.getLocalizedMessage());
162162
}
163163
});
164164
}
@@ -197,8 +197,8 @@ public void onSuccess() {
197197
}
198198

199199
@Override
200-
public void onError() {
201-
Log.e("Join", "Error");
200+
public void onError(@NonNull Throwable throwable) {
201+
Log.e("Join", "Error: " + throwable.getLocalizedMessage());
202202
}
203203
});
204204
} catch (IllegalStateException e) {
@@ -224,8 +224,8 @@ public void onSuccess() {
224224
}
225225

226226
@Override
227-
public void onError() {
228-
Log.e("Leave", "Error");
227+
public void onError(@NonNull Throwable throwable) {
228+
Log.e("Leave", "Error: " + throwable.getLocalizedMessage());
229229
}
230230
});
231231
} catch (IllegalStateException e) {
@@ -323,7 +323,7 @@ public void onSuccess(Session session) {
323323
}
324324

325325
@Override
326-
public void onError() {
326+
public void onError(@NonNull Throwable throwable) {
327327
showToast("Something went wrong.");
328328
}
329329
});
@@ -335,6 +335,6 @@ private void showToast(String message) {
335335
}
336336

337337
private SharedPreferences getPreferences() {
338-
return getApplicationContext().getSharedPreferences(SESSION_PREFERENCES, Context.MODE_MULTI_PROCESS);
338+
return getApplicationContext().getSharedPreferences(SESSION_PREFERENCES, Context.MODE_PRIVATE);
339339
}
340340
}

android-example-app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
google()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.5.3'
11+
classpath 'com.android.tools.build:gradle:3.6.1'
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

android-example-app/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
# When configured, Gradle will run in incubating parallel mode.
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
18+
# org.gradle.parallel=true
19+
android.useAndroidX=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jan 31 15:26:07 CET 2020
1+
#Fri Apr 03 12:38:29 CEST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

0 commit comments

Comments
 (0)