Java tutorial
//package com.java2s; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; public class Main { private static final String ALIPAY_PACKAGE_NAME = "com.eg.android.AlipayGphone"; public static boolean hasInstalledAlipayClient(Context context) { PackageManager pm = context.getPackageManager(); try { PackageInfo info = pm.getPackageInfo(ALIPAY_PACKAGE_NAME, 0); return info != null; } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); return false; } } }