OTTAA-Project / OTTAAProject

Join us to create the first Augmentative communication platform for speech-impaired children!
https://ottaa-project.github.io/
GNU General Public License v3.0
5 stars 1 forks source link

Error when creating a new picto #103

Closed hectoritr closed 2 years ago

hectoritr commented 2 years ago

To Reproduce Steps to reproduce the behavior:

  1. Go to Create Picto
  2. Click on Camara

Screenshots

  1. 1

  2. 2

  3. 3

  4. 4

Smartphone (please complete the following information):

Additional context

gonojuarez commented 2 years ago

I found this error happen in android 9 and after because is a file provider conflict. to solve that when I change the authorities at the manifest

`        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.stonefacesoft.ottaaproject.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities"
            >
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>
`

by that

`        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities"
            >
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>
`
gonojuarez commented 2 years ago

after that, I edit the file "file_paths". at this file, I changed the following lines

 <external-path name="my_images" path="Android/data/com.stonefacesoft.ottaa/files/Pictures" />
  <external-path name="my_images_debug" path="Android/data/com.stonefacesoft.ottaa.debug/files/Pictures" />

by this

 <files-path
    name="my_images"
    path="images/" /> 

<files-path
    name="my_docs"
    path="docs/" />

<external-files-path
    name="external_files_dir"
    path="/" />

<cache-path
    name="cache_dir"
    path="/" />

<external-cache-path
    name="external_cache_dir"
    path="/" />

<external-media-path
    name="external_media_dir"
    path="/" />

<external-media-path
    name="external_media_dir"
    path="/" />