android

detect clipping in android TextView

I have a TextView in my android application that has a set width on it. It's currently got a gravity of "center_horitonzal" and a set textSize (9sp). I pull values to put on this label from a sqlite database, and some of the values are too large to fit in the TextView at the current textSize. Is there a way to detect that the text ins...

Android telephone directory

Is there any open source telephone directory application for Android or how can I make one myself? ...

Adding a vertical scrollbar to an AlertDialog in Android ??

I would like to add a vertical scrollbar to an AlertDialog because my text is too long to display on 1 screen: I've tried to use : android:scrollbars="vertical" android:scrollbarAlwaysDrawVerticalTrack="true" but the scrollbars don't even display ? Here's the xml layout file I'm using: <LinearLayout xmlns:android="http://schemas....

Cancel/abort a connection from the ThreadSafeClientConnManager connection pool

I'm using ThreadSafeClientConnManager to manage a pool of client connections, because my application has several threads, which are simultaneously connecting to a webserver. Abstract sample code: HttpClient httpClient; ClientConnectionManager conMgr = new ThreadSafeClientConnManager(parameters,schReg); httpclient = new DefaultHttpClie...

How to use deleteFile() with argument that contains path separator?

Hi, In the application there is deleteFile(String path) method implemented which has to delete the file located at the given path. If the path contains pah separator (char '/') the method throws an exception but to delete a specific file a full path has to be used and it contains a separator sign. Due to conflicting condition I haven't...

Should I use a flat file or database for storing quotes for a random quotations app on Android?

Hi, I am developing an app on Android that will randomly pick and display an inspirational quotation (or verse) from a large collection of quotations. On Android I can choose between a flat file and an SQLite database. The app should satisfy the following conditions: Be scalable to 10^6 quotations and/or verses Be very fast (i.e. re...

How accurate is Android GPS?

I thought I have read somewhere that the accuracy of Android's GPS is about 10cm? Can anyone verify or correct this? Reason being is that my application I am trying to develop keeps track of locations an user has visited and it would help me out tremendously to know the margin of error I can expect? ...

Android FTP Library

I'm looking for a java library library that works on the android that can download and resume files from an FTP server. Does anyone know of such a library. I've found lots of client apps, but no stand alone libraries. ...

How can I capture an image in Android and have it show up in the gallery?

I was capturing images before that were showing up in the gallery, but now they are not and I can't figure out why. Here is my code: ContentValues values = new ContentValues(); values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, false); String name = "ugc_" + String.valueOf(System.currentTimeMillis()); values.put(an...

Android GPS Result Format

I have noticed with testing GPS locations, a value such as -123 might come up on Android as -123.83333336... is there anyway to format incoming GPS locations, such as within 2 decimal points? This way I can store values like -123.83 opposed to longer numeric values. I have checked out DecimalFormat and NumberFormat, these are strings and...

Android always play intro clip

I'm trying to make my app to play intro clip for only when I start activities. But from my code it's always play the clip after wakeup before resume to app although I did not closed the app. What can I do to fix this prob? Thanks From main: startActivity(new Intent(this, MyIntro.class)); From MyIntro: public class MyIntro extends A...

How to get File within' package, in an Android application

I'm am creating an Android application, but in order to have one of the functionalities working I need to read a predefined xml file whilst only knowing its name, not the R.id.. In normal Java I know I can use getClass().getClassLoader().getResource(xmlName) but using the limited Android SDK thats not working, any knows how to solve ...

Android: Why shouldn't I use activities inside tabs?

I've read at a few places that I should not be using Activities as contents of my tabs. I would like to know why this is not a recommended approach... Any suggestions? ...

how to setup Android emulator proxy settings?

Guys, I want to to use the browser inside the Android Emulator, and i want to use the proxy settings on my machine, how can i setup this. Reading the very good manuals of android, they tell me i should start android using the following command emulator -avd myavd -http-proxy http://168.192.1.2:3300 But still am not able to use the em...

Preventing apps from invoking my Activity

I have an Activity X which is only accessible after you've entered a valid credential. How can I prevent other apps from calling startActivity with an Intent pointing to X ? e.g. Intent intent = new Intent( this, ActivityX.class ); startActivity( intent ); Basically I don't want Activity X to be exported to any apps except my app. ...

Android: Any idea why cannot load drawable object?

Hi, There are several custom-made graphic objects (.png files) included in the project inside res/drawable map. All elements are normally loaded and displayed in the user interface except two icons and so far haven't figured out what causes the problem. The code which doesn't affect the user interface as it should is the following: i...

Android intent for playing video?

Hi! I'm trying to play video's on Android, by launching an intent. The code I'm using is: tostart = new Intent(Intent.ACTION_VIEW); tostart.setDataAndType(Uri.parse(movieurl), "video/*"); startActivity(tostart); This works on most phones, but not on the HTC Hero. It seems to load a bit different video player. This does play the first ...

How to make installer in android

I am facing problem in making installer in android. Is there any solution in android. Thanks Raj ...

Android: change style when focused

I have this custom layout: - LinearLayout - FrameLayout - ImageView - TextView This layout reacts to click events (using LinearLayout.setOnClickListener()) and is made focusable using android:focusable="true" in the layout XML file. This all works fine if you're using the touchscreen, but I'm thinking about users who d...

Best Internet community for porting Adnroid/linux to LG Env Touch

I am trying to port Android to the LG vx11000 (env touch) and am wonder what the best website to use for development, a community of users to work on the project and resources such as git and a wiki. I have seen http://htc-linux.org/ and hack&dev community. I may just start up a wiki on the htc-linux since it uses the same chipset as th...