android

HelloAndroid does not show my TextView control

Hello stackOverflow readers, I am hoping that this is a simple setup issue, but here it goes: Eclipse 3.6.0 AVD 2.2 and 1.5 (created both and tried with both) XP Pro 2002 SP3 I followed the tutorial at site http://developer.android.com/resources/tutorials/hello-world.html but my custom TextView control never rendered. I set a fe...

what is this nameless function?

What does this line from the following code sample mean? "synchronized (_surfaceHolder) {_panel.onDraw(c);}" I can guess what it does, but what is it called and how does it works? Is it a nameless synchronized function? class TutorialThread extends Thread { private SurfaceHolder _surfaceHolder; private Panel _panel; private...

Why does Android use Java?

OK, this should really be asked to someone from Google, but I just want other opinion. Even Android supports Native code applications, the main development tool is Java. But why? I mean, isn't it too slow to interpret code on a mobile device? when introducing Froyo, Google said that new JIT compiler can achieve 2-5 times faster applicat...

froyo's universal rotation and my landscape only app.

My app is set in landscape only mode thanks to an attribute in my manifest file, but with froyo came universal rotation and a problem. It will force the screen to landscape but if the user is holding the phone upside down my app will appear upside down. Is there a way for me to set my app to only rotate when the user has their phone orie...

SSL error when trying to connect to internet in Android emulator

I am running into a problem simply trying to connect to the internet from the Android emulator. I am behind a proxy server and am using the -http-proxy tag when I start the emulator. When I try to connect to the internet in any fashion, it fails. When I open up the internet browser I get the following exception: Unknown error 1 durin...

Best way to design Android UI?

I am new to Android development. Is there a quicker/better way to design the UI than to explicitly write it in XML? Perhaps an Eclipse plug-in to visually create UI? ...

Display a Dialog while video is streaming

I have created an application that displays XML data information on the top section of my Linear layout. Below that I have a video that is streaming and takes a while to start playing. How would I set a dialogue to display until the video appears? ...

No Project to Select for Build Target in Android Test Project

I followed the instruction for "Hello, Testing" tutorial but could not found any project to select for build target at this instruction "Test Target: Set "An existing Android project", click Browse, and then select "HelloAndroid" from the list of projects." Ok, let type the location of an existing project: ~/workspace/HelloAndroid, the ...

Android Audio Question

Hi folks, I have several audio files in the res/raw folder. When I run the following code I was assuming that just the "sound1" file would be played, instead all of the files in the folder get played one after another, not just "sound1". MediaPlayer mp = MediaPlayer.create(this, R.raw.sound1); try { mp.start(); } catch (Illega...

Can one use the Android ContentProvider to serve up an http response (non DB)?

I would like to provide the appearance of DB for my web service without storing it into the DB as a cache or middleware. ...

In Android, how can I detect why my activity was resumed?

I'm developing an Activity that does some of its own state management. I'm trying to differentiate the following onResume cases: New launch task switch (home button long-click) resume after other activity in the same application wake-up after sleep orientation change Is there something in the Activity's intent, or elsewhere, that ca...

How draw or put images into transparent 3d cube?

down vote I am new to OpenGl.Please Help me. How can I draw or put images into transparent 3d cube. I use the same CubeRender.java, Cube.java files from Api Demos.In my CubeActivity class I add mCubeView.getHolder().setFormat(PixelFormat.TRANSPARENT) to have transparent cube. ...

Android tabs - avoid recreating activities on tab clicks

I've put a little app together that has three tabs to show three different web pages. It does work however I am bit worried I haven't got enough control over how this whole thing works. When I click a tab, I get a web page loaded (see code sample below), now when I click another tab another page loads in another view. When I go back to t...

How to get android system log from a Java program

Does anyone know how to get the android device system log programatically using Java? This would be something similar to what is available on lower panel on the Dalvik Debug Monitor. Thanks in advance. ...

Android thinks I'm not closing my database! Why?

I have a SQLiteDatabase data member that I initialize in onCreate and call .close() on in onPause(), onStop(), and onDestroy(). It is re-initialized in onResume(). It seems to run just fine but when I looked at the debugger it see this: 08-24 20:23:50.014: ERROR/Database(6767): Leak found 08-24 20:23:50.014: ERROR/Database(6767): java.l...

HttpClient Post session issue? How do I know if session has been created?

This is a follow up question of http://stackoverflow.com/questions/3550593/sending-html-commands-over-httpclient-android , I have successfully POSTed to the server and recieved 200 code but when I attempt to move to another page it does not recognize that I have logged in. I am wondering if it is a session issue or if i need to follow th...

Android-Clicking a Rotated ListView gives wrong coordinates

I have a ListView that can have one or more clickable items. When I apply a rotate animation the coordinates that are clicked correspond to the original position of the ListView items. For example a list with one item in portrait mode rotated 180 degrees will have the item upside down on the bottom of the screen, but the item gets the cl...

Cache online-file contents in String rather than local file

Hi, I am downloading a text-file from example.com/test.txt and I need the contents only during the runtime of my app, they don't need to be saved to a static file. My code so far: InputStream input = new BufferedInputStream(getURL.openStream()); OutputStream output = new FileOutputStream(tempFile); ...

Android Market links on non Android browsers

Android Market links go to 404 on non Android browsers. When will Google fix this? It's really annoying having to check the user-agent and displaying something else for non Android browsers. ...

i am getting httpresponse exception : unauthorised for the twitter application + oauth.. how to solve it?

please help me. i need a code that will tweet using oauth + twitter api... http://www.youtube.com/watch?v=25o0b2aEw0E i have used this project and i m getting error 08-25 11:47:32.747: WARN/System.err(2029): org.apache.http.client.HttpResponseException: Unauthorized 08-25 11:47:32.747: WARN/System.err(2029): at org.apache.http.im...