Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:39:35+00:00 2026-06-09T21:39:35+00:00

My application is based on multiple applications (each one has different apk signatures). I

  • 0

My application is based on multiple applications (each one has different apk signatures). I want to install one apk and after one confirmation the device should install all applications in the “bundle”.

I managed to install the bundle of applications but after every installation I have a confirmation before installing(see below).

I need this to be a seamless process where the user will only have to confirm the installation process only once.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    installAPK(R.raw.apk0, 0);
}

private void installAPK(int apk, int apk_code) {
    try {


        InputStream in = this.getResources().openRawResource(apk);

        byte[] b = new byte[in.available()];

        int read = in.read(b);

        // String tempFileName = "currentapk.apk";

        FileOutputStream fout = openFileOutput(tempFileName,
                MODE_WORLD_READABLE);

        fout.write(b);
        fout.close();
        in.close();

        File tempFile = getFileStreamPath(tempFileName);

        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setDataAndType(Uri.fromFile(tempFile),
                "application/vnd.android.package-archive");
        startActivityForResult(Intent.createChooser(intent, "install"),
                apk_code);
    }

    catch (Exception ex) {
        ex.printStackTrace();
    }
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    File tempFile = getFileStreamPath(tempFileName);

    if (tempFile.delete()) {
        Log.d("******PACKAGING******", "FILE DELETED!");
    }

    switch (requestCode) {
    case 0: {

        installAPK(R.raw.apk1, 1);
        break;
    }

    case 1: {
        installAPK(R.raw.apk2, 2);
        break;
    }
          case 2: {
        installAPK(R.raw.apk3, 3);
        break;
    }

Any idea how I can get this to install with prompting the user only once?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:39:36+00:00Added an answer on June 9, 2026 at 9:39 pm

    I need this to be a seamless process where the user will only have to confirm the installation process only once.

    Fortunately, this is not possible — as zapi notes, for security reasons. Users have the right to know what is being installed and to have the ability to say “no, I do not want that”.

    Of course, you are welcome to create your own ROM mod that has all these apps built in, then convince people to install that ROM. This eliminates the per-app user choice. A business that wishes to distribute devices with apps pre-installed would go this route, not only to avoid the prompting, but to prevent people from uninstalling those apps once they get their modded device.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application with multiple users with different roles. Each users access to
I have one legacy web application based on struts2 (primarily using annotation). While debugging
I have a Struts based web application that has a structure similar to the
I want to have one model & view that is served by multiple controllers
I want to build an Azure application that has two worker roles and NO
Our application has many configuration directives. Things like are multiple languages enabled? or which
I have a Core Data based application which is built around one main entity.
I have my application code base with multiple activities in it. I have a
We are developing an application based in an Embedded Infinispan Data-grid cluster. In the
I have an application based on google map, in which I need to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.