ソースを参照

首次安装定位无效问题解决

huyuguo 5 年 前
コミット
81a96bcc72

+ 6 - 6
app/build.gradle

@ -54,7 +54,7 @@ android {
54 54
            zipAlignEnabled true
55 55
            // 移除无用的resource文件
56 56
//            shrinkResources true
57
            //启用代码混淆
57
            //启用代码混淆  debug 模式下需要设置为false,否则无法看到局部变量的值
58 58
            minifyEnabled true
59 59
            //混淆规则配置文件
60 60
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -93,11 +93,11 @@ android {
93 93
94 94
    productFlavors {
95 95
        yingyongbao {}
96
//        c360 {}
97
//        xiaomi {}
98
//        huawei {}
99
//        oppo {}
100
//        cdz {}
96
        c360 {}
97
        xiaomi {}
98
        huawei {}
99
        oppo {}
100
        cdz {}
101 101
102 102
103 103
//        wandoujia {} baidu {} anzhi {} pp {} vivo {} meizu {} sougou {}

+ 2 - 0
app/proguard-rules.pro

@ -39,6 +39,8 @@
39 39
-keep class com.electric.chargingpile.data.**{*;}
40 40
#实体类混淆结束
41 41
42
-keep class com.electric.chargingpile.activity.MainMapActivity {*;}
43
42 44
#高德地图相关混淆开始
43 45
#3D 地图 V5.0.0之后:
44 46
-keep   class com.amap.api.maps.**{*;}

+ 2 - 2
app/src/main/AndroidManifest.xml

@ -1,8 +1,8 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    package="com.electric.chargingpile"
4
    android:versionCode="78"
5
    android:versionName="3.4.1">
4
    android:versionCode="80"
5
    android:versionName="3.4.2">
6 6
    <!-- 极光 -->
7 7
    <permission
8 8
        android:name="${applicationId}.permission.JPUSH_MESSAGE"

+ 5 - 8
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

@ -162,6 +162,8 @@ import java.util.HashMap;
162 162
import java.util.List;
163 163
import java.util.Map;
164 164
import java.util.Random;
165
import java.util.Timer;
166
import java.util.TimerTask;
165 167
166 168
import cn.sharesdk.framework.Platform;
167 169
import cn.sharesdk.framework.PlatformActionListener;
@ -1180,7 +1182,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1180 1182
                }
1181 1183
1182 1184
            }
1183
        }, 2000);
1185
        }, 4000);
1184 1186
1185 1187
        new Handler().postDelayed(new Runnable() {
1186 1188
            @Override
@ -1573,11 +1575,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1573 1575
     */
1574 1576
    @Override
1575 1577
    protected void onResume() {
1576
        try{
1577
            super.onResume();
1578
        } catch (Exception e) {
1579
            e.printStackTrace();
1580
        }
1578
        super.onResume();
1581 1579
1582 1580
        if (FindActivity.haveFindMessage == true) {
1583 1581
            iVpoint.setVisibility(View.VISIBLE);
@ -5095,7 +5093,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5095 5093
        if (height > 1122) {
5096 5094
            Point point = aMap.getProjection().toScreenLocation(markerPosition);
5097 5095
            int y = point.y - (height - 1122) - DensityUtil.dip2px(getApplicationContext(), adHeight);
5098
            aMap.moveCamera(CameraUpdateFactory.scrollBy(point.x - width/2, y));
5096
            aMap.moveCamera(CameraUpdateFactory.scrollBy(point.x - width / 2, y));
5099 5097
        } else {
5100 5098
            aMap.animateCamera(CameraUpdateFactory.newLatLngZoom(markerPosition, zoom));
5101 5099
        }
@ -5156,7 +5154,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5156 5154
        final String poi_jing = JsonUtils.getKeyResult(info, "poi_jing");
5157 5155
        final String poi_wei = JsonUtils.getKeyResult(info, "poi_wei");
5158 5156
5159
5160 5157
        if (remind.equals("0") && !"1".equals(own_pay)) {
5161 5158
            iv_guzhang.setVisibility(View.GONE);
5162 5159
        } else {

+ 1 - 1
app/src/main/res/layout/activity_main_map.xml

@ -959,7 +959,7 @@
959 959
            android:layout_width="match_parent"
960 960
            android:layout_height="wrap_content"
961 961
            android:orientation="vertical"
962
            android:visibility="gone">
962
            tools:visibility="visible">
963 963
964 964
            <View
965 965
                android:layout_width="match_parent"