from-irc

Is it possible to for a ServerSocket object to accept a connection request in 3G?

I have been trying to setup a Droid to Droid 3G connection. I can confirm that all works great in wifi mode. The Droid can make connection requests (Http, Telnet, raw sockets) in 3G, but I cannot get the Droid to accept a socket connection in 3G mode. I am using the java.net.ServerSocket class. If anyone knows how to program the...

how to use the photo picker and specify a folder

I've been looking into the photo picker which I want to use as part of an application I am developing. I have set up the picker to respond to intents and have tested it in my application. However the way I am hoping to use the photo picker is to restrict it to a specific folder on the SD card. Is this possible, I have looked through the ...

What is the contract for constructing SlidingDrawer widget ?

I tried to construct SlidingDrawer widget programmatically, but had no luck. The JavaDoc says the constructor needs "AttributeSet attrs" parameter, which is "a specified set of attributes defined in XML". I provided my own implementation of AttributeSet interface, with all the attributes mentioned in JavaDoc, but got a weird ClassCastEx...

Does an Intent's extras still get flattened into a Parcel even if the new activity is being started within the same task?

I was wondering... So if you start a new activity via an intent, the intent has to be serialized and deserialized because you may have to send the intent to a separate VM instance via IPC. But what if the PackageManager knows that your new activity will be created on the current task? It seems like a reasonably Googly optimization wou...

How can I discover zeroconf (Bonjour) services on Android? I'm having trouble with jmDNS.

I'm working with a Droid / Android 2.0.1 and encountering an issue apparently many people have: I'm unable to discover services using the one pure-Java zeroconf library I know of, jmDNS. (Apple's Bonjour, while it works on Linux and Windows Java, I believe would be harder to port to Android because of reliance on native code.) I can cre...

TableView with section & Index

could anyone point me to some examples on how to achieve Tableview with section and Index on Section. Similar to one it's in iPhone => http://www.iphonesdkarticles.com/2009/01/uitableview-indexed-table-view.html ...

9patch border issues

Is there a trick to making 9patch images with single pixel borders? I'm not talking about the single pixel black borders that you use to define the stretchable and content areas. I'm talking about the image itself. If I create an image that has a 1 pixel border around it, often times android will pick one of the edges and stretch it ...

Android Eclipse test projects cannot be used with a project being built in an Android build tree

An Android Java project placed in a git repository and built in an Android tree in /packages/apps needs to have the project files located at the root of the git repository. This is problematic for creating a complementary Test project, which should ideally be included in the same git repository so commits are atomic for both code and te...

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/...

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:layout_alignParentBottom is ignored when used without explicit layout height as a row in ListView

When I use a RelativeLayout with either fill_parent or wrap_content as height and an element which specifies: android:layout_alignParentBottom="true" it is ignored and it is aligned at the top. Setting the height of the RelativeLayout to an explicit value makes it work. Any clues? ...

How to View Android Native Code Profiling?

I started my emulator with ./emulator -trace profile -avd emulator_15. I then tracked down the trace files to ~/.android/avd/rodgers_emulator_15.avd/traces/profile, where there are six files: qtrace.bb, qtrace.exc, qtrace.insn, qtrace.method, qtrace.pid, qtrace.static. I can't figure out what to do with these files. I've tried both d...

Android -- Can't play any videos (mp4/mov/3gp/etc.)?

Hello all, I'm having great difficulty getting my Android application to play videos from the SD card. It doesn't matter what size, bitrate, video format, or any other setting I can think of, neither the emulator nor my G1 will play anything I try to encode. I've also tried a number of videos from the web (various video formats, bitrate...

Profiling Android Native Code: "undefined reference to `mcount'" and "warning: -ffunction-sections disabled; it makes profiling impossible"

I was able to get profiling information for native code. 67.5%-75% of my time is spent in one (unknown) block, so to get more information, I went back to recompile the native libraries. I added -ggdb and -pg to my flags, then attempted recompilation. This gave me a "warning: -ffunction-sections disabled; it makes profiling impossible"...

android analytics tracking issue with sdk1.5?

I need to use google analytics tracking for my app and it says that it is supported with versions 1.6 and higher. But my app runs on versions 1.5 and higher and right now it does not have an issue when I add the tracking code to my manifest. <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported...

How do I use PackageManager.addPreferredActivity()?

In SDK 1.5 I was using the PackageManager class to set the preferred home screen to be my app using PackageManager.addPackageToPreferred(). In the new SDK (using 2.1) this has been deprecated so I'm trying to use addPreferredActivity() for the same result but it's not working as expected. Some necessary background. I'm writing a lock sc...

Is the video recording possible in the background service?

Hello, All. I've tried video recording in the background. But had failed. Under normal circumstances, the recording works properly. However, if HOME key down-> Home screen or Other Activity is running, recording terminates. In such a situation, I want to record continuously. I want to record whole process! What should I do? thanks. ...

How to display a pic selected from phone to a local html in the Webview

Hi all, I am developing a small application in Android. I come across a problem, and not sure whether it is possible in Android platform. I have some local html files. There is an Activity contains a webview, which is used to display these local html files. In some cases, I want to display a picture selected from phone into one of thes...

Show context menu when link is long pressed in TextView

I have a TextView with its MovementMethod set to LinkMovementMethod. Text added to the TextView is a combination of normal text and URLs. For URLs, I would like to offer a context menu when the URL is long pressed for doing things such as copying the address. I've had a look at the source for LinkMovementMethod but it doesn't seem to hav...

Programmitically accessing internal storage (not SD card) on Verizon HTC Droid Incredible (Android)

Hello, I'm trying to find information on how to programmatically access the HTC Droid Incredible's supposed 8GB of internal storage. To determine the external storage (SD Card) location, I'm using android.os.Environment.getExternalStorageDirectory(). I've not been able to find any corollary for internal phone storage. In examining HT...