vxh.viet
5/13/2016 - 2:04 AM

Distinguish Shutta Video

Distinguish Shutta Video

Source: StackOverflow

Question: How to distinguish a Shutta video?

Answer:

  public static boolean isShuttaVideo(String path) {
        String filename = path.substring(path.lastIndexOf("/") + 1);
        if (filename.substring(0, 5).equals("Shutta")) {
            return true;
        } else {
            return false;
        }
    }

If it's not a path but a Uri the use:

String filename = uri.getLastPathSegment();