While doing android development. There is really no clear way of doing network operations, Sending and receiving data.
Currently I am handing it using
HttpsURLConnection and having streams to build a request and response.
I've created a test application using Volley and seems straight forward. However Volley requires the
Context to run meaning it's now attached to the Android Framework. So sticking with MVVM it doesn't really fit.
I have also read about headless Fragments which is a
Fragment that contains an inline
AsyncTask class to handle networking
I could continue using my
HttpsURLConnection DataOutputStream and
Then MVVM and unit testing can still work. There just doesn't seem like standard way of doing this.
I am just looking to see if there is a more standard way of handling networking or not! Thanks!