Skip to content

Commit 89e4ae5

Browse files
committed
Update README
1 parent 67495ef commit 89e4ae5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Download [the latest JAR][latest] or define in Gradle:
2121

2222
```groovy
2323
dependencies {
24-
compile 'com.parse:parse-livequery-android:1.0.0'
24+
compile 'com.parse:parse-livequery-android:1.0.1'
2525
}
2626
```
2727

@@ -39,6 +39,22 @@ ParseLiveQueryClient parseLiveQueryClient = ParseLiveQueryClient.Factory.getClie
3939

4040
### Creating Live Queries
4141

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+
4258
Live querying depends on creating a subscription to a `ParseQuery`:
4359

4460
```java

0 commit comments

Comments
 (0)