Skip to content

Commit

Permalink
Update HockeySDK version for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina Popa committed May 12, 2016
1 parent 7b6ed50 commit a9e784b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
using Android.Runtime;
using System;
using System.Threading.Tasks;
using HockeyApp;


namespace MyDriving.Droid
{
Expand Down Expand Up @@ -82,20 +84,39 @@ void InitializeHockeyApp()
return;

HockeyApp.CrashManager.Register(this, Logger.HockeyAppAndroid);
HockeyApp.UpdateManager.Register(this, Logger.HockeyAppAndroid);
HockeyApp.Metrics.MetricsManager.Register(this, Application, Logger.HockeyAppAndroid);
HockeyApp.TraceWriter.Initialize();
HockeyApp.Metrics.MetricsManager.EnableUserMetrics();

AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) =>
{
HockeyApp.TraceWriter.WriteTrace(args.Exception);
args.Handled = true;
};
AppDomain.CurrentDomain.UnhandledException +=
(sender, args) => HockeyApp.TraceWriter.WriteTrace(args.ExceptionObject);
TaskScheduler.UnobservedTaskException += (sender, args) => HockeyApp.TraceWriter.WriteTrace(args.Exception);
CheckForUpdates();

}

void CheckForUpdates()
{
// Remove this for store builds!
UpdateManager.Register(this, Logger.HockeyAppAndroid);
}

void UnregisterManagers()
{
UpdateManager.Unregister();
}

protected override void OnPause()
{
base.OnPause();

UnregisterManagers();
}

protected override void OnDestroy()
{
base.OnDestroy();

UnregisterManagers();
}


void ListItemClicked(int itemId)
{
//this way we don't load twice, but you might want to modify this a bit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="HockeySDK, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\HockeySDK.Xamarin.4.1.0-beta1\lib\MonoAndroid403\HockeySDK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Devices.Client.PCL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.Devices.Client.PCL.1.0.3\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Microsoft.Azure.Devices.Client.PCL.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -249,9 +253,6 @@
<Reference Include="MvvmHelpers">
<HintPath>..\..\packages\Refractored.MvvmHelpers.1.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\MvvmHelpers.dll</HintPath>
</Reference>
<Reference Include="HockeySDK">
<HintPath>..\..\packages\HockeySDK.Xamarin.4.1.0-alpha2\lib\MonoAndroid403\HockeySDK.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyDriving.DataStore.Abstractions\MyDriving.DataStore.Abstractions.csproj">
Expand Down Expand Up @@ -309,7 +310,9 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Resources\AboutResources.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="Assets\AboutAssets.txt" />
Expand Down
2 changes: 1 addition & 1 deletion src/MobileApps/MyDriving/MyDriving.Android/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Acr.Support" version="1.1.1" targetFramework="MonoAndroid60" />
<package id="Acr.UserDialogs.Android.AppCompat" version="4.3.2" targetFramework="MonoAndroid60" />
<package id="HockeySDK.Xamarin" version="4.1.0-alpha2" targetFramework="MonoAndroid60" />
<package id="HockeySDK.Xamarin" version="4.1.0-beta1" targetFramework="monoandroid60" />
<package id="Humanizer.Core" version="2.0.1" targetFramework="monoandroid60" />
<package id="Microsoft.Azure.Devices.Client.PCL" version="1.0.3" targetFramework="monoandroid60" />
<package id="Microsoft.Azure.Mobile.Client" version="2.0.1" targetFramework="monoandroid60" />
Expand Down

0 comments on commit a9e784b

Please sign in to comment.