This isn't working as advertised.
I can place the ToApp block in my model, enter the name of my custom method in the block dialog, and it builds and deploys properly - although my method has not yet been defined in the main activity model-name.java
Following the call-chain of the generated code, it would appear that my custom method does indeed need to be placed in this file. But, I would then need to re-build the model so that my custom code is properly included in the app that is deployed.
However, the Simulink build re-generates this file every time that it is invoked - over-writing any changes I make (including the addition of my custom method). The file is not stable, so I can't add code there and have it be included in any subsequent builds.
Do I HAVE to import the generated code to Android Studio in order to fully implement this function? If I add more blocks to the model and have to re-build from Simulink, how can I make the build keep my original custom method?