add share interface
This commit is contained in:
@@ -21,6 +21,13 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receiver.ShareDialogReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.zhidao.sharedialog" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -69,6 +69,7 @@ import com.mogo.module.tanlu.model.TanluModelData;
|
||||
import com.mogo.module.tanlu.model.VoiceSearchResult;
|
||||
import com.mogo.module.tanlu.model.event.MarkerInfo;
|
||||
import com.mogo.module.tanlu.model.event.PushTypeInfo;
|
||||
import com.mogo.module.tanlu.model.event.SharedialogEvent;
|
||||
import com.mogo.module.tanlu.util.Utils;
|
||||
import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer;
|
||||
import com.mogo.module.tanlu.view.AutoZoomInImageView;
|
||||
@@ -855,6 +856,18 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mogoIntentManager.unregisterIntentListener(MogoReceiver.ACTIION_ADAS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分享弹框
|
||||
* @param event
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onShareDialog(final SharedialogEvent event) {
|
||||
if (event == null) {
|
||||
return;
|
||||
}
|
||||
ShareControl.getInstance(getActivity()).showDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收到分享对应数据打点
|
||||
*
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.module.tanlu.model.event;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 分享弹框事件
|
||||
* @since 2020-01-08
|
||||
*/
|
||||
public class SharedialogEvent {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.module.tanlu.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.module.tanlu.model.event.SharedialogEvent;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020-02-09
|
||||
*/
|
||||
public class ShareDialogReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.getAction() == "com.zhidao.sharedialog") {
|
||||
EventBus.getDefault().post(new SharedialogEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user