Please note: Not all games are compatible with third-party controllers, so your game 'may' or 'may not' work. You would need to check with the came creators to see if it says it does or not.
1. To be able to connect your Android device to see your controller as a possible Bluetooth connection, you will need to use the buttons on the PS4 wireless controller to get into "Pairing Mode". Press, simultaneously, the "Share" and "PS" buttons until the light bar begins to flash white.
2. Next, on your Android device, turn on the Bluetooth and then select "Wireless Controller" option listed. When it states that your device and the controller are connected, you will see that you can use the controller to navigate through your phone/tablet (through some things you can't do).
3. Now, as I said before, not all games will work with your controller. However, many do, so go the games "Settings" and look for "Controller Options". They are in in different places in different games, but basically what you are looking for is a way to disable the Android controls or to get it to let you select a third-party controller.
4. When you are done playing the games on your Android phone/tablet, and want to pay your PS4 again, just connect the controller to the console via the "Mini-USB cord" and press the "PS" button.