Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

Native Gallery for Android & iOS [Open Source]

Discussion in 'Assets and Asset Store' started by yasirkula, Feb 28, 2018.

  1. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    muchas gracias caballero por su tiempo en responder, atendiendo sus sugerencias aplique el logcat, adjunto img.
     

    Attached Files:

  2. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    Thanks! Can you put Debug.Log lines at random places in the code so that we can see which of these logs are logged to Logcat and see if any of the error messages show up in between these logs?
     
  3. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    Buenos dias caballero, pido disculpas por la demora en responder, hice lo que me dijo para poner varios Debu.log(). y me tira lo siguiente. el unico Debu.log() que me arroja mel logcat, esta dentro de un metodo llamado activar este es el metodo que adjunto a mi boton el cual tomara la captura de pantalla, en la imagen adjunto el mensaje en azul. este es el mensaje de Debu.log().
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      61.7 KB
      Views:
      7
    • 2.PNG
      2.PNG
      File size:
      77.3 KB
      Views:
      6
  4. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    Hmm, can you put a Debug.Log at every line of Desactivar and post both the code and the logs?
     
  5. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    Estimado le adjunto el registro como el código para tomar la captura de pantalla
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      63.6 KB
      Views:
      20
    • 3.PNG
      3.PNG
      File size:
      67.7 KB
      Views:
      26
    • 5.PNG
      5.PNG
      File size:
      69.3 KB
      Views:
      27
    • 6.PNG
      6.PNG
      File size:
      74.8 KB
      Views:
      26
    • 7.PNG
      7.PNG
      File size:
      68.2 KB
      Views:
      52
  6. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    Estoy trabajando con unity 2019.4.35f1 y con ARFoundation 2.1.19, pero lo más raro es que con versiones superiores a 2019.4.35 funciona correctamente.
     
  7. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    There are no logs coming from Unity (except the warnings at the beginning but those aren't relevant) so your function isn't running. Make sure Foto script is assigned to an active GameObject in your scene.
     
  8. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    good afternoon I have my photo script in an active GameObject within my scene, I have created another project and I implement this script but this time it shows this alert but if I go to my storage I can't find the screenshot, in my project original does not show me this alert but it does not show me the screenshots in my storage either, I reinstate that in both projects, both in the original and in the test one, I am working on the version of unity 2019.4.35f1. I leave you the alert to which I refer.
     

    Attached Files:

    Last edited: Sep 20, 2022
  9. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    I'm guessing you've granted the permission. Please try your app on a different device, maybe it's a device-specific issue?
     
  10. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    muy buenos dias señores use el mismo codigo pero con la version de unity 2021 y usando el mismo dispositivo y funciona perfectamente 10/10 el problema se da es en esa version 2019.4.35
     
  11. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    I honestly wouldn't expect a Unity bug in a 2019 LTS version, they're very stable as far as I observed. But you've put Debug.Logs to every line in your code and we couldn't see a single one of them in logcat so coroutines aren't working for unknown reasons in your project. Please create a new C# script in your project, paste the example code to it, create a new GameObject in your scene, add the script to it as component and during gameplay, click the left side of the screen to save a screenshot to Gallery. See if it works in 2019.4.35.
     
  12. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    Muy buenas tardes caballero, hice lo que me pidió hacer un nuevo proyecto, te adjunto un video de 1 minuto, donde se aprecia todo lo que hice,
    al exportar al dispositivo me arroja esta mensaje pero no me muestra las imágenes en la galería ni tampoco en el DCIM.
     

    Attached Files:

  13. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    OK that looks good to me. Now please restart the phone to see if the image appears in the gallery after restart. If not, put Debug.Logs at every line just as you did before and this time, please post the logcat logs that show each one of these logs:

     
  14. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    Hola yasirKula, hice las recomendaciones que me dijo y no me aparecen las fotos, y tambien reinicie el dispositivo.
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      77.9 KB
      Views:
      9
    • 2.PNG
      2.PNG
      File size:
      73.7 KB
      Views:
      11
    • 3.PNG
      3.PNG
      File size:
      71.8 KB
      Views:
      12
    • 4.PNG
      4.PNG
      File size:
      53.1 KB
      Views:
      11
    • 5.PNG
      5.PNG
      File size:
      66.4 KB
      Views:
      5
  15. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    5.PNG looks good. What about the rest of the erro5, erro6 logs? And what does your code look like with those erro1, erro2, etc. logs in it?
     
  16. adairvillalba95

    adairvillalba95

    Joined:
    Nov 2, 2021
    Posts:
    1
    todos los Debug.Log(""); que coloco se muestra en los registros del logcat, tal como se nota en le imagen 5.PNG, Y el código es el mismo que se ve en la imagen 7.PNG que te estoy adjuntando. luego que presiono el botón para tomar la foto me salen los errores de la imagen 3.PNG que te adjuntó. es algo muy curioso porque el mismo código funciona perfectamente para la versión de unity 2021, y utilizando el mismo dispositivo.
     

    Attached Files:

    • 7.PNG
      7.PNG
      File size:
      68.2 KB
      Views:
      13
    • 3.PNG
      3.PNG
      File size:
      71.8 KB
      Views:
      3
  17. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    3.PNG seems unrelated to me (there will always be tons of unrelated error logs in logcat because there are numerous background processes running in the background throwing all sorts of errors for unrelated reasons).

    I just want to see the code with logs at every line and the resulting logcat logs so that I can see if some related error message is logged in between "line 31" and "line 33" logs but you don't share those logs with me which is why we aren't making much progress here.
     
  18. adair95

    adair95

    Joined:
    Feb 15, 2022
    Posts:
    10
    buenos días caballero, mejor te adjunto un video con todos los registros del logcat y el script para tomar la foto, los registros se presentan cuando entro a la app y cuando presionó el botón para tomar la foto.
     
    yasirkula likes this.
  19. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,536
    Yes, now this was much better, thanks! I can see that in between erro5 and erro6, nothing is logged which was disappointing. I'd like to believe that TIME_TICK log was a coincidence since it doesn't seem related to me after doing a quick google search. Anything above erro5 is almost guaranteed to be irrelevant because the native save function isn't even invoked at that point. Logs below erro6, well I find them unlikely to be related either because the same logs also appear above erro5.

    I can't determine why this function isn't working on 2019 LTS for you. I was expecting something/anything to show up in logcat in between erro5 and erro6. Right now, I can't think of any extra information that might help debug this issue so I'm afraid I'll give up :/
     
unityunity