设置APN上网时,大家可能经常遇到这个问题:
为什么有时要填写default有时要填写supl,而彩信又偏偏要mms?
这个问题留到最后,让我们看看每个接入点类型的含义:
英文原文来自于Google Android Developers
原文连接:http://developer.android.com/reference/android/net/ConnectivityManager.html
我尽量用通俗易懂的语言来解释每个类型的含义,若您是开发者,请尽量阅读英文原文。
1、default
默认网络连接,当激活时所有数据传输都使用该连接,不能与其他网络连接同时使用
1
2
3
4
5
6
|
- <span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;">
- </span>
- <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">static</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">final</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">int</span> TYPE_MOBILE <span style="color: rgb(51, 153, 51);">=</span> <span style="color: rgb(204, 102, 204);">0</span><span style="color: rgb(51, 153, 51);">;</span>
- <span style="color:#880000;font-style: italic; font-weight: bold;">
-
-
-
- </span>
- <span style="color:#000000;font-weight: bold;">public</span> <span style="color:#000000;font-weight: bold;">static</span> <span style="color:#000000;font-weight: bold;">final</span> <span style="color:#0660;font-weight: bold;">int</span> TYPE_MOBILE <span style="color:#339933;">=</span> <span style="color:#cc66cc;">0</span><span style="color:#339933;">;</span>
|
适用场合:绝大部分正常上网时可以使用
2、mms
彩信专用连接,此连接与default类似,用于与载体的多媒体信息服务器对话的应用程序,此连接能与default连接同时使用
1
2
3
4
5
6
7
|
- <span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;">
- </span>
- <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">static</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">final</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">int</span> TYPE_MOBILE_MMS <span style="color: rgb(51, 153, 51);">=</span> <span style="color: rgb(204, 102, 204);">2</span><span style="color: rgb(51, 153, 51);">;</span>
- <span style="color:#880000;font-style: italic; font-weight: bold;">
-
-
-
-
- </span>
- <span style="color:#000000;font-weight: bold;">public</span> <span style="color:#000000;font-weight: bold;">static</span> <span style="color:#000000;font-weight: bold;">final</span> <span style="color:#0660;font-weight: bold;">int</span> TYPE_MOBILE_MMS <span style="color:#339933;">=</span> <span style="color:#cc66cc;">2</span><span style="color:#339933;">;</span>
|
适用场合:使用彩信服务时,必须有mms类型的接入点,不必选中,应用程序会自动使用此接入点
3、supl
是Secure User Plane Location“安全用户面定位”的简写,此连接与default类似,用于帮助定位设备与载体的安全用户面定位服务器对话的应用程序,此连接能与default连接同时使用
1
2
3
4
5
6
7
8
9
|
- <span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;">
- </span>
- <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">static</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">final</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">int</span> TYPE_MOBILE_SUPL <span style="color: rgb(51, 153, 51);">=</span> <span style="color: rgb(204, 102, 204);">3</span><span style="color: rgb(51, 153, 51);">;</span>
- <span style="color:#880000;font-style: italic; font-weight: bold;">
-
-
-
-
-
-
- </span>
- <span style="color:#000000;font-weight: bold;">public</span> <span style="color:#000000;font-weight: bold;">static</span> <span style="color:#000000;font-weight: bold;">final</span> <span style="color:#0660;font-weight: bold;">int</span> TYPE_MOBILE_SUPL <span style="color:#339933;">=</span> <span style="color:#cc66cc;">3</span><span style="color:#339933;">;</span>
|
适用场合:需要自动切换wap与net接入点的、需要把手机当临时AP的
对SUPL技术感兴趣的朋友,不妨看下以下文章
SUPL技术(一)http://blog.sina.com.cn/s/blog_537f4a11010008tw.html
SUPL技术(二)http://blog.sina.com.cn/s/blog_537f4a11010008uf.html
SUPL技术(三)http://blog.sina.com.cn/s/blog_537f4a11010008ws.html
SUPL技术(四)http://blog.sina.com.cn/s/blog_537f4a11010008yf.html
4、dun
Dial Up Networking拨号网络的简称,此连接与default连接类似,用于执行一个拨号网络网桥,使载体能知道拨号网络流量的应用程序,此连接能与default连接同时使用
1
2
3
4
5
6
7
8
|
- <span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;">
- </span>
- <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">static</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">final</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">int</span> TYPE_MOBILE_DUN <span style="color: rgb(51, 153, 51);">=</span> <span style="color: rgb(204, 102, 204);">4</span><span style="color: rgb(51, 153, 51);">;</span>
- <span style="color:#880000;font-style: italic; font-weight: bold;">
-
-
-
-
-
- </span>
- <span style="color:#000000;font-weight: bold;">public</span> <span style="color:#000000;font-weight: bold;">static</span> <span style="color:#000000;font-weight: bold;">final</span> <span style="color:#0660;font-weight: bold;">int</span> TYPE_MOBILE_DUN <span style="color:#339933;">=</span> <span style="color:#cc66cc;">4</span><span style="color:#339933;">;</span>
|
适用场合:需要使用运营商无线热点的,CMCC、ChinaNet等
5、hipri
高优先级网络,与default类似,但路由设置不同。
只有当进程访问移动DNS服务器,并明确要求使用requestRouteToHost(int, int)才会使用此连接
(这个我也不太懂,翻译的应该很有问题….)
1
2
3
4
5
6
7
8
9
|
- <span style="color: rgb(8, 0, 0); font-style: italic; font-weight: bold;">
- </span>
- <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">static</span> <span style="color: rgb(0, 0, 0); font-weight: bold;">final</span> <span style="color: rgb(0, 102, 0); font-weight: bold;">int</span> TYPE_MOBILE_HIPRI <span style="color: rgb(51, 153, 51);">=</span> <span style="color: rgb(204, 102, 204);">5</span><span style="color: rgb(51, 153, 51);">;</span>
- <span style="color:#880000;font-style: italic; font-weight: bold;">
-
-
-
-
-
-
- </span>
- <span style="color:#000000;font-weight: bold;">public</span> <span style="color:#000000;font-weight: bold;">static</span> <span style="color:#000000;font-weight: bold;">final</span> <span style="color:#0660;font-weight: bold;">int</span> TYPE_MOBILE_HIPRI <span style="color:#339933;">=</span> <span style="color:#cc
|
分享到:
相关推荐
2011年全球APN接入点完整版;安卓开发必备!
中国移动 联通 电信 三大运营商 网络接入点设置详细介绍
全球运营商 apn 接口点参考表格
通过修改androidprovider。java源码,实现修改和获取APN的接口
全球定位系统各国运营商APN接入点名称,对于进行无线开发的工程师需要了解各国apn接入点
Wap接入点主要针对手机应用,如WAP上网浏览WAP开头的网页,移动业务及服务,一些JAVA第三方软件应用等!目前移动两种接入点已经基本融合,好处就我们可以不用通过代理服务器10.0.0.172:80,就可以访问到WWW的网页!对于老...
设置移动、联通、电信wap接入点,只是一个简单的demo
中国移动上网APN设置按照以上的设置方法就可以使用 net上网,wap飞信,彩信收发 这三种功能,如果需要上飞信,那就要选择第三项的设置,才能上,如果要上网上QQ的话,那就要选择第一项的设置!!
Wap接入点主要针对手机应用,如WAP上网浏览WAP开头的网页,移动业务及服务,一些JAVA第三方软件应用等!目前移动两种接入点已经基本融合,好处就我们可以不用通过代理服务器10.0.0.172:80,就可以访问到WWW的网页!对于老...
无线监控APN~接入方案.doc
无线APN接入方案.doc
Wap接入点主要针对手机应用,如WAP上网浏览WAP开头的网页,移动业务及服务,一些JAVA第三方软件应用等!目前移动两种接入点已经基本融合,好处就我们可以不用通过代理服务器10.0.0.172:80,就可以访问到WWW的网页!对于老...
寻找无线接入点利器,Network Stumbler对一定区域内的无线电信号进行扫描,如果在这一区域内存在接入点或是同类适配器的话,它将列出搜索结果和一些相关的重要信息。
世界各地运营商接入点名称,在使用无线数据传输中非常重要;
为了解决这个问题,我安装了增强接入点控制,选择GSM与CMNET,但依然不给力,这该怎么办? 1.手机无法上网 2.下载使用“增强接入点”软件设置为“GSM”与"cmnet"依然不能上网 根据zjx3456的建议,使用“省电宝”的...
附件为apndemo,apn.xml需放到U盘或者sd卡根目录,在有信号的时候插卡或U盘3秒后配置成功
国内运营商,中国移动,联通,电信,android上网APN
APN的英文全称是Access Point Name,中文全称叫接入点,是您在通过手机上网时必须配置的一个参数,它决定了您的手机通过哪种接入方式来访问网络。 有时候需要修改APN的时候会发现无法更改,连常用的海卓HIAPN都无法...
采用mfc编码,编译后放到真机中就可出线上网的标志,一般是E
APN指一种网络接入技术,是通过手机上网时必须配置的一个参数,它决定了手机通过哪种接入方式来访问网络。