Commit e53f2442 authored by jianglx's avatar jianglx

修改唤醒页面

parent dc8cf5bd
...@@ -56,8 +56,9 @@ public class RvClientApplication extends FrameApp { ...@@ -56,8 +56,9 @@ public class RvClientApplication extends FrameApp {
ShareInstall.getInstance().init(this); ShareInstall.getInstance().init(this);
ShareInstall.getInstance().reportRegister(); ShareInstall.getInstance().reportRegister();
} }
LogUtil.setLogEnable(true, getApplicationContext()); LogUtil.setLogEnable(false, getApplicationContext());
CrashHandler.getInstance().init(getApplicationContext());
// CrashHandler.getInstance().init(getApplicationContext());
// 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext // 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext
SDKInitializer.initialize(this); SDKInitializer.initialize(this);
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型. //自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
......
...@@ -34,10 +34,9 @@ public class WakeUpActivity extends AppCompatActivity { ...@@ -34,10 +34,9 @@ public class WakeUpActivity extends AppCompatActivity {
ShareInstall.getInstance().getInfo(intent, listener); ShareInstall.getInstance().getInfo(intent, listener);
} }
private AppGetInfoListener listener = new AppGetInfoListener() { private AppGetInfoListener listener = info -> {
@Override
public void onGetInfoFinish(String info) {
LogUtil.d("ShareInstall", "info = " + info); LogUtil.d("ShareInstall", "info = " + info);
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
if (info.contains("code")) if (info.contains("code"))
try { try {
JSONObject object = new JSONObject(info); JSONObject object = new JSONObject(info);
...@@ -50,17 +49,14 @@ public class WakeUpActivity extends AppCompatActivity { ...@@ -50,17 +49,14 @@ public class WakeUpActivity extends AppCompatActivity {
String title = URLDecoder.decode(object.optString("title"), "UTF-8"); String title = URLDecoder.decode(object.optString("title"), "UTF-8");
LogUtil.d("唤醒传过来的tile=" + title); LogUtil.d("唤醒传过来的tile=" + title);
if (!TextUtils.isEmpty(url) && !TextUtils.isEmpty(title)) { if (!TextUtils.isEmpty(url) && !TextUtils.isEmpty(title)) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
intent.putExtra("to", "webView"); intent.putExtra("to", "webView");
intent.putExtra("url", url); intent.putExtra("url", url);
intent.putExtra("title", title); intent.putExtra("title", title);
startActivity(intent);
finish();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
startActivity(intent);
} finish();
}; };
} }
...@@ -1066,11 +1066,9 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa ...@@ -1066,11 +1066,9 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
CityPickerBean bean = new Gson().fromJson(json, CityPickerBean.class); CityPickerBean bean = new Gson().fromJson(json, CityPickerBean.class);
for (CityPickerBean.CityBean cityBean : bean.getCity()) { for (CityPickerBean.CityBean cityBean : bean.getCity()) {
for (ListsBean lsBean : cityBean.getLists()) { for (ListsBean lsBean : cityBean.getLists()) {
if (starCity.equals(lsBean.getName())) { if (!TextUtils.isEmpty(starCity) && starCity.equals(lsBean.getName())) {
dataBean.setStartCity(lsBean.getId()); dataBean.setStartCity(lsBean.getId());
} } else if (!TextUtils.isEmpty(endCity) && endCity.equals(lsBean.getName())) {
if (endCity.equals(lsBean.getName())) {
dataBean.setEndCity(lsBean.getId()); dataBean.setEndCity(lsBean.getId());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment