add share interface

This commit is contained in:
lixiaopeng
2020-02-09 11:08:20 +08:00
parent c16bab4387
commit a40172ea1b
4 changed files with 54 additions and 0 deletions

View File

@@ -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>

View File

@@ -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();
}
/**
* 接收到分享对应数据打点
*

View File

@@ -0,0 +1,10 @@
package com.mogo.module.tanlu.model.event;
/**
* @author lixiaopeng
* @description 分享弹框事件
* @since 2020-01-08
*/
public class SharedialogEvent {
}

View File

@@ -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());
}
}
}