INSTALL DOWNLOADED APK FROM A CORONA APP

Hi,

Team i am trying to install a App APk from corona App.

 

The following is the Process i have listed:

 

1-Download the APK file from server

2-save it in directory

3-Install it

 

Now the question is i am unable to install it.

i have tried it from System.openUrl()

but got no any other way.

 

Kindly please specify any Option for it.

 

-Thanks in Advance

You might be able to do this via “pm” using the os.execute function

Idea code (untested, not sure if it will work)

local path = system.pathForFile("test.apk", system.DocumentsDirectory) -- put the path to the downloaded APK here -- Install the apk (should bring up the app install prompt) os.execute("pm install " .. path)

You might be able to do this via “pm” using the os.execute function

Idea code (untested, not sure if it will work)

local path = system.pathForFile("test.apk", system.DocumentsDirectory) -- put the path to the downloaded APK here -- Install the apk (should bring up the app install prompt) os.execute("pm install " .. path)