Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
This commit is contained in:
@ -25,7 +25,7 @@ public class EntranceUtils {
|
||||
public static final String KEY_URL = "url";
|
||||
public static final String KEY_GAMENAME = "gameName";
|
||||
public static final String HOST_ARTICLE = "article";
|
||||
public static final String HOST_COMMUNITY_ARTICLE = "community.article";
|
||||
public static final String HOST_COMMUNITY_ARTICLE = "community_article";
|
||||
public static final String HOST_GAME = "game";
|
||||
public static final String HOST_GAME_DOWNLOAD = "game_download";
|
||||
public static final String HOST_COLUMN = "column";
|
||||
|
||||
@ -44,6 +44,7 @@ import com.gh.common.util.DirectUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.GsonUtils;
|
||||
import com.gh.common.util.LogUtils;
|
||||
import com.gh.common.util.LunchType;
|
||||
import com.gh.common.util.MtaHelper;
|
||||
import com.gh.common.util.NetworkUtils;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
@ -259,10 +260,11 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
isNewFirstLaunch = mSp.getBoolean("isNewFirstLaunchV" + PackageUtils.getVersionName(), true);
|
||||
if (isNewFirstLaunch) {
|
||||
final LunchType lunchType = DeviceTokenUtils.getLaunchType();
|
||||
// 延时两秒提交 APP 启动日志的,避免提交时还没获取到 GID
|
||||
AppExecutor.getUiExecutor().executeWithDelay(() -> {
|
||||
if (!this.isFinishing()) {
|
||||
LogUtils.uploadDevice(DeviceTokenUtils.getLaunchType());
|
||||
LogUtils.uploadDevice(lunchType);
|
||||
}
|
||||
}, 2000L);
|
||||
getPluginUpdate();
|
||||
|
||||
@ -19,7 +19,6 @@ import static com.gh.common.util.EntranceUtils.HOST_ANSWER;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_ARTICLE;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_COLUMN;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_COMMUNITY;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_COMMUNITY_ARTICLE;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_DOWNLOAD;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_GAME;
|
||||
import static com.gh.common.util.EntranceUtils.HOST_QUESTION;
|
||||
@ -103,7 +102,7 @@ public class SkipActivity extends BaseActivity {
|
||||
}
|
||||
startActivity(intent);
|
||||
break;
|
||||
case HOST_COMMUNITY_ARTICLE:
|
||||
case "community.article":
|
||||
DirectUtils.directToCommunityArticle(this, uri.getQueryParameter("articleId"), uri.getQueryParameter("communityId"), ENTRANCE_BROWSER);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -19,4 +19,6 @@ class MessageLinkEntity {
|
||||
var qq: String? = null
|
||||
|
||||
var key: String? = null
|
||||
|
||||
var community: CommunityEntity? = null
|
||||
}
|
||||
|
||||
@ -37,7 +37,9 @@ data class PushNotificationEntity(
|
||||
var link: Link? = null) {
|
||||
|
||||
@Parcelize
|
||||
data class Link(var type: String? = "", var target: String? = "") : Parcelable
|
||||
data class Link(var type: String? = "",
|
||||
var target: String? = "",
|
||||
var community: CommunityEntity? = null) : Parcelable
|
||||
|
||||
data class Condition(
|
||||
@SerializedName("package")
|
||||
|
||||
@ -245,6 +245,16 @@ public class KeFuFragmentAdapter extends ListAdapter<MessageKeFuEntity> {
|
||||
mContext.startActivity(QuestionsDetailActivity.getIntent(mContext, data.getId(), mEntrance, "(消息-客服)"));
|
||||
}
|
||||
break;
|
||||
case "回答":
|
||||
if (!TextUtils.isEmpty(data.getId())) {
|
||||
DirectUtils.directToAnswerDetail(mContext, data.getId(), mEntrance, "(消息-客服)");
|
||||
}
|
||||
break;
|
||||
case "社区文章":
|
||||
if (!TextUtils.isEmpty(data.getId()) && data.getCommunity() != null) {
|
||||
DirectUtils.directToCommunityArticle(mContext, data.getId(), data.getCommunity().getId(), mEntrance);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DialogUtils.showLowVersionDialog(mContext);
|
||||
break;
|
||||
|
||||
@ -129,6 +129,9 @@ class UmengMessageReceiver : BroadcastReceiver() {
|
||||
EntranceUtils.HOST_WEB -> {
|
||||
DirectUtils.directToWebView(context, link.target!!, EntranceUtils.ENTRANCE_UMENG)
|
||||
}
|
||||
EntranceUtils.HOST_COMMUNITY_ARTICLE -> {
|
||||
DirectUtils.directToCommunityArticle(context, link.target!!, link.community?.id!!, EntranceUtils.ENTRANCE_UMENG)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user