from-irc

Android and RESTful services

In Virgil Dobjanschi talk during Google I/O he mentioned using Services for doing the fetching and then using a callback to notify the Activity when this was completed. He never went into specifics on how to implement this callback and I can't seem to find anything helpful on this topic anywhere. I think he said that you didn't need to ...

How do I create an intent to launch any e-mail app?

I have found various topics here and elsewhere on creating an intent for sending e-mail and that seems to be pretty straightforward. I'm looking for an intent to just launch any e-mail client the user might have. Here is the code I've seen for sending an e-mail (posted just for reference, this doesn't serve my needs as I don't want to s...

2 Apks running in 1 process (sharing code and data)

Hi, I know there are many posts around the issue I am facing but I havent been able to see any yet which addresses my issue. This is what I am doing: Create 2 apks. (1 with an activity - lets call it F1App and 2nd with a service - F1Service) Both APKs have same sharedUserId and same android.process and are signed with the same key - ...

Android -- Support 1.6+, and Support for Deprecated Code in 1.5?

Hello, I'm trying to build a app that uses the SmsMessage class but there are two versions depending on the API level of the device: android.telephony.gsm.SmsMessage (deprecated for 1.6 and above) android.telephony.SmsMessage (the new class for 1.6 and up) I want to target 1.5 and yet have the newer class (android.telephony.SmsMessag...

Google Gears Database performance

I made a javascript class that let me use gears or html5 (if available) storage to store an stringified json object. the code is ment to be use on Android 1.5 and 2.0. When I save many objects into gears, it's very slow even on a PC (google chrome / gears). The CPU doesn't go high but the page gets unresponsive for 45 sec. On a cellphone...

UrlConnection working with Java code but not for Android - use in Digest Authenticated Server

I'm using URLConnection to connect to the main server. The server implements digest authentication. If I connect to the server with java library, the connection is successful. But if I use the same code for android, the connection is rejected for the reason - username and password do not match. Here is the code for my Java project: imp...

how gridview is populated with customized imageviews from the image adapter

Hi, The sample code of hello-gridview implements an image adapter to populate the gridview with a series of customized imageviews. the getview method in image adapter is implemented to customize image views. I am wondering how this method is utilized to populate the gridview. It looks like that the population is based on the integer arra...

problems with the old and new Contact API

here's a few things i couldn't figure out and could find anyone else posting them in the discussion: 1. In the new API ContactsContract.AggregationExceptions table does not really work for me: when I try to insert a row into the table, it gives me this error: 07-13 14:20:09.399: ERROR/XXXXX(3074): java.lang.UnsupportedOperati...

Problem with Anroid Multicast Sockets

Hello folks, I'm running some code on the nexus one - and I am having a very strange issue. The "server" sends UDP packets out on the multicast socket that the phone is joined to. The phone receives and sends stuff to the multicast group fine, but it appears that the phone chokes when it receives a large number of packets at one time. ...

opening another activity from the map overlay dialogs

I am trying to create a map application and I need to do something similar to what Google Maps does. I want to open show a list of locations and when user taps on them I want to show a dialog. I was able to do it till here. But now when the user clicks on the dialog that opened I want to show another acttivity with the details of that i...

NotFoundException and FileNotFoundException when running app on Android 1.5

I'm trying to backport an android 1.6+ application to android 1.5. Following the advice here... http://comments.gmane.org/gmane.comp.handhelds.android.devel/97051 http://groups.google.com/group/android-developers/browse_thread/thread/ff22f6e42a4a46d2/4201a20aaa23069d http://stackoverflow.com/questions/2923823/android-2-2-sdk-breaks-co...

Android -- How to pause/resume/cancel a running animation?

Hello all, I'm creating an app that targets Android 1.5 and up and I can't seem to find a way to pause/resume/cancel a running animation. Does anyone here know how to do these 3 things? More Info: I create a custom AnimationSet (which I add 2 ScaleAnimations to when needed) and set at AnimationSet as the animation for an ImageView. I ...

Android Multicast Socket Performance

I seem to be having some trouble transmitting files to an android phone using multicast sockets. The files vary in size, but none are more than 1MB. The algorithm that I am using is structured to handle for lost packets (by asking for those packets again) and out of order packets --- but sometimes it just doesn't work on android. Sometim...

Inconsistent results connecting to a specific Wifi Access Point

Hello, I'm working in an application that (among other things) will connect to an specific device that is acting as an open Wifi Access Point and send some configuration commands to it. I'm currently creating the configuration for the network: WifiConfiguration config = new WifiConfiguration(); config.BSSID = bssid; config.priority= 4...

best practice for specifying pronunciation for Android TTS engine?

In general, I'm very impressed with Android's default text to speech engine (i.e., com.svox.pico). As expected, it mispronounces some words (as do I) and it therefore occasionally needs some pronunciation guidance. So I'm wondering about best practices for phonetically spelling out those words that the pico TTS engine mispronounces. F...

How can I create a widget against a background image that is touchable and dragable?

I am trying to create an application that has a background image with widget like objects that can be touched and dragged. Think of a chess set app where you can touch and drag a chess piece to the target square. I've poured over the samples but I just can't seem to get it. I thought widgets might be the answer, but they are more for ...

Android viewflipper flicker

I have a ViewFlipper with multiple views added dynamically. I override onTouchEvent (and onInterceptTouchEvent) in order to get the down, move and up events on the views, so I know when to animate left and right. Now everything works fine, except that there is a small flicker (one of the other views is displayed on top for a split secon...

multiple optional Android packages, an AccountManager implemented somewhere among them

I spend most of my time in an environment where I can package code with dependencies that are resolved at install time automatically. That's nice. I can install any item and the library needed to support it is automatically added if it doesn't already exist. In Android, this isn't yet possible, so I need another way to share some reso...

Add a GridView to a ListView in Android

I'm trying to create a ListView that will consist of to types of elements: Strings and a GridView. I.e. putting both Strings and a GridView inside one single ListView. The layout should look something like this: String Item 1.1 String Item 1.2 String Item 1.3 String Item 1.4 GridView Item 1 GridView Item 2 GridView Item 3 Gr...

Android IndexOutOfBoundsException

I'm getting crash reports from my app in the marketplace throwing an IndexOutOfBoundsException outside of my code with the following stack trace: java.lang.IndexOutOfBoundsException: charAt: -2 < 0 1. android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:110) 2. android.text.TextUtils.getCapsMode(TextUtils.java:1573) 3....