获得Gsm强度为dB

时间:2019-04-01 23:47:33

标签: java android signals gsm signal-strength

我是移动应用程序的新手,我想创建一个显示GSM信号强度的非常简单的应用程序,当我尝试访问CellSignalStrengthCdma类中的getDbm()方法时,遇到错误消息:

CellSignalStrengthCdma is not public,you can not access it from outside

我将如何处理

import android.telephony.CellSignalStrengthCdma;

public class MainActivity extends AppCompatActivity {

  CellSignalStrengthCdma hadibeh = new CellSignalStrengthCdma() ;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    TextView deneme = findViewById(R.id.deneme);
    deneme.setText(hadibeh.getDbm());

  }
}

0 个答案:

没有答案