升级地图
This commit is contained in:
parent
9dca2eb1cc
commit
a210905cca
@ -70,6 +70,9 @@ dependencies {
|
|||||||
implementation project(':cm_utils')
|
implementation project(':cm_utils')
|
||||||
implementation project(':camera')
|
implementation project(':camera')
|
||||||
//百度地图
|
//百度地图
|
||||||
|
// implementation 'com.baidu.lbsyun:BaiduMapSDK_Map:7.6.2'
|
||||||
|
// implementation 'com.baidu.lbsyun:BaiduMapSDK_Location_All:9.6.4'
|
||||||
|
// implementation "com.baidu.lbsyun:BaiduMapSDK_Util:7.6.2"
|
||||||
implementation files('libs/BaiduLBS_Android.jar')
|
implementation files('libs/BaiduLBS_Android.jar')
|
||||||
implementation files('libs/IndoorscapeAlbumPlugin.jar')
|
implementation files('libs/IndoorscapeAlbumPlugin.jar')
|
||||||
//极光推送
|
//极光推送
|
||||||
|
BIN
app/libs/BaiduLBS_Android.jar
Executable file → Normal file
BIN
app/libs/BaiduLBS_Android.jar
Executable file → Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/arm64-v8a/libBaiduMapSDK_base_v7_6_2.so
Normal file
BIN
app/libs/arm64-v8a/libBaiduMapSDK_base_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/arm64-v8a/libBaiduMapSDK_map_v7_6_2.so
Normal file
BIN
app/libs/arm64-v8a/libBaiduMapSDK_map_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/arm64-v8a/libc++_shared.so
Normal file
BIN
app/libs/arm64-v8a/libc++_shared.so
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/libindoor.so
Executable file → Normal file
BIN
app/libs/arm64-v8a/libindoor.so
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/arm64-v8a/liblocSDK8b.so
Normal file
BIN
app/libs/arm64-v8a/liblocSDK8b.so
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/libtiny_magic.so
Normal file
BIN
app/libs/arm64-v8a/libtiny_magic.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_base_v7_6_2.so
Normal file
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_base_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_map_v7_6_2.so
Normal file
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_map_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/armeabi-v7a/libc++_shared.so
Normal file
BIN
app/libs/armeabi-v7a/libc++_shared.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/libindoor.so
Executable file → Normal file
BIN
app/libs/armeabi-v7a/libindoor.so
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/armeabi-v7a/liblocSDK8b.so
Normal file
BIN
app/libs/armeabi-v7a/liblocSDK8b.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/libtiny_magic.so
Normal file
BIN
app/libs/armeabi-v7a/libtiny_magic.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86/libBaiduMapSDK_base_v7_6_2.so
Normal file
BIN
app/libs/x86/libBaiduMapSDK_base_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86/libBaiduMapSDK_map_v7_6_2.so
Normal file
BIN
app/libs/x86/libBaiduMapSDK_map_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86/libc++_shared.so
Normal file
BIN
app/libs/x86/libc++_shared.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86/liblocSDK8b.so
Normal file
BIN
app/libs/x86/liblocSDK8b.so
Normal file
Binary file not shown.
BIN
app/libs/x86/libtiny_magic.so
Normal file
BIN
app/libs/x86/libtiny_magic.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86_64/libBaiduMapSDK_base_v7_6_2.so
Normal file
BIN
app/libs/x86_64/libBaiduMapSDK_base_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86_64/libBaiduMapSDK_map_v7_6_2.so
Normal file
BIN
app/libs/x86_64/libBaiduMapSDK_map_v7_6_2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86_64/libc++_shared.so
Normal file
BIN
app/libs/x86_64/libc++_shared.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/libs/x86_64/liblocSDK8b.so
Normal file
BIN
app/libs/x86_64/liblocSDK8b.so
Normal file
Binary file not shown.
BIN
app/libs/x86_64/libtiny_magic.so
Normal file
BIN
app/libs/x86_64/libtiny_magic.so
Normal file
Binary file not shown.
@ -10,8 +10,8 @@
|
|||||||
{
|
{
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"versionCode": 52,
|
"versionCode": 53,
|
||||||
"versionName": "1.5.2",
|
"versionName": "1.5.3",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -55,7 +55,6 @@ import com.sucstepsoft.realtimelocation.ScreenManager;
|
|||||||
import com.sucstepsoft.realtimelocation.activitys.addresslist.AddressListMainActivity;
|
import com.sucstepsoft.realtimelocation.activitys.addresslist.AddressListMainActivity;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.house.NewSearchHouseByPersonActivity;
|
import com.sucstepsoft.realtimelocation.activitys.census.house.NewSearchHouseByPersonActivity;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.house.NewSearchPersonByHouseActivity;
|
import com.sucstepsoft.realtimelocation.activitys.census.house.NewSearchPersonByHouseActivity;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.house.SearchPersonByHouseActivity;
|
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.BuildingViewPageActivity;
|
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.BuildingViewPageActivity;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewGroupHouseAddActivity;
|
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewGroupHouseAddActivity;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewRuleHouseAddActivity;
|
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewRuleHouseAddActivity;
|
||||||
@ -1620,26 +1619,30 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
|
locationOption.setIsNeedAltitude(false);
|
||||||
// locationOption.setLocationPurpose(LocationClientOption.BDLocationPurpose.SignIn);
|
// locationOption.setLocationPurpose(LocationClientOption.BDLocationPurpose.SignIn);
|
||||||
mLocationClient.setLocOption(locationOption);
|
mLocationClient.setLocOption(locationOption);
|
||||||
//开始定位
|
//开始定位
|
||||||
mLocationClient.start();
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -3,31 +3,23 @@ package com.sucstepsoft.realtimelocation.activitys.census.house;
|
|||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.baidu.location.BDAbstractLocationListener;
|
import com.baidu.location.BDAbstractLocationListener;
|
||||||
import com.baidu.location.BDLocation;
|
import com.baidu.location.BDLocation;
|
||||||
import com.baidu.location.LocationClient;
|
import com.baidu.location.LocationClient;
|
||||||
import com.baidu.location.LocationClientOption;
|
import com.baidu.location.LocationClientOption;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.sucstepsoft.cm_utils.constant.RegexConstants;
|
|
||||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
|
||||||
import com.sucstepsoft.cm_utils.utils.RegexUtils;
|
import com.sucstepsoft.cm_utils.utils.RegexUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
import com.sucstepsoft.realtimelocation.R;
|
import com.sucstepsoft.realtimelocation.R;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.base.MainActivity;
|
|
||||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueReportActivity;
|
|
||||||
import com.sucstepsoft.realtimelocation.activitys.issue.TakePointActivity;
|
import com.sucstepsoft.realtimelocation.activitys.issue.TakePointActivity;
|
||||||
import com.sucstepsoft.realtimelocation.beans.BuildingSaveBean;
|
import com.sucstepsoft.realtimelocation.beans.BuildingSaveBean;
|
||||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||||
@ -189,25 +181,29 @@ public class AddBuildingActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//开始定位
|
mLocationClient.setLocOption(locationOption);
|
||||||
mLocationClient.start();
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -4,8 +4,6 @@ import android.app.ProgressDialog;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
@ -14,7 +12,6 @@ import android.widget.TextView;
|
|||||||
import com.baidu.location.BDAbstractLocationListener;
|
import com.baidu.location.BDAbstractLocationListener;
|
||||||
import com.baidu.location.BDLocation;
|
import com.baidu.location.BDLocation;
|
||||||
import com.baidu.location.LocationClient;
|
import com.baidu.location.LocationClient;
|
||||||
import com.baidu.location.LocationClientOption;
|
|
||||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -26,7 +23,6 @@ import com.sucstepsoft.cm_utils.utils.UIUtil;
|
|||||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||||
import com.sucstepsoft.realtimelocation.R;
|
import com.sucstepsoft.realtimelocation.R;
|
||||||
import com.sucstepsoft.realtimelocation.activitys.issue.TakePointActivity;
|
import com.sucstepsoft.realtimelocation.activitys.issue.TakePointActivity;
|
||||||
import com.sucstepsoft.realtimelocation.beans.BuildingSaveBean;
|
|
||||||
import com.sucstepsoft.realtimelocation.beans.HouseSaveBean;
|
import com.sucstepsoft.realtimelocation.beans.HouseSaveBean;
|
||||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||||
import com.sucstepsoft.realtimelocation.beans.TypeUserBean;
|
import com.sucstepsoft.realtimelocation.beans.TypeUserBean;
|
||||||
@ -236,25 +232,11 @@ public class AddHouseActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
} catch (Exception e) {
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
throw new RuntimeException(e);
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
}
|
||||||
locationOption.setCoorType("bd09ll");
|
|
||||||
locationOption.setScanSpan(30 * 1000);
|
|
||||||
locationOption.setIsNeedAddress(true);
|
|
||||||
locationOption.setNeedDeviceDirect(false);
|
|
||||||
locationOption.setLocationNotify(false);
|
|
||||||
locationOption.setIgnoreKillProcess(true);
|
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
|
||||||
locationOption.SetIgnoreCacheException(false);
|
|
||||||
locationOption.setOpenGps(true);
|
|
||||||
locationOption.setIsNeedAltitude(false);
|
|
||||||
mLocationClient.setLocOption(locationOption);
|
|
||||||
//开始定位
|
|
||||||
mLocationClient.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -239,25 +239,29 @@ public class EditBuildingActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//开始定位
|
mLocationClient.setLocOption(locationOption);
|
||||||
mLocationClient.start();
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -107,33 +107,33 @@ public class EditHouseActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void getHouseDetail() {
|
private void getHouseDetail() {
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(LocationApiService.class)
|
.create(LocationApiService.class)
|
||||||
.getHouseDetailById(mId, UserLgUtils.getToken())
|
.getHouseDetailById(mId, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<BuildHouseDetailBean>() {
|
.subscribe(new Observer<BuildHouseDetailBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(BuildHouseDetailBean bean) {
|
public void onNext(BuildHouseDetailBean bean) {
|
||||||
mDetailBean = bean;
|
mDetailBean = bean;
|
||||||
//获取绑定的人员
|
//获取绑定的人员
|
||||||
setDataToView();
|
setDataToView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onError(Throwable e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkParams() {
|
private boolean checkParams() {
|
||||||
@ -215,11 +215,11 @@ public class EditHouseActivity extends BaseActivity {
|
|||||||
mLlTime.setVisibility(View.GONE);
|
mLlTime.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setTitleText("请选择")
|
.setTitleText("请选择")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mTypePicker.setPicker(mTypes);
|
mTypePicker.setPicker(mTypes);
|
||||||
mTypePicker.show();
|
mTypePicker.show();
|
||||||
}
|
}
|
||||||
@ -236,35 +236,35 @@ public class EditHouseActivity extends BaseActivity {
|
|||||||
ProgressDialog progressDialog = UIUtil.initDialog(EditHouseActivity.this, "修改中...");
|
ProgressDialog progressDialog = UIUtil.initDialog(EditHouseActivity.this, "修改中...");
|
||||||
progressDialog.show();
|
progressDialog.show();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(LocationApiService.class)
|
.create(LocationApiService.class)
|
||||||
.doUpdateHouse(mId, body, UserLgUtils.getToken())
|
.doUpdateHouse(mId, body, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SuccessBean>() {
|
.subscribe(new Observer<SuccessBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(SuccessBean s) {
|
public void onNext(SuccessBean s) {
|
||||||
setResult(123, new Intent());
|
setResult(123, new Intent());
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
ToastUtils.showShort("修改成功");
|
ToastUtils.showShort("修改成功");
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onError(Throwable e) {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,25 +297,30 @@ public class EditHouseActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//开始定位
|
mLocationClient.setLocOption(locationOption);
|
||||||
mLocationClient.start();
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
@ -381,12 +386,12 @@ public class EditHouseActivity extends BaseActivity {
|
|||||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||||
mTvTime.setText(mDateFormat.format(date));
|
mTvTime.setText(mDateFormat.format(date));
|
||||||
})
|
})
|
||||||
.setTitleText("请选日期")
|
.setTitleText("请选日期")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setType(new boolean[]{true, true, true, false, false, false})
|
.setType(new boolean[]{true, true, true, false, false, false})
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mTimePickerView.show();
|
mTimePickerView.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -799,25 +799,31 @@ public class WorkSignActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void startLocation() {
|
private void startLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setCoorType("bd09ll");
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setOpenGps(true);
|
||||||
//开始定位
|
locationOption.setIsNeedAltitude(false);
|
||||||
mLocationClient.start();
|
mLocationClient.setLocOption(locationOption);
|
||||||
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -260,25 +260,30 @@ public class TakePointActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//开始定位
|
mLocationClient.setLocOption(locationOption);
|
||||||
mLocationClient.start();
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -963,25 +963,30 @@ public class LocusMapActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//开始定位
|
mLocationClient.setLocOption(locationOption);
|
||||||
mLocationClient.start();
|
//开始定位
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -609,24 +609,29 @@ public class WorkLogAddActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void startSignLocation() {
|
private void startSignLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
SignLocationListener myLocationListener = new SignLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
SignLocationListener myLocationListener = new SignLocationListener();
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setCoorType("bd09ll");
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setScanSpan(30 * 1000);
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setIsNeedAddress(true);
|
locationOption.setScanSpan(30 * 1000);
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setIsNeedAddress(true);
|
||||||
locationOption.setLocationNotify(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setLocationNotify(false);
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
locationOption.setOpenGps(true);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setOpenGps(true);
|
||||||
mLocationClient.setLocOption(locationOption);
|
locationOption.setIsNeedAltitude(false);
|
||||||
mLocationClient.start();
|
mLocationClient.setLocOption(locationOption);
|
||||||
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopLocation() {
|
private void stopLocation() {
|
||||||
|
@ -5,12 +5,11 @@ import android.support.multidex.MultiDex;
|
|||||||
import android.support.multidex.MultiDexApplication;
|
import android.support.multidex.MultiDexApplication;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
|
||||||
|
import com.baidu.location.LocationClient;
|
||||||
import com.baidu.mapapi.CoordType;
|
import com.baidu.mapapi.CoordType;
|
||||||
import com.baidu.mapapi.SDKInitializer;
|
import com.baidu.mapapi.SDKInitializer;
|
||||||
import com.hjq.toast.Toaster;
|
import com.hjq.toast.Toaster;
|
||||||
import com.squareup.leakcanary.LeakCanary;
|
import com.squareup.leakcanary.LeakCanary;
|
||||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
|
||||||
import com.sucstepsoft.realtimelocation.services.LocationChangBroadcastReceiver;
|
|
||||||
import com.tencent.bugly.crashreport.CrashReport;
|
import com.tencent.bugly.crashreport.CrashReport;
|
||||||
|
|
||||||
import cn.jpush.android.api.JPushInterface;
|
import cn.jpush.android.api.JPushInterface;
|
||||||
@ -60,10 +59,12 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
* 百度地图初始化
|
* 百度地图初始化
|
||||||
*/
|
*/
|
||||||
private void initBaiduMap() {
|
private void initBaiduMap() {
|
||||||
|
SDKInitializer.setAgreePrivacy(this, true);
|
||||||
SDKInitializer.initialize(this);
|
SDKInitializer.initialize(this);
|
||||||
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
||||||
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
|
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
|
||||||
SDKInitializer.setCoordType(CoordType.BD09LL);
|
SDKInitializer.setCoordType(CoordType.BD09LL);
|
||||||
|
LocationClient.setAgreePrivacy(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static LocationChangBroadcastReceiver getlocationChangeBoardcase() {
|
// public static LocationChangBroadcastReceiver getlocationChangeBoardcase() {
|
||||||
|
@ -1269,46 +1269,51 @@ public class LocationService extends NotificationService {
|
|||||||
*/
|
*/
|
||||||
private void startLocation() {
|
private void startLocation() {
|
||||||
stopLocation();
|
stopLocation();
|
||||||
mLocationClient = new LocationClient(getApplicationContext());
|
try {
|
||||||
//声明LocationClient类实例并配置定位参数
|
mLocationClient = new LocationClient(getApplicationContext());
|
||||||
LocationClientOption locationOption = new LocationClientOption();
|
//声明LocationClient类实例并配置定位参数
|
||||||
MyLocationListener myLocationListener = new MyLocationListener();
|
LocationClientOption locationOption = new LocationClientOption();
|
||||||
//注册监听函数
|
MyLocationListener myLocationListener = new MyLocationListener();
|
||||||
mLocationClient.registerLocationListener(myLocationListener);
|
//注册监听函数
|
||||||
//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
|
mLocationClient.registerLocationListener(myLocationListener);
|
||||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
|
||||||
//可选,默认gcj02,设置返回的定位结果坐标系,如果配合百度地图使用,建议设置为bd09ll;
|
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||||
locationOption.setCoorType("bd09ll");
|
//可选,默认gcj02,设置返回的定位结果坐标系,如果配合百度地图使用,建议设置为bd09ll;
|
||||||
//可选,默认0,即仅定位一次,设置发起连续定位请求的间隔需要大于等于1000ms才是有效的
|
locationOption.setCoorType("bd09ll");
|
||||||
locationOption.setScanSpan(5000);
|
//可选,默认0,即仅定位一次,设置发起连续定位请求的间隔需要大于等于1000ms才是有效的
|
||||||
//可选,设置是否需要地址信息,默认不需要
|
locationOption.setScanSpan(5000);
|
||||||
locationOption.setIsNeedAddress(true);
|
//可选,设置是否需要地址信息,默认不需要
|
||||||
//设置是否运行模拟GPS
|
locationOption.setIsNeedAddress(true);
|
||||||
|
//设置是否运行模拟GPS
|
||||||
// locationOption.setEnableSimulateGps(false);
|
// locationOption.setEnableSimulateGps(false);
|
||||||
//可选,设置是否需要设备方向结果
|
//可选,设置是否需要设备方向结果
|
||||||
locationOption.setNeedDeviceDirect(false);
|
locationOption.setNeedDeviceDirect(false);
|
||||||
//可选,默认false,设置是否当gps有效时按照1S1次频率输出GPS结果
|
//可选,默认false,设置是否当gps有效时按照1S1次频率输出GPS结果
|
||||||
locationOption.setLocationNotify(true);
|
locationOption.setLocationNotify(true);
|
||||||
//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
|
//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
|
||||||
locationOption.setIgnoreKillProcess(true);
|
locationOption.setIgnoreKillProcess(true);
|
||||||
//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”
|
//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”
|
||||||
locationOption.setIsNeedLocationDescribe(true);
|
locationOption.setIsNeedLocationDescribe(true);
|
||||||
//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到
|
//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到
|
||||||
locationOption.setIsNeedLocationPoiList(true);
|
locationOption.setIsNeedLocationPoiList(true);
|
||||||
//可选,默认false,设置是否收集CRASH信息,默认收集
|
//可选,默认false,设置是否收集CRASH信息,默认收集
|
||||||
locationOption.SetIgnoreCacheException(false);
|
locationOption.SetIgnoreCacheException(false);
|
||||||
//可选,默认false,设置是否开启Gps定位
|
//可选,默认false,设置是否开启Gps定位
|
||||||
locationOption.setOpenGps(true);
|
locationOption.setOpenGps(true);
|
||||||
//可选,默认false,设置定位时是否需要海拔信息,默认不需要,除基础定位版本都可用
|
//可选,默认false,设置定位时是否需要海拔信息,默认不需要,除基础定位版本都可用
|
||||||
locationOption.setIsNeedAltitude(false);
|
locationOption.setIsNeedAltitude(false);
|
||||||
//设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者,该模式下开发者无需再关心定位间隔是多少,定位SDK本身发现位置变化就会及时回调给开发者
|
//设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者,该模式下开发者无需再关心定位间隔是多少,定位SDK本身发现位置变化就会及时回调给开发者
|
||||||
// locationOption.setOpenAutoNotifyMode();
|
// locationOption.setOpenAutoNotifyMode();
|
||||||
//设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
|
//设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
|
||||||
// locationOption.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
|
// locationOption.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
|
||||||
//需将配置好的LocationClientOption对象,通过setLocOption方法传递给LocationClient对象使用
|
//需将配置好的LocationClientOption对象,通过setLocOption方法传递给LocationClient对象使用
|
||||||
mLocationClient.setLocOption(locationOption);
|
mLocationClient.setLocOption(locationOption);
|
||||||
//开始定位
|
//开始定位
|
||||||
mLocationClient.start();
|
mLocationClient.start();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopLocation() {
|
void stopLocation() {
|
||||||
|
@ -20,7 +20,7 @@ public class NotificationService extends Service {
|
|||||||
*/
|
*/
|
||||||
// private static int NOTI_ID = 123321;
|
// private static int NOTI_ID = 123321;
|
||||||
private static int NOTI_ID = 123322;
|
private static int NOTI_ID = 123322;
|
||||||
// private static int NOTI_ID_1 = 123443;
|
// private static int NOTI_ID_1 = 123443;
|
||||||
private static int NOTI_ID_1 = 123444;
|
private static int NOTI_ID_1 = 123444;
|
||||||
|
|
||||||
private Utils.CloseServiceReceiver mCloseReceiver;
|
private Utils.CloseServiceReceiver mCloseReceiver;
|
||||||
@ -50,12 +50,12 @@ public class NotificationService extends Service {
|
|||||||
* 触发利用notification增加进程优先级
|
* 触发利用notification增加进程优先级
|
||||||
*/
|
*/
|
||||||
protected void applyNotiKeepMech() {
|
protected void applyNotiKeepMech() {
|
||||||
startForeground(NOTI_ID, Utils.buildNotification(getBaseContext()));
|
startForeground(NOTI_ID, Utils.buildNotification(this.getApplicationContext()));
|
||||||
startBindHelperService();
|
startBindHelperService();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sendNoti() {
|
protected void sendNoti() {
|
||||||
startForeground(NOTI_ID_1, Utils.buildNotification(getBaseContext()));
|
startForeground(NOTI_ID_1, Utils.buildNotification(getApplicationContext()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unApplyNotiKeepMech() {
|
public void unApplyNotiKeepMech() {
|
||||||
|
24
build.gradle
24
build.gradle
@ -3,8 +3,15 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
|
// 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
|
||||||
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||||
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
|
// 华为开源镜像:https://mirrors.huaweicloud.com
|
||||||
|
maven { url 'https://repo.huaweicloud.com/repository/maven' }
|
||||||
|
maven {
|
||||||
|
url "https://jitpack.io"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.2.2'
|
classpath 'com.android.tools.build:gradle:4.2.2'
|
||||||
@ -45,7 +52,12 @@ buildscript {
|
|||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
|
// 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
|
||||||
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||||
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
|
// 华为开源镜像:https://mirrors.huaweicloud.com
|
||||||
|
maven { url 'https://repo.huaweicloud.com/repository/maven' }
|
||||||
maven {
|
maven {
|
||||||
url "https://jitpack.io"
|
url "https://jitpack.io"
|
||||||
}
|
}
|
||||||
@ -61,12 +73,12 @@ ext {
|
|||||||
gTargetSdkVersion = 28
|
gTargetSdkVersion = 28
|
||||||
// gVersionCode = 3
|
// gVersionCode = 3
|
||||||
// gVersionName = '1.0.3'
|
// gVersionName = '1.0.3'
|
||||||
gVersionCode=52
|
gVersionCode = 53
|
||||||
gVersionName='1.5.2'
|
gVersionName = '1.5.3'
|
||||||
//Router编译版本
|
//Router编译版本
|
||||||
gRouterApiVersion = '1.4.1'
|
gRouterApiVersion = '1.4.1'
|
||||||
gRouterCompileVersion = '1.2.2'
|
gRouterCompileVersion = '1.2.2'
|
||||||
//appcompat
|
//appcompatb
|
||||||
gAppcompatVersion_v7_28 = '28.0.0'
|
gAppcompatVersion_v7_28 = '28.0.0'
|
||||||
//constraint-layout
|
//constraint-layout
|
||||||
gConstraint_layout = '1.1.3'
|
gConstraint_layout = '1.1.3'
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
package com.cjt2325.cameralibrary;
|
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.test.ApplicationTestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
|
||||||
*/
|
|
||||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
|
||||||
public ApplicationTest() {
|
|
||||||
super(Application.class);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
|
Loading…
Reference in New Issue
Block a user