android

Do I need to bother deregistering my phone state change listener if it's tied to a service and the service terminates?

The situation is that I have my listener constructed using an anonymous inner class, as is typical, but the way of deregistering a [PhoneStateListener][1] in Android requires me to pass the listener object to the this same function that I used to register it, but use the LISTEN_NONE flag. The problem is that I can't do this with an anony...

Force GridView to only a single row?

Is there a way to force GridView to only be a single row? Right now by default it will extend its height to accommodate all views supplied by its adapter ...

android 2.2 sms receiver wont work

Hello, guys. I am new to android and i am using android 2.2 for some sms_receive thing: when an sms received, just a notification. but it won't work... Nothing happens when sms received, seems like the receiver has not been registered. help! Here is part of the code and xml. androidmanifest.xml <uses-permission android:name="andr...

Import and Append Android Database from SD Card

I have 2 apps, a free version and a paid version. Each version allows the user to backup their database data to the SD card. The databases being saved are exactly the same (i.e. they have the same columns defined). If the user wants to import the data from the free version to the paid version, I can do this easily if the user hasn't sav...

Android ADT Plugin doesn't show up in Eclipse

I'm using Windows 7 and installed the 64 bit version of Eclipse 3.5.2. I then installed the Android ADT plugin, but when I try to configure it in the Windows > Preferences dialog, the Android Plugin doesn't show up in the left pane. Instead I see DDMS. This prevents me from specifying the location of the Android SDK (unless there is a...

Is it possible to mock the sqlite3 Cursor in Android when no db or table exists?

I am using a ContentProvider for caching results from a web-service query. It is an HTTP request and the response content is XML. Most of the data is cached, so I simply query the DB, if not found, request from webservice, insert in DB and requery the DB. Thus the response is always a Cursor from SQLiteDatabaseHelper. I have one resu...

What's the point of FILL_AND_STROKE?

Android newb here, so I'm trying out the android graphics classes. I wanted to draw some arcs/circles with a fill color and black outline. The Paint class has a style for FILL_AND_STROKE, but there doesn't seem to be a way to set the fill color vs. stroke color. So as far as I can tell it's the same as FILL? So what's the point of FILL...

Uploading sdcard pictures to mysql from android phone

Hi, I'm try to let user to choose their profile picture from their SD card and uploading it to Mysql server as BLOB using php. Need some tutorial for the uploading part no luck on google Thanks ...

I want to prevent android phone from going to sleep using my code?

I want to prevent android phone from going to sleep using my code? How to do that please help. ...

I want my android application to be only run in portrait mode ?

I want my android application to be only run in portrait mode ? How to do that? Please Help. ...

1=1 in a managedQuery

Hi guys, new to android/java programming. Quick question. In php/mysql I use 1=1 a lot when building dynamic select queries. It saves some extra steps (i can append AND onto each part of the select query and finish it with 1=1). Doing this with managedQuery gives me an empty cursor when querying the calllog. Is this something managedQuer...

Insert gzip files into android device

Hello In my android application i want to load a gzip file along with my application into device. I tried placing it in /data/data/mypackage but its not getting loaded into the device. I also tried placing in raw folder but still not working. Is there any way that i can get this done? Please share your valuable suggestions. Thanks in ...

Android handling out of memory exception on image processing

Hi all, This is the sequence part of this question: http://stackoverflow.com/questions/3674441/combining-2-images-overlayed so the problem is: if the image size is too big - it'll got an exception (out of memory exception) what i want is, to handle even if the handset got the lower spec hardware, it doesn't go to that exception (but it...

deleting/closing current tab

Hi, Is there any simple way to close the current tab or single tab in androids? I don't want to do clearing all tabs and adding the required tabs? Please suggest me. Thanks in advance. With regards Kavya ...

The cookie value shows, but doesn't get logged in - WebView inject cookie

Hello! I have trouble passing the cookie into the WebView inject. I know how to inject the cookie. When the cookie is injected I want to display a member.php and this page requires a cookie. It shows me the error page even if I've injected the cookie. The WebView are correctly loaded and I've tried to set a cookie using the CookieManage...

Customising context menu

Is there a way to change the context menu look and feel? I want to add my own background, list item seperator and maybe the selector as well. I want to change it in famework so that i will get the customised menu every where i will use it. Can someone point me in the right direction? As far as I could make out - Context menu is just an ...

Going to home screen Programmatically

I want to go to the home screen programmatically in android when the user clicks on button. How can this be done? ...

how google map draw on canvas in android?

hey guys, can anybody tell me or send me some links if there is any..which tells how Google map draw on canvas in android. what is the logic behind that. any help will be highly appreciative. thanks alot ...

My preferences aren't 'sticking'

I'm trying to create a settings section for my app. I have a res/xml/settings.xml: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt; <ListPreference android:key="numberOfYears" android:title="Number of Years to Read the Bible" android:summary="Ho...

Load and modify xml file in Android

I have an xml file which will be in either assets or res folder which i need to modify by adding some values and then i need to convert the xml into a string to be sent as part of a soap request. What would be the easiest way to achieve this? ...