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?

Android :: Dalvik message - Default buffer size used in BufferedInputStream constructor


Android :: Class Derived From Intent Service Must Have Default Constructor

May 8, 2009

I'm posting this to share the lessons I learned while working with IntentService. IntentService has a single constructor that takes a string argument "name". The documentation has no description of what name is used for. In looking at the sources, I found that its only use is in naming the worker thread for the IntentService. This thread is named IntentService [name].

I initially implemented the constructor of the derived class to also take a String argument and passed it along to the derived class. This is wrong. This will cause the startService() call to generated a java.lang.InstantiationException in the application containing the service i.e. you don't get the exception in the application calling startService(). A clue to the actual problem is a little further up in the logs:"newInstance failed: no <init>()"

The derived class must have a Default constructor and that constructor must call super() passing a string for the name component of the worker thread name.
public class MyIntentService extends IntentService {
public MyIntentService() { super("MyIntentService");
} @Override
protected void onHandleIntent(Intent intent) {
// Handle events on worker thread here }

View 2 Replies View Related

Android :: System Log Buffer Size

Feb 11, 2009

I have the following problem: I'd like to see the system log of two days ago and I cannot. I see only 3 last hours. How can I configure the system log size, location, severity?

View 6 Replies View Related

Android :: Any Way To Change LogCat Buffer Size?

Jan 30, 2010

Is there a way to change how big the logcat buffer is? or how much is buffered back? Especially when using DDMS.

View 3 Replies View Related

Android :: Buffer Size For Audio Track

Jun 17, 2009

This may be impossible but is there any way that I can get a smaller buffer size for AudioTrack than what is provided by getMinBufferSize method?

This is how I am instantiating AudioTrack right now: SR = 44100; bufSize = AudioTrack.getMinBufferSize(SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, bufSize, AudioTrack.MODE_STREAM);

With sample rate of 44100, getMinBufferSize always returns 4800. If I try to make the buffer size smaller than 4800 then I get the following error message: E/AudioTrack( 318): Invalid buffer size: minFrameCount 1200, frameCount 600 E/AudioTrack-JNI( 318): Error initializing AudioTrack E/AudioTrack-Java( 318): [ android.media.AudioTrack ] Error code -20 when initializing AudioTrack. D/AndroidRuntime( 318): Shutting down VM W/dalvikvm( 318): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 318): Uncaught handler: thread main exiting due to uncaught exception I/CheckinService( 59): From server: Intent { action=android.server.checkin.FOTA_CANCEL } E/AndroidRuntime( 318): java.lang.RuntimeException: Unable to start activity Does anyone has any ideas how to over come this problem?

View 2 Replies View Related

Android :: Buffered Input Stream Buffer Size

Jul 5, 2010

I use BufferedInputStream in my code: socket = new Socket(ip, Integer.parseInt(port)); socket.setReceiveBufferSize(64000); output = socket.getOutputStream(); input = new BufferedInputStream(socket.getInputStream(), 64000); I read incoming packets like this: if (input.available() != 0) { System.out.println("Get Packet: " + input.available() + " bytes"); byte[] b = new byte[input.available()]; input.read(b); incParser(b); }

View 2 Replies View Related

Android :: Invalid Audio Buffer Size On Samsung Galaxy

Nov 14, 2009

The following works fine on a G1 but gives an error on the Samsung Galaxy. I was hoping cross-platform support would be better than this. See error below.

private final static int RATE = 44100; private final static int CHANNEL_MODE = AudioFormat.CHANNEL_CONFIGURATION_MONO; private final static int ENCODING = AudioFormat.ENCODING_PCM_16BIT; private AudioRecord recorder_; public boolean open() { int bufferSize = 4 * AudioRecord.getMinBufferSize(RATE, CHANNEL_MODE, ENCODING); recorder_ = new AudioRecord(AudioSource.MIC, RATE, CHANNEL_MODE, ENCODING, bufferSize);

last line gives the following on the Samsung Galaxy phone: 11-14 19:04:07.507: ERROR/AndroidRuntime(7617): java.lang.IllegalArgumentException: Invalid audio buffer size.

View 5 Replies View Related

Android :: Change Internal Buffer Size Of Data Input Stream

Apr 1, 2010

I'm using this kind of code for my TCP/IP connection:

sock = new Socket(host, port);
sock.setKeepAlive(true);
din = new DataInputStream(sock.getInputStream());
dout = new DataOutputStream(sock.getOutputStream());

Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The problem is, that if a packet bigger than 2048 bytes arrives, the din.available() returns 2048 anyway. Just like there was a 2048 internal buffer. I can't read those 2048 bytes when I know it's not the full packet my application is waiting for. If I don't read it however - it'll all stuck at 2048 bytes and never receive more. Can I enlarge the buffer size of DataInputStream somehow? Socket receive buffer is 16384 as returned by sock.getReceiveBufferSize() so it's not the socket limiting me to 2048 bytes. If there is no way to increase the DataInputStream buffer size - I guess the only way is to declare my own buffer and read everything from DataInputStream to that buffer?

View 4 Replies View Related

General :: Which Video Players Allow To Set Network Buffer Cache By Size And Time

Dec 26, 2012

The closest I know of are mxplayer and vplayer. Any xda alternatives people know of?

View 2 Replies View Related

General :: Can Dalvik-cache Size Be Limited?

May 15, 2012

I am wondering if it is possible to limit the size of the dalvik-cache. I am looking for an alternative to putting it on the sdcard. Maybe I could create a partition on the internal storage for the cache?

View 1 Replies View Related

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.

View 1 Replies View Related

Android :: Warning When Using BufferedInputStream

Nov 23, 2009

We are developing an application which uses the BufferedInputStream class several times, and we are getting an annoying message in the logcat:

I/global ( 749): Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.

We cannot meet the suggestion all the times and it's very annoying and it doesn't make much sense. Is it possible to remove that warning message? Or to change the log level to fine instead of info or warning, for example, so that it doesn't appear in the logcat messages?

View 2 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

Sprint HTC Hero :: Picture Messaging - Error - Message Size Limit Reached - Sorry Cannot Attach This Your Message

Oct 15, 2009

I recently bought a HTC Hero with sprint. i took a picture and tried to send it via text message..i receive error of " Message size limit reached...sorry, you cannot attach this your message" Also, i cannot view a picture message sent to me. i tried also saving it to my 4gb card but cannot find where to view the files in my sd card...

View 19 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 :: How To Get Past Default Tiny Text Size

Nov 7, 2009

Let's share info on how we who have poor eyesight can better use our Android phones, what do you say?

1. A program called Spare Parts would allow you to increase font size for many apps. Does not work for the HTC Hero (OS 1.5). Unknown if it woks for any other OS or phone that is currently in existence.

2. A program called Bettercut allows you to create a Display shortcut and use that to enlarge text on some apps. Does not work on the HTC Hero (1.5). Developer says it may be because of the special Home screen the Hero has. Unknown if it works for any other OS or phone.

3. Browser allows you to zoom in out of the box (unless you searched google!)

4. Do OS versions 1.6 and 2.0 allow one to enlarge text out of the box?

View 49 Replies View Related

Android :: Getting Default Font Size Of Multiline TextView

Jan 26, 2010

I want to have a font-size preference in percentage relative to the default font-size, so I need to get the default font-size for a TextView.How do I get the default font-size of a TextView?

View 2 Replies View Related

Android :: Default Paint Size Too Small On New Device

Jun 2, 2010

My app uses a custom View that does a lot of text drawing.To ensure my text is always readable I've been using the result of calling getTextSize() on a newly-created Paint() instance as the minimum size. Docs say calling 'new Paint()' sets attributes like text size to default values.One of my European users just got a Motorola Milestone phone and reports that some text is unreadably small.I believe I've duplicated this using the WVGA854 skin in a 2.1 emulator.Run in that emulator my app's smallest TextViews look fine, but the text I'm drawing myself using Paint instances where I haven't changed the text size from the default is too small. I confirmed this by commenting out all setTextSize() calls in my View subclass: the text becomes too small to read comfortably.

View 5 Replies View Related

Android :: Default Screen Width Of Devices - Image Size

Nov 20, 2009

Whats the default screen width of android devices? I took a 320 x 460 image for my splash screen, it did not cover the entire screen!

View 6 Replies View Related

Android :: Way To Change Message List Size In K9 Mail?

Jan 9, 2010

I like using K9 Mail, but I was wondering if there was a way to change the size of the messages listed in the in box or any IMAP folder. 10-and-a-half messages (with the subject on one line and sender on another) are displayed on my Moment's screen. While I like seeing all of these messages, it is not very finger-friendly. It is difficult to tap precisely on a given message. Is there any way to increase the size of the message list? Something like the default Gmail or Android e-mail app would be great. I have dug through the preferences of K9, but so far haven't found anything other than being able to change the theme of the app.

View 1 Replies View Related

Android :: How Can I Change Default Size (width + Height) Of XML Layout Preview?

Oct 5, 2010

Every time that I want to do a Layout, I'm getting a black layout preview then I can drop stuff on it, that's ok, but how can I change the size of that blank surface (xml). The question came because I set a folder layout-large and then when I add a new layout.xml to that folder it came with the same size, as a layout-normal.

View 1 Replies View Related

General :: How To Change Default Widget Size

Mar 30, 2013

How to change a widget that defaults to 4x3 so it will be a 4x2 instead. I have an SIII accuweather widget I have modified to fit on S advance. But it starts at 4x3 then needs to be resized to 4x2. How I can make it 4x2,

View 1 Replies View Related

HTC Desire :: Message Display Size

Jul 5, 2010

I've been looking for an option to reduce the size of the text in messages so that I can see more of a conversation. I cant seem to find an option in the settings though, is there something simple and obvious that I'm missing?

View 4 Replies View Related

Android :: Activity Constructor Vs OnCreate

Jul 21, 2010

I understand that Android Activities have specific lifecycles and that onCreate should be overridden and used for initialization, but what exactly happens in the constructor? Are there any cases when you could/should override the Activity constructor as well, or should you never touch it?

I'm assuming that the constructor should never be used because references to Activities aren't cleaned up entirely (thus hampering the garbage collector) and that onDestroy is there for that purpose. Is this correct?

View 2 Replies View Related

HTC Desire :: Alter Text Message Box Size

Jul 7, 2010

I had my Desire for for a couple of months & love it but the mrs has just got a Wildfire & i have noticed when i text a message the TO box and the TAP TO COMPOSE boxes are about the same size with a big black box in between them that you cannot drag to alter size when the phone is held upright but on the Wildfire the TAP TO COMPOSE box is the is massive with a send & a attach button on the side when held upright. How do you alter this on the desire? When both phones are turned on the side the TAP TO COMPOSE box is big on both. Also the Wildfire has a torch app which uses the LED on the camera which is not on the Desire but the screen is so dull compared to my phone.

View 3 Replies View Related

HTC Legend :: How To Increase Size Of Text Message Box?

Aug 16, 2010

How do I make the text message box on my legend larger? Its almost impossible to read an average size message back before sending. The screen is so large and remains mainly un-used. The box used for the text message itself is tiny.

View 1 Replies View Related

Android :: NinePatchDrawable Constructor - Chunk And Padding

Mar 2, 2009

I am trying to create a NinePatchDrawable programmatically, but there is no documentation on the constructor's argruments (Bitmap bitmap, byte[] chunk, Rect padding, String srcName). Does anyone know what chunk and padding are... and how to specify them?

View 7 Replies View Related

Android :: Subclass Of View Constructor Not Being Called

Jun 6, 2010

I'm subclassing Android's view class, but whenever I make an instance of the view from another class, the constructor never gets called (or so it seems). I've implemented both public myclass (Context context) and public myclass (Context context, AttributeSet, attrs) I can't figure out what I'm doing wrong. Do I need to override onDraw and onMeasure?

View 1 Replies View Related

Samsung Moment :: Wallpaper Size - Change Welcome Message

Nov 12, 2009

1. What is the wallpaper size of the Moment?

2. Is it possible to change the welcome message when you unlock the phone from "Sprint" to something like "your name"?

View 15 Replies View Related

HTC Droid Eris :: Text Message Size Contents Box

Jan 21, 2010

Anyone have any idea of how to remove the number of characters and number of text messages box which is seen when typing a text message? It's in the upper corner of the text message field. I have the eris from Verizon.

View 4 Replies View Related







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