diff --git a/app/src/main/java/org/traccar/client/DatabaseHelper.java b/app/src/main/java/org/traccar/client/DatabaseHelper.java index e7166f59..de5ed1af 100644 --- a/app/src/main/java/org/traccar/client/DatabaseHelper.java +++ b/app/src/main/java/org/traccar/client/DatabaseHelper.java @@ -124,7 +124,7 @@ protected Void executeMethod() { public Position selectPosition() { Position position = new Position(); - Cursor cursor = db.rawQuery("SELECT * FROM position ORDER BY id LIMIT 1", null); + Cursor cursor = db.rawQuery("SELECT * FROM position ORDER BY id LIMIT 1 DESC", null); try { if (cursor.getCount() > 0) {