I tried to use this library, but it does not work the same …
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 (640 Bytes)
@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
did you use the treviz package? That is MyFuseCamera?
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
?
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 withrequire
?
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
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>
For automate the process I create a file AndroidCamera.uxl in the project folder with:
<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