Hi Erel and community,I am building a classic, standard Activity-based contact app (FullScreen = True, TargetSDK 36) on a real device running modern Android.The app generates dynamic contact panels inside a ScrollView. When clicking a custom "PHOTO" button, an asynchronous dialog asks the user to choose between the Gallery or the Camera. The Gallery works perfectly, but the Camera fails to return the image.The behavior:When choosing the Camera, the native camera app opens successfully. I can snap the photo, and the camera interface shows the standard "Retry / OK" confirmation checkmarks. However, when I press "OK", the camera closes, I return to my app, but the image file on disk is completely empty (0 bytes) and the ImageView remains gray/blank.I have already requested and granted Runtime Camera Permissions. My Manifest Editor contains the following standard setup for AndroidX:
Inside my code, I tried creating an empty file beforehand and passing its secure URI via iCamera.PutExtra("output", UriSicuro). I tried initializing this temp file both in rp.GetSafeDirDefaultExternal("") and File.DirInternal, launching the intent via startActivityForResult through a JavaObject context, and catching the response inside Sub Activity_Result.The camera launches without crashing, but the file size remains 0 when returning to the activity, so LoadBitmapSample cannot render anything.What is the official, correct way on TargetSDK 36 to force the external camera app to write the full-resolution image into our secure app directories without it being blocked by Android's strict background file-sharing policies? Should I strictly migrate to CameraClass v2 or B4XPages, or is there a specific way to handle the output URI for the camera intent in standard Activities?Thank you very much for your time and guidance!
Ciao Erel e community, sto sviluppando una classica app di contatti basata su Activity (FullScreen = True, TargetSDK 36) su un dispositivo reale con Android moderno. L'app genera pannelli di contatti dinamici all'interno di una ScrollView. Quando si fa clic su un pulsante "FOTO" personalizzato, una finestra di dialogo asincrona chiede all'utente di scegliere tra Galleria o Fotocamera. La Galleria funziona perfettamente, ma la Fotocamera non riesce a restituire l'immagine. Il comportamento è il seguente: quando scelgo la Fotocamera, l'app nativa si apre correttamente. Posso scattare la foto e l'interfaccia della fotocamera mostra i segni di spunta di conferma standard "Riprova / OK". Tuttavia, quando premo "OK", la fotocamera si chiude, torno alla mia app, ma il file immagine su disco è completamente vuoto (0 byte) e l'ImageView rimane grigia/vuota. Ho già richiesto e concesso le autorizzazioni per la fotocamera in fase di esecuzione. Il mio Manifest Editor contiene la seguente configurazione standard per AndroidX:
Nel mio codice, ho provato a creare un file vuoto in anticipo e a passare il suo URI sicuro tramite iCamera.PutExtra("output", UriSicuro). Ho provato a inizializzare questo file temporaneo sia in rp.GetSafeDirDefaultExternal("") che in File.DirInternal, avviando l'intent tramite startActivityForResult attraverso un contesto JavaObject e intercettando la risposta all'interno di Sub Activity_Result. La fotocamera si avvia senza crash, ma la dimensione del file rimane 0 quando si torna all'activity, quindi LoadBitmapSample non può renderizzare nulla. Qual è il modo ufficiale e corretto su TargetSDK 36 per forzare l'app della fotocamera esterna a scrivere l'immagine a piena risoluzione nelle nostre directory sicure dell'app senza che venga bloccata dalle rigide policy di condivisione file in background di Android? Dovrei migrare rigorosamente a CameraClass v2 o B4XPages, oppure esiste un modo specifico per gestire l'URI di output per l'intent della fotocamera nelle Activity standard? Grazie mille per il vostro tempo e la vostra guida!