@Override
 public CharSequence getPageTitle(int position) {
   switch (position) {
     case MOOD_LOCATION:
       return mFrag.getString(R.string.moods).toUpperCase();
     case MANUAL_LOCATION:
       return mFrag.getString(R.string.cap_manual);
   }
   return "";
 }
  public void pickImageFromCamera(Fragment fragment) {
    File file;
    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

    try {
      file = createImageFile(fragment.getString(R.string.app_name));
      mImageFromCameraPath = file.getAbsolutePath();
      intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
    } catch (IOException e) {
      e.printStackTrace();
      mImageFromCameraPath = null;
    }

    fragment.startActivityForResult(intent, ACTION_PICK_IMAGE_FROM_CAMERA);
  }