Android :: Dalvik Memory Allocation / How To Change Default Limits?

Jun 20, 2010

I am currently considering to develop an application for processing of images captured by the camera of mobile phones using the Android OS. Before I make the decision to go forth, I have done some research and found out there are some complaints regarding the limits of the memory allocated by the Dalvik VM, which seem to be limiting to applications that require manipulation and processing of images. Which limits should i have in mind if i would have to process for example 3 photos taken with the camera, in my process, applying filters, transforms and other types of mathematical operations?I would like to know if it is possible to change the default value of
memory allocated by the Dalvik VM for each application (this default is of 16 MB), in any way, using the Android 1.6 OS. Has anybody looked into this that can help me out please? I have also read in the Android 2.1 compatibility definition document
(available here: http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/pt-PT//compatibility/android-2.1-cdd.pdf )that it is possible to change the allocation of memory by the Dalvik VM from 16 MB to 24 MB or even a bigger amount if it is necessary, but t is not mentioned anywhere how this can be done. If someone has looked into those issues before.

Android :: Dalvik Memory Allocation / How to change default limits?


Android :: How Much Is Too Much Memory Allocation In NDK?

Jun 14, 2010

The NDK download page notes that, "Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on."I came from a C background and was excited to try to use the NDK to operate most of my OpenGL ES functions and any native functions related to physics, animation of vertices, etc... I'm finding that I'm relying quite a bit on Native code and wondering if I may be making some mistakes. I've had no trouble with testing at this point, but I'm curious if I may run into problems in the future.

For example, I have game struct defined (somewhat like is seen in the San-Angeles example). I'm loading vertex information for objects dynamically (just what is needed for an active game area) so there's quite a bit of memory allocation happening for vertices, normals, texture coordinates, indices and texture graphic data... just to name the essentials. I'm quite careful about freeing what is allocated between game areas.Would I be safer setting some caps on array sizes or should I charge bravely forward as I'm going now?

View 1 Replies View Related

Android :: What Is Maximum Memory Limits Per Application?

Aug 28, 2010

What is the maximum memory limits per application for Android 2.2?

View 3 Replies View Related

Motorola Droid X :: Change Orientation Limits / Bottom Keys To Left

Jul 16, 2010

First post here. First Android phone as well. Picked up the X yesterday and am enjoying it. One quick question though, can I not turn the phone to the right (bottom keys to the left) to change the orientation? Things only turn when I turn the phone left or straight up, not right or upside down.

View 1 Replies View Related

Android :: Dalvik Message - Default Buffer Size Used In BufferedInputStream Constructor

Aug 17, 2010

When I used BufferedInputStream and I specify a buffer size, Dalvik gives me this warning - Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.
But right now, my buffer size is already at 8k. What am I doing wrong?

View 1 Replies View Related

Android :: Multicast Permission Of Dalvik And How To Attach To Dalvik Env

Sep 16, 2009

1. I have a c lib which will send & receive multicast package, if I lauch it in native ap, everything is OK, but if lauched through jni ,so it run in dalvik env, it can not receive multicast, i think is may be disabled by dalvik, is there any permission can enable this feature?

2. In this lib i will make some callback of function in dalvik class. according to tranditional method which can run under JDK1.5 & 1.6 as follow: (I make it under source code env not NDK)

In some initialization method save jvm pointer

CODE:...........

it seems AttachCurrentThread not failed but env not correct.

View 4 Replies View Related

Android :: Out Of Memory / Orientation Change / Memory Analyzer Question

Jan 21, 2010

My application is designed to support both portrait and landscape orientations. Using my HTC IO device, it survives 12 orientation changes before throwing an out of memory exception while inflating my activity.When I follow the recommended procedure of using DDMS to first force a GC and then write a heap dump, and then load it into the Eclipse Memory Analyzer, there is only one retained instance of my application, as there should be. None of the other retained objects are obvious offenders. Just for yuks, I reran the test, and did everything the same way except I didn't force a GC. In this case I see 13 instances of my application, which is more consistent with throwing an OOM exception. Is this telling me something useful? If forcing a GC with DDMS reclaims the memory used by now-defunct instances of my activity, I would have thought the VM would have garbage collected some, if not all of these defunct activities automatically. Do I need to request GC at the very beginning of my activity lifecycle to make sure?

View 7 Replies View Related

Android :: Dynamically Generating Dalvik Bytecode Into A Running Dalvik/Android Application

Apr 9, 2010

This question has been asked(and answered) many times about dynamically generating and loading java bytecodes at runtime into a running Dalvik VM, but is there any way to load dex files/bytecodes into an app at runtime?

View 2 Replies View Related

Android :: Where Is DDMS Allocation Tracker?

Nov 13, 2009

I can't find the DDms allocation tracker in the DDMS perspective in eclipse. I search the view doing Window > show view I look to the android view but i have no allocation tracker view there. I use search view tool and I can't find any Where is this View ? (If it's obvious, i am sorry because i reallu can't find it)

View 4 Replies View Related

Android :: Using Allocation Tracker In DDMS

Oct 4, 2010

I have an Activity that is running out of memory in CreateSurface. The logcat looks like this: 10-04 17:55:52. 574 : ERROR/SurfaceFlinger(1086): createSurface() failed, generateId = -12 10-04 17:55:52.574: WARN/ Window Manager (1086): OutOfResourcesException creating surface 10-04 17:55:52.574: INFO/WindowManager (1086): Out of memory for surface! Looking for leaks. 10-04 17:55:52.574: WARN/WindowManager (1086): No leaked surfaces; killing applicatons! 10-04 17:55:52.574: WARN/ActivityManager (1086): Killing processes Free memory at adjustment 0 I'm trying to use DDMS to figure out what's going on but when the application gets killed DDMS aborts the Allocation Tracker. Is there a way to cause the application to do a core dump and is there a tool for analyzing dumps? I have SDK version 8, which does not allow simultaneous use of DDMS and the Eclipse debugger so I need to get creative.

View 5 Replies View Related

Android :: Camera Preview Application - Buffer Allocation?

Nov 21, 2009

I have some questions regarding the code below for camera preview application.

1. How does surfaceCreated() and CreateSurface() relate? Is this surface created via createSurface() from SurfaceFlinger client to SurfaceFlinger server? If so, there must be 2 buffers (frame buffers from display driver if there is how acceleration or if it is the emulator, it will be from ashmem) associated with this surface: surface BB (for composition) and surface FB (for display).

2. How does the rendering buffer (frame buffer BB and frame buffer FB) get allocated in the camera preview application? Are they allocated by the application?

3. How does this surface relate to the preview buffers? Are the preview buffers allocated by the Camera Service during startPreview?

private class CameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
private SurfaceHolder mHolder; private Camera camera = null;
public CameraSurfaceView(Context context) { super(context);
mHolder = getHolder(); mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
} public void surfaceCreated(SurfaceHolder holder) {
camera = Camera.open(); try {
camera.setPreviewDisplay(mHolder);
} catch (Exception e) { Log.e("Camera", "Failed to set camera preview display", e);
} } }

View 2 Replies View Related

Android :: Avoiding String Allocation In TextView.setText()

Dec 28, 2009

On Android 1.5, using the Allocation Tracker I see that every time I call TextView.setText() with a StringBuilder as first argument, a String gets allocated from the following call stack (first line is last call):

java.lang.AbstractStringBuilder toString java.lang.StringBuilder toString android.text.TextUtils stringOrSpannedString android.widget.TextView setText

I tried specifying the buffer type with setText(strBuilder, TextView.BufferType.NORMAL) but it doesn't change anything.

Is there a way to avoid this allocation?

View 2 Replies View Related

HTC Desire :: Allocation Of Sounds To Functions

Sep 13, 2010

Hope someone can help, is it possible to allocate a ring tone to a particular function? I wish to have install a mp3 'tune' I have to be used when a text message is delivered.

View 1 Replies View Related

General :: Adjusting Storage Allocation (SD / USB /Apps)

Dec 14, 2011

Problem discovered while installing Navfree. Got the error message "not enough space". I cant move it to the SD card or anything as I can't install it even.

I have 25Gb of available space but less than 2Gb for apps? I'd like to use all internal storage for apps and the external card for media. How I set that up?

I have a Galaxy S2 Epic (SPH-D710) stock ROM, rooted with the zermax kernel and fited with a Sandisk 16Gb class 4 micro sd card.

Settings>Applications>Manage applications>All
112Mb used of 1.9Gb available.

Settings>Storage>USB storage
Total space is 11.5Gb and Available space 11.5Gb

Settings>Storage>SD card
Total space 14.83Gb (aka 16Gb!) and Available space 14.81Gb.

View 1 Replies View Related

HTC Desire :: Want Memory Card As Default Storage?

Aug 11, 2010

Newbie here so please be gentle. I own a HD2 but I am posting this for a friend who is having a problem with his Desire. How does he set the memory card as his default storage instead of the internal phone memory ?

View 1 Replies View Related

Android :: What Are Limits Of Internal Storage?

Jan 12, 2010

1) Our Android app will store data in a built-in SQLite DB. I see the DB can throw android.database.sqlite.SQLiteFullException, but there's no exact info in API what is the limit. Could anyone tell what are the size limits for a DB in order not to get into the SQLiteFullException? I assume DB will store data in device's internal storage (versus SDCard). Am I right? Given SQLite DB is just a file, probably the DB size is limited with free internal storage space. Again - Am I right? If yes, then what is the internal storage size on Android? How to detect it? Does it vary on a device model basis or OS version basis? 2) We'll also need to save app settings. I think SharedPreferences will fit nicely. However the question is - are SharedPreferences saved to the internal storage too? If yes, then is it the same storage where the DB stores its file?

View 3 Replies View Related

Android :: Want To Set Datepicker Date Limits

Mar 26, 2010

I am using datePicker in android to display images based on user selected dates. I need to limit said dates to certain days for instance Jan 1st 2010 to Dec 31st 2010. Simple as that i thought but no where can i find the answer on how to limit these dates.Does anyone know how to limit the dates for Android DatePicker

View 2 Replies View Related

HTC Desire :: Does All Applications Get Saved By Default To Phone Memory Or SD Card?

Jul 14, 2010

Does all apps etc get saved by default to the phone memory or the SD card?? Also, when I plug in via the USB cable and want to transfer some videos and photos across from my old phone, are they saved to the SD card? Is there any way of checking what is saved to where?

View 4 Replies View Related

Android :: What Are Size Limits Internal Storage?

Jan 12, 2010

1) Our Android app will store data in a built-in SQLite DB. I see the DB can throw android.database.sqlite.SQLiteFullException, but there's no exact info in API what is the limit. Could anyone tell what are the size limits for a DB in order not to get into the SQLiteFullException? I assume DB will store data in device's internal storage (versus SDCard). Am I right? Given SQLite DB is just a file, probably the DB size is limited with free internal storage space. Again - Am I right? If yes, then what is the internal storage size on Android? How to detect it? Does it vary on a device model basis or OS version basis? 2) We'll also need to save app settings. I think SharedPreferences will fit nicely. However the question is - are SharedPreferences saved to the internal storage too? If yes, then is it the same storage where the DB stores its file.

View 1 Replies View Related

Android :: SQLite On Union With Limits Alternative

Jul 26, 2010

I want to create a Cursor, which later I will pass via CursorAdapter to AutoCompleteTextView for autocompletion suggestions. The problem is that my SQL statement needs to select 2 different result sets from the same table, just sorted by different criteria. At the same time these result sets must not overlap - otherwise I would have multiple same suggestions. On MySQL, this would be quite easy: In this case I would have always up to 10 unique values. On SQLite, unfortunately, this is not the case - I cannot have limits on particular selects, just on the whole result set, which makes then UNION not useful for this case at all. solve this problem I've thought about making 2 queries separately: iterating through Cursor from 1st query and putting values into an Array, then iterating over Cursor from 2nd query and also putting values into the same array while checking and skipping already existing values in Array to avoid the duplicates. Then use ArrayAdapter to pass values to AutoCompleteTextView. Theoretically this would work - but what I don't like that everything becomes more complex and much more code to write to solve such a simple task.Is there maybe a better and easier way to do it?

View 2 Replies View Related

Android :: Set Scale Limits On Pinch Zoom?

Sep 28, 2010

How to set Max and Min zoom levels for Pinch-Zoom?

View 2 Replies View Related

Android :: How To Get Size / Limits Of A Touched Area?

Jul 26, 2010

I'd like to know if there's a way to get the size or the limits of a touched area ? So for instance, it could give me how many pixel the finger is covering.

View 1 Replies View Related

Android : Need To Change - Old Image Is Staying In Memory

Oct 30, 2009

I'm getting some reports from the remote stack trace plug-in, with this error (see below)

What I'm doing, is findViewById(R.id.instructionsBack).setBackgroundResource (R.drawable.instructions1);

And then when I need to change the image, findViewById(R.id.instructionsBack).setBackgroundResource (R.drawable.instructions2);

From the error, I'm guessing that the old image is staying in the memory and preventing the new one from loading?

What's the correct way to do this kind of thing? Code...

View 2 Replies View Related

Android :: Change Default Account?

Sep 4, 2010

I just synced with app brain and immediately afterwords received about 7 messages saying my credit card was billed. i was able to stop 3 of them. (by the way this was app that i didn't buy, have on my phone, or ever even heard of for that matter) now verizon is telling me that the only way to change the default account is to do a hard reset, which we all know, but then also said that unless i put the original account back on the phone, i wont be able to get the apps that I DID pay for, without buying them again....THAT is bullshit! the apps should be associated with the phone number, not a freaking email account. does anyone know if there is anyways around this?

View 5 Replies View Related

Android :: Change Default Sms With Handcent

Sep 2, 2010

I just downloaded the Handcent to my EVO and followed all the steps provided in the FAQ and can not seem to get it to ONLY recognize the Handcent and not the orig. droid SMS that came on my phone. Please help me with this. I haven't been able to find anyone with a similar problem with the EVO.

View 1 Replies View Related

Android :: Change Default Sms Client?

Dec 11, 2009

I have handcent and I accidentally clicked the default for the standard client and all I want to know is how do I reset it so that handcent is my default sms client again?

View 6 Replies View Related

Android :: Change Default Package Name Of R.java

Jun 15, 2010

I am writing an app that has a consistent code base, but has different resources that make it a new "app". My ant script copies AndroidManifest.xml, res and assets dirs for a particular app prior to kicking off the build. This approach works great if all the apps have the same application package name. However, I want to be able to install more than one app from this common code base, so I must change the application package name. If I change the package names in each AndroidManifest.xml, then R.java gets generated with the new package name. This causes all my references to the resources constants in my common code base to throw an error. It would be great if I could specify the package name I want aapt to use when generating R.java. Does anyone know if this is possible?

View 9 Replies View Related

Android :: Change Default Gmail Account

Aug 22, 2010

I have 3 mail accounts on my galaxy S. I want to change the default account and remove the existing one but can't. I get the message: this account is required by some application. I'd have to do a reset. That's a pretty dramatic step. Loose all personal data. Is there NO other way Google?

View 1 Replies View Related

Android :: Change Default Language To Chinese

Oct 31, 2009

How to change the default language from english to chinese for HTC Hero. Is there any other ways except reinstall a new ROM?

View 3 Replies View Related

Android :: Want To Change Default Look Of A Scrollview In Droid?

Apr 17, 2010

I am using a scrollview in my application. I want to know how can it be possible to change the default appearance of a scrollview(i.e a line) to something different, maybe an image or arrows in android.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved