android

Prevent application requiring LED or camera flash from Android marketplace

Is there a particular flag that we can use to prevent apps showing up in marketplace which require the phone to have a camera flash /LED? Typical apps are ones which make the phone act like a torchlight in dark. I have seen a tag which prevents apps requiring autofocus in a camera from appearing in the marketplace. Just looking to ...

Android uncheck checkbox in CheckedTextView

I have a CheckedTextView which allows the user to check multiple items. I want the user to only select up to 10 items and then prevent them from checking any more items once 10 has been reached. The problem is that im not able to uncheck the 11th item once its been selected. Ive tried TextView.setChecked(false) but nothing seems to happe...

Add option to phone log context menu - Android 2.0

Hello, I would like to program an application for Android that when installed would add an item to the context menu that pops up when you long-press on a call record in the call log tab in the built-in contacts program. Is this possible? If so, any links that could point me in the right direction for the required code to add my option ...

Convert a double to a SQL-friendly string on Android?

My open-source Android application uses this in an SQL query: String.format("%f", someDoubleValue); Unfortunately, in some languages the coma is "," instead of "." and the SQL engine does not like it. What is the best way to convert a double to a SQL-friendly string on Android? ...

ViewFlipper caching issue

The views are not cached in a ViewFlipper. Is there a way wherein we can get an image of the view and show it to user so that he sees the Ui as we see on Home scrren(when we swipe the previous view also moves along and when we lift our finger, only then the next view is shown completely.) What I want to do is that when the user starts m...

GPS get inactive after some time

I have developed a GPS application in java.But the gps get inactive after some hour and the symbol of GPS is not shown on the screen.Now the lat long which my application fetched is old. I have to run my app and gps enabled until application is not closed explicitly. How i can do this??? Is anyone has an idea about this... Please help ....

Android View.onDraw() always has a clean Canvas

I am trying to draw an animation. To do so I have extended View and overridden the onDraw() method. What I would expect is that each time onDraw() is called the canvas would be in the state that I left it in and I could choose to clear it or just draw over parts of it (This is how it worked when I used a SurfaceView) but each time the ...

How to get the html-source of a page from a html link in android?

I'm working on an application that needs to get the source of a web page from a link, and then parse the html from that page. Could you give me some examples, or starting points where to look to start writing such an app? ...

Standard SMS image in Android 1.6+

I'm trying to find the standard Android image used in Android 1.6 for an SMS action. The one that can be seen under contact details that looks like a postcard. I noticed that there was a standard image "sys_action_sms" which looked like a chat bubble in Android 1.0, but apparently that was removed at some point. ...

Android: Serializing video files

I want to send video files from the Android via network to server. How can I serialize video files in Android? ...

Horizontal scroll required(Android)

I have a TableLayout which is in a ScrollView, so I get vertical scroll. But when the columns exceed the screen with, I want the horizontal scroll also. How can I do this? Please help. Thanks, Farha ...

Which permission do I have to add to the manifest to get gps sensor readings?

Which permission needs my application to get access to the location of the user on Android? ...

Clickable LinearLayout not flashing on click

In my Android app, I have a LinearLayout View that contains other views. The LinearLayout is clickable, but when it is clicked, it does not flash orange like it should. How can I get it to flash? ...

I can't send gps values via the eclipse emulator control panel

I try to send gps longitude and latitude to the android emulator with eclipse, but the values seem to never be set. Instead the onStatusChanged method of my listener is called. Edit I send those values through the emulator controls in the ddms view in eclipse. If I send data via telnet I get the correct data shown and the onLocationChan...

Android: new Intent() starts new instance with android:launchMode="singleTop"

I have Activity A with android:launchMode="singleTop" in the manifest. If I go to Activity B, C and D there I have menu shortcuts to return to my applications root activity (A). The code looks like this: Intent myIntent = new Intent(getBaseContext(), MainActivity.class); startActivity(myIntent); However, instead of returning to the...

Preconfigure Android Emulator with location?

I want to run automated tests with location on the android emulator. I can setup coordinates via Telnet, but that means starting up a console and manually configuring the emulator before running my junit tests. Is there a possibility to preconfigure the emulator with a KML file or something like that to ensure that there are always co...

Activating Network Location Provider in the Android Emulator?

Is it possible to activate the network location provider on the android emulator? Maybe with a fake cellid? ...

What is the contract for constructing SlidingDrawer widget ?

I tried to construct SlidingDrawer widget programmatically, but had no luck. The JavaDoc says the constructor needs "AttributeSet attrs" parameter, which is "a specified set of attributes defined in XML". I provided my own implementation of AttributeSet interface, with all the attributes mentioned in JavaDoc, but got a weird ClassCastEx...

Are zlib.compress on Python and Deflater.deflate on Java (Android) compatible?

I am porting a Python application to Android and, at some point, this application has to communicate with a Web Service, sending it compressed data. In order to do that it uses the next method: def stuff(self, data): "Convert into UTF-8 and compress." return zlib.compress(simplejson.dumps(data)) I am using the next method to ...

camera preview parameters of Nexus one?

Hi Any one please help me to solve my camera preview issue. am using a nexus one am setting the camera parameters to 640,480. but its showing force close error my code is as follows public class CameraPreview extends Activity { private Preview mPreview; public static ProgressDialog pdDetail; @Override protected void...