opt
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user