3; protected boolean parseResponse(String response) {
+ orderBean = new OrderBean();
- @Override
- public void onPhotoUploadSucceed(PhotoBean bean) {
- if(bean.equals(currentPhoto)){
- currentPhoto.uploadStatus = PhotoBean.UploadStatus.STATUS_SUCCESS;
- DBService.getInstance().updatePhotoBean(currentPhoto);
- if(listener!=null){
- listener.onPhotoUploaded(currentPhoto);
+ return super.parseResponse(response);
}
- currentPhoto = null;
- }
- startUpload();
- }
- @Override
- public void onPhotoUploadFail(PhotoBean bean) {
- if(bean.equals(currentPhoto)){
- currentPhoto.uploadStatus = PhotoBean.UploadStatus.STATUS_ERROR;
- DBService.getInstance().updatePhotoBean(currentPhoto);
- if(listener!=null){
- listener.onPhotoUploadError(currentPhoto);
+ @Override
+ protected void onPostSuccess() {
+ super.onPostSuccess();
+ onNewOrderArrived(orderBean);
}
- currentPhoto = null;
- }
- startUpload();
- }
- public void setPhotoUploadListener(PhotoUploadListener listener){
- this.listener = listener;
+ @Override
+ protected void onPostFail() {
+ super.onPostFail();
+ }
+ }.executeOnExecutor(ThreadExecutor.getInstance().getExecutor());
+
}
- public interface PhotoUploadListener{
- void onPhotoUploaded(PhotoBean bean);
- void onPhotoUploadError(PhotoBean bean);
+ private void onNewOrderArrived(OrderBean bean){
+
}
- public class MyBinder extends Binder {
+ public class OrderServiceBinder extends Binder {
public OrderDealService getService(){
return OrderDealService.this;
@@ -37,6 +37,7 @@ public class UrlContainer {
|
||
| 37 | 37 |
|
| 38 | 38 |
public static final String BRIEFS_URL = HOST_URL+"l/brief"; |
| 39 | 39 |
|
| 40 |
+ public static final String QUERY_ORDER_URL = HOST_URL+"l/query"; |
|
| 40 | 41 |
|
| 41 | 42 |
|
| 42 | 43 |
} |