Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - evanjones246

#1
Developers / Re: [DEV] - is Locus instaled?
March 12, 2012, 20:34:56
+1... I just tried this and it worked perfectly. thanks for sharing this very helpful information. :)
Quote from: "menion"Simple method is to check, if Locus allowed to handle points and is in system ...

use this
public static boolean isLocusAvailable(Activity activity) {
    try {
        // set intent
        final PackageManager packageManager = activity.getPackageManager();
        final Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("menion.points:x"));

        // return true or false
        return packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).size() > 0;
    } catch (Exception e) {
        return false;
    }
}
Las Vegas Show Guide Vegas Shows