[ADD] log
This commit is contained in:
@@ -53,6 +53,7 @@ public abstract class Database extends RoomDatabase {
|
|||||||
super.onCreate(db);
|
super.onCreate(db);
|
||||||
|
|
||||||
databaseWriterExecutor.execute(() -> {
|
databaseWriterExecutor.execute(() -> {
|
||||||
|
|
||||||
// TODO populate our database here
|
// TODO populate our database here
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.a1.nextlocation.network;
|
package com.a1.nextlocation.network;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import com.a1.nextlocation.data.Location;
|
import com.a1.nextlocation.data.Location;
|
||||||
import com.a1.nextlocation.data.Route;
|
import com.a1.nextlocation.data.Route;
|
||||||
|
|
||||||
@@ -42,11 +44,11 @@ public enum ApiHandler {
|
|||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
String responseString = Objects.requireNonNull(response.body()).string();
|
String responseString = Objects.requireNonNull(response.body()).string();
|
||||||
|
Log.d(TAG, "getDirections: got response: " + responseString);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Log.d(TAG, "getDirections: caught exception: " + e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user