Actually, you can't use that device as a remote.
Why you may ask? Well you need a device with an IR Blaster. That particular phone doesn't have one, making it not able to work as a remote.
The specs (specifications) for this device can be found here...
https://www.gsmarena.com/samsung_galaxy_j7-7185.php or you can look it up on the Samsung site as well.
Now if you have another phone that actually has an IR Blaster, you can use that, or you will need just a regular remote.
And if you wish to know what an IR Blaster is, you can visit here...
https://en.wikipedia.org/wiki/Infrared_blaster