- Home /
[ANDROID] Searching a file and get the path to my GUI.TextField?
Friends, good afternoon! I need your help. I am creating a way to get the path of a file when you click a button. I know Java to use the default option for the device, BUT AS I DO IN The Unity 3D?
How do I do a search for a file, and when the SELECT, grab the string of his way and in a TextField?
Come together to advance!
First I find this tutorial, but wait I'm searching for a better one.
@JoshGames, I know you can do an online radio playing on a android device through Java code, but you can do this online radio integration for Unity 3D via Java plugin?
Yes I think so.
Example:
Here is my Java Code:
public class Alerts extends UnityPlayerActivity
{
ArrayList<Integer> mSelectedItems;
int selected = 0;
boolean singleChoice = false;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
public void ShowToast(final String message)
{
this.runOnUiThread(new Runnable()
{
@Override
public void run()
{
int duration = Toast.LENGTH_SHORT;
Toast.makeText(Alerts.this, message,duration).show();
}
});
}
}
And here my C# Code:
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
activity.Call("ShowToast", $$anonymous$$essage);
Answer by $$anonymous$$ · May 04, 2014 at 07:22 PM
You have expierence with Java?
Why you dont build a Java Android plugin in Eclipse?