Unity is not a regular Android application. This is more like a library integrated into an Android app.
Unity docs demonstrate that to call methods on the Android side of Unity, you can use AndroidJavaClass (for references to Java classes and static calls) and AndroidJavaObject (for references to objects).
To interact differently, you can use UnitySendMessage () in Java. The last parameter in UnitySendMessage () is an optional string argument that you can use to pass JSON to Unity.
In Unity, you can use JsonUtility.FromJson for deserialization or some third-party scripts for json parsing, there is a lot on github.
source share