Custom android app installation
<p>During a beta stage I need to be able to send out updates without going through the android store.  I have found a couple of posts regarding this, but none of them seem to work for me.  The file itself downloads fine, but for both alternatives I get an error of:</p>

<p>08-09 16:31:20.411: ERROR/AndroidRuntime(906): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://localhost:4567 typ=application/vnd.android.package-archive }</p>

<p>Any ideas?</p>

<p><em>Android</em></p>

<pre><code>// first way
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://localhost:4567"));

// second way
// Intent intent = new Intent(Intent.ACTION_VIEW);
// intent.setDataAndType(Uri.parse("http://localhost:4567"), 
//                      "application/vnd.android.package-archive");
startActivity(intent); 
</code></pre>

<p><em>Sinatra</em></p>

<pre><code>require 'sinatra'

get "/" do
  content_type "application/vnd.android.package-archive"
  attachment('agatha_v4.0.apk')
  file = File.open("agatha.apk", "rb")
  response.write(file.read)
end
</code></pre>
