robospice

Uploading an image to Google appengine using Robospice with Retrofit

微笑、不失礼 提交于 2019-12-05 02:20:33
问题 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 exception: E//RequestRunner.java:134(24689): Thread-3363 An exception occurred during request network execution:null E//RequestRunner.java:134(24689): retrofit.RetrofitError E//RequestRunner.java:134(24689): at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:343) E/

What is RoboSpice Library in android

℡╲_俬逩灬. 提交于 2019-12-04 20:24:51
问题 I am Trying to understand RoboSpice Library in android I saw the online Documentation here What i tried :: I have previously studying on using Spring Library,also Retrofit, AsyncHttp etc I understood that all above convert JSON response to POJO What i need more information :: When i see the documentation on Robospice it looks like a wrapper around either of Spring or Retrofit or AsyncHttp etc Is it true ? So by using RoboSpice can we select the underlying layer to be Spring or Retrofit or

How to increase timeout for retrofit requests in robospice android?

点点圈 提交于 2019-12-03 16:21:08
问题 I have implemented robospice in my project and using retrofit for all api calls. For some of requests, I need to increase timeout, please let me know how can I do that? Actually I am using service that extends RetrofitGsonSpiceService. The code of my service class is below: public class MyService extends RetrofitGsonSpiceService { @Override public void onCreate() { super.onCreate(); addRetrofitInterface(MyInterface.class); } @Override public CacheManager createCacheManager(Application

Robospice - keep spice service continue running when changing activity

荒凉一梦 提交于 2019-12-03 14:21:37
I used RoboSpice library to do asynchronous tasks. From their examples, the spice service is declared in BaseActivity, it starts in activity's onStart method, and stops in activity's onStop. Everything is fine, but when I want download file from internet, and then I change to another activity, this download task is cancelled, because the spice service is stopped. It looks like: public abstract class BaseActivity{ /** The request manager. */ private SpiceManager requestManager = new SpiceManager(RequestService.class); @Override protected void onStart() { requestManager.start(this); super

What is RoboSpice Library in android

纵然是瞬间 提交于 2019-12-03 14:02:06
I am Trying to understand RoboSpice Library in android I saw the online Documentation here What i tried :: I have previously studying on using Spring Library ,also Retrofit, AsyncHttp etc I understood that all above convert JSON response to POJO What i need more information :: When i see the documentation on Robospice it looks like a wrapper around either of Spring or Retrofit or AsyncHttp etc Is it true ? So by using RoboSpice can we select the underlying layer to be Spring or Retrofit or AsyncHttp etc So if that happens RoboSpice makes Spring or Retrofit or AsyncHttp etc as BoilerPlate code

onStart of new Activity is called before onStop of parent

这一生的挚爱 提交于 2019-12-03 06:28:49
问题 I've got an application. I use startActivity() to start activity. Can anyone actually tell me why system is calling onStart() of new Activity first, instead of parents onStop() ? Is that even possible (without system bug)? I've found Fragment onStop() being called directly after onStart() - WHY? answer, but I got nothing in common with Fragments and using android-support library. I'm stuck because I'm using RoboSpice and it must contain proper, synchronized methods in onStart and onStop. I

Using RoboSpice is there a way to get the HTTP Error Code out of an exception?

我与影子孤独终老i 提交于 2019-12-02 17:18:11
I am writing an application that uses RoboSpice. In the request listener onRequestFailure( SpiceException arg0 ) is there a way to know for sure that the error was a result of a 401 HTTP Error occurred? I have a back end service, that returns a 401 error when a token expires, when that occurs I need to prompt the user to re-enter their credentials. Is there anyway to know that a 401 HTTP error specifically occurred? Below is an example of my request. public class LookupRequest extends SpringAndroidSpiceRequest <Product> { public String searchText; public String searchMode; public LookupRequest

How to recover properly recover from an interupted uncached request using RoboSpice

谁说胖子不能爱 提交于 2019-12-01 07:26:34
问题 I have a simple fragment that handles logins for my application. Since I'm dealing with login requests, I do not want to cache them. This strategy works fine until I introduce a suspend or orientation change in the middle of the request. When a user clicks the login button I display a ProgressDialog. This goes away when I get the response (success or fail). If I go to the home screen and then go back into the app during the middle of a login request, my Listener never gets notified and as a

RoboSpice persist JSON array with OrmLite

删除回忆录丶 提交于 2019-12-01 06:05:14
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 objects. This is a simplified version of the JSON: [{"id": 1, "title": "Test 1"},{"id": 2, "title": "Test 3"},{"id": 3, "title": "Test 3"}] I would like to persist this in the following object: @DatabaseTable public class Foo { @DatabaseField(id = true) private int id; @DatabaseField private String title; // getters and setters ... } Based on the

Commons-Io Duplicate Entry Error Using Robospice and Android Studio

泄露秘密 提交于 2019-11-29 22:59:48
问题 I've been working on the following issue for several hours, but haven't come up with a way to solve my problem. I've tried the following fixes from Stack Overflow (Android Studio update to 1.0 corrupts MultiDex and Duplicate Zip Entry after Gradle Plugin v0.13.1) but neither one of them worked. I am getting the following error when trying to build my program: Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: org/apache/commons