[android-beginners] Simple button callback

2008-11-22 Thread Doughy
Hello, I am trying to create a very simple program that will change the text of a label object when I click a button. I have created the button and the label using the XML file, but now I have no idea how I can write the callback when the user presses the button. I tried reading the help file

[android-beginners] Handling Symbol Keys using onKeyDown

2008-11-22 Thread Secretly Mike Young
Hi there, I'm trying to use OnKeyDown to find out what key was pressed; however, when I want, say *, it always returns 8 (or rather KeyEvent.KEYCODE_8, or I can use any one of a number of KeyEvent methods to get the unicode value for 8, but not *). If I press Alt then 8, I'll get the key down

[android-beginners] Re: Simple button callback

2008-11-22 Thread Mark Murphy
Doughy wrote: I am trying to create a very simple program that will change the text of a label object when I click a button. I have created the button and the label using the XML file, but now I have no idea how I can write the callback when the user presses the button. There are hundreds

[android-beginners] HttpClient and POST requests

2008-11-22 Thread fala70
Hi, I've a problem to translate follow code to org.apache.http.*; OutputStream pos = new OutputStream(); pos.writeShort(Const.INVOCATION_CODE); pos.writeInt(requestId); pos.writeString(nickname); pos.writeString(password);

[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread Mark Murphy
fala70 wrote: Hi, I've a problem to translate follow code to org.apache.http.*; Questions related to the Apache HTTPComponents are best asked of the Apache HTTPComponents team: http://hc.apache.org/ -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android

[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread Adam Connors
Hope this is useful: 88: HttpPost post = null; 89: post = new HttpPost(url); 91: post.addHeader(Content-Type, multipart/related; boundary=\END_OF_PART\); 92: post.addHeader(MIME-version, 1.0); 93: 116: 117: HttpEntity body = new ByteArrayEntity(bodyBytes);

[android-beginners] Re: Simple button callback

2008-11-22 Thread Doughy
I only have a total of 7 samples in that directory. What version of the SDK are you running? On Nov 22, 5:52 am, Mark Murphy [EMAIL PROTECTED] wrote: Doughy wrote: I am trying to create a very simple program that will change the text of a label object when I click a button.  I have created

[android-beginners] Re: Simple button callback

2008-11-22 Thread Mark Murphy
Doughy wrote: I only have a total of 7 samples in that directory. What version of the SDK are you running? There are 7 sample projects. However, the ApiDemos has hundreds of sample activities. Virtually every source file in ApiDemos is its own mostly-standalone activity. In the emulator,

[android-beginners] Re: Simple button callback

2008-11-22 Thread Doughy
OK, I see what you mean. Thanks a ton for your help. I got my button callback working. Now I have one more question. Is it necessary to create the button and label objects in the main code, even though they are already declared in the UI XML file? For example, the only way I could figure out

[android-beginners] Re: Simple button callback

2008-11-22 Thread Sunit Katkar
I have looked at lot of examples but so far I have only seen findViewById() being used and the API also seems to have this technique only for accessing different widgets. - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials On Sat, Nov 22, 2008 at 12:38 PM, Doughy [EMAIL

[android-beginners] What should we focus on?

2008-11-22 Thread Q
Hi. I'm developing an android application which uses character recognition techonology. I'm currently eager to join to the android 2nd competition with my colleagues, and we have worked at 3 months on it. The application we making includeds a fucntion of character recognition but the recognition

[android-beginners] Re: Simple button callback

2008-11-22 Thread Mark Murphy
Doughy wrote: Is it necessary to create the button and label objects in the main code, even though they are already declared in the UI XML file? Only if you need to access them from Java. For example, the only way I could figure out to change the TextView text was to do the following

[android-beginners] Re: HttpClient and POST requests

2008-11-22 Thread fala70
thanks Adam, for your answer. I tried your instructions but when I call the execute I receive an IOException. Follow the stack log. Any idea ??? Also I tried to use the same Header, but without success. httppost.addHeader(Content-Type, application/octet- stream);

[android-beginners] Re: Where are the camera photos stored?

2008-11-22 Thread gymshoe
But what if your application needs to access a photo? Where is the photo stored on the device? thanks, Jim On Nov 14, 11:37 am, Sunit Katkar [EMAIL PROTECTED] wrote: Thanks Easan How silly of me..[?] I completely missed it . - Sunit On Thu, Nov 13, 2008 at 6:56 PM, Easan [EMAIL

[android-beginners] NullPointerException using RadioGroup

2008-11-22 Thread Allan Valeriano
Hi, I'm trying to create a radio button group using the resources and recover it on my Activity code, but I'm receiving a NullPointerException when I do that. Here is my xml code: ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;

[android-beginners] Re: NullPointerException using RadioGroup

2008-11-22 Thread Mark Murphy
Allan Valeriano wrote: Hi, I'm trying to create a radio button group using the resources and recover it on my Activity code, but I'm receiving a NullPointerException when I do that. Here is my xml code: ?xml version=1.0 encoding=UTF-8? LinearLayout

[android-beginners] Re: NullPointerException using RadioGroup

2008-11-22 Thread Allan Valeriano
That was exactly the problem. Thanks a lot! --Valeriano On Sat, Nov 22, 2008 at 10:10 PM, Mark Murphy [EMAIL PROTECTED]wrote: Allan Valeriano wrote: Hi, I'm trying to create a radio button group using the resources and recover it on my Activity code, but I'm receiving a

[android-beginners] Problem doing tutorial programming

2008-11-22 Thread automerc
Hello, I downloaded and set up the sdk and I was working on the Hello, Android! part of the tutorial, but I am having issues. When I ran the code nothing happens expect that a android simulator pops up in my screen. The doesn't seem to do anything and it doesn't look anything like what it should

[android-beginners] Problem doing tutorial programming

2008-11-22 Thread automerc
Hello, I downloaded and set up the sdk and I was working on the Hello, Android! part of the tutorial, but I am having issues. When I ran the code nothing happens expect that a android simulator pops up in my screen. The doesn't seem to do anything and it doesn't look anything like what it should

[android-beginners] MMS Messages

2008-11-22 Thread xP08
Hi. I just wanted to know if someone is working or have any idea on an app that could possibly save pictures on the SDcard received via MMS. I'm kind of disappointed right now that G1 can't save pictures received via MMS. We can only save pics from browser and e-mails. p

[android-beginners] Re: Handling Symbol Keys using onKeyDown

2008-11-22 Thread Secretly Mike Young
As is typical with questions that I ask, I found the answer soon after posting. The answer was to create a character map. So, I have this line in my OnCreate: mKMap = KeyCharacterMap.load(KeyCharacterMap.BUILT_IN_KEYBOARD); and this line in my OnKeyDown int c = mKMap.get(keyCode, (mToggleAlt ?

[android-beginners] Re: Progress Bar before an Activity

2008-11-22 Thread for android
http://code.google.com/android/reference/android/os/Handler.html#post(java.lang.Runnable) On Thu, Nov 20, 2008 at 7:47 PM, Siva [EMAIL PROTECTED] wrote: Hi, I have a requirement where when I click a menu option, I invoke a new activity. This new activity takes a little long time to display.