Added elapsed realtime age.
This commit is contained in:
parent
6aa04b9258
commit
7226dd7262
|
|
@ -45,6 +45,9 @@ public class LocationEntity {
|
|||
@ColumnInfo(name = "unix_time")
|
||||
public long unixTime;
|
||||
|
||||
@ColumnInfo(name = "elapsed_realtime_age")
|
||||
public Long elapsedRealtimeAge;
|
||||
|
||||
@ColumnInfo(name = "is_mock")
|
||||
public boolean isMock;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,10 @@ public class LocationLoggingService extends Service implements LocationListener
|
|||
locationEntity.altitude = location.getAltitude();
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
locationEntity.elapsedRealtimeAge = location.getElapsedRealtimeAgeMillis();
|
||||
}
|
||||
|
||||
if(location.hasBearing())
|
||||
{
|
||||
locationEntity.bearing = location.getBearing();
|
||||
|
|
|
|||
Loading…
Reference in a new issue