One way is to have a method in your Unity program that communicates with your Android application through a method in your Android app, by using AndroidJavaObject.Call in your Unity class.
e.g.
You have this method in your Android application.
AndroidActivity.java
String stringFromUnity = "";
public void setStringFromUnity(String input){
stringFromUnity = input;
}
Then in your Unity script (I am using C#).
UnityScript.cs
// Get the UnityPlayer class
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
// Get the current activity
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
// Call the setStringFromUnity method from Android Activity
activity.Call("setStringFromUnity", "Here is a string for you, Android");
OR we can set the String directly using the AndroidJavaObject.Set method.
// Set the String directly provided the String is public
activity.Set<string>("stringFromUnity", "I set your String directly, hah!");
Hope this helps.
For reference, you can search for "Unity Plugins for Android" or take a look at Unity documentation at this link.