Example #1
0
        public static bool IsIntentAvailable(Context context, Intent intent)
        {
            var packageManager = context.PacakageManager;

            var list = packageManager.QueryIntentServices(intent, 0)
                       .Union(packageManager.QueryIntentActivities(intent, 0));

            if (list.Any())
            {
                return(true);
            }

            var manager = TelephonyManager.FormContext(context);

            return(manager.PhoneType != PhoneType.None);
        }