cronet: update README for using published grpc-cronet with play service Cronet implementation (#6178)

* cronet: update README for using published grpc-cronet with play service Cronet implementation.

* doc: Added cronet/README.md version update to RELEASING.md.
This commit is contained in:
Chengyuan Zhang 2019-09-24 13:24:59 -07:00 committed by GitHub
parent f9ba620309
commit e281c75b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 9 deletions

View File

@ -119,6 +119,7 @@ Tagging the Release
# Bump documented versions. Don't forget protobuf version # Bump documented versions. Don't forget protobuf version
$ ${EDITOR:-nano -w} README.md $ ${EDITOR:-nano -w} README.md
$ ${EDITOR:-nano -w} documentation/android-channel-builder.md $ ${EDITOR:-nano -w} documentation/android-channel-builder.md
$ ${EDITOR:-nano -w} cronet/README.md
$ git commit -a -m "Update README etc to reference $MAJOR.$MINOR.$PATCH" $ git commit -a -m "Update README etc to reference $MAJOR.$MINOR.$PATCH"
``` ```
3. Change root build files to remove "-SNAPSHOT" for the next release version 3. Change root build files to remove "-SNAPSHOT" for the next release version

View File

@ -1,9 +1,8 @@
gRPC Cronet Transport gRPC Cronet Transport
======================== ========================
**EXPERIMENTAL:** *gRPC's Cronet transport is an experimental API, and is not **EXPERIMENTAL:** *gRPC's Cronet transport is an experimental API, its stability
yet integrated with our build system. Using Cronet with gRPC requires manually depends on upstream Cronet's implementation, which involves some experimental features.*
integrating the gRPC code in this directory into your Android application.*
This code enables using the [Chromium networking stack This code enables using the [Chromium networking stack
(Cronet)](https://chromium.googlesource.com/chromium/src/+/master/components/cronet) (Cronet)](https://chromium.googlesource.com/chromium/src/+/master/components/cronet)
@ -17,13 +16,26 @@ Some advantages of using Cronet with gRPC:
* Robust to Android network connectivity changes * Robust to Android network connectivity changes
* Support for [QUIC](https://www.chromium.org/quic) * Support for [QUIC](https://www.chromium.org/quic)
Cronet jars are available on Google's Maven repository. See the example app at Since gRPC's 1.24 release, the `grpc-cronet` package provides access to the
https://github.com/GoogleChrome/cronet-sample/blob/master/README.md. To use `CronetChannelBuilder` class. Cronet jars are available on Google's Maven repository.
Cronet with gRPC, you will need to copy the gRPC source files contained in this See the example app at https://github.com/GoogleChrome/cronet-sample/blob/master/README.md.
directory into your application's code, as we do not currently provide a
`grpc-cronet` dependency.
To use Cronet, you must have the `ACCESS_NETWORK_STATE` permission set in ## Example usage:
In your app module's `build.gradle` file, include a dependency on both `grpc-cronet` and the
Google Play Services Client Library for Cronet
```
implementation 'io.grpc:grpc-cronet:1.24.0'
implementation 'com.google.android.gms:play-services-cronet:16.0.0'
```
In cases where Cronet cannot be loaded from Google Play services, there is a less performant
implementation of Cronet's API that can be used. Depend on `org.chromium.net:cronet-fallback`
to use this fall-back implementation.
You will also need permission to access the device's network state in your
`AndroidManifest.xml`: `AndroidManifest.xml`:
``` ```