Phone gallery preview
Purpose
Show how the phone crawls externally stored artefacts produced by demos and previews them safely.
Entry points
Phone home:
MainPhoneActivity→GalleryActivity
Sample Activities:
com.rokid.phone.GalleryActivitycom.rokid.phone.ImagePreviewActivity
Platform
- Phone
Main files
Flow
- Walk
getExternalFilesDir(null)subtree. - Recursively classify images/video candidates.
- Route taps →
ImagePreviewActivityfor stills orFileProviderplayback for clips.
FAQ
Why only app sandbox storage
Demonstrates artefacts generated via partner flows—not the global photo roll.
Supported codecs
Still: jpg/jpeg/png. Motion: mp4/avi/mov.
Caveats
- If no Activity can resolve video playback intents, toast failure.
- Replace with
MediaStorequeries when you need handset-wide galleries.