android

Problem inserting android.text.format.Time.toMillis value into SQLite DB on droid

I'm writing an app for Android OS, and I need to store some time values in the SQLite DB. I have been using android.text.format.Time to store the time values in the app, and then inserting the values as millis into the DB as REAL values. On the SDK emulator, everything works perfectly. On the sole phone I've had the opportunity to test m...

Simple Adapter error

Hi, I have the following errors when i try to access the simple adapter from my program... Plz can anyone help me solving the error... Desperate to get it done.... android.widget.SimpleAdapter.getCount(SimpleAdapter.java:95) android.widget.ListView.setAdapter(ListView.java:431) com.stellent.gorinka.MusicListActivity.list(MusicListActiv...

Android RTSP coding problem

I have Googled my butt off trying to find where if there is a surefire way to make rtsp work. I have a radio station that I listen to that streams via rtsp. Of course by default Android doesn't want to play it. If I pop the URL into yourmuze.fm and create a station there it lets me stream it to my phone. After checking how it works I...

How to use Web-View as page by page while scrolling or Flinging/swiping?

Hi, I want to convert an .docx/.doc file to html and displaying in emulator with help of Web- view. But i am displaying entire data into webview as Single page(we need to scroll many times). So, i want to match the content of .docx file with webview as pages or put some buttons or gestures to get next page.But i unable to display text as...

Android programming - screen resolution.

I'm new to Android programming. I've seen different phones with different screen resolutions that run on Android. How can I create an application that works on all android devices with out any distortion in my application views..... ...

using IPC under Service

Hi, Please can anyone tell me what is, and when would it be good to use "IPC" ? thanks, ray. ...

Android ListView with SQLite

Hi I'd like to refresh the Listview items. These items are populated from SQLite database. My code is below public class Weeve extends Activity { private String[] lv_arr; protected ListView CView; private DBAdapter mDbHelper; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDbH...

In the android emulator is it possible to notice vibration effects?

Quite a simple question, Is it possible to notice vibrations in the android emulator? ...

ProgressDialog does not display until after AsyncTask completes

I am trying to display an indefinite ProgressDialog, while an AsyncTask binds to a RemoteService. The RemoteService builds a list of the users contacts when the service is first created. For a long list of contacts this may take 5~10 seconds. The problem I am having, is that the ProgressDialog does not display until after the RemoteSe...

Android multiple spinners

Hello! I have 3 spinners (dropdown menus). I would like the user to select item from the first one and that would determine the options(different string array) on the second and on the third spinner. E.g. user selects the country in the first spinner and then gets popular music groups in that country on the second spinner and popular di...

Show/hide views with checkbox

Hi! I want to show or hide some elements (textviews and edittexts) with checkbox. I set their visibility to gone in layout file. Showing them when user checks the box works, but the when user unchecks it, they don't hide. (android 1.5 and 1.6) My code: cb=(CheckBox)findViewById(R.id.cek); cb.setOnClickListener(new OnClickListener() {...

[Android] How to launch an Activity without a UI?

Is it in any way possible to launch an activity from the main function without having a UI? i.e. is there a way to create a sort of "wrapper" around another activity, i.e. by launching the main activity, it takes you to another activity automatically. If that is not possible, is there a way to remove the main activity from the stack s...

how to add a button in android?

I am new to android. Tell me how to add a button in android. And when we clicks on it it has to do a activity ...

How to catch an incomming text message

Hi! I want to be able to control incoming text messages. My application is still on a "proof of concept" version and I'm trying to learn Android programming as I go. First my application need to catch incomming text messages. And if the message is from a known number then deal with it. If not, then send the message as nothing has ha...

Strings don't seem to be equal in Java on Android, even though they print the same

I've got a problem that I'm rather confused about. I have the following lines of code in my android application: System.out.println(CurrentNode.getNodeName().toString()); if (CurrentNode.getNodeName().toString() == "start") { System.out.println("Yes it does!"); } else { System.out.println("No it doesnt"); } When I look at the ...

when would you use PendingIntent?

Hi, I tried to understand from the api the porpese of PendingIntent, coz sometimes some method i use requires this, i still didnt get the idea right, anyone could exaplin? why cant i juse use context? thanks, moshik ...

How do I cast from int to generic type Integer?

I'm relatively new to Java and am used to generics in C# so have struggled a bit with this code. Basically I want a generic method for getting a stored Android preference by key and this code, albeit ugly, works for a Boolean but not an Integer, when it blows up with a ClassCastException. Can anyone tell me why this is wrong and maybe he...

Slide expand animation in android.

Hi, I have a simple list view listing results in android. Upon click of each item, I would like it to slide down expand and show the content. Is there an easy way to do this in android? Any help will be appreciated. Cheers ...

How do they do it? Dialogs over home screen.

Hi all, I'm writing an Android application and I would like to place a dialog or view over the home screen so that a user can enter text without jumping into my full application. I can't seem to get this to work. If I present a dialog (even in a transparent activity), my application launches. If you don't know what I'm talking about, t...

How get an Android ListPreference defined in Xml whose values are integers?

Is it possible to define a ListPreference in Xml and retrieve the value from SharedPreferences using getInt? Here is my Xml: <ListPreference android:key="@string/prefGestureAccuracyKey" android:title="@string/prefGestureAccuracyTitle" android:summary="@string/prefGestureAccuracyDesc" android:entries="@array/prefNumberAccuracyLab...