This is on top of what @ZeroStatic@ZeroStatic already said.
These mutable static variables are deeply troubling:
private static boolean FlashlightState; private static long BackPressed; private static ImageView Lamp;
Why are these static? Do you intend to run multiple instances of this activity at the same time? What for? I suggest to make all of these non-static.
What is this about:
AudioManager VibratorState = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); // ... VibratorState = null;
First of all, you call an audio service VibratorState, which is completely misleading, and then why do you set it to null? Is there a documentation somewhere that recommends this practice? If not, it's reasonable to assume that the variable will be garbage collected normally.
This is pointless:
finish(); this.onDestroy();
It's enough to call finish(), the framework will call onDestroy.
It's not recommended to include texts like this inside the Java code of Android apps:
AboutBox.setMessage("Name:\nVisionlight\n\nDescription:\nFlashlight application for Android based devices.\n\nVersion:\n1.0.0\n\nPlatform:\nAndroid +2.2.x(Froyo)\n\nPermissions:\nCamera, Flashlight, Vibrate, Wake Lock.\n\nUses-feature:\nCamera [NR], Flashlight [NR].\n\nProducer/Developer:\nYousha Aleayoub(Y.P.Y)\n\nLicense:\nBSD\n\nContact:\[email protected]\n\nLink:\nhttp://yousha.blog.ir/");
This belongs to strings.xml.
Also, in general, don't put such extremely long lines in code. As much as possible, it's to keep lines short enough to fit within a window. You could easily break this into 4 and it would have been easier to read without having to scroll so much to the right.
Use CamelCase for class names. But main has an even bigger problem that it doesn't tell anything about the class. The common convention is to name activities as SomethingActivity, so in your case FlashlightActivity is an obvious choice.
Use all capital letters for static constants only, so instead of:
private Flashlight FLASHLIGHT = null;
Should be:
private Flashlight flashlight = null;