android

Android ListView alpha scroller for quickly scrolling long list

The Contacts app shows a button on the side of the screen that acts as a little thumb to allow you to quickly scroll the big list. I have a very long list that would benefit from this navigation behavior, but can't find any documentation as to how to enable it. Is it a behavior that's built into the SDK, or must I write it myself? ...

Problems calling Android's getSharedPreferences(); from SQLiteOpenHelper class

Hi, First I want to describe my situation briefly. I have two classes, one MainClass and one DataBaseHelper class, which extends SQLiteOpenHelper. From my MainClass I call a method in the DataBaseHelper class to open a data base. Before opening the data base I want to check the users data base version (this is important as soon as I ...

Eclipse crashes when I invoke Android Layout Editor

I'm new to Android & Eclipse. I've downloaded Eclipse and the Android ADT and created an ultra-simple "Hello World" app (has only auto-generated .java and .xml files). Eclipse CRASHES (closes after a very brief pause) when I do the following: In Package Explorer, select AppName/res/layout/main.xml Press , or double-click, or 'Open Wit...

Android notifyDataSetChanged

i have a list which is filled with a custom Array Adapter. I want to upload a progress bar every second, so i try to use notifyDataSetChanged in order to repaint the list but it doesn't seem to work. ...

Installing the Android USB driver - not happening

Using AVD, I successfully obtained the USB driver. I followed the instructions on this page USB Driver for Windows but Windows never prompted with the "Found new hardware..." message. I'm running Vista x64 SP2 and I can see the amd64 folder under ~\Android SDK\tools\usb_driver. The Manage Devices applet shows no listing for "ADB Inter...

changing OWNERSHIP of a file copied to device

when i copy a file from assets to the device, it copies just fine. the only problem is ownership. the file is ending up with the owner being 'app_59', and i need it to be 'system'. when i adb push a file it goes as 'system'. i tried chown, i tried chmod 0777 the file, i just cannot seem to do it! can anyone help :( ...

Motion Events in android

This is the code for motion events in my instrumentation testing. long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, 100,100, 0); MotionEvent event2 = MotionEvent.obtain(downTime, eventTime, Mot...

notification service clear button disable in android

when i run my application i am running one notification service .how i disable clear notification service button in my application only i need to run the service when my application is running .is there any way to disable the clear notification button .please help me Thanks Aswan ...

Android : ugly TABS in 2.0 vs 1.5 ... why ? where are my rounded corners TABS ?

I simply use the tabwidget : mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec("tab_1").setIndicator(getString(R.string.day0)).setContent(R.id.tab1_content)); mTabHost.addTab(mTabHost.newTabSpec("tab_2").setIndicator(getString(R.string.day1)).setContent(R.id.tab2_content)); mTabHost.addTab(mTabHost.newTabSpec("ta...

How is advised to use the contentResolver's delete method to be injection safe?

You can delete with content resolver by URI or by passing some parameters to the where parameter. How do you make the parameters to be SQL Injection Safe? Is it possible to use Prepared Statements with ContentResolver? act.getContentResolver().delete(myuriwithid,null,null); act.getContentResolver().delete(mybaseuri," name = '"+this.nam...

Controling Tabs in android TabView after they are created

Hello, I use this forum a lot and find it super useful. I am having some trouble with my application. I Have a TabView setup and it works properly. I poll a server for data in a background thread. If I return any data, I want to set an indicator on the tab to let people know that there is new data in that view. I can't access the ta...

Trying to run Android JUnit tests in Ecclipse fails!

I have seen all the examples on the web and it seems real simple. I have a bare-bones app that displays a string. I have a a Android JUnit test project that I created when the app was being created (ecclipse asked if I wanted to create a test app). When I run the test app (Run As --- Android JUnit) I see the foolowing in the console.......

how to store the recorded audio file in SDCard in android emulator? how???

i am working n audio recording i can store the file using file.getAbosolutPath() mehtod. it stores the file in path: /data/data/com.example.audio_demo/files/output.amr i wann store that in SDCARD.iso and how retrive that and play. any idea or example plz. thanks ...

In Android: How do I get variables/data from one screen to another?...

In android: I'm trying to take data from one activity/screen to another. Let's say I'm adding two numbers. I layout my first screen (xml) with 2 EditText views, a couple labels, and an 'OK' button. Now, I want to add the numbers that I've input into the EditText views. Let's say I input 2 and 2 (2 + 2 = 4). Now, when I hit the 'OK' but...

How to create a web link - after click browser opens

I need to create a simple link in my Android app. Let's say that it would display text "Google" and after user clicks on it, http://google.com opens in web browser. What is the easiest way to do this? The link should change color whhen it's in pressed state. ...

Display app name on two lines below the app icon

My android app has a two word app name, and the 2nd word doesn't fit on the first line below the app icon. The OS doesn't automatically carry the 2nd word over to the 2nd line so it just gets cut off. I was able to use a "\n" as part of the app name string instead of a space, and that forced the 2nd word to display on the 2nd line. Ho...

Android emulator internet

Hi all, Android, Eclipse, all running fine. However, my internet is coming in on eth2, not eth0. The emulator is defaulting to using eth0, i know this because if i re-wire my PC, i get internet in android. I don't really want to have to keep doing this, nor have the internet coming in via two ports. Does anyone know how to tell the em...

Android compare datetime

I'm trying to compare two datetimes but I can't get it to work. public void time () { Calendar c11 = Calendar.getInstance (); c11.add(Calendar.DAY_OF_YEAR, 0); c11.set(Calendar.HOUR_OF_DAY, 9); c11.set(Calendar.MINUTE, 0 ); c11.set(Calendar.SECOND, 0); Calendar c12 = Calendar.getInsta...

Android -- NotFoundException in layout editor?

Hello, I'm trying to extend a RelativeLayout object and include an embedded SurfaceView object that uses a png file in my /res/drawable folder as its background but I keep getting an error in the XML Layout editor. See the following code: public class StopMotionRelativeLayout extends RelativeLayout { private Context myContext; ...

Android: Filtering a SimpleCursorAdapter ListView

Right now, I'm running into issues trying to implement a FilterQueryProvider in my custom SimpleCursorAdapter, since I'm unsure of what to do in the FilterQueryProvider's runQuery function. In other words, since the query that comprises my ListView basically gets the rowID, name, and a third column from my databases's table, I want to b...