- Forum posts: 1
Mar 18, 2016, 12:07:58 PM via Website
Mar 18, 2016 12:07:58 PM via Website
The thing is,it always give me -113 Dbm (0 ASU).I thought first it's the Dual SIM phone or an error in my code."CellSignalStrengthLte" & "CellSignalStrengthGsm" works flawlessly.
@Override
public void onClick(View arg0) {
try{
//CODE SIGNAL STRENGTH
TelephonyManager telephonyManager = (TelephonyManager)getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
//for example value of first element
CellInfoWcdma cellinfoWcdma = (CellInfoWcdma)telephonyManager.getAllCellInfo().get(0);
CellSignalStrengthWcdma cellSignalStrengthWcdma = cellinfoWcdma.getCellSignalStrength();
int res=cellSignalStrengthWcdma.getDbm();
Toast.makeText(getApplicationContext(), "Your signal strength " + res , Toast.LENGTH_LONG).show();
//END CODE SIGNAL STRENGTH
//CODE CELL ID
}catch (Exception e)
{Toast.makeText(getApplicationContext(), "network type is : unknown" ,Toast.LENGTH_LONG).show();}
}
});
— modified on Mar 18, 2016, 12:08:46 PM
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.