黑莓手机上的漫游数据服务
我可以在我的应用程序中检查漫游时是否可以使用数据服务吗?对于这种情况,我可以使用 PhoneState.isDataServiceAvailable()
或使用其他解决方案吗?
Can I check in my application that data service is available in roaming? Can I use PhoneState.isDataServiceAvailable()
for this situation or use another solution?
对 PhoneState 不熟悉。它似乎不是 RIM API 的一部分。
您可以使用 RadioInfo.getNetworkService() 并根据 RadioInfo.NETWORK_SERVICE_ROAMING 标志进行检查,这会告诉您是否正在漫游。然后您可以检查 RadioInfo.NETWORK_SERVICE_DATA 标志以查看是否有数据。
但您想知道即使您当前没有漫游,它是否可用?可能有一本服务手册,但我不确定。
Not familiar with PhoneState. It doesn't seem to be part of the RIM API.
You can use RadioInfo.getNetworkService() and check that against the RadioInfo.NETWORK_SERVICE_ROAMING flag, that would tell you if you were roaming. Then you could check the RadioInfo.NETWORK_SERVICE_DATA flag to see if you had data.
But you want to know if it would be available, even if you're not currently roaming? There might be a service book for that, but I'm not sure.