Merge branch 'update_targetSDK' into 'dev'
Update targetSdk and fix MTA bugs. See merge request !1
This commit is contained in:
@ -157,7 +157,7 @@ class GHUmengNotificationService : UmengMessageService() {
|
||||
EntranceUtils.jumpActivity(context, bundle)
|
||||
|
||||
DataUtils.onMtaEvent(context, "消息弹窗",
|
||||
type, "")
|
||||
type, "Does not contains any parameter.")
|
||||
|
||||
Notifier.hide()
|
||||
})
|
||||
|
||||
@ -47,6 +47,14 @@ public class StringUtils {
|
||||
return displayName + "(" + description + ")";
|
||||
}
|
||||
|
||||
public static String eliminateHtmlContent(String s) {
|
||||
if (TextUtils.isEmpty(s)) return "";
|
||||
|
||||
s = Html.fromHtml(s).toString();
|
||||
s = s.replace("\n", "");
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取字符串部分长度,超出的以 "..." 代替
|
||||
*
|
||||
|
||||
@ -9,6 +9,7 @@ import android.support.v7.widget.RecyclerView
|
||||
import android.view.View
|
||||
import com.gh.common.util.DataUtils
|
||||
import com.gh.common.util.EntranceUtils
|
||||
import com.gh.common.util.StringUtils
|
||||
import com.gh.gamecenter.baselist.ListActivity
|
||||
import com.gh.gamecenter.baselist.LoadStatus
|
||||
import com.gh.gamecenter.entity.PersonalHistoryEntity
|
||||
@ -56,6 +57,10 @@ class PersonalHomeActivity : ListActivity<PersonalHistoryEntity, PersonalHomeVie
|
||||
mUnreadViewModel?.liveData?.observe(this, Observer {
|
||||
mAdapter?.setMessageUnreadData(it)
|
||||
})
|
||||
|
||||
mPath = intent.getStringExtra(EntranceUtils.KEY_PATH)
|
||||
mUserId = intent.getStringExtra(EntranceUtils.KEY_USER_ID)
|
||||
|
||||
mListViewModel.personalDataLD.observe(this, Observer {
|
||||
if (mListViewModel.userId == UserManager.getInstance().userId) {
|
||||
val data = mUserViewModel?.loginObsUserinfo?.value?.data
|
||||
@ -63,6 +68,8 @@ class PersonalHomeActivity : ListActivity<PersonalHistoryEntity, PersonalHomeVie
|
||||
it?.name = data.name!!
|
||||
it?.introduce = data.introduce
|
||||
}
|
||||
|
||||
trackMtaEvent(it?.name)
|
||||
mAdapter?.personalData = it
|
||||
mAdapter?.notifyDataSetChanged()
|
||||
})
|
||||
@ -98,12 +105,10 @@ class PersonalHomeActivity : ListActivity<PersonalHistoryEntity, PersonalHomeVie
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
trackMtaEvent()
|
||||
}
|
||||
|
||||
private fun trackMtaEvent() {
|
||||
DataUtils.onMtaEvent(this, "个人主页", mPath, mUserId)
|
||||
private fun trackMtaEvent(name: String? = "") {
|
||||
DataUtils.onMtaEvent(this, "个人主页", mPath, StringUtils.combineTwoString(name, mUserId))
|
||||
}
|
||||
|
||||
override fun onLoadRefresh() {
|
||||
|
||||
@ -88,7 +88,7 @@ public class ImagePagerAdapter extends RecyclingPagerAdapter {
|
||||
, "=", String.valueOf(getPosition(position) + 1)
|
||||
, "])");
|
||||
|
||||
DataUtils.onMtaEvent(mContext, "轮播图", mSource, String.valueOf(position));
|
||||
DataUtils.onMtaEvent(mContext, "轮播图", mSource, String.valueOf(getPosition(position) % mSlideEntityList.size() + 1));
|
||||
|
||||
switch (slideEntity.getType()) {
|
||||
case "game":
|
||||
|
||||
@ -214,7 +214,7 @@ public class GameDetailFragment extends NormalFragment {
|
||||
mTanBarXinXiTv.setTextColor(Color.BLACK);
|
||||
mTanBarXinXiTv.setBackgroundDrawable(new ColorDrawable(0));
|
||||
|
||||
DataUtils.onMtaEvent(getContext(), "游戏详情", "默认[动态]", mGameEntity.getName());
|
||||
DataUtils.onMtaEvent(getContext(), "游戏详情", "默认_动态", mGameEntity.getName());
|
||||
} else {
|
||||
mKaifuHint.setVisibility(View.GONE);
|
||||
mTanBarXinXiTv.setTextColor(Color.WHITE);
|
||||
@ -222,7 +222,7 @@ public class GameDetailFragment extends NormalFragment {
|
||||
mTanBarFuLiTv.setTextColor(Color.BLACK);
|
||||
mTanBarFuLiTv.setBackgroundDrawable(new ColorDrawable(0));
|
||||
|
||||
DataUtils.onMtaEvent(getContext(), "游戏详情", "默认[介绍]", mGameEntity.getName());
|
||||
DataUtils.onMtaEvent(getContext(), "游戏详情", "默认_介绍", mGameEntity.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ class FuLiAdapter(context: Context,
|
||||
holder.initItemPadding()
|
||||
holder.itemView.setOnClickListener {
|
||||
SuggestionActivity.startSuggestionActivity(mContext, SuggestType.gameQuestion, "game", mFuLiViewModel?.game?.name + ",问题反馈:")
|
||||
DataUtils.onMtaEvent(mContext, "游戏详情", "此游戏有问题?点击反馈", mFuLiViewModel?.game?.name)
|
||||
DataUtils.onMtaEvent(mContext, "游戏详情", "此游戏有问题_点击反馈", mFuLiViewModel?.game?.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -199,7 +199,7 @@ class FuLiAdapter(context: Context,
|
||||
viewHolder.newsMore.setOnClickListener {
|
||||
DataCollectionUtils.uploadClick(mContext, "资讯攻略-全部", "游戏详情", mFuLiViewModel?.game?.name)
|
||||
|
||||
DataUtils.onMtaEvent(mContext, "游戏详情", "资讯攻略[全部]", mFuLiViewModel?.game?.name)
|
||||
DataUtils.onMtaEvent(mContext, "游戏详情", "资讯攻略_全部", mFuLiViewModel?.game?.name)
|
||||
val intent = GameNewsActivity.getIntent(mContext, mFuLiViewModel?.game?.name, mFuLiViewModel?.game?.id,
|
||||
mEntrance + "+(游戏详情[" + mFuLiViewModel?.game?.name + "]:资讯攻略-全部)")
|
||||
mContext.startActivity(intent)
|
||||
|
||||
@ -152,7 +152,7 @@ class FuLiFragment : BaseFragment<Any>() {
|
||||
EventBus.getDefault().post(EBReuse("showKaifuHint"))
|
||||
} else if (GameDetailFragment.SCROLL_TO_KAIFU == reuse.type && layoutManager != null) {
|
||||
DataUtils.onMtaEvent(context, "游戏详情开服表按钮", mFuLiViewModel?.game?.name)
|
||||
DataUtils.onMtaEvent(context, "游戏详情", "开服表↓", mFuLiViewModel?.game?.name)
|
||||
DataUtils.onMtaEvent(context, "游戏详情", "开服表", mFuLiViewModel?.game?.name)
|
||||
val position = getServerPosition()
|
||||
if (position > 0) layoutManager?.smoothScrollToPosition(mRecyclerView, null, position)
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ public class PersonalFragment extends BaseFragment implements Observer<ApiRespon
|
||||
EntranceUtils.jumpActivity(getActivity(), bundle);
|
||||
|
||||
DataUtils.onMtaEvent(getActivity(), "消息弹窗",
|
||||
suffixText, "");
|
||||
suffixText, "Does not contains any parameter.");
|
||||
|
||||
Notifier.hide();
|
||||
})
|
||||
|
||||
@ -9,6 +9,7 @@ import android.text.Html;
|
||||
|
||||
import com.gh.common.util.DataUtils;
|
||||
import com.gh.common.util.LogUtils;
|
||||
import com.gh.common.util.StringUtils;
|
||||
import com.gh.gamecenter.qa.entity.AnswerDetailEntity;
|
||||
import com.gh.gamecenter.retrofit.Response;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
@ -41,14 +42,8 @@ public class AnswerDetailViewModel extends AndroidViewModel {
|
||||
|
||||
LogUtils.uploadAnswers(getApplication(), entrance, response.getQuestion(), answerId);
|
||||
|
||||
String uploadCount;
|
||||
String content = Html.fromHtml(response.getContent()).toString();
|
||||
if (content.length() > 30) {
|
||||
uploadCount = content.substring(0, 30);
|
||||
} else {
|
||||
uploadCount = content;
|
||||
}
|
||||
DataUtils.onMtaEvent(getApplication(), "详情页面", "答案详情", uploadCount);
|
||||
DataUtils.onMtaEvent(getApplication(), "详情页面", "答案详情", StringUtils.combineTwoString(content, answerId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,7 +4,7 @@ ext {
|
||||
compileSdkVersion = 27
|
||||
minSdkVersion = 14
|
||||
// TODO fix permission/ target 23 will cause permission issues
|
||||
targetSdkVersion = 22
|
||||
targetSdkVersion = 27
|
||||
|
||||
// application info
|
||||
versionCode = 26
|
||||
|
||||
Binary file not shown.
BIN
libraries/MTA/libs/mid-sdk-4.06.jar
Normal file
BIN
libraries/MTA/libs/mid-sdk-4.06.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
libraries/MTA/libs/mta-android-sdk-3.4.7.jar
Normal file
BIN
libraries/MTA/libs/mta-android-sdk-3.4.7.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user