How to install android app pragmatically from download URL instead of local file path

Currently we are installing the app from local file path, is it possible to use download URL instead of file path?

We have application in drop box/Google drive and need to install that app to android device using appium (java script).

Please some one help on the script for the same.