Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.os.Build;

public class Main {
    public static String getFriendlyDeviceName() {
        if (isRunningOnGenymotion()) {
            // Genymotion already has a friendly name by default
            return Build.MODEL;
        } else {
            return Build.MODEL + " - " + Build.VERSION.RELEASE + " - API " + Build.VERSION.SDK_INT;
        }
    }

    private static boolean isRunningOnGenymotion() {
        return Build.FINGERPRINT.contains("vbox");
    }
}