Android Action Button

I can’t tell when the user hits the main button on their phone the button that i guess i would call the trackball down

I tried this code but it won’t work. And i am testing on my droid each build and its annoying because ive tried so many ways to get the input of the user hittign the main button down

I put the code in the Update() loop, the mousedown works on PC but not for android, and Input.inputString is always empty too :frowning:

if (Input.anyKeyDown)
{
	var randomness = Random.Range(0,3);
	if (randomness % 2)
	debug_out = "u did it";
	else
	debug_out = "u did it again!";
}

alt text

if ( Input.GetKeyDown(KeyCode.JoystickButton0) )
{
//do task
}

I answered my own question, and this is for future reference for people who get stuck like me.

your welcome.

Even this happened with me…