[android-beginners] Re: G2 vs G1
The phones are more or less identical to develop on. G1 has crazy small internal memory, G2 has no hardware keyboard, and there are something like 20 odd devices coming out over the coming year. http://phandroid.com/phones/ Pay your money, make your choice. --~--~-~--~~~---~--~~ 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: Understanding intercepting touch events
Solved - onTouch has to return true on ACTION_DOWN otherwise no further events are sent.. On Jul 15, 11:19 am, samothx thomas.ru...@googlemail.com wrote: I am working on a TableLayout which I wantt to be able to exceed the width of the screnn. As I have learned ScrollViews only scroll vertically so I am looking at how to scroll my table manually. For this purpose I have created a custom view derived from TableLayout and overridden the onTouch method. Unfortunately all I receive are ACTION_DOWN events but no MOVE or UP events. So for finding out who`s fault it is I have put a ScrollView around my tableLayout and registered as onTouchListener on the ScrollView and there I see all the expected events. Can anybody tell me why the TableLayout does not give me these events or how I can convince it to do so ? Cheers Thomas --~--~-~--~~~---~--~~ 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: need android source tree 1.1 cupcake branch
I believe that currently only android source tree 1.5 is available for branches (master,cupcake,donut,release-1.0,cdma-import) can be download using repo init. So, if I want to move android source tree (1.5 cupcake) back to 1.1 cupcake branch, I think it can be done with repo or git command on android source tree 1.5 cupcake branch with respective tags. If my assumption is correct, please suggest correct commands. Regards Manjunatha Srinivasan N --~--~-~--~~~---~--~~ 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] ViewGroup Help
Hi there, I am relatively new to Android, I was wondering if anyone can show me any demo on how to use ViewGroup. I cant able to find a proper tutorial. Any help would be appreciated! thanks, Arin --~--~-~--~~~---~--~~ 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: ViewGroup Help
Hi In Gallary tutorial u can find about view group it may be useful On Thu, Jul 16, 2009 at 3:29 PM, Arin Ghosh arinv1618b...@gmail.com wrote: Hi there, I am relatively new to Android, I was wondering if anyone can show me any demo on how to use ViewGroup. I cant able to find a proper tutorial. Any help would be appreciated! thanks, Arin -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09176147148 --~--~-~--~~~---~--~~ 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: Hello Tutorials - Gallery Example
Create a file called attrs.xml and place the following in it: ?xml version=1.0 encoding=utf-8? resources declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable /resources Then replace the code in ImageAdapter with the following: TypedArray a = obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); -- Jack Ha Open Source Development Center ・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 Jul 16, 6:30 am, Neilz neilhorn...@googlemail.com wrote: Hi all. I tried this example (http://developer.android.com/guide/ tutorials/views/hello-gallery.html) and found the compilation problems which having done some searching I see that many other people have found the same thing. No one seems to have found a solution to this. It would be great if someone involved could update this example, or provide clear instructions on how to get it working - as it would be a nice feature to try out. The problem stems from the 'styleable' attribute of the following line: public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } 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: G2 vs G1
The lack of a physical keyboard was a problem for me on the Magic (some of my applications - like Teminal wouldn't work). There are workarounds, but require some advanced techniques, or downloading alternative applications. The lack of a physical keyboard also made flashing a new ROM more difficult (which may or not be something you chose to do), since there is not way to hit Alt-L or Alt-R during the reboot process. Again, there are workarounds (using Fastboot, etc), but I didn't have success with them. The G1 is not spec'ed as high as the magic (it has less internal memory, and a slower processor). I don't have resource limitations with my G1, but some people might. My personal recommendation would be to get the G1 Dev phone if you can. It will be easy to root, if it doesn't come that way anyway, and has the physical keyboard, which is important for certain applications and activities. On Jul 15, 9:30 am, Rafa Perfeito rafa.perfe...@gmail.com wrote: (Now with an actual subject...) Hey all, Been doing some work in the emulator but the idea (as obvious) is to test them in an actual physical device. The HTC Magic is already available in my area, but i'm still thinking of its advantages to the Dev Phone 1... Especially because i've seen some people with problems connecting the G2 to the debugger... What is your thoughts about this? Would you pick a G2? 'Cause the price difference is still significative... I've read somewhere (http://www.anddev.org/usb_host_mode_on_g2_-t6866.html) that the G2 would support host USB. The G1 does not? I will need to integrate an external device, so that's kind of a big deal there... Thanks -- Cumprimentos, Hugo Rafael Augusto --~--~-~--~~~---~--~~ 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] Kill a background thread onStop()?
Hi all, This is probably more of a Java question than an Android question really, but here goes: My app is force closing when I flip the keyboard out, because it's got a background thread running that doesn't get killed during onStop(), and that then goes on to throw a NullPointerException. Does anyone know how I can kill a background thread from the main UI thread in the onStop method? Thanks! Anna --~--~-~--~~~---~--~~ 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: [android-beginners]
Thanks man. By G2 i meant the hardware setup found on HTC Magic... That aint too cool...I'm sure the OTG support will be available sooner or later...but sooner would be nice... By the way, what about Bluetooth? Has anyone seen interaction with external devices based on that tech? Or any communication, on that manner? On Thu, Jul 16, 2009 at 2:24 PM, Disconnect dc.disconn...@gmail.com wrote: On Wed, Jul 15, 2009 at 12:26 PM, Rafa Perfeitorafa.perfe...@gmail.com wrote: Hey all, Been doing some work in the emulator but the idea (as obvious) is to test them in an actual physical device. The HTC Magic is already available in my area, but i'm still thinking of its advantages to the Dev Phone 1... Especially because i've seen some people with problems connecting the G2 to the debugger... What is your thoughts about this? Would you pick a G2? 'Cause the price difference is still significative... I've read somewhere ( http://www.anddev.org/usb_host_mode_on_g2_-t6866.html) that the G2 would support host USB. The G1 does not? I will need to integrate an external device, so that's kind of a big deal there... Thanks -- Cumprimentos, Hugo Rafael Augusto Whats a g2? So far no android phone has enabled OTG support, and nobody has gotten the 'magic bits' out of google/htc/qualcomm to enable it. (Its not determinable what bits in which order need to be set.) If that info becomes available, it will likely need a hardware hack (5V supply on both sides) similar to what the Nokia 770/N800/N810 uses. -- Cumprimentos, Hugo Rafael Augusto --~--~-~--~~~---~--~~ 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: Can't run emulator on MacOS :: newly created AVD not found
On Thu, Jul 16, 2009 at 1:51 PM, Pawelpawel.vese...@gmail.com wrote: Hi ! Ok, not a good start with MacOS: [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ mksdcard 50M ~/ SDCARD.1 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ android create avd -n pawel -t 2 -c ~/SDCARD.1 Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no] Created AVD 'pawel' based on Android 1.5 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ emulator -avd pawel emulator: ERROR: unknown virtual device name: 'pawel' emulator: could not find virtual device named 'pawel' [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ uname -a Darwin e03077.aplix.co.jp 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386 And just so that I am not crazy: [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ android list avd Available Android Virtual Devices: Name: pawel Path: /Users/vps/Android/sdk/android-sdk-mac_x86-1.5_r2/.android/avd/pawel.avd Target: Android 1.5 (API level 3) Skin: HVGA Sdcard: /Users/vps/SDCARD.1 --~--~-~--~~~---~--~~ 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: Can't run emulator on MacOS :: newly created AVD not found
Ok... It seems that on MacOS, when $ANDROID_SDK_HOME is set, some of the tools will use $ANDROID_SDK_HOME/.android (android, apkbuilder), while others will use $HOME/.android (emulator). Grrr. On Thu, Jul 16, 2009 at 1:53 PM, Pawel Veselov pawel.vese...@gmail.com wrote: On Thu, Jul 16, 2009 at 1:51 PM, Pawelpawel.vese...@gmail.com wrote: Hi ! Ok, not a good start with MacOS: [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ mksdcard 50M ~/ SDCARD.1 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ android create avd -n pawel -t 2 -c ~/SDCARD.1 Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no] Created AVD 'pawel' based on Android 1.5 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ emulator -avd pawel emulator: ERROR: unknown virtual device name: 'pawel' emulator: could not find virtual device named 'pawel' [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ uname -a Darwin e03077.aplix.co.jp 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386 And just so that I am not crazy: [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ android list avd Available Android Virtual Devices: Name: pawel Path: /Users/vps/Android/sdk/android-sdk-mac_x86-1.5_r2/.android/avd/pawel.avd Target: Android 1.5 (API level 3) Skin: HVGA Sdcard: /Users/vps/SDCARD.1 -- With best of best regards Pawel S. Veselov --~--~-~--~~~---~--~~ 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: Eclipse issues
here is a nice video tutorial for eclipse: http://eclipsetutorial.sourceforge.net/ Good Luck :-) On 15 Jul., 18:41, stephen rigg stevie...@gmail.com wrote: I just now finished creatin my avd, and wondering how to continue developing the hello world app, I wud use the android developer site bt its a little complicated for a beginner 2009-07-15 12.40.52.jpg 543KAnzeigenHerunterladen --~--~-~--~~~---~--~~ 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] print on a bluetooth printer
Hi to all. We need to print on a bluetooth printer... let me explain: we already have a program on windows mobile platform that sends commands and data via bluetooth to a Zebra RW 420 printer ( http://www.zebra.com/id/zebra/na/en/index/products/printers/mobile/rw420.html ), using the Zebra Printer Protocol... it's just a stream sent on bluetooth... now, we'd like to do this on android, too... we would like to know some basic informations: 1) is this type of printing doable (we see very little informations on printing on android platform), or bluetooth is limited to audio and file transfer? 2) how to connect a bluetooth printer (using a bt dongle or builtin support) to the android emulator, to do some test without buying a fisical device 3) any other information about how to implement this... thanks in advance for any help or hint... :-) --~--~-~--~~~---~--~~ 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] Text color problem in Multi Choise dialog
I got a text color problem when diaplaying a multi choise dialog. The Theme of my app is set like this: application android:icon=@drawable/icon android:label=@string/ app_name android:theme=@android:style/Theme.Light /application When I pop up a dialog using AlertDialog, text's color in list is white, and the color of multi select list is white too and I can't see any of items in it. I'm not special the Theme attribute of the parent activity who pop up dialog. How can I set text color to black in multi choise dialog ? Any help --~--~-~--~~~---~--~~ 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: ERROR Resource entry main is already defined.
Got the same problem when trying to do the LinearLayout tutorial. As Michael said run your program from java. I needed to remove the extra xml file it had generated, not the main.xml, but main.out.xml, main.out.out.xml etc. On Jul 7, 1:18 am, Michael Dorin bsddo...@gmail.com wrote: I think I figured it out. When you hit run, make sure you are in (editing) a java program, not an xml file. -Mike On Mon, Jul 6, 2009 at 4:54 PM, Coder Jcoder...@gmail.com wrote: having same problem right now with something i built from scratch, sometimes it does this and sometimes it dosent and it will jump from xml file to xml file --~--~-~--~~~---~--~~ 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] Best practices - looking for application design advice for a location aware app.
I am working on my first android application and am looking for some advice on design decisions. The main goal of the application is to display trails (like cycling/ hiking trails) near the users current location. The user will first be presented with a mapview with markers indicating the location of near by trails. They can then select a trail and have it overlayed on the map. The biggest problem right now are: 1) the database is not static - new trails will be added periodically so a master database will be needed online. 2) trail data (gpx files) consume a lot of space, usually 50 - 300 kb per trail, so storing all trails on the device may not be feasible. The three main designs I see are the following: 1) Store light-weight data (like trail names, trail head location, trail distance, etc) in a local SQLite db on the device. Store the light-weight data in a remote database (MySQL or DB2) as well. Store heavy-data (the trail gpx files) remotely. New trails are added to the remote database. Periodically synchronize/update the local SQLite database with the remote (master) database. When a gpx file is needed, transfer it and parse it to display the overlay in mapview. Possibly store the 10 most frequently used trails (gpx files) on the device to save bandwidth. PRO: Getting the list of nearby trails is fast and easy because it simply queries the local SQLite database. PRO: Minimal amount of data is stored on the local device. CON: Transfering gpx files to the device + parsing them will be time consuming and power draining. 2) Store all data remotely. Don't store individual gpx files - parse their data into the database so all information needed in accessable through database queries. Parsing is done on the server. PRO: The android app consumes little space and all processing is done remotely. CON: High bandwidth use due to high number of queries and lots of returned data (could introduce lag and be costly on the data plan). 3) Store all data (light and heavy) both locally and remotely. Don't store individual gpx files - parse their data into the database so all information needed is accessible through database queries. New trails are added to the remote (master) database. Parsing of new trail gpx files is done remotely. Periodically synchronize/update the local SQLite database with the remote (master) database. PRO: All data is local so simply query the info needed. Good performance and low bandwidth use. PRO: Synchronization can be done at any time when a WiFi connection is available so no worry about data plan costs. CON: Will consume way too much space. 1000 trails could easily consume over 100 MB. Because the database is dynamic I see no way of avoiding having a master database stored remotely so I image any design will have to involve network access to a remote database at least for synchronization purposes if nothing else. Any advice, insight, or discussion is greatly appreciated. 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: Creating an avd?
I would suggest you this one: http://eclipsetutorial.sourceforge.net/ Good luck :-) Elena 2009/7/15 stephen rigg stevie...@gmail.com Thank yu sooo much for yur assistance. Everything went smoothly. One last request cn yu snd me a link of a website, that can show me how to use eclipse bcuz the android developer website is a little complicated for a beginner On Jul 14, 2009 7:54 PM, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: Did you send this via twitter? I'm not perceptive enough to grasp what is happening in your description, but I recently wrote up an extended set of steps, including with regards to the AVD. I hope it helps. How to install the Android SDK in two dozen or so easy steps (based on http://developer.android.com/sdk/1.5_r1/index.html) To write Android programs, you will need to download and install three programs: Java, Eclipse and the Android SDK. 1. Java: this is the computer language you will be using to write programs on Android. Go to http://java.sun.com/javase/downloads/index.jsp . Click on the Download button next to the Java SE Development Kit. On the next page, select your platform (probably Windows), click on the I agree to the blah blah blah checkbox (after carefully reading the agreement of course), and click on continue. Download the file download link on the next page. Once it's downloaded, double-click on the file to install it. One point on installing files: if this is your computer, you can probably install anywhere, and most programs on Windows get put in the C:\Program Files directory. However, if this is for example a school computer, you may not be able to put the program there, in which case you can put it somewhere else, like the My Documents folder. Now you have to tell your PC where Java is, because for some reason the Java installer doesn't. On WindowsXP, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add a semicolon and the full path to the SDK subdirectory tools directory to the path. It will be something like: ;C:\Program Files\java\jdk6\bin 2. Eclipse: this is the program you will use to program in Java on Android. Go to http://www.eclipse.org/downloads , click on Eclipse IDE for Java Developers. It will take to the next page where you click on the green arrow to download. Unlike most modern software products, Eclipse has not have a fancy installation procedure. To install it, simply extract the zip file into some director on your computer. This will create a directory named eclipse. The executable program file is located in this directory and is called eclipse.exe. On Windows systems, it is a good idea to create a shortcut to this executable on your desktop. To do this, right-click on the eclipse.exe file and select Send To → Desktop. Eclipse stores all its files in a directory called its workspace. When Eclipse is run for the first time, it will ask you where you want the workspace to be placed. After this, you should see the Welcome to Eclipse 3.0 page. When you see this, you are ready to proceed to the next step. 3. Android Software Development Kit (SDK) Go to http://developer.android.com/sdk/1.5_r1/index.html . Select the the version for your computer. Your platform is probably Windows. When that file is downloaded, unzip it somewhere, such as C:\Program Files. It will then be in C:\Program Files\android-sdk-something, the something being the version number, like windows-1.5_r1. You have to tell your computer where you put it, because for some reason it can't figure that out itself. On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double- click on Path (under System Variables). Add a semicolon and the full path to the SDK subdirectory tools directory to the path. It will be something like: C:\Program Files\android-sdk-something\tools Then tell Eclipse where to find it: a. Start Eclipse, then select Help Software Updates b. In the dialog that appears, click the Available Software tab. c. Click Add Site... d Enter the Location: http://dl-ssl.google.com/android/eclipse/ If you have trouble aqcuiring the plugin, try using http in the Location URL, instead of https (https is preferred for security reasons). Click OK. e. Back in the Available Software view, you should see the plugin listed by the URL, with Developer Tools nested within it. Select the checkbox next to Developer Tools and click Install... f. On the subsequent Install window, Android DDMS and Android Development Tools should both be checked. Click Next. g. Read and accept the license agreement, then click Finish. h. Restart Eclipse. Now modify your Eclipse preferences to point to the Android SDK directory: i. Select Window Preferences... to
[android-beginners] Can't run emulator on MacOS :: newly created AVD not found
Hi ! Ok, not a good start with MacOS: [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ mksdcard 50M ~/ SDCARD.1 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ android create avd -n pawel -t 2 -c ~/SDCARD.1 Android 1.5 is a basic Android platform. Do you wish to create a custom hardware profile [no] Created AVD 'pawel' based on Android 1.5 [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ emulator -avd pawel emulator: ERROR: unknown virtual device name: 'pawel' emulator: could not find virtual device named 'pawel' [...@e03077]~/Android/sdk/android-sdk-mac_x86-1.5_r2$ uname -a Darwin e03077.aplix.co.jp 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386 Something that simple ought to work, what can I possibly be missing here? P.S. Not to mention RELEASE_NOTES.html from the SDK points to release notes for 1.1, documentation for 1.5 r2 says 1.5 r1 What's up with that, seriously? --~--~-~--~~~---~--~~ 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: Creating an avd?
Sure, depending on what floats your boat, here is a useful set of video tutorials: http://eclipsetutorial.sourceforge.net/totalbeginner.html and here is the screenshot flava: https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html Yusuf Saib Android ·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 Jul 15, 9:25 am, stephen rigg stevie...@gmail.com wrote: Thank yu sooo much for yur assistance. Everything went smoothly. One last request cn yu snd me a link of a website, that can show me how to use eclipse bcuz the android developer website is a little complicated for a beginner On Jul 14, 2009 7:54 PM, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: Did you send this via twitter? I'm not perceptive enough to grasp what is happening in your description, but I recently wrote up an extended set of steps, including with regards to the AVD. I hope it helps. How to install the Android SDK in two dozen or so easy steps (based onhttp://developer.android.com/sdk/1.5_r1/index.html) To write Android programs, you will need to download and install three programs: Java, Eclipse and the Android SDK. 1. Java: this is the computer language you will be using to write programs on Android. Go tohttp://java.sun.com/javase/downloads/index.jsp. Click on the Download button next to the Java SE Development Kit. On the next page, select your platform (probably Windows), click on the I agree to the blah blah blah checkbox (after carefully reading the agreement of course), and click on continue. Download the file download link on the next page. Once it's downloaded, double-click on the file to install it. One point on installing files: if this is your computer, you can probably install anywhere, and most programs on Windows get put in the C:\Program Files directory. However, if this is for example a school computer, you may not be able to put the program there, in which case you can put it somewhere else, like the My Documents folder. Now you have to tell your PC where Java is, because for some reason the Java installer doesn't. On WindowsXP, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add a semicolon and the full path to the SDK subdirectory tools directory to the path. It will be something like: ;C:\Program Files\java\jdk6\bin 2. Eclipse: this is the program you will use to program in Java on Android. Go tohttp://www.eclipse.org/downloads, click on Eclipse IDE for Java Developers. It will take to the next page where you click on the green arrow to download. Unlike most modern software products, Eclipse has not have a fancy installation procedure. To install it, simply extract the zip file into some director on your computer. This will create a directory named eclipse. The executable program file is located in this directory and is called eclipse.exe. On Windows systems, it is a good idea to create a shortcut to this executable on your desktop. To do this, right-click on the eclipse.exe file and select Send To → Desktop. Eclipse stores all its files in a directory called its workspace. When Eclipse is run for the first time, it will ask you where you want the workspace to be placed. After this, you should see the Welcome to Eclipse 3.0 page. When you see this, you are ready to proceed to the next step. 3. Android Software Development Kit (SDK) Go tohttp://developer.android.com/sdk/1.5_r1/index.html. Select the the version for your computer. Your platform is probably Windows. When that file is downloaded, unzip it somewhere, such as C:\Program Files. It will then be in C:\Program Files\android-sdk-something, the something being the version number, like windows-1.5_r1. You have to tell your computer where you put it, because for some reason it can't figure that out itself. On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double- click on Path (under System Variables). Add a semicolon and the full path to the SDK subdirectory tools directory to the path. It will be something like: C:\Program Files\android-sdk-something\tools Then tell Eclipse where to find it: a. Start Eclipse, then select Help Software Updates b. In the dialog that appears, click the Available Software tab. c. Click Add Site... d Enter the Location:http://dl-ssl.google.com/android/eclipse/ If you have trouble aqcuiring the plugin, try using http in the Location URL, instead of https (https is preferred for security reasons). Click OK. e. Back in the Available Software view, you should see the plugin listed by the URL, with Developer Tools nested within it.
[android-beginners] Re: Jad Parameter Equilent in Android
There is no direct equivalent, such as in the Android manifest, afaik. But you may benefit from looking into http://netmite.com/android/index.html , which claims it lets you convert existing j2mes into apk upload to Android Market. Yusuf Saib Android ·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 Jul 16, 2:46 am, chinna Durai chinnadur...@gmail.com wrote: Hi, In J2ME there is a possibility to include a parameter in JAD file and then read it back using getAppProperty() method. Is there an equilent way to do in Android? I am converting an application from J2ME to Android where i need to do this. -- Thanks and Regards Chinnadurai M --~--~-~--~~~---~--~~ 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] Communication API/mechanism to talk between emulator-desktop?
Hi, Is there is any way to send a message from device/emulator to the desktop. Any API available in Android for this? Thanks Yasser --~--~-~--~~~---~--~~ 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 connecting G1 to Ubuntu 9.0.4
Mark: No luck so far I tried couple of combinations You think the format is ok ? SUBSYSTEM==usb, SYSFSHigh Tech Computer Corp.==0bb4, MODE=0666 Does it need to be {High Tech Computer Corp.}? Thanks On Jul 15, 7:52 pm, Mark Murphy mmur...@commonsware.com wrote: rch wrote: Step 2 I added a file /etc/udev/rules.d/51-android.rules The contents of 51-android.rules is SUBSYSTEM==usb, SYSFSHigh Tech Computer Corp.==0bb4, MODE=0666 I have the following as 50-android.rules SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666 Step 3: I modified permsisions on 51-android.rules ls -l looks as below ~/android-sdk-linux_x86-1.1_r1/tools$ ls -l /etc/udev/rules.d/ total 232 -rw-r--r-- 1 root root 1547 2008-10-13 09:03 024_hpmud.rules -rw-r--r-- 1 root root 400 2008-04-11 08:21 05-options.rules -rw-r--r-- 1 root root 191 2008-04-11 08:21 05-udev-early.rules -rw-r--r-- 1 root root 3215 2008-04-11 08:21 20-names.rules -rw-r--r-- 1 root root 141 2009-04-14 18:04 30-cdrom_id.rules -rw-r--r-- 1 root root 814 2008-04-11 08:21 40-basic- permissions.rules -rw-r--r-- 1 root root 3109 2008-04-11 08:21 40-permissions.rules -rw-r--r-- 1 root root 30 2008-02-26 13:25 45-fuse.rules -rw-r--r-- 1 root root 439 2007-08-24 12:29 45-hpdjconsole.rules -rw-r--r-- 1 root root 115 2008-10-13 09:03 45-hplip.rules -rw-r--r-- 1 root root 34568 2008-04-10 12:24 45-libmtp7.rules -rw-r--r-- 1 root root 39784 2008-08-01 11:53 45-libmtp8.rules -rw-r--r-- 1 root root 72 2009-07-15 19:17 50-android.rules~ -rw-r--r-- 1 root root 2656 2008-03-17 19:26 50-libpisock9.rules -rw-r--r-- 1 root root 6661 2008-03-30 01:42 50-xserver-xorg-input- wacom.rules -rwxr-xr-x 1 root root 71 2009-07-15 19:25 51-android.rules -rw-r--r-- 1 root root 115 2008-10-13 09:03 55-hpmud.rules -rw-r--r-- 1 root root 1431 2008-04-11 08:21 60-persistent- input.rules -rw-r--r-- 1 root root 3851 2009-04-14 18:04 60-persistent- storage.rules -rw-r--r-- 1 root root 1322 2009-04-14 18:04 60-persistent-storage- tape.rules -rw-r--r-- 1 root root 862 2009-04-14 18:04 60-symlinks.rules -rw-r--r-- 1 root root 518 2009-04-14 18:04 61-persistent-storage- edd.rules -rw-r--r-- 1 root root 485 2008-10-26 20:27 62-bluez-hid2hci.rules -rw-r--r-- 1 root root 196 2009-04-14 18:04 65-id-type.rules -rw-r--r-- 1 root root 2055 2009-03-26 09:36 70-persistent-cd.rules -rw-r--r-- 1 root root 876 2009-03-23 05:48 70-persistent-net.rules -rw-r--r-- 1 root root 390 2008-04-11 08:21 75-cd-aliases- generator.rules -rw-r--r-- 1 root root 2403 2009-04-14 18:04 75-persistent-net- generator.rules -rw-r--r-- 1 root root 563 2008-04-11 08:21 80-programs.rules -rw-r--r-- 1 root root 171 2008-02-27 08:22 85-alsa.rules -rw-r--r-- 1 root root 1444 2008-03-27 19:25 85-brltty.rules -rw-r--r-- 1 root root 84 2008-03-28 18:26 85-hdparm.rules -rw-r--r-- 1 root root 1855 2009-03-31 03:35 85-hplj10xx.rules -rw-r--r-- 1 root root 126 2008-04-29 07:57 85-hwclock.rules -rw-r--r-- 1 root root 954 2008-10-12 18:18 85-ifupdown.rules -rw-r--r-- 1 root root 950 2007-10-23 13:03 85-pcmcia.rules -rw-r--r-- 1 root root 82 2008-10-26 04:56 90-hal.rules -rw-r--r-- 1 root root 2862 2009-04-14 18:04 90-modprobe.rules -rw-r--r-- 1 root root 234 2009-04-14 18:04 95-udev-late.rules Gadzooks, you have a lot of rules! I have a total of five rules files. With all of those, you may need to try other numbers than 50- or 51-. I think I heard somebody was using 70- as a prefix. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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 connecting G1 to Ubuntu 9.0.4
rch wrote: Mark: No luck so far I tried couple of combinations You think the format is ok ? SUBSYSTEM==usb, SYSFSHigh Tech Computer Corp.==0bb4, MODE=0666 Does it need to be {High Tech Computer Corp.}? On my machine, it is {idVendor}. I mean that literally. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: Communication API/mechanism to talk between emulator-desktop?
Yasser wrote: Is there is any way to send a message from device/emulator to the desktop. Any API available in Android for this? URLConnection and HttpClient, if the desktop has a Web server running. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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: Kill a background thread onStop()?
Anna PS wrote: This is probably more of a Java question than an Android question really, but here goes: My app is force closing when I flip the keyboard out, because it's got a background thread running that doesn't get killed during onStop(), and that then goes on to throw a NullPointerException. Does anyone know how I can kill a background thread from the main UI thread in the onStop method? Use the same mechanism you are using to stop the thread in onDestroy(). I'm rapidly becoming convinced that background threads of significance should exclusively be in local services, just to deal with the rotation issue. The service doesn't go away in the rotation. All the new activity needs to do is get re-acquainted with the running service. I was already very convinced that long-running background threads are really dangerous, and that you should try to break up the work into smaller parcels via some sort of a work queue (e.g., clone AsyncTask and give it an unbounded work queue, or use your own LinkedBlockingQueue). That gives you finer granularity to stop the background threads (e.g., via an AtomicBoolean flag that gets checked). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 separate system custom intents
How can I distinguish between intents supplied by Android intents created by my application ? I can query the contents of the intents. But is there a more efficient way to separate the two types of intents (e.g. checking a flag) ? This may be useful in onCreate where Activity can be started by the system or by user intents. 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] Re: how to separate system custom intents
az9702 wrote: How can I distinguish between intents supplied by Android intents created by my application ? Use a namespace in the action (e.g., com.commonsware.android.HEAD_FOR_THE_HILLS). Bear in mind that there are more Intent sources than merely Android and your application: -- Android, at the system level -- Built-in Android applications (e.g., music player) -- OEM/carrier-supplied applications (e.g., Android Market) -- Other third-party applications besides your own -- Your application This may be useful in onCreate where Activity can be started by the system or by user intents. What is a user intent? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 separate system custom intents
Mark, Thanks for the quick reply. user intent in this case is an intent supplied by the application e.g. intent created for startActivityForResult/onActivityResult. The question is prompted by this scenario: My main activity has preferences that are set by a separate PreferenceActivity. The latter sends back an intent to former via onActivityResult. So in main activity's onCreate, it's intent * can be supplied by Android when the application first starts (e.g. on boot), or * can be supplied by the associated PreferenceActivity. The changed Preference values can therefore be passed back to the main activity via * sharedPreferences (as Preference editor commits during PerferenceActivity onPause), AND * intent returned by PrefesrenceActivity back to the main activity in onActivtyResult In other words, when main activity starts, it can take preference values either from * an intent or * shared preferences (assumed pre-existing) It seems to me in onCreate of the main activity, it should * take preference values from existing shared preferences on boot but * from intent as preference values are changed on the fly So there is a need to separate intent from system my own namespace. This maybe more complicated than necessary but it's how it's implemented for now. Thanks for the tip again. ##- On Jul 16, 12:56 pm, Mark Murphy mmur...@commonsware.com wrote: az9702 wrote: How can I distinguish between intents supplied by Android intents created by my application ? Use a namespace in the action (e.g., com.commonsware.android.HEAD_FOR_THE_HILLS). Bear in mind that there are more Intent sources than merely Android and your application: -- Android, at the system level -- Built-in Android applications (e.g., music player) -- OEM/carrier-supplied applications (e.g., Android Market) -- Other third-party applications besides your own -- Your application This may be useful in onCreate where Activity can be started by the system or by user intents. What is a user intent? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ 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 separate system custom intents
az9702 wrote: user intent in this case is an intent supplied by the application e.g. intent created for startActivityForResult/onActivityResult. OK. The question is prompted by this scenario: My main activity has preferences that are set by a separate PreferenceActivity. The latter sends back an intent to former via onActivityResult. So in main activity's onCreate, it's intent * can be supplied by Android when the application first starts (e.g. on boot), or * can be supplied by the associated PreferenceActivity. The changed Preference values can therefore be passed back to the main activity via * sharedPreferences (as Preference editor commits during PerferenceActivity onPause), AND * intent returned by PrefesrenceActivity back to the main activity in onActivtyResult In other words, when main activity starts, it can take preference values either from * an intent or * shared preferences (assumed pre-existing) It seems to me in onCreate of the main activity, it should * take preference values from existing shared preferences on boot but * from intent as preference values are changed on the fly So there is a need to separate intent from system my own namespace. This maybe more complicated than necessary but it's how it's implemented for now. I do not know all the details of your application. Given what you wrote above, though, I'd just register a shared preference listener and be done with the matter: http://developer.android.com/reference/android/content/SharedPreferences.html#registerOnSharedPreferenceChangeListener(android.content.SharedPreferences.OnSharedPreferenceChangeListener) Your main activity should neither know nor care where and how the shared preferences get changed, just that they were changed. SharedPreferences.OnSharedPreferenceChangeListener handles that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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: Hello Tutorials - Gallery Example
Hi Jack, thanks for your response. It still doesn't compile... what is the method obtainStyledAttributes ()? This doesn't resolve. On Jul 16, 4:15 pm, Jack Ha jack...@t-mobile.com wrote: Create a file called attrs.xml and place the following in it: ?xml version=1.0 encoding=utf-8? resources declare-styleable name=default_gallery attr name=android:galleryItemBackground / /declare-styleable /resources Then replace the code in ImageAdapter with the following: TypedArray a = obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0); -- Jack Ha Open Source Development Center ・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 Jul 16, 6:30 am, Neilz neilhorn...@googlemail.com wrote: Hi all. I tried this example (http://developer.android.com/guide/ tutorials/views/hello-gallery.html) and found the compilation problems which having done some searching I see that many other people have found the same thing. No one seems to have found a solution to this. It would be great if someone involved could update this example, or provide clear instructions on how to get it working - as it would be a nice feature to try out. The problem stems from the 'styleable' attribute of the following line: public ImageAdapter(Context c) { mContext = c; TypedArray a = obtainStyledAttributes (android.R.styleable.Theme); mGalleryItemBackground = a.getResourceId( android.R.styleable.Theme_galleryItemBackground, 0); a.recycle(); } 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 run the latest version of the OS
Hi, I'm trying to do some work on the location framework, but I can't figure out how to install and view my changes. I've tried looking this up, but I get the impression I don't know the right terminology. Essentially, what I'd like to do is this: 1. Download the donut source 2. make changes to it 3. Run those changes in the emulator to test them out 4. Once the changes are proven to be good, run them in my dev phone So far, I've gotten through downloading and making the android code, but I can't figure out where to go from there. Can somebody give me some advice as to how to get steps 3 and 4 working? Thanks, Mike --~--~-~--~~~---~--~~ 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 run the latest version of the OS
mjlissner wrote: Hi, I'm trying to do some work on the location framework, but I can't figure out how to install and view my changes. I've tried looking this up, but I get the impression I don't know the right terminology. Essentially, what I'd like to do is this: 1. Download the donut source 2. make changes to it 3. Run those changes in the emulator to test them out 4. Once the changes are proven to be good, run them in my dev phone So far, I've gotten through downloading and making the android code, but I can't figure out where to go from there. Can somebody give me some advice as to how to get steps 3 and 4 working? Questions about building and using the open source code are better asked on a list that pertains to those issues: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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 run the latest version of the OS
OK, thanks. I've reposted this message here: http://groups.google.com/group/android-framework/browse_thread/thread/4b66d07bec8aca6a M On Jul 16, 3:15 pm, Mark Murphy mmur...@commonsware.com wrote: mjlissner wrote: Hi, I'm trying to do some work on the location framework, but I can't figure out how to install and view my changes. I've tried looking this up, but I get the impression I don't know the right terminology. Essentially, what I'd like to do is this: 1. Download the donut source 2. make changes to it 3. Run those changes in the emulator to test them out 4. Once the changes are proven to be good, run them in my dev phone So far, I've gotten through downloading and making the android code, but I can't figure out where to go from there. Can somebody give me some advice as to how to get steps 3 and 4 working? Questions about building and using the open source code are better asked on a list that pertains to those issues: http://source.android.com/discuss -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Looking for Android opportunities?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] Menu Force Close Issues
Hi, I'm having some troubles with the menu I just added to my app. I'm using a basic Java: @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuItem item = menu.add(0,1,0,Bookmark); item = menu.add(0,2,0,Remove Bookmark); return true; } to create my menu, and a Java: public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId()==1){ . to make it do things. Now the trouble is, occasionally, when i start my app up for the first time, or do a fresh install when testing it, and i click the menu button, it's gives me a force close error. It only seems to do it the first time on the very first screen. If i click either of my other buttons that refresh the view it tends not to do it, or, if you get it to open up and work once, it tends to be stable after that... It's driving me a bit crazy though, cause I can't see anything obvious wrong with my code, or why it would want to crash on a simple thing such as the menu screen... This is what logcat throws up when the app crashes, but it doesn't mean a whole lot to me yet... Quote: 07-16 18:11:42.721: ERROR/AndroidRuntime(21831): Uncaught handler: thread main exiting due to uncaught exception 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): android.view.InflateException: Binary XML file line #17: Error inflating class java.lang.reflect.Constructor 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.LayoutInflater.createView(LayoutInflater.java:512) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java: 564) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.LayoutInflater.inflate(LayoutInflater.java:385) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.view.menu.MenuBuilder$MenuType.getMenuView (MenuBuilder.java:196) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.view.menu.MenuBuilder.getMenuView (MenuBuilder.java:322) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.policy.impl.PhoneWindow.initializePanelContent (PhoneWindow.java:930) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.policy.impl.PhoneWindow.openPanel (PhoneWindow.java:528) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.policy.impl.PhoneWindow.onKeyUpPanel (PhoneWindow.java:693) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.policy.impl.PhoneWindow.onKeyUp(PhoneWindow.java: 1367) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent (PhoneWindow.java:1684) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java: 2188) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2158) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.ViewRoot.handleMessage(ViewRoot.java:1490) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.os.Handler.dispatchMessage(Handler.java:99) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.os.Looper.loop(Looper.java:123) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.app.ActivityThread.main(ActivityThread.java:3948) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at java.lang.reflect.Method.invokeNative(Native Method) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at java.lang.reflect.Method.invoke(Method.java:521) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at dalvik.system.NativeStart.main(Native Method) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): Caused by: java.lang.reflect.InvocationTargetException 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at com.android.internal.view.menu.IconMenuView.init(IconMenuView.java: 140) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at java.lang.reflect.Constructor.constructNative(Native Method) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at java.lang.reflect.Constructor.newInstance(Constructor.java:446) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.view.LayoutInflater.createView(LayoutInflater.java:499) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): ... 21 more 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): at
[android-beginners] Re: Menu Force Close Issues
erykthege...@googlemail.com wrote: 07-16 18:11:42.991: ERROR/AndroidRuntime(21831): android.view.InflateException: Binary XML file line #17: Error inflating class java.lang.reflect.Constructor Can you post the layout file corresponding to this error? What is on line #17? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunities? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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 separate system custom intents
Mark, Action with namespace works. Thanks. Here is how the application works now. Main activity is controlled by SharedPreference changes: * Main activity displays a list of thingies of Type X * User selects the Type from a ListPreference in a PreferenceActivity with its own separate screen. If the user clicks: Menu - Preferences - Select thingy type - A the preference screen appears and after A is selected from the ListPerference, the PreferenceActivity will finish after setResult with A as a parameter through an intent. This intent is to start a new Main Activity with onActivityResult. Later on, user may repeat same process with type B. So the thingies that Main activity displays depend on when how SharedPreferences are changed. SharedPreferences.OnSharedPreferenceChangeListener may still work for my app but user interaction flow may need changes. Thanks again. On Jul 16, 1:55 pm, Mark Murphy mmur...@commonsware.com wrote: az9702 wrote: user intent in this case is an intent supplied by the application e.g. intent created for startActivityForResult/onActivityResult. OK. The question is prompted by this scenario: My main activity has preferences that are set by a separate PreferenceActivity. The latter sends back an intent to former via onActivityResult. So in main activity's onCreate, it's intent * can be supplied by Android when the application first starts (e.g. on boot), or * can be supplied by the associated PreferenceActivity. The changed Preference values can therefore be passed back to the main activity via * sharedPreferences (as Preference editor commits during PerferenceActivity onPause), AND * intent returned by PrefesrenceActivity back to the main activity in onActivtyResult In other words, when main activity starts, it can take preference values either from * an intent or * shared preferences (assumed pre-existing) It seems to me in onCreate of the main activity, it should * take preference values from existing shared preferences on boot but * from intent as preference values are changed on the fly So there is a need to separate intent from system my own namespace. This maybe more complicated than necessary but it's how it's implemented for now. I do not know all the details of your application. Given what you wrote above, though, I'd just register a shared preference listener and be done with the matter: http://developer.android.com/reference/android/content/SharedPreferen...) Your main activity should neither know nor care where and how the shared preferences get changed, just that they were changed. SharedPreferences.OnSharedPreferenceChangeListener handles that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ 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] Rooting?
Haven't researched it : ( Jus have a few specific questions wich do feel a little obvious. Can rooting cause a potential harm to my g1? If so it it reversable? What are my risks? --~--~-~--~~~---~--~~ 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 log test results in a file? - logcat error
On Wed, Jul 15, 2009 at 3:35 PM, Yasseryassersiddi...@gmail.com wrote: Thanks Brett, that helped.. The log messages I write in the test code are not included in the output using -r option? to get those i need to run logcat. Thats correct. Also is there a mechanism to send messages from the emulator to desktop? Not that I'm aware of. -Yasser --~--~-~--~~~---~--~~ 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] Why won't it start here?
Is there any problem with launching a service via an Alarm's BroadcastReceiver's onReceive? My service never has it's onCreate or onStart method called. My Alarm's receiver gets a wakelock, calls context.startService(new Intent(context, FmiDaemon.class)); (context given via onRecieve parameter), waits 3 seconds, then releases the lock. My service has 2 methods, onCreate and onStart. onCreate gets another wakelock, the end of onStart releases the wakelock, and calls stopSelf. Both methods are supposed to send data to a log, but never do since they're never called. Where is the problem? Is that a bad context to use? Is onCreate and onStart the wrong methods to implement? --~--~-~--~~~---~--~~ 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: WebView with on onTouchEvent
HI, Please use this url http://www.geonet.org.nz/ and try to access the controls in explorer and in WebView(enable javascript))/Android browser. please let me know if any one of you can use the controls in that page. (onmouseoverslider) in Android. for more info : http://www.geonet.org.nz/help/shakenz-information.html Regards Balaji On Jul 16, 5:52 pm, balaji duddukuri mr.dbal...@gmail.com wrote: Hi, I have a web page with works fine with explorer. This Page uses java scrips to refresh it self on new touch event. These events are called properly when I am using explorer. But ,It is found that in Webview these touch events are not getting served. But I am able to use other options in that webview like dropdown box and buttons etc. Is there any one who tried onTouchEvent on webview? Regards Balu --~--~-~--~~~---~--~~ 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: Rooting?
Hi, Here is a pretty good description of how to root your G1 phone. http://androidandme.com/2009/05/guides/beginners-guide-for-rooting-your-android-g1-to-install-cupcake/ Of course there is always a risk that during rooting something goes wrong. Make sure that you charge your battery before you start the process. You don't won't that during flashing and rooting your device that the device turns of. Also follow exactly the steps in the same order. Good luck! -- 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 Jul 16, 4:16 pm, stephen rigg stevie...@gmail.com wrote: Haven't researched it : ( Jus have a few specific questions wich do feel a little obvious. Can rooting cause a potential harm to my g1? If so it it reversable? What are my risks? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---