android

Debug "system_server" on Android PDK using GDB

Deal, I followed "http://pdk.android.com/online-pdk/guide/debugging_gdb.html" to debug android PDK for deep understanding of Surfaceflinger. When I type gdbclient system_server in the last step, I got This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf-linux"... _dl_start () at bionic/linker/arch/arm/begin...

Android: How to detect if current stack of activities (task) moves to background?

The official documentation describes tasks as follows: *All the activities in a task move together as a unit. The entire task (the entire activity stack) can be brought to the foreground or sent to the background. Suppose, for instance, that the current task has four activities in its stack — three under the current activity. The use...

Android: When to use Dialog vs. Activity

When is it preferable to use a Dialog box as opposed to an Activity in Android? From my understanding, anything you can do with a Dialog box you can also accomplish with an Activity. Are there any tasks that can only be accomplished by an Activity or a Dialog? ...

Class cast exception when inflating a custom Relative Layout?

I get this exception when I try to inflate 07-22 19:15:39.903: ERROR/AndroidRuntime(3810): Caused by: java.lang.ClassCastException: android.widget.RelativeLayout I have a base class: public class UIBase extends RelativeLayout {} And a more specific class: public class Countdown extends UIBase {} Then I try to inflate and it excep...

How to get samsung moment to connect with adb

I am trying to get my samsung moment (android 2.1) connected to my windows 7 64bit desktop so that I can debug on phone from the netbeans ide. In my phone settings I have Settings > Applications > Development > USB Debugging checked I read that Settings > About phone > Additional Settings > Mass store, should not be checked but I don'...

Stop app name from flashing in title bar

Hi, I made a custom title bar for my app which works. However, when the app first loads, the app name is displayed in the title bar for a moment before my text appears. How do I stop this from happening? I set my custom title bar in my main activity here: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstan...

how to load android samples in netbeans

Is there a way to load the android samples (provided by the sdk) as is in netbeans 6.9 or do I have to piece the project together for the files? ...

Android Question - Please explain Android ID's to me?

I am still trying to figure out frame animation, but I need to use IDs. I don't get it... I get the wierdest errors... <?xml version="1.0" encoding="UTF-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false" android:id="@+id/carrotsmileanim"> <item android:drawable="@drawable/carrotsmil...

How to read the downloaded file in android?

I configure my email in the Android simulator(Default Email configuration in android aimulator 2.1) .And I download the attachment from my mail. I need to read that file in my application .Is there any possibility to read the file in my application. I am new to android. Can anyone help me to solve this ??? Thanks in advance? Note in t...

Android: Trouble with using multiple context menu's

What I have here real simple activity with two buttons. When you press each of them it plays a sound. When i press and hold the first button it brings up a context menu asking the user if they want to save the sound as a ringtone or notification. This works perfectly on the first button. The second button's sound plays when pressed. Wh...

How to empty the logcat buffer in Android

How can I empty the logcat buffer in Android? I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data from the previous launch as well. Even uninstalling the app does not clear the buffer. The only ...

How to use use cmyk color codes in android?

Hi Everybody, I have an doubt, I don't know how to use cmyk colors in android. If any one knows please help me. I am waiting for your valuable replies. Thanks & REgards Niladri ...

android twitter retrieveRequestToken 401 on request token

I am trying the following sample app for twitter oath. http://www.androidsdkforum.com/android-sdk-development/3-oauth-twitter.html private void askOAuth() { try { consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET); provider = new DefaultOAuthProvider("http://twitter.com/oauth/request_...

Android Random Number

I m generating one random card from array. and assigning it.' Below is the code..but its is showing an error. What is the problem? public void rand() { String rank[]= {"tclub1.png", "tclub2.png", "tclub3.png", "tclub4.png", "tclub5.png", "tclub6.png", "tclub7.png", "tclub8.png", "tclub9.png", "tclub10.png","tclub11.png", "tclub12.p...

No data shown on listview

Here is my Arrival.java package one.two; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public class ...

OpenGL in Android for video display

Is it possible to use OpenGL to display video and be able to resize the view in runtime? ...

Calling the date time , without initiating the dialog box of Datetime control

Hi all, I am basically using a datetime control in my application. Wherein on a click event i am initiating datetime dialog. In another scenario, i want to move current date, to next day, or previous day. I don't want the dialogbox of date time control to be displayed. Is it possible?? ...

Read mail Attachment files in Android2.1 ?

Hello all. I configure email by using the android2.1 emulator. When I download the files from mail attachment I get the path content://com.android.email.attachmentprovider/1/1/RAW I need to read that file data. How to read the data from the device.?? Is there any permission to read file from the phone memory. My code is here: intent =...

lmx file format in android

Hi, Is Android capable of recognizing the lmx file format for a landmark when it receives one by e-mail ? Can it react to this by opening google maps , or other application ? ...

How do I set Layout and Text size to DP inside program?

Basically I have this inside XML, but I have to recreate it inside a code. How do I do it? <EditText android:layout_width="140dp" android:layout_height="20dp" android:background="@drawable/input_bg01" android:textSize="10dp" android:gravity="center" android:text="111-222-333 FOOO" /> ...