request max heapsize?

by Tomasz » Sun, 15 May 2011 00:31:20 GMT


Sponsored Links
 Hi guys,

Is there a way for an application to request a larger than normal
maximum heap size? I have an application which needs around 100mb RAM
(and this is with lots of tricks to decrease memory usage).

Newer phones with 500mb+ should have no problem coping with this. Any
advice is very much appreciated.

Thanks,
Tomasz

-- 



Re: request max heapsize?

by Tomasz » Sun, 15 May 2011 00:59:58 GMT


 I have found some references to a manifest file attribute,
android:largeheap="true"
However if I try and use this I get the following error on
compilation:
error: No resource identifier found for attribute 'largeheap' in
package 'android'




-- 


Sponsored Links


Re: Re: request max heapsize?

by Harri Smæ°“tt » Sun, 15 May 2011 01:51:29 GMT


 



android:largeHeap="true" is mentioned here;
 http://developer.android.com/reference/android/app/ActivityManager.html #getLargeMemoryClass%28%29

It's API level 11 method, could it be so that this attribute is too?

--
H

-- 



Re: Re: request max heapsize?

by Dianne Hackborn » Sun, 15 May 2011 02:27:03 GMT


 Yes this was introduced in 3.0.

2011/5/14 Harri Smtt <har...@gmail.com>






-- 
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.

-- 



Other Threads

1. How to delete textfiles from the device.

Hi, I'm currently downloading information from an online source which
is saved in a textfile on the device. i'm just wondering what function
is used in order to "clean out" the textfiles once the program has
ended. Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. String comparison with Text in EditText with online data.

Hi, I'm trying to use the code below to connect to an online source,
then compare the data as it is read line by line against what is typed
in an EditText field before displaying the next page. At the moment
when I run it and press the "Sign In" button nothing happens. The
problem seems to be with the comparison of the data. Can anyone help.

try{

                URL myURL = new URL("http://www.donalokeeffe.com/
usernames.txt");

                URLConnection conn = myURL.openConnection();
                conn.connect();

                BufferedReader is = new BufferedReader(new InputStreamReader
(conn.getInputStream(), "UTF-8"));

                String istr;
                EditText username = (EditText)findViewById(R.id.username2);
                String usrname = username.getText().toString();

                while ((istr = is.readLine()) != null)
                {
                        if(is.readLine() == usrname)
                        {
                                setContentView(R.layout.menu);

                        Button button2 = (Button)findViewById(R.id.timetable);
                    button2.setOnClickListener(mShowttListener);

                    Button button3 = (Button)findViewById(R.id.news);
                    button3.setOnClickListener(mShowlatnewsListener);

                    Button button4 = (Button)findViewById(R.id.lecturer);
                    button4.setOnClickListener(mShowlecturerListener);

                    Button logout = (Button)findViewById(R.id.logout);
                    logout.setOnClickListener(mShowmainListener);

                        }
                }

                }catch ( IOException e )
            {
                Log.d(TAG, "Can not connect to the target server!" );
                try {
                                        throw new IOException();
                                } catch (IOException e1) {
                                        // TODO Auto-generated catch block
                                        e1.printStackTrace();
                                }
            }
--~--~---------~--~----~------------~-------~--~----~

3. Maps API

4. Changing ringer volume

5. DDMS Heap view format

6. TrackBall an event states: is there always a ACTION_DOWN before ACTION_MOVE

7. Mailing List Subject Header