Android :: App Builds Up Large Cache

Aug 17, 2010

When I test my app, I notice that after some use it has built up a fairly large cache of several Mb. I see this when I go to Menu-

Android :: App builds up large Cache

Android :: Speed Up Builds On Large Projects - Renaming PNG

Sep 16, 2010

I ran into a problem of slow builds and thought I'd share the solution. I'm porting an iPhone app to Android, and as soon as I added the images to the project (400+ pngs), build time went from about 5 seconds to about 40 seconds. This is on a new machine, quad core i7, 8GB ram. The resource processor (aapt) was to blame. Every time I made a change to a layout xml file and hit save - bam, wait 40 seconds. After running aapt in verbose mode, it was obvious what was happening - aapt does png optimization every single time. Optimization is slow, and aapt only used one core. So it makes sense to turn this optimization off. Just run optipng once, no need to optimize every build or every time I save a layout xml file.

So how do you turn png optimization off? You can't. There is no Eclipse setting, no command line option for aapt. Digging around the aapt source, I noticed something funny though - it only optimizes images in the "drawable" folders that end in ".png".;a=blob;...
Solution: rename all the pngs to end in uppercase ".PNG". Then aapt simply copies the files without optimizing. My build time is back to 5 seconds!
(Caveat: this won't work for nine-patch files - they still need to end in lowercase ".9.png".)

View 2 Replies View Related

Android :: Approach To Cache Large Amount Of Textual And Audio Data / In Android Application

Jul 13, 2010

We are supposed to cache textual and audio data in our application until device is booted or maximum of two days, whichever happens earlier. To get a perspective on data to be cached, note that we are to store about 200 text headers containing around 10 fields, each of length 30 bytes and about 20 sound files each about a minute long.We are getting the textual data by parsing XMLs and then we keep them in ArrayLists. The sound files are directly written inside the app storage using File I/O (and not on SDcard or Apps Cache directory).This application is to be run on devices running Android 1.5 or later.I understand, and please correct me if I am wrong, that we can cache the files either on SDcard or inside the application or inside applications Cache directory.

View 2 Replies View Related

Android :: Large Screen On 1.6 - All XML Files Of Layouts In Layout-large Can't Load

Oct 23, 2009

I want make it support multiple screens(small,normal and large).I am 100% sure the all of layouts are working perfectly now, but large screen,the problem is that all XML files of layouts in layout-large can't load,The platform always load default XML file(these are under layout folder) at large screen environment.

View 4 Replies View Related

General :: Disable Moving Of System Dalvik Cache To /cache?

Aug 16, 2012

In cm roms, dalvik cache of system apps are generated in /cache but those data/apps are generated in /data. Is there any way to disable this behaviour? Cache partition in our phones is too small. In AOSP and AOKP and stock roms, dalvik cache is always generated in /data no matter whether its a system app. any way to achieve this in cm roms?

View 1 Replies View Related

Android :: Fennec Nightly Builds

May 19, 2010

Firefox is releasing nightly builds of their mobile browser, fennec.I can post them here if no one objects (if it's a problem let me know and I can remove them).I have not had the time to try this out and won't until later tonight, however from what I hear it is much improved versus the pre-pre alpha that was released a couple weeks ago.

View 3 Replies View Related

Android :: Ant And Eclipse Builds Don't Play Nice

May 25, 2009

I use ant to do release builds, and eclipse to do all my debug builds. With the new 1.5 sdk, my build.xml overides the resource-src target in order to perform some additional tasks, and it then depends on android_rules.resource-src to get the proper toolchain behaviour.This works well for ant, but eclipse doesn't seem to know where android_rules comes from (not surprising since it is dynamically imported via code), and thus says there is an error in the file. This in turn stops the entire android project from building. So I need to either somehow get eclipse to parse the build.xml properly, or better still, get eclipse to ignore the build.xml altogether since build.xml takes no part in the eclipse build.

View 8 Replies View Related

Android :: Creating Different Builds For Same Source Code

Feb 25, 2010

I have a Android project for SDK1.5 and now I want to convert it for SDK2.1 with some constant changes for the UI. Should I create a complete new Project or the existing project can be manipulated for including the lastest changes. I'm using Eclipse for Development.

View 1 Replies View Related

Android :: How To Disable Asset Compression In Eclipse Builds?

Sep 12, 2010

Does anyone know how to disable asset compression in eclipse builds? In other words, how to cause the -0 flag to be set on aapt?This is in order to put in a >1MB asset file, which requires compression to be turned off.

View 4 Replies View Related

Android :: Android - Image Cache Stategy And Memory Cache Size

Jun 21, 2010

I'm implementing an image cache system for caching downloaded image.

My strategy is based upon two-level cache:
Memory-level and disk-level.

My class is very similar to the class used in the droidfu project

My downloaded images are put into an hashmap and the Bitmap objet is wrapped inside a SoftRererence object.

Also every image is saved permanently to the disk.
If a requested image is not found into the Hashmap<String,SoftReference<Bitmap>> it will be searched on the disk, readed, and then pushed back into the hashmap. Otherwise the image will be downloaded from the network.

Since I store the images into the phisical device momery, I have added a check for preserve the device space and stay under a 1M of occupied space:


This method is called sometime afte a disk writing:


What I'd like to add is the same check on the HashMap size to prevent it will grow too much. Something like this:


My question is:
What could be a right MAX_MEMORY_SIZE value? Also, Is it a good approach? A good answer also could be: "Don't do it! SoftReference is already enough"

View 1 Replies View Related

Motorola Droid :: 2.2 Builds Facebook Sync

Jun 25, 2010

So I've tried 2 builds so far Koush's vanilla build and the Sapphire build and I've run into the same problem on both: whenever I login to Facebook, I no longer get the option to sync contacts. I'm curious as to whether this is a problem I'm having exclusively, or if it's something other people are running into too, and if anyone has found a way to make it work.Options to sync don't exist at all for me. When I go to settings in the Facebook app it normally would show a menu option for syncing, but on 2.2 I get no option. And when I go to the Accounts menu selection in system settings, I can select Facebook as an account to add but I get bounced back to the accounts list without being able to actually add an account.

View 1 Replies View Related

HTC Eris :: Cricket Internet Doesn't Work On Froyo Builds?

Aug 11, 2010

Any reason Cricket internet doesn't work on Froyo builds? I have flashed all of them, and after flashing the 'cricket internet V9' it won't connect. If I flash back to a 2.1 ROM, it works. What gives? It's really annoying because I want to run KaosV27, but can't without 3g.

View 2 Replies View Related

Samsung Behold 2 :: Custom Boot Animation / Google Builds

Jul 16, 2010

I am trying to create a custom boot animation and I have been following this tutorial ([Ref Tutorial] Changing the boot animation screen on google builds - xda-developers) but I can seem to be able to find the system folder. I am using take5 ROM but when I unzip it its md5 file, not a bunch of folder like the tutorial says.

View 8 Replies View Related

Sprint HTC Hero :: Firefox Mobile (Fennec) Nightly Builds

Oct 11, 2010

Has anyone been successful in getting the Fennec nightly builds to run on the Hero? I'm getting to the home screen, but it then crashes before I can do anything. Here's the link (select the ARMv6 Experimental build):

View 4 Replies View Related

Motorola Droid :: Port Over Unlock Screen From 2.0.1 Onto New Froyo Builds?

Sep 29, 2010

Is there anyway to port over the unlock screen from 2.0.1 onto new Froyo builds?

I really do miss the look and feel of the 2.0.1 lock screen.

View 3 Replies View Related

Android :: Android Library Projects Custom Builds

Aug 9, 2010

I have a legacy application and need to split it into a library project (common code) and two application projects (paid and free applications). I don't use Eclipse for development, and also don't use Ant builds provided (generated) by Android SDK (there are several reasons for that: different project directory structure, unit tests integrated into the build, integration with CruiseControl, automatic builds numbering etc), but use our custom build files instead.

I need to modify my Ant builds to make them build my applications projects that refer my library project. I looked into sample application and Ant builds shipped with SDK, but didn't understand how it is done. I saw that library project contains "libs" directory and "" file with "android.library" property set to "true". I saw that applications project contains "" file with "android.library.reference.X" property set to library project directory value. But I didn't find any reference to these properties in the Ant builds (project Ant build file, and Ant builds shipped with SDK). Just placing these files into application/library project directories doesn't help, i.e. SDK tools doesn't interpret them.

My guess is that this is performed by, but I'd like to know how it is performed. My build is set of targets that call (using exec) Android SDK tools: appt, dx, apkbuilder and so on. So I'd like to know which command line parameters I need to use to make, lets say, appt tool to merge resources?

View 2 Replies View Related

Android : Reading Rss.xml Is Too Large Url

Jun 22, 2009

I am reading the following URL to test a RSS parser.

When using the same code on a Android HTC phone the whole resource cannot be read. There are no exceptions being thrown. I am guessing the rss.xml is too large to be read in? I use a sax parser after the block of code which complains. Code...

View 4 Replies View Related

Android :: Stream A Very Large Mp3 Using MediaPlayer

Mar 11, 2009

Is it possible to stream a very large mp3 using MediaPlayer? The mp3 I am interested in is over 270 mb.

View 3 Replies View Related

Android :: Managing Large Graphic Set

Sep 14, 2009

I'm writing a game for a computer class that I'm currently taking for school. The game has a lot of graphics associated with it (mostly in .png format). There is too much data to simply include it as part of the 'res'. The way i'm currently doing it, is to store all of the graphics in a single zip file, in a folder on the SDCard, e.g., / sdcard/Game/ (or whatever). And then i'm using the ZipInputStream to read from those, then using the BitmapFactory to decode the stream and then draw them on the canvas. The problem that I'm having is that this method is terribly slow if I add a lot of images into the zip file. The best way I have found thus far is to name the .png files within the zip numerically, then use a for-loop to jump directly to a specific file, but this is still a very slow way of doing it. I would like to use a single file (like zip) to hold all of the files for several reasons. 1., i'm trying to use a file container so i can simply update graphic 4.png and then push it into the zip file (for example) from a server. 2., because android sees all image files on the sdcard when you open the gallery application. 3., easier to prevent data manipulation by doing an md5/sha-1 checksum on 1 zip file, rather than every time a file is opened if it weren't in a container.

View 6 Replies View Related

Android :: Large Screen Resolution

Apr 5, 2010

In android, to support all the screen resolution, i have created the layout, layout-small, layout-large folder in res folder, and i have .xml file in all the folder. I can get the output in normal screen and small screen resolution, but in large screen emulator i am getting the xml file in normal is not reading the xml file in large screen emulator. i am using Android 1.6

View 3 Replies View Related

Android :: Cannot Render Large Triangles

Jun 17, 2010

I cannot render a large triangle on android,what I can see is a rectangle,just like the triangle drops a corner This is my vertex array: [-8240, -3540, 10120, -8240, -3540, -3800, -8240, 10582, 10120] and this is my code: gl.glVertexPointer(va.getComponentCount(), gl.GL_SHORT, 6, vertices); gl.glDrawArrays gl.GL_TRIANGLES, 0, 3);

View 2 Replies View Related

Android :: Large Database File

Aug 14, 2009

Is it a problem that i put 17 Mb database to /data/data or should i put it to /sdcard?

View 2 Replies View Related

Android :: Assistance With Large Datasets

May 24, 2009

I must have searched high and low for the answer to my problem.I've even spent around $100 on books hoping that one of them would cover it alas it was not the case.I have approximately 50000 records in a database table. All I want to do is display them in a list-view so you can scroll through them.I dare say I will need to lazily load them as you scroll through the list - my question is how and can it be done through a content provider? I noticed the SlowAdapter in the APIDemos that appears to do exactly the kind of thing that I am looking for, but Im unsure of the correct method for requerying the content provider with the new limit criteria (or at all via a ContentProvider). Do I need to create a new cursor and merge it with the previous one as I scroll down?

View 13 Replies View Related

Android :: How Do A Display A Large Animated Gif Given A Url

May 1, 2009

Suppose I have the URL for large animated gif and I wanted to make a youtube like activity that displays the animation in a streaming way. How do I

stream in the image?
get it do display with actual animation?

I know ImageView is not the answer as it only shows the first frame.

A bonus would be having access to its buffering status so I can synchronize streaming sound as well -- this is part of a YTMND viewer application. While I could create a service that transcodes the public gif files into a nicer format, I'd like the app to function without additional dependencies.

View 3 Replies View Related

Android :: Large Gif Images Can Not Be Displayed / Fix It

Jul 17, 2009

This is with reference to

Large gif images of size more than 4MB can not displayed in android.

Is this is a known issue in android?

View 4 Replies View Related

Android :: I Can Have A Large Clock On My Home Screen?

Jan 7, 2010

Can anyone suggest a widget or something so that i can have a large clock on my home screen? I downloaded a digital widget but its not large enough. I want the time to be BIG on my home screen.

View 11 Replies View Related

Android :: Any Application For Handling Large PDF Files?

Jul 20, 2010

I am looking for an application that can handle large PDF files smoothly. I have tried adobe reader, pdf viewer and RepliGo. They were not very impressive, therefore I have come here for suggestions. Repligo reader I think was better out of the three but I couldn't view a PDF file that had scanned images on it. Was hoping someone could recommend an app that could handle large PDFs and PDFs that contained scanned images.

View 2 Replies View Related

Android :: Avoiding Compression On Large Files

Sep 29, 2010

Apparently you can't have a file in "assets" larger than 1MB (except for certain file types) because it's considered too large to uncompress. But I'm finding mixed info about how to circumvent this limitation. Some say that you can put the files in "raw" and avoid the limitation but others say that files in "raw" are compressed too.And there's the -0 aapt option that can be used to turn off compression for certain file types, but there's no way to specify aapt options in Carbide. I realize that I can break the file into pieces, but that's error- prone on both ends.And using one of the known uncompressed file types not only confuses things but also runs the risk that the Android PTB will decide to start compressing that file type.

View 6 Replies View Related

Android :: Resuming Large File Download

Sep 17, 2009

I am trying to implement the functionality to resume a large file download, but have not found how to start downloading from a position that is not at the beginning of an InputStream.I am currently using the InputStream.skip() method to go to the position where I want to resume the download, but have found that this method actually reads all the data over the network and then throws it away.I would appreciate some help in learning the correct way to start reading from the resume offset of the internet file being downloaded, so that I can avoid wasting the phone network bandwidth, and also avoid the extra time delay caused by re-downloading all the data that was already previously downloaded.

View 2 Replies View Related

Android :: Photoshop PNG Icons Appear Large And Stretched

Nov 4, 2010

I am developing for the Android. When I create icons in Photoshop (and convert them to PNG), they appear larger and stretched within my Android application. The emulator that I am using is medium density. Does anyone have some tips for how I can create my icons in Photoshop so that they appear normally on the Android?

View 2 Replies View Related

Copyrights 2005-15, All rights reserved