This commit is contained in:
wangcongtao
2020-03-13 17:15:28 +08:00
parent 2381496c51
commit ed0ed93eb1
7 changed files with 37 additions and 21 deletions

View File

@@ -12,8 +12,8 @@
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true"
android:theme="@style/Main"
android:taskAffinity=""
android:theme="@style/Main"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -23,6 +23,15 @@
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data
android:host="launcher"
android:path="/main/switch2"
android:scheme="mogo" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -367,6 +367,12 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
}
}
@Override
protected void onNewIntent( Intent intent ) {
super.onNewIntent( intent );
mPresenter.handleSchemeIntent( intent );
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@@ -1,5 +1,7 @@
package com.mogo.module.main;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -136,4 +138,16 @@ public class MainPresenter extends Presenter< MainView > {
msg.what = MainConstants.MSG_LOAD_MODULES;
mMsgHandler.sendMessageDelayed( msg, 100 );
}
public void handleSchemeIntent( Intent intent ) {
if ( intent == null || intent.getData() == null ) {
return;
}
Uri target = intent.getData();
switch ( target.getPath() ) {
case "/main/switch2":
mView.switch2Card( target.getQueryParameter( "type" ), true );
break;
}
}
}

View File

@@ -295,7 +295,6 @@ public class MogoServices implements IMogoMapListener,
mThreadHandler = new Handler( mHandlerThread.getLooper() ) {
@Override
public void handleMessage( Message msg ) {
Logger.d( TAG, "thread = %s", Thread.currentThread().getName() );
super.handleMessage( msg );
if ( msg.what == ServiceConst.MSG_MAP_CHANGED ) {
if ( msg.obj instanceof RefreshObject ) {

View File

@@ -114,13 +114,7 @@ public class ServiceConst {
public static final String COMMAND_PREVIOUS = "com.zhidao.desk.previous";
public static final String CMD_UN_WAKE_PREV = "CMD_UN_WAKE_PREV";
public static final String[] CMD_UN_WAKE_PREV_UN_WAKE_WORDS = new String[]{
"上一条",
"上一张卡片",
"上一个卡片",
"切换上一张",
"向上滑动卡片",
"上一辆车",
"上一条消息",
"上一条"
};
/**
@@ -130,13 +124,7 @@ public class ServiceConst {
public static final String CMD_UN_WAKE_NEXT = "CMD_UN_WAKE_NEXT";
public static final String[] CMD_UN_WAKE_NEXT_UN_WAKE_WORDS = new String[]{
"下一条",
"换一个",
"切换下一张",
"下一张卡片",
"下一个卡片",
"向下滑动卡片",
"下一辆车",
"下一条消息"
"换一个"
};
/**

View File

@@ -645,9 +645,9 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
List< MarkerOnlineCar > onlineCarList = mLastDataResult.getOnlineCar();
List< MarkerExploreWay > exploreWayList = mLastDataResult.getExploreWay();
List< MarkerNoveltyInfo > noveltyInfoList = mLastDataResult.getNoveltyInfo();
dispatchDataToBiss( ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ? new ArrayList<>() : onlineCarList );
dispatchDataToBiss( ServiceConst.CARD_TYPE_ROAD_CONDITION, exploreWayList == null ? new ArrayList<>() : exploreWayList );
dispatchDataToBiss( ServiceConst.CARD_TYPE_NOVELTY, noveltyInfoList == null ? new ArrayList<>() : noveltyInfoList );
dispatchDataToBis( ServiceConst.CARD_TYPE_USER_DATA, onlineCarList == null ? new ArrayList<>() : onlineCarList );
dispatchDataToBis( ServiceConst.CARD_TYPE_ROAD_CONDITION, exploreWayList == null ? new ArrayList<>() : exploreWayList );
dispatchDataToBis( ServiceConst.CARD_TYPE_NOVELTY, noveltyInfoList == null ? new ArrayList<>() : noveltyInfoList );
}
/**
@@ -656,7 +656,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
* @param biz
* @param object
*/
private void dispatchDataToBiss( String biz, Object object ) {
private void dispatchDataToBis( String biz, Object object ) {
if ( TextUtils.isEmpty( biz ) ) {
return;
}

View File

@@ -10,7 +10,7 @@
./gradlew :services:mogo-service:clean :services:mogo-service:uploadArchives
./gradlew :modules:mogo-module-common:clean :modules:mogo-module-common:uploadArchives
./gradlew :modules:mogo-module-map:clean :modules:mogo-module-map:uploadArchives
./gradlew :modules:mogo-module-apps:clean :modules:mogo-module-apps:uploadArchives
./gradlew :modules:mogo-module-service:clean :modules:mogo-module-service:uploadArchives
./gradlew :modules:mogo-module-share:clean :modules:mogo-module-share:uploadArchives
./gradlew :modules:mogo-module-extensions:clean :modules:mogo-module-extensions:uploadArchives