---
title: "Android 系统操作"
author: "zeroblue"
date: "2011-08-17T09:08:14Z"
tags: []
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2011-08-17T09:08:14Z"
id: 1150976
url: "https://zeroblue.iteye.com/blog/1150976"
---

```java

//得到存储卡路径
public static String getSDCardPath() {
		boolean sdCardExist = Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED); // 判断sd卡是否存在
		if (sdCardExist) {
			File sdDir = Environment.getExternalStorageDirectory();// 获取跟目录
			return sdDir.getPath();
		}
		return null;

	}

```