Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
80a2229
1849-show-more-trajectory-information: make string as resource
sandradeng20 Dec 3, 2024
bf90357
1849-show-more-trajectory-information: update mapbox secret token set…
sandradeng20 Jan 23, 2025
6001ead
1849-show-more-trajectory-information: fix empty trajectory processing
sandradeng20 Jan 31, 2025
c56a4bc
1849-show-more-trajectory-information: refactor code
sandradeng20 Jan 31, 2025
62ff6d4
1849-show-more-trajectory-information: reformat code
sandradeng20 Jan 31, 2025
a6d0653
Merge branch 'main' into 1849-show-more-trajectory-information
abbybernstein Feb 7, 2025
0c76715
add postgres logic to create layer by activity
abbybernstein Feb 11, 2025
f6591ba
connect trajectory by activity layer to timeline app
abbybernstein Feb 11, 2025
30b4b96
change colors by activity type
abbybernstein Feb 11, 2025
1cadf91
add activity summary functionality
abbybernstein Feb 12, 2025
3d98c44
fix postgres activity type assignment
abbybernstein Feb 18, 2025
4b21e40
add trajectory summary colorcoded
abbybernstein Feb 20, 2025
a5f395c
fix summary updating error
abbybernstein Feb 20, 2025
b4f3f42
fix colors
abbybernstein Feb 20, 2025
d795199
Print trajectory info by session
abbybernstein Feb 26, 2025
5fabc91
add summary to bottom sheet
abbybernstein Feb 27, 2025
c46519b
fix page switch loaidng behavior
abbybernstein Mar 4, 2025
880728f
fix centering trajectory
abbybernstein Mar 4, 2025
3a37197
refactor files
abbybernstein Mar 4, 2025
e8d375a
resolve comments
abbybernstein Mar 6, 2025
1cc4285
resolve comments
abbybernstein Mar 10, 2025
bbe55ea
simplifying sql
abbybernstein Mar 10, 2025
7f06941
interactable trajectoryline
abbybernstein Mar 11, 2025
407e686
fix sql script for layer creation
abbybernstein Mar 13, 2025
935da95
fix sql script
abbybernstein Mar 13, 2025
205fd14
fix trajectory interactability
abbybernstein Mar 13, 2025
f8b3eed
resolve comments
abbybernstein Mar 17, 2025
773669c
update user agent
abbybernstein Mar 17, 2025
dda320e
upate trajectoryqueryagent image
abbybernstein Mar 17, 2025
59a1fa1
Merge branch 'main' into 1849-show-more-trajectory-information
abbybernstein Mar 17, 2025
62242c6
fix errors
abbybernstein Mar 18, 2025
f1b2bff
1849-show-more-trajectory-information: resolve comments
sandradeng20 Mar 19, 2025
b64c5cd
redesign trajectory classes
abbybernstein Mar 24, 2025
f064269
fix xml
abbybernstein Mar 26, 2025
59a9842
clickability fixed
abbybernstein Mar 26, 2025
6a73793
fix trajectory line clicking
abbybernstein Apr 1, 2025
c65834b
resolve comments
abbybernstein Apr 1, 2025
e9ef455
resolve comments
abbybernstein Apr 2, 2025
a6a2ffd
resolve comments
abbybernstein Apr 2, 2025
f1a34ce
fix error
abbybernstein Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Agents/UserAgent/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version: "3.8"

services:
user-agent:
image: ghcr.io/cambridge-cares/user-agent:1.0.0
image: ghcr.io/cambridge-cares/user-agent:2.0.0
build: .
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "user-agent",
"TaskTemplate": {
"ContainerSpec": {
"Image": "user-agent:1.0.0",
"Image": "user-agent:2.0.0",
"Mounts": [
{
"Type": "bind",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "user-agent",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ghcr.io/cambridge-cares/user-agent:1.0.0",
"Image": "ghcr.io/cambridge-cares/user-agent:2.0.0",
"Mounts": [
{
"Type": "bind",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;

import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
Expand All @@ -11,6 +12,9 @@
import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;
import java.util.Map;

import okhttp3.HttpUrl;

/**
Expand All @@ -37,19 +41,28 @@ public void registerAppToUser(String userId, String deviceId, Response.Listener<

try {
JSONObject body = new JSONObject();
body.put("userId", userId);
//body.put("userId", userId);
body.put("phoneId", deviceId);

String url = HttpUrl.get(context.getString(uk.ac.cam.cares.jps.utils.R.string.host_with_port)).newBuilder()
.addPathSegments(context.getString(uk.ac.cam.cares.jps.utils.R.string.useragent_registerphone))
.build().toString();

JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, body, jsonObject -> {

LOGGER.info(String.format("Phone id %s is register to user %s", deviceId, userId));
onSuccessListener.onResponse(true);
}, volleyError -> {
LOGGER.error(volleyError.getMessage());
});
}) {

@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", "Bearer " + userId); // Ensure this is the correct user
return headers;
}
};

requestQueue.add(request);
} catch (JSONException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "user-agent",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ghcr.io/cambridge-cares/user-agent:1.0.0",
"Image": "ghcr.io/cambridge-cares/user-agent:2.0.0",
"Mounts": [
{
"Type": "bind",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "user-agent",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ghcr.io/cambridge-cares/user-agent:1.0.0",
"Image": "ghcr.io/cambridge-cares/user-agent:2.0.0",
"Mounts": [
{
"Type": "bind",
Expand Down