【问题标题】:Collect compass direction and camera tilt at time of photo capture在拍摄照片时收集指南针方向和相机倾斜度
【发布时间】:2012-01-22 15:37:50
【问题描述】:

我正在尝试在拍照时收集指南针方向和手机倾斜度。当然,我不确定一个简单的方法来做到这一点。我当前的相机实现使用:

    Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

        File file = new File(Environment.getExternalStorageDirectory(), "test.jpg");
        cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
        outputFileUri = Uri.fromFile(file);


        startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);  

请记住,必须在拍摄照片时收集倾斜和方向。调用相机意图时,我似乎无法在 exif 数据或内置功能中找到任何内容。

谢谢!

【问题讨论】:

    标签: android camera compass-geolocation tilt-sensor


    【解决方案1】:

    我能想到的唯一方法是使用takePicture 并在ShutterCallback 中捕获指南针、倾斜度和您想要的任何其他信息。这样一来,您将在用户按下快门按钮时立即询问该信息,而不是在快门和触发 PictureCallback 之间经过的任意时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多