Hello everyone,
I'm trying to view files found over HTTPS reasonably securely on Android ("reasonably" here means "not on the SD card"). I can't seem to find anything in the documentation that seems to answer this.
My current app prototype downloads the file from the server and puts it somewhere (currently, the SD card), and then launches an ACTION_VIEW
intent against that File
.
Two ideas I had were to either:
- An indirect
ACTION_VIEW
intent against an HTTPS URI with the mime-type set properly; last time I tried the HTTPS URI, it opened in the browser, but the mime-type wasn't set properly then. Ought I expect different behavior? - Downloading to the app storage, and then launching an indirect intent from there.
From my understanding of launching new activities, they get pulled into the current Task, which then uses my application's UID, thus making it possible for (say) the photo viewer to look into my app's private storage, right? This would point to #2 being generally the better option if I'm looking at this correctly. I'm actually intently curious as to how B-Folders accomplishes this as well, as I'm aiming towards a similar goal.
-- Matt