android

Put any View over a VideoView in Android

It is possible to put any view over a VideoView? (I.e. put the control buttons over the video, like in vimeo). I'm trying to do it using FrameLayout, but I have not found the way, and I'm still not sure if what I'm trying to do something that's is simply not possible. ...

Flurry Error Reporting for Android

Is there anyone using Flurry to generate reports for uncaught exceptions that could post some sample code on how to do this? I don't see any example via Flurry themselves, and though I've seen code samples of custom exception reporters, I haven't seen a simple example of how to implement the basic error reporting just using Flurry. Tha...

How to bind more then one column to a textview

I am curious if there is a way to bind more then one db column to a resource. I need to bind more information to R.id.secondLine then just the difficulty column. But I'm unsure how to go about this? I'm currently subclassing SimpleCursorAdapter. Should I subclass another adapter? If so How to do I go about it? Cursor activityHikes =...

Android - Getting audio to play through earpiece

I currently have code that reads a recording in from the devices mic using the AudioRecord class and then playing it back out using the AudioTrack class. My problem is that when I play it out it plays vis the speaker phone. I want it to play out via the ear piece on the device. Here is my code: public class LoopProg extends Activity ...

Android: How to do something after user clicks on my EditText

I have an EditText that shows time. After user clicks the EditText I want to show a TimePickerDialog, so I set a View.OnClickListener to my EditText. But the OnClickListener is behaving wierdly - I touch the EditText and then software keyboard appears (which I don't want). When I touch again, OnClickListener.onClick() is finally called a...

Loading an Alert Box from a Thread when the activity has gone away

I have a comment activity that loads a Thread and sends some data to a server, the activity is immediately finished once the submit button is pressed. The user is then free to do other things in my application. When the server response an AlertDialog is shown. The problem is that since the initial Context has been destroyed, my applic...

Where definitions in public.xml are linking to?

Let me explain with example... Consider 'android.R.layout.simple_list_item_multiple_choice'. It used to create multi-select lists. But the only definitions I found: /platform/frameworks/base/core/res/res/values/public.xml: <public type="layout" name="simple_list_item_multiple_choice" id="0x01090010" /> /platform/frameworks/base/api/c...

Android: AutoCompleteTextView - how to customize sort order

The normal way how AutoCompleteTextView shows suggestions, is that it shows only strings that begin with the text the user entered, but the sort order of the results is undefined. Can I somehow sort them by myself? So that when user enters e.g. "g", I show him results beginning with "g" that are most relevant for him. ...

android:layout_gravity doesn't work as expected

I have a simple LinearLayout with one TextView and one ImageView. I want the text in the TextView to be aligned to the right, but the result show that the Text was aligned to the left. Is there anything wrong with my layout xml? Thanks. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/re...

Streaming Video (or Progressive Download) to the Droid Browser

I am trying to stream video (or use progressive download) to a Motorola Droid Browser and am not having a lot of luck. With my iPhone, I can direct Safari to http://xxx.xxx.xxx/FileName.mp4 (which is an MPEG-4 video file), and Safari opens quicktime, and the video plays. However, with the Droid, I go to the same web address and am face...

Highlight Text in TextView or WebView

Hi is possible to Highlight text in a TextView or WebView???? I see is possible in a EditText HIghligh text in a EditText I'd like to do the same in TextView or WebView thats Possible??? Alexi ...

ContentURI cannot be resolved to a type

I am trying to follow an eclipse and android tutorial from ibm. The source code from the tutorial is giving me an error that says ContentURI cannot be resolved to a type.. here is the source code line... ContentURI theContact = new ContentURI(android.provider.Contacts.ContactMethods.CONTENT_URI.toURI()); eclipse wanted me to fix it b...

newInstance failed: no <init>

I cannot instantiate a sub activity. In the logcat I see this line: 01-22 15:14:38.906: DEBUG/dalvikvm(411): newInstance failed: no <init>() This is the line in dalvik that generates that logcat. /* * public T newInstance() throws InstantiationException, IllegalAccessException * * Create a new instance of this class. */ static v...

How to center a ImageView vertically in its parent?

My layout design is a TextView with long text and a ImageView to the right of the TextView. I want to center the ImageView in its parent vertically, so I used android:layout_centerVertical="true", but it turned out that the ImageView was aligned to the bottom of its parent. If I don't use layout_centerVertical property, the ImageView wil...

Permission to write to the SD card

I would like my app to archive the application DB to the SD card. In my code I check if the directory canWrite(), and if not then throw an IOException. In this perticular instance, I am trying to copy the db file to the root directory on the SD card, but its throwing an IOException. How can I change the permission on a folder/file to be ...

Weird Home button behavior

Hi all. I'm experiencing kind of strange behavior of my application after hard Home button is pressed. When you press Home, everything is OK - my app goes to the background, showing Home screen. But if you try to choose my app in the main menu or in the list of last tasks it behaves like it was not started before and does not show the ...

Best Approach to write a FaceBook application for Android

BackGround: There are Facebook APIs(and SDKs) available to develop applications for other Mobile devices like iPhone, BlackBerry etc, but it seems there are no official ones for Android(?). People have ported Java APIs to work on Android and have written FaceBook Client applications(FaceBook dev: Wiki Page). Apparently, there is also...

Open a project in Eclipse

I'm completely new to Eclipse/Java/Android programming, so this might sound like a dumb question, but I can't open the project I was working on last week... it's the "HelloWorld" project. I'm very familiar with Visual Studio so I've been looking for something like a project file/solution or a way to open a directory in Exlipse, but I'm ...

How do I set the rounded corner radius of a color drawable using xml?

On the android website, there is a section about color drawables. Defining these drawables in xml looks like this: <resources> <drawable name="solid_red">#f00</drawable> <drawable name="solid_blue">#0000ff</drawable> <drawable name="solid_green">#f0f0</drawable> </resources> In the java api, they have thr following method...

how to access all ringtones list in Android phone?

Hi, I am new to android development and i want to access the ringtones list. How can i access ring tones list? At later i want to add/ remove ring tones to library? Is it possible? Thanks & Regards, Jim. ...