Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8536a9d6
authored
Mar 01, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加实体类混淆
parent
b61ecd3a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
299 deletions
app/proguard-rules.pro
app/src/main/res/values/strings.xml
baseSDK/src/main/res/values/strings.xml
locationComponent/libs/Amap_2DMap_V5.2.0_20170627.jar
locationComponent/src/main/java/com/dayu/location/base/BasicMapActivity.java
locationComponent/src/main/java/com/dayu/location/base/OpenLocalMapUtil.java
userCenter/src/main/res/layout/activity_login.xml
app/proguard-rules.pro
View file @
8536a9d6
...
...
@@ -113,12 +113,13 @@
#-------------------------------------------定制化区域----------------------------------------------
#---------------------------------1.实体类---------------------------------
#TODO
#-keep class com.dayu.bigfish.bean.
*
* { *; }
#-keep class com.dayu.bigfish.base.
*
* { *; }
#-keep class com.dayu.base.
*
* { *; }
-keep public class * extends com.dayu.base.ui.presenter.BasePresenter
-keep class com.dayu.bigfish.api.protocol.
*
* { *; }
-keep class com.dayu.base.api.protocol.
*
* { *; }
-keep class com.dayu.message.data.protocol.
*
* { *; }
-keep class com.dayu.order.api.protocol.
*
* { *; }
-keep class com.dayu.provider.event.
*
* { *; }
-keep class com.dayu.usercenter.data.protocol.
*
* { *; }
#-------------------------------------------------------------------------
#---------------------------------2.第三方包-------------------------------
...
...
@@ -174,17 +175,6 @@
}
#BaseRecyclerViewAdapterHelper
-keep class com.chad.library.adapter.
*
* {
*;
}
-keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
-keep public class * extends com.chad.library.adapter.base.BaseViewHolder
-keepclassmembers class
*
*$
*
* extends com.chad.library.adapter.base.BaseViewHolder {
<init>(...);
}
#greendao
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
...
...
app/src/main/res/values/strings.xml
100755 → 100644
View file @
8536a9d6
File mode changed from 100755 to 100644
baseSDK/src/main/res/values/strings.xml
View file @
8536a9d6
...
...
@@ -2,7 +2,6 @@
<string
name=
"app_name"
>
BaseLibrary
</string>
<string
name=
"tv_dayu"
>
大鱼工程师
</string>
<string
name=
"tv_start_page_text"
>
©
 
2017
 
大鱼智能
 
版权所有
</string>
<string
name=
"tv_login_title"
>
大鱼工程师
</string>
<string
name=
"tv_fonts"
>
fonts/DIN Alternate Bold.ttf
</string>
<string
name=
"tv_login_register_text"
>
暂不接受个人用户注册
</string>
<string
name=
"tv_login_button_text"
>
登
 
录
</string>
...
...
@@ -435,8 +434,6 @@
<string
name=
"global1004"
>
未知错误GLOBAL1004
</string>
<string
name=
"global1005"
>
未知错误GLOBAL1005
</string>
<string
name=
"agreement"
>
特别提示:\n
欢迎您注册使用大鱼U服(以下简称“大鱼平台”),您在申请注册流程中点击同意本协议之前,应当认真阅读本协议。请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、法律适用和争议解决条款。免除或者限制责任的条款将以粗体以及下划线标识,您应重点阅读。如您对本协议有任何疑问,请与kf@kf.ai联系。当您按照注册页面提示填写信息、阅读并同意本协议且完成全部注册程序后,即表示您已充分阅读、理解并接受本协议的全部内容,并与北京大鱼创想网络科技有限公司达成一致,双方同意使用互联网信息技术以数据电文形式订立本用户协议并认同其效力。\n
...
...
locationComponent/libs/Amap_2DMap_V5.2.0_20170627.jar
deleted
100644 → 0
View file @
b61ecd3a
File deleted
locationComponent/src/main/java/com/dayu/location/base/BasicMapActivity.java
deleted
100644 → 0
View file @
b61ecd3a
package
com
.
dayu
.
location
.
base
;
import
android.app.Activity
;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.util.Log
;
import
com.amap.api.location.AMapLocation
;
import
com.amap.api.location.AMapLocationClient
;
import
com.amap.api.location.AMapLocationClientOption
;
import
com.amap.api.location.AMapLocationListener
;
import
com.amap.api.maps2d.AMap
;
import
com.amap.api.maps2d.CameraUpdateFactory
;
import
com.amap.api.maps2d.LocationSource
;
import
com.amap.api.maps2d.MapView
;
import
com.amap.api.maps2d.model.MyLocationStyle
;
import
com.dayu.location.R
;
/**
* AMapV1地图中介绍如何显示世界图
*/
public
class
BasicMapActivity
extends
Activity
implements
LocationSource
,
AMapLocationListener
{
private
MapView
mapView
;
private
AMap
aMap
;
private
OnLocationChangedListener
mListener
;
private
AMapLocationClient
mlocationClient
;
private
AMapLocationClientOption
mLocationOption
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
basicmap_activity
);
mapView
=
findViewById
(
R
.
id
.
map
);
mapView
.
onCreate
(
savedInstanceState
);
// 此方法必须重写
init
();
}
/**
* 初始化AMap对象
*/
private
void
init
()
{
if
(
aMap
==
null
)
{
aMap
=
mapView
.
getMap
();
setUpMap
();
addMarkersToMap
();
// 往地图上添加marker
}
}
/**
* 设置一些amap的属性
*/
private
void
setUpMap
()
{
aMap
.
setLocationSource
(
this
);
// 设置定位监听
aMap
.
getUiSettings
().
setMyLocationButtonEnabled
(
true
);
// 设置默认定位按钮是否显示
aMap
.
setMyLocationEnabled
(
true
);
// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
setupLocationStyle
();
}
private
void
setupLocationStyle
(){
// 自定义系统定位蓝点
MyLocationStyle
myLocationStyle
=
new
MyLocationStyle
();
// 自定义定位蓝点图标
// myLocationStyle.myLocationIcon(BitmapDescriptorFactory.
// fromResource(R.drawable.gps_point));
// 自定义精度范围的圆形边框颜色
// myLocationStyle.strokeColor(STROKE_COLOR);
//自定义精度范围的圆形边框宽度
myLocationStyle
.
strokeWidth
(
5
);
// 设置圆形的填充颜色
myLocationStyle
.
radiusFillColor
(
Color
.
TRANSPARENT
);
// 将自定义的 myLocatio、nStyle 对象添加到地图上
aMap
.
setMyLocationStyle
(
myLocationStyle
);
}
/**
* 在地图上添加marker
*/
private
void
addMarkersToMap
()
{
// markerOption = new MarkerOptions().icon(BitmapDescriptorFactory
// .defaultMarker(BitmapDescriptorFactory.HUE_AZURE))
// .position(latlng)
// .draggable(true);
// aMap.addMarker(markerOption);
}
/**
* 方法必须重写
*/
@Override
protected
void
onResume
()
{
super
.
onResume
();
mapView
.
onResume
();
}
/**
* 方法必须重写
*/
@Override
protected
void
onPause
()
{
super
.
onPause
();
mapView
.
onPause
();
deactivate
();
}
/**
* 方法必须重写
*/
@Override
protected
void
onSaveInstanceState
(
Bundle
outState
)
{
super
.
onSaveInstanceState
(
outState
);
mapView
.
onSaveInstanceState
(
outState
);
}
/**
* 方法必须重写
*/
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
mapView
.
onDestroy
();
if
(
null
!=
mlocationClient
){
mlocationClient
.
onDestroy
();
}
}
@Override
public
void
onLocationChanged
(
AMapLocation
amapLocation
)
{
if
(
mListener
!=
null
&&
amapLocation
!=
null
)
{
if
(
amapLocation
!=
null
&&
amapLocation
.
getErrorCode
()
==
0
)
{
mListener
.
onLocationChanged
(
amapLocation
);
// 显示系统小蓝点
aMap
.
moveCamera
(
CameraUpdateFactory
.
zoomTo
(
18
));
}
else
{
String
errText
=
"定位失败,"
+
amapLocation
.
getErrorCode
()+
": "
+
amapLocation
.
getErrorInfo
();
Log
.
e
(
"AmapErr"
,
errText
);
}
}
}
@Override
public
void
activate
(
OnLocationChangedListener
onLocationChangedListener
)
{
mListener
=
onLocationChangedListener
;
if
(
mlocationClient
==
null
)
{
mlocationClient
=
new
AMapLocationClient
(
this
);
mLocationOption
=
new
AMapLocationClientOption
();
//设置定位监听
mlocationClient
.
setLocationListener
(
this
);
//设置为高精度定位模式
mLocationOption
.
setLocationMode
(
AMapLocationClientOption
.
AMapLocationMode
.
Hight_Accuracy
);
//设置定位参数
mlocationClient
.
setLocationOption
(
mLocationOption
);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用stopLocation()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用onDestroy()方法
// 在单次定位情况下,定位无论成功与否,都无需调用stopLocation()方法移除请求,定位sdk内部会移除
mlocationClient
.
startLocation
();
}
}
@Override
public
void
deactivate
()
{
mListener
=
null
;
if
(
mlocationClient
!=
null
)
{
mlocationClient
.
stopLocation
();
mlocationClient
.
onDestroy
();
}
mlocationClient
=
null
;
}
}
locationComponent/src/main/java/com/dayu/location/base/OpenLocalMapUtil.java
deleted
100644 → 0
View file @
b61ecd3a
package
com
.
dayu
.
location
.
base
;
import
java.io.File
;
/**
* Created by luofan
* on 2018/2/28.
*/
public
class
OpenLocalMapUtil
{
/**
* 地图应用是否安装
* @return
*/
public
static
boolean
isGdMapInstalled
(){
return
isInstallPackage
(
"com.autonavi.minimap"
);
}
public
static
boolean
isBaiduMapInstalled
(){
return
isInstallPackage
(
"com.baidu.BaiduMap"
);
}
private
static
boolean
isInstallPackage
(
String
packageName
)
{
return
new
File
(
"/data/data/"
+
packageName
).
exists
();
}
/**
* 获取打开百度地图应用uri [http://lbsyun.baidu.com/index.php?title=uri/api/android]
* @param originLat
* @param originLon
* @param desLat
* @param desLon
* @return
*/
public
static
String
getBaiduMapUri
(
String
originLat
,
String
originLon
,
String
originName
,
String
desLat
,
String
desLon
,
String
destination
,
String
region
,
String
src
){
String
uri
=
"intent://map/direction?origin=latlng:%1$s,%2$s|name:%3$s"
+
"&destination=latlng:%4$s,%5$s|name:%6$s&mode=driving®ion=%7$s&src=%8$s#Intent;"
+
"scheme=bdapp;package=com.baidu.BaiduMap;end"
;
return
String
.
format
(
uri
,
originLat
,
originLon
,
originName
,
desLat
,
desLon
,
destination
,
region
,
src
);
}
/**
* 获取打开高德地图应用uri
*/
public
static
String
getGdMapUri
(
String
appName
,
String
slat
,
String
slon
,
String
sname
,
String
dlat
,
String
dlon
,
String
dname
){
String
uri
=
"androidamap://route?sourceApplication=%1$s&slat=%2$s&slon=%3$s&sname=%4$s&dlat=%5$s&dlon=%6$s&dname=%7$s&dev=0&m=0&t=2"
;
return
String
.
format
(
uri
,
appName
,
slat
,
slon
,
sname
,
dlat
,
dlon
,
dname
);
}
/**
* 网页版百度地图 有经纬度
* @param originLat
* @param originLon
* @param originName ->注:必填
* @param desLat
* @param desLon
* @param destination
* @param region : 当给定region时,认为起点和终点都在同一城市,除非单独给定起点或终点的城市。-->注:必填,不填不会显示导航路线
* @param appName
* @return
*/
public
static
String
getWebBaiduMapUri
(
String
originLat
,
String
originLon
,
String
originName
,
String
desLat
,
String
desLon
,
String
destination
,
String
region
,
String
appName
)
{
String
uri
=
"http://api.map.baidu.com/direction?origin=latlng:%1$s,%2$s|name:%3$s"
+
"&destination=latlng:%4$s,%5$s|name:%6$s&mode=driving®ion=%7$s&output=html"
+
"&src=%8$s"
;
return
String
.
format
(
uri
,
originLat
,
originLon
,
originName
,
desLat
,
desLon
,
destination
,
region
,
appName
);
}
/**
* 百度地图定位经纬度转高德经纬度
* @param bd_lat
* @param bd_lon
* @return
*/
public
static
double
[]
bdToGaoDe
(
double
bd_lat
,
double
bd_lon
)
{
double
[]
gd_lat_lon
=
new
double
[
2
];
double
PI
=
3.14159265358979324
*
3000.0
/
180.0
;
double
x
=
bd_lon
-
0.0065
,
y
=
bd_lat
-
0.006
;
double
z
=
Math
.
sqrt
(
x
*
x
+
y
*
y
)
-
0.00002
*
Math
.
sin
(
y
*
PI
);
double
theta
=
Math
.
atan2
(
y
,
x
)
-
0.000003
*
Math
.
cos
(
x
*
PI
);
gd_lat_lon
[
0
]
=
z
*
Math
.
cos
(
theta
);
gd_lat_lon
[
1
]
=
z
*
Math
.
sin
(
theta
);
return
gd_lat_lon
;
}
/**
* 高德地图定位经纬度转百度经纬度
* @param gd_lon
* @param gd_lat
* @return
*/
public
static
double
[]
gaoDeToBaidu
(
double
gd_lon
,
double
gd_lat
)
{
double
[]
bd_lat_lon
=
new
double
[
2
];
double
PI
=
3.14159265358979324
*
3000.0
/
180.0
;
double
x
=
gd_lon
,
y
=
gd_lat
;
double
z
=
Math
.
sqrt
(
x
*
x
+
y
*
y
)
+
0.00002
*
Math
.
sin
(
y
*
PI
);
double
theta
=
Math
.
atan2
(
y
,
x
)
+
0.000003
*
Math
.
cos
(
x
*
PI
);
bd_lat_lon
[
0
]
=
z
*
Math
.
cos
(
theta
)
+
0.0065
;
bd_lat_lon
[
1
]
=
z
*
Math
.
sin
(
theta
)
+
0.006
;
return
bd_lat_lon
;
}
}
userCenter/src/main/res/layout/activity_login.xml
View file @
8536a9d6
...
...
@@ -20,7 +20,7 @@
<TextView
style=
"@style/text_title"
android:text=
"@string/tv_
login_title
"
/>
android:text=
"@string/tv_
dayu
"
/>
</RelativeLayout>
<com.dayu.widgets.CircleImageView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment