推送消息跳转

This commit is contained in:
huangzhuanghua
2016-12-26 15:31:21 +08:00
parent be4fc50ae0
commit f2500aeb6e
23 changed files with 176 additions and 88 deletions

View File

@ -27,6 +27,7 @@ import android.widget.TextView;
import com.gh.base.BaseFragmentActivity;
import com.gh.common.constant.Config;
import com.gh.common.util.ClassUtils;
import com.gh.common.util.DataCollectionUtils;
import com.gh.common.util.DataLogUtils;
import com.gh.common.util.DataUtils;
@ -43,7 +44,6 @@ import com.gh.download.DataWatcher;
import com.gh.download.DownloadEntity;
import com.gh.download.DownloadManager;
import com.gh.download.DownloadStatus;
import com.gh.gamecenter.db.GiftDao;
import com.gh.gamecenter.db.info.ConcernInfo;
import com.gh.gamecenter.db.info.GameInfo;
import com.gh.gamecenter.entity.ApkEntity;
@ -403,6 +403,7 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
handler.postDelayed(skipRun, 500);
Log.e("TD_CHANNEL_ID", (String) PackageUtils.getMetaData(this, getPackageName(), "TD_CHANNEL_ID"));
Log.e("device", TokenUtils.getDeviceId(this));
}
private void updateUserGhzs() {
@ -871,7 +872,7 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
isSkipped = true;
String to = getIntent().getStringExtra("to");
if(!TextUtils.isEmpty(to)){
Class<?> clazz = intentClass(to);
Class<?> clazz = ClassUtils.forName(to);
if (clazz != null) {
Intent skipIntent = new Intent(MainActivity.this, clazz);
@ -895,20 +896,6 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
}
};
private Class<?> intentClass(String to) {
if ("NewsActivity".equals(to)) {
to = "NewsDetailActivity";
} else if ("GameDetailsActivity".equals(to)) {
to = "GameDetailActivity";
}
try {
return Class.forName("com.gh.gamecenter." + to);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
private void getSearchHints() {
RetrofitManager.getApi().getSearchHints()
.subscribeOn(Schedulers.io())