android

Listview with key field

I want to display a listview when clicked be able to get the items key value. How would I go about that. thanks, Dean ...

Rendering absolutely positioned sprites over a regular Android layout

Hi, I've got a standard RelativeLayout laying out my Buttons and TextAreas. What I want to do now is be able to draw various sparks, flying cows etc. at arbitrary places on the screen on top of the whole thing. What's the best way to do this? Should I override onDraw() on the containing View and draw after calling super.onDraw()? Or is ...

Android "Not_Market_Managed" error

Working on trying out the market licensing service, and I'm running into a few problems with the sample application. When I first ran the sample, I got an error saying that the application was not licensed. I linked my account to the simulator in order to get it to get the test response, and now I get an error saying "Application error:...

Android Launching an application chooser with appropriate list of applications

Hi, Although I have seen several threads and tutorials on this topic, I guess I still have some confusion on how an application can be chosen from a list of applications to display a file. I have a Activity which has a list view in it. This list view is bound with file paths (so a file browser of sorts). When we click on a specific fil...

Coloring ListView row depending on contents

I'm trying to have a ListView that will display each row in a given color, depending on the content of that row, but still allow the selector to draw. As it is now, if I call View.setBackgroundColor on a row, it colors the background properly, but the selector isn't drawn. ...

Existing patches for android tabwidget to allow tabs on left-hand side?

My employer is having me work on an android application with very specific UI requirements. Specifically, we need an interface that looks exactly like a TabWidget interface. However, having the tabs on the left hand side is an absolute must. We aren't going to be deploying this application to any android phones, its for an in house devic...

Testing for the masses with only one phone and emulator

I have a new android app I put on the marketplace a few days ago. I did quite a bit of testing on my moto droid before publishing it and tried to be very thorough. Well, I got some negative comments back on how it didnt run right on someone's EVO 2.2 or X10 (didnt even know what that was at first). Well, it runs perfect on my phone. ...

Can't access preferences created by PreferenceActivity

I have a minimal program that does little more than let me set two preferences (an int and a String) using Android's PreferenceActivity. So I have an xml file that defines my preferences, and an activity that extends PreferenceActivity. My main activity has an options menu that launches my preference activity. All of that works great. I ...

Using C2DM to receive notification from gmail server

I'd like my Android app to receive notification when new messages arrive in my gmail account. I realize that the Android gmail client does not broadcast notification when it receives messages. Instead I want to utilize the gmail server's Cloud to Device Messaging capabilities to do this. I read the article at http://code.google.com/andro...

Partially "open" SlidingDrawer

I've searched the discussion list (not to mention the interwebs ad nauseum) and I can't seem to find an answer and/or example. I need to be able to expose part of a ListView on the bottom portion of the screen, and then (like SlidingDrawer) have the rest of the list displayed if the user flings upwards. SlidingDrawer has the behavior...

How to get started with mobile development?

Hi, I want to get started with mobile development , I know HTML,CSS,JavaScript,PHP and C#. What is the best way to get started? I know that for example, if i want to create an iphone application i need to know objective c (and get mac),Which language is the best for mobile development (and cross platform - works on Nokia,IPhone,android,p...

Expand animation in android and inner size calculation (dimension)

To make it simple.I have a LinearLayout containing some details. It is scaled down to a two pixel line. When I click on the title above the LinearLayout. I'd like it to expand to the size of its content. I tried the ScaleAnimation class and it wors except it needs a scale factor. I'd like to be able to scale from 2pixel to realsize and...

Android overlapping views

Hello, I'm new to Android and let me first tell you what I'm trying to achieve. Using sockets, I'm sending pictures from my computer's webcam every 50ms. In Android app, I've created my display that extends View. I've added this view to FrameLayout. Parallel thread is receiving images from server app (desktop) and refreshing my display....

why am I getting "integer expected" error in the Android manifest?

I think I've asked this before but I can't find the question now, and I don't think I got an answer. In the android manifest on the first line "" I'm getting an error marker (with a red X). When I mouse over the red x it says- "Manifest attribute 'minSdkVersion' is set to '2.1'. Integer is expected." does anyone know what could be...

SensorEvent.timestamp to absolute (utc) timestamp?

I question myself what the timestamp in SensorEvent.timestamp means. Numbers like 3548712982000 occur. It is not plausible for anything: nanoseconds/milliseconds since 1970 etc. Is this maybe some overflow error? It seems as it is different on different devices at the same time!!! ...

Develop a native source code for Android and BlackBerry

Is there a way to develop classes for Android and BlackBerry ? In this I mean that BlackBerry and Android have different collections. So I would like to know what is the best way to develop such files (reflection, different files, ...) ...

Android import project errors

Hey everyone, I'm a beginner, so I'll try my best to explain this problem succinctly. Basically, a friend of mine and I were playing around with the Android SDK, editing a simple RSS reader. We could launch it in the emulator and even install it on our real devices. Fast forward a few days, I'm trying to import the exact same code tha...

Best way to restart activity on Android?

Hi, I'm building a game which works as some type of a quiz. I ask user the question and when he submits the answer(click or touch correct answer) I need to refresh the page with some other question. How should i implement this? How to wait for users answer and continue when onClick or OnTouch listener finishes? Should i use Handler cla...

Android touch events

I want to be able to touch (and hold) the screen, and have an event be triggered by this. This is what I have so far. class Player extends SurfaceView implements SurfaceHolder.Callback { public boolean onTouchEvent(MotionEvent event) { return true; } } Unfortunately this only recognizes when the touch is 'movin...

Dalvik message - Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.

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? ...