基站定位

blueduan1985 2010-06-11 02:06:35
请问J2ME如何通过基站获取位置信息呢。
我查了一些资料,说是要获取cellid和lac,还需要获取其他字段吗?
这些字段是通过什么样的方式获取呢?
我知道J2ME对基站的支持不好,但我想知道,对于支持的机型是如何操作的。
...全文
292 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
blueduan1985 2010-07-05
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 hellogv 的回复:]

这个就是取得基站ID的代码。。。。但是,绝大多数J2ME手机都是读取不了CELL ID 或者LAC,为什么读取不了?因为读取CELL ID 和 LAC压根就不是规范之一,厂家对其支持参差不齐。。。。[/Quote]

原来是这样啊
blueduan1985 2010-07-05
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wangmh 的回复:]

String info = System.getProperty("microedition.platform");
//获取到imei号码
String imei = "";
//cellid
String cellid = "";
//lac
String lac = "";
……
[/Quote]

虽然你发的这些我之前已经在网上搜到了,但还是谢谢。
欧巴Godwin 2010-07-04
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wangmh 的回复:]

String info = System.getProperty("microedition.platform");
//获取到imei号码
String imei = "";
//cellid
String cellid = "";
//lac
String lac = "";
……
[/Quote]
这个就是取得基站ID的代码。。。。但是,绝大多数J2ME手机都是读取不了CELL ID 或者LAC,为什么读取不了?因为读取CELL ID 和 LAC压根就不是规范之一,厂家对其支持参差不齐。。。。
wangmh 2010-07-02
  • 打赏
  • 举报
回复
String info = System.getProperty("microedition.platform");
//获取到imei号码
String imei = "";
//cellid
String cellid = "";
//lac
String lac = "";
// #if polish.vendor==Sony-Ericsson
imei = System.getProperty("com.sonyericsson.imei");
//参考 http://forums.sun.com/thread.jspa?threadID=5278668
//https://developer.sonyericsson.com/message/110949
cellid = System.getProperty("com.sonyericsson.net.cellid");
//获取索爱机子的
lac = System.getProperty("com.sonyericsson.net.lac");
// #else if polish.vendor==Nokia
imei = System.getProperty("phone.imei");
if (imei == null || "".equals(imei)) {
imei = System.getProperty("com.nokia.IMEI");
}
if (imei == null || "".equals(imei)) {
imei = System.getProperty("com.nokia.mid.imei");
}
//获取到cellid
//参考http://wiki.forum.nokia.com/index.php/CS000947_-_Getting_Cell_ID_in_Java_ME
// #if polish.group==Series60
cellid = System.getProperty("com.nokia.mid.cellid");
// #else if polish.group==Series40
cellid = System.getProperty("Cell-ID");
// #endif
// #else if polish.vendor==Siemens
imei = System.getProperty("com.siemens.imei");
// #else if polish.vendor==Motorola
imei = System.getProperty("com.motorola.IMEI");
//cellid 参考 http://web.mit.edu/21w.780/www/spring2007/guide/
cellid = System.getProperty("CellID");
lac=System.getProperty("LocAreaCode");
// #else if polish.vendor==Samsung
imei = System.getProperty("com.samsung.imei");
// #endif

if (imei == null || "".equals(imei)) {
imei = System.getProperty("IMEI");
}
blueduan1985 2010-06-29
  • 打赏
  • 举报
回复
帖子这么就都没人解答吗
blueduan1985 2010-06-13
  • 打赏
  • 举报
回复
这两天没有高手来论坛吗?
怎么都是帮顶的,没有解决问题的呢。
郁闷。
一名程序员 2010-06-11
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 shine333 的回复:]
不懂,但是感兴趣
[/Quote]同样!
blueduan1985 2010-06-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 youanyyou 的回复:]

J2ME看来问题比较多。。暂时解决不了。。看来有必要学习下j2me了哈哈
[/Quote]

[Quote=引用 2 楼 shine333 的回复:]

不懂,但是感兴趣
[/Quote]

感谢1L,2L帮顶

有没有高手清楚的啊
shine333 2010-06-11
  • 打赏
  • 举报
回复
不懂,但是感兴趣
Java技术栈 2010-06-11
  • 打赏
  • 举报
回复
J2ME看来问题比较多。。暂时解决不了。。看来有必要学习下j2me了哈哈

13,100

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧