Java tutorial
//package com.java2s; /******************************************************************************* * Copyright (c) 2012 Manning * See the file license.txt for copying permission. ******************************************************************************/ import android.content.Context; import android.content.pm.PackageManager; public class Main { public static boolean isLayarAvailable(Context ctx) { PackageManager pm = ctx.getPackageManager(); try { pm.getApplicationInfo("com.layar", 0); return true; } catch (PackageManager.NameNotFoundException e) { return false; } } }