android - Can We Install an APK From a ContentProvider? -


i working on a library allow apps self-update, being distributed outside of android market.

my original plan include code download apk file internal storage, , install there via contentprovider , content:// uri. however, when tried that, installer system dumped "skipping dir: " warning logcat , failed install it. once switched downloading apk external storage , using file:// uri action_view installer intent, worked.

the "skipping dir:" message seems logged parsepackage() in packageparser, seems assume working file. suggest cannot use content:// uri values.

has used action_view on application/vnd.android.package-archive intent content:// uri? if so, there specific trick in setting contentprovider made work?

thanks!

i assume not possible, java api doesn't seem allow it. contentprovider's openfile() returns parcelfiledescriptor, can obtain java.io.filedescriptor. can use filedescriptor open either fileinputstream or fileoutputstream. unfortunately, can't use open randomaccessfile (despite fact randomaccessfile works on descriptors same others, constructor you'd need missing api).

as apk files zip files, must read out of order (you have seek end find file directory), assume implementation of installation require randomaccessfile, not have been possible support case you're trying implement.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -