public static void restartApplication(final Context c) {
        try {
            if (c != null) {
                final PackageManager pm = c.getPackageManager();
                if (pm != null) {
                    //create the intent with the default start activity for our application
                    final Intent mStartActivity = pm.getLaunchIntentForPackage(c.getPackageName());
                    if (mStartActivity != null) {
                        mStartActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                        // create a pending intent so the application is restarted after System.exit(0) was called.
                        final PendingIntent mPendingIntent = PendingIntent.getActivity(c, 1633838708, mStartActivity, getFlagImmutable() | PendingIntent.FLAG_CANCEL_CURRENT);
                        final AlarmManager mgr = (AlarmManager) c.getSystemService(Context.ALARM_SERVICE);
                        mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, mPendingIntent);
                        System.exit(0);
                    } else {
                        Log.e("Was not able to restart application, mStartActivity null");
                    }
                } else {
                    Log.e("Was not able to restart application, PM null");
                }
            } else {
                Log.e("Was not able to restart application, Context null");
            }
        } catch (Exception ex) {
            Log.e("Was not able to restart application");
        }
    }
Indicates whether the specified action can be used as an intent. This
method queries the package manager for installed packages that can
respond to an intent with the specified action. If no suitable package is
found, this method returns false.

@param action The Intent action to check for availability.
@param uri    The Intent URI to check for availability.
@return True if an Intent with the specified action can be sent and
responded to, false otherwise.
main/src/main/java/cgeo/geocaching/utils/ProcessUtils.java