reza3d
reza3d

Reputation: 11

Hide an android app after installing it and launch it from another app

I want to write the two applications which satisfy:

  1. The application should be hidden Automatically from launcher after installation.

  2. the second application should have a button, when clicked it should launch & run first program. Indeed it's a launcher for first program that Sets setting then launch.

  3. how install this two program with one apk.

Upvotes: 1

Views: 1193

Answers (2)

Svetlana
Svetlana

Reputation: 26

In order to install one apk from another you should add one of your apk as asset to another apk. Then in the apk which contains apk in its assets folder you can use intent to install the apk in the assets

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(
    new File(Environment.getExternalStorageDirectory() +  "/Download/yourApkFromAssets.apk")
), "application/vnd.android.package-archive");

Do not forget first to copy your file from assets to Download folder.

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1006539

how install this two program with one apk

That is not possible. There is one app per APK in Android, at least at the present time.

Upvotes: 0

Related Questions