android

Adding distance to a GPS coordinate

Hi! I'm trying to generate some points at random distances away from a fixed point using GPS. How can I add distance in meters to a GPS coordinate? I've looked at UTM to GPS conversion but is there a simpler method to achieve this? I'm working on Android platform just in case. Cheers, fgs ...

Remove the notification icon from the status bar

Hi i am displaying an icon in status bar.Now i want to remove that icon immediately when i open that content , after some time if we receive any alert ,that icon will be displayed again.For this what can i do?Thanks in advance ...

Android. Searching over the listView

Hi, I have activity with ListView. That listView contains imageView and two textViews (aka first and last names). I want to organize searching with this listView by one of textView (e.g. by last name). How can I implement that? I found that Quick Search Box can be used but I didn't understand how to work with it. Help, plz :) ...

Problem Building dschaefer / android-box2d

I'm trying to build dschaefer android-box2d, and did follow the recipe. I do get this error when trying to build the TestBox2d with eclipse: make all /cygdrive/c/android/android-ndk-r3/build/prebuilt/windows/arm-eabi-4.2.1/bin/arm-eabi-ld \ -nostdlib -shared -Bsymbolic --no-undefined \ -o obj/libtest.so obj/test.o -L../box2d/lib/andro...

Calculating zoomToSpan() degrees based on min/max lat/lng to be in the mapView

I have a cluster of items on an overlay in a mapView. I know where the top/bottom/left/right most objects are. I want to use the zoomToSpan() method to zoom onto that area. What is the proper way to calculate the lat/lng degrees for this method ? ...

Android ListActivity OnListItemClick error with Webviews

I've been figuring how to popup a webview all day when a row in my ListActivity is clicked. I can't even show a Toast when it's clicked. Need help I'm still new with Android, a web developer trying to learn. Thanks before. package com.mf.ar; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; imp...

Android's listview. Update view within of of the cells just after invalidating Activity's view

I have ListViewActivity public class SelectActivity extends ListActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.select_one_of); SimpleAdapter adapter = new SimpleAdapter( this, createChildList(), R....

How do I add a newline to a TextView in Android?

When I define in XML a TextView, how do I add new line to it? \n seams to not work. <TextView android:text="Line1: \n-Line2\n-Line3" android:id="@+id/txtTitlevalue" android:layout_width="54dip" android:layout_height="fill_parent" android:textSize="11px" ></TextView> ...

Context.startService(intent) or startService(intent)

Hello, I wanted to know what is the difference between Context.startService(intent) and startService(intent) and does it matter which one is used? Thank you ...

Sockets receiving null (Android)

I have a android app that is communicating with a server (written in java). Between these two parts I have established a Socket connection and want to send data. The problem I am having is that sometimes, for some users, the information that reaches the server is null. This works (for all phones, all users): Server: int a = Integer....

How to update a record with multiple keys

I am trying a database app on Android. I want to use the SQLiteDatabase update(...) convenience method to update a record. Normally, for a WHERE clause of a single key this is working. Following code is working fine:- values.put("testname", "Quiz1"); mDB.update("Tests", values, "id=?", new String[]{"2"}); //this statement works Howe...

Why do AlarmManager broadcasts get cancelled when app gets killed?

Ok so I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things. If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens. Presumably the same thing happens if the parent app is killed due to ...

replacement for clock app

the least thing i like on the nexus one is the useless app it runs when on the desktop dock. I already wasted a good day searching for the 3 topics below and failed to find anything. Is there any replacement for it already available? Is there source code for the original one? Is there documentation on how to replace them? ...

How to change standard resources on phone/emulator

Hi there, I'm a new in Android and Java and I have the following problem. I want to change standard resources, such as button background, programatically to allow applications using standard buttons be displayed with custom background. My problem is - how shall I identify the path for retrieval resources on phone or emulator? And if we...

Can I query inside a SQLite Transaction?

I'm using the SQLite3 database system in the Android library. I need to execute a query during a transaction to see if there is a similar entry already there. If there is, I have to perform some other logic and adjustments before I add a new row. Can I execute a query within a transaction and get the result back immediately? ...

HttpsURLConnection failing intermittently to the same URL

I think I'm experiencing the same as http://groups.google.com/group/android-developers/msg/9d37d64aad0ee357 This is Android 1.5 SDK. I happen to call several times below code(which is in a method) with the same url and it fails intermittently. When it fails, there is no exception, the stream is empty so the readConnection fails, and getR...

OpenGL, how to set a monochrome texture to a colored shape?

I'm developing on Android with OpenGL ES, I draw some cubes and I change their colors with glColor4f. Now, what I want is to give a more realistic effect on the cubes, so I create a monochromatic 8bit depth, 64x64 pixel size PNG file. I loaded on a texture, and here is my problem, which is the way to combine the color and the texture to ...

How to SQL compare columns when one has accented chars?

I have two SQLite tables, that I would love to join them on a name column. This column contains accented characters, so I am wondering how can I compare them for join. I would like the accents dropped for the comparison to work. ...

Possible to change where Android Virtual Devices are saved?

I've set up the Android SDK and Eclipse on my machine running Windows XP and AVDs (Android Virtual Devices) are saved to "Documents and Settings\user\.android" by default. Is there any way to change this behavior? I have all of the other components saved in a directory on a separate partition and would like everything to be consolidate...

onFocusChange code example?

I have a form with 2 fields where you can enter in either months or years. How do I setup the form so that if you enter in the years, the months edittext field will be automatically calculated and entered into it's own box. Likewise, I want the years to be calculated if you entered in the months Can anyone give me sample code for this...