PackageManager. get size of an installed package?

by Grigory F. » Thu, 12 Feb 2009 16:47:47 GMT


Sponsored Links
 Hi folks,

i work on custom Application Manager and try to get the disk usage of
installed package.

So PackageManager.getpackageSizeInfo was removed from SDK on 0.9->1.0
update

android.content.pm.PackageStats(String pkgName)  (cacheSize, codeSize,
dataSize) returns always "0"

Size of phys. file (java.io.File) in "/data/app" seems wrong/not
completely.

Has anybody any solution to get the total disc space used by an
installed package?

thanks!

Grigory
--~--~---------~--~----~------------~-------~--~----~



PackageManager. get size of an installed package?

by Grigory F. » Fri, 13 Feb 2009 23:32:30 GMT


 Know nobody alternative for PackageManager.getpackageSizeInfo()?
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


PackageManager. get size of an installed package?

by IceskYsl » Sat, 14 Mar 2009 02:10:32 GMT


 i got the same problem,code like:

PackageStats ps = new PackageStats(_packageName);

and (cacheSize, codeSize, dataSize) returns always "0"

and is this a bug???




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Invoking the APK from another apk

HI,

I have two apk in /data/app which are a.apk and b.apk, and I want to
invoke b.apk from a.apk... May, i know code for  invoke b.apk from
a.apk

thanks
C.Rajesh



-- 

2. Tabs inside a fragment

Having read the post here: http://goo.gl/6xYBD (Android 3.0-Tabhost)
and based on the lack of a TabFragment it appears that the way to do
things in 3.0 (and I guess above) is to use tabs in the action bar.

My issue is that I'm writing an app that has the fairly standard
'listview on left, content on right' layout, and I'd like my content
on the right to have tabs.  I know I can change the right fragment
using the tabs in the action bar, but from a UI perspective, it just
looks wrong.  The tabs in the action bar look like they preside over
the *whole* application as they are above the left ListView as well.
For example, in the HoneycombGallery app, the Android/Balloons/
Bikes.... tabs change both the ListView fragment and the content
fragment.  Mine would only change which aspect of the content you're
looking at.

I tried inflating a TabHost into the fragment but I get
NullPointerExceptions when I run TabSpec.setContent (that may be me
doing something wrong - I'll have another run at debugging it but
figured I'd ask this anyway).

I hope that all makes sense.  If I need to explain better please let
me know.  I'm very interested in how others are solving this problem
since I think the 'listview | content' style is quite common.  At the
moment, my alternatives are either to fake tabs with buttons
(something I'd rather avoid) or to present menu buttons in the action
bar to change what you're looking at.

Thank you,

Stephen

-- 

3. Cookies

4. Help needed on porting Flixel Framework to Android. Current issue: switch from canvas draw to opengl es

5. Not able to write a file completely with fileinputstream and fileoutputstream?

6. Starting An Android App From An Url

7. TCP client force close