Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.content.Intent;
import android.media.AudioManager;
import android.os.Build;

public class Main {
    public static String getWiredHeadsetUpdateAction() {
        if (Build.VERSION.SDK_INT >= 21) {
            return AudioManager.ACTION_HEADSET_PLUG;
        } else {
            return Intent.ACTION_HEADSET_PLUG;
        }
    }
}