-
08-06-2012, 02:37 PM #1Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Lấy Cell ID trên máy Nokia 2730 classic được không???
Tôi muốn lấy địa chỉ Cell Id trên 2730 classic , tìm hiểu trên mạng có được source:
Mã:import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class CellIDMIDlet extends MIDlet implements CommandListener { private Form form; private Command exitCommand; private String S40_cell_id; // Series 40 cell id property private String S60_cell_id; // S60 cell id property public void startApp() { form = new Form("Getting Cell ID"); S40_cell_id = System.getProperty("Cell-ID"); S60_cell_id = System.getProperty("com.nokia.mid.cellid"); form.append("Series 40 devices: " + S40_cell_id + " "); form.append("S60 devices: " + S60_cell_id); exitCommand = new Command("Exit", Command.EXIT, 1); form.setCommandListener(this); form.addCommand(exitCommand); Display.getDisplay(this).setCurrent(form); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c, Displayable d) { if (c == exitCommand) this.notifyDestroyed(); } }
Mã:www.developer.nokia.com/Community/Wiki/CS000947_-_Getting_Cell_ID_in_Java_ME
Vậy làm sao bầy giờ? Làm sao lấy cell id trên 2730? Hay 2730 ko có API : System.getProperty("Cell-ID"); ???View more random threads:
- Xin source code ứng dụng đọc file .prc Nguồn bài viết : DroidViet.Com Xin source code ứng dụng đọc file .prc
- Cung cấp phân hữu cơ nhật số lượng lớn
- Cách liên lạc các package giữa 2 project?
- Giúp đở về SQLite Administrator và Android Studio
- Share code full game giống flappy bird
- Cách ghi Bitmap vào SDCARD trong Android?
- Xoay mành hình trong service theo hướng của máy
- Tài liệu lập trình java trên symbian s60v5
- Tại sao mỗi lần Run Application Eclipse lại bật 1 Vitual Device lên?
- lỗi Khi chạy ứng dụng trên điện thoại thì chỉ xuất hiện màn hình đen trên máy ảo thì vẫn chạy tốt
-
14-06-2012, 09:16 AM #2Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
bạn sửa lại làm startApp như sau xem nó in ra lỗi gì nhé
Mã:public void startApp() { form = new Form("Getting Cell ID"); try { Class.forName("com.nokia.mid.cellid"); S40_cell_id = System.getProperty("Cell-ID"); S60_cell_id = System.getProperty("com.nokia.mid.cellid"); form.append("Series 40 devices: " + S40_cell_id + " "); form.append("S60 devices: " + S60_cell_id); exitCommand = new Command("Exit", Command.EXIT, 1); form.setCommandListener(this); form.addCommand(exitCommand); } catch (ClassNotFoundException ex) { form.append("[loi:" + ex.getMessage() + "]"); } Display.getDisplay(this).setCurrent(form); }
-
15-06-2012, 04:57 PM #3Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Máy báo lỗi
Mã:[loi:comokia/mid/cellid]
Chắc là cái con 2730 classic của mình ko lấy được Cell ID roài. buồn...
-
15-06-2012, 06:38 PM #4Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
có nghĩa là class com.nokia.mid.cellid không tồn tại !
nhìn lại đoạn code của bạn thì lỗi là đúng rùi, vì Nokia 2730 classic xài Sybian s40, bạn check cả code của S60 song song đương nhiên là lỗi.
- vấn đề Cell-ID null có thể bạn phải mua signing từ Nokia để chứng nhận ứng dụng của bạn là strust application.
Ngọc Bích xanh bản chất thuộc dòng đá đá hoa (jade). Và cẩm thạch là tên gọi chung của ngọc bích. Vì thực chất chúng thuộc dòng đá đa khoáng được hình thành từ chất Silicat dưới dạng dioxy. Ngọc bích...
Chia sẻ Vòng tay ngọc bích xanh là...