Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.panelic.flashlight;
- import android.app.Activity;
- import android.app.AlertDialog;
- import android.content.DialogInterface;
- import android.content.pm.PackageManager;
- import android.os.Bundle;
- import android.util.Log;
- import android.view.View;
- import android.widget.ImageButton;
- import android.hardware.Camera;
- import android.hardware.Camera.Parameters;
- import android.media.MediaPlayer;
- import android.media.MediaPlayer.OnCompletionListener;
- public class MainActivity extends Activity {
- ImageButton btnSwitch;
- private Camera camera;
- private boolean isFlashOn;
- private boolean hasFlash;
- Parameters params;
- MediaPlayer mp;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- // flash switch button
- btnSwitch = (ImageButton) findViewById(R.id.btnSwitch);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement