- git clone
- Create this file inside
network
package
public class Mashape {
public static final String KEY = "HERE GOES YOUR KEY";
}
- Install Retrofit and GSON converter
- Create your model
- Create an interface with a request method inside
- Check this gist and choose an interceptor as a template
- Create the interceptor class and method based on your previous selection
- Create an asynctask
- Inside doInBackGround do the request http
- Don't forget the internet permission in the manifest
- Create an inner class extending your asynctask
- Override in the inner asynctask the method with UI access
- Always call your asynctaks using new and dot execute
new GetSomething().execute();