android

problem with using button.setPressed(false); in android java code

Hi Everyone, I want to disable the button press on a 2nd click, so I have this code for the action handler of the button in my android code : // do something when the button is clicked public void onClick(View v) { final Button button = (Button)findViewById(R.id.radio_red); if(button.isPressed()==true &&...

android-Include a database at the time of installation

In android, I'd like to include a database at the time of installation i.e. in the .apk file. Is it possible to do that? I have some data in a database that I would want to use in the app. I don't want to use OnCreate method to create a database. So, where should I keep my db file so that it is accessible to the app after installation? ...

How to wait for all tasks in an ThreadPoolExecutor to finish without shutting down the Executor?

I can't use shutdown() and awaitTermination() because it is possible new tasks will be added to the ThreadPoolExecutor while it is waiting. So I'm looking for a way to wait until the ThreadPoolExecutor has emptied it's queue and finished all of it's tasks without stopping new tasks from being added before that point. If it makes any di...

Android - Layout Layers? Z-Axis?

I have seen numerous applications that use layering in their layouts. When I speak of layering I am referring to layers in the z-axis relative to the view of the user. One such app is the Craigslist Notification app where on top of the listView there is a plus sign near the bottom to allow user access to adding an additional list item. ...

add animation to android-wheel

Hello, I'm trying to update the project at http://code.google.com/p/android-wheel/ to act like the iPhone spinner/Urban Spoon App. I want to add acceleration/deceleration to scrolling, as well as a spinning animation. I just don't know where to start. I was able to get the whole control to slide with the built in android transitions ...

Android Bundle Error: Unmarshalling unknown type code

I'm working with a fairly complex data edit activity in Android that makes use of the bundle object a lot when saving form data. In general this works pretty well and I haven't experienced any data loss. However I have a strange intermittent bug that I can't seem to find the direct cause of. It happens when I send an intent to the gall...

scratchbox cross compilation for android

How to we setup scratchbox for android to do cross compilation?What type of target do we choose? ...

Android Image/DIP Questions

I am making a tile based game for Android. For the sake of argument, let's say I want to have 6 tiles across the top of the screen and that I want the tiles to fill the screen regardless of the phone I am using. The way I understand it, I want to be using Density Independent Pixels in my code to make sure that the images look the same ...

OnItemClickListener

I have an error that says "OnItemClickListener cannot be resolved to a type" when I enter this code in: package com.funkystudios.android.facts; import android.app.ListActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; public class activity2 extends ListActivity { @Override pu...

Android, Bad Socket Exception (SOCKS)

I tried to connect to a server through a SOCKS server in an Android client app (Android OS 1.5 and 1.6) with below snippet code: Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(Constants.SOCKS_PROXY_HOST, Constants.SOCKS_PROXY_PORT)); socket = new Socket(proxy); InetSocketAddress dest = new InetSocketAddress...

Android handle app updates and database changes

I have basically finished developing an android app that makes use of SQLite databases that I copy to the user data area on the device eg /data/data/com.company.app/databases/users.db I am unsure how the marketplace app update procedure takes place and am also unsure as to how I could test it. I currently check whether the database exi...

Dialog not visible but still interactive

We have an activity which requires additional authentication. During onCreate and onResume (never both) showDialog is called and a custom dialog is created in onCreateDialog to request a password. The information on the Activity screen is sensitive so before showDialog is called we call Activity.setVisible(false). If the password from...

Retrying an http connection

Hi, I'm making an http request. I'm on a platform (android) where network operations often fail because the network connection might not be immediately available. Therefore I'd like to try the same connection N times before completely failing. Was thinking of something like this: DefaultHttpClient mHttp = ...; public HttpResponse runH...

Hi,Will using open GL in android application reduce the system efficiency??

Please correct me if i am wrong about this concept I have heard that a processor without graphics card will take a lots of time to produce a graphical entity,than one with graphics card. So is there anything like that if we use Open Gl in android application?? will my application become slow ?? Please do reply me.. SRUTHI ...

Recording Call help needed

I am trying out the record outgoing call using mic written this code but not working, i tested the code for simple audio record it works fine, I am not sure when to start media record i putted start in broadcast receiver may be problem is there. Here Audiorecoder is another class is created where i have implemented MediaRecoder public ...

Handle OnResume and On Pause Videoplayer android

Hello In my android application i am playing both VOD as well as live content in which some includes download and play as well.' But the issue is like if the user receives a call while he is watching the videos,it says cannot play video . What should i write in OnResume and OnPause to make it work fine. PLease share your valuable sugge...

Android webkit.WebView and HTML5

Hi, is there any list which HTML5 features the WebView supports and which not? I am interested mainly in: 1) localStorage/sessionStorage 2) offline manifest 3) web sockets 4) web workers Prior there was lack of those features (http://www.mail-archive.com/[email protected]/msg60143.html), but in Android 2.1, first ...

how to parse xml string in android

Hi friends I want to parse the value of xml string in android my values are comine like this 2 give example Thanks ...

Using utility classes in the android programming

Hi Everybody! I have a little idea of the Utility Classes with a slight doubt on demand. If I use a Utility class in my Application than to use that class in my main Activity do I have to create the object of that class or I can directly Import that class in my main activity? I am Sorry if I am not making a clear sense. In the nutsh...

Android: Why to use a hashmap?

Hi, Someone told me hashmaps are rather slow. So I am just wondering whether to use a hashmap or simply a switch case logic. My requirement is this. I have a set of CountryNames and CountryCodes. My ListView displays the names of the countries. When an country name item is clicked, I must Toast the CountryCode. In such a scenario, sho...