|
|
@@ -24,6 +24,7 @@ public class DataProvider {
|
|
|
// region URL
|
|
|
|
|
|
private static final String URL_PULL_NOTIFICATION = "http://192.168.1.151:8080/MyWeb/Test";
|
|
|
+ private static final String URL_UPLOAD_DEVICEID = "";
|
|
|
|
|
|
// endregion
|
|
|
|
|
|
@@ -221,5 +222,31 @@ public class DataProvider {
|
|
|
}, null);
|
|
|
}
|
|
|
|
|
|
+ public static void uploadDeviceId() {
|
|
|
+
|
|
|
+ if (ApexCRMApp.sharedCRM().isLogin()) {
|
|
|
+
|
|
|
+ final String deviceId = RAUtil.getDeviceId(ApexCRMApp.sharedCRM().getApplicationContext());
|
|
|
+
|
|
|
+ OperationQueue.sharedQueue().addOperationTask(new OperationQueue.OperationBackgroundCallBack() {
|
|
|
+ @Override
|
|
|
+ public Object operationDoInBackground() {
|
|
|
+
|
|
|
+ Bundle params = new Bundle();
|
|
|
+ params.putString("token", deviceId);
|
|
|
+ getJson(URL_UPLOAD_DEVICEID, params);
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ }, new OperationQueue.OperationCompletionCallBack() {
|
|
|
+ @Override
|
|
|
+ public void operationCompletion(Object object) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// end region
|
|
|
}
|