从外部活动调用活动 [英] calling activity from external Activity

查看:105
本文介绍了从外部活动调用活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想首先这是不包括在我原来的apk文件的活动。 我该怎么办呢?其它活动被包含在另一个的apk这是目前应用的previous版本。 谢谢, 的Eyal。

I'd like to start an Activity which is not included in my original .apk. How can I do so? the other Activity is contained in another .apk which is previous version of the current application. Thanks, Eyal.

推荐答案

这是一个好方法,如果你只知道包名称:

This method is good if you only know the package name:

PackageManager pm = getPackageManager();
Intent intent = pm.getLaunchIntentForPackage("com.the.other.app");
startActivity(intent);

这篇关于从外部活动调用活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆