I can't seem to get robospice working. I am going through the github starter guide.
I tried adding this to my androidmanifest.xml but get error 'cannot resolve symbol RetrofitGsonSpiceService':
<service
android:name="com.octo.android.robospice.RetrofitGsonSpiceService"
android:exported="false" />
I can use RetrofitGsonSpiceService in my code fine like this:
RetrofitGsonSpiceService service
Also, what should my Request class look like?
I have this but get errors 'cannot resolve method getRestTemplate()' and another error in the 'super(User.class)' line
public class TestRequest extends RetrofitSpiceRequest
{
private String user;
public TestRequest(String user) {
super(User.class);
this.user = user;
}
@Override
public User loadDataFromNetwork() throws Exception {
return getRestTemplate().getForObject(url, User.class);
}
/**
* This method generates a unique cache key for this request. In this case
* our cache key depends just on the keyword.
* @return
*/
public String createCacheKey() {
return "followers." + user;
}
}
I have a User class that works fine with Retrofit and gson. I am just trying to get anything to work right now, ultimately I will need it to download a file from my server