android

Does android sdk provide any sort of iterable Path?

In java, a Shape is described by a PathIterator which describes the different lines, curves, moveTos, etc... which compose the shape. Does android expose similar functionality?: A class which is a flexible collection of lines/curves/moveTos A method in that class, or a wrapper for that class, which can be used to retrieve and iterate ...

change background color of Preference

Hello all, I have a PreferenceCategory, xml file and I have defined all preferences in it, I call this from class that extends PreferenceActivity. I am unable to set the background of my settings screen , this screen is displayed with help of xml file shown below. Please see that I have already defined the android:background="#041A37", ...

Android Record Audio

Hi. i found that code to record, but I always get: The method setOutputFile(FileDescriptor) in the type MediaRecorder is not applicable for the arguments (Uri) So how would I need to describe the filepath that it works? thx // Prepare recorder source and type MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaR...

How to start location tracking based on GPS number of satellites?

How could I get and use the number of satellites before starting location tracking? For example I want to start location tracking only when there are min X satellites in use. ...

Android Database Problems

Hello all, i am creating an application where i am calling my database from a different activity but i keep getting all sorts of errors from on the database side of things. At first i was getting an "SQLiteException no such data" and when i deleted my application and installed it back, its now "android.database.sqlite.SQLiteConstraintExc...

How to measure GPS signal strength on Android?

Question is as simple as the title: How to measure GPS signal strength? ...

Android SQLite and Bind Variables Problem

I'm trying to do a relatively simple bitwise query operation with SQLite on Android. When I use bind variables, I get no data returned when I believe should get some rows back. If I hardcode the bind variable's value directly into the SQL, it works just fine. I'm thinking I have some silly syntax issue somewhere, but I just can't see ...

Android write to sd card folder

Hey, I am using the following code to download a file from my server then write it to the root directory of the sd card, it all works fine: package com.downloader; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import android.os.Environment; im...

Android: Nothing past onCreate is happening.

Hi guys, I got this class, and nothing inside the onCreate is happening? Does it not automatically get called upon initialization? Code is below, Thanks alot! - Micheal package com.michealbach.livedrops; import java.io.IOException; import java.util.List; import java.util.Locale; import android.app.Activity; public class AnyClass ...

Why is my InputStream not working in Android?

I'm writing an image file uploader for android for my favorite image gallery software and it uses FTP. I've started using Apache-Commons Net FTP as my ftp library based on past stack overflow questions. Like so: FTPClient ftp = new FTPClient(); try{ ftp.connect(host); Log.i(TAG,"we connected"); if(!ftp.login(user,pass)){ ftp.l...

Cancel dynamic notification in Android when the notification is selected

Suppose I am creating an Android application that's like an SMS app. The requirements are as follows: The user can receive multiple notifications, each one having a dynamic ID of type int. When a notification is selected, it loads an activity which displays a corresponding message (the SMS). The single notification that was selected s...

Possible to only load specific lines of code according to Android OS version?

Is there a simple line of code that would allow only loading the code if the OS version meets the requirements? Lets say I have my target OS as 2.2 but the min sdk is 3 for android 1.5 so even if i have some code in my project that isn't compatable with 1.5 it will still compile since the target OS is 2.2. Anyway, I want to ad a featur...

android library linking

Hello, I don't if what I am trying to do is possible : I am trying to build the tesseract project (libocr) with the ndk. Compilation is ok but linking is wrong... with a lot of error like this : Android NDK: WARNING: Unsupported source file extensions in /home/jpprade/dev/tesseract3/jni/Android.mk for module ocr Android NDK: cc...

how to use android tabs in the same Activity

Hallo, Any idea where I can find a simple tabs example? The Android Developers Hello Views Tab Layout example only details how to use separate Activities for each Tab. I would like to use tabs to extend a screen of settings without scrolling, i.e. there are too many options for a single screen, so I'd like to split them over two tabs,...

Is there a way to compare two song(Audio/Vedio) file?

Does anybody know how to compare two song stored in two files and see, if they are same or not? ...

Android create avd size on windows command prompt

Hi guys I'm starting with Android development and I have no idea what's wrong on the this command line: C:\Documents and Settings\Gabriel.Esquivel.android\avd>android create avd -n Ev o4G -t 9 -c 8000MB -s 480-800 Valid skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA Error: '480-800' is not a valid skin name or size ...

RuntimeException on widget that has a Bitmap (Android)

Hi, my app has widgets that have an ImageView and a TextView. On the onUpdate() method of the WidgetProvider, I put a Bitmap inside the ImageView this way: Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.widget_btn); Bitmap bitmap2 = BitmapManager.setColor(bitmap, red, green, blue); views.setImageViewBit...

Need help with focus in Android list when the first list item should be disabled

I use tabs in my Android application and one of my tabs contains a listview. I'm noticing some weird behavior when I override isEnabled in my list's adapter and then try to use the D-pad to move up and down through the list and to my tabs. If the 0th item of the list is enabled, then everything works as expected - I can move down thr...

Using an IntentService to do Prioritized Networking

I've been wondering if it is possible to use an IntentService to do some networking while keeping the queue of pending intents prioritized. My goal to be able to download some images in the background, add more if needed (send another Intent) and be able to reset the queue if necessary (preferably using a specific Intent). That is all po...

Android Virtual Device gets hosed somehow

I am going through the Android tutorials and at some point an app won't load. The last message on the console is "Installing RelativeLayout.apk..." and it just stays there forever, instead of going on to the "Success" message. Visually, what is happening on the emulator is that it starts with the "A N D R O I D" phase, goes on to the ch...