title: starting an apk in a android delphi seattle application error
body: <p>For several reasons I don't want to use the Google Play mechanism to upgrade an android application.  So I decided to make my own system to download and upgrade an android application.</p>
  
  <p>Step 1: download the update <code>.apk</code> file.</p>
  
  <p>Step 2: put a button in the original application so a user can click on it to start the <code>.apk</code> for upgrade.  </p>
  
  <p>The following code is giving me an error.</p>
  
  <pre><code>  procedure TfrmUpdateProgram.DoUpgrade;  
    {$IF DEFINED(IOS) or DEFINED(ANDROID)}
      var Intent : JIntent;
    {$ELSE}
    {$ENDIF}
    begin
      {$IF DEFINED(IOS) or DEFINED(ANDROID)}
        Intent := TJIntent.Create;
        Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
        Intent.addFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK);
        Intent.setDataAndType(StrToJURI(newAPKFile), StringToJString('application/vnd.android.package-archive'));
  
        SharedActivityContext.startActivity(Intent);
        Application.Terminate;
  
      {$ELSE}
        ShellExecute(0, PWideChar('Open'), PWideChar(newAPKFile), nil, nil, SW_HIDE);
      {$ENDIF}
    end;
  </code></pre>
  
  <blockquote>
    <p>android.content.activitynotfoundexception: No activity found to handle intent {act=android.intent.action.view dat=/storage.....update.apk typ=application/vnd.android.package-archive flg=0x1000000}</p>
  </blockquote>
  
  <p>Any thoughts?</p>