diff options
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android')
3 files changed, 13 insertions, 1 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/Activity1.cs b/Xamarin.Forms.ControlGallery.Android/Activity1.cs index 9dbd4b63..4a96b800 100644 --- a/Xamarin.Forms.ControlGallery.Android/Activity1.cs +++ b/Xamarin.Forms.ControlGallery.Android/Activity1.cs @@ -312,7 +312,7 @@ namespace Xamarin.Forms.ControlGallery.Android base.OnCreate (bundle); if (!Debugger.IsAttached) - Insights.Initialize (App.Secrets["InsightsApiKey"], ApplicationContext); + Insights.Initialize (App.InsightsApiKey, ApplicationContext); Forms.Init (this, bundle); FormsMaps.Init (this, bundle); diff --git a/Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs.blank b/Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs.blank new file mode 100644 index 00000000..9cfe62ba --- /dev/null +++ b/Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs.blank @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Android.App; + +[assembly: Android.App.MetaData("com.google.android.maps.v2.API_KEY", Value = "")] diff --git a/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj b/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj index ff23e911..e5628d8b 100644 --- a/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj +++ b/Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj @@ -257,4 +257,10 @@ </PropertyGroup> <Error Condition="!Exists('..\packages\Xamarin.Insights.1.11.4\build\MonoAndroid10\Xamarin.Insights.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xamarin.Insights.1.11.4\build\MonoAndroid10\Xamarin.Insights.targets'))" /> </Target> + <Target Name="BeforeBuild"> + <CreateItem Include="Properties\MapsKey.cs.blank"> + <Output TaskParameter="Include" ItemName="MapsKey" /> + </CreateItem> + <Copy SourceFiles="@(MapsKey)" DestinationFiles="Properties\MapsKey.cs" Condition="!Exists('Properties\MapsKey.cs')" /> + </Target> </Project>
\ No newline at end of file |