android

Is it possible to have a Button with a background image with text on top?

Title says it all: I need button that has a replicated background pattern and normal button text on top - how to specify this in layout XML? ...

Independent program

I need to install a program on the Droid. I can get it onto the memory chip. I can't get the droid to find it. TIA. ...

Can't seem to download the tiles for my map application

Hi there, this is my first question and I've been messing around with android for just a couple of days now. The problem arose when I tried to follow an example code to experiment with the MapView class (http://developer.android.com/resources/tutorials/views/hello-mapview.html). I installed the Google APIs add-on in my SDK and did ever...

Android: Get an instance from a service running

Hi, i have a service running in background. I start it from an Activity, but i want to recovery an instance of that service from other activity (in the same app) in order to call one method. Is it possible? Thanks ...

Way to store a large dictionary with low memory footprint + fast lookups (on Android)

I'm developing an android word game app that needs a large (~250,000 word dictionary) available. I need: reasonably fast look ups e.g. constant time preferable, need to do maybe 200 lookups a second on occasion to solve a word puzzle and maybe 20 lookups within 0.2 second more often to check words the user just spelled. EDIT: Lookups...

Re-use previous activities?

I have activities that are create and launched from menu options. However Ive noticed that this may mean that sometimes there are two or more copies of the same activity. So Im wondering if there's a way to see if another activity is already instantiated and then have the application switch to it or create a new one if its not instantiat...

gdb Input/Output error remote debugging to Android

I'm trying to debug an android app that call native code to do some GL rendering. The native code is existing code that I'm trying to port (and that I don't really know that well). I've got the existing code compiling, linking, and installing correctly, and I've got some native functions that call in to that code that are being correct...

Class structure for a ContentProvider having multiple sub tables

The ContentProvider doc says to make ONE entry in the AndroidManifest for your ContentProvider class. If your class supports multiple sub-tables then there must be one CONTENT_URI constant declared for each. How? You can't do that unless you sub-class for each sub-table. Why not just have multiple providers? Do you implement the sub-tab...

Android: running a thread in background

Hi, is there any way to leave a thread in background when i close the app in android? I read about a Service but implementing it is too much than i need. Thanks ...

Determine a device's screen format / bpp (bits per pixel)

I'm trying to optimize Bitmap drawing so I'd like to create Bitmap's in the devices native format (my assumption is that they will blit faster this way...?) How can I determine the device's format? Actually the Bitmap.Config is what I want. thx ...

Android ImageView.setImageURI scales image

I have a view that I am drawing to a bitmap, saving to disk and then putting in an ImageView via setImageURI. However, when the image is displayed in the ImageView it is not being shown at the correct size. It is about 1/3 smaller than it should be. I'm guessing that this is a density issue, but I can't figure out what's going wrong (my ...

How to get rid of the extra gap between a button and other views?

When I created a button view, Android always create some extra space between this button and other views below it. In this example below, there is a button above the second button. You can see the gap between these two buttons. How can I get rid of this gap? Thanks. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="ht...

Serializing list to file

Hi, I would like to ask for your advice, I have a list of items which r binded to database, and i want to serialize those items(through my database) to file, and in the future to deserialize them. now as we know, i have to go through all the rows in my database and create new object to each row and serialize the "object packadge" to the...

How to pass complex data structures (example: a vector with many elements) between service and the remote binder?

Hi, The object passing between an Android service and the remote binder is happening through serialization of the object. If the service needs to return a very large collection, it seems very inefficient to use this. What is the recommended way to deal with this? Thanks. ...

Android: How to make game asset files readable from c++ code using ndk

I am creating a game using the irrlicht c++ 3D graphics engine port to android platform. The graphics engine is written in c++. I need to be able to load meshes and textures etc from c++ code. My current plan is to place all the game asset files in either the res/raw directory or the assets directory then on startup copy these files to t...

execSQL SQLiteException near "?"

Why doesn't this work?? db.execSQL("INSERT INTO PARTIES (PARTY_NAME, PARTY_COUNT) SELECT DISTINCT(PARTY), COUNT(PARTY) FROM ? WHERE (Year=?) GROUP BY PARTY ORDER BY PARTY ASC", new Object[] { "Election", "2004" }); It works perfectly in rawQuery!! ...

android imageview scrolling to display full high quality image

hi friends... i am working on displaying an image and placing an icon on top of it... clicking the icon will show an enlarged version of the image... though putting the imageview holding the image in a LinearLayout scales the image to the width of the dialog, the problem is that i need to display the image in a dialog but the image is ...

Breaking the task barrier

Hi, I have an android app. I added an intent filter to one of my activities, so that if a url is clicked in the browser app, my activity can be launched. Looks like this: <data android:host="www.mysite.com" android:scheme="http"></data> this works well. The problem is that every time my activity is launched from the browser, a new in...

When dealing with WebServices in Android which approach would be better KSOAP2 or Android default HTTPClient

As I am writing a Webservice client to deal with the webservices for my application in android, I am bit confused about the approaches among KSOAP2 and Android default HTTPCLient, Which one would be more relevant to use in Android Suggestions Welcome. Thank you. ...

android menu navigation options

Can you please let me know on various possibilities or best options for handling navigation on android application. Links to sample will be very much helpful, if possible. Its to do the following: Application starts with a splash screen. The splash screen ends to display the following choices: Post a Quote List my Quotes List all Qu...