增加意见反馈页面的跳转支持
This commit is contained in:
@ -2,6 +2,7 @@ package com.gh.gamecenter;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.gh.base.BaseActivity;
|
||||
import com.gh.common.util.RunningUtils;
|
||||
@ -18,7 +19,10 @@ public class SkipActivity extends BaseActivity {
|
||||
|
||||
if (getIntent() != null) {
|
||||
String host = getIntent().getData().getHost();
|
||||
String id = getIntent().getData().getPath().substring(1);
|
||||
String id = getIntent().getData().getPath();
|
||||
if (!TextUtils.isEmpty(id)) {
|
||||
id = id.substring(1);
|
||||
}
|
||||
Intent intent = new Intent();
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra("entrance", "(网页跳转)");
|
||||
@ -34,6 +38,8 @@ public class SkipActivity extends BaseActivity {
|
||||
intent.setClass(this, SubjectActivity.class);
|
||||
intent.putExtra("id", id);
|
||||
intent.putExtra("name", getIntent().getData().getQueryParameter("name"));
|
||||
} else if ("suggestion".equals(host)) {
|
||||
intent.setClass(this, SuggestionActivity.class);
|
||||
}
|
||||
} else {
|
||||
// 应用未在运行
|
||||
@ -51,8 +57,9 @@ public class SkipActivity extends BaseActivity {
|
||||
intent.putExtra("to", "SubjectActivity");
|
||||
intent.putExtra("id", id);
|
||||
intent.putExtra("name", getIntent().getData().getQueryParameter("name"));
|
||||
} else if ("suggestion".equals(host)) {
|
||||
intent.putExtra("to", "SuggestionActivity");
|
||||
}
|
||||
|
||||
}
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user