android

Using a Drawable.Callback to detect a gesture on top of it

What I mean by this is, if I have several drawables in different areas of the screen, how can I use a callback on that drawable to detect when a gesture is drawn by the user directly over one of them so that it is specific to that drawable and not all drawables on the screen at that time? Thanks ...

Android: Accessing the Google Products Search within your Android-Application

I wanna use the Gdata Apis within my Android Application. Being more specific I wanna give the user the ability to search for keywords, use the Gdata api to search for products within googleproducts for these keywords and parse the xml that I get back. I know how to parse xml files via an org.xml.sax.helpers.DefaultHandler but I guess t...

SVN - how does removing a bin folder cause the src folder to be removed instead?

Hi all, There was a bin folder in version control with a bunch of .class files and other junk that should not be versioned. Could someone please explain to me how the following commit: 529 svn rm --force bin/ 530 svn ci -m "Bin should not be under version control." Leads to the following: Revision 249 Author: ndunn Date: Mo...

Android Web Development...Div width (more likely inner text) is changing in pixels based on device zoom.

I developed an application that interfaces with an institution's emergency alert system. How it works is, when there is an alert, on all of the institution's web pages it displays a scrolling marquee at the top of the page that is put there by javascript using protoype and scriptaculous. All of this works perfectly on desktop browsers (...

Dynamic markers on a map?

Hey Guys, How would dynamically draw markers on a Mapview? I've got the following code which will hardcode one point in. I'm looking to pull values from a database.. //---translate the GeoPoint to screen pixels--- Point screenPts = new Point(); mapView.getProjection().toPixels(p, screenPts); /...

Android Preferences Add Values from Database

One of the Preferences in my PreferenceActivity needs to get its values from a database. How do I add these values? public class Settings extends PreferenceActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preference_scr...

Is it possible to send message via GTalk Intent?

I'm looking for a solution to send multicast (text) messages to all my google contacts from my android app. Is there a way to do this with the GTalk App (Intent), or do i have to use my own xmpp implementation? Any recommendations for an appropriate solution/framework besides gtalk piggybacking? Thx ...

Android and HTML5 CACHE.MANIFEST

I have searched with google, and can't find out how much of CACHE.MANIFEST android supports, and what versions of android that supports it. Anyone out there that have more knowledge on the subject??? ...

Android:AutoCompleteTextView Search a Different Field Then What's Inserted In The Text View

Hi, Does anyone know if it's possible to have the adapter for an AutoCompleteTextView search a different field then what it returns to the text view to be inserted? For example, I have a string that contains a phone number, an address, and a name. This works good for searching because I can enter any of those values to get what I want,...

Get the touched area

Hello, I'd like to know if there's a way to get the size or the limits of a touched area ? So for instance, it could give me how many pixel the finger is covering. In fact the same question has been posted here for the Ipad : http://stackoverflow.com/questions/3316358/ipad-measure-detect-covered-area-by-a-finger-touch-on-screen-not-onl...

Updating Android Application

Hi, I was wondering if there is a way I can update my Android application which is not listed on the Android Market. I mean, maybe thorough my website? Any ideas? Many Thanks! ...

android:drawableLeft problem

Is it possible to set the margin or padding for the image which we added with the android:drawableLeft? ...

Listening for when a gesture occurs on a specific object on screen

Hi there I will have several objects on my canvas at once and need to detect over which one the user performed a gesture. The only way I can think of is splitting the screen up in to many views and listening in each but this isnt very efficient so has anyone a better way, preferably using seperate gesturedetectors that belong to each ob...

calling a mapactivity from another activity

I get a class not found exception. I have included the required entry in manifest file. The code in current activity is as follows: Intent i = new Intent(MainListingA.this, DrawTheatreMap.class); try{ startActivity(i); } ........ The error I get is as follows: 07-26 23:03:20.259: WARN/dalvik...

How to store lots of longitudes/latitudes on an Android device

Hi I am looking into writing an Android app that has a database of approximately 2000 longitudes and latitudes which are effectively hard coded. I assume that once my app is installed, I can put this information into the SQLite database, but how should I distribute this information when the app is downloaded? One option I thought of w...

Mocking library/framework that works best in Android?

I'm developing Android application using third party libraries (Twitter4j). I want to be able mock those objects (also objects created by me) in JUnit and functional tests. Do you have any good experiences using some mocking libraries and you can recommend them? ...

What are the actual ms time values for Android's animTime constants?

Android includes config_longAnimTime config_mediumAnimTime config_shortAnimTime but the actual values identified by these constants don't make sense as milliseconds. I'm sure they get compiled into useful values, and I can determine them with code, but I'm sure someone else knows the answer - and, more to the point, I'm sure other pe...

How to mock PreferenceManager in Android?

I've written a class that is using Context, third party library and SharedPreferences from PreferenceManager. It's possible to mock Context, third party library can be mocked using some mocking framework, but what to do with PreferenceManager? I have two methods: public void saveString(ThirdPartyObject obj) { SharedPrefer...

android go back to first screen

I have an android app with links (made by linkify) that lead into other screens of my app. I'm wondering what's the best approach to close all of the 'child' activities and go back to the first activity that was originally launched. in otherwords something like this: HomeScreenActivity => Screen1 (via Linkify-link) => Screen2 => Scree...

Android - Inter thread communication and network socket

Hi this is what I am trying to achive 1) My main application/activity starts a thread to listen to network messages (tcp). But I want this thread to listen to network messages (on tcp socket) as well as messages from main activity. I am exploring if I can use socket for network messages and Looper for internal messages. I dont think it...