My apps "autoupdate" not working Rio 10.3.1 (Tokyo 10.2.3 working)

procedure Update_apk;
var
  Path: JString;
  Name: JString;
  F: Jfile;
  Intent: JIntent;
  FileName: string;
begin
  FileName := System.IOUtils.TPath.Combine( *** this will be the dowload path and the APK name of the program *** );
  Path := StringToJString(System.IOUtils.TPath.GetDirectoryName(FileName));
  Name := StringToJString(System.IOUtils.TPath.GetFileName(FileName));
  F := TJfile.JavaClass.init(Path, Name);
//
  Intent := TJIntent.Create();
  Intent.setAction(TJIntent.JavaClass.ACTION_VIEW);
  Intent.addFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK);
  Intent.setDataAndType(TJnet_Uri.JavaClass.fromFile(F), StringToJString('application/vnd.android.package-archive'));
//
  TAndroidHelper.Context.startActivity(Intent);
//
  Application.Terminate();
//
end;

I download the MY_APPS.APK-file from the server my phone download folder.

The download is correct, the file is in the download folder.

Then i run Update_apk-procedure -> the app just closes.

Workin fine Tokyo 10.2.3, not Rio 10.3.1

Why?!?!?!

Parents Reply Children