Skip to content

Commit

Permalink
Merge pull request #808 from Microsoft/develop
Browse files Browse the repository at this point in the history
created PR to merge the changes to Master
  • Loading branch information
Subhashvysyaraju authored Jan 17, 2019
2 parents cabf801 + d475fa1 commit d438bee
Show file tree
Hide file tree
Showing 87 changed files with 440 additions and 269 deletions.
12 changes: 12 additions & 0 deletions Apps/Contoso.Android.Puppet/ModulePages/AppCenterFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class AppCenterFragment : PageFragment
private EditText LogWriteTagText;
private TextView LogWriteLevelLabel;
private Button LogWriteButton;
private EditText UserIdText;

public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
Expand All @@ -51,12 +52,14 @@ public override void OnViewCreated(View view, Bundle savedInstanceState)
LogWriteTagText = view.FindViewById(Resource.Id.write_log_tag) as EditText;
LogWriteLevelLabel = view.FindViewById(Resource.Id.write_log_level) as TextView;
LogWriteButton = view.FindViewById(Resource.Id.write_log) as Button;
UserIdText = view.FindViewById(Resource.Id.write_user_id) as EditText;

// Subscribe to events.
AppCenterEnabledSwitch.CheckedChange += UpdateEnabled;
((View)LogLevelLabel.Parent).Click += LogLevelClicked;
((View)LogWriteLevelLabel.Parent).Click += LogWriteLevelClicked;
LogWriteButton.Click += WriteLog;
UserIdText.KeyPress += UserIdTextKeyPressedHandler;

UpdateState();
}
Expand Down Expand Up @@ -109,6 +112,15 @@ private void LogWriteLevelClicked(object sender, EventArgs e)
StartActivityForResult(intent, 1);
}

private void UserIdTextKeyPressedHandler(object sender, View.KeyEventArgs e)
{
if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
{
var text = string.IsNullOrEmpty(UserIdText.Text) ? null : UserIdText.Text;
AppCenter.SetUserId(text);
}
}

private void WriteLog(object sender, EventArgs e)
{
string message = LogWriteMessageText.Text;
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="54" android:versionName="1.12.0-SNAPSHOT" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.appcenter.xamarin.puppet" android:versionCode="54" android:versionName="1.13.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.12.0.0")]
[assembly: AssemblyInformationalVersion("1.12.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: AssemblyInformationalVersion("1.13.0-SNAPSHOT")]
18 changes: 17 additions & 1 deletion Apps/Contoso.Android.Puppet/Resources/layout/AppCenter.axml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@
android:text="@string/AppCenterWriteLog"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="@string/AppCenterUserId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp" />
<EditText
android:id="@+id/write_user_id"
android:maxLines="1"
android:inputType="text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
2 changes: 2 additions & 0 deletions Apps/Contoso.Android.Puppet/Resources/values/Strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<string name="AppCenterLogMessage">Log Message</string>
<string name="AppCenterLogTag">Log Tag</string>
<string name="AppCenterWriteLog">Write Log</string>
<string name="AppCenterWriteUserId">Write User Id</string>
<string name="AppCenterUserId">User Id</string>
<string name="AnalyticsEnabled">Analytics Enabled</string>
<string name="AnalyticsEventName">Event Name</string>
<string name="AnalyticsProperties">Properties</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
<TableSection Title="AppCenter Settings">
<SwitchCell Text="AppCenter Enabled" On="true" x:Name="AppCenterEnabledSwitchCell" OnChanged="UpdateEnabled"/>
</TableSection>
<TableSection Title="Logging">
<EntryCell Label="User Id" x:Name="UserIdEntryCell" HorizontalTextAlignment="End" Completed="UserIdCompleted"/>
</TableSection>
</TableView>
</ContentPage>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AppCenter;
using System;
using Microsoft.AppCenter;
using Xamarin.Forms;

namespace Contoso.Forms.Demo
Expand All @@ -25,5 +26,12 @@ async void UpdateEnabled(object sender, ToggledEventArgs e)
{
await AppCenter.SetEnabledAsync(e.Value);
}

void UserIdCompleted(object sender, EventArgs e)
{
//TODO: Enable this once NuGet package is updated as part of release process.
//var text = string.IsNullOrEmpty(UserIdEntryCell.Text) ? null : UserIdEntryCell.Text;
//AppCenter.SetUserId(text);
}
}
}
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" android:versionCode="55" android:versionName="1.12.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="55" android:versionName="1.13.0-SNAPSHOT" package="com.microsoft.appcenter.xamarin.forms.puppet">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26" />
<application android:label="ACFPuppet">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
Expand Down
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.12.0.0")]
[assembly: AssemblyInformationalVersion("1.12.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: AssemblyInformationalVersion("1.13.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
@@ -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.12.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.Forms.Puppet.U" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="1.13.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.12.0.0")]
[assembly: AssemblyFileVersion("1.13.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.12.0</string>
<string>1.13.0</string>
<key>CFBundleVersion</key>
<string>1.12.0</string>
<string>1.13.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected override void OnStart()
AppCenterLog.Assert(LogTag, "AppCenter.Configured=" + AppCenter.Configured);
AppCenter.SetLogUrl("https://in-integration.dev.avalanch.es");
Distribute.SetInstallUrl("https://install.portal-server-core-integration.dev.avalanch.es");
Distribute.SetApiUrl("https://appcenter-int.trafficmanager.net/api/v0.1");
Distribute.SetApiUrl("https://api-gateway-core-integration.dev.avalanch.es/v0.1");
AppCenter.Start($"uwp={UwpKey};android={AndroidKey};ios={IosKey}", typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push));
AppCenter.IsEnabledAsync().ContinueWith(enabled =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@
<Button Text="Write Log" InputTransparent="true" Clicked="WriteLog"/>
</ViewCell>
</TableSection>
<TableSection Title="Logging">
<EntryCell Label="User Id" x:Name="UserIdEntryCell" HorizontalTextAlignment="End" Completed="UserIdCompleted"/>
</TableSection>
</TableView>
</ContentPage>
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,11 @@ void UpdateLogWriteLevelLabel()
{
LogWriteLevelLabel.Text = LogLevelNames[LogWriteLevel];
}

void UserIdCompleted(object sender, EventArgs e)
{
var text = string.IsNullOrEmpty(UserIdEntryCell.Text) ? null : UserIdEntryCell.Text;
AppCenter.SetUserId(text);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("1.12.0.0")]
[assembly: AssemblyInformationalVersion("1.12.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: AssemblyInformationalVersion("1.13.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
2 changes: 1 addition & 1 deletion Apps/Contoso.UWP.Puppet/Package.appxmanifest
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.UWP.Puppet" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="1.12.0.0" />
<Identity Name="10805zumoTestUser.AppCenter-Contoso.UWP.Puppet" Publisher="CN=B2D1C358-6AF8-4416-BF73-129CC1F3C152" Version="1.13.0.0" />
<mp:PhoneIdentity PhoneProductId="ce1e8604-09a9-4ffb-846b-8762beb84188" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AppCenter-Contoso.UWP.Puppet</DisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs
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.12.0.0")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions Apps/Contoso.WPF.Puppet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("1.12.0.0")]
[assembly: AssemblyInformationalVersion("1.12.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: AssemblyInformationalVersion("1.13.0-SNAPSHOT")]
4 changes: 2 additions & 2 deletions Apps/Contoso.WinForms.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.12.0.0")]
[assembly: AssemblyInformationalVersion("1.12.0-SNAPSHOT")]
[assembly: AssemblyFileVersion("1.13.0.0")]
[assembly: AssemblyInformationalVersion("1.13.0-SNAPSHOT")]
2 changes: 1 addition & 1 deletion Apps/Contoso.iOS.Puppet/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary l
_didTapNotification = false;
};
Distribute.SetInstallUrl("http://install.appcenter-int.trafficmanager.net");
Distribute.SetApiUrl("https://appcenter-int.trafficmanager.net/api/v0.1");
Distribute.SetApiUrl("https://api-gateway-core-integration.dev.avalanch.es/v0.1");
Distribute.DontCheckForUpdatesInDebug();
AppCenter.Start("e94aaff4-e80d-4fee-9a5f-a84eb6e688fc", typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push));
return true;
Expand Down
4 changes: 2 additions & 2 deletions Apps/Contoso.iOS.Puppet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter.xamarin.puppet</string>
<key>CFBundleShortVersionString</key>
<string>1.12.0</string>
<string>1.13.0</string>
<key>CFBundleVersion</key>
<string>1.12.0</string>
<string>1.13.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
Expand Down
Loading

0 comments on commit d438bee

Please sign in to comment.