android

Interfacing Android Nexus One with Arduino + BlueSmirf

I'm a bit new to all of this, so bear with me - I'd really appreciate your help. I am trying to link the Android Nexus One with an arduino (Duemilanove) that is connected to a BlueSmirf. I have a program that is simply outputting the string "Hello Bluetooth" to whatever device the BlueSmirf is connected to. Here is the Arduino progr...

contacts quey with name and picture URI.

Hi i couldn't find a single query that would give me in API 2.0 of the contacts API the URI of the contact's image and the display name. For now as far as i know i can create a uri by having the contact's _ID , but i didn't see any row name that i can use in the projection of Data or Contact to get all that i need. can anyone help ? ...

GLSurfaceView layout problem

My application should display a TextView, a GLSurfaceView and another TextView at the bottom of the screen, all within a vertical LinearLayout. When I run the application in the emulator or on my N1 device, the bottom-most TextView is not visible. Following an example on-line, I tried encapsulating the GLSurfaceView within a FrameView, b...

Dynamically Generating Dalvik Bytecode into a running Dalvik/Android application

Hi all; This question has been asked(and answered) many times about dynamically generating and loading java bytecodes at runtime into a running Dalvik VM, but is there any way to load dex files/bytecodes into an app at runtime? Thanks ...

How to specify lib folder for JARs when using Android-generated ant build file ?

Im using an ant build file that has been generated by android. Our Android application requires a JAR file that lives inside the lib folder of our project, so I need to adjust the classpath that ant is using when it builds stuff. When I run: ant -lib lib debug the project builds just fine, but this should really be inside the build f...

Can I make the webview take only a port of the screen?

I am trying to make a webview to open on the bottom of the application to display little information but it keeps taking the whole screen and covering other widgets with information. Is there a way to make it have a certain size and place on the application? ...

Android: more scrolling woes

Alright, so because of this question which I asked previously, I found out that you cannot know the scroll position of a WebView. I followed advice to put my content in a ListView instead. There's now a new problem. All I am trying to do is tell when a certain part of the view scrolls past the bottom edge and the top edge of the screen....

how to customize list view item spaces between them?

Hi, I want to customize list view item spaces between different items. We generally display list item with default space between them to get viewed in list.I want to customize the space difference between them so that more data can be displayed in the list within the display part at a time. Please provide me some solution . Thanks in ...

Setting unique key constraint for Db4oEmbedded EmbeddedConfiguration

Hi, I want to set unique key constraint for Db4oEmbedded EmbeddedConfiguration. Here goes my code: EmbeddedConfiguration myConf = Db4oEmbedded.newConfiguration(); myConf.common().objectClass(NotyUser.class).objectField("username").indexed(true); myConf.common().add(new com.db4o.constraints.UniqueFieldValueConstraint(NotyUser.class, "...

Android Lightweight HTML Template Engine

Hello, I am after a very lightweight template engine that supports / can be embedded inside Android programs. I've looked at the MiniTemplator (I think that is how you spell it) and that looks great but it loads in only from file and I need to load templates from string and I am not fully confident in changing that code lol. Can anyone ...

CheckBox checked state in a ListView

I'm using a ListView with CheckBox, but as most of you know, when you roll down the scroll, a checked CheckBox gets unchecked as you roll up back the scroll. So i've been reading and i found out that you can pass (using getView) the id of the CB to the position parameter of getView to save the CheckBox state! But i can't use getView wit...

Is AlarmManager.setRepeating idempotent?

In my android app, I'm setting an alarm that I want to occur repeatedly, hence using AlarmManager.setRepeating(). I don't want to keep track of whether the alarm is set myself (sounds like a bad idea that's prone to fail at some point), and there seems to be no API support for checking whether a particular alarm is already set for a giv...

Can't update contact details in android using code

I'm trying to update/change contact ringtone using this code: ContentValues values = new ContentValues(); values.put(ContactsContract.Data.CUSTOM_RINGTONE, "D:/TempDownloads/BurpSounds/Alex.wav"); getContentResolver().update(ContactsContract.Contacts.CONTENT_URI, values , "DISPLAY_NAME = 'Ani'", null); I get the message: " the applic...

Writing text on icon of Menu in Android?

Hi, Can we set Title for a Menu Item in Android if it has an icon from drawable? I have a icon for a Menu Item and if I set the icon then the title that is set for that Menu item is not visible. Is this possible or not? Hope to get a reply soon. Regards Sunil ...

Themes in Android?

Hi All, i have an Idea to create Themes for Android Mobile. But i have no knowledge on that. i would need to know about the things what is the file format of theme for android? what kind of things i want to handle to change the themes.(i.e background, directory window, wallpaper, icon slector style,etc like that.) how to start to lear...

starting subactivity for the second time causes java.lang.OutOfMemoryError

Hi there, I am developing a simple app which does a little bit of image-processing. It's divided in two activities; the main one with some display elements and the second one which is used to capture images off the phone's camera. To discribe my problem: I start the app, capture an image (by starting a new Intent with the subactivity) a...

PreferenceActivity not showing twice on android

Hello there, i've a PreferenceActivity which works perfectly the first time i launch it. But if i close it ( with the back button ) and then i re open it ( through a menu click in the main activity ) then i get a black screen. There is no preferences at all.. I can't figure it out why it should not working. It seems all the code is b...

My PreferenceActivity does not show up, even though it is in my manifest file

So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions. Here is my preference class : package com.p.t.wallpapers.mywallpaper; import com.p.t.wallpapers.mywallpaper.R; import android.content.SharedPrefe...

Creating folders using Android SDK

Is it possible to be able to create a folder on the sd card of the phone via using Android SDK or the Shell? ...

Defining Z order of views of RelativeLayout in Android

I would like to define the z order of the views of a RelativeLayout in Android. I know one of doing this is calling bringToFront. Is there are better way of doing this? It would be great if I could define the z order in the layout xml. ...