To be able to do this, you must activate the developer mode in the android system.
Steps to activate developer mode can be found in google
Steps to activate mock location:
Install the Fake GPS location application.
Go to Developer options
Select mock location app and select application Fake GPS location