|
|
@ -47,7 +47,6 @@ import android.widget.ListAdapter;
|
|
|
|
import android.widget.ListView;
|
|
|
|
import android.widget.ListView;
|
|
|
|
import android.widget.PopupWindow.OnDismissListener;
|
|
|
|
import android.widget.PopupWindow.OnDismissListener;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.timsu.astrid.R;
|
|
|
|
import com.timsu.astrid.R;
|
|
|
|
import com.todoroo.andlib.service.Autowired;
|
|
|
|
import com.todoroo.andlib.service.Autowired;
|
|
|
@ -132,12 +131,22 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
public static final String TASK_RABBIT_TOKEN = "task_rabbit_token"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_TOKEN = "task_rabbit_token"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
private static final String TASK_RABBIT_POPOVER_PREF = "task_rabbit_popover"; //$NON-NLS-1$
|
|
|
|
private static final String TASK_RABBIT_POPOVER_PREF = "task_rabbit_popover"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
private static final String TASK_RABBIT_PREF_CITY_NAME = "task_rabbit_city_name"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
private static final String TASK_RABBIT_PREF_CITY_ID = "task_rabbit_city_id"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
private static final String TASK_RABBIT_PREF_CITY_LAT = "task_rabbit_city_lat"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
private static final String TASK_RABBIT_PREF_CITY_LNG = "task_rabbit_city_lng"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final String CITY_NAME = "name"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
public static final String CITY_LAT = "lat"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
public static final String CITY_LNG = "lng"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
public static final String LOCATION_CONTAINER = "other_locations_attributes"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
// Non-production values
|
|
|
|
// Non-production values
|
|
|
|
public static final String TASK_RABBIT_URL = "http://rs-astrid-api.taskrabbit.com"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_URL = "http://rs-astrid-api.taskrabbit.com"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_CLIENT_ID = "fDTmGeR0uNCvoxopNyqsRWae8xOvbOBqC7jmHaxv"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_CLIENT_ID = "fDTmGeR0uNCvoxopNyqsRWae8xOvbOBqC7jmHaxv"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_CLIENT_APPLICATION_ID = "XBpKshU8utH5eaNmhky9N8aAId5rSLTh04Hi60Co"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_CLIENT_APPLICATION_ID = "XBpKshU8utH5eaNmhky9N8aAId5rSLTh04Hi60Co"; //$NON-NLS-1$
|
|
|
|
public static final String CITY_NAME = "task_rabbit_city_name"; //$NON-NLS-1$
|
|
|
|
public static final String TASK_RABBIT_ID = "id"; //$NON-NLS-1$
|
|
|
|
private TaskRabbitTaskContainer taskRabbitTask;
|
|
|
|
private TaskRabbitTaskContainer taskRabbitTask;
|
|
|
|
|
|
|
|
|
|
|
|
/* From tag settings */
|
|
|
|
/* From tag settings */
|
|
|
@ -290,7 +299,7 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
TaskRabbitNameControlSet descriptionControlSet = new TaskRabbitNameControlSet(this,
|
|
|
|
TaskRabbitNameControlSet descriptionControlSet = new TaskRabbitNameControlSet(this,
|
|
|
|
R.layout.control_set_notes, R.layout.task_rabbit_row_description, titleID, i);
|
|
|
|
R.layout.control_set_notes, R.layout.task_rabbit_row_description, titleID, i);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
descriptionControlSet.readFromModel(new JSONObject().put("description", model.getValue(Task.NOTES)), "description", currentSelectedItem);
|
|
|
|
descriptionControlSet.readFromModel(new JSONObject().put(getString(arrayID), model.getValue(Task.NOTES)), getString(arrayID), currentSelectedItem);
|
|
|
|
} catch (JSONException e) {
|
|
|
|
} catch (JSONException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -301,11 +310,6 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
controls.add(set);
|
|
|
|
controls.add(set);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
if(TextUtils.isEmpty(taskDescription.getText())){
|
|
|
|
|
|
|
|
taskDescription.setText(model.getValue(Task.NOTES));
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
if(TextUtils.isEmpty(taskTitle.getText())) {
|
|
|
|
if(TextUtils.isEmpty(taskTitle.getText())) {
|
|
|
|
taskTitle.setText(model.getValue(Task.TITLE));
|
|
|
|
taskTitle.setText(model.getValue(Task.TITLE));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -431,7 +435,7 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(taskRabbitTask.getTaskID() != TaskRabbitTaskContainer.NO_ID) {
|
|
|
|
if(taskRabbitTask.getTaskID() != TaskRabbitTaskContainer.NO_ID) {
|
|
|
|
taskButton.setText("Already Posted!");
|
|
|
|
taskButton.setText(getString(R.string.tr_button_already_posted));
|
|
|
|
taskButton.setEnabled(false);
|
|
|
|
taskButton.setEnabled(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
@ -467,21 +471,21 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String descriptionKey = getString(R.string.tr_set_key_description);
|
|
|
|
String descriptionKey = getString(R.string.tr_set_key_description);
|
|
|
|
String category = "Category: " + menuTitle.getText().toString() + "\n";
|
|
|
|
String category = String.format("Category: %S\n", menuTitle.getText().toString()); //$NON-NLS-1$
|
|
|
|
parameters.put(descriptionKey, category);
|
|
|
|
parameters.put(descriptionKey, category);
|
|
|
|
for (int i = 0; i < controls.size(); i++) {
|
|
|
|
for (int i = 0; i < controls.size(); i++) {
|
|
|
|
if (presetValues[i] == -1) continue;
|
|
|
|
if (presetValues[i] == -1) continue;
|
|
|
|
TaskRabbitSetListener set = controls.get(i);
|
|
|
|
TaskRabbitSetListener set = controls.get(i);
|
|
|
|
set.postToTaskRabbit(parameters, keys[i]);
|
|
|
|
set.postToTaskRabbit(parameters, keys[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (parameters.optJSONArray("other_locations_attributes") == null) {
|
|
|
|
if (parameters.optJSONArray(LOCATION_CONTAINER) == null) {
|
|
|
|
parameters.put(getString(R.string.tr_attr_city_id), Preferences.getInt("task_rabbit_city_id", 1));
|
|
|
|
parameters.put(getString(R.string.tr_attr_city_id), Preferences.getInt(TASK_RABBIT_PREF_CITY_ID, 1));
|
|
|
|
parameters.put(getString(R.string.tr_attr_city_lat), true);
|
|
|
|
parameters.put(getString(R.string.tr_attr_city_lat), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
parameters.put(getString(R.string.tr_set_key_name), taskTitle.getText().toString());
|
|
|
|
parameters.put(getString(R.string.tr_set_key_name), taskTitle.getText().toString());
|
|
|
|
parameters.put(getString(R.string.tr_set_key_name), taskTitle.getText().toString());
|
|
|
|
parameters.put(getString(R.string.tr_set_key_name), taskTitle.getText().toString());
|
|
|
|
|
|
|
|
|
|
|
|
return new JSONObject().put("task", parameters);
|
|
|
|
return new JSONObject().put("task", parameters); //$NON-NLS-1$
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -516,7 +520,10 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ProgressDialog progressDialog;
|
|
|
|
private ProgressDialog progressDialog;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("nls")
|
|
|
|
protected void submitTaskRabbit(){
|
|
|
|
protected void submitTaskRabbit(){
|
|
|
|
|
|
|
|
|
|
|
|
if(!Preferences.isSet(TASK_RABBIT_TOKEN)){
|
|
|
|
if(!Preferences.isSet(TASK_RABBIT_TOKEN)){
|
|
|
@ -535,18 +542,16 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String urlCall = "tasks/";
|
|
|
|
String urlCall = "tasks/";
|
|
|
|
if (taskRabbitTask.getTaskID() > 0) urlCall += taskRabbitTask.getTaskID();
|
|
|
|
if (taskRabbitTask.getTaskID() > 0) urlCall += taskRabbitTask.getTaskID();
|
|
|
|
urlCall +="?client_id=" + TASK_RABBIT_CLIENT_ID;
|
|
|
|
urlCall += String.format("?client_id=%S&client_application=%S", TASK_RABBIT_CLIENT_ID, TASK_RABBIT_CLIENT_APPLICATION_ID);
|
|
|
|
Log.d("Tasks url:", taskRabbitURL(urlCall));
|
|
|
|
Header authorization = new BasicHeader("Authorization", "OAuth" + Preferences.getStringValue(TASK_RABBIT_TOKEN));
|
|
|
|
Header authorization = new BasicHeader("Authorization", "OAuth " + Preferences.getStringValue(TASK_RABBIT_TOKEN)); //$NON-NLS-1$
|
|
|
|
Header contentType = new BasicHeader("Content-Type", "application/json");
|
|
|
|
Header contentType = new BasicHeader("Content-Type", //$NON-NLS-1$
|
|
|
|
|
|
|
|
"application/json"); //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String response = restClient.post(taskRabbitURL(urlCall), getTaskBody(), contentType, authorization);
|
|
|
|
String response = restClient.post(taskRabbitURL(urlCall), getTaskBody(), contentType, authorization);
|
|
|
|
Log.d("Task rabbit response", response);
|
|
|
|
Log.d("Task rabbit response", response);
|
|
|
|
JSONObject taskResponse = new JSONObject(response);
|
|
|
|
JSONObject taskResponse = new JSONObject(response);
|
|
|
|
if(taskResponse.has("id")){
|
|
|
|
if(taskResponse.has(TASK_RABBIT_ID)){
|
|
|
|
taskRabbitTask.setRemoteTaskData(response);
|
|
|
|
taskRabbitTask.setRemoteTaskData(response);
|
|
|
|
taskRabbitTask.setTaskID(taskResponse.optString("id"));
|
|
|
|
taskRabbitTask.setTaskID(taskResponse.optString(TASK_RABBIT_ID));
|
|
|
|
Message successMessage = new Message();
|
|
|
|
Message successMessage = new Message();
|
|
|
|
successMessage.what = 1;
|
|
|
|
successMessage.what = 1;
|
|
|
|
handler.sendMessage(successMessage);
|
|
|
|
handler.sendMessage(successMessage);
|
|
|
@ -575,7 +580,6 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
taskRabbitTask.setLocalTaskData(serializeToJSON().toString());
|
|
|
|
taskRabbitTask.setLocalTaskData(serializeToJSON().toString());
|
|
|
|
} catch (JSONException e) {
|
|
|
|
} catch (JSONException e) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -583,15 +587,6 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* message callbacks */
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Show toast for task edit canceling
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private void showSuccessToast() {
|
|
|
|
|
|
|
|
Toast.makeText(this, "Task posted to Task Rabbit successfully!",
|
|
|
|
|
|
|
|
Toast.LENGTH_SHORT).show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final Handler handler = new Handler() {
|
|
|
|
private final Handler handler = new Handler() {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -600,9 +595,9 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
case -1:
|
|
|
|
case -1:
|
|
|
|
|
|
|
|
|
|
|
|
AlertDialog.Builder adb = new AlertDialog.Builder(TaskRabbitActivity.this);
|
|
|
|
AlertDialog.Builder adb = new AlertDialog.Builder(TaskRabbitActivity.this);
|
|
|
|
adb.setTitle("Error posting task");
|
|
|
|
adb.setTitle(getString(R.string.tr_alert_title_fail));
|
|
|
|
adb.setMessage("Please try again");
|
|
|
|
adb.setMessage(getString(R.string.tr_alert_message_fail));
|
|
|
|
adb.setPositiveButton("Close",null);
|
|
|
|
adb.setPositiveButton(getString(R.string.tr_alert_button_fail),null);
|
|
|
|
adb.show();
|
|
|
|
adb.show();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 0: break;
|
|
|
|
case 0: break;
|
|
|
@ -624,12 +619,11 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
Intent intent = new Intent(this,
|
|
|
|
Intent intent = new Intent(this,
|
|
|
|
OAuthLoginActivity.class);
|
|
|
|
OAuthLoginActivity.class);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String url = TASK_RABBIT_URL + "/api/authorize?client_id=" + TASK_RABBIT_CLIENT_ID;
|
|
|
|
String url = TASK_RABBIT_URL + "/api/authorize?client_id=" + TASK_RABBIT_CLIENT_ID; //$NON-NLS-1$
|
|
|
|
intent.putExtra(OAuthLoginActivity.URL_TOKEN, url);
|
|
|
|
intent.putExtra(OAuthLoginActivity.URL_TOKEN, url);
|
|
|
|
this.startActivityForResult(intent, REQUEST_CODE_TASK_RABBIT_OAUTH);
|
|
|
|
this.startActivityForResult(intent, REQUEST_CODE_TASK_RABBIT_OAUTH);
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.ACTFM_LOGIN_GL_START);
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.ACTFM_LOGIN_GL_START);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
// handleError(e);
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -648,17 +642,18 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("nls")
|
|
|
|
private void buildAlertMessageNoGps() {
|
|
|
|
private void buildAlertMessageNoGps() {
|
|
|
|
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
|
|
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
|
|
builder.setMessage("GPS needs to be enabled in order to add location based tasks. Do you want to enable it?")
|
|
|
|
builder.setMessage(getString(R.string.tr_alert_gps_title))
|
|
|
|
.setCancelable(false)
|
|
|
|
.setCancelable(false)
|
|
|
|
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
|
|
|
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
|
|
|
public void onClick(@SuppressWarnings("unused") final DialogInterface dialog, @SuppressWarnings("unused") final int id) {
|
|
|
|
public void onClick(final DialogInterface dialog, final int id) {
|
|
|
|
startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
|
|
|
|
startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
|
|
|
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
|
|
|
public void onClick(final DialogInterface dialog, @SuppressWarnings("unused") final int id) {
|
|
|
|
public void onClick(final DialogInterface dialog, final int id) {
|
|
|
|
dialog.cancel();
|
|
|
|
dialog.cancel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -669,40 +664,39 @@ public class TaskRabbitActivity extends FragmentActivity implements LocationList
|
|
|
|
|
|
|
|
|
|
|
|
protected void saveUserInfo(String response) throws Exception {
|
|
|
|
protected void saveUserInfo(String response) throws Exception {
|
|
|
|
JSONObject userObject = new JSONObject(response);
|
|
|
|
JSONObject userObject = new JSONObject(response);
|
|
|
|
JSONObject cityObject = userObject.getJSONObject("city");
|
|
|
|
JSONObject cityObject = userObject.getJSONObject("city"); //$NON-NLS-1$
|
|
|
|
if (cityObject.has("name")){
|
|
|
|
if (cityObject.has(CITY_NAME)){
|
|
|
|
Preferences.setString("task_rabbit_city_name", cityObject.getString("name"));
|
|
|
|
Preferences.setString(TASK_RABBIT_PREF_CITY_NAME, cityObject.getString(CITY_NAME));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cityObject.has("id")){
|
|
|
|
if (cityObject.has(TASK_RABBIT_ID)){
|
|
|
|
Preferences.setInt("task_rabbit_city_id", cityObject.getInt("id"));
|
|
|
|
Preferences.setInt(TASK_RABBIT_PREF_CITY_ID, cityObject.getInt(TASK_RABBIT_ID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cityObject.has("lat")){
|
|
|
|
if (cityObject.has(CITY_LAT)){
|
|
|
|
// currentLocation.setLatitude(cityObject.getDouble("lat"));
|
|
|
|
Preferences.setString(TASK_RABBIT_PREF_CITY_LAT, String.valueOf(cityObject.getDouble(CITY_LAT)));
|
|
|
|
Preferences.setString("task_rabbit_city_lat", String.valueOf(cityObject.getDouble("lat")));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cityObject.has("lng")){
|
|
|
|
if (cityObject.has(CITY_LNG)){
|
|
|
|
// currentLocation.setLongitude(cityObject.getDouble("lng"));
|
|
|
|
Preferences.setString(TASK_RABBIT_PREF_CITY_LNG, String.valueOf(cityObject.getDouble(CITY_LNG)));
|
|
|
|
Preferences.setString("task_rabbit_city_lng", String.valueOf(cityObject.getDouble("lng")));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String taskRabbitURL(String method) {
|
|
|
|
private String taskRabbitURL(String method) {
|
|
|
|
return TASK_RABBIT_URL + "/api/v1/"+ method;
|
|
|
|
return TASK_RABBIT_URL + "/api/v1/"+ method; //$NON-NLS-1$
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onActivityResult (int requestCode, int resultCode, Intent data) {
|
|
|
|
public void onActivityResult (int requestCode, int resultCode, Intent data) {
|
|
|
|
Log.d("The actiivty result request code", "Rerjwklrw" + requestCode);
|
|
|
|
|
|
|
|
if (requestCode == REQUEST_CODE_TASK_RABBIT_OAUTH && resultCode == Activity.RESULT_OK){
|
|
|
|
if (requestCode == REQUEST_CODE_TASK_RABBIT_OAUTH && resultCode == Activity.RESULT_OK){
|
|
|
|
String result = data.getStringExtra(OAuthLoginActivity.DATA_RESPONSE);
|
|
|
|
String result = data.getStringExtra(OAuthLoginActivity.DATA_RESPONSE);
|
|
|
|
if(result.contains("access_token=")) {
|
|
|
|
|
|
|
|
|
|
|
|
String key = "access_token"; //$NON-NLS-1$
|
|
|
|
|
|
|
|
if(result.contains(key)) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
result = result.substring(result.indexOf("access_token=")+"access_token=".length());
|
|
|
|
|
|
|
|
|
|
|
|
result = result.substring(result.indexOf(key)+key.length());
|
|
|
|
Preferences.setString(TASK_RABBIT_TOKEN, result);
|
|
|
|
Preferences.setString(TASK_RABBIT_TOKEN, result);
|
|
|
|
String response = restClient.get(taskRabbitURL("account"));
|
|
|
|
String response = restClient.get(taskRabbitURL("account")); //$NON-NLS-1$
|
|
|
|
Log.d("Task rabbit response", response);
|
|
|
|
|
|
|
|
saveUserInfo(response);
|
|
|
|
saveUserInfo(response);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e){
|
|
|
|
catch (Exception e){
|
|
|
|