diff --git a/plugins/2019.3497/android/plugin.unityads.v4.jar b/plugins/2019.3497/android/plugin.unityads.v4.jar index f87e7bb..2d1b92b 100644 Binary files a/plugins/2019.3497/android/plugin.unityads.v4.jar and b/plugins/2019.3497/android/plugin.unityads.v4.jar differ diff --git a/src/Corona/main.lua b/src/Corona/main.lua index c52fc2f..77dbe5a 100644 --- a/src/Corona/main.lua +++ b/src/Corona/main.lua @@ -165,6 +165,16 @@ local loadRewardedButton = widget.newButton { end } +local exitButton = widget.newButton { + label = "Exit", + width = 100, + height = 40, + labelColor = { default={ 0, 0, 0 }, over={ 0.7, 0.7, 0.7 } }, + onRelease = function(event) + native.requestExit() + end +} + vReady = display.newCircle(10, 10, 6) vReady.strokeWidth = 2 vReady:setStrokeColor(0) @@ -226,6 +236,11 @@ local layoutDisplayObjects = function(orientation) loadRewardedButton.x = display.contentCenterX-40 loadRewardedButton.y = showRewardedButton.y + + + exitButton.x = display.contentCenterX + exitButton.y = showRewardedButton.y+40 + end -- initial layout diff --git a/src/android/plugin/src/main/java/plugin/unityads/v4/LuaLoader.java b/src/android/plugin/src/main/java/plugin/unityads/v4/LuaLoader.java index 5d52404..91678a0 100644 --- a/src/android/plugin/src/main/java/plugin/unityads/v4/LuaLoader.java +++ b/src/android/plugin/src/main/java/plugin/unityads/v4/LuaLoader.java @@ -209,6 +209,8 @@ public void onExiting(CoronaRuntime runtime) { CoronaLua.deleteRef(runtime.getLuaState(), coronaListener); coronaListener = CoronaLua.REFNIL; coronaRuntimeTaskDispatcher = null; + fInitSuccess = false; + fInitStarted = false; } @@ -305,7 +307,6 @@ public int invoke(final LuaState luaState) { return 0; } fInitStarted = true; - // set function signature for error / warning messages functionSignature = "unityads.init(listener, options)";