| | |
| | | package com.weikou.beibeivideo.receiver; |
| | | |
| | | import android.content.ActivityNotFoundException; |
| | | import android.content.BroadcastReceiver; |
| | | import android.content.ComponentName; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.os.Build; |
| | | import android.os.Handler; |
| | | |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.weikou.beibeivideo.BeibeiVideoApplication; |
| | | import com.weikou.beibeivideo.ui.recommend.RecommendAdapter; |
| | | |
| | | public class APPInstallReceiver extends BroadcastReceiver { |
| | | |
| | |
| | | |
| | | @Override |
| | | public void run() { |
| | | if (packageName != null |
| | | && packageName |
| | | .equalsIgnoreCase(RecommendAdapter.MM_PACKAGE_NAME) |
| | | && !StringUtils |
| | | .isBlank(BeibeiVideoApplication.MMNumber)) { |
| | | |
| | | if (packageName |
| | | .equalsIgnoreCase(RecommendAdapter.MM_PACKAGE_NAME)) { |
| | | Intent intent = new Intent(); |
| | | intent.setComponent(new ComponentName( |
| | | RecommendAdapter.MM_PACKAGE_NAME, |
| | | RecommendAdapter.MM_CLASS_NAME)); |
| | | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | intent.setAction("com.memezhibo.android.exportedAction");// 么么直播action名 |
| | | intent.putExtra("room_id", Long |
| | | .parseLong(BeibeiVideoApplication.MMNumber)); |
| | | |
| | | try { |
| | | mContext.startActivity(intent); |
| | | } catch (ActivityNotFoundException e) { |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, time); |
| | | } |