android

Popup bar in Mail application

In the Android Mail application, when you click the checkbox next to an inbox message, a little bar with buttons (mark unread, delete, star) appears at the bottom of the screen. I'd like to do something similar, but I don't think I'm going about it the right way. What I've done is add a LinearLayout below my ListView and marked the vis...

Dismiss Custom Dialog Problem

I have a dialog with a custom layout, and I try to close it when I press a button: private void showAboutDialog() { dialog = new Dialog(MainMenu.this); dialog.setContentView(R.layout.about_dialog); dialog.setCancelable(true); dialog.setTitle(R.string.about_title); dialog.show(); LayoutInflater inflater = (LayoutInfl...

How to avoid this message in Android

I get the below error message in android. Finalizing a Cursor that has not been deactivated or closed. database = /data/data/com.example.Recipie/databases/recipedbase.db, table = recipes, query = SELECT DISTINCT title FROM recipes WHERE title="Mysore Pa" android.database.sqlite.DatabaseObjectNotClosedException: Application did not close...

Global Variable class not working

I am trying to setup and global variable, but I my app fails after adding the following line to my AndroidManifest.xml <application android:name=".MyApp" android:icon="@drawable/icon" android:label="@string/app_name"> I am using the following code as well: Class: package com.mynamecompany.datahelp; i...

Parsing json in Android

Can anyone send me link which has an example for parsing json in android with a detailed description? ...

Android - WallpaperService why does my Engine have to be a inner class?

Hey, I'm working on a simple android live wallpaper, I'm following chapter 12 from Hello, Android as my guide. The bare-bones of a wallpaper service looks like this: public class MyWallpaper extends WallpaperService { private class MyEngine extends Engine { //... } //... } According to the book MyEngine m...

javax.management in Android

Hi, I am using a library (ARQ, with Jena), that uses javax.management.ObjectName. Sadly, it appears that the package javax.management is not included in android. Has anyone else faced (and successfully bypassed) this issue? Pointers will be deeply appreciated. Thanks. ...

Android IME: how to show a pop-up dialog?

I'm playing around with some keyboard development and try to show a pop-up dialog when a certain key is pressed if (primaryCode == -301) { AlertDialog mDialog = new AlertDialog.Builder(CONTEXT) .setTitle("My dialog") .setMessage("Lets do it.") .setPositiveButton("ok", null).create(); ...

android add contact email

Im trying to insert a new contact into androids contact list. Adding a name and phone numbers works fine, but adding an email address doesnt work. My code: //name is a string //phone and email are string arrays ContentValues values = new ContentValues(); values.put(People.NAME, name); Uri newPerson = People.createPersonInMyContactsGroup...

How do I create a specific key for each control on a form in Android?

Trying to assign a key to each field in android to reference in Java. ...

Can Android do 2 channels of audio Bluetooth at the same time?

Any sample code out there for AUDIO? I have looked at the BT-chat example, but I want 2 channels of audio. One would be telephone and the other would be music... thanks ...

How to find the IP Address of HTC Incredible on a CDMA Network

How can I find the IP address of the an HTC incredible connected to Verizon's network? My other question - do I have to make any changes to my App to run it on a cellular network? Till now the App was running on a Nexus One connected to a local Wi-Fi network. Thanks. ...

httpsURLConnection.getInputStream() hangs

Hi all, i try to build an https client for android and i need do get some request of an Servlet but when i use the getInputStream method the applicaion hangs. There is no error only hanging when i call the method. String url = "https://.../Servlet"; try { mPushLiteConnection = (HttpsURLConnection) new URL(url).openConnection...

Android Licensing Verification Library server response codes

To anyone who has implemented Android Licensing Verification Library When you tested the following server response codes, did you get these two individual responses or did you get the NOT_LICENSED response code? ERROR_CONTACTING_SERVER and ERROR_CONTACTING_FAILURE It appears that I am not getting ERROR_CONTACTING_SERVER and ERROR_CONTA...

In Android, how to execute a service as a different user?

For example, is there any way to define a service to run as 'system' UID or GID? Or any way to add your app to the 'system' group? ...

Why does this Android FileOutputStream throw a NullPointerException?

There does not seem to be any Android manifest permission that needs to be set for file io. public class Device extends Activity { private static final Configuration config = new Configuration(); ... private boolean applyMenuChoice(MenuItem item) { switch (item.getItemId()) { ... case R.id.menuSave: ...

Xml parsing in android

Hi Friends, In android app, i want to send a php requeset, and am expecting a response in the form of xml, from the server. Can anybody provide pointers in this case. ...

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

Noise effect on Android background

Hello, A lot of new Android applications I've been seeing are using a noise effect on their backgrounds, usually a gradient. What interesting is that some applications use radiel gradients throughout their application with this effect, which would require a lot of disk space for the images. Now Android has GradientDrawable which can cre...

getFirstVisiblePosition() returns wrong value in Gallery View

I have a Gallery view created with a SimpleAdapter that extends BaseAdapter. It contains more items than what it can fit in the screen. So I'm using Gallery.getFirstVisiblePosition() and Gallery.getLastVisiblePosition() to get the first and last visible position. But these functions doesn't always return the correct values especially a...