Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Update SQLite.UWP reference otherwise build fails #563

Open
wants to merge 2 commits into
base: master
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
7 changes: 3 additions & 4 deletions src/MobileApps/MyDriving.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyDriving.iOS", "MyDriving\MyDriving.iOS\MyDriving.iOS.csproj", "{DE56E591-0655-43D7-A1B9-B3280F78B667}"
EndProject
Expand Down Expand Up @@ -43,12 +43,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObdLibiOS", "..\OBDLibrary\
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
MyDriving\MyDriving.DataObjects\MyDriving.DataObjects.projitems*{bd4403c0-6cd5-4030-b1a3-7ad98b9b80ca}*SharedItemsImports = 13
MyDriving\MyDriving.Shared\MyDriving.Shared.projitems*{219edca6-56bb-4ebd-ae46-c691f0aed767}*SharedItemsImports = 4
MyDriving\MyDriving.DataObjects\MyDriving.DataObjects.projitems*{649300ce-70ea-4606-983f-f4476fdd6c7e}*SharedItemsImports = 4
MyDriving\MyDriving.Shared\MyDriving.Shared.projitems*{efa3478d-88c0-41a8-ad5e-5878e42fe3e2}*SharedItemsImports = 13
MyDriving\MyDriving.Shared\MyDriving.Shared.projitems*{b09661c2-82a6-4d16-b4fd-7b23d0ffe1fe}*SharedItemsImports = 4
MyDriving\MyDriving.DataObjects\MyDriving.DataObjects.projitems*{bd4403c0-6cd5-4030-b1a3-7ad98b9b80ca}*SharedItemsImports = 13
MyDriving\MyDriving.Shared\MyDriving.Shared.projitems*{de56e591-0655-43d7-a1b9-b3280f78b667}*SharedItemsImports = 4
MyDriving\MyDriving.Shared\MyDriving.Shared.projitems*{efa3478d-88c0-41a8-ad5e-5878e42fe3e2}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppStore|Any CPU = AppStore|Any CPU
Expand Down Expand Up @@ -216,7 +216,6 @@ Global
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|iPhone.Deploy.0 = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|iPhoneSimulator.Build.0 = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|Mixed Platforms.Build.0 = Debug|x86
{219EDCA6-56BB-4EBD-AE46-C691F0AED767}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup />
<ItemGroup>
<Folder Include="Pages\" />
<Folder Include="Helpers\" />
<Folder Include="Tests\" />
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
<SDKReference Include="Microsoft.VCLibs, Version=14.0">
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
</SDKReference>
<SDKReference Include="SQLite.UWP.2015, Version=3.12.1">
<SDKReference Include="SQLite.UWP.2015, Version=3.14.1">
<Name>SQLite for Universal Windows Platform</Name>
</SDKReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private async Task BeginExtendedExecution()
{
case ExtendedExecutionResult.Allowed:
session = newSession;
ViewModel.Geolocator.AllowsBackgroundUpdates = true;
ViewModel.Locator.AllowsBackgroundUpdates = true;
ViewModel.StartTrackingTripCommand.Execute(null);

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ await CurrentTripViewModel.ExecuteStartTrackingTripCommandAsync().ContinueWith(a
await PromptPermissionsChangeDialog();
});

if (!CurrentTripViewModel.Geolocator.IsGeolocationEnabled)
if (!CurrentTripViewModel.Locator.IsGeolocationEnabled)
{
tripMapView.Camera.CenterCoordinate = new CLLocationCoordinate2D(47.6204, -122.3491);
tripMapView.Camera.Altitude = 5000;
Expand Down Expand Up @@ -95,7 +95,7 @@ async Task ConfigureCurrentTripUserInterface()
ResetTripInfoView();

CurrentTripViewModel = new CurrentTripViewModel();
CurrentTripViewModel.Geolocator.PositionChanged += Geolocator_PositionChanged;
CurrentTripViewModel.Locator.PositionChanged += Geolocator_PositionChanged;

}

Expand Down Expand Up @@ -179,7 +179,7 @@ async Task PromptPermissionsChangeDialog()

async void RecordButton_TouchUpInside(object sender, EventArgs e)
{
if (!CurrentTripViewModel.Geolocator.IsGeolocationEnabled)
if (!CurrentTripViewModel.Locator.IsGeolocationEnabled)
{
Acr.UserDialogs.UserDialogs.Instance.Alert(
"Please ensure that geolocation is enabled and permissions are allowed for MyDriving to start a recording.",
Expand Down
3 changes: 3 additions & 0 deletions src/MobileApps/MyDriving/MyDriving/MyDriving.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
<Compile Include="Interfaces\IOBDDevice.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\CustomContractResolver.cs" />
<Compile Include="Services\FakeLocationProvider.cs" />
<Compile Include="Services\ILocationProvider.cs" />
<Compile Include="Services\IOTHub.cs" />
<Compile Include="Services\OBDDataProcessor.cs" />
<Compile Include="Services\PlatformLocationProvider.cs" />
<Compile Include="Services\Timer.cs" />
<Compile Include="ViewModel\CurrentTripViewModel.cs" />
<Compile Include="ViewModel\LoginViewModel.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Plugin.Geolocator.Abstractions;
using System;
using System.Threading.Tasks;

namespace MyDriving.Services
{
public class FakeLocationProvider : ILocationProvider
{
bool running;
Position lastPosition;

public event EventHandler<PositionEventArgs> PositionChanged;

public FakeLocationProvider(Position initalPosition)
{
lastPosition = initalPosition;
}

public bool IsListening { get { return running; } }
public bool IsGeolocationEnabled { get { return true; } }
public bool AllowsBackgroundUpdates { get; set; } // TODO unset running when app goes into background if this is false

public async Task<bool> TryStartAsync()
{
if (running)
throw new InvalidOperationException("already started");

running = true;

while (true)
{
var pos = new Position(lastPosition);
pos.Longitude += 0.00085720162;
PositionChanged?.Invoke(this, new PositionEventArgs(lastPosition));
lastPosition = pos;

await Task.Delay(3000);

if (!running)
{
return true;
};
}
}

public async Task<bool> TryStopAsync()
{
running = false;
await Task.Delay(1000); // fake work
return true;
}

public async Task<Position> GetPositionAsync(TimeSpan timeout)
{
await Task.Delay(100); // fake work
return new Position(lastPosition);
}
}
}
17 changes: 17 additions & 0 deletions src/MobileApps/MyDriving/MyDriving/Services/ILocationProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Plugin.Geolocator.Abstractions;
using System;
using System.Threading.Tasks;

namespace MyDriving.Services
{
public interface ILocationProvider
{
event EventHandler<PositionEventArgs> PositionChanged;
bool IsListening { get; }
bool IsGeolocationEnabled { get; }
bool AllowsBackgroundUpdates { get; set; }
Task<bool> TryStartAsync();
Task<bool> TryStopAsync();
Task<Position> GetPositionAsync(TimeSpan timeout);
}
}
Loading