# could not open camera  in moto g and samsung s6

**URL:** <https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194>\
**Category:** Wowza GoCoder SDK\
**Created:** [April 19, 2019, 3:21pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194 "2019-04-19T15:21:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gudmundur\_Sigurdsson](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Gudmundur\_Sigurdsson](https://community.wowza.com/u/Gudmundur_Sigurdsson)\
**Post date:** [April 19, 2019, 3:21pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194/1 "2019-04-19T15:21:54Z")

</div>

Hi all

i have a problem when I start stream from wowza cloud platform through goCoder SDK then camera doesn’t open in Moto g and Samsung s6 that time but when I switch the camera then both camera work proper (back and front). In other word Initial time doesn’t open any side.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [April 19, 2019, 6:00pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194/2 "2019-04-19T18:00:36Z")

</div>

Can you provide more detail on your workflow? What are your settings for cameraView?

Also, were you able to play the sample app with no issue? If you can, then that will tell us that it’s not the device but something in your config is incorrect. Your sample app is available in your GoCoder SDK download.

Also, please see our GitHub examples for reference.

[https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/blob/master/gocoder-sdk-sample-app/src/main/java/com/wowza/gocoder/sdk/sampleapp/CameraActivity.java](https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/blob/master/gocoder-sdk-sample-app/src/main/java/com/wowza/gocoder/sdk/sampleapp/CameraActivity.java)

---

<div class="post-metadata">

**Author:** ![Gudmundur\_Sigurdsson](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Gudmundur\_Sigurdsson](https://community.wowza.com/u/Gudmundur_Sigurdsson)\
**Post date:** [April 22, 2019, 12:34pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194/3 "2019-04-22T12:34:00Z")

</div>

These are the attributes I am using in my xml file.

and using startPreview() method of WOWZCameraView instance to start the camera in onResume method of Activity and as far as Sampleapp is concerned, I am able to start the camera without any issues.

```auto
<com.wowza.gocoder.sdk.api.devices.WOWZCameraViewandroid:
id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
wowza:defaultCamera="back"
wowza:frameSizePreset="frameSize1280x720"
wowza:scaleMode="fill" />

```

---

<div class="post-metadata">

**Author:** ![Gudmundur\_Sigurdsson](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Gudmundur\_Sigurdsson](https://community.wowza.com/u/Gudmundur_Sigurdsson)\
**Post date:** [April 24, 2019, 12:16pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194/4 "2019-04-24T12:16:28Z")

</div>

Any Help regarding the issue??

It is very important for me to fix this issue as earliest as possible.

---

<div class="post-metadata">

**Author:** ![Jason\_Tuchler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_tuchler/32/462_2.png) [@Jason\_Tuchler](https://community.wowza.com/u/Jason_Tuchler)\
**Post date:** [April 26, 2019, 8:02pm UTC](https://community.wowza.com/t/could-not-open-camera-in-moto-g-and-samsung-s6/53194/5 "2019-04-26T20:02:13Z")

</div>

Hello @Gudmundur Sigurdsson

I have responded in the support ticket you created.

Looking forward to resolving this camera issue you’re seeing.

Regards,

JasonT
