android

Working very slow

Hi guys, My application connects to web server, downloads data (approximately 43000 Bytes) and do mathematics function (such as log, +, -, * etc...) on each byte. To prepare apk file, it is just like publishing to android market. Turned off debug mode and deactivated all loggers. Then put it to the web server and downloaded (installe...

Android app for composing music: Beginner

Hi, I am thinking of developing a simple Android application that lets users compose music on Android phones. I am new to the Android platform. I have some coding experience in Java that involves being aware of basic OOPS and Java concepts and developing some small Java applications(less than 1k lines of code). I have set up Android on ...

Android TableRow RelativeLayout Issue

I have the following <TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/admin_row" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> <RelativeLayout android:layout_width="fill_parent" ...

"Connection reset by peer" exception when connecting android g1 to rs232 adapter

Hi all, I'm trying to connect my android G1 phone to an rs232 adapter but continue to get a "Connection reset by peer" exception. I have the right UUID set up (00001101-0000-1000-8000-00805F9B34FB) but continue to get this exception. Unfortunately, there doesn't appear to be any stacktrace in eclipse. Any help would be greatly appreci...

Android: Keep GPS active

Hi i'm having a main activity that runs a gps listener. If i'm starting a new activity the listener is destroyed. I need the gps to be still activated, also after starting the 2nd activity. Do i have to implement an own listener there, or is there another solution? thx ...

Android Unit Tests Requiring Context

I am writing my first Android database backend and I'm struggling to unit test the creation of my database. Currently the problem I am encountering is obtaining a valid Context object to pass to my implementation of SQLiteOpenHelper. Is there a way to get a Context object in a class extending TestCase? The solution I have thought of i...

Not understanding drawAt() method for com.google.android.maps.Overlay

Trying to make an google maps overlay in an android program. Inside of my overlay's draw method, I have two ways of adding a pin. One of them works, and one does not. Unfortunately, the one that does not work is also the only one that has the ability to add a shadow! Any help? @Override public void draw(android.graphics.Canvas canvas, ...

Android Layout displayed event

Hi All As known, when using the setContentView() method, a view can be displayed on screen. My question is whether there is a way to receive an event when the view is actually displayed on screen (since it takes some time for the view actually being displayed after the setContentView() method has been called). Thanks. ...

Layout Question

I have the following layout xml. I am trying to place the TextView to the left, and the Radiobutton to the right. How can I accomplish this? <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <T...

InetAddress.getByName on Android

I do a: java.net.InetAddress serverAddr; try { serverAddr = java.net.InetAddress.getByName(Server.SERVERNAME); } catch (java.net.UnknownHostException exception) { //System.err.println ("wrong server name !!!"); HelloWorldActivity.tv.setText("wrong server name !!!"); return; } in my android application, but it's never r...

Unsubscribing a LocationListener from the LocationManager

How do I unsubscribe a LocationListener from recieving updates from the LocationManager? Here is how I'm setting it up mLocationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE); mListener = new LocationListener() { public void onLocationChanged(Location location) { Log.i("LocationListener", "Logging Change...

Layout Question - OnItemClickListener not working now

Ok, after figuring out the earlier question 'Layout Question', now my OnItemClickListener, and ItemLongClickListener(ContextMenu) have stopped working. With just the TextView it works fine xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="...

Update Database Android

Can anyone tell me how to update the database in android. I created an app with an embedded database. I changed the version of the database in the manifest and created the on update method. I wanted to test it to see if the database was updating properly but when I use the adb command only the -r will allow me to do a reinstall but it ke...

How to parse the AndroidManifest.xml file inside an .apk package

This file appears to be in a binary XML format. What is this format and how can it be parsed programmatically (as opposed to using the aapt dump tool in the SDK)? This binary format is not discussed in the in the documentation here: http://developer.android.com/guide/topics/manifest/manifest-intro.html Note: I want to access this i...

Playing BG Music Across Activities in Android

Hello! First time to ask a question here at stackoverflow. Exciting! Haha. We're developing an Android game and we play some background music for our intro (we have an Intro Activity) but we want it to continue playing to the next Activity, and perhaps be able to stop or play the music again from anywhere within the application. What w...

Is it possible to use MMS to stream Internet radio in Android?

Is possible to play an Internet radio stream in Android? And since most of the Internet radios use MMS to stream their content is that possible using Android? ...

Android drawing - Background caching

Quick question - I'm having control that's extending LinearLayout and I'm overriding it's onPaint method like this @Override protected void onDraw(Canvas canvas) { super.dispatchDraw(canvas); _background.draw(canvas); _object1.draw(canvas); _object2.draw(canvas); _object3.draw(canvas); // etc... } Every 40...

Error referencing an inner class View in layout/main.xml

Grrr... I create a subclass of view as an inner class in my Activity. Before I simply linked to this view from my activity with: setContentView(new CustomView(this)); without problems. Now, however, my view is getting more complex so I am making it part of a FrameLayout so that I can make this the base view and add a Spinner widget ...

android - save image from web server and set it as wallpaper

Hi, Can anyone please provide me some idea/guidance on how to save an image from a webserver and set it as wallpaper? i am developing an android application which needs to do that and i am new in android. Thanks a lot. I had tried writing my own code but it doesn't work as i can't find my images after download but the wallpaper has cha...

ListView with clickable/editable widget

Is it possible to use a OnItemClickListener on a ListView when the Items layout has a clickable/editable widget (RadioButton,EditText, or CheckBox)? ...