android

Android Eclipse test projects cannot be used with a project being built in an Android build tree

An Android Java project placed in a git repository and built in an Android tree in /packages/apps needs to have the project files located at the root of the git repository. This is problematic for creating a complementary Test project, which should ideally be included in the same git repository so commits are atomic for both code and te...

Streaming to the Android MediaPlayer

Hi. I'm trying to write a light-weight HTTP server in my app to feed dynamically generated MP3 data to the built-in Android MediaPlayer. I am not permitted to store my content on the SD card. My input data is essentially of an infinite length. I tell MediaPlayer that its data source should basically be something like "http://localhos...

Streaming video data to computer Monitor

I want to have a videoplayer which streams the video material from my Android mobile to a local pc. What is important is that it's not sending the file to a local computer and open it there programmatically. It's just seeing the video on the local computer monitor while it gets played on the Android mobile. For the PC to PC realization...

DefaultHttpClient GET and POST commands Java Android

Ok this is my application : An Android app to allow me to submit CokeZone codes into CokeZone.co.uk from a mobile app instead of from the website. So I wrote this section of code to do the post logon command and then check to see if im logged in after. Problem is - the html I get from the homepage after I send the post command is the ...

Getting location via a web application being run in a WebView

m.google.com somehow requests the current location when loaded in Android's browser. I want to do the same thing from a web page being loaded into a WebView in my own application. Is the only way to go about this with WebView.addJavascriptInterface(), or is there already a javascript interface available for webapps to use? ...

How to build custom sqlite with provider under Android?

Hi, I have a really strange problem. I need to build custom sqlite3 database engine under Android OS, but I also want to use database provider implementation. Unfortunately when examining sources of Android 1.6 I noticed that it's not so easy. Many classes including android.database.; packages use original provider, also many other pa...

Android serialization: ImageView

I have a simple class: public class Ball2 extends ImageView implements Serializable { public Ball2(Context context) { super(context); } } Serialization ok: private void saveState() throws IOException { ObjectOutputStream oos = new ObjectOutputStream(openFileOutput("data", MODE_PRIVATE)); try { ...

Android CheckBox -- Restoring State After Screen Rotation

I have come across some very unexpected (and incredibly frustrating) functionality while trying to restore the state of a list of CheckBoxes after a screen rotation. I figured I first would try to give a textual explanation without the code, in case someone is able to determine a solution without all the gory details. If anyone needs m...

How to handle Android SimpleExpandableListAdapter entry selection.

I have created an expandable list in my Android application using the SimpleExpandableListAdapter type. But I'm at a complete loss as to how I detect events when one of the child entries has been selected/clicked. I've tried all the usual OnClickListener/OnChildClickListener etc, but can't seem to find (by experimentation, or half an ho...

How to avoid re-drawing all views in an ArrayAdapter

Hey all, I have an ArrayAdapter powering a ListView. I would like to change the data behind the ArrayAdapter and update the ListView's. Sounds like notifyDataSetChanged(); would be exactly what I am looking for, but it updates the entire ListView, and I would prefer to update on a row-by-row basis. Is there a way to do this with Arra...

How do you handle key down events on Android? I am having issues making it work.

For an Android program, I am having trouble handling key down and key up events, and the problem I am having with them can almost certainly be generalized to any sort of user input event. I am using Lunar Lander as one of my main learning devices as I make my first meaningful program, and I noticed that it was using onKeyDown as an over...

Approaches to writing subscription based applications in Android

I have a Web Service and an Android application that uses this web service. I want to make this application subscription based. The user would subscribe to the service and would be able to use it till their subscription is valid. I understand that to create such an application, we would have to integrate necessary checks in the service...

android :displaying multiple activities on same screen

hi, is it possible to show two activies on same screen at a time. and each activity is showing data which changes with time .. Thanks ...

Android ViewFlipper + Gesture Detector

I am using gesture detector to catch "flings" and using a view flipper to change the screen when this happens. Some of my child views contain list views. The the gesture detector wont recognize a swipe if you swipe on the list view. But it will recognize it if it is onTop of TextView's or ImageView's. Is there a way to implement it so th...

Webview can't type in, is that because of missing setting?

I have an Android application that connects to Facebook to request authorization of an Application. I use the following setting in the WebView, but once the view is loaded, I can't type in login details. What I am missing? WebView webview; webview = (WebView) findViewById(R.id.facebookview); webview.getSettings().setJavaScriptEnabled(t...

Can Android's animation class be used to create Mosaic/shutter effect?

Any tutorials or sample code? ...

How to use 3G Connection in Android Application instead of Wi-fi?

How to use 3G Connection in Android Application instead of Wi-fi? I want to connect a 3G connection, is there any sample code to connect to 3G instead of Wi-fi? ...

Android: Any way to auto-pair to another device over Bluetooth without prompting for a pin?

I am looking for a way to connect to Android devices via Bluetooth without user intervention(assuming at least on device is set to "Discoverable"). Since 2.0, it seems the devices prompt for a random pin to be entered when connecting to each other for the first time. I've tried some Bluetooth projects, but none seem to work as the underl...

problem in loading images from web

hi, I am new in android and had developed an app which get images from the website and display it. I got it working in emulator but not in real phones. In some device, it will crash or take very long loading period. Can anyone please help me or guide me in improving it as i'm not sure whether the way i loads the images is correct or not...

How to send data from BroadcastReceiver to an Activity in android?

Hi, I am writing an application to listen the SMS inbox in android with one activity and one BroadcastReceiver.Once the SMS comes the Receiver is showing alert message.But i want to send the message information from Receiver to Activity.I don't know how to achieve this.Anybody knows it please help me. ...