microsoft / msquic

Cross-platform, C implementation of the IETF QUIC protocol, exposed to C, C++, C# and Rust.
MIT License
4.05k stars 530 forks source link

Support for Android #4041

Open madhanraj opened 10 months ago

madhanraj commented 10 months ago

Describe the feature you'd like supported

I want to know if there is any support and instruction for building MS QUIC for Android.

Proposed solution

MS QUIC for Smartphones - validation and evaluation in real-time

Additional context

No response

nibanks commented 10 months ago

Yes, MsQuic can work on Android, but we don't have any automation validating it, therefore it's currently not officially supported. While there may be a few gaps, depending on your scenario (likely in the system TLS integration areas), most things should work. Feel free to try it out, and if you find any specific gaps, please open issues for those (and possibly PRs).

gganjang commented 4 months ago

I finished my gov project using MsQUIC as transport protocol. Built a static library on linux (ofcourse..) and used it on android mobile app with JNI integration. We didn't fully investigate the performance and efficiency of the app, but it was sufficient to download 2 FHD streaming videos at the same time and decode them.

madhanraj commented 4 months ago

With cross-compilation for ARM (or arm64), it works

NilsHoyer commented 2 months ago

Can you give me some hints, how I can compile MSQuic to use it in my .Net C# project?

ManickaP commented 2 months ago

Can you give me some hints, how I can compile MSQuic to use it in my .Net C# project?

On Android or in general? And you're using System.Net.Quic directly or HTTP/3 via HttpClient?

EDIT: If you're interested in .NET specifically, it's better to file a separate issue in dotnet/runtime repo.

NilsHoyer commented 2 months ago

I want to connect my .Net Apps for Windows and Android via QUIC, not via HTTP. I asked here, since I thought I have to compile MSQuic for Android and in this issue, somebody tried to do this too.

madhanraj commented 2 months ago

I want to connect my .Net Apps for Windows and Android via QUIC, not via HTTP. I asked here, since I thought I have to compile MSQuic for Android and in this issue, somebody tried to do this too.

To build MSQUIC in Android, you can use any cross-compiling tool to generate ARM or ARM64.

ManickaP commented 2 months ago

Putting the msquic lib next to your .NET app binaries should do the trick. If the lib can be loaded, it should light up. You can use QuicConnection.IsSupported / QuicListener.IsSupported to check if it works. Note that we don't officially support this set up, so there might be some unforeseen problems. But if you encounter any issues, feel free to file an issue in our repo and we'll try to help.