Google cloud CDN support QUIC protocol , Here is the android app demo.
- The goal of this app is not to compare the performance of quic and http2.
- Demonstrates how to enable QUIC and Http2 on the Android platform.
Open src ▸ main ▸ java ▸ com ▸ weswu ▸ cloudcdn ▸ Images.java
change the value of imageUrls
CronetEngine.Builder myBuilder = new CronetEngine.Builder(context);
cronetEngine = myBuilder
//disable cache for test, normally you should not do this
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISABLED, 100 * 1024)
.addQuicHint("cdn.obwiz.com", 443, 443)
.enableQuic(true)
//.enableHttp2(true)
.setUserAgent(from(context))
.build();
new CronetEngine.Builder(context).setUserAgent(from(context))
- com.google.android.gms:play-services-cronet
Copyright (C) 2020 Wesley Wu jie1975.wu@gmail.com
This code is licensed under The General Public License version 3
Your feedbacks are highly appreciated! :)