Code example for Context

Methods: getPackageManager

0
        mContext = context;
    } 
 
    public String GetApplicationName(ApplicationInfo info)
    { 
        return (String) info.loadLabel(mContext.getPackageManager());
    } 
 
    public boolean InstallAppFromMarket(String AppID)
    { 
        boolean result = true;
        try 
        { 
            Intent intent = new Intent(
                Intent.ACTION_VIEW,
                Uri.parse("market://details?id=" + AppID)
                ); 
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            mContext.startActivity(intent);
        } 
        catch(Exception e)