android

An EventBus framework for Android

Can anybody recommend a good framework for handling events in Android? These would be business logic events like UserUpdatedEvent. I am looking for something similar to the EventBus provided by GWT-EVENT but for a JVM that supports weak-references. ...

Java Timers - Functions called not completing!

So I have a TimerTask task calling a function onTimerComplete() in its run() onTimerComplete() looks something like this: private void onTimerComplete(){ myFunc1(); myFunc2(); } I make a Timer t and I schedule the TimerTask with t.schedule(task, 2000); The problem is, when the timer is up and the task runs my onTimerComplete() b...

list in android

How to put image and name in the list in android ...

Android playing Video data from a custom network stream?

Does Android MediaPlayer can only work with file sources? I would like play media (video) from a network stream, but the stream comes in a non-standard protocol, so I have to somehow feed Android MediaPlayer with the data only. Is there anyway to do that? I found a few web pages suggesting using a temporary file for the buffered me...

How to load com.android.music code into Eclipse and compile?

I did a git on the com.android.music app and then created a project in eclipse from existing code. I chose 2.1 as the sdk target but I am getting errors trying to compile. Is the music app referencing code that is not part of the 2.1 sdk? Can someone list the steps for how to compile in eclipse? Description Resource Path Location Typ...

Android - Emulator internet access

Hi, I've been using this method to gain access to internet from my Android emulator emulator -http-proxy <> -avd <> It works but is that the best way to do it? It just doesn't feel right that I need to open the emulator from command line and can't just do it from Eclipse or something. Can't seem to find an internet option on the "AVD ...

Expandable listview Refreshing

Hi, I am using expandable listview i need to refresh as i am searching the list only for parent.I have searched for tutorial in which i can set visibility only for some parent but not all the expandable listview object . Thanks in advance. ...

write /read log data into file in android

how to read/write log data into a text file in android that file should be res folder . Thanks in advance Aswan ...

Android Bluetooth Fails to Pair

I am having a problem getting my devices to pair in Android. If I go into the settings and pair them manually I can get them to connect using the following code: Server @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.connect); Intent discoverableInten...

SAX Parser Exceprtion

When I run my application the following error will occur sometimes, but only sometimes. Can you explain why it occurs only occasionally and what the solution for this is? The error message is: 03-13 14:38:18.055: WARN/System.err(1866): org.xml.sax.SAXParseException: expected: '>' actual: '?' (position:END_TAG </Curre>@137:35 in java.io...

how to pass the parameters to the urlconnection in java/android?

hi all, i can establish a connection using HttpUrlConnection. my code below. client = new DefaultHttpClient(); URL action_url = new URL(actionUrl); conn = (HttpURLConnection) action_url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); conn.setRequestProperty("userType", "2"); conn.setRequestProperty("Content-Type", "app...

How can I set a ringtone for an individual contact on Android ?

How can I set a ringtone for an individual contact on Android ? I have found a way to set the default ringtone that applies to all contacts without an individual ringtone. But that is not what i'm trying to accomplish. I want the application to have a button "Apply ringtone to contact". When i click, I start an activityForResult displa...

How to suppress Spinner double clickable problem of Android.

How to suppress Spinner double clickable problem of Android. Try launch any application that having Spinner. Then double tap it. It will show context menu twice. ...

do we want set permission to access the server in Androidmanifest file?

do we want set permission to access the server with username password authendication in Androidmanifest file? ...

NSData means what? how to implements its characterstics in java?

NSData means what? how to implements its characterstics in java? ...

How to do animations in Android chess game

I'm developing chess game for Android (androidchess.appspot.com). If I want to add animations, should I use custom View extending Canvas (I do this now), or custom View extending SurfaceView? ...

Activity, Service binding

Can an Activity be bound to two different Services at the same time or do I have to unbind one Service before binding to the other one? ...

Free Offline Map Provider (and not OpenStreetMap)

I am making for my Graduation Project a low price Navigation device, using Android as Operating System I tried the Native Google's Map-view Control, but it works only Online .. and of-course I want to store maps for offline navigation So.. I want a map provider (like OpenStreetMap) that : I can use offline Contain Searchable Stre...

Animating and rotating an image in a Surface View

I would like to animate movement on a SurfaceView . Ideally I would like to also be notified once the animation had finished. For example: I might have a car facing North. If I wanted to animate it so that it faces South for a duration of 500ms, how could I do that? I am using a SurfaceView so all animation must be handled manually, ...

Change Layout Of Text Created In Java [Android]

Ok right , i asked how to create a random number from 1-100 for android and i came to this TextView tv = new TextView(this); int random = (int)Math.ceil(Math.random()*101); tv.setText("Your Number Is..."+ random ); What this does is create the default kinda "hello world" style text view and says "Your Number Is.... [Th...