android

Color TabWidget

Is there a way that I can color the TabWidget View? Both the idle and selected colors? That way my app can look a little more personalized, ya know. Thanks! ...

View an activity on button click

I want to show the details of a list item in another activity when clicks on a button.Can you help me? ...

Failed to start my preference activity

Hi, Currently I am trying to add a preference activity into my application but found out that I couldn't make it works. Every time, I tried to start the preference activity but it just crash before showing anything. Here is the manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/...

Problem matching regex pattern in Android

I am trying to search this string: ,"tt" : "ABC","r" : "+725.00","a" : "55.30", For: "r" : "725.00" And here is my current code: Pattern p = Pattern.compile("([r]\".:.\"[+|-][0-9]+.[0-9][0-9]\")"); Matcher m = p.matcher(raw_string); I've been trying multiple variations of the pattern, and a match is never found. A second set of...

Javascript, Smartphone detection for videos?

If there's a better way I am all for it. But I wanna detect a smartphone user on my site. Whether they be a webOS, Android, or iPhone OS phone. I have a flash video on my site, but when I detect a smartphone users I want it to be a HTML5 video on the site instead. ...

SimpleCursorAdapter and ListView.

public class List2 extends ListActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get a cursor with all people Cursor c = getContentResolver().query(People.CONTENT_URI, null, null, null, null); startManagingCursor(c); ListAdapter adapter = new SimpleCursorAdapter(...

Selecting multiple contacts in Android

Is there a way similar to ACTION_PICK to select multiple contacts from the address book and then return to previous activity? Thanks in advance for any help. ...

Question on .asec (encryption) on Froyo 2.2 / installing app onto sdcard

I installed my app on the emulator with 2.2 and onto the sdcard. When I browse via adb shell, I can see that the encrypted app file lies under /mnt/secure/asec/com.myapp-1.asec but it also lies as plain apk file unencrypted at /mnt/asec/com.myapp-1/pkg.apk as well and I can do a 'adb pull' without special permissions and unzip it to see ...

What files should I ignore in an Android Project on SVN

I have added the 'gen' folder to svn:ignore, are there any others I should be ignoring? Update: There are some I am unsure about .classpath .project The .settings folder And also, to ignore a folder I am just typing gen into the ignore list in subclipse, is this correct? How would it know if gen is a folder or file? ...

how to call google map class from another activity class in android?

I have one application. I need to display map view when we click on map button. Actually this map button is in one class and google map is in another class. Now How can we call one map activity class from another activity class. Please help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ...

Screen optimization in android

I want to do screen optimization. That means once I develop the UI in android it should fit exactly the same in all android enabled phones. So how do i do it? ...

I can't LogCat this value. Why?

Here's a snip that successfully reads off, to Eclipse LogCat, the height and width of the .PNG on the SD card: import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Environment; //... Bitmap bmp = BitmapFactory.de...

Combine two intent flags

Hi, I have an intent which i need to set it, two flags: FLAG_ACTIVITY_SINGLE_TOP -> coz i wanna keep the instance of the current activity in case it' already focused. FLAG_ACTIVITY_NEW_TASK -> coz i launch the intent outside of it's activity(contexnt.startactivity(..)) problem is that i cant combine both of them.. any other solution? ...

How can I load an apk dependency from the android market?

I'm using google moderator as a simple way to collect feedback for my application. There's a google moderator app on the market that provides a better interface than the website for mobile users. Getting to the point: Is there a way to get it to install along with your application or a reasonable way to identify if another package is a...

Is there an option to convert file to .csv format in Android ?

Hello Guys, I retrieved and saved the call history details in the file format. However, I would like to know if we have an option to convert the file format to .csv or .xls or any other format. Thanks & Regards, Serenity. ...

android - get all alarms saved in the alarm application

Hi Friends, Is it by any chance possible to get a list of alarms saved in the alarm application of android ? I am making an application which just needs to show the alarms set in the Alarm application. Thanx ...

onItemSelected property of spinner in android

Spinner spin1 = (Spinner) findViewById(R.id.spinner1); spin1.setOnItemSelectedListener(this); spin2 = (Spinner) findViewById(R.id.spinner2); spin2.setOnItemSelectedListener(this); ArrayAdapter<String> choice1 = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, data1); choice1 .setDropDownVie...

Android ImageButton - determine what resource is currently set

Is there a way I can find what resource a particular ImageButton is set to, at any given time? For eg: I have an ImageButton that I set to R.drawable.btn_on onCreate. Later, at some point, the ImageButton gets set to R.drawable.btn_off. I want to be able to check what resource the ImageButton is set to in my code. Thanks Chris ...

Google Map Get Direction Search Algorithm

Hi! I learned that Google Map has a Get Direction feature that let users find the shortest path from one point to another. What search algorithm did Google used for this search? Is this algorithm can be implemented in the Android platform, knowing that it has low memory and it's running in Java(tend to be slow)? Thanks in advance! ...

How to create native C++ library on Android?

I need to write a dynamic link library in C++ that is used by Java on Android. As I get, it should be .so library, but I don't know how to do that. I tried Cygwin, but it crashes: $ gcc 1.cpp /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32 collect2: ld returned 1 exit status 1.cpp: ...