Is it possible to get the device speed from the location NETWORK_PROVIDER and not from the GPS_PROVIDER?

有帮助吗?

解决方案

by device speed do you mean how fast the device is travelling?

if so, then the short answer is no.

longer answer is, that the way network provider works it has no reliable way of telling where the device is relative to the cell tower it is connected to, and therefor wouldn't be able to calculate speed even when the device switches from one cell tower to another.

for more information about how the location providers work look at this answer.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top