@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final Intent intent = getIntent();
        final Uri data = intent.getData();

        final Intent newIntent = getIntentForURI(data);
        if (newIntent != null) {
            startActivity(newIntent);
            finish();
            return;
        }

        if (!intent.hasCategory(CATEGORY_BROWSABLE)) {
            startActivity(new Intent(ACTION_VIEW, data).addCategory(CATEGORY_BROWSABLE));
            finish();
        } else {
            showParseError(data.toString());
        }
    }
Convert global view intent one into one that can be possibly opened
inside the current application.

@param intent
@return converted intent or null if non-application specific
app/src/main/java/com/github/pockethub/android/ui/user/UriLauncherActivity.java