Thanks JBQ and Ralf. Ding
2008/11/30 Jean-Baptiste Queru <[EMAIL PROTECTED]> > > The applications that use DownloadProvider are the Browser, Gmail, > Market, and the System Updater. > > LIke Ralf said, the easiest way would be to look at the Downloader > sample code. You can also just write it "from scratch" from public > classes, you can look for inspiration in the DownloadProvider's core > code (except for AndroidHttpClient which is easily replaced, the core > DownloadThread should mostly work in the SDK). > > JBQ > > On Sat, Nov 29, 2008 at 8:47 AM, Xiaoliang Ding <[EMAIL PROTECTED]> > wrote: > > Hi, Jean-Baptiste Queru > > > > Thanks a lot for your nice answers. You said DownloadProvider only > can > > be used by system application. Mind you tell me which system application > use > > DownloadProvider ? If the downloading functionality is really needed in > my > > app, what should I do ? > > > > Even though it's bad for me can't use DownloadProvider in my app, but > a > > very good thing you told me how to use package installer. > > > > Thanks > > Ding > > > > 2008/11/30 Jean-Baptiste Queru <[EMAIL PROTECTED]> > >> > >> Unfortunately, the DownloadProvider is not currently available for > >> non-system applications to use, and that's unlikely to change in the > >> foreseeable future. Even more unfortunately, the current > >> implementation of the DownloadProvider uses private APIs that prevent > >> it from being recompiled on top of the SDK, which means that you can't > >> re-use it "as is" in your application; high-quality contributions in > >> that direction are likely to be accepted if various efforts are > >> synchronized in advance. > >> > >> The manifest for the package installer shows you how you can invoke > >> it: it responds to ACTION_VIEW / CATEGORY_DEFAULT on file: and > >> content: URIs for the APK MIME type > >> "application/vnd.android.package-archive". Full details here > >> > >> > http://android.git.kernel.org/?p=platform/packages/apps/PackageInstaller.git;a=blob;f=AndroidManifest.xml > >> > >> JBQ > >> > >> On Sat, Nov 29, 2008 at 6:31 AM, Xiaoliang Ding <[EMAIL PROTECTED]> > >> wrote: > >> > Hi, smart guys > >> > > >> > I want to implement a application whose one of requirements is > >> > download a > >> > package and install it. What i want to know is can i use > >> > DownloadProvider > >> > and PackageInstaller in my application? How can i use them ? > >> > > >> > Thanks > >> > Ding > >> > > >> > > > >> > > >> > >> > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---