android

How to run CTS tests in android(Eclair)?

In order to release a device to the market, You need to run the Compatibility Test Suite given by android...I need to know how to download and run it.. ...

What's the best way to save and restore a MapView in Android?

I have a MapActivity that contains a MapView with some custom controls, state information, and an ItemizedOverlay composed by some locations that I draw using the default approach (using populate(), super.draw() and createItem()) and by some lines that I draw in the overrided draw() method. So, when the activity is paused, I have to sav...

SearchManager display another icon instead of the magnifier

How can i change the icon on the right of the search manager? The default icon is an magnifier, but i've seen a app that does display instead of an magnifier an "OK"! For my needs the magnifier icon is not so good. I use the SearchManager to display the history of typed words. So a better icon is OK instead of a search icon. ...

Is there a way to restart a service after upgrading the application on Android?

After upgrading my application I would like the service to restart if it was running before. Is there any way to do this? I didn't see any Broadcast Intents that I could register for in the manifest. ...

Building specifically for HTC phone

Greetings, I am trying to generate android platform specifically for HTC Hero. I have followed the instructions described and built from trunk (I suppose): http://source.android.com/download http://source.android.com/documentation/building-for-dream The problem is that there is no 'extract_files.sh' script. So what is the proper proced...

Sharing code among Android applications

I'm trying to come up with a best practice for sharing code among a group of Android applications. For example, suppose I have a content provider that I want to access from several Android applications. I'd like to have a class that contains static members for content URIs, column identifiers, etc. This class would be shared by the conte...

How to Generate Android Testing Report in HTML Automatically

I would like to automatically generate unit testing report in html format for Android application on Hudson continuous integration server. Therefore, I try to run test cases first and gather test result files in xml format. Then, I use JUnitReport Task to transform the XML result files into HTML format. I run test cases through Androi...

To store and retrive from sqlite file ( android programming )

I am using ganymade eclipse 3.4 IDE and android sdk for development . I am trying to store static database file with some values on it in sqlite format . how can i add this file into the IDE and fetch the data from that file and store it . give me the guidance to do the development . Thanks in advance Sivaramakrishnan (frankshiva@gmail...

How do I use the showAlert method in Android?

I am trying to debug something and want to pop up a message dialog box. Eclipse is telling me that it wants me to "Create Method showAlert(string, string, string, boolean)" I have imported this import android.content.DialogInterface; what step am I missing? ...

How do I use AIDL tool from command line using SDK sample code?

My question concerns using aidl.exe (on a Windows system) from the command line. This question has nothing to do with Eclipse, Netbeans, etc. Included with the Android SDK are the following three AIDL definition files: IRemoteService.aidl IRemoteServiceCallback.aidl ISecondary.aidl located in the following directory: C:\androi...

Is there a way to read transcription of IRC Office hours somewhere ?

Hi, tried to attend some of the office hours but there were some problems with the IRC, so it was very difficult to follow the discussion. Are the past sessions recorded somewhere ? It would be great if the "best" topics are summarized and posted, so other people who wasn't at the particular discussion have the knowledge as well. Thank...

DialogPreference shouldn't close if no option selected

I have a DialogPreference and I want to avoid the user from closing it when pressing "OK", "Cancel", etc. How should I do that? EDIT: I tried to reach the OK button to disable when the dialog is created. But I couldn't make it :( ...

Nexus One GL_FRAMEBUFFER_OES Extension... Not actually there?

I'm porting an iPhone app to Android, and I need to use OpenGL framebuffers. I have a Nexus One, and a call to glGet(GL_EXTENSIONS) shows that the Nexus One supports the same framebuffer extension as the iPhone. However, I can't seem to call functions related to the OpenGL extension in my GLSurfaceView. When I call a simple framebuffer g...

Android trace file created but zero bytes long

I am trying to follow the instructions on this page to create a trace file. I can see the file in File Explorer in DDMS and can pull it onto my PC but it is zero bytes long. Any suggestions as to what I might be doing wrong, please? ...

Android - Enabling and Disabling Bluetooth - SDK 3 (OS 1.5) - programatically?

I have written code to enable and disable various things programatically like Wifi, Ringer modes, Airplane modes. All things that you would see in a power toggle widget. The one that I have not found out how to do is bluetooth. It appears that in SDK level 3 (OS 1.5) there is no pretty bluetooth manager class. Has anyone pinpointed a...

android.View transparency

Hello I need to set initial transparency for a TextView but I don't know how to do it. On iPhone it can be done easily with alpha property. I've tried to set alpha using AlphaAnimation but no good it doesn't work. It just returns to 100% alpha when it ends. AlphaAnimation anim = new AlphaAnimation(1, 0.2f); anim.setDuration (5000);...

Android SQLite, ask about ContentValues

Hi, i would like to know if using the class ContentValue in querys is a good practice in order to prevent SQL injection. Thanks ...

Bug Running Android Tutorial HelloTabWidget under SDK 1.5: "setCurrentTag(getIntent())"

does not compile. Indeed: even in 1.5, this api, getIntent(), is already listed as deprecated. The error message I get complains that getIntent() does not return a String, but setCurrentTab() expects a string. If I guess and change the line to read: "tabHost.setCurrentTab(1); // was setCurrentTab(getIntent())", then it compiles, buil...

How to highlight a TextView or LinearLayout when click it?

I have a LinearLayout that contains three TextViews. I want to highlight a TextView or the whole Layout when user clicks on the TextView. Is they any way to make it happen? Thanks. ...

WebView displays black screen

I'm a little embarrassed to post this but I can't seem to figure out where I'm going wrong. I've looked at every example and every tutorial and everything looks right to me. Here's what I'm doing. I have a listview that when you click on an item it will take you to a WebView that displays some static formatted text associated with tha...