tags:

views:

36

answers:

1

hi,

Suppose i have an application "MyApp" which has a button and when clicked it should start another application say"App2" but this "App2" should not be installed on the phone it should dynamically be executed.how do i do this in android.it will be helpful if u can explain with some sample code .

thank u

A: 

Hi,

As I know, if you want an app to run on the phone. You should have it installed or install after the your presses the button. It cannot be just run from the RAM and close it..

Other way round is, You have two activities 1. main and 2. supporting.

Onclick of button on main, you invoke the supporting activity. But this supporting activity should be a part of the main app. Hence it will not be installed as a separate application.

Regards, Vinay

Vinay
thanks a lot vinay but then my requirement is that given an apk file i must be able to run it on the device dynamically on click
akshaya
If you have the apk file and trying to load (I have not done till now programmatically) it should load using the package installer. Once the user press the ok button, it should be installed.
Vinay