Questions about Managing an HTTP/2 Connection with the Alexa Voice Service
Dear Friends, I want to add avs to my android app. And after I get the login token, I find the guide says that I should use netty or jetty to managing the Http/2 connection. So is there any chances to use HttpClient or URLConnection to managing this connection or I can get some jars to use directly?
You will not be able to use HttpClient (I assume you mean Apache's HttpClient) nor HttpURLConnection provided by Java. HttpClient won't have support for HTTP/2 until version 5.0, and HttpURLConnection in Java won't support HTTP/2 until Java 9. HttpURLConnection on Android is actually interesting because underneath it uses OkHttp, so technically it could receive HTTP/2 support whenever Google updates the underlying version of OkHttp to one that supports HTTP/2. However, on Android your best option is going to be to use OkHttp directly as a dependency in your application so that it supports as many versions of Android as possible. It supports HTTP/2 and is by far the best HTTP Client available for Android. You can find instructions on how to use it here: http://square.github.io/okhttp/ and it's pretty easy to add as a dependency to your Android project. Let us know if you need any further help!
I'm switching over to OkHttp as well, one thing to look out for with the switch is that the new endpoint only supports certain TLS versions, so the 4.4.2 Android device I was testing on couldn't handshake, I had to switch to a 5.* device.