Problem with WebService request

Problem with WebService request

by Ivan Aibar Romero -
Number of replies: 1

Hi!

I'm developing an Android app and i'm having problems when I pass the user's token to the request from the SharedPrefences on Android. This problem is solved if I create a string typed by myself of the token I wanna pass. I'm assuming that the String obtained from SharedPreferences has some hidden chars that I can't erase (I tried trim() and removing linebreaks) and it's causing the trouble.

Is there any way to solve that?

Here's the code snippet:

String sd = b.getString("tk");
String token = prefs.getString(sd, "DFKDFK");          
result = null;
String serverurl = dominioM + "/webservice/xmlrpc/server.php" + "?wstoken=" + token;
uri = URI.create(serverurl);
XMLRPCClient client = new XMLRPCClient(uri);

Average of ratings: -