我是移动应用程序的新手,我想创建一个显示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());
}
}