@@ -96,7 +96,9 @@ public void run() {
96
96
while (true ) {
97
97
try {
98
98
Thread .sleep (TIME_DELAYED );
99
- startService (intent );
99
+
100
+ Intent s = new Intent (UpLoadService .this , UpLoadService .class );
101
+ startService (s );
100
102
} catch (InterruptedException e ) {
101
103
e .printStackTrace ();
102
104
}
@@ -126,15 +128,23 @@ private boolean request(WebServiceCall call, ImageHelp imageHelp, ImageInfo imag
126
128
call .request .addProperty (GlobalConfig .PHONE_TAG , phoneId ); //手机串号
127
129
call .request .addProperty (GlobalConfig .NFC_TAG , imageInfo .getNfcCode ());
128
130
call .request .addProperty (GlobalConfig .IMAGE , image );
129
- call .request .addProperty (GlobalConfig .IMAGE_NAME , imageInfo .getName ());
131
+ call .request .addProperty (GlobalConfig .IMAGE_NAME , imageInfo .getName () + ".jpg" );
130
132
call .request .addProperty (GlobalConfig .IMAGE_TIME , imageHelp .getTimeFromName (imageInfo .getName ()));
131
- call .request .addProperty (GlobalConfig .MAX_TEMP , imageInfo .getMaxTemp ());
133
+ int maxTempDot = imageInfo .getMaxTemp ().indexOf ("." ) + 3 ;
134
+ call .request .addProperty (GlobalConfig .MAX_TEMP , imageInfo .getMaxTemp ().substring (0 , maxTempDot ));
132
135
call .request .addProperty (GlobalConfig .MAX_TEMP_X , imageInfo .getMaxTempX ());
133
136
call .request .addProperty (GlobalConfig .MAX_TEMP_Y , imageInfo .getMaxTempY ());
134
- call .request .addProperty (GlobalConfig .AVERAGE_TEMP , imageInfo .getAverTemp ());
137
+ int averTempDot = imageInfo .getAverTemp ().indexOf ("." ) + 3 ;
138
+ call .request .addProperty (GlobalConfig .AVERAGE_TEMP , imageInfo .getAverTemp ().substring (0 , averTempDot ));
139
+ call .request .addProperty (GlobalConfig .TELELONG , "90" );
140
+ call .request .addProperty (GlobalConfig .TELELAT , "90" );
141
+
142
+ Log .i ("temp" , imageInfo .getMaxTemp ().substring (0 , maxTempDot ));
143
+ Log .i ("temp11" , imageInfo .getMaxTemp ());
135
144
136
145
try {
137
146
String result = webServiceCall .callWebMethod ().toString ();
147
+ Log .i ("upload" , result );
138
148
int result_code = Integer .parseInt (result );
139
149
if (result_code > 0 ) {
140
150
isSuccess = true ;
@@ -165,6 +175,8 @@ private boolean request(WebServiceCall call, ImageHelp imageHelp, ImageInfo imag
165
175
@ Override
166
176
public void onDestroy () {
167
177
super .onDestroy ();
178
+
179
+ Log .i ("temp" , "UpLoadService onDestroy" );
168
180
}
169
181
170
182
@ Override
0 commit comments