Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Commit ea62429

Browse files
Upgrade app to XF 3.1 and Xamarin.Essentials (#52)
* Xamarin Essentials, Upgrade to Xamarin.Forms 3.0 (#51) * Xam.Plugin.Connectivity -> Xamarin.Essentials - Update Connectivity API usage - Remove/sort usings as I go - I let the IDE do it's thing on project/nuget files - Except fixed a spot where @motz username was listed - `project.lock.json` should not be checked into Github * Whoops iOS project needs Xamarin.Build.Download 0.4.9 Saw a (1) on NuGet Consolidate tab * Xam.Plugin.Settings -> Xamarin.Essentials.Preferences - `CrossSettings.Current.GetValueOrDefault` is now `Preferences.Get` - `CrossSettings.Current.AddOrUpdateValue` is now `Preferences.Set` - `CrossSettings.Current.Remove` is now just `Preferences.Set("foo", string.Empty)` - Refactored/cleaned up code as I went * Xam.Plugins.Messaging -> Xamarin.Essentials.PhoneDialer Current dilemma: - No way to implement `CanMakePhoneCall` - Only thing I can do is catch `FeatureNotSupportedException` * Upgrade to Xamarin.Forms 3.0 - Only API change is that `Device.WinPhone` no longer exists - Tested (briefly) on iOS, Android, and UWP * Update to Xamarin.Essentials and convert to PackageRefernces * Cleanup settings * Add App Center SDK * Only 1 reminder button on UWP * Update nuget packages
1 parent 94111b3 commit ea62429

File tree

77 files changed

+3891
-23298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3891
-23298
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,4 @@ pip-log.txt
226226
Conference.userprefs
227227
Conference/Conference.Backend/App_Data/aspnet-Conference.Backend-20151029080950.mdf
228228
*.ldf
229+
project.lock.json

src/Conference.Android/Conference.Android.csproj

Lines changed: 104 additions & 303 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
// Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
3-
using Plugin.Settings;
4-
using Plugin.Settings.Abstractions;
3+
using Xamarin.Essentials;
54

65
namespace Conference.Droid.Helpers
76
{
@@ -12,30 +11,16 @@ namespace Conference.Droid.Helpers
1211
/// </summary>
1312
public static class Settings
1413
{
15-
static ISettings AppSettings
16-
{
17-
get
18-
{
19-
return CrossSettings.Current;
20-
}
21-
}
22-
2314
const string NotificationIdKey = "notification_id";
2415
static readonly int NotificationIdDefault = 0;
2516

2617
public static int NotificationId
2718
{
28-
get { return AppSettings.GetValueOrDefault(NotificationIdKey, NotificationIdDefault); }
29-
set
30-
{
31-
AppSettings.AddOrUpdateValue(NotificationIdKey, value);
32-
}
19+
get => Preferences.Get(NotificationIdKey, NotificationIdDefault);
20+
set => Preferences.Set(NotificationIdKey, value);
3321
}
3422

35-
public static int GetUniqueNotificationId()
36-
{
37-
return NotificationId++;
38-
}
23+
public static int GetUniqueNotificationId() => NotificationId++;
3924

40-
}
25+
}
4126
}

src/Conference.Android/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="51" android:versionName="1.0.50" package="com.sample.conference" android:installLocation="auto">
3-
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="25" />
3+
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
44
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
55
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
66
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

src/Conference.Android/Resources/Resource.designer.cs

Lines changed: 3132 additions & 2583 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Conference.Android/app.config

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/Conference.Android/packages.config

Lines changed: 0 additions & 151 deletions
This file was deleted.

src/Conference.Clients.Portable/Conference.Clients.Portable.csproj

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,27 @@
1111

1212
<ItemGroup>
1313
<!--<PackageReferenceReference Include="" Version=""/>-->
14-
<PackageReference Include="CClarke.Plugin.Calendars" Version="0.6.45-beta" />
14+
<PackageReference Include="CClarke.Plugin.Calendars" Version="0.6.64-beta" />
1515
<PackageReference Include="FormsToolkit" Version="2.0.1" />
16-
<PackageReference Include="Humanizer" Version="2.2.0" />
16+
<PackageReference Include="Humanizer" Version="2.4.2" />
17+
<PackageReference Include="Microsoft.AppCenter" Version="1.7.0" />
18+
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="1.7.0" />
19+
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="1.7.0" />
20+
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="1.7.0" />
1721
<PackageReference Include="Microsoft.Azure.Mobile.Client" Version="4.0.2" />
1822
<PackageReference Include="Microsoft.Azure.Mobile.Client.SQLiteStore" Version="4.0.2" />
19-
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
20-
<PackageReference Include="NodaTime" Version="1.3.2" />
21-
<PackageReference Include="Plugin.Permissions" Version="2.2.1" />
22-
<PackageReference Include="Plugin.Share" Version="7.1.1" />
23+
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
24+
<PackageReference Include="NodaTime" Version="2.3.0" />
25+
<PackageReference Include="Plugin.Permissions" Version="3.0.0.12" />
2326
<PackageReference Include="Refractored.MvvmHelpers" Version="1.3.0" />
24-
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="1.1.9" />
25-
<PackageReference Include="SQLitePCLRaw.core" Version="1.1.9" />
26-
<PackageReference Include="Xam.Plugin.Connectivity" Version="3.1.1" />
27+
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="1.1.11" />
28+
<PackageReference Include="SQLitePCLRaw.core" Version="1.1.11" />
2729
<PackageReference Include="Xam.Plugin.ExternalMaps" Version="4.0.1" />
28-
<PackageReference Include="Xam.Plugins.Messaging" Version="4.0.0" />
29-
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
30-
<PackageReference Include="Xamarin.Forms.Maps" Version="2.5.0.280555" />
31-
<PackageReference Include="ZXing.Net.Mobile" Version="2.3.2" />
32-
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.3.2" />
30+
<PackageReference Include="Xamarin.Essentials" Version="0.8.0-preview" />
31+
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
32+
<PackageReference Include="Xamarin.Forms.Maps" Version="3.1.0.583944" />
33+
<PackageReference Include="ZXing.Net.Mobile" Version="2.4.1" />
34+
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.4.1" />
3335
</ItemGroup>
3436

3537
<ItemGroup>

src/Conference.Clients.Portable/ViewModel/AboutViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using FormsToolkit;
66
using MvvmHelpers;
77
using Xamarin.Forms;
8-
using Plugin.Share;
98

109
namespace Conference.Clients.Portable
1110
{

0 commit comments

Comments
 (0)