Reputation: 11
I want to write the two applications which satisfy:
The application should be hidden Automatically from launcher after installation.
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.
how install this two program with one apk.
Upvotes: 1
Views: 1193
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
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