Android Open Source - Torch Snapshot






From Project

Back to project page Torch.

License

The source code is released under:

GNU General Public License

If you think the Android project Torch listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.aktarer.torch.features;
/*from w  w w  . j  a va  2 s  . com*/
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.aktarer.torch.ServerThread;

public class Snapshot extends Base {
  protected boolean frontCamera = false;
  
  public Snapshot(Context c, ServerThread t, boolean fc) {
    super(c, t);
    
    Log.i("Snapshot", "Front camera: " + fc);
    
    frontCamera = fc;
    
    run();
  }

  @Override
  public void run() {
    thread.setImageOutput();
    
    try {
      Intent takePictureIntent = new Intent(context, SnapshotTaker.class);
      takePictureIntent.putExtra("threadID", thread.getId());
      takePictureIntent.putExtra("frontCamera", frontCamera);
      takePictureIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      context.startActivity(takePictureIntent);
    } catch (Exception e) {
      
    }
  }
}




Java Source Code List

com.aktarer.torch.BackgroundServiceStarter.java
com.aktarer.torch.BackgroundService.java
com.aktarer.torch.Main.java
com.aktarer.torch.ServerThread.java
com.aktarer.torch.Server.java
com.aktarer.torch.features.Base.java
com.aktarer.torch.features.Battery.java
com.aktarer.torch.features.Camcorder.java
com.aktarer.torch.features.Info.java
com.aktarer.torch.features.Listen.java
com.aktarer.torch.features.SnapshotTaker.java
com.aktarer.torch.features.Snapshot.java
com.aktarer.torch.util.SystemUiHiderBase.java
com.aktarer.torch.util.SystemUiHiderHoneycomb.java
com.aktarer.torch.util.SystemUiHider.java