File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Download [the latest JAR][latest] or define in Gradle:
21
21
22
22
``` groovy
23
23
dependencies {
24
- compile 'com.parse:parse-livequery-android:1.0.0 '
24
+ compile 'com.parse:parse-livequery-android:1.0.1 '
25
25
}
26
26
```
27
27
@@ -39,6 +39,22 @@ ParseLiveQueryClient parseLiveQueryClient = ParseLiveQueryClient.Factory.getClie
39
39
40
40
### Creating Live Queries
41
41
42
+ If you wish to pass in your own OkHttpClient instance for troubleshooting or custom configs, you can instantiate the client as follows:
43
+
44
+ ``` java
45
+ ParseLiveQueryClient parseLiveQueryClient =
46
+ ParseLiveQueryClient . Factory . getClient(new OkHttp3SocketClientFactory (new OkHttpClient ()));
47
+ ```
48
+
49
+ The URL is determined by the Parse initialization, but you can override by specifying a ` URI ` object:
50
+
51
+ ``` java
52
+ ParseLiveQueryClient parseLiveQueryClient =
53
+ ParseLiveQueryClient . Factory . getClient(new URI (" wss://myparseinstance.com" ));
54
+ ```
55
+
56
+ Note: The expected protocol for URI is ` ws ` instead of ` http ` , like in this example: ` URI("ws://192.168.0.1:1337/1") ` .
57
+
42
58
Live querying depends on creating a subscription to a ` ParseQuery ` :
43
59
44
60
``` java
You can’t perform that action at this time.
0 commit comments