Search code examples
androidandroid-intentcamerahtc-android

Starting HTC camera in photo/video mode


I am building an app that uses the device camera app to take photos or record videos. There is a single button in my app that starts the camera app, and does it using MediaStore.INTENT_ACTION_VIDEO_CAMERA intent. So far, on all non-HTC devices that I've tested, the camera app opens in the default mode in which I can switch between taking photos and recording videos, while on HTC devices I can only record videos. Is there any method of starting the camera app on HTC devices from another app in the same mode as when it is started from the launcher.


Solution

  • So far, on all non-HTC devices that I've tested, the camera app opens in the default mode in which I can switch between taking photos and recording videos

    There are thousands of camera apps, both ones that are pre-installed or installed by users. Many may elect to support INTENT_ACTION_VIDEO_CAMERA. None are required to have a "default mode in which [the user] can switch between taking photos and recording videos". This is not a problem with HTC -- it is a problem with your expectations.

    Is there any method of starting the camera app on HTC devices from another app in the same mode as when it is started from the launcher.

    Even if there is some undocumented, unsupported, unreliable, script-kiddie way to force this on some HTC devices, there are many other camera apps that will not offer such a means.

    If you want that degree of control, write your own camera app.