I used tadns and the BEER-WARE protocol in my C project, which is friendlier than MIT
Use asynchronous callback
To use it on android, you need to use jni
But refer to libevent, which has the function of dns resolution, and it is asynchronous, which is very easy to use. On Android, I made some modifications to libevent to make it work properly. Please refer to my article "An improvement of libevent on Android"
I have never done dns resolution on android.
Provide an alternative idea: make a resolution proxy on your own server, and the client will send the domain name to be resolved.
Or use jni to call the Java layer implementation in android.
I used tadns and the BEER-WARE protocol in my C project, which is friendlier than MIT
Use asynchronous callback
To use it on android, you need to use jni
But refer to libevent, which has the function of dns resolution, and it is asynchronous, which is very easy to use. On Android, I made some modifications to libevent to make it work properly. Please refer to my article "An improvement of libevent on Android"