I'm trying to create an automatic update for my application, without the use of Android Market, for an application that will be distributed only to my clients.
I have the code below but it is not working. It gives me the error Android.content.ActivityNotFoundException : In Actitivy found to handle intent { ...
.
Has anyone managed to do this in Delphi auto update XE5?
TFrmMain.BtnInstalarClick procedure (Sender : TObject ) ;
var
Intent : JIntent ;
Uri : TJnet_Uri ;
begin
Intent : = TJIntent.Create ;
Intent.setAction ( TJIntent.JavaClass.ACTION_VIEW );
Intent.setDataAndType(TJnet_Uri.JavaClass.parse(StringToJString('/storage/sdcard0/Android/data/com.CloudCon.AtualizacaoAutomatica/files/Rota.apk')),StringToJString('application/vnd.android.package-archive'));
SharedActivity.startActivity ( Intent ) ;
end ;
The path is correct. The permissions of INTERNET
, WRITE_EXTERNAL_STORAGE
, and INSTALL_PACKAGES
were also set.
Apparently I can do the following in Java:
" String command = " chmod 666 " + PATH ;
Runtime.getRuntime ( ) . Exec (command ) ; "
How can I do this in Delphi.