1

I need to get PCI of LTE base station. There is a special class and method for it.

http://developer.android.com/reference/android/telephony/CellIdentityLte.html

But I'm a novice, and I have no idea how to use info given in developer.android. So, everything I tried is:

int i = CellIdentityLte.getPci();

How can I get this value?

Ashish Kakkad
  • 23,586
  • 12
  • 103
  • 136

1 Answers1

0

register for phonestate listener with this event(PhoneStateListener.LISTEN_CELL_INFO)

then u will be getting a method namely onCellInfoChanged called .. inside that .. write this code..

for(Cellinfo m: info)
 if (m instanceof CellInfoLte){
                        CellInfoLte cellInfoLte=(CellInfoLte) m;
                        cellInfoLte.getCellIdentity().getPci();
                        Log.d("onCellInfoChanged", "CellInfoLte--" + m);
                    }