Marcin, thanks for your reply :)

Now I met another problem when trying install the apk when programing.

please let me describe it more clearly:
I made one activity for my application to handle the installing apk
process.
let we call this main class of the acitvity "Parent", another local
class to exacurate the Intent, we call it "Child"

public class Parent extends Activity
{
   //here I just list out this topic related implementation
   Child mChild = new Child(this);
   ...

   //there is a thread here for handling the installing process
   mInstallTh = new Thread
   {
      ...
      mChild.HandleInstallation(apkname);
      otherAction();
      ...
   }

   ...
}

public class Child
{
   private Context mContext;
   private String LOCAL_PATH = "/data/data/Parent";

   public Child(Context cont)
   {
      mContext = cont;
   }

   public void HandleInstallation(String apkName)
   {
         File  file = new File(LOCAL_PATH,name);

        Intent intent = new Intent();
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setAction(Intent.ACTION_VIEW);
        intent.setDataAndType(Uri.fromFile(file), "application/
vnd.android.package-archive");

        mContext.startActivity(intent);
   }
}

Now problem is that, after the installation apk, it seems couldn't
back the thread in the "Parent", it means the program could goback to
"otherAction()" as the code showing.

I'm new for both Android and Java, Maybe I made something wrong here,
any problem please let me know.

Thanks!
Ellen

On 6月29日, 下午8时33分, Marcin Orlowski <[email protected]> wrote:
> On 29 June 2011 14:02, Ellen <[email protected]> wrote:
>
> > I need to install the apks only by one choice at the very begining,
> > then it will install all of them automatically without any prompt
> > during the process. What should I do?
>
> Nothing. You can't silently install any app.
>
> Regards,
> Marcin Orlowski
>
> *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule handy...
> *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance...
> WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and
> *Twitter<http://webnetmobile.com/twitter/>
> *

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to