File tree Expand file tree Collapse file tree 5 files changed +17
-12
lines changed
dotnetcoresignalrclientjava
src/main/java/com/smartarmenia/dotnetcoresignalrclientjava Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
33apply plugin : ' kotlin-android-extensions'
44
55android {
6- compileSdkVersion 26
7- buildToolsVersion " 26 .0.2 "
6+ compileSdkVersion 27
7+ buildToolsVersion " 27 .0.3 "
88 defaultConfig {
99 applicationId " com.smartarmenia.websocketclient"
1010 minSdkVersion 16
11- targetSdkVersion 26
11+ targetSdkVersion 27
1212 versionCode 1
1313 versionName " 1.0"
1414 }
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4- ext. kotlin_version = ' 1.1.51 '
4+ ext. kotlin_version = ' 1.2.30 '
55 repositories {
66 google()
77 jcenter()
88 }
99 dependencies {
10- classpath ' com.android.tools.build:gradle:3.0.0 '
10+ classpath ' com.android.tools.build:gradle:3.0.1 '
1111 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
1212 classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
1313 classpath ' com.github.dcendents:android-maven-gradle-plugin:1.4.1'
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
22apply plugin : ' kotlin-android'
33
44android {
5- compileSdkVersion 26
6- buildToolsVersion " 26 .0.2 "
5+ compileSdkVersion 27
6+ buildToolsVersion " 27 .0.3 "
77
88
99 defaultConfig {
1010 minSdkVersion 16
11- targetSdkVersion 26
11+ targetSdkVersion 27
1212 versionCode 1
1313 versionName " 1.00 24sep2017"
1414 }
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22
33android {
4- compileSdkVersion 26
5- buildToolsVersion " 26 .0.2 "
4+ compileSdkVersion 27
5+ buildToolsVersion " 27 .0.3 "
66
77
88 defaultConfig {
99 minSdkVersion 16
10- targetSdkVersion 26
10+ targetSdkVersion 27
1111 versionCode 10
1212 versionName " 1.09"
1313 }
Original file line number Diff line number Diff line change 2424import java .util .Map ;
2525import java .util .UUID ;
2626
27+ import javax .net .ssl .SSLSocketFactory ;
28+
2729public class WebSocketHubConnection implements HubConnection {
2830 private static String SPECIAL_SYMBOL = "\u001E " ;
2931 private static String TAG = "WebSockets" ;
@@ -161,10 +163,13 @@ public void onError(Exception ex) {
161163 error (ex );
162164 }
163165 };
166+
167+ if (parsedUri .getScheme ().equals ("https" )) {
168+ client .setSocket (SSLSocketFactory .getDefault ().createSocket ());
169+ }
164170 } catch (Exception e ) {
165171 error (e );
166172 }
167-
168173 Log .i (TAG , "Connecting..." );
169174 client .connect ();
170175 }
You can’t perform that action at this time.
0 commit comments