|
|
@@ -1,6 +1,7 @@
|
|
|
package com.sheep.gamegroup.view.activity;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
+import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
|
@@ -11,11 +12,14 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sheep.gamegroup.model.api.BaseMessageConverter;
|
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
|
import com.sheep.gamegroup.model.entity.SlideshowEty;
|
|
|
+import com.sheep.gamegroup.module.home.api.MainAction;
|
|
|
import com.sheep.gamegroup.util.ActionUtil;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.bean.UserCenterModule;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
|
@@ -44,14 +48,20 @@ public class MiddleSchemeAct extends Activity {
|
|
|
return;
|
|
|
switch (action) {
|
|
|
case Intent.ACTION_VIEW:
|
|
|
+ finish();
|
|
|
Uri uri = intent.getData();
|
|
|
if (uri != null) {
|
|
|
// 完整的url信息
|
|
|
- if (TestUtil.isTest())
|
|
|
- G.showToast(uri.toString());
|
|
|
- parseAndJumpUri(this, uri);
|
|
|
+// if (TestUtil.isTest())
|
|
|
+// G.showToast(uri.toString());
|
|
|
+ LogUtil.println("SheepApp mActivityCount" + SheepApp.getInstance().mActivityCount);
|
|
|
+ if(SheepApp.getInstance().mActivityCount == 0) {
|
|
|
+ ActionUtil.getInstance().addNextAction(ActMain.class.getSimpleName(), uri);
|
|
|
+ tryGoSplashAct(SheepApp.getInstance(), uri);
|
|
|
+ } else {
|
|
|
+ parseAndJumpUri(SheepApp.getInstance().getCurrentActivity(), uri);
|
|
|
+ }
|
|
|
}
|
|
|
- finish();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -125,6 +135,13 @@ public class MiddleSchemeAct extends Activity {
|
|
|
runApp(activity, packageName, className);
|
|
|
}
|
|
|
break;
|
|
|
+ //sheep://small.kfzs.com/xmy?type=cc
|
|
|
+ case "check_copy":
|
|
|
+ case "cc":
|
|
|
+// ActionUtil.getInstance().addNextAction(ActMain.class.getSimpleName(), MainAction.CHECK_COPY);
|
|
|
+// tryGoSplashAct(activity, uri);
|
|
|
+ CommonUtil.getInstance().checkCopyText();
|
|
|
+ break;
|
|
|
}
|
|
|
// LogUtil.println("ActMain", "checkScheme","url: " + url);
|
|
|
// // scheme部分
|
|
|
@@ -173,12 +190,11 @@ public class MiddleSchemeAct extends Activity {
|
|
|
* ActMain checkScheme query: code=976873
|
|
|
* ActMain checkScheme code: 976873
|
|
|
*/
|
|
|
- public static void tryGoSplashAct(Activity activity, Uri uri) {
|
|
|
+ public static void tryGoSplashAct(Context context, Uri uri) {
|
|
|
String game_id = uri.getQueryParameter("game_id");
|
|
|
if(!TextUtils.isEmpty(game_id))//有game_id时设置game_id的回调到主页,用于展示会长推广弹出框
|
|
|
ActionUtil.getInstance().addNextAction(SHOW_DIALOG_GAME_OR_GIFT_TASK, game_id);
|
|
|
- Jump2View.getInstance().newTaskTopStartAct(activity, SplashAct.class, null);
|
|
|
-
|
|
|
+ Jump2View.getInstance().newTaskTopStartAct(context, SplashAct.class, null);
|
|
|
}
|
|
|
|
|
|
//展示会长推广弹出框的key
|