android

Android: How to edit specific record from database in Android Programming (Using Ruby on rails)

At first,I have a database created by using Ruby on rails. I just already implement insert function(HTTPPost) in my Android Application and it's work. But I don't know how to retrieve specific record from my databases and insert it back to specific record in Android (Like edit function in RoR) This is my insert code : private void inse...

What is the most widely used feed-parsing library for Android

I want to make an app which (amongst other things) can parse feeds loaded via the network. Given that the standard Anrdoid + Core Java libraries do not provide a feed parser service and I dont want to write a one myself, can you nominate a Java feed parser which will work on a low-spec Android device. I'm just starting out learning And...

How can I configure how the header of an alert dialog

Hi, Is there a way to configure how the header of an alert dialog looks? It nows has an icon (on the left) with text as title. Is there a way to add view on the same line? Thank you. ...

Android Map Marker-New Screen

I’m new to development, specifically Android. Through tutorials, I’ve managed to display a map with a marker for a building that displays a “toast” box with text identifying that building, when tapped (I fashioned it after the “Noo Yawk” example). I need to display a new full screen with a photo of that building and text describing it, a...

static database class to use with any activity

Hello, I am new to Android, and I haven't developed any app regarding databases on Android yet. So I have a few basic questions. I am after a good database class sample, that will let me to run the CRUD operations. I would like to use it as a static class like: clsDB->Select("select * from clients"); or objClient->Delete(clientid); I a...

Displaying a default date in a EditText widget

How would I display the current date in the text of a EditText widget dynamically at runtime? Thanks patrick ...

Socket not disconnecting when connectivity changes

My chat application connects to a server and information is sent/received by the user. When the connection changes, such as 3g->wifi, wifi->3g, losing a data connection, etc, the socket sometimes stays connected for ages before disconnecting. During this time, it's impossible to tell if the connection is still active, it seems as if mess...

Is it possible to run Java applets in the Android WebKit Browser?

Is it possible to run Java applets in the Android WebKit Browser? If not does anyone know when java applets will be supported? ...

Nexus One - Android 2.1 release, WHERE is the SDK for 2.1?

The Nexus android phone went on sale today with 2.1 Os on them. My friend just ordered two with overnight shipping. I assume that means it will be in his hands tomorrow or the next day. How is it even remotely acceptable that people will have 2.1 in their hands before developers even get to touch the SDK? I already have users using...

Intent to pick an installed application slow in my activity, why?

If you long press on your homescreen and pick to add an application shortcut, you will be greeted with a listview showing all of your instal applications. I needed this same functionality in my application so I copied the intent from the launcher source: Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainInte...

Clickable view / onclick: Correct approach to make View clickable?

hey! The following code will make the View clickable, but I am wondering if this is the correct approach to make a custom view clickable? Code: public class NodePickup extends LinearLayout { public NodePickup(Context context, AttributeSet attributeSet) { super(context, attributeSet); LayoutInflater inflater = (LayoutInflater) ...

Android, how to stop reading getView() function again, if the content is already downloaded in the ListView

Hi, I am a newbie Android guy. I have a ListView displaying images on every element of the ListView, It works fine... but when I start to scrolling I have realized my image is downloaded again if it is displayed in the screen of my phone device! How could I stop reloading the images or all the content of the in ListView again? Or how...

Broadcast receiver for ACTION_UP of the camera button in android

Hi Samsung Galaxy, Android 1.5. I'm trying to detect when the user releases the camera button. I have a receiver that gets the ACTION_CAMERA_BUTTON intent and examines the EXTRA_KEY_EVENT that comes with it,using the following code (in the onReceive() in the receiver) @Override public void onReceive(Context context, Intent intent) { ...

view on press onpress: Change background color on press? How do I show that the View is being pressed?

Hey, I have, for the time being, a custom view with a 9-patch image as a border. That custom view is placed three times in a LinearLayout, so it looks like this: +------------------------+ | CustomView | +------------------------+ | CustomView | +------------------------+ | CustomView | +------------...

Reverse Location.distanceBetween()

I have a location with latitude and longitude and want to get a new location that has a distance of x meters from that location at an angle of d degrees. This would be the reverse of Location.distanceBetween(). Is there any Android API to do that. I know that I could program such a function myself, but I wonder if there is an API for it ...

Sending a serialized object from Android to a servlet using HTTP client

Hey guys I have tried to create a android application that sends a serialzed object from the phone to a servlet the contents of the object is the input from the user which i will store in a database using hibernate. I believe the problem is around the serializing and deserializing of the object the code is below. If anyone could help i ...

Alignment of items in row when using TableLayout

Im trying to figure out how to line up items in each row of a table (TableLayout) - ideally I want the center of each cell to line up horizontally. The documentation isn't very clear on what's possible with TableLayout. Each cell has a different view widget so I thought a tabular layout would work well but they are all different sizes an...

How can I get primary email address of a contact

HI, I am able to get the contact cursor using the following: Cursor cursor = context.getContentResolver().query(People.CONTENT_URI, new String[] {People._ID, People.PRIMARY_EMAIL_ID}, selection, null, null); And then I try to get the actual email address using: String emailID = cursor.getString(PEOPL...

stateful drawable not finding other drawables

When creating a stateful drawable, I cannot find the other drawables (9-patch images) that are there - i get no "suggestions" ("intelliSense"). But if I try to find drawables in another XML-file there is no problem. this is my stateful drawable <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/...

Android wallpaper/background dimensions

Which are the default dimension of the Home wallpaper/background for the various Android screen configurations (small, normal and large screens with low, medium and high density)? Are 9-patch PNG files supported for the wallpaper? Should I be using these instead? I found a method in API level 5 that gives you the minimum size of the wa...