android

Android: SMS filter - Can you have priority listener for SMS messages?

Hi, I am trying to implement an app that will only listen for a certain header in the SMS. (Parse the sms message and look for some header) That's not hard to do. The problem is once the app finds the header and knows this SMS is for me, I don't want other app(that has broadcast listener on SMS) to receive SMS. (for example, 'messages' ...

Is there a good reason for a ListView header taking up a position?

I've just added a header to my ListView and I have to change a bunch of code because the header essentially becomes position 0 (Meaning the Cursor indices of my CursorAdapter do not line up with the indicies of the list. They are off by 1 now). Why? This seems a bit silly to me. The only reason I can come up with is that a developer ...

android geocoder---nothing is displayed on screen whenn the i run the application

i have written the code for geocoding..but unfortunately it does not work ie nothing is displayed on screen...i am attaching the code...can someone please tell me what is the fault in the code..thanks public class geocoder extends Activity { // private TextView output; private LocationManager mgr; /** Called when the activity is ...

Why does createScaledBitmap cause colors to change?

When I run the following code: Bitmap scaledBitmap = bitmap.createScaledBitmap(bitmap, 32, 32, true); my bitmap goes from white to black. My question is, why would this happen? Does scaling disturb the bitmap's transparency? ...

How to change the color of the an item of a spinner's select list ?

Basicly i want to use first item as a "select one" message but i want it look different than other items on the select list. I am using getView but it is only changing the color when the item is selected.On the select list(when i click on the spinner to select an item) it does look same with others ! ...

Can I draw outside the bounds of an Android Canvas

I'm porting an app written in a graphics environment that allows drawing to happen outside the bounds of the clipping rectangle. Any way to do this in Android? ...

How to stack Multiple Sliding Drawers in Android

I was wondering if anyone knew how to stack sliding drawers so that it would look like this: So that when a sliding drawer collapses, it falls onto the next ones handler. I am almost able to get this effect by making the sliding drawer the size of the handler, but I dont see a way to programmatically change the size of the sliding dra...

Is it possible to change the color of the notification bar?

The iPhone gives the app the ability to change the notification bar's color so you can have it match your app's design without having to hide it completely. Is there a way to change the notification bar color in Android? I'm looking to have it force black with white text to be less visually present while using the app, but still there....

Can phone apps detect what phones around them are running the same app?

I would like a cell phone app to be able to determine how many cell phones around it are running the same app. I'm not sure what direction to start researching (API's,concepts) to understand how my phone would figure out what other phones are running the same app in a specific distance. ...

Convert Degrees Minutes Seconds coordinates to decimal in Android

I have a database with coordinates in Degrees Minutes Seconds format, is there any way to change them to decimal coordinates using Android built in function or is there any simpler way to show such coordinates in a mapview ? ...

Android program crashes when I call a class from another java file

Hey there, I am new at android development and java programming, but I have decided to program a drinking game app in android. This app basically simulates a deck a cards, a player clicks a button to draw a card then based on the card thats drawn the player plays a drinking game (ie takes 1 drink, takes 2 drinks...ect). I have the ma...

How would I set an ImageButton to change only when my finger is touching it.

I want to create an event to change what my image button looks like, but only when it is being pushed down. So far I have been using an onTouch listener, but that just changes it permanently. I can't find anything like an onKyeUpListener() type of thing for the button. Does anything like this exist? SOLVED final ImageButton button...

Why is Location manager's minimum update time overridden when location changes?

I'm developing a mapping app using Eclipse 3.5. I'm setting the minimum update period with the LocationManager's requestLocationUpdates method, via a configuration activity. When I set the property I see in Logcat that the system process sets the value OK. When I actually send a new location from the DDMS emulator control and the locat...

How to clear a notification if activity crashes?

In my app, I'm creating a notification with the FLAG_ONGOING_EVENT flag set as such.. Notification notification = new Notification(iconId, text, System.currentTimeMillis()); notification.flags |= Notification.FLAG_ONGOING_EVENT; I'm cancelling the notification in onDestroy, but if my app crashes before calling onDestroy, is there an...

changing EditText

When I change the layout_height of an EditText field in Android, the nice looking gradient becomes a hard gray line as you can see here: Is there a way to either fix or disable this gradient? thx Ben ...

Read data from a txt file without downloading it?

I want to parse information out of the text file this serves up: http://finance.yahoo.com/d/quotes.txt?s=GOOG+YHOO&f=sak2 Is there a way to do it within an app without downloading the file first? Somehow stream the text content? ...

Android Custom ListView selected item children?

I have a custom listview row that contains a number of textView components. Instead of the "standard" single text item, I have created a item where each listview row contains several bits of information. For this example, I have a record id, a name, and a description for each row in the listview. I have my listview populated via thi...

Android - How to sort list

I have a list that i fill with data from a database, and now i want to sort this data by title and date. Im still new to programming for Android, so cant figure out how to do this here, hope someone can help. Here is how the list is filled: public void fillData() { // get all the data from database DBAdapter db = new DBAda...

Can someone explain how TrafficStats works it's magic in the Android OS?

I've written a nice little Android app to check data usage, unfortunately it relies heavily on android.net.TrafficStats which was introduced with Froyo (Android 2.2). I'm attempting to back-port this class for my non-Froyo users, and what I'm able to determine from the Android source is: TrafficStats.java is just a native pointer to a...

How to keep FTP connection (or any connection object) alive between activities

Hey, I'm coding a very basic FTP client on top of my application and I have 2 activities. The first one is the file explorer and the second one is the image viewer. Once I click on the image filename on the explorer, I want to pass the connection to the other activity to handle extra stuff. Basically, I want to keep the same org.apache....