diff --git a/replugin-sample/plugin/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/MainActivity.java b/replugin-sample/plugin/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/MainActivity.java index ba1ab11..a2ed8e0 100644 --- a/replugin-sample/plugin/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/MainActivity.java +++ b/replugin-sample/plugin/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/MainActivity.java @@ -178,7 +178,15 @@ public class MainActivity extends Activity { RePlugin.startActivity(v.getContext(), intent, "demo2", null); } })); - + mItems.add(new TestItem("Activity: start Host activity(Main)", new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(); + intent.setComponent(new ComponentName(RePlugin.getHostContext().getPackageName(), "com.qihoo360.replugin.sample.host.MainActivity")); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + MainActivity.this.startActivity(intent); + } + })); // ========= // Other Components