This topic is the first part of a series on how to create Android Plugins for Unity. Start here if you have little to no experience creating plugins, and/or the Android OS.
Through this series, I extensively use external links that I encourage you to read. While paraphrased versions of the relevant content will be included here, there may be times when the additional reading will help.
Currently, Unity provides two ways to call native Android code.
To interact with native code, Unity provides some classes and functions.
Note that the first three steps apply ONLY if you wish to have a native plugin!
From here on out, I'll refer to the JAR / AAR file as the native plugin, and the C# script as the C# wrapper
It's immediately obvious that the first way of creating plugins is long drawn, so choosing your route seems moot. However, method 1 is the ONLY way to call custom code. So, how does one choose?
Simply put, does your plugin
Please do NOT try to "mix" (i.e. a part of the plugin using method 1, and the other using method 2) the two methods! While entirely possible, it's often impractical and painful to manage.