Skip to content

Commit

Permalink
Merge pull request #652 from Microsoft/develop
Browse files Browse the repository at this point in the history
v1.6.0
  • Loading branch information
guperrot authored Apr 19, 2018
2 parents 51f25a9 + 22387c0 commit f3157b7
Show file tree
Hide file tree
Showing 156 changed files with 1,782 additions and 1,666 deletions.
9 changes: 9 additions & 0 deletions Apps/Contoso.Android.Puppet/ModulePages/CrashesFragment.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Threading;
using Android.Content;
using Android.OS;
using Android.Views;
Expand All @@ -19,6 +20,7 @@ public class CrashesFragment : PageFragment
private Button CrashWithNullReferenceExceptionButton;
private Button CatchNullReferenceExceptionButton;
private Button CrashAsyncButton;
private Button CrashDotNetThreadButton;
private Button CrashSuperNotCalledButton;
private Button CrashJavaFromDotNetButton;

Expand All @@ -39,6 +41,7 @@ public override void OnViewCreated(View view, Bundle savedInstanceState)
CrashWithNullReferenceExceptionButton = view.FindViewById(Resource.Id.crash_with_null_reference_exception) as Button;
CatchNullReferenceExceptionButton = view.FindViewById(Resource.Id.catch_null_reference_exception) as Button;
CrashAsyncButton = view.FindViewById(Resource.Id.crash_async) as Button;
CrashDotNetThreadButton = view.FindViewById(Resource.Id.crash_from_dotnet_thread) as Button;
CrashSuperNotCalledButton = view.FindViewById(Resource.Id.crash_super_not_called) as Button;
CrashJavaFromDotNetButton = view.FindViewById(Resource.Id.crash_java_from_dotnet) as Button;

Expand All @@ -50,6 +53,7 @@ public override void OnViewCreated(View view, Bundle savedInstanceState)
CrashWithNullReferenceExceptionButton.Click += CrashWithNullReferenceException;
CatchNullReferenceExceptionButton.Click += CatchNullReferenceException;
CrashAsyncButton.Click += CrashAsync;
CrashDotNetThreadButton.Click += CrashDotNetThread;
CrashSuperNotCalledButton.Click += CrashSuperNotCalled;
CrashJavaFromDotNetButton.Click += CrashJavaFromDotNet;

Expand Down Expand Up @@ -123,6 +127,11 @@ async private void CrashAsync(object sender, EventArgs e)
await FakeService.DoStuffInBackground();
}

private void CrashDotNetThread(object sender, EventArgs e)
{
new Thread(() => throw new Exception("oops")).Start();
}

private void CrashSuperNotCalled(object sender, EventArgs e)
{
StartActivity(new Intent(Activity, typeof(CrashActivity)));
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="48" android:versionName="1.5.0-SNAPSHOT" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="50" android:versionName="1.6.0-SNAPSHOT" android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<application android:label="SXPuppet" android:icon="@drawable/Icon" android:theme="@style/PuppetTheme">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
Expand Down
4 changes: 2 additions & 2 deletions Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")]
5 changes: 5 additions & 0 deletions Apps/Contoso.Android.Puppet/Resources/layout/Crashes.axml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
android:text="@string/CrashAsync"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/crash_from_dotnet_thread"
android:text="@string/CrashDotNetThread"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/crash_super_not_called"
android:text="@string/CrashSuperNotCalled"
Expand Down
75 changes: 38 additions & 37 deletions Apps/Contoso.Android.Puppet/Resources/values/Strings.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="ApplicationName">App Center Puppet</string>
<string name="AppCenterTitle">App Center</string>
<string name="AnalyticsTitle">Analytics</string>
<string name="CrashesTitle">Crashes</string>
<string name="OthersTitle">Others</string>
<string name="AppCenterEnabled">App Center Enabled</string>
<string name="AppCenterLogLevel">Log Level</string>
<string name="AppCenterLogMessage">Log Message</string>
<string name="AppCenterLogTag">Log Tag</string>
<string name="AppCenterWriteLog">Write Log</string>
<string name="AnalyticsEnabled">Analytics Enabled</string>
<string name="AnalyticsEventName">Event Name</string>
<string name="AnalyticsProperties">Properties</string>
<string name="AnalyticsAddProperty">Add Property</string>
<string name="AnalyticsTrackEvent">Track Event</string>
<string name="CrashesEnabled">Crashes Enabled</string>
<string name="TestCrash">Generate Test Crash</string>
<string name="PushEnabled">Push Enabled</string>
<string name="FirebaseAnalyticsEnabled">Firebase Analytics Enabled</string>
<string name="DivideByZero">Divide 42 by 0</string>
<string name="CrashWithAggregateException">Crash With Aggregate Exception</string>
<string name="CrashWithNullReferenceException">Crash With NullReferenceException</string>
<string name="CatchNullReferenceException">Test Catching NullReferenceException</string>
<string name="CrashAsync">Crash Inside Async Task</string>
<string name="CrashSuperNotCalled">Crash Pure Java: SuperNotCalledException</string>
<string name="CrashJavaFromDotNet">Crash Java from .NET</string>
<string name="DistributeEnabled">Distribute Enabled</string>
<string name="crash_confirmation_dialog_title">Unexpected crash found</string>
<string name="crash_confirmation_dialog_message">Would you like to send an anonymous report so we can fix the problem?</string>
<string name="crash_confirmation_dialog_not_send_button">Don\'t Send</string>
<string name="crash_confirmation_dialog_always_send_button">Always Send</string>
<string name="crash_confirmation_dialog_send_button">Send</string>
<string name="version_x_available">Version {0} available!</string>
<string name="add_property_dialog_title">Add Property</string>
<string name="add_property_dialog_message">Please enter a property values to add to the event</string>
<string name="add_property_dialog_add_button">Add Property</string>
<string name="add_property_dialog_cancel_button">Cancel</string>
<string name="ApplicationName">App Center Puppet</string>
<string name="AppCenterTitle">App Center</string>
<string name="AnalyticsTitle">Analytics</string>
<string name="CrashesTitle">Crashes</string>
<string name="OthersTitle">Others</string>
<string name="AppCenterEnabled">App Center Enabled</string>
<string name="AppCenterLogLevel">Log Level</string>
<string name="AppCenterLogMessage">Log Message</string>
<string name="AppCenterLogTag">Log Tag</string>
<string name="AppCenterWriteLog">Write Log</string>
<string name="AnalyticsEnabled">Analytics Enabled</string>
<string name="AnalyticsEventName">Event Name</string>
<string name="AnalyticsProperties">Properties</string>
<string name="AnalyticsAddProperty">Add Property</string>
<string name="AnalyticsTrackEvent">Track Event</string>
<string name="CrashesEnabled">Crashes Enabled</string>
<string name="TestCrash">Generate Test Crash</string>
<string name="PushEnabled">Push Enabled</string>
<string name="FirebaseAnalyticsEnabled">Firebase Analytics Enabled</string>
<string name="DivideByZero">Divide 42 by 0</string>
<string name="CrashWithAggregateException">Crash With Aggregate Exception</string>
<string name="CrashWithNullReferenceException">Crash With NullReferenceException</string>
<string name="CatchNullReferenceException">Test Catching NullReferenceException</string>
<string name="CrashAsync">Crash Inside Async Task</string>
<string name="CrashDotNetThread">Crash Inside .NET Thread</string>
<string name="CrashSuperNotCalled">Crash Pure Java: SuperNotCalledException</string>
<string name="CrashJavaFromDotNet">Crash Java from .NET</string>
<string name="DistributeEnabled">Distribute Enabled</string>
<string name="crash_confirmation_dialog_title">Unexpected crash found</string>
<string name="crash_confirmation_dialog_message">Would you like to send an anonymous report so we can fix the problem?</string>
<string name="crash_confirmation_dialog_not_send_button">Don\'t Send</string>
<string name="crash_confirmation_dialog_always_send_button">Always Send</string>
<string name="crash_confirmation_dialog_send_button">Send</string>
<string name="version_x_available">Version {0} available!</string>
<string name="add_property_dialog_title">Add Property</string>
<string name="add_property_dialog_message">Please enter a property values to add to the event</string>
<string name="add_property_dialog_add_button">Add Property</string>
<string name="add_property_dialog_cancel_button">Cancel</string>
</resources>
55 changes: 27 additions & 28 deletions Apps/Contoso.Forms.Demo/Contoso.Forms.Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ public partial class App : Application
const string androidKey = "987b5941-4fac-4968-933e-98a7ff29237c";
const string iosKey = "fe2bf05d-f4f9-48a6-83d9-ea8033fbb644";

static App()
{
Crashes.SendingErrorReport += SendingErrorReportHandler;
Crashes.SentErrorReport += SentErrorReportHandler;
Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler;
Push.PushNotificationReceived += OnPushNotificationReceived;
}

public App()
{
InitializeComponent();
Expand All @@ -35,26 +27,33 @@ public App()

protected override void OnStart()
{
AppCenter.LogLevel = LogLevel.Verbose;
Crashes.ShouldProcessErrorReport = ShouldProcess;
Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler;
Crashes.GetErrorAttachments = GetErrorAttachments;
Distribute.ReleaseAvailable = OnReleaseAvailable;
AppCenter.Start($"uwp={uwpKey};android={androidKey};ios={iosKey}",
typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push));

AppCenter.GetInstallIdAsync().ContinueWith(installId =>
{
AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result);
});
Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed =>
{
AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result);
});
Crashes.GetLastSessionCrashReportAsync().ContinueWith(report =>
{
AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception);
});
if (!AppCenter.Configured)
{
AppCenter.LogLevel = LogLevel.Verbose;
Crashes.SendingErrorReport += SendingErrorReportHandler;
Crashes.SendingErrorReport += SendingErrorReportHandler;
Crashes.SentErrorReport += SentErrorReportHandler;
Crashes.FailedToSendErrorReport += FailedToSendErrorReportHandler;
Crashes.ShouldProcessErrorReport = ShouldProcess;
Crashes.ShouldAwaitUserConfirmation = ConfirmationHandler;
Crashes.GetErrorAttachments = GetErrorAttachments;
Distribute.ReleaseAvailable = OnReleaseAvailable;
Push.PushNotificationReceived += OnPushNotificationReceived;
AppCenter.Start($"uwp={uwpKey};android={androidKey};ios={iosKey}",
typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push));
AppCenter.GetInstallIdAsync().ContinueWith(installId =>
{
AppCenterLog.Info(LogTag, "AppCenter.InstallId=" + installId.Result);
});
Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed =>
{
AppCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result);
});
Crashes.GetLastSessionCrashReportAsync().ContinueWith(report =>
{
AppCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception);
});
}
}

protected override void OnSleep()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Contoso.Forms.Puppet.Droid</RootNamespace>
<AssemblyName>Contoso.Forms.Puppet.Droid</AssemblyName>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
Expand Down Expand Up @@ -155,6 +155,8 @@
<AndroidResource Include="Resources\drawable-hdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xhdpi\icon.png" />
<AndroidResource Include="Resources\drawable-xxhdpi\icon.png" />
<AndroidResource Include="Resources\drawable\ic_appcenter_logo.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Contoso.Forms.Puppet\Contoso.Forms.Puppet.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="49" android:versionName="1.5.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="26" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<application android:label="ACFPuppet" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="51" android:versionName="1.6.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="26" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<application android:label="ACFPuppet">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_appcenter_logo" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/appcenter_logo" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyInformationalVersion("1.5.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyInformationalVersion("1.6.0-SNAPSHOT")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="256.0"
android:viewportWidth="256.0">
<path
android:fillColor="#CB2E62"
android:pathData="M188,110.4l0,104.7 -3.2,-0.6c-1.8,-0.3 -42,-6.2 -89.3,-13 -47.3,-6.9 -86.9,-12.7 -87.9,-12.9 -9.4,-2.3 13,5.5 90.7,31.4l90.8,30.2 21.7,-9c11.9,-5 25.6,-10.7 30.5,-12.7l8.7,-3.7 0,-96.7 0,-96.7 -29.5,-12.2c-16.2,-6.8 -30.2,-12.5 -31,-12.8 -1.3,-0.5 -1.5,11.2 -1.5,104z" />
<path
android:fillColor="#CB2E62"
android:pathData="M46.3,64.8l-20.3,17.7 0,7.7 0,7.6 11.7,7.5 11.6,7.5 -11.6,7.7 -11.7,7.7 0,7.6 0.1,7.7 20.5,17.9 20.5,17.8 6.7,-1.6c3.7,-1 8.4,-2.1 10.4,-2.7l3.8,-1 0.2,-17.8 0.3,-17.8 19.8,12.9 19.7,12.8 18,-5.1 18,-5.2 0,-40.8 0,-40.8 -6.7,-2c-3.8,-1.1 -11.8,-3.4 -18,-5.2l-11.2,-3.2 -19.4,12.7c-10.7,6.9 -19.7,12.6 -20,12.6 -0.4,0 -0.8,-8 -0.9,-17.7l-0.3,-17.7 -9,-2.3c-4.9,-1.2 -9.7,-2.2 -10.5,-2.2 -0.8,0 -10.6,7.9 -21.7,17.7zM66.8,93.4l-0.3,8.4 -13.3,-6.7 -13.4,-6.7 13.4,-10 13.3,-10.1 0.3,8.4c0.1,4.6 0.1,12.1 0,16.7zM127.6,131.7c-0.2,0.2 -9.1,-3.9 -19.7,-9.3l-19.4,-9.7 19.5,-9.7 19.5,-9.8 0.3,19.1c0.1,10.4 0.1,19.2 -0.2,19.4zM67,140.5c0,9.1 -0.2,16.5 -0.5,16.5 -0.5,0 -23.6,-17 -25.9,-19.1 -0.7,-0.6 23.4,-13.7 25.7,-13.8 0.4,-0.1 0.7,7.3 0.7,16.4z" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="appcenter_logo">#CB2E62</color>
</resources>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Puppet.U" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="1.5.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Puppet.U" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="1.6.0.0" />
<mp:PhoneIdentity PhoneProductId="55497ed8-b2ac-4485-ba79-e2b65bb720ed" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AppCenter-Contoso.Forms.Puppet.UWP</DisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter.xamarin.forms.puppet</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.6.0</string>
<key>CFBundleVersion</key>
<string>1.5.0</string>
<string>1.6.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
Loading

0 comments on commit f3157b7

Please sign in to comment.