Any way to access the phone's flashlight? (Android)

Making a pie for Android and trying to turn on the flashlight. Is it possible?