# Install an Android app from my Processing Android app

**URL:** <https://discourse.processing.org/t/install-an-android-app-from-my-processing-android-app/637>\
**Category:** Processing for Android\
**Created:** [June 2, 2018, 2:43pm UTC](https://discourse.processing.org/t/install-an-android-app-from-my-processing-android-app/637 "2018-06-02T14:43:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ungarscool1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ungarscool1/32/305_2.png) [@Ungarscool1](https://discourse.processing.org/u/Ungarscool1)\
**Post date:** [June 2, 2018, 2:43pm UTC](https://discourse.processing.org/t/install-an-android-app-from-my-processing-android-app/637/1 "2018-06-02T14:43:52Z")

</div>

Hello,

I want install app via my processing app. I have see “INSTALL\_PACKAGE”, but how i can install app from a processing app?

---

<div class="post-metadata">

**Author:** ![calsign](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/calsign/32/30_2.png) [@calsign](https://discourse.processing.org/u/calsign)\
**Post date:** [June 2, 2018, 5:55pm UTC](https://discourse.processing.org/t/install-an-android-app-from-my-processing-android-app/637/2 "2018-06-02T17:55:23Z")

</div>

You don’t want `INSTALL_PACKAGES`. That’s reserved for system applications like the package manager. Instead, you want [`REQUEST_INSTALL_PACKAGES`](https://developer.android.com/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES) if you’re targetting API level 25 or higher - otherwise you don’t need any permission at all.

You can’t install packages directly for security reasons, but you can request the package manager to install them for you. See [StackOverflow](https://stackoverflow.com/q/4967669/). It should look something like this:

```auto
import android.content.Intent;
import android.net.Uri;
import java.io.File;

File apkFile = new File("path/to/my/apk/");

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getActivity().startActivity(intent);

```

---

<div class="post-metadata">

**Author:** ![Ungarscool1](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ungarscool1/32/305_2.png) [@Ungarscool1](https://discourse.processing.org/u/Ungarscool1)\
**Post date:** [June 4, 2018, 12:12am UTC](https://discourse.processing.org/t/install-an-android-app-from-my-processing-android-app/637/3 "2018-06-04T00:12:51Z")

</div>

Thanks for your reply, it’s work
