- android - Opens Android Standard Development Kit (SDK) and Android Virtual Device (AVD) Manager
- emulator - Run emulator for devices
- adb - Android Debug Bridge allows debugging, view logs, and shell commands
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
public class FlashLightActivity extends Activity {
//Tag testing: private static final String TAG = "Flashlight";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View view = new View(this);
view.setBackgroundColor(Color.WHITE);
// Get rid of title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//New - Added to increase phone's brightness levels to max brightness
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 1;
getWindow().setAttributes(lp);
setContentView(view);
}
}
No comments:
Post a Comment