Merge pull request #4 from purplecabbage/CB-2382
unpack audio resource to isolated storage before playing
diff --git a/templates/standalone/cordovalib/CordovaView.xaml b/templates/standalone/cordovalib/CordovaView.xaml
index b993d97..41d7631 100644
--- a/templates/standalone/cordovalib/CordovaView.xaml
+++ b/templates/standalone/cordovalib/CordovaView.xaml
@@ -37,13 +37,13 @@
IsScriptEnabled="True"
Foreground="White"
Background="Black"
- Navigated="GapBrowser_Navigated"
- Loaded="GapBrowser_Loaded"
- Unloaded="GapBrowser_Unloaded"
- ScriptNotify="GapBrowser_ScriptNotify"
- LoadCompleted="GapBrowser_LoadCompleted"
- Navigating="GapBrowser_Navigating"
- NavigationFailed="GapBrowser_NavigationFailed"
+ Navigated="CordovaBrowser_Navigated"
+ Loaded="CordovaBrowser_Loaded"
+ Unloaded="CordovaBrowser_Unloaded"
+ ScriptNotify="CordovaBrowser_ScriptNotify"
+ LoadCompleted="CordovaBrowser_LoadCompleted"
+ Navigating="CordovaBrowser_Navigating"
+ NavigationFailed="CordovaBrowser_NavigationFailed"
IsGeolocationEnabled="True">
<phone:WebBrowser.Projection>
<PlaneProjection x:Name="BrowserProjector" CenterOfRotationX="0" RotationY="-180"/>
diff --git a/templates/standalone/cordovalib/CordovaView.xaml.cs b/templates/standalone/cordovalib/CordovaView.xaml.cs
index 0182d2f..9ed7e0b 100644
--- a/templates/standalone/cordovalib/CordovaView.xaml.cs
+++ b/templates/standalone/cordovalib/CordovaView.xaml.cs
@@ -205,7 +205,7 @@
}
}
- void GapBrowser_Loaded(object sender, RoutedEventArgs e)
+ void CordovaBrowser_Loaded(object sender, RoutedEventArgs e)
{
this.bmHelper.ScrollDisabled = this.DisableBouncyScrolling;
@@ -319,7 +319,7 @@
}
catch (Exception ex)
{
- Debug.WriteLine("ERROR: Exception in GapBrowser_Loaded :: {0}", ex.Message);
+ Debug.WriteLine("ERROR: Exception in CordovaBrowser_Loaded :: {0}", ex.Message);
}
}
@@ -376,7 +376,7 @@
}
}
- void GapBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
+ void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire()})();";
@@ -397,20 +397,17 @@
}
- void GapBrowser_Navigating(object sender, NavigatingEventArgs e)
+ void CordovaBrowser_Navigating(object sender, NavigatingEventArgs e)
{
if (!configHandler.URLIsAllowed(e.Uri.ToString()))
{
+ Debug.WriteLine("Whitelist exception: Stopping browser from navigating to :: " + e.Uri.ToString());
e.Cancel = true;
return;
}
this.PageDidChange = true;
- // Debug.WriteLine("GapBrowser_Navigating to :: " + e.Uri.ToString());
this.nativeExecution.ResetAllCommands();
-
- // TODO: check whitelist / blacklist
- // NOTE: Navigation can be cancelled by setting : e.Cancel = true;
}
/*
@@ -422,7 +419,7 @@
* it is simply output to the debugger output, and the method returns.
*
**/
- void GapBrowser_ScriptNotify(object sender, NotifyEventArgs e)
+ void CordovaBrowser_ScriptNotify(object sender, NotifyEventArgs e)
{
string commandStr = e.Value;
@@ -472,19 +469,19 @@
this.configHandler.URLIsAllowed(url);
}
- private void GapBrowser_Unloaded(object sender, RoutedEventArgs e)
+ private void CordovaBrowser_Unloaded(object sender, RoutedEventArgs e)
{
}
- private void GapBrowser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
+ private void CordovaBrowser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
{
- Debug.WriteLine("GapBrowser_NavigationFailed :: " + e.Uri.ToString());
+ Debug.WriteLine("CordovaBrowser_NavigationFailed :: " + e.Uri.ToString());
}
- private void GapBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
+ private void CordovaBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
- Debug.WriteLine("GapBrowser_Navigated :: " + e.Uri.ToString());
+ Debug.WriteLine("CordovaBrowser_Navigated :: " + e.Uri.ToString());
}