Menu
  • HOME
  • TAGS

GCM service stops working when I implement Robospice with Spring module

android-gcm,robospice

I have solved the issue, it was not robospice or gcm fault, it was a thing in our server handling. The thing is that we read some values from User-Agent header that i was not aware of and i did not set it to the OkHttp client....

Rationale behind loading all cache data in RoboSpice's Persistor?

android,robospice

If you follow the call hierarchy, you will find that loadAllDataFromCache() is indirectly used only by com.octo.android.robospice.SpiceManager#getAllDataFromCache. For getAllCacheKeys(), it is similar - there is com.octo.android.robospice.SpiceManager#getAllCacheKeys utilizing it. This means that you will probably be well off by implementing these methods to just throw an UnsupportedOperationException. You should also consider...

Using RoboSpice for asynchronus threading

android,multithreading,asynchronous,robospice

RoboSpice is designed to be tied to Android's activity lifecycle, so stopping the SpiceService between Activity changes is normal. The component that remains persistent between activities is its cache. You can try, however, holding a SpiceService active throughout your app lifecycle by tying it to your Application context, but that...

Robospice offline task. Do I need cache?

android,caching,robospice

You can just use the com.octo.android.robospice.SpiceManager#execute(com.octo.android.robospice.request.SpiceRequest<T>, com.octo.android.robospice.request.listener.RequestListener<T>) method, which doesn't utilize the cache. For the initialization of RoboSpice, although your request does not seem to be offline, you can check the offline sample on GitHub, specifically the SampleOfflineSpiceService class.

How do I make a a java object to recieve a model from my rails api?

android,ruby-on-rails,spring,robospice

I have used Retrofit to communicate between my rails app and android app. I thought it was json only, but apparently it works with XML as well. Here is the link to the main web page, and here is the link to the page that talks about supporting xml. Retrofit...

How to execute RoboSpice requests synchronously?

robospice

As proposed by Riccardo Ciovatti on the RoboSpice mailing list, a direct answer to your question is : final CountDownLatch latch = new CountDownLatch(1); final YourRequest request = new YourRequest(); spiceManager.execute(request, new RequestListener<YourResponse>() { @Override public void onRequestFailure(SpiceException spiceException) { latch.countDown(); } @Override public void onRequestSuccess(YourResponse response) { latch.countDown(); }...

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

java,android,robospice

Use cache. Execute request with some cache key spiceManager.execute(request, "your_cache_key", DurationInMillis.ALWAYS_EXPIRED, new AccessTokenResponseRequestListener()); and in listener remove response on this request from cache @Override public void onRequestFailure(SpiceException e) { .... spiceManager.removeDataFromCache(AccessTokenResponse.class); .... } @Override public void onRequestSuccess(AccessTokenResponse accessToken) { if (accessToken == null) { return; } .... spiceManager.removeDataFromCache(AccessTokenResponse.class); .... }...

What is RoboSpice Library in android

java,android,robospice

I'm not an expert on RoboSpice but here is my quick explanation of its function: Often in our app we would like to do Asynchronous network operations (get image from url etc.) A common technique is to do the network request within an AsyncTask object. The problem is that the...

How to Scroll GridView in Full Screen

android,gridview,android-scrollview,retrofit,robospice

You should use a GridView like http://stackoverflow.com/a/24617051/754439 and add the ImageView as a header. Nesting an AdapterView under a ScrollView is discouraged: How can I put a ListView into a ScrollView without it collapsing?.

Robospice+retrofit sequence of actions in background

android,retrofit,robospice

Seems like I have answer. I got rid of Robospice and I'm executing request synchronously in IntentService....

Robospice sends Retrofit the same request 3 times

android,retrofit,robospice

It's called "retry policy". How can I setup a retry policy for failed requests ? Use spiceRequest.setRetryPolicy(). By default, requests have a DefaultRetryPolicy. It will be activated when a network request fails. Source...

Robospice service running until it finish it job after application finished

okhttp,robospice

I've solved my problem (that may be wasn't really a problem !) by ending my application with finish() In my MainActivity, I use a Robospice service : private final class LogoutListener implements PendingRequestListener<String> { @Override public void onRequestFailure(SpiceException spiceException) { Log.e(TAG, spiceException.getMessage()); } @Override public void onRequestSuccess(String result) { //...

Robospice - In what order should we use execute(), addListenerIfPending(), getFromCache()

android,caching,listener,robospice

No, your first statement is wrong. execute() will take in charge all 3 cases. addListenerIfPending will not trigger any request by itself, it only allows to plug a listener to an already pending request if such a request exists. So case 2....

Is it possible to set a post name param dynamically using Robospice + Retrofit?

android,retrofit,robospice

As Jake Wharton said You can use a "@FieldMap Map<String, String>" for that. Looks like Robospice Retrofit module is out of date....

Robospice/Maven Intellij Android

maven,intellij-idea,android-library,robospice

Read about the setup of RS in the wiki pages, you will see that some extensions need some exclusions on Android. This is not related to RoboSpice per say but depends on the libraries themselves (for instance XMLParser depends on stax and xp3 that must be excluded on Android).

How to implement android RESTful client with Robospice (or something like this) + OAuth?

android,rest,oauth,robospice

It depends. Are you talking about OAuth 1 or OAuth 2? For the former, you could use signpost. For the latter, you could use RoboSpice + Google Http Client + Google OAuth Client Library. If you use Google Http Client as your network library, what you need to do is...

Using Sync Adapters+ Volley/RoboSpice for Syncronous processing of Network Requests

android,android-volley,android-syncadapter,robospice

All alternatives should be working. With async adapters, you will get : async background processing in a native android process might be more lightweight than the app process depending on your design but the communication between the app and the async adapter will involve IPC which means bundling/unbundling stuff With...

How to check is robospice loading some task

android,robospice

The feature is in progress: PR #383 (you can check issue #335 as well). I think it will be released with the next version, but there is no time estimation.

RoboSpice won't overwrite cached object when disregarding cache

android,caching,robospice

When RoboSpice loads data from the network it is placed in the cache indexed by the cache key and object type and time stamped. At this point the expiry is meaningless. It is only used for following requests when the data is already in the cache. What I would recommend...

Commons-Io Duplicate Entry Error Using Robospice and Android Studio

android,gradle,android-studio,robospice,apache-commons-io

This is a known and fixed problem in Robospice, caused by an underlying Gradle 2.1 issue: https://github.com/stephanenicolas/robospice/issues/365. The fix is going to be released in the next version. You can work around it by excluding org.apache.commons:commons-io from all Robospice dependencies, and include commons-io:commons-io:1.3.2 manually. Like this: // workaround (https://github.com/stephanenicolas/robospice/issues/365) //...