android

Interesting blogs about developing for Android

I became interested about developing applications for Android. Which blogs worth reading? ...

make command to get only symbols directory in out

Hi, Is there a way to compile the code in such a way that we get only specific files/directory in out folder rather than the whole out directory. what if i want to get only symbols directory specific to the target without host directory in it.Is it possible? ...

Usability of Android Gallery to contain a "horizontal form" ?

It has been suggested to me to use a Gallery type of widget for user data input (text input, checkboxes, dropdowns). Has anyone used this approach ? Code example ? What about usability ? Have the users been happy with this in practice ? ...

How can i achive file upload dialog box in android through java or xml layout.

Im new to android, developing a social networking application which requires user to upload images, but i dont know how to achive the file upload dialog box. How can we achive it,using java file or xml layout file? ...

Why android app does not recognize GPRS, WiFi upon changing data connection

If i turn off WiFi, i’m not able to open the app ( this is with no data connection, even without data connection it should display cached items ) If i tun off WiFi and turn on GPRS the app cannot recognize this and gives the error page no Wifi/GPRS connection. if i restart the phone with GPRS on the app works fine till i change data co...

How to detect GUI thread on Android?

Is there a robust way to detect if Thread.currentThread() is the Android system GUI-thread in an application? I would like to put some asserts in my model code that asserts that only one thread (eg the gui-thread) accesses my state, to assure that no kind of synchronization is neccesary. ...

use startActivityForResult from non-activity

Hi, I have MainActivity which is an Activity and other class(which is a simple java class), we`ll call it "SimpleClass". now i want to run from that class the command startActivityForResult. now i though that i could pass that class(SimpleClass), only MainActivity's context, problem is that, u cant run context.startActivityForResult(.....

How do I take advantage of Android's "Clear Cache" button

In Android's settings, in the "Manage Applications" activity when clicking on an app, the data is broken down into Application, Data, and cache. There is also a button to clear the cache. My app caches audio files and I would like the user to be able to clear the cache using this button. How do I store them so they get lumped in with ...

Polishing an user interface

Looking for examples of some "final touches" to enhance an existing (raw) user interface. I.e nothing related to the core functionalities of the application, but rather examples of all these little details which give an application a "polished" look (new fonts, change in layout, more descriptive labels...others ?) The target platform w...

Android app: custom listview with image

Hi, I am relatively new to development of Android apps. I have bought some books on Android development which got me started in developing simple apps. Now, I want to start building an app that has more functionality. Part of this app consists of a ListView containing about 100 rows. Each row should contain a little image (from remote ...

[Android] Datagrampacket to xml

Hi, Im trying to parse a Soap ProbeMatch message with XMLPullParser. I receive this via UDP Multicast. I use the following code to receive it. byte[] buf = new byte[1900]; DatagramPacket packet = new DatagramPacket(buf, buf.length); mSocket.receive(packet); // Damn ugly.... String data = new String(packet.getData()) If i convert th...

Adjust text size of WebView?

I would like to proportionally decrease the size of all text in a WebView as easily as possible. I've tried android:textSize="..." without success. Api Level 7. ...

Access Android 1.5 browser's gears-created database localy

I created a database via javascript using Google Gears on Android 1.5 and I'd like to access directy the sqlite file to look inside it whitout using Gears. I found several "File Browser" but they only browse the SD card. Is there a way to fetch it from the phone file system? I have an HTC Dream running Androis 1.5. Thank you! ...

Android rtsp video frame rate loss?

Is it possible to calculate the frame rate (loss) of a rtsp video playing inside a VideoView or MediaPlayer? ...

How to organize database access code in Android project?

I have created a ContentProvider for my main Sqlite table, pretty much following NotePad example from SDK (although I am not sure whether I will ever be exposing my data to other apps). However, I need to create lots of other, non-trivial queries on that and other tables and views. A good example would be queries to extract some statisti...

RelativeLayout differences between 1.5 and 2.1

I've got a ListView with items composed of RelativeLayouts. This is the relevant XML from the list items: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:id...

Options and best practices to release free and paid version of the same app to Android Market

I have installed a couple of free apps on my Android phone and then later "upgraded" to the paid full version. My first instincts for doing the same would be to create two apps with the same package name so that installing one overwrites the other, but apps in the Market must be unique by package name. What are some patterns and best p...

Activity has leaked window that was originally added

What's this error, why happens? 05-17 18:24:57.069: ERROR/WindowManager(18850): Activity com.mypkg.myP has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c46ff0 that was originally added here 05-17 18:24:57.069: ERROR/WindowManager(18850): android.view.WindowLeaked: Activity ccom.mypkg.myP has leaked window com.a...

Display a WebView

Hi, Has anyone any idea how could I obtain a view that has the following description: At the top at the page there is a custom test , and below there is displayed the content from a url .Currently my layout is the following: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" ...

Tracing the Memory/Window Leaks in Android?

How to trace the Memory Leaks in Android Development? I am working on eclipse IDE to develop the application. i cant find out how to rectify the memory or window Leaks Exceptions? Any Idea. Mainly the Window Leaked error raises the Illegal Argument Exception? how to rectify both og this. Please Help. ...