Created
March 18, 2014 17:41
-
-
Save jtomasrl/9625206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String header = Settings.PREFERENCES.getString(Settings.PHONE_PREF, null)+ ":"+ Settings.PREFERENCES.getString(Settings.PASSWORD_PREF, null); | |
Log.i("header" , header); | |
byte[] data64 = null; | |
try { | |
data64 = header.getBytes("UTF-8"); | |
} catch (UnsupportedEncodingException e) { | |
e.printStackTrace(); | |
} | |
JSONObject json = new JSONObject(); | |
try { | |
String datos = seleccion; | |
json.put("number", datos); //enviar string transformado | |
json.put("auth_token", Settings.PREFERENCES.getString(Settings.USER_AUTH_TOKEN, null)); | |
Log.i("Datos-QR", datos); | |
} catch (JSONException e) { | |
e.printStackTrace(); | |
} | |
String auth = Base64.encodeBytes(data64); | |
Log.i("URL NUMERO MESA", UrlApi.URL_BASE+ UrlApi.URL_CHECKIN+ Settings.PREFERENCES.getString(Settings.MODEL_PREF, null)); | |
String response = RequestMethods.doMethodsWithResponse(UrlApi.URL_BASE+ UrlApi.URL_CHECKIN+ Settings.PREFERENCES.getString(Settings.MODEL_PREF, null), httpClient, json, "POST"); | |
Log.i("Response Principal", response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment