Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个方法,所以当我想调用它并获取手机的信号强度时,我完全知道使用 PhoneStateListener 获取信号强度的普通方法。
我找不到解决问题的方法,但我确信有办法做到这一点。
只需创建一个变量并让侦听器在每次触发时更改其值。当您单击按钮时,您应该只显示此变量的值。希望这可以帮助。