I’m trying to get my first Android plugin to work. I’ve successfully registered it and able to execute it. Inside of my plugin execute action, I am trying to do the following:
ctx.setContentView(R.layout.map);
Which contains a new layout to load google maps; however, when I run this I receive the following error:
Only the original thread that created a view hierarchy can touch its views.
Any idea how I should go about doing this?
You have to run it on UI thread. You can touch UI elements only on UI thread.