Fix Android Photo Upload

Замовник: AI | Опубліковано: 12.01.2026

My Android app refuses to save a user’s profile photo when the picture is selected from the device gallery. The spinner shows, then nothing—no error, no image, just the default avatar. I need a clean, reliable way to let users pick an image and see it appear instantly on their profile. Current flow • User taps the avatar → gallery chooser opens • They pick an image (JPG/PNG) → app shows loading indicator • The call returns, but the avatar never refreshes and the image never reaches the server What I’m after 1. Diagnose why the selected file never completes the upload or render cycle. 2. Patch the code (Java/Kotlin) so gallery-sourced images load, compress if necessary, and POST successfully. 3. Return a concise write-up of the root cause and the updated steps so I can replicate the fix in other modules. Acceptance • Any image chosen from the gallery displays instantly after upload without needing an app restart. • API returns 200, and the image URL persists after app relaunch. • No regressions in camera-based uploads or other profile settings. You’ll have access to the relevant fragment/activity, API endpoint details, and current logcat output. Once the fix is in, a brief change log and the edited files are all I need.