Questions tagged [spring-android]

Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps.

Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps. Like all Spring projects, the real power of Spring for Android is found in how easily it can be extended.

Features:

  • A Rest Client for Android
  • Auth support for accessing secure APIs

More Information:

Getting Started Guides:

Related Tags:

67 questions
3
votes
2 answers

Sending Gzip compressed data with Spring Android RestTemplate?

The current Spring Android documentation says in section 2.2.2: RestTemplate supports sending and receiving data encoded with gzip compression. However, this document explains in section 2.7.2 how to receive Gzip data, but there is nothing about…
clemp6r
  • 3,665
  • 2
  • 26
  • 31
3
votes
1 answer

Best way to handle 401 errors with spring android

I have an android app which uses the spring android library to communicate with my restful api. I'm not sure how to handle the scenario when the token for my client expires. What I'd like to to is to capture any 401 error and simply fetch a new…
bmurmistro
  • 1,070
  • 1
  • 16
  • 35
3
votes
1 answer

Create Android REST multipart request with one part image and one part json

I have a problem creating Multipart request with Rest template, spring-android and annotations. I have found many examples of using Multipart to upload image or String objects but I can't find any solution on implementing request that is one part…
tibortru
  • 692
  • 5
  • 26
3
votes
3 answers

Empty json data in Release build (using proguard)

My app doesn't post data to server when I run the release version (signed, Proguard packed). But if I run it directly from ADT, I see the data on the server. It's weird because it just the same code, one is signed and the other is direct execution.…
vijay
  • 831
  • 9
  • 14
3
votes
1 answer

How should I put json in GET request?

I want to implement GET request by spring for android. I do not know how should put json in the url for that. The url is: context.getString(R.string.url) + "services/promotions?limit=10&where={expiredAt:{$gte: \""+getCurrentDate()+"\"}}"; that I…
Misagh Aghakhani
  • 1,023
  • 2
  • 13
  • 29
2
votes
0 answers

Special character \x100E gets stripped while encoding android

I am working on US Drivers License string. I get that string from manatee scanning sdk The license string starts with format @\n\x001E\rANSI 63601... while encoding it to json (json encoding is done internally by spring framework) the special…
Umair
  • 400
  • 5
  • 19
2
votes
1 answer

Multiple dex files define Lorg/springframework/http/ContentCodingType$1

I test androidannotations framework, but have some error when I add spring-android libs. I create repo for my test project open_git_repo ! At this moment, I have in gradle console AGPBI: {"kind":"SIMPLE","text":"UNEXPECTED TOP-LEVEL…
Max Bykov
  • 53
  • 7
2
votes
0 answers

RestTemplate with ClientHttpRequestInterceptor causes GZIP compression twice

I am using a ClientHttpRequestInterceptor to add a Basic Authorization header to every request made by the RestTemplate in my Android project. I am also compressing the request body by setting the Content-Encoding header to "gzip" Adding an…
Stoozi
  • 114
  • 1
  • 10
2
votes
1 answer

GsonBuilder registerTypeAdapter deserialization

I am having the following rest template (used for json requests to a server): public RestTemplate createRestTemplate() { RestTemplate restTemplate = new RestTemplate(); GsonBuilder builder = new GsonBuilder(); …
frek13
  • 162
  • 3
  • 8
2
votes
1 answer

is Spring for android useful?

a little question about the project of spring for android. I have to develop an android app that use RESTful Service on a Spring developed server. Now it is useful to start with spring for android? Has this project a future? Because the last…
code4fun
  • 1,012
  • 3
  • 24
  • 41
2
votes
3 answers

Spring (for Android) and Jackson2: PUT as application/x-www-form-urlencoded

I am somewhat new to HTTP REST operations on Android, and a server I am working with uses PUT commands to process updates. I am having a difficult time using Spring (for Android) with Jackson2. The server doesn't seem to work with application/json…
Mgamerz
  • 2,872
  • 2
  • 27
  • 48
2
votes
2 answers

How to send POST request from Android app to Rails application?

I have problem with sending POST request to my rails application from Android app (using Spring for Android) I have following Rails controller: # POST /users # POST /users.json def create @user = User.new(user_params) respond_to do |format| …
Bart
  • 294
  • 1
  • 2
  • 10
2
votes
3 answers

restTemplate ResourceAccessException on server reboot

I'm using restTemplate (from the spring android framework) on my android application to contact a rest server with post, i'm using an AsyncTask to send the request and two classes Request and Response which are POJOs send in Json form. public class…
aveuiller
  • 1,511
  • 1
  • 10
  • 25
1
vote
0 answers

MappingJacksonValue class is missing in [spring-android-rest-template]

I have a desktop app. Before, I wrote some utility classes for working with my REST endpoint via spring-webmvc RestTemplate dependency. Now I decide to use the same utility classes in my android app. As you know, in android app you cannot use…
Mehdi
  • 3,795
  • 3
  • 36
  • 65
1
vote
1 answer

java.lang.NoClassDefFoundError: org.springframework.web.client.RestTemplate

I am getting below error when i use resttemplate in my android application.I am getting this error when i use resttemplate in my code. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lss.loop, PID: 17285 …
KJEjava48
  • 1,967
  • 7
  • 40
  • 69