diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 0f67efecf..d9a68c14a 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -7,7 +7,6 @@
-
dependentServices = [
}
return classScheduleDataProvider;
}),
- ChangeNotifierProxyProvider2(create: (_) {
- var proximityAwarenessSingleton = WayfindingProvider();
- return proximityAwarenessSingleton;
- }, update: (_, coordinates, userDataProvider, proximityAwarenessSingleton) {
- proximityAwarenessSingleton!
- .coordinateAndLocation(coordinates, locationProvider!);
- proximityAwarenessSingleton.userProvider = userDataProvider;
- return proximityAwarenessSingleton;
- }),
ChangeNotifierProxyProvider(
create: (_) {
var studentIdDataProvider = StudentIdDataProvider();
diff --git a/lib/app_router.dart b/lib/app_router.dart
index aa5aa8021..54dd624e6 100644
--- a/lib/app_router.dart
+++ b/lib/app_router.dart
@@ -4,8 +4,8 @@ import 'package:campus_mobile_experimental/core/models/dining.dart';
import 'package:campus_mobile_experimental/core/models/dining_menu.dart';
import 'package:campus_mobile_experimental/core/models/events.dart';
import 'package:campus_mobile_experimental/core/models/news.dart';
-import 'package:campus_mobile_experimental/ui/availability/manage_availability_view.dart';
import 'package:campus_mobile_experimental/ui/availability/availability_detail_view.dart';
+import 'package:campus_mobile_experimental/ui/availability/manage_availability_view.dart';
import 'package:campus_mobile_experimental/ui/classes/classes_list.dart';
import 'package:campus_mobile_experimental/ui/dining/dining_detail_view.dart';
import 'package:campus_mobile_experimental/ui/dining/dining_list.dart';
@@ -37,9 +37,6 @@ import 'package:campus_mobile_experimental/ui/profile/profile.dart';
import 'package:campus_mobile_experimental/ui/scanner/native_scanner_view.dart';
import 'package:campus_mobile_experimental/ui/shuttle/add_shuttle_stops_view.dart';
import 'package:campus_mobile_experimental/ui/shuttle/manage_shuttle_view.dart';
-import 'package:campus_mobile_experimental/ui/wayfinding/beacon_view.dart';
-import 'package:campus_mobile_experimental/ui/wayfinding/bluetooth_logger.dart';
-import 'package:campus_mobile_experimental/ui/wayfinding/wayfinding_permissions.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -160,16 +157,6 @@ class Router {
Provider.of(_).changeTitle(settings.name);
return NotificationsSettingsView();
});
- case RoutePaths.BluetoothPermissionsView:
- return MaterialPageRoute(builder: (_) {
- Provider.of(_).changeTitle(settings.name);
- return AdvancedWayfindingPermission();
- });
- case RoutePaths.AutomaticBluetoothLoggerView:
- return MaterialPageRoute(builder: (_) {
- Provider.of(_).changeTitle(settings.name);
- return AutomaticBluetoothLoggerView();
- });
case RoutePaths.ClassScheduleViewAll:
return MaterialPageRoute(builder: (_) {
Provider.of(_).changeTitle(settings.name);
@@ -206,8 +193,6 @@ class Router {
Provider.of(_).changeTitle(settings.name);
return SpotTypesView();
});
- case RoutePaths.BeaconView:
- return MaterialPageRoute(builder: (_) => BeaconView());
case RoutePaths.ScanditScanner:
return MaterialPageRoute(builder: (_) => ScanditScanner());
default:
diff --git a/lib/core/models/wayfinding.dart b/lib/core/models/wayfinding.dart
deleted file mode 100644
index 8b1378917..000000000
--- a/lib/core/models/wayfinding.dart
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/lib/core/models/wayfinding_constants.dart b/lib/core/models/wayfinding_constants.dart
deleted file mode 100644
index 6aeda7b17..000000000
--- a/lib/core/models/wayfinding_constants.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-class WayfindingConstantsModel {
- int? qualifyingDevices;
- int? qualifiedDevicesThreshold;
- int? distanceThreshold;
- int? dwellTimeThreshold;
- int? scanIntervalAllowance;
- int? backgroundScanInterval;
- int? deletionInterval;
- int? scanDuration;
- int? scanWaitTime;
- int? currentDwellTime;
- double? milesFromPC;
- final double pcLongitude = -117.237006;
- final double pcLatitude = 32.880006;
- double? userDistanceFromPriceCenter;
- List? allowableDevices;
- Map? deviceTypes;
-
- WayfindingConstantsModel(
- {this.allowableDevices,
- this.deviceTypes,
- this.qualifyingDevices,
- this.qualifiedDevicesThreshold,
- this.distanceThreshold,
- this.dwellTimeThreshold,
- this.scanDuration,
- this.scanWaitTime,
- this.scanIntervalAllowance,
- this.backgroundScanInterval,
- this.deletionInterval,
- this.milesFromPC});
-
- factory WayfindingConstantsModel.fromJson(
- Map deviceTypesJson,
- Map constantsJson) =>
- WayfindingConstantsModel(
- allowableDevices: List.from(constantsJson['deviceCharacteristics']),
- deviceTypes: deviceTypesJson,
- qualifyingDevices: 0,
- qualifiedDevicesThreshold: int.parse(constantsJson["uniqueDevices"]),
- distanceThreshold: int.parse(constantsJson["distanceThreshold"]),
- dwellTimeThreshold: int.parse(constantsJson["dwellTimeThreshold"]),
- scanDuration: int.parse(constantsJson["scanDuration"]),
- scanWaitTime: int.parse(constantsJson["waitTime"]),
- scanIntervalAllowance:
- int.parse(constantsJson["scanIntervalAllowance"]),
- backgroundScanInterval: constantsJson["backgroundScanInterval"],
- deletionInterval: constantsJson["deletionInterval"],
- milesFromPC: constantsJson['milesFromPC'].toDouble());
-}
diff --git a/lib/core/providers/bluetooth.dart b/lib/core/providers/bluetooth.dart
deleted file mode 100644
index 39666430a..000000000
--- a/lib/core/providers/bluetooth.dart
+++ /dev/null
@@ -1,67 +0,0 @@
-import 'dart:math';
-
-import 'package:beacon_broadcast/beacon_broadcast.dart';
-import 'package:uuid/uuid.dart';
-import 'package:shared_preferences/shared_preferences.dart';
-
-class BeaconSingleton {
- String? advertisingUUID;
- String ucsdAppPrefix = "08506708-3068-0650-8008-0"; // UCSDAPP in ASCII
- List hexLetters = ["A", "B", "C", "D", "E", "F"];
- BeaconBroadcast beaconBroadcast = BeaconBroadcast();
-
- //Internal Declaration
- static final BeaconSingleton _beaconSingleton = BeaconSingleton._internal();
-
- BeaconSingleton._internal();
-
- factory BeaconSingleton() {
- return _beaconSingleton;
- }
- init() async {
- changeUUID();
- SharedPreferences prefs = await SharedPreferences.getInstance();
- checkTime();
- prefs.setString('uuid', advertisingUUID!);
- beaconBroadcast
- .setUUID(advertisingUUID!)
- .setMajorId(1)
- .setMinorId(100)
- .setIdentifier('ucsd.app.mobile')
- .setLayout(BeaconBroadcast.ALTBEACON_LAYOUT)
- .start();
- }
-
- void checkTime() async {
- SharedPreferences prefs = await SharedPreferences.getInstance();
- advertisingUUID = prefs.get('uuid') as String? ?? "null";
- var previousTime = prefs.get('previousTime') ?? DateTime(1990).toString();
- var difference = DateTime.now()
- .difference(DateTime.parse(previousTime as String))
- .inHours;
- if (difference > 24) {
- changeUUID();
- prefs.setString('previousTime', DateTime.now().toString());
- }
- }
-
- void changeUUID() {
- advertisingUUID = Uuid().v4();
-
- advertisingUUID = randomUUID();
- }
-
- String randomUUID() {
- final random = Random();
- String newUUID = ucsdAppPrefix;
- for (int uuidIndex = 0; uuidIndex < 11; uuidIndex++) {
- bool useLetter = random.nextBool();
- if (useLetter) {
- newUUID += hexLetters[random.nextInt(6)];
- } else {
- newUUID += random.nextInt(10).toString();
- }
- }
- return newUUID;
- }
-}
diff --git a/lib/core/providers/wayfinding.dart b/lib/core/providers/wayfinding.dart
deleted file mode 100644
index ce2ec4369..000000000
--- a/lib/core/providers/wayfinding.dart
+++ /dev/null
@@ -1,956 +0,0 @@
-import 'dart:async';
-import 'dart:collection';
-import 'dart:convert';
-import 'dart:io';
-import 'dart:math' as math;
-import 'dart:typed_data';
-
-import 'package:campus_mobile_experimental/app_constants.dart';
-import 'package:campus_mobile_experimental/app_networking.dart';
-import 'package:campus_mobile_experimental/core/models/location.dart';
-import 'package:campus_mobile_experimental/core/models/wayfinding_constants.dart';
-import 'package:campus_mobile_experimental/core/providers/location.dart';
-import 'package:campus_mobile_experimental/core/providers/user.dart';
-import 'package:campus_mobile_experimental/core/services/wayfinding.dart';
-import 'package:campus_mobile_experimental/core/utils/maps.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_blue/flutter_blue.dart';
-import 'package:flutter_secure_storage/flutter_secure_storage.dart';
-import 'package:location/location.dart';
-import 'package:shared_preferences/shared_preferences.dart';
-
-import 'bluetooth.dart';
-
-enum ScannedDevice {
- SCANNED_DEVICE_ID,
- SCANNED_DEVICE_TYPE,
- SCANNED_DEVICE_ADVERTISEMENT_ID,
- SCANNED_DEVICE_DETECT_START,
- SCANNED_DEVICE_DETECT_SIGNAL_STRENGTH,
- SCANNED_DEVICE_DETECT_DISTANCE
-}
-
-/// A file that handles AdvancedWayfinding feature to scan and identify nearby BT devices.
-class WayfindingProvider extends ChangeNotifier {
- /// A structured model to simplify constants management and UCSD-ITS configurations.
- late WayfindingConstantsModel _wayfindingConstantsModel;
-
- /// A service for fetching UCSD-ITS configurations from network.
- late WayfindingService _wayfindingService;
-
- /// Responsible for managing the broadcasting of [advertisementValue].
- late BeaconSingleton beaconSingleton;
-
- /// Distinguishes running in the background vs having app open.
- bool inBackground = false;
-
- /// Advertisement string
- String? advertisementValue;
-
- /// Operating system of device
- String? operatingSystem;
-
- /// Confirms that this is the first instance of the Wayfinding feature, preventing parallel scanning.
- bool firstInstance = true;
-
- bool advancedWayfindingEnabled = false;
-
- /// Access previous bt setting/permissions
- late SharedPreferences sharedPreferences;
-
- /// Ensures AdvancedWayfinding is disabled when location & BT are unavailable.
- bool forceOff = false;
-
- /// Provides location of device for logging scans.
- Coordinates? _coordinates;
-
- /// Not directly accessed but used to check permissions
- LocationDataProvider? _locationDataProvider;
-
- /// Keeps track of scanned unique BT devices.
- HashMap scannedObjects = new HashMap();
-
- /// Instance of FlutterBlue library to handle raw BT processing.
- FlutterBlue flutterBlueInstance = FlutterBlue.instance;
-
- /// Stores data from background scans to preserve scan continuation.
- final FlutterSecureStorage _storage = FlutterSecureStorage();
-
- /// Holds header for mobile logger POST.
- Map? loggerHeader;
-
- /// Holds header for user token retrieval.
- final Map tokenHeader = {
- "accept": "application/json",
- };
-
- /// Provides specialized support for requests to WSO2 APIs.
- final NetworkHelper _networkHelper = NetworkHelper();
-
- /// Endpoint used to send device logs to ITS specified destination.
- String mobileLoggerEndpoint =
- "https://api-qa.ucsd.edu:8243/mobileapplogger/v1.1.0/log?type=WAYFINDING";
-
- //Thresholds for logging location
- int qualifiedDevicesThreshold = 0;
- int distanceThreshold = 10; // default in ZenHub
- int scanIntervalAllowance = 0;
- int? backgroundScanInterval = 15; // Minutes
- int? deletionInterval = 30; // Minutes
- double milesFromPriceCenter = 5;
- int dwellTimeThreshold = 200; // In seconds (10 minutes -> 600 seconds)
-
- /// Keep track of devices that meet our requirements
- int qualifyingDevices = 0;
-
- /// Default constant for scans
- int scanDuration = 2; //Seconds
- int waitTime = 15; // Minutes
- int dwellMinutes = 30;
-
- /// Coordinates for Price Center
- final double pcLongitude = -117.237006;
- final double pcLatitude = 32.880006;
- late double distanceFromPriceCenter;
-
- /// Allows for continuous scan
- Timer? ongoingScanner;
-
- /// Displays BT devices that have been scanned (only for debugger view).
- List loggedItems = [];
-
- /// Gives an unfiltered list of scanned devices.
- static List> unprocessedDevices = [];
- List