android

Hello, GridView Tutorial not working

I have followed the tutorial and can't seem to get it to work. Here's my code: GridView.java: package com.example.gridview; import android.app.Activity; import android.os.Bundle; public class GridView extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceSt...

Build a Database with 7 values already inserted.

In my application, after the user presses the appropriate button, an activity starts that creates a database with one table with two columns. The thing I can't seem to get is: I would like one of the columns to automatically fill with the days of the week so that when I return a cursor over the database for the listActivity, the days ar...

Mimic Context.getExternalFilesDir() prior to Android API Level 8?

Android API level 8 introduced the Context.getExternalFilesDir() method, providing a File object reference to an SD card path specific to your app. I am wondering how to mimic this as low as API level 5. I see there is a Context.getDir() method, but I can't tell from reading about it how this differs. ...

How do I use SAX to parse this type of xml file on Android

I have an XML file that looks something like this (received from a web service) <schedule type="XUZ " fromdate="09/14/2010" thrudate="09/14/2010" bay="" vin="" mechanic="" datetimestamp="09/14/2010 10:56:15"> - <date date="09/14/2010"> - <part id="845205" date="09/14/2010" time="08:00" date_sort="61983" time_sort="28800" du...

android reading user input in a service

I want to write an android app that would be a background service that would listen for either a specific gesture or key press in the and then trigger an action. Is it even possible to do such a thing with a service? If so could someone guide me the right direction. I have search high and low can could seem to find an answer. ...

Android: How to send and receive data SMS messages

I've found a few tutorials on how to send/receive text SMS messages, but none on how to send/receive data SMS messages. I have a very small amount of data I would like the users of my app to be able to share. I am able to send, but my BroadcastReceiver doesn't ever get called. It seems this is a known issue (http://code.google.com/p/an...

How can I add a menu item to launch the Send intent

Hi, I am trying to a menu item to launch the Send intent. This is what I did, I see the menu item but i don't see send intent launch when i select the menu item. public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { Intent sendIntent = new Intent(Intent.Action_Send); menu.add(Menu.NONE, 0...

Android Device Chooser - Debug column

When you debug from eclipse with more than one android device, you get the 'Android Device Chooser' dialog box to select with one to deploy the application to. That dialog has a 'Debug' column, what does that column mean exactly? One of my phone says 'Yes' and the other says nothing. And second part: I assume that the phone that says 'Y...

Android Intent-Filter only works for "am start" command, but not Live Folder item click

I have a Live Folder that lists custom content from a SQLite DB. When an item is clicked, the detail page for that item should be displayed using this URI: content://com.langley.app/item/detail/# (e.g. content://com.langley.app/item/detail/100). Whenever I test this using the "am start" command, the detail activity loads perfectly. Ho...

update Ui with TimeTask in android

I am running a countdown timer in android and i want to show this countdown to the user in an Activity with a TextView. How can i do this? Has any one done this before? ...

Register the Android App with C2DM

I am using the Emulator of version 8. and when i am trying to register the Android Application then it will gives the null registration ID. Please help me to resolve this issue. How can i register the Android Application with C2DM.My code is to register the App. Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGI...

Android: Problem in updating contact email address

Hi! I am updating contact using below code. I am unable to get contact detail by phone number. cursor count is always returning 0, please check it.I think m missing some thing. Need urgent help cursor = getContentResolver().query(Contacts.Phones.CONTENT_URI, null, Contacts.Phones.NUMBER+" = ?", new String[]{phoneNumber}, null); ...

Can a selector resource use a color defined in a style?

I'm trying to use a color defined in a stlyle in a selector but it is causing a Resources$NotFoundException. First I added a new attribute to attr.xml: <resources> <attr name="unread_background" format="color" /> </resources> Then I defined that attr value in styles.xml: <style name="ThemeNoTitleBar" parent="android:Theme.NoTitl...

dip notation not working - Android

Okay, from what I understand if I say <EditText android:layout_width="120dip" /> (With ID, height and all that good stuff added), it's supposed to create a text field that occupies 3/4th of the screen independent of the resolution of the screen. So why do I get a tiny little text box, with a width of not more than 20 real pixels on an A...

Android NDK running native processes.

I want to run tcpdump on the NDK using Process.start() and want to capture this output to a buffer.Can anybody show me how i can do this?Also is the process created in the same Dalvik Vm as the JNI call or is it in a different VM? ...

zoom control in webview.

how can i prevent zoom controls in webview from disappearing after zooming in or out. and these zoom controls always show up after sliding the webview i.e. zoom controls do not show up autmatically as soon as webview loads up. i have tried this code. webview = (WebView)findViewById(R.id.webview); //getWindow().requestFeature(W...

Calling a wcf web service in Android

Hi everybody, I'm trying to perform a web service call using a simple http request from an Android activity. The problem is that it works when the URL is NOT a microsoft webservice. I use the following code to call the "http://www.google.com" page and it does work: package com.android.myapp; import java.io.BufferedReader; import java...

Android webview zooming buttons

how can i prevent zoom controls in webview from disappearing after zooming in or out. and these zoom controls always show up after sliding the webview i.e. zoom controls do not show up autmatically as soon as webview loads up. i have tried this code. webview = (WebView)findViewById(R.id.webview); //getWindow().requestFeature(Window.FE...

Android project broken in Eclipse after ant build

Hi, I had a project working in Eclipse completely, but after compiling it with ant in order to use Proguard to obfuscate the code the entire project fell apart. The project consists of a single package containing two main activities and 4 helper classes to handle databases and such. After using ant the activities work fine but Eclipse ...

Prevent default animation (Right to Left)

I wanna disable the automatic slide in from right to left animation/transition. All new intents/activities in my app are supposed to have no animation. How can this be achieved? ...