android

running android app in eclipse

I am new in Android. I have downloaded the Ecllipse 3.4 and Integrate with ADT and Android SDK r06. But Problem is that My Simulator is not working, It opens Properly but screen Shows only "ANDROID.." What should i do. please help. ...

Custom criteria for Android Market Filter?

I have been trying to make my application available on Android Market, only to specific individual accounts/devices. Is there any way to specify an arbitrary Market Filter? It currently has filters for country/carrier, but we need a finer grained filter than that. I thought about adding my own system library and specify it in <uses-lib...

Adding a library/JAR to an Eclipse Android project

This is a two-part question about adding a third-party library (JAR) to an Android project in Eclipse. The first part of the question is, when I try to add a third-party JAR (library) to my Android project I first get the problem of Error parsing XML: unbound prefix because I'm trying to use a class from that JAR (and need the pre...

Calling Looper more than once causes "sending message to a Handler on a dead thread"

I am using an Executor [fixed thread pool] with my own ThreadFactory that adds a Looper: Handler HANDLER = new Handler(); Executor THREADS = Executors.newFixedThreadPool(THREAD_POOL_SIZE, new ThreadFactory() { @Override public Thread newThread(Runnable runnable) { return new MyThread(new Runnable() { @Override...

[Android] Show default selection color for custom listview

Hello, I have a listview with a custom BaseAdapter. Each row of the listview has a TextView and a CheckBox. The problem is when I click (or touch) any row, the textview foreground becomes gray, instead of the default behavior (background -> green, textview foreground -> white). Here is the code: row.xml: <?xml version="1.0" encoding=...

How to diagnose in Android (RadioGroup in ScrollView)

I wanted to place a working RadioGroup inside a ScrollView. This main.xml caused the app to blow up on load... "Sorry! The application... has stopped unexpectedly. Please try again. Force close" <ScrollView> <RadioGroup android:id="@+id/types"> ... And this worked <ScrollView> <RadioGroup ...

Creating layout dynamically from template

Is it possible to load a layout XML at runtime and load into activity? In my app, I have various types of data like Person, Company, City, etc; The requirement is to dynamically load the layout, find views by tags (property names like Person.name, Person.address) and then fill in data. For example, if user has selected an object of type...

Compiling phonegap application problem

I've followed the installation instruction to the letter. I've installed the latest JDK ADK ApacheAnt and Ruby installations. I've setup the JAVA_HOME, ANDROID_HOME, ANT_HOME paths, and added JAVA_HOME\bin; ANDROID_HOME\tools; ANT_HOME\bin; phonegap\bin to the path. However, when i try to run: C:\phonegap\bin>ruby ./droidgap c:\android-...

How to tell when AudioTrack object has finished playing?

I'm trying to play a PCM file in Android using the AudioTrack class. I can get the file to play just find but I cannot reliably tell when playback has finished. AudioTrack.getPlayState says playback has stopped when it hasn't. I'm having the same problem with AudioTrack.setNotificationMarkerPosition, and I'm pretty sure my marker is set ...

Using XMPP over GTalk server to enable my app to comunicate without showing the user is online.

Hi! I'm currently writing an Android app that should be able to communicate in real time with another app hosted in Google's app engine. Since I can't use sockets in GAE, I though maybe using XMPP over GTalk server would solve my problem. But that way the Android app would be connected to the users account and thus showing the user as b...

How to get Android crash logs?

I have an app that is not in the market place (signed with a debug certificate), but would like to get crash log data, whenever my application crashes. Where can I find a log of why my app crashed? ...

read android dmesg with code

Hi, How can I read dmesg output in my program? Thanks.. ...

Android ListView: Doesn't highlight on touch, but works when I use the trackball

I am using a couple of ListView elements in my app. In all cases, it doesn't highlight the selected item when I click/touch it, but I can use the trackball to scroll up and down, and can see the orange highlighted color then. How do I fix this? For e.g., one of them is a LinearLayout with two TextViews in it. ...

Cannot retreive a color from colors.xml through a custom resource?

Hey all, thanks for helping. I'm going through an Android tutorial and I'm trying to access a color I've defined in colors.xml <color name = "my_background">#3500ffff</color> Then I'm trying to access this color by name: Paint background = new Paint(); background.setColor(getResources().getColor(R.color.my_background)); but it doe...

Android ActivityManager killBackgroundProcess not working

I am using eclipse. I am trying to kill a process in my application. However, in eclipse it does not seem to know the hint for killBackgroundProcess from the ActivityManager and it will not let me proceed. I read that you have to have permissions to kill background processes and already added the permission which it did not recognize eit...

Putting the system to sleep on Android

I'm developing an application for Android 1.6 and newer which contains a functionality that switches the phone to sleep. I tried to find a way of how to do that and I found the goToSleep method in the PowerManager class, but unfortunately the usage of that method requires android.permission.DEVICE_POWER permission which is a system leve...

trouble passing data between Activities using Intents and setResult()

I am having trouble passing data from one activity to another. I can easily use startActivityForResult() to send an intent with the original data and then manipulate this data in the new Activity. I then use setResult() in the onPause() function of this new Activity to return some data in the Intent object. Doing this calls onActivityR...

What's the best way to check if the view is visible on the window?

What's the best way to check if the view is visible on the window? I have a CustomView which is part of my SDK and anybody can add CustomView to their layouts. My CustomView is taking some actions when it is visible to the user periodically. So if view becomes invisible to the user then it needs to stop the timer and when it becomes vi...

Android Notepad3 run-time error forece close

When I run the Notepad3 tutorial, I got this error message: The application com.android.demo.notepad3 (process com.android.demo.notepad3) has stopped unexpectedly It force close. What's wrong? ...

Android: button in IME's suggestion bar not clickable

I'm subclassing InputMethodService to create my own personal keyboard. A lot of stuff already works quite nice. But now I'm playing around with the suggestion bar (also called "candiate view"). For now I'm just trying to load a static layout with one button in it: @Override public View onCreateCandidatesView() { LayoutInflater mLayoutI...