android

ANDROID: Accessing information from SQLiteDatabase in other classes?

I have a separate class that includes the database, a cursor, and all the accessor methods for database information. I import the cursor into all the classes that update or use the database. However, I get a runtime error whenever I try to start an intent that uses the database. Any ideas on what might be happening? ...

How do I create a gauge in Android?

I'm looking for a view that I can put on an activity that displays as a gauge, with tickmarks, and allows me to set a value to change where the needle is pointing. Just like a speedometer! Thanks! ...

How to inflate one view with an layout

Hi, I have a layout defined in XML. It contains also: <RelativeLayout android:id="@+id/item" android:layout_width="fill_parent" android:layout_height="wrap_content" /> I would like to inflate this RelativeView with other XML layout file. I may use different layouts depending on a situation. How should I do it? I was try...

POSTing a video to Youtube from Android?

So, I would like to upload a video to the Youtube API, as described here. My question is, what's the most sensible way to do this? Should I: hand-code a POST request to match the one specified in the Youtube docs - I don't know where to start though, does anyone have a good example of coding a similar POST request in Java? use Goog...

Problem on some phones when encoding a bitmap to a byte[] array.

I have an icon that is loaded from the app manager. It is normally small, usually 48x48. I save this icon and load it back later on. Some users are reporting problems when I try to load the saved icon. This occurs for different icons for different users and the only common denominator is that they all have phones running Android 1.5 ...

Android platform compile problem.

I'm compiling the android platform on my desktop. But, i have a problem: ============================================ PLATFORM_VERSION_CODENAME=AOSP PLATFORM_VERSION=AOSP TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUI...

AlertDialog doesn't display items from ListAdapter Hide options

When I try to set the Alert using ArrayAdaptor to display a set of items, the list is displayed but the items' characters are invisible. If the item is selected, then the characters are visible. Scratching my head on why. Appreciate any advice. Below is the code and the screenshot from the emulator. public class MessageTest exte...

Resources for TDD on Android

Anyone know of any good resources to get me started with test driven development on the Android platform? ...

How to prevent dropdown on Android submit form when the first value is selected

I'm building a mobile website. I use regular html for the dropdown like below. If I select the dropdown on Android and click on "Category", it tries to submit the form. But iPhone doesn't do anything which is the desired behavior I want. I found a similar post here, but I'm not building an app. Some websites use links instead of dropdown...

Is it possible to free up memory by finishing an activity after calling another?

Hopefully the title wasn't to confusing but what I meant was the following: Lets say activity A starts activity B by calling: Intent myIntent = new Intent(Activity_A.this, Activity_B.class); Activity_A.this.startActivity(myIntent); Could I save/free up some memory by finishing Activity_A after Activity_B is begun (if thats even possi...

Android - SIMPLE Object Orientation

Hey guys I've got a rather short question. I am using Android and I'm on the way to write a small Game in SIMPLE (The Programming-Language which is like BASIC). Now I would like to know if SIMPLE is Object-oriented? I wasn't able to figure this out... I just saw that a programmer has the opportunity to write multiple ".simple" files i...

Decoding Encoded Audio Data (MP3s, etc) on Android Without Playing It

Short version: What is the best way to get data encoded in an MP3 (and ideally in an AAC/Ogg/WMA) into a Java array or ByteBuffer that I can then manipulate? I'm putting together a program that has slowing down and speeding up sound files as one of its features. This works fine for WAV files, which are a header plus the exact binary da...

shoutcast client on android

Hi, I am trying to implement a shoutcast client on android, but simply parsing a .pls and supplying the stream link to the android mediaplayer does not work. Can anyone please suggest a way I can go about this? If I have to implement something like a proxy server and buffer the stream data manually, can someone please describe what need...

Wrapping long text on an Android Canvas

I have a custom control that is doing a lot of 2D drawing straight to the canvas. Some of this drawing is text, so I am using the Canvas.drawText() method. I want to draw the text within some bounds - a top-left, certain maximum width, and a maximum number of lines. After drawing the text, I want to know how many lines it took. Is th...

How do I make an Android audio list using intents?

Hello! I believe I'm really close but not quite. Why do you think this code doesn't work? private Uri Atarget = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; (...) Intent intent = new Intent(Intent.ACTION_VIEW, Atarget); //intent.setType("audio/*"); startActivityForResult(intent,2); ...

Android Update a Progress Bar which is set inside custom ArrayAdapter

Hi i have a problem updating a progress bar. First i have a custom adapter in which i create a row for each item with a textview and a progress bar. (i have a item_row.xml in where i define the layout for each row) public View getView(int position, View convertView, ViewGroup parent) { ..... ProgressBar progressHorizontal = (Pro...

Android -- How to switch views with 3 ImageViews?

Hello, I need help coming up with a way of executing the following sequence using some type of view or layout combination in Android: I have 3 image objects... say object A, B, and C... [all objects invisible and layered, one on top of the other... A/B/C, like in a RelativeLayout]-->[fade in object A]-->[display A for 200ms]-->[simulta...

Best way to add Activity to an Android project in Eclipse ?

When adding an activity to an existing Android project, I manually create a new class - is that the best / preferred way? How do others handle that? ...

How can I record a video of the Android Emulator running?

What's the best way to record a video showing things running on the Android Emulator? I want to record little demo videos of stuff running so I can put it on YouTube. I'm running the emulator on either Windows or a Mac. ...

Adjusting Application "Permissions" realtime...

Hi There, I know you can apply Permissions for Applications on it's manifest.xml file. What I want to know is, can those Permissions be adjusted by the Applications on the fly? Here's my reason: say I have an application that is allowed to do "x", "y", and "z" (SMS, sockets, etc) Permissions. Now lets say I have a logical "user" that c...