I’ve recently updated the Corona SDK I was using and I’m unsure how I go about listening for a dispatch event in the native android layer. I have this in my scene.lua
local gameOverEvent = { name = "coronaView", message = "gameOver" } Runtime:dispatchEvent(gameOverEvent)
and this in android
@Override public Object onReceivedCoronaEvent(CoronaView coronaView, Hashtable\<Object, Object\> hashtable) { if (hashtable.get("name").equals("coronaView")) { if (eventListener != null) { CoronaEvent event = new CoronaEvent(hashtable); if ("gameOver".equals(event.getMessage())) { eventListener.gameOver(); } return null; }
This used to work but it looks like I don’t have access to the CoronaView anymore. How do you go about listening for the event in the more recent Corona SDK?
Thanks