First, make sure that the controller is a PS4 controller.

I don't have a controller with me so you can play around with the string until it is detected

if (controller.getName.toLowerCase().contains("ps4")) { ... }

Also, in your game class, you need to implement the interface ControllerListener.

public class Game implements ControllerListener { ... }

For example, this is the implementation for buttonDown:

@Override public boolean buttonDown(Controller controller, int buttonCode) { if (buttonCode == PS4.BUTTON_CROSS) { ... } return false; }

Additionally you should check if the controller being pressing is the same one.