Importing / Using Volley for Android trouble

536 Views Asked by At

I'm importing Volley using Gradle, more precisely:

compile 'com.mcxiaoke.volley:library-aar:1.0.15'

(I know it's an unofficial mirror).

My trouble is: in this mode Volley is downloaded every time that APP starts or only when I compile for debugging / distribuiting? Just worried about an offline site or so...

Another thing: every tutorial that I did read on internet say to add Volley at startup of the APP, adding in manifest.

1) I did understand that in this manner I can get a Class from every point of my APP (Singleton)... is it right?

2) Is it possible add multipe classes in same mode, adding to manifest?

1

There are 1 best solutions below

1
On

Try this

   compile 'com.mcxiaoke.volley:library:1.0.+'

and then use this as a library , you can customize it how ever you want to use it. I can see you using "aar" of it.

Let me come to your points

First Doubt:

Volley is downloaded every time that APP starts or only when I compile for debugging / distribuiting? Just worried about an offline site or so...

Answer

Volley is downloaded only once you give its dependency in build.gridle file. So Don't worry and VOlley is used to make server calls so i don't think it make any sense with offline site.

  1. After adding a dependency you can get access to volley methods in whole application.
  2. Didn't understand the question. As manifest is the the one where you add this dependency. :P

Enjoy !!