Skip to content

Tag: android

Run Handler messages in a background thread

I want to run some Runnable in a background thread. I want to use Handler because it’s convenient for delays. What I mean is Where runnable should be run in background Thread. Is it possible to create such Handler? Is there a “background” Looper somewhere or how can I create it? P.S. I know …

Connection refused on remote IP, but accepted on local IP

As the title says, I have my server running on a local machine, I tested and debugged it and it worked perfectly (server is written in java as well). But when I tried to test it with my remote IP (instead of 192.168.0.113 I used 146.255.x.x), and the server didn’t receive anything, while the client has …

How to get the weekday of a Date?

I want to get the day of week from the Java Date object when I have an array of Date in String with me. Does anyone know the answer to this? Answer You can get the day-integer like that: If you need the output to be “Tue” rather than 3, instead of going through a calendar, just reformat the string…

Android Thread Allocation – growing heap?

Hi everyone out there, i am developing an android application against API 7 at the moment in which i use an activity which need to be restarted. Lets say my activity looks like this: The problem is that the gc doesnt seem to free the fullAnim thread so that the heap is growing by ~100K at every restart &#8211…

Android: Image upload to web-service loses EXIF data

Please help, I currently upload an image to my web-service which does have the EXIF data attached to it at time of upload. When it arrives on the server, it is minus it’s exif data. Before I upload the image, it’s stored to the devices SD card to which is then decoded using the BitmapFactory class…