android

i get error "android (name of project) has stopped unexpectedly

package com.iperetz1.android.testbutton1; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class TestButton extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle ...

Get table on the fly with sqlite

Hello, I've a code that display a list of items based on a custom adapter. To display a content of a table no problem but when I need to add a reference to many table it's another thing. Two solution are possible in my point of view: 1) Querying the database inside setViewValue (didn't investigate too much this possibility) or 2) Find ...

AppWidget only updates once

Hey everybody, i have a problem with an appwidget. It doesn't have a configuration activity. When i set android:updatePeriodMillis="10000" (i know this shouldn't be done but it's just for testing) in the emulator the onUpdate(...) function is called every 10 seconds. But when i install my app on my real phone (motorola milestone) onUpdat...

Android: Dummy .mp3 file on sd card which is a proxy for byte stream output of music?

Okey, this is a strange question so I need to explain some of the background for it. My car stereo (Alfa Romeo Blue&Me Bose) doesn't support bluetooth a2dp, nor has it an aux input. It does have a usb input which my Nexus One successfully mounts up with. However, all my music is now being streamed through the music service Wimp (simil...

When to Bind and UnBind to a LocalService from an Activity

Currently, I'm binding to a service in the onCreate() method of an Activity and unbinding in the onDestroy() method of the Activity. I've more than one activity binding to the same service. Am I using the correct lifecycle methods to bind and unbind? Thanks. ...

How to tell if notification shade is pulled down in android

I have a program that creates a notification if the application is not running. To do this, I have used the following code: public void onWindowFocusChanged(boolean focus) { inFocus = focus; if (inFocus) {//If this activity is in focus, fills data and clears notifications fillData(); Notify.clear(); } ...

How to get the default colors on Android

I have a custom component that I want to give the same colors as a TextView. That is, I don't want to copy its colors, I want to get the default background and foreground colors, if there's such a concept on android. [Edit] The following seems to yield the text color of my TextView. But is it just luck? It's not intuitive to me that a ...

Android - Switching Activities

I'm developing a android application that uses a ListActivity. In the method onListItemClick, I instantiate an object x. I have an Activity a whose constructor receives and object of the same type of x. How do I do to instantiate a and start it? Pretty much like this, but it does not work: protected void onListItemClick(ListView l, Vi...

what would be the best way to have an Android homescreen widget alternate between textviews?

I'm trying to create a homescreen Android widget and have it alternate between two different textviews I would send to it. Is this possible? ...

How do I convert a string to UTF-8 in Android?

I am using a html parser called jsoap, to load and parse html files. The problem is that the webpage I'm scraping is encoded in ISO-8859-1 charset while Android is using UTF-8 encoding(?). This is results in some characters shows up as question marks. So now I guess I should convert the string to UTF-8 format. Now I have found this Cla...

Howto: pass a username and password back into a webview securely

I have a user's name and password stored in their preferences. How do I go about passing it back into the webview in a secure way? I know if I do this it will work, but it just seems bad. There has to be a better way to post the variables. webview.loadUrl("http://mysite.com?name="+username+"&password="+somepassword); I've been loo...

ANDROID video capture

I need to make a video as a DEMO for one application I have developed.I know that there are some experimental applications that use DDMS and achieve a framerate of 5-6 fps. This framerate is completely insufficient for my purposes since the application has smooth animations that i would like to show. Is there anyone that has found a way ...

How does a push notification system works like on Y! Mail app?

I installed today from Market, the Yahoo Mail application and I was reading it offers push message notification technique. Indeed it works, as I got exactly the same moment the alert on my desktop computer and my mobile mail client. How is it accomplished? ...

How to change localization in my android app without going to the settings?

Ok i have an application with 2 different languages (english and german), how to change them from my application? When i click the Language button im using intent to com.android.settings.LocalePicker and from there i select the language. So instead of that i want to select English and German options from dialog box. I know how to create...

How to take out title and icon in alertDialog for Android

I need more room in a single AlertDialog and when I set .title to null it doesn't show a title but it also doesn't add any space to the AlertDialog. The dialog just starts that much lower on the screen. Not using setPosativeButton has the desired effect but I do want the close button. How can I set the AlertDialog so I can show my lon...

Android: popup to reboot phone

I would like to produce a popup window giving the user to ability to select yes to reboot the phone. Possible? ...

Connection my app to a WCF Service

Hi! Iam working on a app and I need to send data from my database, As I have udnerstood arch of android, I must use REST service. I have tried finding information but I can't. I have tryied with books, and none of the are showing how to connect the services, and how to create WCF service in asp.net. PLS. Help me out ...

Having routine problem debugging other people's android source code in eclipse - ADT plug-in might not be functioning properly

This might be a pretty basic question, or peculiar to my set up (hopefully not too peculiar) I am new to android development and have been playing around with the tutorials offered at developer.android.com. I don't have a problem with projects I create from scratch, but when I start a project from the android sample code provided at an...

Android OpenGL .OBJ file loader

There seem to be quite a number of OBJ mesh file loaders out there that people have developed for use on the Android platform. I'm wondering if anyone has any experience with these and can offer a recommendation on which one seems to work best for them. Here are my criteria: Lightweight (small file size), Optimized for speed, Easy to...

Save data in Broadcast receiver

I'd like to maintain a hash table in a broadcast receiver. If I understand BroadcastReceiver's life cycle currently it could get killed wiping out my member variables. What would be the ideal strategy for retrieving a hash table from a previous run of onReceive in the BroadcastReceiver? ...