summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.Android
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@gmail.com>2016-03-24 16:33:32 (GMT)
committerE.Z. Hart <hartez@gmail.com>2016-03-24 16:48:21 (GMT)
commit1dcf5fef35c1c09e64f3c9e9ce6a31d2d0c3cd4a (patch)
tree2d3ae2fe8ef99ccca22306ecf530053d32d3bab1 /Xamarin.Forms.ControlGallery.Android
parenta9e90a88ed401a8605b9798d4566d09a7192e280 (diff)
downloadxamarin-forms-1dcf5fef35c1c09e64f3c9e9ce6a31d2d0c3cd4a.zip
xamarin-forms-1dcf5fef35c1c09e64f3c9e9ce6a31d2d0c3cd4a.tar.gz
xamarin-forms-1dcf5fef35c1c09e64f3c9e9ce6a31d2d0c3cd4a.tar.bz2
Move initialization of configuration files (if needed) to a pre-build task
Remove unneeded init scripts
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android')
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Activity1.cs2
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs.blank6
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj6
3 files changed, 13 insertions, 1 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/Activity1.cs b/Xamarin.Forms.ControlGallery.Android/Activity1.cs
index 9dbd4b6..4a96b80 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 0000000..9cfe62b
--- /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 ff23e91..e5628d8 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