android

Android:Playing bigger size audio wav sound file produces crash

Hi Android experts, I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(1...

How to draw and scale a bitmap on a canvas using bicubic interpolation in Android?

I want to draw a bitmap on a canvas with bigger size than it is. I can use canvas.drawBitmap(bitmap, null, destRect, null); but that gives a poor quality, as the result is pixelated, if the source image is sightly smaller than the destination rectangle. How can i draw my bitmap using bilinear or bicubic resampling? Any help would be a...

Compiler can not find AndroidInstrumentationTestCase2 when building Android app test code with Android makefile build system

I have a project with some Android test code in it (with the appropriate elements, <uses-library> and <instrumentation>, added to AndroidManifest.xml). This works fine in Eclipse. However, it fails to build with mm, claiming that it can't find the test-runner classes: /home/orospakr/code/my-android/packages/apps/MyApp/src/ca/orospakr/...

image attachment to a mail.. how in android?

hi all, i can pick a image and its path using intent. with the use of that path of an image. i have to set that image as attachment of the mail's body content. how its possible in android??? ...

key event in Android

Hi, The currently key events listener provided by android "onKeyUp", "onKeyDown" are associated to an activity , so they are notified of the key events if the activity's views are focused . What I want is to be able to increase/decrease the volume by pressing some of the device's key , without writing a listener in every activity , e...

Does startService() create a new Service instance or using the existing one?

Does startService() create a new Service instance or using the existing one? For example, in the following code, does it create two UpdateService instances or just one UpdateService instance? Thanks. int[] appWidgetIds = new int[] {1, 2}; for (int appWidgetId : appWidgetIds) { Intent intent = new Intent(context, Update...

Launch market place with id of an application that doesn't exist in the android market place

I am creating an application that checks the installation of a package and then launches the market-place with its id. When I try to launch market place with id of an application say com.mybrowser.android by throwing an intent android.intent.action.VIEW with url: market://details?id=com.mybrowser.android, the market place application do...

Android check for dependent application during installation?

Hi I want to publish my application (ABC). Its an audiobook file(just for example.) wrapped as apk. When the user install this application it needs to check whether another application (XYZ) already installed or not. If not let the user know they have to install the application XYZ first before installing ABC. Thanks in advance Raj...

Android Compound Control internal click events

Hi, I'm writing a custom compound control that extends RelativeLayout. Inside this component, there is an ImageView. I add a OnClickListener to this ImageView to animate it when the user clicks on it. But when I am in an activity using this control and I add a OnClickListener on the control, this listener is never called. It only works w...

How-Tto write a custom filter for ListView with ArrayAdapter

Hi List! I have a ListView which is connected to a ArrayAdapter where Artist is a simple class of mine, that has only an id and a name. Now i want to filter the ListView so i call: artistAdapter.getFilter().filter("bla", new Filter.FilterListener() { public void onFilterComplete(int count) { Log.d(Config.LOG_TAG, "filter c...

Published Android apk gives error "Package file was not signed correctly"

I recently uploaded my application to the android market however it's refusing to run when downloaded due to the error Package file was not signed correctly I first published the packet using eclipse, right click export, creating a keystore then publishing, however it refuses to work. I then downloaded the keytool and jarsigner an...

SPP Socket createRfcommSocketToServiceRecord will not connect

Hello, I want to use Android 2.1 to connect to an external Bluetooth device, wich is offering an SPP port to me. In this case it is an external GPS unit. When I'm trying to connect I can't connect an established socket while being in the "client" mode. Then if I try to set up a socket (being in the server role), to RECEIVE text from my P...

Android - Linkify, autoLink remove text color change on touch

Let's say I have following text in TextView: Hey there, visit www.example.com If I set TextView's attribute autoLink="all" www.example.com will be properly detected. However, if I now touch TextView, TextView's text that's not link ('Hey there, visit' part) will go gray. Is there a way to prevent this behavior? Thanks! ...

Message Oriented Middleware for Mobile Device Development

I would like to write a application for mobile devices (blackberry and android). Is there a (free) client to connect to a MOM? The MOM should guarantee message delivery even if the connection is closed and reopened. We thought about using jms, but is there a free client that works on these platforms? XMPP could be another alternative. ...

Android, how to use DexClassLoader to dynamically replace an Activity or Service

I am trying to do something similar to this stackoverflow posting. What I want to do is to read the definition of an activity or service from the SD card. To avoid manifest permission issues, I create a shell version of this activity in the .apk, but try to replace it with an activity of the same name residing on the SD card at run time....

LinearLayout of a WebView and a Button.

Hi, I recently struggled with an apparently simple Android layout: I wanted a WebView above a Button. It worked fine with the following parameters: WebView: Height: wrap-content Weight: unset (by the way, what is the default?) Button: Height: wrap-content Weight: unset However if the web page became too big it spilled out ove...

Making a jar of an android project to use in another android project?

Hi, I made an android project using eclipse. It looks like: src/ ActivityMain.java lib/ Square.java Circle.java I want to export only the /lib package really as a jar (don't want to include stuff at the top level like ActivityMain.java). Are there any special rules I need to be aware of before jar-ing this for use i...

NullPointerException using EndlessAdapter with SimpleAdapter

Hello, I am using EndlessAdapter from commonsguy with a SimpleAdapter. I can load data when I make a scroll down without problems, but I have a NullPointerException when I make a scroll up. The problem is in the method @Override public View getView(int position, View convertView,ViewGroup parent) { return wrapped.getView(position...

Using listpreference and getting the key works but no ok button...

I'm using listpreference in my android app and getting my key values and all is well and works good (now that you guys have helped me) BUT - when my listpreference menus popup, they only contain a cancel button. Let's say the user is choosing between red, blue, and green. When the listpreference dialog first pops-up, the dialog only sho...

Gmail Sync on Android phone

Android has the Gmail push features, which means the new message arrives in the mailbox without checking or refreshing the mailbox. As I understand, the sync processes are like these: 1) User turns on the sync 2) There will be a alert msg and the sync flag in the Gmail DB of this device will be True 3) When a new email reach the Gmail S...