Questions tagged [robospice]

RoboSpice is an Open source library for Android to perform long running background tasks. It has been designed primarily to execute network processing (such as performing REST requests) but it can be used as a full, working, replacement for AsyncTasks.

RoboSpice is an Open source library for Android to perform long running background tasks. It has been designed primarily to execute network processing (such as performing REST requests) but it can be used as a full, working, replacement for AsyncTasks.

The principle of RoboSpice is that "background tasks" are processed inside an Android Service. To understand why RoboSpice is better than AsyncTasks and Loaders, refer to this infographics

RoboSpice offers different module to provide REST support out of the box via various technologies :

Asynchronous Networking Made Easy. Robust and simple. GitHub repository

251 questions
4
votes
3 answers

Robospice Impossible to start SpiceManager as no service of class

I am trying to use following libraries to develop my app. Robospice Gson and Spring for android To do so, In my gradle file I have following dependencies added compile 'com.octo.android.robospice:robospice-spring-android:1.4.13' compile…
Dipendra
  • 1,547
  • 19
  • 33
4
votes
3 answers

json reading error in robospice

Logcat error 07-30 06:43:48.135: E//DefaultRequestRunner.java:153(29678): 06:43:48.147 Thread-9164 An exception occurred during request network execution :Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT…
Issac Balaji
  • 1,441
  • 1
  • 13
  • 25
4
votes
1 answer

Is RoboSpice shouldStop() really needed?

I wonder if the shouldStop() method of SpiceManager is needed at all.. I got the idea that it is supposed to unbind the possible listeners from activity/fragment, but if the activity is going to be killed anyway, does it matter? Garbage collector…
Jakub Žitný
  • 962
  • 1
  • 9
  • 38
4
votes
1 answer

Using RoboSpice in a BroadcastReceiver

I would like to know if it is possible to use RoboSpice in a BroadcastReceiver and, if it is, how should I handle the lifecycle ? Right now I am just calling spiceManager.start(context) in the onReceive(Context, Intent) method, but the service in…
Gaëtan
  • 11,912
  • 7
  • 35
  • 45
4
votes
1 answer

How do I get Robospice to treat anything other than a 200 response from Retrofit & OKHttp as an error

I am using Robospice on android with Retrofit and OKHttp. All works great with responses passed back to the activity using the Robospice RequestListener. The problem is that it only returns a failure if the connection times out or another network…
fraserh
  • 181
  • 1
  • 10
4
votes
1 answer

Using RoboSpice with Jackson2 and Spring

I want to use Jackson2 with SpringRoboSpice . my libs folder contains the following jars…
user4o01
  • 2,688
  • 4
  • 39
  • 54
4
votes
1 answer

How to use Mockito to test APIs along Robospice and Retrofit?

I've been following this blog entry which shows how to mock requests with Mockito and Retrofit. The problem is I'm using both along Robospice, which it doesn't require to provide a Callback as parameter on the service interface (as it would be a…
Diego Acosta
  • 1,737
  • 3
  • 16
  • 21
4
votes
3 answers

Getting data from cache before executing a network request with RoboSpice

I'm using RoboSpice and want to have the following behavior in my app: User starts an activity that needs data from server spiceManager checks if data is cached, returning it if so. regardless of wether cached data was returned, a request to the…
Lucas Jota
  • 1,863
  • 4
  • 24
  • 43
4
votes
1 answer

RoboSpice and ORMLite - Access to the data

I just started using RoboSpice for a new Android application. RoboSpice is used with ORMLite and SpringAndroidSpiceService to read JSON from a REST Web Service. For now, I managed to: create a custom SpiceService make few request to get data from…
Guicara
  • 1,668
  • 2
  • 20
  • 34
4
votes
2 answers

Can I use SpiceManager inside a service?

I'm trying to attach a SpiceManager to service, but I'm getting: java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.octo.android.robospice.SpiceService$SpiceServiceBinder at…
canni
  • 5,737
  • 9
  • 46
  • 68
4
votes
0 answers

Clear old cache data with robospice ormlite

I used the ormlite to cache sqlite database with Robospice. The data after caching look like: table cacheentry (generated by robospice) rowid cachekey resultclass resultIntegerId …
ductran
  • 10,043
  • 19
  • 82
  • 165
4
votes
1 answer

RoboSpice and Jsoup

I have an application where I use Jsoup to get HTML file from the internet and parse it into POJOs. I use a custom Content Provider then to persist my POJOs into an SQLite database. It's a lot of code, and certain things are tricky to implement,…
Haspemulator
  • 11,050
  • 9
  • 49
  • 76
4
votes
1 answer

Uploading an image to Google appengine using Robospice with Retrofit

I'm trying to use Robospice with Retrofit to upload an image to my Google appengine blobstore. I can get the upload URL provided by GAE, but when I try to send the URL with the image as a Multipart POST I get an…
4
votes
3 answers

RoboSpice persist JSON array with OrmLite

I'm using RoboSpice with Spring for Android and would like to persist a JSON array of objects with OrmLite. GSON is used for the JSON marshalling. With the default caching everything works as expected. But OrmLite doesn't seem to like the array of…
Uipko
  • 111
  • 1
  • 7
4
votes
3 answers

Robospice storing object that extends ArrayList in database via Ormlite

Background I have been trying to modify the Robospice Ormlite example code, which I have been successful to run. The only changes I have made is that I have a JSON response that contains an array of objects. I created 2 classes: public class Foos…
Graham Smith
  • 25,627
  • 10
  • 46
  • 69
1 2
3
16 17