Question: I want to do something like this:

click a Link (a URL of apk)

1. If the apk didn't install before, so the apk will be downloaded.
2. If the apk have installed the apk before, the apk will be open.

So is it possible to open the apk by URL link?

Answer: 
You can use [PackageManager](http://developer.android.com/reference/android/content/pm/PackageManager.html) class to search for a package, the one that you want to start downloading, if the package is present you can call to its launch intent.

Some examples here.

[How to get a list of installed android applications and pick one to run](https://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run)
Look at [this example](https://testflightapp.com/androidsplash/) and TestFlight's webpage. There's a link `Already Installed? Launch the App` -- a simple `<a>` tag with `href` set to `testflightapp://com.testflightapp.androidapp?scheme=http&amp;host=testflightapp.com&amp;path=m/builds`.

It works partially, like you want -- it runs installed application. However, I don't know if this kind of href / protocol supported only by installed Test Flight application (seems so) or general in Android system.

So, it seems, that your own application -- the one, that you want to install or run via link, must itself register and handle private protocol, as in this example.