public ImageSaver(Activity activity, Context context, Camera2Fragment owner, Image image) { this.owner = owner; this.context = context; this.activity = activity; imageRecognizer = new ImageRecognizer(context, activity); mImage = image ?? throw new System.ArgumentNullException("image"); }
public StateListener(Camera2Fragment owner) { if (owner == null) { throw new System.ArgumentNullException("owner"); } this.owner = owner; }
public ImageAvailableListener(Activity activity, Context context, Camera2Fragment fragment) { this.activity = activity; this.context = context; if (fragment == null) { throw new System.ArgumentNullException("fragment"); } owner = fragment; }
public CameraCaptureSessionCallback(Camera2Fragment owner) { Owner = owner; }
public CaptureStillPictureSessionCallback(Camera2Fragment owner) { this.owner = owner ?? throw new System.ArgumentNullException("owner"); }
public ImageAvailableListener(Camera2Fragment frag, File file) { this.Fragment = frag; this.File = file; }
public CaptureListener(Camera2Fragment owner) { this.owner = owner ?? throw new System.ArgumentNullException("owner"); }
public SurfaceTextureListener(Camera2Fragment owner) { Owner = owner; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.CameraActivity); string jsonData = Intent.GetStringExtra("JSON") ?? ""; learningTask = JsonConvert.DeserializeObject <AppTask>(jsonData, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto }); activityId = Intent.GetIntExtra("ACTID", -1); if (bundle == null) { if (learningTask.TaskType.IdName == "TAKE_VIDEO") { RequestedOrientation = ScreenOrientation.Landscape; if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { FragmentManager.BeginTransaction().Replace(Resource.Id.container, Camera2VideoFragment.NewInstance()).Commit(); } else { FragmentManager.BeginTransaction().Replace(Resource.Id.container, Camera1VideoFragment.NewInstance()).Commit(); } } else { if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { FragmentManager.BeginTransaction().Replace(Resource.Id.container, Camera2Fragment.NewInstance()).Commit(); } else { FragmentManager.BeginTransaction().Replace(Resource.Id.container, Camera1Fragment.NewInstance()).Commit(); } } } if (!AndroidUtils.IsGooglePlayServicesInstalled(this) || googleApiClient != null) { return; } googleApiClient = new GoogleApiClient.Builder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(LocationServices.API) .Build(); locRequest = new LocationRequest(); }