Drawing images

Hopefully my last stumbling block!

Say I’ve created the following class:

public class imageOverlay implements com.naef.jnlua.NamedJavaFunction { // This reports a class name back to Lua during the initiation phase. @Override public String getName() { return "imageOverlay"; } // This is what actually gets invoked by the Lua call @Override public int invoke(final LuaState luaState) { CoronaActivity activity = CoronaEnvironment.getCoronaActivity(); if (activity == null) { return 0; } activity.runOnUiThread(new Runnable() { @Override public void run() { CoronaActivity activity = CoronaEnvironment.getCoronaActivity(); if (activity == null) { return; } // Some code to go here }); } return 1; } }

Firstly, how would I modify this so that calling imageOverlay(“something”) passes “something” as a param to this method?

And secondly, how would I then load “something” in either as a image data directly, or as a path to load an image from, and then render that image to activity.getOverlayView() ?

Presumably I want to use BitmapFactory but exactly how, I’ve no idea.