android

Android - how do I place an image on top of my existing layout through code?

Hi I have a layout in which I am displaying a webview. I want to add images on top of the webview at specific places through code. Can some one please tell me how to do that? The translucent background example in API Demos makes the view cover the whole screen. I want to place only a small image and at a specific location (origin not ...

Android schema

hi, In java there is class SchemaFactory which is used for schema validation but it is not available in android is there any other option available ...

Android - stopping NEW_OUTGOING_CALL events from looping?

I have a BroadcastReceiver catching ACTION_NEW_OUTGOING_CALL events. In the onReceive() method I'm sending the supplied number to a new ListActivity, where the user gets to choose various new destination numbers from a list. When the user selects a new number from the list I'm then starting a new ACTION_CALL intent with the new number ...

Android: Track number of objects created

I'm porting a game to Android (there's a lot of code and very little of it is mine), and DalvikVM is telling me (through LogCat) all about the garbage collection. At some point in the code, I get a stream of "GC freed x objects / x ms" messages, basically informing me that ~150,000 objects have just been deleted and it's taking a full se...

Android: How do a display a large animated gif given a url?

Suppose I have the URL for large animated gif and I wanted to make a youtube like activity that displays the animation in a streaming way. How do I stream in the image? get it do display with actual animation? I know ImageView is not the answer as it only shows the first frame. A bonus would be having access to its buffering sta...

android: ORDER BY in query

I've got an android app using a local sqlite database. private SQLiteDatabase mDb; when I run this query I get my Cursor over rows with pid equal to id, as desired: mDb.query(true, PT_TABLE, new String[] {KEY_PID, KEY_TID}, KEY_PID+" = "+id, null, null, null, null, null); when I run the following query, aiming to get that same...

Android - change custom title view at run time

Hi I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt. But if I try to update any items in the custom title (say change the text of a button or a text view on the t...

Technology to write iPhone, BlackBerry and Android phone at the same time?

Is there a strategy or at least best practice to write an app that runs on iPhone, BlackBerry and Android? I'm ignorant about the development environments for BB and Android, but I assume they both support Java apps. I know that the iPhone would require an ObjectiveC portion (as well as a whole new UI). Has anyone done this? ...

Android: Recent apps seem to have Google-provided ads, is there some new API for this?

Several recent applications (e.g. Shazam) have text and image ads which are handled by Google. I can't seem to find how they did this. Is there some new API that you can use to display ads given some key, similar to how the maps API works? Or is this something that developers individually negotiate? Specifically I'm interested in Goog...

Is there a way to to create a custom answering machine in android ?

I'd like to create an app that allow you to filter incomming call to various answering message with : "this number is not available" for black listed phone numbers A formal message for strangers A informative message about what your doing for friends I don't know I you can get automatically a call, play a recorded message then wait f...

Is there a way to phone somebody and play an audio file in android ?

I would like to create an ermergency call application : if triggered, it calls a given number and play an audio file, giving the information the caller couldn't give himself. For that I need to engage a call but ensure that I can replace any sound from the speaker with an played audio file. Can I do that in android ? What's the way ? ...

Is there a way to raise the backlight on an Android device through the official API?

What I've read seems to indicate that the only way to do it is to use unofficial APIs that are being locked down in Cupcake (1.5). Is this true? ...

Is there an accepted best-practice on making asynchronous HTTP requests in Android?

I've seen any number of examples and they all seem to solve this problem differently. Basically I just want the simplest way to make the request that won't lock the main thread and is cancelable. It also doesn't help that we have (at least) 2 HTTP libraries to choose from, java.net.* (such as HttpURLConnection) and org.apache.http.*. ...

Flash support in Android

I am planning to port a flash player to Android OS. Presently Android is not supporting the Flash. I have looked into GNash, an open source flash player but the problem with this is that it is not supporting the latest version flash files and we can't open the youtube with GNash. Are there any open source light-weight flash players whic...

Android: Can not change the text appears in AlertDialog

Today I faced a very weird problem. In my game I create AlertDialog to show the user next level challenges when one is succeeded. So, the corresponding code is like this. when the game is succeeded showDialog(R.id.display_success) is called and the following code is executed. So, I am expecting to execute this code in every call. Howeve...

Visualizing Java project

I have been tasked with porting a large Java codebase to the Android platform. The project makes extensive use of AWT which isn't' supported on Android. I'm looking for a tool that lets me visualize all of the classes in the project. I'd like to be able to see all of the relationships between classes so that I can get a good idea of w...

Android core library error

hi, When i am including the jaxp jar file i am getting the error as follows trouble processing "javax/xml/XMLConstants.class": [2009-05-08 16:53:18 - TestProject] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine in...

Android project using Ant

I am using ANT to build android project ,I am adding external jar in the lib folder and trying to build the project it builds perfectly but i am getting run time error ...i have seen some groups they have said that the build.xml has to be modified with these changes <target name="dex" depends="compile"> <exec executable="${dx}" fa...

Wordpress database access in mobile applications

Hi I am new to wordpress and I want to create an interface for being able to access my database hosted on wordpress in my mobile applications - particularly iPhone and Android. As these do not directly access SQL databases and would need routines on the server-side for being able to do so, what would be the best way for me to go about ...

How do I find out if the GPS of an Android device is enabled

On an Android Cupake (1.5) enabled device, how do I check and activate the GPS? ...