[android-beginners] Re: listview height
Yes I tried that thanks. I ended up just setting a static height. Everything I read says not to embed a listview in a scrollview (from the experts). Seems kind of short sighted to me. A listview offers a lot more than just the fact that it can scroll. On Oct 24, 2009 9:00 PM, "Justin Anderson" wrote: Try giving the view a higher layout weight in the xml... android:layout_weight="" Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Oct 22, 2009 at 5:58 PM, Jeffrey Blattman < jeffrey.blatt...@gmail.com> wrote: > > i have ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Screen flip vs back button
Hi, I need to know the difference between flipping your phones keyboard out and pressing the back button. I was under the impression that flipping went to onStop then onStart (skipping onDestroy) but this does not seem to be the case. Basicaly, if the user pressed the back button I want to run a restart () method but if the user flipps the screen out I don't want to do anything. How would I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to use IntentReceiver? Where is this class?
Hi all, I see some examples about IntentReceiver, but seem this class is no longer available in the present SDK 1.5,16, anyone can tell me if it's really not available, if so, what class can I use instead of it as well as an example. jaboho www.codemobiles.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: listview height
Try giving the view a higher layout weight in the xml... android:layout_weight="" Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Thu, Oct 22, 2009 at 5:58 PM, Jeffrey Blattman < jeffrey.blatt...@gmail.com> wrote: > i have a listview that is enclosed in a few other views. the view height > of the listview is only about the size of one entry. i can't seem to figure > how to make the listview expand to show more entries at a time. i'd like to > be able to set the max height of the listview, or something like that. > > any ideas? > > -- > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~--- <>
[android-beginners] Re: problem related to submit the data
Ummm... What? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Oct 21, 2009 at 4:31 AM, pinkee wrote: > > hello, > i just want some code to refer as to submit my entered data in > the textfield, i.e some backhand connection or some more examples on > changing the focus of my window. > > > thank you > in advance > drashti > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: MediaRecorder records with slow quality
Kiro, I noticed the same. Audio quality sucks using the MediaRecorder. It is very difficult to hear audio at all I was not able to improve the audio quality. I am in the hope that Android 2.0 has a much better media support! -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Oct 24, 12:56 am, kiro wrote: > Hi! > > I have a problem. > > I'm recording from AudioSource as MIC using MediaRecorder, i try to > use all possible configurations of encoder, format but quality still > ugly with 8kHz and 128 kbps... > > Did some workaround solutions exist? for example record as mp3 with > 44khz? > > Thanks, > Kiro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is it possible to append a value to R.string or any resource under R.?
@Farproc Ah yes, the R.xx.xx are integer constants created automatically in the R.java file (i.e., h1=0x7f050002, h2=0x7f050003, etc.). Now it makes sense why constructing a string to reference them does not work. @Jeffrey I have a couple of questions. I just finished reading up a bit on resource bundles but things are still a little cloudy for me. Would I need to populate the 312 key:value pairs into the rb bundle? If so, then what benefits does the bundle approach have over the the ElseIf approach? It seems that putting 312 strings (even if small) into a resource bundle would be more memory usage than required when, in the alternative, the one desired string could be called directly from an ElseIf approach, albeit with more lines of code. Similar to your bundle idea, I thought about creating an XML array with each string as a member but, again, all of the strings would be pulled into memory to create the array when all I need is *one* of the 312 strings. Too bad there isn't a way to dynamically construct a reference to the R. resources . . . Thanks for answering questions from a new Java-Android developer coming from the PHP side of things. On Oct 24, 7:17 am, Jeffrey Blattman wrote: > using standard java res bundles, > > textView.setText(rb.getString(desiredString)); > > and in your res bundle, > > = > = > ... > > that is, the RB keys are the possible values of desiredString, and the > values are the proper mapping from a particular value of desired string. > > On 10/23/09 6:59 PM, David wrote: > > > > > Screen A permits the user to input a value into an EditText field. > > Screen B populates a TextView using one of the entries in strings.xml > > based upon the TextView value. For example, if the user inputs "2" on > > Screen A then Screen B should populate the TextView with > > R.strings.h2. I have tried the following: > > > // get the bundle extras from Screen A's intent > > Bundle extras = getIntent().getExtras(); > > // pull out the value from the UserInput EditText sent from > > Screen A > > Str desiredString = extras != null ? extras.getString > > ("UserInput") : ""; > > // popluate textView with the string R.string.h + whatever the > > user put on Screen A > > textView.setText(R.string.h + desiredString); > > > I get a "cannot resolve R.string.h resource" error message because, > > evidently, the desiredString value is not appended onto R.string.h. > > So, I decided to come at it from another angle: > > > switch (desiredString) { > > case 1: > > textView.setText(R.string.h1); > > case 2: > > textView.setText(R.string.h2); > > . . . > > case 312: > > textView.setText(R.string.h312); > > > Note that you cannot switch on a string so I tried Integer.parseInt on > > the string but I wind up with a blank Screen B with the switch > > statement above. It seems that the string is not turned into an int. > > So, my question is twofold: (1) is it possible to append a variable > > onto a R. entry and (2) if I am obliged to use the larger and uglier > > switch approach, how do I turn an EditText string value into an Int > > value? Thanks. > > -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to control the behaviour of the virtual keyboard "next" key?
Hi All, I'm writing an app that includes a dialog where the user must enter some information in editTexts. The dialog has four editTexts in a row, and another editText below that (IP address and port). So we have: [e1] [e2] [e3] [e4] [e5] If the cursor is in editTexts 1-4, the virtual keyboard displays a "next" button, which is great and very handy. However, it only seems to search down, i.e. if you are in [e2] it will move the cursor to [e5], not [e3] as expected. Is there a way to control which box it goes to next? It seems like there should be an xml property for ordering, but I haven't found anything like that. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: connecting to a remote database tutorial/example?
I have never tried connecting to a hosted DB within android app. maybe you should consider using a webservice either SOAP or RESTful. On Sat, Oct 24, 2009 at 11:21 AM, gmseed wrote: > > Hi > > I'm developing an application to connect to a database on my website. > > Does anyone know of a link to an example/tutorial in which this kind > of operation is performed? > > Thanks > > Graham > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] connecting to a remote database tutorial/example?
Hi I'm developing an application to connect to a database on my website. Does anyone know of a link to an example/tutorial in which this kind of operation is performed? Thanks Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor Documentation
Hi Thanks for your reply. I took the Sensor developer page as a typical example: http://developer.android.com/reference/android/hardware/Sensor.html and in the "summary" section the methods have no comments. If I take another random section as an example; DialerFilter: http://developer.android.com/reference/android/widget/DialerFilter.html and select getDigits() you'll now see that there are no comments in either the summary or main section. I know the Android is a free system but I stand by my point that the documentation could be a lot better. The better the developer documentation, the better the take up. Cheers Graham On 22 Oct, 10:00, gmseed wrote: > Is it me or is the Android Developer Reference documentation an > absolute sham? > > Take the Sensor page, which lists the public methods: > > float getMaximumRange() > String getName() > float getPower() > float getResolution() > int getType() > String getVendor() > int getVersion() > > Not a single comment as to what these do. Readers must be expected to > be mind readers. > > Then take SensorListener, which provides a few comments on the > accelermoeter, magnetic and orientation sensors but no mention of the > other sensors. > > When I run an application with onSensorChanged (int sensor, float[] > values) it outputs 6 values and not 3 as the documentation would > suggest. > > Etc, etc, > > Developers are expected to fish around and use guess work to try and > figure out what's actually going on. > > Working with 4x4 rotation axis matrices is tricky stuff and needs > detailed explanations. > > With all of Google's backing you'd think the documentation would be > excellent. > > Consider the alternative system of Qt by Trolltech. The "Assitant" > documentation is excellent and has led to a big take up of Qt. If > Google wants developers to get up to speed fast on Android then they > should phone the Trollech documenting team asap. > > I gather from reading previous posts that this documentation issue is > not new and has been around since the start of Android. Clearly then > somebody at Google has a strange idea as to what documenting an API > means. > > The Android system is amazing but really let down by its developer > documentation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Trying to turn off candidates view in EditText with on-screen keyboard
hey, I just had this problem also Change the input type to "Visible Password" it works On Oct 23, 12:05 pm, Bamsen wrote: > Hi, > > My first (and very simple) application uses an EditText box to input > information that is not English words. > When I do this i get the candidates view (which I normally love :) > with suggestions for known words. > I do not want to pollute my word list by saving what I typed so I want > to turn off candidates view for this text box. > > I have searched the documentation and WEB but could not find the > answer. > > I have tried two methods: > > 1. Set the XML property "input type" to various values. > With this I can't find one that lets me input 'raw' text without a > candidates view. > > 2. Use InputMethodService > static InputMethodService mInputService; > mInputService=new InputMethodService(); > mInputService.setCandidatesViewShown(false); > Whenever i try the last line my app 'has stopped unexpectedly' > > I would prefer to understand the second method, but would be happy for > the first one to work, for now. :) > > Any and all help is greatly appreciated. > > -- > Morten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: disable soft keyboard from auto-completion
Solved. Set the "Input type" to "Visible password" On Oct 23, 12:37 pm, jax wrote: > No...that didn't work. It still showed the spelling and underlines > etc. I need to get hold of each character as it is typed. With the > soft-keyboard it does not check the onKey until you have clicked > "Done" > > On Oct 23, 12:33 pm, jax wrote: > > > found it > > > Input-type in the xml preferences > > > On Oct 23, 12:31 pm, jax wrote: > > > > Hi > > > > I have a TextView that I do not want to have auto-completion on when > > > the user opens the soft keyboard. Is this possible? > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: removing the dictionary from the ime
Solved. Set the "Input type" to "Visible password" On Oct 23, 8:44 pm, jax wrote: > Is is possible to remove the automatic dictionary from the ime when in > a particular text field? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Taking a picture
I never did find the section on the forum, but this code sample by Commons Guy helped me a lot: http://github.com/commonsguy/cw-advandroid/tree/master/Camera Anders Feder 2009/10/20 tinyang > > Wonderful, just what I've been looking for! Which section of the forum is > the thread in and what is it's title? > > -Original Message- > From: android-beginners@googlegroups.com > [mailto:android-beginn...@googlegroups.com] On Behalf Of jbrohan > Sent: Tuesday, October 20, 2009 5:56 AM > To: Android Beginners > Subject: [android-beginners] Re: Taking a picture > > > http://www.anddev.org/ > Has a big discussion of camera operations. I got my app started using their > code! > > On Oct 19, 4:46 pm, Anders Feder wrote: > > Hello, > > > > I need to take a photo on command (from my app) such that it is stored > > as 'normal' photo in the Gallery, just like a photo taken with the > > Camera application. Preferably, the photo should be geotagged, but not > necessarily. > > > > The application is unattended (i.e. no user interaction when photo is > > taken), so no preview is needed. Just shoot, and save. > > > > Can someone kindly tell me how to do this? Thanks in advance. > > > > Best regards, > > Anders Feder > > No virus found in this incoming message. > Checked by AVG - http://www.avg.com > Version: 8.0.169 / Virus Database: 270.13.71/2332 - Release Date: > 10/19/2009 > 2:33 PM > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to change Orientation for two controls in one activity:
Hi, I want to have two orientation mode for two things in a single activity. I have a VideoView which needs to be in landscape mode and a dialogbox which needs to be in portrait mode. But i forced settting android:screenOrientation="landscape" in manifest xml file. So it is showing videoview and dialogbox also in landscape mode, which i don't want. How to show videoview (in linear layout) in landscape mode and dialogbox in portrait mode when both are in one activity? -Martin Prabakar. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Waiting for HOME ('android.process.acore') to be launched...
I got this message when trying to run the emulator, android freezes on the 'ANDROID' loading screen. The cause, I think, is that if you close the emulator by just clicking the window's [x] as I did previously (I'm using Ubuntu), then the emulator doesn't close properly and doesn't release its hold of the android debug port. A workaround for this bug is: 1. Exit eclipse. 2. Kill all the eclipse and java processes. I had to kill -9 the java ones. 3. Restart eclipse and run the emulator again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Does anyone know how to set G1 use Wi-Fi with static IP?
Hello , Usually the router can offer the same ip based on the mac address. I use dd-wrt and there is an option to add the hostname, mac address, and ip address you wish. Regards, Michael Cheselka 650-488-4820 On Fri, Oct 23, 2009 at 20:02, Farproc wrote: > > I set my G1 use static IP and disable DHCP of my router. But it seems > that my G1 still obtains a different IP address from router anyway. > Does anyone know why?? > > ps. I can visit internet through the auto obtained IP. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Trying to Download a Web Page Using java.net
Hi!!! I am trying to download a web page using the java.net library. My code is as follows: package net.android.TrafficGenerator2; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class TrafficGenerator2 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = new TextView(this); tv.append("Hello, Android\n"); setContentView(tv); URL u = null; try { u = new URL("http://www.msnbc.com";); } catch (MalformedURLException e) { tv.append("Error 1\n"); setContentView(tv); } URLConnection cn = null; try { cn = u.openConnection(); } catch (IOException e) { tv.append("Error 2\n"); setContentView(tv); } cn.setDoInput(true); tv.append("Content type: " + cn.getContentType() + "; Use Caches: " + cn.getUseCaches() + "; Date: " + cn.getDate() + "; Content Length: " + cn.getContentLength() + ";\n"); InputStream is = null; try { is = cn.getInputStream(); } catch (IOException e) { tv.append("Error 3a\n"); setContentView(tv); } InputStreamReader isr = null; try { isr = new InputStreamReader(is); } catch (NullPointerException e2) { tv.append("Error 3b\n"); setContentView(tv); } BufferedReader file = null; try { file = new BufferedReader(isr); } catch(NullPointerException e3) { tv.append("Error 3c\n"); setContentView(tv); } if(file == null) { tv.append("Null\n"); setContentView(tv); } else { tv.append("Not Null\n"); setContentView(tv); } } } I get output of length of -1, and Error3a, Error3b, Error3c, and Null as output. Why? similar code works well on a pc. Thanks... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Android SDK Content Loader - can i stop it? =D
Hi, i have the SDK and plugin installed in Eclipse, my question is: most of the time i use Eclipse for other stuff than Android. Is there a way/ option to disable the android stuff loading every time Eclipse starts, and just enable it when i'm working on an Android project? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Device not listed in 'adb devices'.
Hi, I've been trying for a while to get my phone (a T-Mobile Pulse/Huawei 8220) to show up when I run "./adb devices". Here's what I've done: 1. Edit /etc/udev/rules.d/55-android.rules to contain the line: SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666" Note: The android docs are out of date here wrt to whether to use 'usb' or 'usb_device'. And please use ubuntu version numbers - I don't want to have to look up stupid animal names. 2. Made that file executable. Is this really necessary? The other files in that directory aren't. 3. Restarted my computer. 4. Selected the USB debugging thing on phone. 5. Run 'sudo ./adb devices'. It starts the server but doesn't list any devices. Also, I tried both the idVendor given in the docs, and the one returned by lsusb for my device. Is the purpose of this rule to detect the phone and make the usb device world-writable? If so how can I check it has worked? The lsusb output is below. This is extremely frustrating, and the docs aren't being much help! Tim Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x12d1 Huawei Technologies Co., Ltd. idProduct 0x1501 bcdDevice1.00 iManufacturer 2 Huawei Incorporated iProduct1 T-Mobile 3G Phone iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 108 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes
[android-beginners] Error running android programs with netbeans 6.7.1 in asus n10
i'm building a program for android in netbeans 6.7.1 in asus n10 (windows 7) my avd is android 1.5 (API level 3) when i start run main project the command prompt in netbeans said Result: -1 Device's package manager not ready to install new packages BUILD FAILED can someone know how to solve this? thanks for your attention --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: SQLiteDatabase update?
I figured out the issue I was having: SQLiteDatabase.rawQuery is only for select statements. It will gladly accept other SQL statements, such as updates, and it will compile them and then drop them without any feedback. For DML, you can use SQLiteDatabase.execSQL. I still don't see a way to pass an expression through SQLiteDatabase.update. If you want the protection/speed of prepared statements with expressions, Android does include the java.sql package. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is it possible to append a value to R.string or any resource under R.?
using standard java res bundles, textView.setText(rb.getString(desiredString)); and in your res bundle, = = ... that is, the RB keys are the possible values of desiredString, and the values are the proper mapping from a particular value of desired string. On 10/23/09 6:59 PM, David wrote: Screen A permits the user to input a value into an EditText field. Screen B populates a TextView using one of the entries in strings.xml based upon the TextView value. For example, if the user inputs "2" on Screen A then Screen B should populate the TextView with R.strings.h2. I have tried the following: // get the bundle extras from Screen A's intent Bundle extras = getIntent().getExtras(); // pull out the value from the UserInput EditText sent from Screen A Str desiredString = extras != null ? extras.getString ("UserInput") : ""; // popluate textView with the string R.string.h + whatever the user put on Screen A textView.setText(R.string.h + desiredString); I get a "cannot resolve R.string.h resource" error message because, evidently, the desiredString value is not appended onto R.string.h. So, I decided to come at it from another angle: switch (desiredString) { case 1: textView.setText(R.string.h1); case 2: textView.setText(R.string.h2); . . . case 312: textView.setText(R.string.h312); Note that you cannot switch on a string so I tried Integer.parseInt on the string but I wind up with a blank Screen B with the switch statement above. It seems that the string is not turned into an int. So, my question is twofold: (1) is it possible to append a variable onto a R. entry and (2) if I am obliged to use the larger and uglier switch approach, how do I turn an EditText string value into an Int value? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~--- --
[android-beginners] Re: GLSurfaceView Activity Lifecycle problems
Sorry the hassle - sorted it all out the requestExitAndWait() was a red-herring. The problem was fixed properly by setting the activity launchMode = singleTask Now my app (with all its multiple threads) handles the HOME key and the back key properly. I am not sure the GLSurfaceView class as it is currently is designed to support anything except singleTask mode? Cheers Jake On Oct 24, 2:06 pm, Zorro666 wrote: > Ok - so I have fixed the rendering problems by taking the source to > GLSurfaceView and changing the onPause() function to be like this: > > public void onPause() { > synchronized (this) { > mPaused = true; > ---> NEW BIT requestExitAndWait(); > } > } > > So now it ends the GL thread when onPause() is called. > > The documentation for GLSurfaceView does say setRenderer() should only > be "called once and only once in the life-cycle of a GLSurfaceView" > but not obvious how to do that within the Android life-cycle framework > e.g. onCreate(), onStart(), onPause(). > > I would be welcome for suggestions on how to make a single instance of > GLSurfaceView for the whole life-cycle of my activity including > support for the HOME button which doesn't call onDestroy() but does > call onCreate() repeatedly. > > Jake > > On Oct 21, 9:12 pm, Zorro666 wrote: > > > > > In SDK 1.5 > > > I have a simple GLSurfaceView app which is not working when I use the > > home key to pause it. If I use the back key then all is fine (onStop > > () and onDestroy() get called). Pressing HOME just calls the onPause() > > function. > > > The problem appears to be the onPause() call is not terminating the > > glThread. On successive restarts of the app after pressing the home > > key then I get an extra glThread per run. Only the first run of the > > app leads to proper rendering. > > > I have implemented the most basic GLSurfaceView app from here > > (changing the clear colour to pink): > > >http://android-developers.blogspot.com/2009/04/introducing-glsurfacev... > > > and I get the same problem. If I press the HOME key then restart the > > app on the second run the graphics rendering is not active i.e. the > > screen stays black instead of pink. > > > Any suggestions on how to handle the onPause() function properly when > > using a GLSurfaceView. I am calling the onPause() function in the > > GLSurfaceView member but that isn't enough. It feels like I need to > > wait for the render thread to finish or process the pause command or > > even force it to exit somehow? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Emulator on Windows7 can't connect to internet
It doesn't affect everyone. There seem to be a number of factors that lead to the symptoms. e.g. number of network adapters, number of configured DNS entries, DHCP, etc.. On Sat, Oct 24, 2009 at 1:36 PM, ade wrote: > i just tested my app yesterday on android emulator from within eclipse (on > windows 7) and it connected to the net just fine > > Sean Hodges wrote: > > Similar issues are occasionally reported in Ubuntu and Vista. You > might try running the emulator with a manually set DNS server: > > emulator -dns-server 111.222.333.444 > > > > On Sat, Oct 24, 2009 at 12:27 PM, Jeroen Beckers > wrote: > > > Hi, > > I recently updated to Windows 7 and I'm not able to connect to the internet > from within the browser on android. Is this a known issue? Has anyone > managed to get it working on windows 7? If so, what else could the problem > be? I'm not using a firewall. > > Greets, > Dauntless > > > > > > -- > ade > ... > www.ibizaA-Z.com > www.iphoneibiza.com > www.podcast-ibiza.com > www.ishopibiza.com > www.ibiza-blog.com > www.ibizawinter.com > www.ibizaa-z.com/webcam > http://twitter.com/blogibiza > Ibiza NOW - The Islands Magazine > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: GLSurfaceView Activity Lifecycle problems
Ok - so I have fixed the rendering problems by taking the source to GLSurfaceView and changing the onPause() function to be like this: public void onPause() { synchronized (this) { mPaused = true; ---> NEW BITrequestExitAndWait(); } } So now it ends the GL thread when onPause() is called. The documentation for GLSurfaceView does say setRenderer() should only be "called once and only once in the life-cycle of a GLSurfaceView" but not obvious how to do that within the Android life-cycle framework e.g. onCreate(), onStart(), onPause(). I would be welcome for suggestions on how to make a single instance of GLSurfaceView for the whole life-cycle of my activity including support for the HOME button which doesn't call onDestroy() but does call onCreate() repeatedly. Jake On Oct 21, 9:12 pm, Zorro666 wrote: > In SDK 1.5 > > I have a simple GLSurfaceView app which is not working when I use the > home key to pause it. If I use the back key then all is fine (onStop > () and onDestroy() get called). Pressing HOME just calls the onPause() > function. > > The problem appears to be the onPause() call is not terminating the > glThread. On successive restarts of the app after pressing the home > key then I get an extra glThread per run. Only the first run of the > app leads to proper rendering. > > I have implemented the most basic GLSurfaceView app from here > (changing the clear colour to pink): > > http://android-developers.blogspot.com/2009/04/introducing-glsurfacev... > > and I get the same problem. If I press the HOME key then restart the > app on the second run the graphics rendering is not active i.e. the > screen stays black instead of pink. > > Any suggestions on how to handle the onPause() function properly when > using a GLSurfaceView. I am calling the onPause() function in the > GLSurfaceView member but that isn't enough. It feels like I need to > wait for the render thread to finish or process the pause command or > even force it to exit somehow? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Emulator on Windows7 can't connect to internet
i just tested my app yesterday on android emulator from within eclipse (on windows 7) and it connected to the net just fine Sean Hodges wrote: > Similar issues are occasionally reported in Ubuntu and Vista. You > might try running the emulator with a manually set DNS server: > > emulator -dns-server 111.222.333.444 > > > > On Sat, Oct 24, 2009 at 12:27 PM, Jeroen Beckers > wrote: > >> Hi, >> >> I recently updated to Windows 7 and I'm not able to connect to the internet >> from within the browser on android. Is this a known issue? Has anyone >> managed to get it working on windows 7? If so, what else could the problem >> be? I'm not using a firewall. >> >> Greets, >> Dauntless >> >> > > > > -- ade ... www.ibizaA-Z.com www.iphoneibiza.com www.podcast-ibiza.com www.ishopibiza.com www.ibiza-blog.com www.ibizawinter.com www.ibizaa-z.com/webcam http://twitter.com/blogibiza Ibiza NOW - The Islands Magazine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is it possible to append a value to R.string or any resource under R.?
R.xx.xx ids are actually integet constants. They're not strings. So you can't use + to construct such ids. On Oct 24, 1:48 pm, David wrote: > @Farpoc > > Your solution worked perfectly. Thank you very much. I have about > 300 possible strings the user can choose. Is there a less CPU > intensive way to do this without 300 else if statements? > > If not, hey, the application works well enough. But it would be > cleaner code if it were possible to use R.string.h + whatever the user > entered on prior screen. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Emulator on Windows7 can't connect to internet
Similar issues are occasionally reported in Ubuntu and Vista. You might try running the emulator with a manually set DNS server: emulator -dns-server 111.222.333.444 On Sat, Oct 24, 2009 at 12:27 PM, Jeroen Beckers wrote: > Hi, > > I recently updated to Windows 7 and I'm not able to connect to the internet > from within the browser on android. Is this a known issue? Has anyone > managed to get it working on windows 7? If so, what else could the problem > be? I'm not using a firewall. > > Greets, > Dauntless > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Emulator on Windows7 can't connect to internet
Hi, I recently updated to Windows 7 and I'm not able to connect to the internet from within the browser on android. Is this a known issue? Has anyone managed to get it working on windows 7? If so, what else could the problem be? I'm not using a firewall. Greets, Dauntless --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: how to set the hyperlink text with textview.
The Notepad tutorial deals with specifically this point. You click on the list of "notes" and get into an edit dialog. John On Oct 23, 2:14 am, pp wrote: > I'm working on java for android and I need your help. > > my question is set the text with textview, its style is look like the > hyperlink( color, underline etc...), and when i touch the text, i hope > i can hook the click event and handle it by myself. whether it's > feasible or not? > > thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] MediaRecorder records with slow quality
Hi! I have a problem. I'm recording from AudioSource as MIC using MediaRecorder, i try to use all possible configurations of encoder, format but quality still ugly with 8kHz and 128 kbps... Did some workaround solutions exist? for example record as mp3 with 44khz? Thanks, Kiro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---