Friday, February 18, 2011

[android-developers] Re: Programmatically determine device RAM

Thanks for the reply. I thought that was likely the case, so now I can
stop searching around for it.

For my purposes (and for anyone else reading this) I've decided to
cat /proc/meminfo and parse out the MemTotal value. Obviously that's
relatively inexact, but I think it's good enough for what I want.

On Feb 19, 7:45 am, Dianne Hackborn <hack...@android.com> wrote:
> Sorry, there isn't an SDK API for this.  Any number you would get would be
> fairly meaningless -- often a lot of the actual physical RAM is consumed by
> the radio and other things without the kernel being able to use it.
>
>
>
>
>
>
>
>
>
> On Fri, Feb 18, 2011 at 8:21 PM, Julian <lepin...@gmail.com> wrote:
> > Hey all,
>
> > I haven't been able to find any calls that can determine the amount of
> > ram on a device. I should note that I'm not looking for something that
> > has to do with allocated memory, available memory, or anything that is
> > at all dynamic -- simply something that's going to give you the amount
> > of physical memory built into the hardware.
>
> > The best I've been able to come up with so far is catting is /proc/
> > meminfo (... which turns this into a Linux question).
>
> > Does anyone happen to know of an Android API that is meant to do this?
>
> > Thanks for any suggestions!
>
> > --
> > 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
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

--
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
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment