Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Oct 1, 2021
1 parent 00e7538 commit 3499dd2
Show file tree
Hide file tree
Showing 10 changed files with 17,025 additions and 23,650 deletions.
5 changes: 3 additions & 2 deletions 2021-10-01_xamexpertday/App1/App1.Android/App1.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="Mono.Android.Export" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -53,8 +54,8 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.app1">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.shinyorg.xamexpertdays" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<application android:label="App1.Android" android:theme="@style/MainTheme"></application>
<application android:label="XamExpertDays" android:theme="@style/MainTheme"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
40,516 changes: 17,007 additions & 23,509 deletions 2021-10-01_xamexpertday/App1/App1.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions 2021-10-01_xamexpertday/App1/App1.iOS/App1.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Shiny">
<Version>2.1.0.2741</Version>
<Version>2.2.0.2829</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions 2021-10-01_xamexpertday/App1/App1.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>App1</string>
<string>XamExpertDays</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.App1</string>
<string>com.shinyorg.xamexpertdays</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
Expand Down
19 changes: 5 additions & 14 deletions 2021-10-01_xamexpertday/App1/App1/App1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shiny" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Beacons" Version="2.1.0.2741" />
<PackageReference Include="Shiny.BluetoothLE" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Framework" Version="1.0.0.74" />
<PackageReference Include="Shiny.Integrations.Sqlite" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Locations" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Logging.AppCenter" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Net.Http" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Nfc" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Notifications" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Push.AzureNotificationHubs" Version="2.1.0.2741" />
<PackageReference Include="Shiny.Sensors" Version="2.1.0.2741" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Shiny" Version="2.2.0.2829" />
<PackageReference Include="Shiny.Notifications" Version="2.2.0.2829" />
<PackageReference Include="Shiny.Push.AzureNotificationHubs" Version="2.2.0.2829" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
</Project>
14 changes: 0 additions & 14 deletions 2021-10-01_xamexpertday/App1/App1/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ private async void Button_Clicked(object sender, System.EventArgs e)
var success = result.FirstOrDefault().Success ? "Success" : "FAIL";

await this.DisplayAlert("Job Done", "Yay!! " + success, "OK");


var push = ShinyHost.Resolve<IPushManager>();
var pushAccess = await push.RequestAccess();

push
.WhenReceived()
.Subscribe(pushNotification =>
{
if (pushNotification.Data.ContainsKey("Message"))
{
Console.WriteLine(pushNotification.Data["Message"]);
}
});
}
}
}
57 changes: 2 additions & 55 deletions 2021-10-01_xamexpertday/App1/App1/MyJob.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using Shiny.Jobs;
using Shiny.Notifications;

using System.Threading;
using System.Threading.Tasks;


namespace App1
{
public class MyJob : IJob
{
readonly INotificationManager notifications;

public MyJob(INotificationManager notifications)
{
this.notifications = notifications;
Expand All @@ -18,59 +17,7 @@ public MyJob(INotificationManager notifications)

public async Task Run(JobInfo jobInfo, CancellationToken cancelToken)
{
await this.notifications.Send("Hi", "Test Message");
await this.notifications.Send("Hi", "I'm firing from a background job");
}
}
}

























//using Shiny.Jobs;
//using Shiny.Notifications;
//using System.Threading;
//using System.Threading.Tasks;
//using Microsoft.Extensions.Logging;


//namespace App1
//{
// public class MyJob : IJob
// {
// readonly INotificationManager notifications;
// readonly ILogger logger;

// public MyJob(INotificationManager notifications, ILogger<MyJob> logger)
// {
// this.notifications = notifications;
// this.logger = logger;
// }


// public async Task Run(JobInfo jobInfo, CancellationToken cancelToken)
// {
// await this.notifications.Send("Test", "Hello from job!");
// }
// }
//}
24 changes: 0 additions & 24 deletions 2021-10-01_xamexpertday/App1/App1/MyPushDelegate.cs

This file was deleted.

26 changes: 1 addition & 25 deletions 2021-10-01_xamexpertday/App1/App1/MyShinyStartup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Shiny;
using Microsoft.Extensions.Logging;


namespace App1
Expand All @@ -10,31 +9,8 @@ public class MyShinyStartup : ShinyStartup
public override void ConfigureServices(IServiceCollection services, IPlatform platform)
{
services.RegisterJob(new Shiny.Jobs.JobInfo(typeof(MyJob)) {
DeviceCharging = true,
BatteryNotLow = true,
RequiredInternetAccess = Shiny.Jobs.InternetAccess.Any
});
services.UseNotifications();

//services.UsePush<MyPushDelegate>();
//services.UsePushAzureNotificationHubs<MyPushDelegate>("Listener connection string", "hub name");
}


public override void ConfigureLogging(ILoggingBuilder builder, IPlatform platform)
{
builder.AddAppCenter("AppCenterSecret");
}
}
}









////services.UsePush<MyPushDelegate>();
//services.UsePushAzureNotificationHubs<MyPushDelegate>("", "");
}

0 comments on commit 3499dd2

Please sign in to comment.