Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;

import android.os.Process;

public class Main {
    public static boolean checkPermission(Context context) {
        return context.checkPermission(Manifest.permission.CAMERA, Process.myPid(),
                Process.myUid()) == PackageManager.PERMISSION_GRANTED;
    }
}