开发者

Launching activity from another application not displaying the activity, but it is running

I've done a lot of searching for the last day and haven't found anything that seems to match the problem I'm having.

(For reasons I won't go into) the app is divided into two separate apks. Each have activities. Only the "core" apk has a MAIN activity that is launched from the Android Launcher. The "plugin" apk has activities that only exist to be called from the first apk's activities and does not have a Launcher icon.

The issue I'm having is that when I create an intent to launch an activity from the "plugin" apk, it does the "launching new activity" sliding animation but immediately bounces back. But it is actually launching the activity because I'm seeing log statements in logcat coming from the new activity. I'm not getting any exceptions and it seems to be working other than the fa开发者_如何学运维ct I'm not seeing the activity on the screen.

I've tried creating the intent in both of the following ways:

Intent myIntent = new Intent(Intent.ACTION_VIEW);
myIntent.setClassName("com.test.plugin", "com.test.plugin.PluginActivity");
startActivity(myIntent);

and

Intent myIntent = new Intent();
myIntent.setComponent(new ComponentName("com.test.plugin", "com.test.plugin.PluginActivity"));
startActivity(myIntent);

But both result in the same thing happening as described above.


It bounces back means the plugin activity has some problem in launching.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜