get Install Location by package - Android App

Android examples for App:Package

Description

get Install Location by package

Demo Code


//package com.java2s;
import android.content.Context;

public class Main {
    public static String getInstallLocation(Context context) {
        return context.getPackageManager().getInstallerPackageName(
                context.getPackageName());
    }/*from   w w w . j ava2 s . c  o  m*/
}

Related Tutorials