---
title: "启动其他应用的activity"
author: "xinanadu"
date: "2013-08-30T15:23:41Z"
tags: []
categories: ["移动开发"]
slug: "activity"
draft: false
lastmod: "2013-08-30T15:24:13Z"
id: 1934023
url: "https://zhegui.iteye.com/blog/1934023"
---

启动其他应用的activity，只需要两个东西。该应用的包名，被启动的activity的class全名。两个都是String类型。参考android文档：

```
 Intent android.content.Intent.setClassName(String packageName, String className)
```

 还需一点：被启动的activity需设置标签：

```
 android:exported="true"
```

 

这样就够了！