full project description at -> [login to view URL]
gRPC C++ debugging on Android
Task: Debug gRPC C++ library on Android (for Google TTS/STT APIs)
Connection failure 1
Build environment 2
Android NDK and gRPC source 2
Google cloud platform APIs 2
Test programs for Android platform 3
Android architectures 3
External links 3
It is required to debug a test program / executable - on the Android platform - which uses the gRPC C++ libraries to connect with Google's text-to-speech (TTS) and speech-to-text (STT) APIs.
Either we can provide pre-built libraries, or the software engineer can try to build the required libraries by him or her-self. Likewise for the test program: we can provide the source code for a test executable which uses the libraries, or the engineer can write one his or her-self.
IMPORTANT: If it is chosen to build the gRPC libraries from scratch, it is vital to build them for the Android platform. We already have working libraries and programs for the Linux platform. We are seeking evidence that they can work on the Android platform also - with the Google APIs.
Eventually the library would be integrated in to a Java Android application - and accessed using JNI calls - but for now we want a console program written in C++. We do not want a Java program.
We have already successfully built the required libraries (libgrpc++ etc.) for the x86 and armeabi-v7a architectures. We have also successfully compiled an Android console program (written in C++) which uses these libraries. The program even runs successfully, but the request to Google's servers ultimately times out. We need to find out why this is failing.
Possible reasons for the failure could include:
SSL/TLS connection problems
Android environment variables
A bug in the gRPC source code
So it is possible that there is a problem with the gRPC source code itself, and meaningful debugging experience - with gdb and of C/C++ programs - is required.
Android NDK and gRPC source
It is expected that the Android NDK will be used to build the libraries. If possible, version v18 of the NDK should be used, but versions v16b or v17 may be okay also.
A recent version of gRPC should be used also. We successfully built the libgrpc++ and other gRPC libraries using the CMake build system.
Google cloud platform APIs
The Google APIs use the gRPC library and protocol buffers for communicating with their servers. Currently we are compiling all the source files necessary for speech-to-text and text-to-speech - including the source code generated by the protbuf compiler - in to a single static library. We may be able to share this static library if it helps you. (We have built it for the x86 and armeabi-v7a architetures. This should be enough to get you started.)
When compiling test programs for Android, the following linker flags are used.
LDFLAGS += -lgoogleapis -lgrpc++ -lgrpc -lgpr -lprotobuf \
(libgoogleapis.a is the static library we compiled from the Google APIs souce code.)
We may be able to share the Makefile we are using if it could help you.
If you want to build the library yourself, the source code is at [login to view URL] .
If you choose to build the libraries yourself, (static versions of) the following libraries are required.
libssl.a (from boringssl project)
This is not necessarily a comprehensive list. Whatever libraries are required for using the Google speech recognition and text-to-speech APIs via gRPC - and which are not already included in the Android NDK - should be provided.
IMPORTANT: A copy of each of these libraries should be provided for each common Android architecture (see below).