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.Context;

public class Main {
    /**
     * Get the name from the location identifier
     * @param location
     * @return
     */
    public static String getLocationName(Context context, String location) {
        return context.getResources()
                .getString(context.getResources().getIdentifier(location, "string", context.getPackageName()));
    }
}