android

sending binary data via POST on android

Android supports a limited version of apache's http client(v4). typically if I want to send binary data using content type= application/octet-stream via POST, I do the following: HttpClient client = getHttpClient(); HttpPost method=new HttpPost("http://192.168.0.1:8080/xxx"); System.err.printl...

ImageAdapter and ListView (java.lang.OutOfMemoryError: bitmap size exceeds VM budget)

Hi, I'm using ListView to display images which I provide through an ImageAdapter class. it works great on my device (and on many other devices which I tested it on), but somehow when I'm using the emulator and I'm long-pressing the up/down button - I'm getting an outOfMemory error after 10-15 seconds. I tried clearing cache, canceling ...

Why activity result code is diffrent then I expected

I have 2 activities. In child activity i have put something like that in onPause(): if (isFinishing()) { final Intent intent = new Intent(); intent.putExtra(SOME_DATA, value); setResult(RESULT_OK, intent); Log.i("test", "Result set to RESULT_OK"); } In parent activity i check resultCode when child activity is destroyed, and this ...

Android pattern locking

I have been able to lock the screen using LOCK_PATTERN_ENABLED, however in many cases when I enable this pattern locking it will take any pattern and move past the pattern check. Has anyone else run across this? ...

Android: Problems downloading images and converting to bitmaps

Hi all, I am working on an application that downloads images from a url. The problem is that only some images are being correctly downloaded and others are not. First off, here is the problem code: public Bitmap downloadImage(String url) { HttpClient client = new DefaultHttpClient(); HttpResponse response = null; try { ...

voice recognition in android

Hi, I am an android application developer. I was curious as to how does voice recognition could be implemented using android. There is inbuilt support for speech recognition in android, but how can it be used to implement voice recognition...Are there any links which would help me in learning on this topic.. Thanks ...

Strange behaviour with mediaplayer and seekTo

I'm implementing a custom video player because I need custom video controls. I have an app with only one activity, which on startup shall start playing a video right away. Now, the problem I have is: I don't want the video to start from the beginning, but from a later position. Therefore I do a seekTo(16867). Since seekTo is asynchron...

Sending MMS using httpConnection (Android 2.1)

i am trying to send MMS using code sample from here. I am not sure I understand how to deal with MMSPart part and parts vars: where and how should they be filled? Thanks in advance ...

Java Thread Message Passing

I'm writing an Android app. I have a main method, which creates and runs a new Thread using an anonymous inner Runnable class. The run() method, when it's done, calls a method on it's parent class (in the main thread) that calls notifyDataSetChanged() so that the main thread can redraw the new data. This is causing all kinds of trouble (...

Is there a faster way to download a page from the net to a string?

I have tried other methods to download info from a URL, but needed a faster one. I need to download and parse about 250 separate pages, and would like the app to not appear ridiculously slow. This is the code I am currently using to retrieve a single page, any insight would be great. try { URL myURL = new URL("http://www.google.co...

Android - Isn't Eclipse WYSIWYG?

Hi at all, i have downloaded Eclipse Galileo and install Android SDK for the first time. I have try to create an simple Userinterface, but i have see that i can't move the "object" directly from the stage. But i need to edit the Code or open the Property panel in order to change the position of an Element on the Stage. Isn't Eclipse WY...

Building an android library and passing the client's R.java when making the library call, how?

I would like to build a library and be able to distribute it as a jar without having to give the source. In the library, layouts are used for specifying the UI, however android doesn't seem to facilitate easily bundling a jar and distributing it, as it doesn't properly scope the resources (anything in '/res/*') in this jar file, the refe...

Android with netbeans

hey, i tried to solve that problem i did all possible way. when intsall SDK and press intsall that didn't work and when i was going to create ADV the following message is ERROR: SWT folder '' does not exist. Please set ANDROID_SWT to point to the folder containing swt.jar for your platform. please how can i solve it. cheers. ...

activity started by "startActivityForResult" crashes when returning data

HI, I've made an application B called by app A with the startActivityForResult method. When B try to return the result to A the application crashes and I get this error (by the way com.sistematica.carichispeciali.MobiWork is the application A, the one that calls B with startActivityForResult) 06-16 09:40:32.506: WARN/dalvikvm(744): thre...

How to align views in the middle of another views baseline?

How do you align views relative to the "middle" part of another view? I think it is best explained with a pic of the UI I'm trying to create in android. ...

How to rotate particular image among multiple images drawn to canvas in android ?

Hi All, I need a small help on rotating one image around its center of axis among multiple images which are drawn to canvas in android. I am loading images to canvas like below. canvas.drawBitmap(mMachineBackground, 0, 0, null); canvas.drawBitmap(mMachineRotator, 0, 0, null); I want to rotate only the second bitmap around its center...

Is there currently anyone developing ps3/xbox360 controller app for android?

If anyone knows of any such project that has already been started, I'd prefer not to waste my time by starting up and just go right into helping whoever has this project. But I am fairly new so I'm not sure what help I could provide. Again, please let me know if there is already someone doing this project. ...

Android EVO4G SenseUI Flash Lite 4 cookie problem

Got the EVO4G today, watching it run Actionscript3 out of the box was EXTREMELY cool. Ran into a problem though. When I connect to a server which creates an HTTP session and hands a cookie to my application, subsequent calls from my client to the server do not have the cookie attached to the HTTP request. That causes the server to inv...

Javascript ended event when video playback ends on android

I have been trying to create a web page that will redirect the user after he has watched a video (or if he aborted the playback). I've got this working on the iphone but can't really figure out how it works on the android. On the Iphone i have found two ways of doing this. using the tag to embed the quicktime plugin and then adding a e...

about android emulator diskimage

The emulator provides a default user-data disk image. At startup, the emulator creates the default image as a copy of the system user-data image (user-data.img), described above. The emulator stores the new image with the files of the active AVD. from:http://androidappdocs.appspot.com/guide/developing/tools/emulator.html 1)What doe...