我要调用一个活动,是在另一个包......
I want to call an activity that is in another package....
比方说我有一个活动
(活动1)在我的包
(包1),我需要调用另一个活动
(活性2)在另一包
(包2)从我的活动1。
Say for example I have an Activity
(activity1) in my package
(package1) and I need to call another Activity
(activity2) in another package
(package2) from my activity1..
我试图导入程序包2在我的包1,但它没有工作... 谁能回答我,并提供一些示例code?
I have tried to import the package2 in my package1 but it did not work... Can anyone answer me and provide some sample code?
看 Android:启动一个活动为不同的第三方应用
final Intent intentDeviceTest = new Intent("android.intent.action.MAIN");
intentDeviceTest.setComponent(new ComponentName("fm.last.android","fm.last.android.LastFm"));
startActivity(intentDeviceTest);
在这里你可以改变这取决于你的情况下,意图视图。
where you can change the intent to VIEW depending on your case.
上一篇:启动活动与后退按钮按钮