Android :: InPurgeable Doesn't Work With BitmapFactory.decodeFile?
Apr 16, 2010
why when I load images from files using BitmapFactory.decodeFile and passing in a BitmapFactory.Options with inPurgeable set to true, I still get OutOfMemoryError? For example, doing the following many times, with lots of different resources works fine:
BitmapFactory.Options opts = new Options() opts.inPurgeable = true; bitmap = BitmapFactory.decodeResource(resources, resId, opts);
However, doing the following causes an OutOfMemoryError
BitmapFactory.Options opts = new Options() opts.inPurgeable = true; bitmap = BitmapFactory.decodeFile(myFile, opts);
In reality my code isn't as simple as outlined above. What I'm really trying to do is load a couple of bitmap resources draw them on a bitmap backed canvas, and then write this new bitmap to file, just so it can then be finally re-read into memory with the inPurgeable option set to true (using BitmapFactory.decodeFile).
View 2 Replies
May 22, 2009
I was reading in some other posts that some developers have the same Problem, but till now, no solution. its about the gallery: I have a string array with photos, but when the gallery does show the 2nd Picture it crash with:...............
View 7 Replies
View Related
Nov 16, 2010
I learned from several discussions of this group that BitmapFactory.decodeFile() allocates heap memory outside of the "java heap". My app receives encrypted files from a remote server. Decoding those files needs a lot of heap space. After finishing this decoding step most of the allocated heap space will be freed by the GC. But the (total) heap size - as displayed by the DDM - remains large. In this situation there is not enough heap space outside of the "Java heap" to decode even medium sized image files using BitmapFactory.decodeFile(). At the moment I limit the size of encrypted files to ensure that the Java heap space never increases to more than 10 MB. This ensures that there is enough memory for BitmapFactory.decodeFile(). But this is not very elegant.
Is it possible to tell the dalvik-vm to reduce the (total) heap size to have more space for decoding images or is there another solution?
View 6 Replies
View Related
Aug 2, 2010
Saving the file code...
The last line gives a null pointer exception, why is BitmapFactory.decodeFile returning null? I can verify that the file is getting saved correctly as I can pull it using adb and see the png displaying properly.
View 1 Replies
View Related
May 2, 2010
I have so far found two bugs in Galaxo 1.6.3:
a) Speaker doesn't work in call (very weak). works well in ringtones etc.
b) Scrolling contacts by letter doesn't work.
Other than that this is a leap forward, especially with the overclock options!
Both bugs, as well as others, fixed in 1.6.3.1 update!
View 49 Replies
View Related
Dec 8, 2009
I'm trying to determine whether or not my phone is defective, or if this is a current problem with the Cliq.
Of the apps I've downloaded, only a few of them have worked. Of those few that work, some don't work right. Has anyone had problems with these apps crashing on them, or just not working correctly?
- Nice Battery (see description at bottom of: My Ultimate CLIQ settings (so far))
- WeatherBug (kept showing the wrong location, crashed when trying to change location)
- Snake - doesn't work just says its "paused"
- RingDroid - crashes when I select the "Facebook Pop" button
- Layar - screen is rotated 90 degrees at all times
There have been others, but usually I just uninstall them right after discovering it doesn't work right.
View 3 Replies
View Related
Jun 14, 2010
I've had an HTC Desire on Orange in the UK for about 6 weeks and it is having persistent problem. Firstly despite having a strong 4-bar out of 4 signal, online services and the internet do not work at all when a 3G signal is being received (e.g. news, weather, all widgets, internet, email etc).Calls and texts do work however with a 3G signal.But when a 3g+ signal (HSDPA) is being received, all internet services as above work fine.However, when a 3+ signal is being received, the phone does not make or receive calls or text messages, and often fails to send texts. Calls I make immediately shut down (bleep + �call ended�), and incoming calls from other people go straight to answerphone. Also often when turning the data connection on/off, it freezes and has to be rebooted, and turning airplane setting on and off does not fix the problem.
I have also tried the different network settings (GSM, WCDMA, auto, etc). �GSM� sends and receives calls and texts but doesn�t work (or is incredibly slow) with internet, and �auto� and �WCDMA only� show the problems as above.I don't think this is a network/coverage issues as, as I have seen many people reporting these same issues on other networks and in other parts of the UK, and I have read that other people are having to manually turn off HSDPA to be able to make calls (using an app?). Even if I can stop HSDPA from connecting to make sure the phone works, I still can�t use the internet at all on 3g � even GSM works better!
Finally, when I connect to a bluetooth device (e.g. car and headphones) the phone will connect briefly, and then randomly disconnect. I have also seen this issue reported elsewhere.I very much like the phone and don't want to get rid of it, but these problems are making the phone unuseable.Also I don't know if I should be contacting HTC or Orange about this. Will the upcoming Android 2.2 fix these problems?Anyone know how to fix this or if I need a new handset? Are there any apps that can help? Also does the Nexus One have these problems and are they fixed by Froyo?
View 4 Replies
View Related
Sep 16, 2009
So I made a discovery - my dialpad doesn't work during a call. Even if I bring it up via the softkeys, the numbers don't register a tap...anyone. else have this issue or is it just my phone?
View 49 Replies
View Related
Nov 4, 2010
I'm trying to do my first widget but it seems not to work in the emulator: when I try to add the widget to the wallpaper, I've got the following message: "Application is not installed on your phone".
View 2 Replies
View Related
Jul 24, 2009
I've inherited a project that worked on sdk 1.0, but when I try to use them on sdk 1.5 it crashes. I'm a beginner so I'm not able to understand where is the problem..So I hope that writing on this forum someone can help me..The project concerns the detection via GPS coordinates and the notification of events close to the location where it was at that time.
View 4 Replies
View Related
Aug 17, 2010
The import com.google.android.maps.MapActivity cannot be resolved to a type.
View 2 Replies
View Related
May 4, 2009
I am using a Timer in my android application, but i can't get it to work. When I start my application the Timer simply does not start. The application continues but does not update.The long "toStart" finds the number of seconds left of the current minute, and thereafter the period is set to 60 seconds. The TimerTask simply calls a method.
View 2 Replies
View Related
Feb 25, 2010
My girlfriend and I would really like to utilize Latitude. But it's always off, behind, or wrong. We can be sitting next to each other in the same car and it will tell me where she was 12 hours ago, and on mine is has me where I currently am, but on her it has me 4 hours ago. Refreshing does nothing. I don't understand why it is not working.Also, when I am at work, which is in Indianapolis, it says I am at Center, IN. When she is a work, again in Indianapolis, it says Washington, IN. When I am at home in Greenwood, it says all kinds of stuff that's not correct.Am I doing something wrong?Also, I meant to ask, is there another app that we could use for this? This tool is handy for us because we carpool and I would like to be able to know where she is so I know when to go out to meet her.
View 9 Replies
View Related
Jan 30, 2010
WHy Is the market so bad. It's such a pain in the as#.Yes I know its being vamped in the next ROM update, but for now search for a word 8 results found.Would it be too much to ask to show me the 8 results found rather then showing me a error asking me to check my spelling. Try another key word or be more general?I already know there are 8 results why can't i see them.
View 2 Replies
View Related
Nov 14, 2009
I can't seem to get AutoCompleteTextView to work with Theme.Light.The problem is the autocomplete popup draws the suggestions text in white on a white background. You can only see what the suggestions are after they are selected, because then the white text is drawn over top of the selector background.It works fine with the default theme but not with Theme.Light.I tried setting the android:textColor attribute.That only set the color for the AutoCompeleteTextView input box, not for the suggestion's popup.Right now the only way to get my app to work properly is to use the default theme.Does anyone else have the same issue or know of a way to programically set the suggestion's popup text color or background?
View 4 Replies
View Related
Dec 31, 2009
I am facing with a problem related startActivityForResult()
To start SecondActivity from FirstActivity :
CODE:.............
And handles result :
CODE:..........
To send the message to FirstActivity from SecondActivity :
in SecondActivity :
CODE:............
I can't handle the result on onActivityResult in FirstActivity. It never works for my application.
My OS is : 1.5
View 2 Replies
View Related
Jun 17, 2010
I want to make conversation between android devices. I use BluetoothChat to do this but it doesn't work I can't read correctly data from another device.
Conversation is :
Me: privet
Device: p
Device: rivet
CODE:...........
View 1 Replies
View Related
Sep 8, 2010
I write following application:
There is an AutoCompleteTextView field as Adapter I'm using ArrayAdapter with ListArray the ListArray consists of some constant string item and one item, which will be changed dynamically everytime user typed something in the field
I took TextChangedListener to update this last list item. But it seems, that update occurs only once.
I add a bit code of me. May be somebody can show me, what did i do wrong.
CODE:.................
View 1 Replies
View Related
Apr 29, 2009
I just want to set an icon in the right of titlebar, but it doesn't work, the icon is still at left. Did I miss something?
View 5 Replies
View Related
Sep 23, 2010
why the website iPhonemoviez.net doesn't work on the droidx?
View 6 Replies
View Related
Nov 16, 2009
I have created an Activity A, which is blocked from rotating. I have implemented this by adding android:screen Orientation="portrait" in the Android Manifest. I have tested the app, Activity A didn't enter landscape mode when I rotated the phone, everything worked fine. Then I created another Activity B, which is a 'Dialog theme' Activity. Inside Activity A, I called.
View 3 Replies
View Related
Jul 25, 2010
i download the google earth for my htc wildfire.I install the app succesfully,but when i go to open it it close!!!why that?
View 4 Replies
View Related
Jan 23, 2010
I am developing application with Google Map. I've tested on the emulator and saw error line In the log: 01-23 16:04:28.453: ERROR/MapActivity(733): Couldn't get connection factory client But it worked fine on the emulator. Then I've signed the application and created its .apk file. I've put it on the web server downloaded and installed it on the real device (it is HTC with Verizon). But my application didn't appear google maps on the device. I've checked API key and other configuration. Everything was ok. But google maps didn't work. Have you faced to problem same as mine?
View 1 Replies
View Related
Nov 5, 2009
In main Activity, I called start Activity For Result(intentB, 100) to start a new activity B, then in B, I called startActivity(intentC) to start another activity C. Lastly I wanted to call finish Activity(100) in C to close activity B, but seemed it was not successfully destroyed(I can use BACK key to see it's still there.)
View 6 Replies
View Related
Jul 22, 2010
I put a webview in my application to visit a webpage which includes some javascript functions, my purpose is when users click a link in the webpage, it will start a new activity in the application. I've written "webSettings.setJavaScriptEnabled(true);" in my source codes.
It works well in most of the time, however sometimes it doesn't work, there is no response when users click, and I don't know why because the environment is not changed at all.
View 1 Replies
View Related
Nov 9, 2009
I saw that the browser in sdk2.0 has sqlite support however it doesn't seem to work in webview (at least for me). Did any of you guys get sqlite to work in webview if so how?
View 4 Replies
View Related
Jun 24, 2010
I actually have an app that I test with two devices. One LG GW620, and one Samsung Spica. I would like when User touch the screen, the device vibrate. In fact, On the LG GW620, the device vibrate when I touch it. But on the spica doesn't... I looked for settings on the spica, but Vibrator is check, so I don't understand why it doesn't vibrate.
In my app I have : <uses-permission android:name="android.permission.VIBRATE"></uses-permission> and in the code :
Vibrator vibrator =(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(100);
But I think it is not the best thing to do that. I wish device vibrate for every click, but I don't know if I have to do a Vibrator for each OnClick ? Or if I could do only one Vibrator for all the application? And especially why it doesn't work on Spica?
View 2 Replies
View Related
May 28, 2009
I am trying to capture video since a week but still no luck. can anybody help me to figure out what i am missing in the code below:
final MediaRecorder recorder = new MediaRecorder(); ContentValues values = new ContentValues(3); values.put(MediaStore.MediaColumns.TITLE, "Recorded video"); values.put (MediaStore.MediaColumns.DATE_ADDED, System.currentTimeMillis()); // values.put (MediaStore.MediaColumns.MIME_TYPE, recorder.getMimeContentType());.......
View 5 Replies
View Related
Aug 18, 2010
On my HTC EVO Wavesecure works well normally, but if you turn the phone all the way off, it can not be located, or locked or anything else. I haven't rooted my phone and I believe that there may be no solution to this problem. Any info at all on this would be appreciated. I also posted this under HTC EVO and hope that the redundancy is not a violation (I just joined the forum today).
View 5 Replies
View Related
Feb 1, 2010
Is there a way to put a single line of static text into a TextView and allow the user to scroll over the part that is not initially visible? I have tried scrollHorizontally, but I get text that is truncated. This is the layout (that doesn't scroll).
CODE:..............
I tried setting <requestFocus/> in the layout and also tried calling requestFocus() in onCreate().
View 6 Replies
View Related