android

Android: getting thumbnails from specific location on sd card

AFAIK accessing thumbnails for images via MediaStore.Images.Thumbnails would generate thumbnails at first attempt, and that's what i need to perform against specific location on sd card. The question is how to make valid URI to content under specific folder? All answers i can find use just MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_...

Getting started with ZXing on Android

I'm trying to add ZXing to my project (add a button which calls the scanner upon press). I found this: http://groups.google.com/group/android-developers/browse_thread/thread/788eb52a765c28b5 and of course the ZXing homesite: http://code.google.com/p/zxing/, but still couldn't figure out what to include in the project classpath to make it...

Android AVD Files - Browse?

How can I browse and copy out the files in my Android AVD? I wish to view the contents of the Sqlite file the app modifies. ...

Android: Memory leak due to AsyncTask

Hello, I'm stuck with a memory leak that I cannot fix. I identified where it occurs, using the MemoryAnalizer but I vainly struggle to get rid of it. Here is the code: public class MyActivity extends Activity implements SurfaceHolder.Callback { ... Camera.PictureCallback mPictureCallbackJpeg = new Camera.PictureCallback() { publi...

Why is android:FLAG_BLUR_BEHIND creating a gradient background in my new activity instead of bluring the window?

Hi, I've got two activities. One is supposed to be a blur in front of the other. The background activity has several ImageViews which are set up as thin gradients extending across most of the screen and 10dip high. When I start the second activity it sets the background as a gradient occupying the entire window space, that is it ap...

get bitmap from textview in android

I want to get the bitmap that is drawn when a textview is displayed but without displaying the textview in the activity. something like this: TextView t = new TextView(this); t.forceToDrawItself(); Bitmap b=t.getViewBitmap(); how is this possible? ...

Android SeekBar Minimum Value

Hi, does anyone know how to define a SeekBar's minimum value? Is this done in the XML layout or do I need to define it programatically? Basically I need to change my minimum value from 0 to 0.2 ...

The Tab1.java from API Demo has exception.

I don't know why.All my Tab programs have exception.Even from API Demo. Here is the code: package com.example.android.apis.view; import android.app.TabActivity; import android.os.Bundle; import android.widget.TabHost; import android.widget.TabHost.TabSpec; import android.view.LayoutInflater; import android.view.View; public class Tab...

Android RelativeLayout spacing

Hi, I'm just putting the finishing touches to my Android app. Unfortunately, I dug straight into development without reading the documentation and built my layout with AbsoluteLayout and it turned out to look terrible when I loaded the app on my phone. Now I'm redoing the UI in a RelativeLayout and I want to put empty canvas space in b...

Illegal start of expression?

I'm trying to build a simple Android app that increments a number displayed every time a button is pressed, but I can't work out how to fix the "illegal start of expression" error I keep getting. My code: package com.clicker; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button;...

How can I manage the height of android spinner items?

I have an android spinner that's populated by a list of strings using an ArrayAdapter and it operates fine, however because of the way the spinner is displayed I'm running into a display height problem with the list items. At first glance it would seem that the ArrayAdapter can use a single layout for displaying options which leads to t...

Resetting or refreshing a database connection

This Android application on Google uses the following method to refresh the database after replacing the database file with a backup: public void resetDbConnection() { this.cleanup(); this.db = SQLiteDatabase.openDatabase( "/data/data/com.totsp.bookworm/databases/bookworm.db", null, SQLiteDataba...

Android Cursor over Generic list of business objects?

In .NET land I would normally query the database and populate a generic List kind of collection. Then the app would use this. In Android land I have been reading about DB access and use in apps. Why do most of the docs show the use of a cursor and use of constants to access it? Is this to save on resources perhaps? ...

Android Remove file with DDMS

I need to remove a file from the /data/data folder my app added. I am looking at the file with the DDMS in Eclipse. If DDMS can't , how would I delete it otherwise? ...

Application runs on eclipse emulator, but not others

I'm new to android app development but I've successfully created my first real application in eclipse. It runs perfectly in the eclipse emulator so I compiled it and tried to install it on another emulator. It installs successfully, but won't run at all. I'm not even sure how to begin finding the error since everything works so well in e...

"The method setListAdapter(ArrayAdapter) is undefined for the type create"

Hi to all , I am completely new to java & android ,so I try to found useful sample about android & databases . So I found this blog with project http://saigeethamn.blogspot.com/2009/10/android-developer-tutorial-part-12.html I run project and he works fine , but I was trying to create new project and to copy & past code in it ...

Android customizing ViewFlipper...

So I'm having pretty much exactly the problem described here: http://code.google.com/p/android/issues/detail?id=6191 and until the ViewFlipper issue in 2.1 and 2.2 has been resolved, I'm attempting to customize my own ViewFlipper in the manner described: @Override protected void onDetachedFromWindow() { try { super.onDetac...

ScrollBall press events while screen is off on an Android device.

I'm writing a quick music player for myself on my Nexus One and really want to add the feature of being able to switch to the next song without removing it from it's case, ie. by pressing the scrollball through the sleeve. I've scoured many resources and... Haven't found a decently easy way to listen to key press events while the scr...

Android Assets with sub folders

InputStream myInput = myContext.getAssets().open("MyFolder/" + "MyFile.db3"); I have a file in the assets folder in a sub folder as above. It doesn't get the file though, is there a special way to specify a sub folder in the assets folder? Ian ...

Accessing 'this' in anonymous methods

Hi everyone, I'm trying to do a simple global exception handler in my Android app and I am having troubles: public class TicTacToe extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Thread.currentThread().setUncaug...