aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/android/test/interop/README.md
blob: 95262307ebce8d1452e86f065db2d0c385dda36f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
gRPC on Android
==============

Note: Building the protobuf dependency for Android requires
https://github.com/google/protobuf/pull/3878. This fix will be in the next
protobuf release, but until then must be manually patched in to
`third_party/protobuf` to build gRPC for Android.

PREREQUISITES
-------------

- Android SDK
- Android NDK
- `protoc` and `grpc_cpp_plugin` binaries on the host system

INSTALL
-------

The example application can be built via Android Studio or on the command line
using `gradle`:

  ```sh
  $ ./gradlew installDebug
  ```

INSTRUMENTATION TESTS
---------------------

The instrumentation tests can be run via the following `gradle` command. This
requires an emulator already running on your computer.

```
$ ./gradlew connectedAndroidTest \
  -Pandroid.testInstrumentationRunnerArguments.server_host=grpc-test.sandbox.googleapis.com \
  -Pandroid.testInstrumentationRunnerArguments.server_port=443 \
  -Pandroid.testInstrumentationRunnerArguments.use_tls=true
```