>
+                            Preferences.getInstance(context).setGatherTime(TimeUtils.getStandardTimeInMiliSec(gatherTimeStr)+30*60*1000);
150 147
                             String endTimeStr = group.getString("ended_at");
151 148
                             Preferences.getInstance(context).setTourEndTime(TimeUtils.getStandardTimeInMiliSec(endTimeStr));
152 149
                             if(group.has("gather_location")){
@@ -202,7 +199,7 @@ public class MyLocationService extends Service implements Handler.Callback{
202 199
             }
203 200
             double lat = loc.getLatitude();
204 201
             double lon = loc.getLongitude();
205
-            LogHelper.dfile("czy","经纬度 lat = "+lat+"lon="+lon+" 位置 ="+loc.getAddress());
202
+            LogHelper.d(TAG,"上报经纬度 lat = "+lat+"lon="+lon+" 位置 ="+loc.getAddress());
206 203
             reportLocationWhenTourMode(lat,lon);
207 204
         }
208 205
     };
@@ -211,9 +208,11 @@ public class MyLocationService extends Service implements Handler.Callback{
211 208
     private void startLocation(){
212 209
         initLocation();
213 210
         if(Preferences.getInstance(this).isTourMode()){
211
+            LogHelper.d(TAG,"当前是旅行模式,开始定位");
214 212
             locationClient.setLocationOption(locationOption);
215 213
             locationClient.startLocation();
216 214
             if(Preferences.getInstance(this).getGatherTime()> System.currentTimeMillis()){
215
+                LogHelper.d(TAG,"当前是旅行模式,且存在集合时间,预约下一次定位");
217 216
                 mHandler.sendEmptyMessageDelayed(MSG_START_LOCATION,Preferences.getInstance(this)
218 217
                         .getGatherTime()-System.currentTimeMillis()>LOCATION_PERIOD_CHANGE_DEADLINE ? LOCATION_MAX_PERIOD:LOCATION_MIN_PERIOD);
219 218
             }
@@ -235,7 +234,7 @@ private void reportLocationWhenTourMode(double lat, double lon){
235 234
     if(locationClient!=null){
236 235
         locationClient.stopLocation();
237 236
     }
238
-    if(lat == lastLat && lon ==lastLon && repeatTime<5){
237
+    if(lat == lastLat && lon ==lastLon && repeatTime<2){
239 238
         repeatTime++;
240 239
         return;
241 240
     }

+ 1 - 1
build.gradle

@@ -4,7 +4,7 @@ buildscript {
4 4
         jcenter()
5 5
     }
6 6
     dependencies {
7
-        classpath 'com.android.tools.build:gradle:2.3.0'
7
+        classpath 'com.android.tools.build:gradle:2.3.1'
8 8
 
9 9
         // NOTE: Do not place your application dependencies here; they belong
10 10
         // in the individual module build.gradle files

kodo - Gogs: Go Git Service

Sin Descripción

Brightcells: 212e3994d1 MP verify file %!s(int64=9) %!d(string=hace) años
..
JQ8Eskhrjp.txt 25cce5e3b1 Add qrcodejump verify file %!s(int64=9) %!d(string=hace) años
MP_verify_vEq7hPudfncXpZ57.txt 212e3994d1 MP verify file %!s(int64=9) %!d(string=hace) años