Java tutorial
//package com.java2s; //License from project: Open Source License import android.net.Uri; public class Main { public static final String PLAY = "play"; private static final int URI_INDEX_OPTION = 0; private static boolean isGameUri(Uri uri) { if (uri.getPathSegments().isEmpty()) { return false; } String option = uri.getPathSegments().get(URI_INDEX_OPTION); return PLAY.equals(option); } }