Honestly.... you haven't told us what you are trying to do specifically or what is going wrong specifically. Nobody can help you if they don't know what the error is.
Also android does NOT have a universal joystick driver, at least not in the way that windows does.... it doesn't work that way. Joystick support, like back in the dos days, is on a game by game basis. I can't help you with specifics, but there are resident apps for android that sit around translating joystick input to keyboard input, which most games do support. You might want to look into that.
On the pc end of things, unless the joystick is broken, if the buttons work then the joystick works. You need to configure it for mame... I don't know how the ps3 drivers work, but for 360 sticks, if you set the joystick mode to digital it often shows up as a hat switch, which mame isn't pre-configured for. Ironically for easier configuration it's best to leave the stick in analog mode.