# Issue camera crash

**URL:** <https://forums.fusetools.com/t/issue-camera-crash/6391>\
**Category:** Bug Reports\
**Created:** [January 11, 2018, 10:48am UTC](https://forums.fusetools.com/t/issue-camera-crash/6391 "2018-01-11T10:48:22Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Francesco](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/francesco/32/781_2.png) [@Francesco](https://forums.fusetools.com/u/Francesco)\
**Post date:** [October 1, 2018, 6:34pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/21 "2018-10-01T18:34:07Z")

</div>

I tried to use this library, but it does not work the same …

---

<div class="post-metadata">

**Author:** ![Francesco](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/francesco/32/781_2.png) [@Francesco](https://forums.fusetools.com/u/Francesco)\
**Post date:** [October 24, 2018, 9:38am UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/22 "2018-10-24T09:38:22Z")

</div>

Finally I found the solution …

Then follow these steps:

- Download the treviz package uploaded by @Matti_Tihverainen
- Export the project **fuse build --target=Android --configuration=Release**
- Edit the Android Manifest file in the **\build\Android\Release\app\src\main\AndroidManifest.xml** directory and insert this content, where instead of **{NAMESPACE}** enter the package name **_FILE\_1.txt_**
- Create a folder named **xml** in the \*_\build\Android\Release\app\src\main\res\*_ directory, create a file called **file\_paths.xml** and enter this content **_FILE\_2.txt_**
- Return to the **\build\Android\Release** build directory and start the **build.bat** file

[upload.zip](https://canada1.discourse-cdn.com/flex035/uploads/fusetools1/original/1X/a213e5b590e1a6d9170dedcf94731305822895ed.zip) (640 Bytes)

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [October 25, 2018, 7:13pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/23 "2018-10-25T19:13:27Z")

</div>

@Francesco Still crashing for me ☹

I get: `Failed to find configured root that contains Failed to find configured root that contains /storage/emulated/0/Android/data/com.myapp/files/Pictures/JPEG_20181025_161740_448510009661355473.jpg`

---

<div class="post-metadata">

**Author:** ![Francesco](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/francesco/32/781_2.png) [@Francesco](https://forums.fusetools.com/u/Francesco)\
**Post date:** [October 25, 2018, 9:58pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/24 "2018-10-25T21:58:01Z")

</div>

did you use the treviz package? That is MyFuseCamera?

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [October 26, 2018, 1:15pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/25 "2018-10-26T13:15:13Z")

</div>

Yes @Francesco. Maybe I made a mistake when I implement the treviz package…  
How I integrate it? I put the folder in the proyect and call it with `require`?

---

<div class="post-metadata">

**Author:** ![treviz](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@treviz](https://forums.fusetools.com/u/treviz)\
**Post date:** [October 26, 2018, 5:00pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/26 "2018-10-26T17:00:33Z")

</div>

> Then follow these steps:
> 
> - Download the treviz package uploaded by @Matti_Tihverainen
> - Export the project **fuse build --target=Android --configuration=Release**
> - Edit the Android Manifest file in the **\build\Android\Release\app\src\main\AndroidManifest.xml** directory and insert this content, where instead of **{NAMESPACE}** enter the package name _ **FILE\_1.txt** _
> - Create a folder named **xml** in the \* _\build\Android\Release\app\src\main\res_\* directory, create a file called **file\_paths.xml** and enter this content _ **FILE\_2.txt** _
> - Return to the **\build\Android\Release** build directory and start the **build.bat** file

Thats the way to do this 🙂

> Yes @Francesco. Maybe I made a mistake when I implement the treviz package…  
> How I integrate it? I put the folder in the proyect and call it with `require` ?

Between the first and second step you have to do:

> - “MyFuseCamera/Camera.uno:Source” in .unoproj under Includes
> - And then in the file, where you need the camera you have to use: “var camera = require(‘FuseJS/MyFuseCamera’);” (DONT USE var camera = require(‘FuseJS/Camera’); anymore)  
> \*Important: AFTER Exporting the project you have to edit the xml and the manifest file and start then the build.bat. NOT before!!

Sorry that I did not answer! There were a few arguments…  
The work for this Solution was made by Ahmed\_Diab. So many thanks to him! And maybe you want to support him 😉

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [October 30, 2018, 8:29pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/27 "2018-10-30T20:29:47Z")

</div>

Thanks! But to me still crashing! But I solve the problem adding this on the file\_path.xml

```
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-cache-path name="myexternalimages" path="/Shared" />
    <external-files-path name="myexternalimages2" path="/Pictures" />
    <external-path
        name="external_files"
        path="." />
    <root-path
        name="external_files"
        path="/storage/" />
</paths>
```

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [January 24, 2019, 6:02pm UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/28 "2019-01-24T18:02:25Z")

</div>

For automate the process I create a file AndroidCamera.uxl in the project folder with:

```auto
<Extensions Backend="CPlusPlus" Condition="Android">
    <CopyFile Name="file_paths.xml" TargetName="app/src/main/res/xml/file_paths.xml" />
    <CopyFile Name="AndroidManifest.xml" TargetName="app/src/main/AndroidManifest.xml" />
</Extensions>

```

And I create AndroidManifest.xml file in the project folder.  
This way I don’t need to change the AndroidManifest file every time…

I hope this help

---

<div class="post-metadata">

**Author:** ![aeq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/aeq/32/129_2.png) [@aeq](https://forums.fusetools.com/u/aeq)\
**Post date:** [February 1, 2019, 8:27am UTC](https://forums.fusetools.com/t/issue-camera-crash/6391/29 "2019-02-01T08:27:51Z")

</div>

> **[Hello World! – Andrew Quan – Medium](https://medium.com/@andrewq/hello-world-eaa996c594b7)**
>
> Just finished a few updates to some Fuse Open modules and thought I’d briefly discuss the changes and usage.

  

> <https://github.com/fuse-open/fuselibs/pull/1254>

[Previous page](https://forums.fusetools.com/t/issue-camera-crash/6391.md?page=1)
