Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Cell Id

Cell Id

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Cell Id

Postby stilwalli » Wed Oct 01, 2008 6:28 am

Is there any way to get CELL ID for the current Location. I find there is an API GsmCellLocation for getting CELL ID? But does this get initialized.

Thanks in advance,

Shashank
stilwalli
Developer
Developer
 
Posts: 35
Joined: Mon Jul 21, 2008 8:13 am

Top

Postby stilwalli » Wed Oct 01, 2008 7:03 am

mTelephoneManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
GsmCellLocation location = (GsmCellLocation) mTelephoneManager.getCellLocation();
location.getCid();

Is this the correct way of getting Cell ID. I want to have the current cell ID rather than getting cell ID only on location change??
stilwalli
Developer
Developer
 
Posts: 35
Joined: Mon Jul 21, 2008 8:13 am

Postby ninor » Wed Oct 01, 2008 7:45 am

If that location represents the Cell provider, then you can request an update, and obtain the value right now with:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. CellLocation.requestLocationUpdate()
Parsed in 0.012 seconds, using GeSHi 1.0.8.4

And then read the value.

And for the description, instead of using the CID, you can obtain a readable description with
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. toString()
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


But maybe you're more interested on this:
http://code.google.com/android/reference/android/telephony/ServiceState.html
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Postby stilwalli » Wed Oct 01, 2008 9:24 am

But I don't find anything related to Cell id in these APIs
stilwalli
Developer
Developer
 
Posts: 35
Joined: Mon Jul 21, 2008 8:13 am

Postby stilwalli » Wed Oct 01, 2008 9:47 am

So the toString() value could be used as Cell Id?
stilwalli
Developer
Developer
 
Posts: 35
Joined: Mon Jul 21, 2008 8:13 am

Postby ninor » Wed Oct 01, 2008 10:22 am

The CellID is what you posted in the second message.
http://code.google.com/android/reference/android/telephony/gsm/GsmCellLocation.html

But I didn't know if what you were searching for was an Operator ID or what, that's why I suggested you the other link.
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests