1

私は多くの投稿をフォローしようとしましたが、あまり成功しませんでした。つまり、この投稿では、CID を取得するための新しい方法 (API 17 以降) と古い方法の両方をまとめています。私も試してみました

CdmaCellLocation cdmaLocation = (CdmaCellLocation)telephonyManager.getCellLocation();

Verizon ネットワークに接続しているにもかかわらず、null を返します。ドキュメントにはありますが:

If there is only one radio in the device and that radio has an LTE connection, this method will return null. 
The implementation must not to try add LTE identifiers into the existing cdma/gsm classes.

問題をさらに詳しく調べると、telephonyManager.getPhoneType() を試したところ 0 になりました。これは、データ接続があるにもかかわらず、CDMA または GSM 電話として認識されていないことを意味します。これを回避して API 17 より前に CID を取得する方法はありますか? 私が使用している実際のタブレットは、Samsung Galaxy Tab 2 です。

ありがとう

4

0 に答える 0