top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to get cellid from my LTE/Android phone?

+1 vote
934 views

Want to get the cellid for my app, can someone share the code for LTE-Android?

posted Aug 26, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Try something like

TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
List<CellInfo> cellInfoList = tm.getAllCellInfo();
for (CellInfo cellInfo : cellInfoList)
{
    if (cellInfo instanceof CellInfoLte)
    {
        // Now this is your code...
    }
}

Actuallt we are iterating through the list List returned by getAllCellInfo () and checking if the CellInfo is a CellInfoLte or not

answer Aug 26, 2015 by Salil Agrawal
Similar Questions
+2 votes

I am trying to figure out the best way to get a device to only use LTE and not GSM. I want to know would it be better to write an up to attempt to force the android to stay in LTE only or in the android OS and make the change.

+1 vote

When I input usb line with my android phone into the pc , there are two disks j: and k: (type :removable disk) displayed in win7.

I can get my android phone bluetooth mac address .

import bluetooth
nearby_devices = bluetooth.discover_devices(lookup_names = True)
for addr, phoneName in nearby_devices:
 print(addr)

it is XX:XX:XX:XX:XX:XX

Now how can I write a file into the disk j: of my android phone(bluetooth mac is XX:XX:XX:XX:XX:XX )?

+6 votes

Is there any API in CallLog.Calls class to get Operator Name

+1 vote

I am using GsmCellLocation to get LAC and cell id for 3G network with below code :

mCid = gmsCellLocation.getCid() & 0xffff;
mLac = gmsCellLocation.getLac();

and is there any library or formula how to get/calculate the correct LAC and cell id for LTE network (4G) ?

+2 votes

I want to open another application from my application. I know I should use Intent for that, but I am not sure how to use that.

...