---
title: "APN(default、mms、supl、dun、hipri接入点类型的区别)"
author: "loving863"
date: "2013-10-10T19:31:38Z"
tags: []
categories: ["移动开发"]
slug: "apn-default-mms-supl-dun-hipri"
draft: false
lastmod: "2013-10-10T19:31:38Z"
id: 1954572
url: "https://jinguo.iteye.com/blog/1954572"
---

设置APN上网时，大家可能经常遇到这个问题：  
为什么有时要填写default有时要填写supl，而彩信又偏偏要mms？  
这个问题留到最后，让我们看看每个接入点类型的含义：  
英文原文来自于Google Android Developers  
原文连接:[http://developer.android.com/reference/android/net/ConnectivityManager.html](http://developer.android.com/reference/android/net/ConnectivityManager.html "ConnectivityManager")  
我尽量用通俗易懂的语言来解释每个类型的含义，若您是开发者，请尽量阅读英文原文。

1、default  
‍默认网络连接，当激活时所有数据传输都使用该连接，不能与其他网络连接同时使用

[?](http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples "WP-CodeBox HowTo?")[View Code]() JAVA

```
1
2
3
4
5
6
```

**\[java]** [view plain](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "view plain")[copy](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "copy")[print](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "print")[?](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "?")

 

1. &lt;span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;"&gt;/\**
2. \* The Default Mobile data connection. When active, all data traffic
3. \* will use this connection by default. Should not coexist with other
4. \* default connections.
5. \*/&lt;/span&gt;
6. &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;

**\[java]** [view plain](http://blog.csdn.net/chentaocba/article/details/7908856 "view plain")[copy](http://blog.csdn.net/chentaocba/article/details/7908856 "copy")[print](http://blog.csdn.net/chentaocba/article/details/7908856 "print")[?](http://blog.csdn.net/chentaocba/article/details/7908856 "?")

 

1. &lt;span style="color:#880000;font-style: italic; font-weight: bold;"&gt;/\**
2. * The Default Mobile data connection. When active, all data traffic
3. * will use this connection by default. Should not coexist with other
4. * default connections.
5. \*/&lt;/span&gt;
6. &lt;span style="color:#000000;font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color:#0660;font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE &lt;span style="color:#339933;"&gt;=&lt;/span&gt; &lt;span style="color:#cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color:#339933;"&gt;;&lt;/span&gt;

适用场合：绝大部分正常上网时可以使用  
2、mms  
彩信专用连接，此连接与default类似，用于与载体的多媒体信息服务器对话的应用程序，此连接能与default连接同时使用

[?](http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples "WP-CodeBox HowTo?")[View Code]() JAVA

```
1
2
3
4
5
6
7
```

**\[java]** [view plain](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "view plain")[copy](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "copy")[print](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "print")[?](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "?")

 

1. &lt;span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;"&gt;/\**
2. \* An MMS-specific Mobile data connection. This connection may be the
3. \* same as TYPE\_MOBILE but it may be different. This is used
4. \* by applications needing to talk to the carrier's Multimedia Messaging
5. \* Service servers. It may coexist with default data connections.
6. \*/&lt;/span&gt;
7. &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_MMS &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;

**\[java]** [view plain](http://blog.csdn.net/chentaocba/article/details/7908856 "view plain")[copy](http://blog.csdn.net/chentaocba/article/details/7908856 "copy")[print](http://blog.csdn.net/chentaocba/article/details/7908856 "print")[?](http://blog.csdn.net/chentaocba/article/details/7908856 "?")

 

1. &lt;span style="color:#880000;font-style: italic; font-weight: bold;"&gt;/\**
2. * An MMS-specific Mobile data connection. This connection may be the
3. * same as TYPE\_MOBILE but it may be different. This is used
4. * by applications needing to talk to the carrier's Multimedia Messaging
5. * Service servers. It may coexist with default data connections.
6. \*/&lt;/span&gt;
7. &lt;span style="color:#000000;font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color:#0660;font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_MMS &lt;span style="color:#339933;"&gt;=&lt;/span&gt; &lt;span style="color:#cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color:#339933;"&gt;;&lt;/span&gt;

适用场合：使用彩信服务时，必须有mms类型的接入点，不必选中，应用程序会自动使用此接入点  
3、supl  
是Secure User Plane Location“安全用户面定位”的简写，此连接与default类似，用于帮助定位设备与载体的安全用户面定位服务器对话的应用程序，此连接能与default连接同时使用

[?](http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples "WP-CodeBox HowTo?")[View Code]() JAVA

```
1
2
3
4
5
6
7
8
9
```

**\[java]** [view plain](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "view plain")[copy](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "copy")[print](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "print")[?](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "?")

 

1. &lt;span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;"&gt;/\**
2. \* A SUPL-specific Mobile data connection. This connection may be the
3. \* same as {@link #TYPEMOBILE} but it may be different. This is used
4. \* by applications needing to talk to the carrier's Secure User Plane
5. \* Location servers for help locating the device. It may coexist with
6. \* default data connections.
7. \* {@hide}
8. \*/&lt;/span&gt;
9. &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_SUPL &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;

**\[java]** [view plain](http://blog.csdn.net/chentaocba/article/details/7908856 "view plain")[copy](http://blog.csdn.net/chentaocba/article/details/7908856 "copy")[print](http://blog.csdn.net/chentaocba/article/details/7908856 "print")[?](http://blog.csdn.net/chentaocba/article/details/7908856 "?")

 

1. &lt;span style="color:#880000;font-style: italic; font-weight: bold;"&gt;/\**
2. * A SUPL-specific Mobile data connection. This connection may be the
3. * same as {@link #TYPEMOBILE} but it may be different. This is used
4. * by applications needing to talk to the carrier's Secure User Plane
5. * Location servers for help locating the device. It may coexist with
6. * default data connections.
7. * {@hide}
8. \*/&lt;/span&gt;
9. &lt;span style="color:#000000;font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color:#0660;font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_SUPL &lt;span style="color:#339933;"&gt;=&lt;/span&gt; &lt;span style="color:#cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color:#339933;"&gt;;&lt;/span&gt;

适用场合:需要自动切换wap与net接入点的、需要把手机当临时AP的  
对SUPL技术感兴趣的朋友，不妨看下以下文章  
[SUPL技术(一)http://blog.sina.com.cn/s/blog\_537f4a11010008tw.html](http://blog.sina.com.cn/s/blog_537f4a11010008tw.html "SUPL技术(一)")  
[SUPL技术(二)http://blog.sina.com.cn/s/blog\_537f4a11010008uf.html](http://blog.sina.com.cn/s/blog_537f4a11010008uf.html "SUPL技术(二)")  
[SUPL技术(三)http://blog.sina.com.cn/s/blog\_537f4a11010008ws.html](http://blog.sina.com.cn/s/blog_537f4a11010008ws.html "SUPL技术(三)")  
[SUPL技术(四)http://blog.sina.com.cn/s/blog\_537f4a11010008yf.html](http://blog.sina.com.cn/s/blog_537f4a11010008yf.html "SUPL技术(四)")  
4、dun  
Dial Up Networking拨号网络的简称，此连接与default连接类似，用于执行一个拨号网络网桥，使载体能知道拨号网络流量的应用程序，此连接能与default连接同时使用

[?](http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples "WP-CodeBox HowTo?")[View Code]() JAVA

```
1
2
3
4
5
6
7
8
```

**\[java]** [view plain](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "view plain")[copy](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "copy")[print](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "print")[?](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "?")

 

1. &lt;span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;"&gt;/\**
2. \* A DUN-specific Mobile data connection. This connection may be the
3. \* same as {@link #TYPEMOBILE} but it may be different. This is used
4. \* by applicaitons performing a Dial Up Networking bridge so that
5. \* the carrier is aware of DUN traffic. It may coexist with default data
6. \* connections.
7. \*/&lt;/span&gt;
8. &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_DUN &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;

**\[java]** [view plain](http://blog.csdn.net/chentaocba/article/details/7908856 "view plain")[copy](http://blog.csdn.net/chentaocba/article/details/7908856 "copy")[print](http://blog.csdn.net/chentaocba/article/details/7908856 "print")[?](http://blog.csdn.net/chentaocba/article/details/7908856 "?")

 

1. &lt;span style="color:#880000;font-style: italic; font-weight: bold;"&gt;/\**
2. * A DUN-specific Mobile data connection. This connection may be the
3. * same as {@link #TYPEMOBILE} but it may be different. This is used
4. * by applicaitons performing a Dial Up Networking bridge so that
5. * the carrier is aware of DUN traffic. It may coexist with default data
6. * connections.
7. \*/&lt;/span&gt;
8. &lt;span style="color:#000000;font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color:#0660;font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_DUN &lt;span style="color:#339933;"&gt;=&lt;/span&gt; &lt;span style="color:#cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color:#339933;"&gt;;&lt;/span&gt;

适用场合：需要使用运营商无线热点的，CMCC、ChinaNet等  
5、hipri  
高优先级网络，与default类似，但路由设置不同。  
只有当进程访问移动DNS服务器，并明确要求使用requestRouteToHost(int, int)才会使用此连接  
（这个我也不太懂，翻译的应该很有问题….）

[?](http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples "WP-CodeBox HowTo?")[View Code]() JAVA

```
1
2
3
4
5
6
7
8
9
```

**\[java]** [view plain](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "view plain")[copy](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "copy")[print](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "print")[?](http://blog.csdn.net/alex_nuaa01/article/details/7344699 "?")

 

1. &lt;span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;"&gt;/\**
2. \* A High Priority Mobile data connection. This connection is typically
3. \* the same as {@link #TYPEMOBILE} but the routing setup is different.
4. \* Only requesting processes will have access to the Mobile DNS servers
5. \* and only IP's explicitly requested via {@link #requestRouteToHost}
6. \* will route over this interface.
7. \*{@hide}
8. \*/&lt;/span&gt;
9. &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_HIPRI &lt;span style="color: rgb(51, 153, 51);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(204, 102, 204);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(51, 153, 51);"&gt;;&lt;/span&gt;

**\[java]** [view plain](http://blog.csdn.net/chentaocba/article/details/7908856 "view plain")[copy](http://blog.csdn.net/chentaocba/article/details/7908856 "copy")[print](http://blog.csdn.net/chentaocba/article/details/7908856 "print")[?](http://blog.csdn.net/chentaocba/article/details/7908856 "?")

 

1. &lt;span style="color:#880000;font-style: italic; font-weight: bold;"&gt;/\**
2. * A High Priority Mobile data connection. This connection is typically
3. * the same as {@link #TYPEMOBILE} but the routing setup is different.
4. * Only requesting processes will have access to the Mobile DNS servers
5. * and only IP's explicitly requested via {@link #requestRouteToHost}
6. * will route over this interface.
7. \*{@hide}
8. \*/&lt;/span&gt;
9. &lt;span style="color:#000000;font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color:#000000;font-weight: bold;"&gt;final&lt;/span&gt; &lt;span style="color:#0660;font-weight: bold;"&gt;int&lt;/span&gt; TYPE\_MOBILE\_HIPRI &lt;span style="color:#339933;"&gt;=&lt;/span&gt; &lt;span style="color:#cc