You can restrict access to it using a .htpassword file.
In your .htaccess file at the root of your project:
<FilesMatch "js/example.js$">
AuthName "Application Only"
AuthType Basic
AuthUserFile /home/myProject/web/.myhtpasswd
require valid-user
</FilesMatch>
In your .myhtpasswd file at the root of your project (or wherever you want):
test:$apr1$0ciO9Yg.$AUTSp18D2EWiZYN3u08HX/
You can use online tools to create this file.
In your Android application you will be able to access this file by specifying the Authorization on your HttpURLConnection object. See my other answer for more informations.