Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * eID Identity Provider Project.
 * Copyright (C) 2010 FedICT.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version
 * 3.0 as published by the Free Software Foundation.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, see
 * http://www.gnu.org/licenses/.
 */

public class Main {
    private static final String WINDOWS_PHONE_7 = "windows phone os 7";
    private static final String WINDOWS_MOBILE = "windows ce";
    private static final String WINDOWS_IE_MOBILE = "iemobile";

    private static boolean isWindowsMobile(String userAgent) {
        return userAgent.indexOf(WINDOWS_PHONE_7) != -1 || userAgent.indexOf(WINDOWS_MOBILE) != -1
                || userAgent.indexOf(WINDOWS_IE_MOBILE) != -1;
    }
}