Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field day stateful changes #84

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
android_driverapp_samples/.idea/
android_driverapp_samples/app/build/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ public void saveSimulationSetting(boolean enabled) {
}

public boolean getSimulationSetting() {
return sharedPreferences.getBoolean(SIMULATION_KEY, true);
return sharedPreferences.getBoolean(SIMULATION_KEY, false);
}

public void saveProviderId(String providerId) {
sharedPreferences.edit().putString(PROVIDER_ID_KEY, providerId).apply();
}

public String getProviderId() {
return sharedPreferences.getString(PROVIDER_ID_KEY, "");
return sharedPreferences.getString(PROVIDER_ID_KEY, "<your project id>");
}

public void saveBackendUrl(String backendUrl) {
sharedPreferences.edit().putString(BACKEND_URL_KEY, backendUrl).apply();
}

public String getBackendUrl() {
return sharedPreferences.getString(BACKEND_URL_KEY, "http://localhost:8080");
return sharedPreferences.getString(BACKEND_URL_KEY, "http://<your app engine path.appspot.com>");
}

public void saveClientId(String clientId) {
Expand All @@ -83,10 +83,6 @@ public void saveClientId(String clientId) {

public String getClientId() {
String clientId = sharedPreferences.getString(CLIENT_ID_KEY, null);
if (clientId == null) {
clientId = UUID.randomUUID().toString();
saveClientId(clientId);
}
return clientId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public View onCreateView(
locationTrackingSwitch.setChecked(preferences.getLocationTrackingSetting());
locationTrackingSwitch.setOnCheckedChangeListener(
(buttonView, isChecked) -> preferences.saveLocationTrackingSetting(isChecked));

/*
Switch simulationSwitch = view.findViewById(R.id.simulation_switch);
simulationSwitch.setChecked(preferences.getSimulationSetting());
simulationSwitch.setOnCheckedChangeListener(
Expand Down Expand Up @@ -78,6 +78,7 @@ public void afterTextChanged(Editable s) {
preferences.saveBackendUrl(s.toString());
}
});
*/

EditText clientIdEditText = view.findViewById(R.id.client_id_input);
clientIdEditText.setText(preferences.getClientId(), TextView.BufferType.NORMAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void onArrive() {
public void onDestroy() {
super.onDestroy();
googleMap.clear();
vehicleReporter.disableLocationTracking();
//vehicleReporter.disableLocationTracking();
DeliveryDriverApi.clearInstance();
navigator.stopGuidance();
navigator.getSimulator().unsetUserLocation();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,184 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.12738462"
android:scaleY="0.12738462"
android:translateX="29.16"
android:translateY="43.386276">
<group android:translateY="136.26562">
<path android:pathData="M31.710938,-92.17969L31.710938,-17.15625L74.03906,-17.15625Q79.10156,-17.15625,81.80859,-14.6953125Q84.515625,-12.234375,84.515625,-8.5078125Q84.515625,-4.7109375,81.84375,-2.3554688Q79.171875,0,74.03906,0L23.625,0Q16.804688,0,13.816406,-3.0234375Q10.828125,-6.046875,10.828125,-12.796875L10.828125,-92.17969Q10.828125,-98.50781,13.675781,-101.671875Q16.523438,-104.83594,21.164062,-104.83594Q25.875,-104.83594,28.792969,-101.70703Q31.710938,-98.578125,31.710938,-92.17969Z"
android:fillColor="#000000"/>
<path android:pathData="M133.05469,-15.5390625L116.53125,-81.21094L116.53125,-10.0546875Q116.53125,-4.1484375,113.89453,-1.1953125Q111.25781,1.7578125,106.89844,1.7578125Q102.67969,1.7578125,100.00781,-1.1601562Q97.33594,-4.078125,97.33594,-10.0546875L97.33594,-91.61719Q97.33594,-98.36719,100.85156,-100.72266Q104.36719,-103.078125,110.34375,-103.078125L116.8125,-103.078125Q122.64844,-103.078125,125.28516,-102.02344Q127.921875,-100.96875,129.1875,-98.22656Q130.45312,-95.484375,132.07031,-89.296875L147.04688,-32.835938L162.02344,-89.296875Q163.64062,-95.484375,164.90625,-98.22656Q166.17188,-100.96875,168.8086,-102.02344Q171.44531,-103.078125,177.28125,-103.078125L183.75,-103.078125Q189.72656,-103.078125,193.24219,-100.72266Q196.75781,-98.36719,196.75781,-91.61719L196.75781,-10.0546875Q196.75781,-4.1484375,194.1211,-1.1953125Q191.48438,1.7578125,187.05469,1.7578125Q182.90625,1.7578125,180.23438,-1.1953125Q177.5625,-4.1484375,177.5625,-10.0546875L177.5625,-81.21094L161.03906,-15.5390625Q159.42188,-9.140625,158.40234,-6.1523438Q157.38281,-3.1640625,154.64062,-0.703125Q151.89844,1.7578125,147.04688,1.7578125Q143.39062,1.7578125,140.85938,0.17578125Q138.32812,-1.40625,136.92188,-3.8671875Q135.51562,-6.328125,134.70703,-9.316406Q133.89844,-12.3046875,133.05469,-15.5390625Z"
android:fillColor="#000000"/>
<path android:pathData="M279.84375,-86.97656L238.71094,-86.97656L238.71094,-60.609375L273.09375,-60.609375Q277.875,-60.609375,280.23047,-58.464844Q282.58594,-56.320312,282.58594,-52.734375Q282.58594,-49.148438,280.1953,-47.039062Q277.8047,-44.929688,273.09375,-44.929688L238.71094,-44.929688L238.71094,-10.96875Q238.71094,-4.5,235.79297,-1.3710938Q232.875,1.7578125,228.30469,1.7578125Q223.66406,1.7578125,220.7461,-1.40625Q217.82812,-4.5703125,217.82812,-10.96875L217.82812,-90.28125Q217.82812,-94.78125,219.16406,-97.62891Q220.5,-100.47656,223.34766,-101.77734Q226.19531,-103.078125,230.625,-103.078125L279.84375,-103.078125Q284.83594,-103.078125,287.26172,-100.86328Q289.6875,-98.64844,289.6875,-95.0625Q289.6875,-91.40625,287.26172,-89.19141Q284.83594,-86.97656,279.84375,-86.97656Z"
android:fillColor="#000000"/>
<path android:pathData="M383.57812,-30.9375Q383.57812,-21.585938,378.76172,-14.1328125Q373.9453,-6.6796875,364.66406,-2.4609375Q355.3828,1.7578125,342.65625,1.7578125Q327.39844,1.7578125,317.48438,-4.0078125Q310.45312,-8.15625,306.0586,-15.082031Q301.66406,-22.007812,301.66406,-28.546875Q301.66406,-32.34375,304.30078,-35.05078Q306.9375,-37.757812,311.01562,-37.757812Q314.3203,-37.757812,316.60547,-35.648438Q318.89062,-33.539062,320.5078,-29.390625Q322.47656,-24.46875,324.76172,-21.164062Q327.04688,-17.859375,331.1953,-15.714844Q335.34375,-13.5703125,342.09375,-13.5703125Q351.375,-13.5703125,357.17578,-17.894531Q362.97656,-22.21875,362.97656,-28.6875Q362.97656,-33.820312,359.84766,-37.01953Q356.71875,-40.21875,351.76172,-41.90625Q346.8047,-43.59375,338.5078,-45.492188Q327.39844,-48.09375,319.91016,-51.57422Q312.42188,-55.054688,308.02734,-61.066406Q303.6328,-67.078125,303.6328,-76.00781Q303.6328,-84.515625,308.27344,-91.125Q312.91406,-97.734375,321.70312,-101.28516Q330.4922,-104.83594,342.375,-104.83594Q351.8672,-104.83594,358.79297,-102.48047Q365.71875,-100.125,370.28906,-96.22266Q374.85938,-92.32031,376.96875,-88.03125Q379.07812,-83.74219,379.07812,-79.66406Q379.07812,-75.9375,376.4414,-72.94922Q373.8047,-69.96094,369.8672,-69.96094Q366.28125,-69.96094,364.41797,-71.75391Q362.5547,-73.546875,360.375,-77.625Q357.5625,-83.46094,353.625,-86.73047Q349.6875,-90,340.96875,-90Q332.8828,-90,327.92578,-86.44922Q322.96875,-82.89844,322.96875,-77.90625Q322.96875,-74.8125,324.65625,-72.5625Q326.34375,-70.3125,329.29688,-68.69531Q332.25,-67.078125,335.27344,-66.16406Q338.29688,-65.25,345.2578,-63.492188Q353.97656,-61.453125,361.04297,-58.992188Q368.10938,-56.53125,373.0664,-53.015625Q378.02344,-49.5,380.80078,-44.121094Q383.57812,-38.742188,383.57812,-30.9375Z"
android:fillColor="#000000"/>
</group>
</group>
</vector>
Loading