-
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:
- Hướng dẫn làm quen với Android Studio
- Nhờ các bác pro lập trình android 1 chút!
- Lỗi trong file strings.xml khi tiến hành quá trình export ra file .APK
- Giúp đỡ về touch event trong DrawerLayout
- Tham gia vào Google Developer Group của Google
- Đo khoảng cách giữa thiết bị android với điểm phát wifi ?
- Cách thiết lập môi trường Biên dịch Android-x86 trên Ubuntu 32bit
- Nhúng video youtube vào app android
- Cắt 1 ảnh lớn ra n ảnh nhỏ bằng nhau ?
- Tạo db với SQLite ở trong project như nào???
-
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.
Vệ sinh cá nhân là một phần quan yếu của sức khỏe nam giới. Dùng dung dịch vệ sinh mỗi ngày mang lại nhiều ích, giúp loại bỏ vi khuẩn và vi sinh vật gây hại, giúp khu vực cơ quan sinh dục luôn sạch...
Gel vệ sinh cu, bạn trai có nên...