This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fCoronaPanel.Runtime.Loaded += OnCoronaRuntimeLoaded; | |
fCoronaPanel.Runtime.Terminating += OnCoronaRuntimeExiting; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void OnCoronaRuntimeLoaded( | |
object sender, CoronaLabs.Corona.WinRT.CoronaRuntimeEventArgs e) | |
{ | |
// Keep a reference to the Corona runtime environment. | |
// It's needed so that your login window's results can be dispatched to Corona. | |
fCoronaRuntimeEnvironment = e.CoronaRuntimeEnvironment; | |
fCoronaRuntimeEnvironment.AddEventListener("requestingLogin", OnRequestingLogin); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string username = string.Empty; | |
var boxedUsername = e.Properties.Get("username") as CoronaLabs.Corona.WinRT.CoronaBoxedString; | |
if (boxedUsername != null) | |
{ | |
username = boxedUsername.ToString(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Navigation; | |
using Microsoft.Phone.Controls; | |
using Microsoft.Phone.Shell; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings = | |
{ | |
plugins = | |
{ | |
["CoronaProvider.native.popup.activity"] = | |
{ | |
publisherId = "com.coronalabs", | |
supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, | |
}, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local items = | |
{ | |
{ type = "image", value = { filename = "Icon.png", baseDir = system.ResourceDirectory, } }, | |
{ type = "string", value = "Hello, World" }, | |
{ type = "url", value = "http://www.coronalabs.com" }, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local shareButton -- will define later | |
local function showShare() | |
local popupName = "activity" | |
local isAvailable = native.canShowPopup( popupName ) | |
local isSimulator = "simulator" == system.getInfo( "environment" ) | |
-- If it is possible to show the popup | |
if isAvailable then | |
local listener = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary>Called by Lua when it is requesting a login popup to be shown.</summary> | |
/// <param name="sender">The CoronaRuntimeEnvironment that dispatched this event.</param> | |
/// <param name="e">Provides the Lua vent table's fields/properties.</param> | |
/// <returns>Returns a boxed object to Lua.</returns> | |
private CoronaLabs.Corona.WinRT.ICoronaBoxedData rateApp( | |
CoronaLabs.Corona.WinRT.CoronaRuntimeEnvironment sender, | |
CoronaLabs.Corona.WinRT.CoronaLuaEventArgs e) | |
{ | |
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); | |
marketplaceReviewTask.Show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void OnCoronaRuntimeLoaded( | |
object sender, CoronaLabs.Corona.WinRT.CoronaRuntimeEventArgs e) | |
{ | |
// Keep a reference to the Corona runtime environment. | |
// It's needed so that your login window's results can be dispatched to Corona. | |
fCoronaRuntimeEnvironment = e.CoronaRuntimeEnvironment; | |
fCoronaRuntimeEnvironment.AddEventListener("rateApp", rateApp); | |
} |