android

How to perform an action when a text message is received?

I'm working on an Android app that will send an automated response every time a text message is received. I looked around a bit on android's development site but haven't had anything that points me in the right direction. Does anyone have any ideas on where I should start with this or have any good links that might help? I am a total ...

Desperate Help Needed on media recorder

I'm trying to create a simple camcorder application using mediarecorder and have spent 12+ hours trying to get it to work... its been frustrating as all hell. I've searched all over for the solution and attempted to use multiple pieces of sample code but still can't get it to work. The program keeps crashing and I get errors when I call ...

Android - Return to calling Activity

Newbie Question from an iPhone developer. I have called the startActivity(intent) and the new activity loads. How do I go 'back' to the calling activity once a button is pushed. 'Popping' the activity off the stack basically. ...

Android: the three phone states

Why when a call is answered idle is not called after it finishes? I cannot figure out for the life of me how to detect the end of an incoming call. Idle works fine for missed called, but subsequent to an answered call seems like a mysterious state. Anyone know how to detect the end of an incoming call? ...

Best way to join tables using sqlite in android.

I am trying to find out the best way to do a simple table join on my two tables using a sqlite database in an android application. Is the simplest way to use CursorJoiner or is there any easier way? ...

Open file which is stored in SQLite as blob.

As the title, I create a ByteArray to store the file in blob like this: byte[] red_buf = myCursor.getBlob(1); But I don't know what's the next step to open the file :( ...

Android: java.lang.IllegalAccessException when attempting to use a custom "Application" class

I'm trying to create define a custom Application class as follows: create an empty subclass of Application called MyApp in the manifest, specify android::name for my application: <application android:name=".MyApp" ... However, when I attempt to run my app, I get: java.lang.RuntimeException: Unable to instantiate application com.test...

Android: are external activities launched in a new process or current process?

When you launch an external activity (from another app), is the new activity loaded in the existing app's process or does Android spawn a new process corresponding to the other app? ...

Android::Creating a draggable elastic ball?

I created a custom view loading an image of a small ball. So that the onDraw method would look like this: public void onDraw(Canvas canvas) { canvas.drawBitmap(...); } Later, I added an onTouch listener to be able to listen to touch events to enable the ball to be dragged around. public boolean onTouchEvent(MotionEvent event) { ...

How to detect touch events in Android

New to android so please bare with me here :-) Is it possible to detect all touch events in an Activity and capture it and then in return pass that pass event to another View. For example: Button 1 and Button 2. When Button 1 is pressed I want to capture that touch/click event and automatically pass that touch event to Button 2, basica...

Android: What is the starting point for animations?

I am at a stage where I can understand and write a decent Android application. At this stage, I am still not comfortable with SurfaceHolder, Canvas, View invalidate() etc. I don't have a CS background so I must've missed these from a CS Graphics course or something. Starting directly with Android seemed like a bad idea because there ar...

Android Expandable lists having multiple child items in a single row and their onClick event

I could not figure out how to implement two basic functionalities with the expandable lists: 1. The onClick for the child 2. Using linear layout for the children, so that I can have multiple clickable items in same row under the parent item Can somebody help me with some sample code for the above? ...

canvas.drawText question

i am drawing text in my custom view in android using canvas.drawtext. i need to change back color, and want text right aligned. for example i want to print the text in a 10, 10, 100, 20 rectangle of color yellow and text color red and right aligned. how can i do that ? ...

get the address of file created using FileOutputStream in android

I m creating one text file at run time using FileOutputStream and i want to send that file through email...... emailIntent.putExtra(android.content.Intent.EXTRA_STREAM,Uri.parse("............")); Here i want to pass the path of file.....so how to get the path of that file which i m creating...?....plz reply ...

Good Android based IDE for developing Android apps

OK, there is at least one, arguably more, PC based IDE for developing Android apps. But now that Android based tablets are becoming common, what's a good IDE for developing Android apps - in Android? Edit: I'd be more than happy to use Eclipse if it runs in Android ... or Netbeans, although that seems less likely? Reason for the qu...

Dynamic rows creation

I would like to create a dynamic row like one shown below: |- - -| title | img | date |- - -| priority How is it possible ? I am able to create one in a straight row. But I'm not getting how to do something like this. ...

how to get the telephone number in real device

hello,i want to know get the number of device by telephoneManager and getLine1Number() ,it is workly well in analog machine,but in real device i donot get,could you tell me why? in the com.android.internal.telephony inlude getLine1Number() ,how can use the inner class? ...

Can I save SharedPreferences to file so I can have multiple instances of the prefs?

I love how SharedPreferences work in android and I would like to know if there is an easy way to save them to another file so I could load a previous instance of the prefs and vice versa. Basically when you load this file, all the preferences would change to how you had it before at once. I want to be able to swap 3 or 4 different vers...

how to check current running applications in android?

dear friends, i want to check current running applications in android programmatically same like it shows 6 applications if we press and hold HOME button. actually i want to check application names. any help would be appreciated. ...

Detecting click event on listview control in android

Hi all, I have an application to be developed in android. It has two tabs in it. I am using tabactivity to achieve the same. One of the tab, consist of listview so i have extended listactivity. But now the problem is, how can i get the click event notification on listview. At the same time , whenver there is a change event in tab,i sh...