[android-developers] Dynamically-Drawn, Clickable Map Overlay?
Hi, I'm trying to write an Android app that will allow a user to search for a generic destination (e.g., gas station) and be presented with up to ~5 nearby locations to choose from. The screen results would display the user location in the center, and possible destination options would be indicated by markers. The trick is that I don't want to rescale the map from its starting scale, and so some of the possible destinations may not be visible on the screen. I want to dynamically draw a clickable direction indicator (such as an arrow) that emanates from the user location and points to any off-screen destination. If there are multiple off-screen destinations, I'd probably want to scale the arrow lengths to indicate relative distances. If the user clicks on the arrow, they should be teleported to the off-screen location. Any thoughts on how to best implement this? The only information I've found on overlays uses static files (Most overlays seem to be just .PNG files for markers; one example had a route that was drawn from an XML file). I'd need to calculate the arrow based on direction to the destination (direction the arrow points) and the relative distance to that location (arrow length), so the overlay is something I'd have to come up with at run time. I think the main challenge is drawing the clickable arrows, but another question that comes to mind is, should I search using the Google Maps API, or is this job more suited to the Google Places API? Many thanks, PJ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is there any way to display 8000 * 8000 jpeg file without OutOfMemoryException
We might be able to come up with more creative solutions if you give us more information about where the 8000x8000 jpeg file is coming from, and whether you just want to display it in a WxH view or to do something else with it. Also, since you expressed interest in Google's server-side solution for Google Maps, are you considering developing a server-side component to your app as well? If so, you could host this capability (convert 8000x8000 image to smaller image) on a server somewhere. If you try to do all processing on the device itself, it's probably going to be very slow. What does your app do? Now you've got me all curious. :D -- PJ On Nov 19, 7:06 pm, James Wang jameswangc...@gmail.com wrote: Step #2: Generate 10,000 tiles that are 80*80 instead (100 * 100 tiles). Step #3: Render tiles on-screen by drawing them on the Canvas, and support swipe gestures to move through the image by replacing tiles, much like Google Maps works. Hi Mark, AFAIK, the decoder of jpeg on android must support to read random part of jpeg file if I want do step#2 as you said. I checked out SDK reference and found out the default decoder of jpeg seems not support it. Am I right? Do I have to make another jpeg decoder? BTW, I think google map does the same thing on server side, not on mobile phone, does not it? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to Load PDF to Browser?
Like Mark said, Android doesn't come with PDF functionality built-in. So, your best bet is to find some Java library that provides PDF reading capabilities and include it with your application. Maybe something like: http://www.jpedal.org/ -- PJ On Nov 20, 12:58 am, Moon Technolabs moonsoftwaret...@gmail.com wrote: Thanks 4 reply ! @ PJ : I want to load my own PDF file from Asset folder.. I know that there are application for that which loads PDF... n they also have use some methods for that.. I want to create my own PDF reader.. On Fri, Nov 20, 2009 at 1:16 AM, PJ pjbar...@gmail.com wrote: There are PDF Reader applications on the Market. But... what are you trying to accomplish? -- PJ On Nov 19, 9:32 am, Mark Murphy mmur...@commonsware.com wrote: xu haojie wrote: As I know, there isn't one function now, which can show PDF or DOC. On Nov 18, 4:28 pm, Moon Technolabs moonsoftwaret...@gmail.com wrote: Is there any inbuilt function to load PDF or DOC file.. Tried using Webview but content was not displayed... Some devices may ship with PDF or Microsoft Office document viewers/editors, but Android as a whole does not. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: RESET SQLite AUTOINCREMENT
Well, even if you assumed that insert transactions never failed, you'd still have gaps when a user deletes a row in the middle. So, you're not going to be able to avoid having gaps in your indexes. (And don't even think about trying to re-assign indexes every time you delete a row, because this will cause more problems than it will solve!) So, yeah, it can seem annoying at first that your indexes will grow more non-contiguous over time, but it's commonly accepted reality. :) Anyway... +1 vote to the suggestion that you just use the actual row id in the database when you do updates! Much safer/reliable. And AUTOINCREMENT is still fantastic for keeping your row id's unique. -- PJ On Nov 20, 2:52 pm, jotobjects jotobje...@gmail.com wrote: On Nov 20, 11:00 am, JasonMP hyperje...@gmail.com wrote: The issue came up b/c when i do delete rows i get gaps. gaps were bad for my code :). I'm not sure I understand what a general transaction abort is. Is this something that happens often? There is no such thing as a general transaction abort. Sorry my statement came out sounding that way! See android.database.sqlite.SQLiteDatabase method beginTransaction(). Even if not in an explicit transaction an insert could result in a gap if the insert fails. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I Didn't come here to cause no trouble, I just came to do the Android Market Shuffle!
The Market statistics were screwed up for a while. People were even getting negative numbers in some cases. But I think it's fixed now. -- PJ On Nov 20, 5:42 am, MikaSue mika...@mikasuedesigns.com wrote: What happened to the market? I am uninformed? On Nov 19, 7:29 am, niko20 nikolatesl...@yahoo.com wrote: *grin* Although seriously, I doubt those with paid apps really appreciate their rankings being all screwed with. -niko- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to Load PDF to Browser?
There are PDF Reader applications on the Market. But... what are you trying to accomplish? -- PJ On Nov 19, 9:32 am, Mark Murphy mmur...@commonsware.com wrote: xu haojie wrote: As I know, there isn't one function now, which can show PDF or DOC. On Nov 18, 4:28 pm, Moon Technolabs moonsoftwaret...@gmail.com wrote: Is there any inbuilt function to load PDF or DOC file.. Tried using Webview but content was not displayed... Some devices may ship with PDF or Microsoft Office document viewers/editors, but Android as a whole does not. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I Didn't come here to cause no trouble, I just came to do the Android Market Shuffle!
grabs guitar to go sing niko's new song... On Nov 19, 8:53 am, Vassilios Kirellous vassi...@gmail.com wrote: Its great you made a song out of this. Do you have dance moves to go with it? Anyway, does this mean we get to have our $25 subscription back? 2009/11/19 niko20 nikolatesl...@yahoo.com This also came to me last night, a little rendition of American Pie... ... I knew I was out of luck the day android market died, .. I started signing, bye, bye, android mar-ket apps, aye! Put my App on the mar-ket but the mar-ket was fried, Saw my devel-op-er con-sole and gave out a cry, My down-loads and rat-ings have been den-ied, My down-loads and rat-ings have been den-ied. LOL On Nov 19, 7:29 am, niko20 nikolatesl...@yahoo.com wrote: *grin* Although seriously, I doubt those with paid apps really appreciate their rankings being all screwed with. -niko -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to Add Objects to Sqlite Database
As Lior pointed out, you can't just stuff object-oriented data into a SQL database magically. You have to somehow convert the data into a format that can be stored. There are lots of options here but they all require extra work: 1. Manually convert your object into multiple columns of basic data types 2. Use a framework like Hibernate to do the work for you (but this is overkill for small objects) 3. Serialize your object into binary data and store it in a blob/image/ binary data field. However, this is kind of a dumb solution, because you wouldn't be able to query your data (unless you deserialize every row), and if your data object structure changes then you have to worry about versioning, etc. -- PJ On Nov 18, 12:38 am, 097 sphinxdw...@gmail.com wrote: See details in the docs under SDK_DIR/docs/guide/topics/data/data- storage.html and I think you'll find the answer You should implement SQLiteDatabase.CursorFactory interface, and create an SQLiteDatabase instance by calling the static method SQLiteDatabase.openOrCreateDatabase. Details info of SQLiteDatabase.CursorFactory is in SDK_DIR/docs/ reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html On Nov 18, 2:06 pm, naveenballa naveenball...@gmail.com wrote: i have a class like class Mydata{ String name; int data; Location[] locarray; } ListMydata = new ArrayListMydata( ); can anyone tell me how to add the object of Mydata class to Sqlite Database column Thanks in advance- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Developing Android Developers in the US
Since you specifically mentioned Dallas, check out the dallas-android- developers group. There are over a dozen of us and many of us are interested in job opportunities. http://groups.google.com/group/dallas-android-developers -- PJ On Nov 18, 2:25 pm, Sundog sunns...@gmail.com wrote: Hope you're not talking about mine; I've never had a single bug report, not even one. Not even on the new version. And feedback about the appearance is all positive. On Nov 18, 12:16 pm, niko20 nikolatesl...@yahoo.com wrote: 3-6 learning days is enough to write a game that looks like hell and has subtle bugs LOL -niko On Nov 18, 12:33 pm, Sundog sunns...@gmail.com wrote: Basically true. I learned enough in three days last year to write the demo version of my Mahjongg game, which was downloaded about a hundred thousand times. The hitch is Java, not Android. On Nov 18, 11:25 am, Andrei gml...@gmail.com wrote: 3 to 6 days is enough, if you know Java, to start writing real apps, the rest you learn writing apps while producing something useful On Nov 18, 10:33 am, Mark Murphy mmur...@commonsware.com wrote: Andreiwrote: 3-6 days should be more than enough to learn all Android That's unrealistic. I have been developing in, teaching, and writing about Android for nearly two years, and *I* don't know all Android. Heck, I am going to be spending a chunk of time the rest of this week just to wrap my head around the new contacts stuff. 3-6 days can give you a solid foundation for application development, though. Going back to the OP: I am attempting to reach out to Android Developers who might be able to answer a fundamental question... what is the best way to identify Android developers in the US? How do you define identify? My company is thinking of training developers who have experience in Java or Linux onsite at our facility in Dallas, TX for 3-6months in Android development. We have clients in the telecom industry who are in desperate need of individuals with expertise in Android development but we haven't had much luck finding developers in the US. There is a crying need for a go-to site for Android jobs. Lacking that, I would advertise on Craiglist,http://jobs.joelonsoftware.com/(ortheStackOverflowjobsarea, not sure if these are the same thing), anddev.org's jobs board, LinkedIn's Android Developer group, etc. That being said, many firms are growing their own Android development teams through training. Do you think training is a viable option? If no, then how to identify individuals with existing skills? I recommend students have experience with basic Java application development (though not necessarily JavaME or Swing/SWT), plus experience in some widget-based GUI development (which is most common stuff outside of most Web app frameworks). Note that all of this assumes you are looking for Android application developers. Firmware developers are a whole 'nuther kettle of fish. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Developing Android Developers in the US
Also you could try to meet developers in the IRC channel. The Android community is using the #android channel on the irc.freenode.net server. http://developer.android.com/community/index.html -- PJ On Nov 18, 2:49 pm, PJ pjbar...@gmail.com wrote: Since you specifically mentioned Dallas, check out the dallas-android- developers group. There are over a dozen of us and many of us are interested in job opportunities. http://groups.google.com/group/dallas-android-developers -- PJ On Nov 18, 2:25 pm, Sundog sunns...@gmail.com wrote: Hope you're not talking about mine; I've never had a single bug report, not even one. Not even on the new version. And feedback about the appearance is all positive. On Nov 18, 12:16 pm, niko20 nikolatesl...@yahoo.com wrote: 3-6 learning days is enough to write a game that looks like hell and has subtle bugs LOL -niko On Nov 18, 12:33 pm, Sundog sunns...@gmail.com wrote: Basically true. I learned enough in three days last year to write the demo version of my Mahjongg game, which was downloaded about a hundred thousand times. The hitch is Java, not Android. On Nov 18, 11:25 am, Andrei gml...@gmail.com wrote: 3 to 6 days is enough, if you know Java, to start writing real apps, the rest you learn writing apps while producing something useful On Nov 18, 10:33 am, Mark Murphy mmur...@commonsware.com wrote: Andreiwrote: 3-6 days should be more than enough to learn all Android That's unrealistic. I have been developing in, teaching, and writing about Android for nearly two years, and *I* don't know all Android. Heck, I am going to be spending a chunk of time the rest of this week just to wrap my head around the new contacts stuff. 3-6 days can give you a solid foundation for application development, though. Going back to the OP: I am attempting to reach out to Android Developers who might be able to answer a fundamental question... what is the best way to identify Android developers in the US? How do you define identify? My company is thinking of training developers who have experience in Java or Linux onsite at our facility in Dallas, TX for 3-6months in Android development. We have clients in the telecom industry who are in desperate need of individuals with expertise in Android development but we haven't had much luck finding developers in the US. There is a crying need for a go-to site for Android jobs. Lacking that, I would advertise on Craiglist,http://jobs.joelonsoftware.com/(ortheStackOverflowjobsarea, not sure if these are the same thing), anddev.org's jobs board, LinkedIn's Android Developer group, etc. That being said, many firms are growing their own Android development teams through training. Do you think training is a viable option? If no, then how to identify individuals with existing skills? I recommend students have experience with basic Java application development (though not necessarily JavaME or Swing/SWT), plus experience in some widget-based GUI development (which is most common stuff outside of most Web app frameworks). Note that all of this assumes you are looking for Android application developers. Firmware developers are a whole 'nuther kettle of fish. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books-Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Get info from mp3 file
Environment.getExternalStorageDirectory() will give you a Java File object to the directory of your sdcard: http://developer.android.com/reference/android/os/Environment.html Once you can access your mp3 file, extracting mp3 tag info is not an Android-specific issue, so you're probably better off searching for the solution to this elsewhere. Have fun! By the way, in addition to mp3 files, you might also look into 3gp files and other files, since those are common on mobile devices: http://developer.android.com/guide/appendix/media-formats.html -- PJ On Nov 16, 8:27 am, aBx abh...@gmail.com wrote: Hi, I am writin an app for playin music...i want to extract info like album-art,artist,album etc. from the mp3 files i have on my sd card...could anyone tell me how to do this?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I get informed whenever an application is started/created?
What's wrong with using the Android builtin logger? http://developer.android.com/reference/android/util/Log.html It's easy, just do stuff like: Log.d(TAG, Your debug log message goes here.); Log.w(TAG, Your warning message goes here.); Just be sure to turn off logging and debugging before publishing, as indicated in these best practices: http://developer.android.com/guide/publishing/preparing.html -- PJ On Nov 17, 9:19 am, Moritzz moritz...@googlemail.com wrote: Well there's an intent sent, as I can see in ddms but how do I catch it? On 16 Nov., 15:15, Moritzz moritz...@googlemail.com wrote: Hey guys, I'd like to write sthg like a logger for my Android phone where I log whenever an application/activity is started respectively created. So it's not only about my own stuff but about all the stuff that gets started on the phone. Is there sthg like an intent flying around or any kind of stuff that I could catch? Cheers Moritz- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dallas Android Developers
Everyone that is interested in joining the Dallas Android Developers group... We now have our own mailing list, so please use that to join! http://groups.google.com/group/dallas-android-developers Also, please use this mailing list to discuss everything related to this group, including fun topics like the Droid Lucasfilm trademark, what our official name should be, etc. Welcome! -- PJ On Nov 16, 4:42 pm, BillD sethd...@gmail.com wrote: I'd be interested in joining - I've been working with Android for about 6 months now - Bill On Nov 12, 1:10 am, PJ pjbar...@gmail.com wrote: If anyone is interested in joining the Dallas Droid Devs, just reply to this thread and let us know that you're interested. An existing member can then invite you to be a collaborator of our spreadsheet, so that you can see who we are, see what all is going on, and tell us about yourself. -- PJ On Nov 12, 12:39 am, PJ pjbar...@gmail.com wrote: I vote for the 14th! (I'm out of town on the 21st.) I was about to ask everyone where they lived and a bunch of other info, then I realized it would be easier if we just had a shared spreadsheet. So guys, I've created a Google Docs spreadsheet that we can all edit!http://spreadsheets.google.com/ccc?key=tLm0U-zoptmlhEk_B_DteaAhl=en It's not too fancy, but please note that it does have multiple sheets/ tabs at the bottom: Members: Go here and enter your profile info so that we can see where you live, what your skills/interests are, etc. Meetings: List of meetings. For now I went ahead and put the 14th down for our first meeting! Notes: Put random notes/discussions/crap about the group here. I'll give everyone (in this discussion) permissions to edit the spreadsheet. If you have trouble viewing or editing it, let me know and I'll try to fix it. -- PJ On Nov 11, 4:44 pm, Aniruddh Bajirao abaji...@gmail.com wrote: 14th or 21st both are good for me. How about the others? On Wed, Nov 11, 2009 at 1:24 PM, Chris Dempsey cdal...@gmail.com wrote: How about the 14th or 21st? I'm in the Plano area but I own a car so traveling isn't a problem. :) On Wed, Nov 11, 2009 at 10:49 AM, Aniruddh Bajirao abaji...@gmail.comwrote: As PJ suggested 'Dallas Droid Devs'... Lets plan an informal meet and get started... Any suggestions on when n where we can have a meet... On Wed, Nov 11, 2009 at 7:03 AM, Chris Dempsey cdal...@gmail.com wrote: I am interested in a Dallas Droid developer group. I think PJ has the right idea. Start informal and see where it goes. On Wed, Nov 11, 2009 at 1:22 AM, PJ pjbar...@gmail.com wrote: Dallas Droid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a local Android Dev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successful Dallas Android Dev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can the Dallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: When Dallas devs get together, they can share info about local opportunities * Discuss local interests (like... uh... Dallas Cowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having a Dallas Android Group? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create a Dallas Android Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys there (although it is more entrepreneur related). They also sometimes have the mobile monday meeting in their office space.. But I would not mind getting a bit involved in a Android Dev group. There is a North Texas PC Users group
[android-developers] Re: Multitouch support in Android 2.0
In fact, there isn't really a primary pointer. Well, the documentation for ACTION_POINTER_DOWN says that this applies to non-primary pointers, which implies that there really *is* a primary pointer. So, I was just trying to explain why sometimes the pointers were generating ACTION_DOWN, and other times were generating ACTION_POINTER_DOWN, *in terms of whether the pointer is primary or not, since this is how it is currently documented.* But perhaps the easiest way to look at it is: If there's 1 finger touching the device, expect ACTION_DOWN, ACTION_MOVE, ACTION_UP events; but if there's 2 fingers touching the device, expect ACTION_POINTER_DOWN and ACTION_POINTER_UP events. (I'm assuming that there is never a situation where ACTION_UP and ACTION_POINTER_UP are *both* generated for a single finger up occurrence. Please let me know if that's wrong, because I've never actually tested this stuff, I'm just going by the limited Droid examples posted by Dave.) -- PJ On Nov 16, 8:30 pm, Dianne Hackborn hack...@android.com wrote: On Sun, Nov 15, 2009 at 7:21 PM, niko20 nikolatesl...@yahoo.com wrote: I wish though, that the multitouch would have also been natively suuportedk in the sense that multiple views should get touch events also simultaneously. Very, very deliberately not supported. :) You'll need to look at the events arriving in a particular view and do what you want with them. It is too big a can of worms to try to treat these as different event streams, because they really aren't independent, and in many cases the view of the first press really does want to see all of different finger touches during that motion. Also the data you get from the screen is likely not going to be completely independent with respect to multiple fingers -- for example on the G1/Sapphire class screen there are interactions between the two points reported, and if you play with Pointer Location on Droid you will see that pressing a second finger can cause noticeable jitter in the first finger. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multitouch support in Android 2.0
Ar, I didn't see Dianne's response (nor Niko's) when I posted my last response, because I didn't realize that there was a page 2. Thanks, Dianne, for your explanation and for posting the examples! -- PJ On Nov 16, 1:57 am, PJ pjbar...@gmail.com wrote: I think I've figured it out for you, Dave. :) Bear with me. Let's look at the constants in MotionEvent: ACTION_MASK = 0x00ff ACTION_POINTER_ID_MASK = 0xff00 ACTION_POINTER_ID_SHIFT = 8 This confirms that the lowest order byte represents the action and the next byte represents the pointer ID. Now, the inconsistency that you observed (0 vs. 5, 1 vs. 6) can be explained by the fact that the action values for the primary pointer are different from the action values for non-primary pointers: For primary pointers: ACTION_DOWN = 0 ACTION_UP = 1 For non-primary pointers: ACTION_POINTER_DOWN = 5 ACTION_POINTER_UP = 6 So, hopefully that explains why you experienced those inconsistencies. Now, notice that there are some convenience constants that we can use to prevent doing all of this dirty work ourselves. Let's see if they jive: ACTION_POINTER_2_DOWN = 261 = 0x0100 | 0x0005 ACTION_POINTER_2_UP = 262 = 0x0100 | 0x0006 ACTION_POINTER_3_DOWN = 517 = 0x0200 | 0x0005 ACTION_POINTER_3_UP = 518 = 0x0200 | 0x0006 Important: Notice that the numbers 2 and 3 in the constant names are 1-based and not 0-based. However, PointerID's 0-based. So, for example, POINTER_2 means PointerID = 0x01. So, POINTER_1 should mean PointerID = 0x00. And note that the documentation says Pointer IDs start at 0, with 0 being the primary (first) pointer in the motion. Now, let's look at the following values: ACTION_POINTER_1_DOWN = 5 ACTION_POINTER_1_UP = 6 POINTER_1 represents PointerID=0. So, here we might have an apparent contradiction in documentation. Why would PointerID=0, a primary pointer, generate non-primary actions? However, one possibility is that PointerID=0 ceases to become a primary pointer when 2+ fingers are touching the device. I don't see that documented anywhere, but that's the only explanation I can think of for your Motorola Droid's behavior. Based on the scenario you described above, my best guess is that your Droid is following these interpretations/rules: * If there is only one finger touching the device, it is treated as PointerID=0 and as a primary, and so only ACTION_DOWN (0) and ACTION_UP (1) events are generated. * If there are 2+ fingers touching the device, then the first finger is still treated as PointerID=0, but NOT as a primary (e.g. it generates ACTION_POINTER_UP=6, not ACTION_UP=1). * Whenever there are 2 fingers touching the device and one finger is lifted, the sole remaining finger becomes PointerID=0 and primary, even if it was originally a 2nd or higher finger. If you apply these rules, it would explain your Droid's behavior: Press finger 1 to the screen (action value of 0) Correct: 0x | 0x (finger 1 is a primary) Press finger 2 to the screen (action value of 261) Correct: 0x0100 | 0x0005 (neither finger is a primary) Lift finger 1 from the screen (action value of 6) Correct: 0x | 0x0006 (finger 1 is no longer a primary; finger 2 is the only finger so it becomes PointerID=0 and primary) Lift finger 2 from the screen (action value of 1) Correct: 0x | 0x0001 (finger 2 is primary) So, that should explain your Droid's behavior. Now, I'm not saying that those extra interpretations/rules are correct and will/should be adopted by all devices. But I think it's a decent interpretation. I'm not terribly surprised that your Droid is acting like that. What do you think? -- PJ On Nov 15, 3:41 pm, davemac davemac...@gmail.com wrote: I think I've got this figured out. Almost. With multi-touch support, getAction() can return a compound value representing the pointerID in the second byte and the action value in the first byte. For example, if two fingers are down, and pointerID 1 is lifted (i.e., finger 2), getAction() returns a value of 262 (0x100 or 256 to represent pointerID 1, and 6 to represent up for a compound value of 0x106 or 262). I'm curious why it was done this way instead of using 0 for down and 1 for up, even when pointers are involved. Things get a little weird because of the differences. Here's an example (note I'm using a Motorola Droid phone here so this may behave differently on other devices): Press finger 1 to the screen (action value of 0) finger 1 gets pointerID 0, no problem, pointerID is 0, down is 0 Press finger 2 to the screen (action value of 261) finger 2 gets pointerID 1, a little weird, could have been 256 instead? Lift finger 1 from the screen (action value of 6) finger 2 is still pointerID 1, action could still have been 1? Lift finger 2 from the screen (action value of 1) finger 2 is still pointerID 1, but the action value is not 262
[android-developers] Re: List
Both: 1. In Google Groups you can choose to only receive ~1 e-mail a day (digest/summary) instead of an e-mail for every single post. But this is a reduction, not a full stop. 2. Most mail clients have a filtering option where you can do actions (delete, move to folder, etc.) for e-mails with criteria (to/from). -- PJ On Nov 14, 10:24 am, D G demet...@ece.neu.edu wrote: What's the easiest way to stop and start emails from this list without needing to unsubscribe and subscribe again? Options on my mail client or on the server side? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Need help with XML parsing (SAX)
You're probably not going to get a good response, because: 1. We don't know what error messages you're getting. I have a big problem and I can't use it doesn't help. 2. It doesn't look you've tried very hard to narrow down your problem. Have you tried a smaller file? Have you tried a file without special characters in it? 3. We're not convinced it's an Android problem. It could just be an XML problem and not appropriate for this mailing list. -- PJ On Nov 14, 2:32 pm, Gáb dgabo...@gmail.com wrote: Hi, I have a big problem with the XML parsing (SAX) in Android. I can't use it at the following XML file: ?xml version='1.0' encoding='UTF-8'? osm version='0.6' generator='JOSM' node id='-1' visible='true' lat='-1.377' lon='-1.3635' / node id='-2' visible='true' lat='-2.493' lon='-0.8684' / node id='-3' visible='true' lat='-2.889' lon='-0.2925' / node id='-4' visible='true' lat='-2.1731531008265907' lon='-1.0103675762462703' / node id='-5' visible='true' lat='-1.17173167547311' lon='-0.39861659247471204' / node id='-6' visible='true' lat='-0.6922364241169185' lon='-0.10570125802657904' / node id='-7' visible='true' lat='3.033' lon='-3.4425' / node id='-8' visible='true' lat='1.809' lon='-3.77549996' / node id='-9' visible='true' lat='1.341' lon='-4.0275' / node id='-10' visible='true' lat='1.143' lon='-4.06349994' / node id='-11' visible='true' lat='1.008' lon='-4.0095' / node id='-12' visible='true' lat='0.9179' lon='-3.9465' / node id='-13' visible='true' lat='2.3983853072967456' lon='-3.6151525266913263' / node id='-14' visible='true' lat='1.1499578470195202' lon='-2.6031083483750397' / node id='-15' visible='true' lat='-1.5140421529804802' lon='1.338891651624961' / node id='-16' action='modify' visible='true' lat='-2.7920421529804806' lon='3.660891651624961' / node id='-17' action='modify' visible='true' lat='-0.8300421529804803' lon='4.6688916516249614' / node id='-18' visible='true' lat='1.3479578470195202' lon='0.2993916516249608' / node id='-19' visible='true' lat='1.0257578470195203' lon='0.9437916516249611' / way id='-20' action='modify' visible='true' nd ref='-7' / nd ref='-13' / nd ref='-8' / nd ref='-9' / nd ref='-10' / nd ref='-11' / nd ref='-12' / nd ref='-1' / nd ref='-4' / nd ref='-2' / nd ref='-3' / tag k='ref' v='43' / tag k='highway' v='primary' / tag k='name' v='SzĹ‘regi Ăşt' / /way way id='-21' action='modify' visible='true' nd ref='-13' / nd ref='-18' / nd ref='-19' / nd ref='-17' / tag k='ref' v='FĹ‘ fasor' / tag k='highway' v='unclassified' / tag k='name' v='FĹ‘ fasor' / /way way id='-22' action='modify' visible='true' nd ref='-4' / nd ref='-5' / nd ref='-6' / nd ref='-19' / tag k='highway' v='unclassified' / tag k='name' v='Thököly utca' / /way way id='-23' action='modify' visible='true' nd ref='-5' / nd ref='-14' / nd ref='-8' / tag k='highway' v='unclassified' / tag k='name' v='Derkovits fasor' / /way way id='-24' action='modify' visible='true' nd ref='-6' / nd ref='-15' / tag k='highway' v='unclassified' / tag k='name' v='Hársfa utca' / /way way id='-25' action='modify' visible='true' nd ref='-15' / nd ref='-16' / tag k='highway' v='unclassified' / tag k='name' v='Katalin utca' / /way way id='-26' action='modify' visible='true' nd ref='-16' / nd ref='-17' / tag k='highway' v='unclassified' / tag k='name' v='Ă?gnes utca' / /way /osm I would be grateful if you could help me. I need this numbers to my map application. Could you write me source-code in Android? THX, Gab -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why String \0 is converted to [65533,65533]
I assume that this is Java code and not C code. Is that right? Are you sure that you posted your code correctly? When I try what you've done, I get an IndexOutOfBoundsException when executing sZero.charAt(1), which is what I would expect. Also, are you sure you're getting 65533 and not 65535? If you convert a value of -1 to an unsigned 16-bit integer, you get 65535. If you don't understand why, search the web for how negative integers are stored at the bit level. So, this might be related. Also, it sounds like you want to control things at the byte level. If so, you probably want to use the byte data type and stay away from char and int and String. Don't think of a String as an array of bytes, because it's not (in Java). It's more list a list of characters WHERE each character might actually take up more than one byte because of internationalization support. So perhaps you should be working with byte instead of char, assuming you're trying to manipulate things at the byte level. -- PJ On Nov 14, 9:42 am, Joes joyj...@gmail.com wrote: I just wanna know, with what condition can cause this issue. I think it's probably because of the charset setup which is controlled by makefile or something else. I need a direction to look into. Thanks On Nov 14, 9:18 am, Andrei gml...@gmail.com wrote: just a guess that u want to do this instead \\0 On Nov 14, 8:58 am, Joes joyj...@gmail.com wrote: All, While I'm programming the Android SMTP code,I met a confused problem with code similar as the following: String str= \0 username \0 passwrd; After executed the code, I found \0 is intepreted as two undisplayable char. Then I executed the folloing debug code: String sZero = \0; int iLen = sZero.length(); int iValue1 = (int)sZero.charAt(0); int iValue2 = (int)sZero.charAt(1); Log.w(ZERO, Zero String, Lenth=, iLen, value1=, iValue1, value2=, iValue2); What I get in screen is : Zero String, Length=2 value1=65533 value2=65533. Really confuse me, why \0 become [65533,65533] in my program? Thanks- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do you change the default language
I don't have a Hero, but... can you go to System settings and change the Locale? On Nov 13, 11:25 pm, Andre Liu zhl...@gmail.com wrote: Hi I came across your thread while researching on the same issue. Did you find out how to do it? Thanks. On Oct 31, 4:00 am, Nick nickw...@gmail.com wrote: How tochangethe defaultlanguagefrom english to chinese for HTC Hero. Is there any other ways except reinstall a new ROM -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multitouch support in Android 2.0
I think I've figured it out for you, Dave. :) Bear with me. Let's look at the constants in MotionEvent: ACTION_MASK = 0x00ff ACTION_POINTER_ID_MASK = 0xff00 ACTION_POINTER_ID_SHIFT = 8 This confirms that the lowest order byte represents the action and the next byte represents the pointer ID. Now, the inconsistency that you observed (0 vs. 5, 1 vs. 6) can be explained by the fact that the action values for the primary pointer are different from the action values for non-primary pointers: For primary pointers: ACTION_DOWN = 0 ACTION_UP = 1 For non-primary pointers: ACTION_POINTER_DOWN = 5 ACTION_POINTER_UP = 6 So, hopefully that explains why you experienced those inconsistencies. Now, notice that there are some convenience constants that we can use to prevent doing all of this dirty work ourselves. Let's see if they jive: ACTION_POINTER_2_DOWN = 261 = 0x0100 | 0x0005 ACTION_POINTER_2_UP = 262 = 0x0100 | 0x0006 ACTION_POINTER_3_DOWN = 517 = 0x0200 | 0x0005 ACTION_POINTER_3_UP = 518 = 0x0200 | 0x0006 Important: Notice that the numbers 2 and 3 in the constant names are 1-based and not 0-based. However, PointerID's 0-based. So, for example, POINTER_2 means PointerID = 0x01. So, POINTER_1 should mean PointerID = 0x00. And note that the documentation says Pointer IDs start at 0, with 0 being the primary (first) pointer in the motion. Now, let's look at the following values: ACTION_POINTER_1_DOWN = 5 ACTION_POINTER_1_UP = 6 POINTER_1 represents PointerID=0. So, here we might have an apparent contradiction in documentation. Why would PointerID=0, a primary pointer, generate non-primary actions? However, one possibility is that PointerID=0 ceases to become a primary pointer when 2+ fingers are touching the device. I don't see that documented anywhere, but that's the only explanation I can think of for your Motorola Droid's behavior. Based on the scenario you described above, my best guess is that your Droid is following these interpretations/rules: * If there is only one finger touching the device, it is treated as PointerID=0 and as a primary, and so only ACTION_DOWN (0) and ACTION_UP (1) events are generated. * If there are 2+ fingers touching the device, then the first finger is still treated as PointerID=0, but NOT as a primary (e.g. it generates ACTION_POINTER_UP=6, not ACTION_UP=1). * Whenever there are 2 fingers touching the device and one finger is lifted, the sole remaining finger becomes PointerID=0 and primary, even if it was originally a 2nd or higher finger. If you apply these rules, it would explain your Droid's behavior: Press finger 1 to the screen (action value of 0) Correct: 0x | 0x (finger 1 is a primary) Press finger 2 to the screen (action value of 261) Correct: 0x0100 | 0x0005 (neither finger is a primary) Lift finger 1 from the screen (action value of 6) Correct: 0x | 0x0006 (finger 1 is no longer a primary; finger 2 is the only finger so it becomes PointerID=0 and primary) Lift finger 2 from the screen (action value of 1) Correct: 0x | 0x0001 (finger 2 is primary) So, that should explain your Droid's behavior. Now, I'm not saying that those extra interpretations/rules are correct and will/should be adopted by all devices. But I think it's a decent interpretation. I'm not terribly surprised that your Droid is acting like that. What do you think? -- PJ On Nov 15, 3:41 pm, davemac davemac...@gmail.com wrote: I think I've got this figured out. Almost. With multi-touch support, getAction() can return a compound value representing the pointerID in the second byte and the action value in the first byte. For example, if two fingers are down, and pointerID 1 is lifted (i.e., finger 2), getAction() returns a value of 262 (0x100 or 256 to represent pointerID 1, and 6 to represent up for a compound value of 0x106 or 262). I'm curious why it was done this way instead of using 0 for down and 1 for up, even when pointers are involved. Things get a little weird because of the differences. Here's an example (note I'm using a Motorola Droid phone here so this may behave differently on other devices): Press finger 1 to the screen (action value of 0) finger 1 gets pointerID 0, no problem, pointerID is 0, down is 0 Press finger 2 to the screen (action value of 261) finger 2 gets pointerID 1, a little weird, could have been 256 instead? Lift finger 1 from the screen (action value of 6) finger 2 is still pointerID 1, action could still have been 1? Lift finger 2 from the screen (action value of 1) finger 2 is still pointerID 1, but the action value is not 262 or 257 it's 1 It would seem I can't use the bitmasks reliably in all cases. If I always inspect the action value for the pointerID and the action value, I get messed up at the end because pointerID has vanished. And 0 seems to be equivalent to 5, and 1 to 6. Is this something you'd consider a bug or is this how it's supposed to work? Should we expect
[android-developers] Re: Dallas Android Developers
Place: Cafe Brazil (since Richardson is central to us) Time: Tentative plan is 11:30am tomorrow morning, and likely won't change, but I will announce final decision at 10pm tonight. Please read on below. I've added a sheet to our spreadsheet called Availability and suggested some times on Saturday and Sunday. Everyone please go there and say Yes or No for each timeslot. http://spreadsheets.google.com/ccc?key=0Al_CwVe6tLzZdExtMFUtem9wdG1saEVrX0JfRHRlYUEhl=eninvite=COy_w_cE Tonight I'll look at everyone's availability and announce the official time (e.g. the one with the most Yes's). -- PJ On Nov 12, 1:10 am, PJ pjbar...@gmail.com wrote: If anyone is interested in joining the DallasDroid Devs, just reply to this thread and let us know that you're interested. An existing member can then invite you to be a collaborator of our spreadsheet, so that you can see who we are, see what all is going on, and tell us about yourself. -- PJ On Nov 12, 12:39 am, PJ pjbar...@gmail.com wrote: I vote for the 14th! (I'm out of town on the 21st.) I was about to ask everyone where they lived and a bunch of other info, then I realized it would be easier if we just had a shared spreadsheet. So guys, I've created a Google Docs spreadsheet that we can all edit!http://spreadsheets.google.com/ccc?key=tLm0U-zoptmlhEk_B_DteaAhl=en It's not too fancy, but please note that it does have multiple sheets/ tabs at the bottom: Members: Go here and enter your profile info so that we can see where you live, what your skills/interests are, etc. Meetings: List of meetings. For now I went ahead and put the 14th down for our first meeting! Notes: Put random notes/discussions/crap about the group here. I'll give everyone (in this discussion) permissions to edit the spreadsheet. If you have trouble viewing or editing it, let me know and I'll try to fix it. -- PJ On Nov 11, 4:44 pm, Aniruddh Bajirao abaji...@gmail.com wrote: 14th or 21st both are good for me. How about the others? On Wed, Nov 11, 2009 at 1:24 PM, Chris Dempsey cdal...@gmail.com wrote: How about the 14th or 21st? I'm in the Plano area but I own a car so traveling isn't a problem. :) On Wed, Nov 11, 2009 at 10:49 AM, Aniruddh Bajirao abaji...@gmail.comwrote: As PJ suggested 'DallasDroid Devs'... Lets plan an informal meet and get started... Any suggestions on when n where we can have a meet... On Wed, Nov 11, 2009 at 7:03 AM, Chris Dempsey cdal...@gmail.com wrote: I am interested in aDallasDroid developer group. I think PJ has the right idea. Start informal and see where it goes. On Wed, Nov 11, 2009 at 1:22 AM, PJ pjbar...@gmail.com wrote: DallasDroid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a localAndroidDev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successfulDallasAndroidDev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can theDallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: WhenDallasdevs get together, they can share info about local opportunities * Discuss local interests (like... uh...DallasCowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having aDallasAndroidGroup? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create aDallasAndroid Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys there (although it is more entrepreneur related). They also sometimes have the mobile monday meeting in their office space.. But I would not mind getting a bit involved in aAndroidDev group. There is a North Texas PC Users group somewhere (My father is a part of it). They meet on a weekend, and have break out groups I think
[android-developers] Re: Dallas Android Developers
(We're moving our meeting from Saturday to Sunday, since more people can make it.) The Dallas 'Droid Devs will have their first meeting this SUNDAY, NOV. 15 at 11:30am at Cafe Brazil. Look forward to seeing everyone there! -- PJ On Nov 13, 2:51 pm, PJ pjbar...@gmail.com wrote: Place: Cafe Brazil (since Richardson is central to us) Time: Tentative plan is 11:30am tomorrow morning, and likely won't change, but I will announce final decision at 10pm tonight. Please read on below. I've added a sheet to our spreadsheet called Availability and suggested some times on Saturday and Sunday. Everyone please go there and say Yes or No for each timeslot. http://spreadsheets.google.com/ccc?key=0Al_CwVe6tLzZdExtMFUtem9wdG1sa... Tonight I'll look at everyone's availability and announce the official time (e.g. the one with the most Yes's). -- PJ On Nov 12, 1:10 am, PJ pjbar...@gmail.com wrote: If anyone is interested in joining the DallasDroid Devs, just reply to this thread and let us know that you're interested. An existing member can then invite you to be a collaborator of our spreadsheet, so that you can see who we are, see what all is going on, and tell us about yourself. -- PJ On Nov 12, 12:39 am, PJ pjbar...@gmail.com wrote: I vote for the 14th! (I'm out of town on the 21st.) I was about to ask everyone where they lived and a bunch of other info, then I realized it would be easier if we just had a shared spreadsheet. So guys, I've created a Google Docs spreadsheet that we can all edit!http://spreadsheets.google.com/ccc?key=tLm0U-zoptmlhEk_B_DteaAhl=en It's not too fancy, but please note that it does have multiple sheets/ tabs at the bottom: Members: Go here and enter your profile info so that we can see where you live, what your skills/interests are, etc. Meetings: List of meetings. For now I went ahead and put the 14th down for our first meeting! Notes: Put random notes/discussions/crap about the group here. I'll give everyone (in this discussion) permissions to edit the spreadsheet. If you have trouble viewing or editing it, let me know and I'll try to fix it. -- PJ On Nov 11, 4:44 pm, Aniruddh Bajirao abaji...@gmail.com wrote: 14th or 21st both are good for me. How about the others? On Wed, Nov 11, 2009 at 1:24 PM, Chris Dempsey cdal...@gmail.com wrote: How about the 14th or 21st? I'm in the Plano area but I own a car so traveling isn't a problem. :) On Wed, Nov 11, 2009 at 10:49 AM, Aniruddh Bajirao abaji...@gmail.comwrote: As PJ suggested 'DallasDroid Devs'... Lets plan an informal meet and get started... Any suggestions on when n where we can have a meet... On Wed, Nov 11, 2009 at 7:03 AM, Chris Dempsey cdal...@gmail.com wrote: I am interested in aDallasDroid developer group. I think PJ has the right idea. Start informal and see where it goes. On Wed, Nov 11, 2009 at 1:22 AM, PJ pjbar...@gmail.com wrote: DallasDroid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a localAndroidDev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successfulDallasAndroidDev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can theDallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: WhenDallasdevs get together, they can share info about local opportunities * Discuss local interests (like... uh...DallasCowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having aDallasAndroidGroup? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create aDallasAndroid Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys
[android-developers] Re: Multitouch support in Android 2.0
Dianne: Hahaha, okay, thanks for saving me the trouble! Everyone: I'll do the community a huge favor and write a full-blown tutorial on how to write multi-touch apps... IF someone will just give me a Motorola Droid phone. ;) Seriously, if I had one, or any 2.0 phone that fully supports multi-touch, I'd be more than happy to test the hell out of the MotionEvents for the new multi-touch protocol and write a detailed how-to. -- PJ On Nov 11, 10:11 pm, Dianne Hackborn hack...@android.com wrote: I am pretty sure the emulator will not do anything intelligent with this. :) I very much doubt its touch driver has even been changed to generate events with the new multitouch protocol. On Wed, Nov 11, 2009 at 1:27 PM, PJ pjbar...@gmail.com wrote: I'm seriously considering installing a special mouse driver that allows two mice at once on the screen (they do exist), and trying to see if the emulator responds to simultaneous clicks as multi-touch. Someone please try this and let me know if it works. Or maybe I'll get around to it in a couple of weeks... On Nov 10, 9:06 am, gratiancutule...@yahoo.com gratiancutule...@yahoo.com wrote: On Oct 27, 6:45 pm, Dianne Hackborn hack...@android.com wrote: It's basically just some new APIs on MotionEvent: http://developer.android.com/reference/android/view/MotionEvent.html http://developer.android.com/reference/android/view/MotionEvent.html Hmmm and I'm not sure why, but in the doc all of those new APIs are in gray, so they should be easy to see. :) Or here is the API diff report: http://developer.android.com/sdk/api_diff/5/changes.html http://developer.android.com/sdk/api_diff/5/changes.htmlI see that I didn't get around to writing documentation in MotionEvent on the way multi-touch works; sorry about that. Basically there are new actions that tell you when additional fingers go down and up, and each MotionEvent you receive allows you to query for the number of pointers in the event as well as the x, y, size, and pressure of each of those points (and the historical data for all those points as well if you want to collect all data since the last motion event you received). So it should be pretty straight-forward. The main thing to watch out for is the difference between the index in the current event for a pointer's data vs. the pointer ID for that pointer: http://developer.android.com/reference/android/view/MotionEvent.html#. .. http://developer.android.com/reference/android/view/MotionEvent.html#.. .The pointer ID allows you to keep track of the individual fingers across multiple motion events. For example, if the user touches finger 1, then finger 2, then releases 1, then touches 1 again, you would see: Finger 1 down: MotionEvent ACTION_DOWN with one pointer, whose ID is 0. Finger 2 down: MotionEvent ACTION_POINTER_2_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 1 down: MotionEvent ACTION_POINTER_1_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 2 up: MotionEvent ACTION_UP with one pointer, whose ID is 1. (And inspite of what the update documentation says, the API allows for an arbitrary number of fingers, not just 3. I just happened to define convenience constants for the first 3 finger down/up actions, but given their weird naming as seen above and the finger ID mask is actually 255, it is perhaps best just to ignore those constants. :p) On Tue, Oct 27, 2009 at 9:29 AM, Streets Of Boston flyingdutc...@gmail.comwrote: Kind-a burried inside the blog-post on developer.android.com(http:// developer.android.com/sdk/android-2.0-highlights.html), i saw that multi-touch is now supported: Android virtual keyboard •An improved keyboard layout to makes it easier to hit the correct characters and improve typing speed. •The ***framework's multi-touch support*** ensures that key presses aren't missed while typing rapidly with two fingers. •A smarter dictionary learns from word usage and automatically includes contact names as suggestions. I'm really curious how multi-touch is supported in the API. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. Hello, Could you give me a more detailed example. I'm still not sure what is the difference between the pointer's ID and the pointer's index. Thanks!- Hide quoted text
[android-developers] Re: Recording direct system audio??
I'm not familiar with NDK development, so I'm not sure if I can help you much. However... It doesn't seem like the right solution to pull libraries from an actual G1 device. I would think that you should get whatever C libraries you need from some developer repository/SDK instead. Even if your app happens to compile and link and run, it might be risky. Also, do you also plan for this app to work on other devices besides the G1? If so, you better be pretty damn sure that it works for non- G1 devices before publishing to Market. Admittedly, I'm not familiar with how the development process should go for C code. I'm not sure how developers should handle software/ firmware updates (where Android C libraries are changed, I assume), and how to handle differences between devices. The Java domain seems easier/cleaner, but perhaps only because I'm more familiar with it. :) Any NDK developers wanna chime in here? -- PJ On Nov 12, 7:48 am, Bytes toyvenu.t...@gmail.com wrote: Hi PJ, Thanks for your response. Now my requirements got changed, even little bit inconsistency in voice seems to be OK. But I've few questions: 1. Lot of my code is developed in C, and I'm porting it on Android using NDK. So I wanna to avaid JNI for every read/write (to process the data). For this what I did earlier is, a. Pulled libmedia.so and its dependent libraries from the device (G1), b. Used Android source code header files frameworks/base/libs c. Used AudioRecord.cpp and AudioTrack.cpp present in media/ libmedia... instead of android.media.AudioRecord/AudioTrack packages. Compile and run on the device and voice is acceptable. As this is out of NDK, is it leagal ? Does Android Market allows this approach ? Thank you very much for your time. regards -Bytes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Reading from database/file
Also you can look at the Notepad tutorial, which is a very simple but helpful tutorial that covers how to use a SQLite3 database and how to use a cursor object to automatically populate a UI list: http://developer.android.com/guide/tutorials/notepad/index.html On Nov 10, 9:18 pm, Stephen Abrams ssaid...@gmail.com wrote: Hi Artem, I think this might help: http://www.anddev.org/working_with_the_sqlite-database_-_cursors-t319... Accessing the db directly:http://developer.android.com/guide/developing/tools/adb.html(section Examining sqlite3 Databases from a Remote Shell) As a new Android developer, you might want to spend some time pouring over the Framework Topics here:http://developer.android.com/guide/index.html HTH Steve On Nov 10, 9:44 pm, Artem art...@gmail.com wrote: I'm new to Android development so I don't really know how all this works. I know a lot of web languages but they're a lot different from java (which is what Android uses, I believe). I'm trying to create a small application but can't figure out how to populate a list or select box with data. How do I store the data so when you install the application it will read it from some database/file and display it? Do I need to use SQLite for this? If yes, how do I populate it before exporting the application? Sorry, I'm new...- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Recording direct system audio??
If you are worried about delay, you could probably use a small data chunk size and a large buffer size. (In my examples, I always used zero for the offset, but you could have a large buffer and process the data in small chunks. You would process the chunk at offset=0 first, then process the chunk with offset = chunk size, then chunk size times 2, etc. Eventually you have to wrap around back to the beginning of the buffer. I have no idea if the API methods handle any of that for you automatically or not.) Anyway, that's makes sense in my head, but I don't have that much experience with high-performant audio processing. Maybe some experts can correct me and/or elaborate on what the proper solution is. -- PJ On Nov 10, 11:23 pm, Bytes toyvenu.t...@gmail.com wrote: Hi, Thanks for your mails. I pressume you did in Java. Ofcourse, we can do the same thing in C++ also. But the problem is... Buffer Overflow . By simply increasing the buffer size won't solve the whole issue. It may apparently solve buffer overflow, but it will add delay in playing By the way do you know any good documentation about Android Audio internals. I'm also waiting for Android OS/Audio Expert feedback about this implementation. Sometimeback, I've posted my audio experiences on another thread http://groups.google.com/group/android-platform/browse_thread/thread/... Hopefully this time I can have success. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: AsyncTask and ProgressDialog
I have a similar problem. The fact that the Activity is destroyed and re-created every time the orientation changes doesn't make sense to me. Mark Murphy's second suggestion (overriding the default orientation- handling code, so your activity is not destroyed and recreated) actually makes the most sense, and part of me thinks that it should be the default behavior. In my personal opinion, the only thing that an activity should need to do when the orientation changes is to re-draw whatever UI components are already being shown. All this extra work of stopping and restarting dialogs, background tasks, etc. seems unnecessary and extremely bug-prone. Has anyone tried this strategy? If so, how easy was it to re-draw the UI? And what other challenges did you face with this solution? -- PJ On Nov 11, 4:16 am, Lee Jarvis ljjar...@googlemail.com wrote: Ahh! That makes total sense, I was trying to do more or less the same thing but it got tricky a there were a few flaws, this is great. I have a much better understanding of things now. Thanks On 11 Nov, 01:22, Lance Nanek lna...@gmail.com wrote: Here's a quick attempt at rewriting it without a static. Turned out more complex than I'd like. Pastebin version:http://pastebin.com/m7b8b184 Inline version: public class MyActivity extends Activity { private final static String LOG_TAG = MyActivity.class.getSimpleName (); private final static int DIALOG_ID = 1; private Task mTask; private boolean mShownDialog; @Override protected void onPrepareDialog(int id, Dialog dialog) { super.onPrepareDialog(id, dialog); if ( id == DIALOG_ID ) { mShownDialog = true; } } private void onTaskCompleted() { Log.i(LOG_TAG, Activity + this + has been notified the task is complete.); //Check added because dismissDialog throws an exception if the current //activity hasn't shown it. This Happens if task finishes early enough //before an orientation change that the dialog is already gone when //the previous activity bundles up the dialogs to reshow. if ( mShownDialog ) { dismissDialog(DIALOG_ID); Toast.makeText(this, Finished.., Toast.LENGTH_LONG).show(); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Object retained = getLastNonConfigurationInstance(); if ( retained instanceof Task ) { Log.i(LOG_TAG, Reclaiming previous background task.); mTask = (Task) retained; mTask.setActivity(this); } else { Log.i(LOG_TAG, Creating new background task.); mTask = new Task(this); mTask.execute(); } } @Override public Object onRetainNonConfigurationInstance() { mTask.setActivity(null); return mTask; } @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_ID: ProgressDialog dialog = new ProgressDialog(this); dialog.setMessage(Loading stuff..); dialog.setCancelable(true); return dialog; } return super.onCreateDialog(id); } private static class Task extends AsyncTaskVoid, Void, Void { private MyActivity activity; private boolean completed; private Task(MyActivity activity) { this.activity = activity; } @Override protected void onPreExecute() { activity.showDialog(DIALOG_ID); } @Override protected Void doInBackground(Void... unused) { try { Log.i(LOG_TAG, Background thread starting sleep.); Thread.sleep(15 * 1000); } catch (InterruptedException e) { Log.e(LOG_TAG, Thread interrupted:, e); } Log.i(LOG_TAG, Background thread finished sleep.); return null; } @Override protected void
[android-developers] Re: Multitouch support in Android 2.0
I'm seriously considering installing a special mouse driver that allows two mice at once on the screen (they do exist), and trying to see if the emulator responds to simultaneous clicks as multi-touch. Someone please try this and let me know if it works. Or maybe I'll get around to it in a couple of weeks... On Nov 10, 9:06 am, gratiancutule...@yahoo.com gratiancutule...@yahoo.com wrote: On Oct 27, 6:45 pm, Dianne Hackborn hack...@android.com wrote: It's basically just some new APIs on MotionEvent: http://developer.android.com/reference/android/view/MotionEvent.html http://developer.android.com/reference/android/view/MotionEvent.htmlHmmm and I'm not sure why, but in the doc all of those new APIs are in gray, so they should be easy to see. :) Or here is the API diff report: http://developer.android.com/sdk/api_diff/5/changes.html http://developer.android.com/sdk/api_diff/5/changes.htmlI see that I didn't get around to writing documentation in MotionEvent on the way multi-touch works; sorry about that. Basically there are new actions that tell you when additional fingers go down and up, and each MotionEvent you receive allows you to query for the number of pointers in the event as well as the x, y, size, and pressure of each of those points (and the historical data for all those points as well if you want to collect all data since the last motion event you received). So it should be pretty straight-forward. The main thing to watch out for is the difference between the index in the current event for a pointer's data vs. the pointer ID for that pointer: http://developer.android.com/reference/android/view/MotionEvent.html#... http://developer.android.com/reference/android/view/MotionEvent.html#...The pointer ID allows you to keep track of the individual fingers across multiple motion events. For example, if the user touches finger 1, then finger 2, then releases 1, then touches 1 again, you would see: Finger 1 down: MotionEvent ACTION_DOWN with one pointer, whose ID is 0. Finger 2 down: MotionEvent ACTION_POINTER_2_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 1 down: MotionEvent ACTION_POINTER_1_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 2 up: MotionEvent ACTION_UP with one pointer, whose ID is 1. (And inspite of what the update documentation says, the API allows for an arbitrary number of fingers, not just 3. I just happened to define convenience constants for the first 3 finger down/up actions, but given their weird naming as seen above and the finger ID mask is actually 255, it is perhaps best just to ignore those constants. :p) On Tue, Oct 27, 2009 at 9:29 AM, Streets Of Boston flyingdutc...@gmail.comwrote: Kind-a burried inside the blog-post on developer.android.com (http:// developer.android.com/sdk/android-2.0-highlights.html), i saw that multi-touch is now supported: Android virtual keyboard •An improved keyboard layout to makes it easier to hit the correct characters and improve typing speed. •The ***framework's multi-touch support*** ensures that key presses aren't missed while typing rapidly with two fingers. •A smarter dictionary learns from word usage and automatically includes contact names as suggestions. I'm really curious how multi-touch is supported in the API. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. Hello, Could you give me a more detailed example. I'm still not sure what is the difference between the pointer's ID and the pointer's index. Thanks!- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Recording direct system audio??
Bytes, To answer your question, I'm using Java. Two questions for you: 1. Are you testing this on both an emulator and on a real device? You might have problems on one but not the other. In my case, simultaneous record+playback is very choppy on the emulator (I have an Intel Core 2 Duo 1.87GHz), but smoother on my real G1 device. So, just be aware that if the emulator/cpu is too slow for your design, it can cause problems. 2. Are you invoking mAudioRecord.startRecording() as late as possible? I used to have problem with simultaneous record+playback because I would first create and set up AudioRecord and invoke mAudioRecord.startRecording(), then I would create and set up AudioTrack and invoke mAudioTrack.play() afterwards. However, initializing the AudioTrack for playback takes a small amount of time that can cause problems. Even if you are not doing that, perhaps you are doing other tasks that you could relocate before your mAudioRecord.startRecording() call. So, what I'm trying to say is: try to invoke mAudioRecord.startRecording() as late as you possibly can, and try to start consuming the audio data as soon as you possibly can immediately after the startRecording() call. This should also reduce your buffer overflow problems. Hope this helps, -- PJ On Nov 11, 11:22 pm, Bytes toyvenu.t...@gmail.com wrote: PJ Niko, Thanks for your response. Yes , whatever you are telling is correct. Using a large buffer will solve the buffer overflow problem. http://groups.google.com/group/android-developers/browse_thread/threa... According to above thread (ofcourse, he is using callbacks) and my personal exp showed me in isolation both recording and playing is fine but as soon as they combined problems occuring. Niko, can you share your feedback after implementing a loopback. Once again, Are you guys using C++ or Java ? -Bytes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dallas Android Developers
I vote for the 14th! (I'm out of town on the 21st.) I was about to ask everyone where they lived and a bunch of other info, then I realized it would be easier if we just had a shared spreadsheet. So guys, I've created a Google Docs spreadsheet that we can all edit! http://spreadsheets.google.com/ccc?key=tLm0U-zoptmlhEk_B_DteaAhl=en It's not too fancy, but please note that it does have multiple sheets/ tabs at the bottom: Members: Go here and enter your profile info so that we can see where you live, what your skills/interests are, etc. Meetings: List of meetings. For now I went ahead and put the 14th down for our first meeting! Notes: Put random notes/discussions/crap about the group here. I'll give everyone (in this discussion) permissions to edit the spreadsheet. If you have trouble viewing or editing it, let me know and I'll try to fix it. -- PJ On Nov 11, 4:44 pm, Aniruddh Bajirao abaji...@gmail.com wrote: 14th or 21st both are good for me. How about the others? On Wed, Nov 11, 2009 at 1:24 PM, Chris Dempsey cdal...@gmail.com wrote: How about the 14th or 21st? I'm in the Plano area but I own a car so traveling isn't a problem. :) On Wed, Nov 11, 2009 at 10:49 AM, Aniruddh Bajirao abaji...@gmail.comwrote: As PJ suggested 'Dallas Droid Devs'... Lets plan an informal meet and get started... Any suggestions on when n where we can have a meet... On Wed, Nov 11, 2009 at 7:03 AM, Chris Dempsey cdal...@gmail.com wrote: I am interested in a Dallas Droid developer group. I think PJ has the right idea. Start informal and see where it goes. On Wed, Nov 11, 2009 at 1:22 AM, PJ pjbar...@gmail.com wrote: Dallas Droid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a local Android Dev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successful Dallas Android Dev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can the Dallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: When Dallas devs get together, they can share info about local opportunities * Discuss local interests (like... uh... Dallas Cowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having a Dallas Android Group? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create a Dallas Android Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys there (although it is more entrepreneur related). They also sometimes have the mobile monday meeting in their office space.. But I would not mind getting a bit involved in a Android Dev group. There is a North Texas PC Users group somewhere (My father is a part of it). They meet on a weekend, and have break out groups I think for different technologies.. Maybe get a subgroup started there? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence. ... Albert Einstein
[android-developers] Re: Dallas Android Developers
If anyone is interested in joining the Dallas Droid Devs, just reply to this thread and let us know that you're interested. An existing member can then invite you to be a collaborator of our spreadsheet, so that you can see who we are, see what all is going on, and tell us about yourself. -- PJ On Nov 12, 12:39 am, PJ pjbar...@gmail.com wrote: I vote for the 14th! (I'm out of town on the 21st.) I was about to ask everyone where they lived and a bunch of other info, then I realized it would be easier if we just had a shared spreadsheet. So guys, I've created a Google Docs spreadsheet that we can all edit!http://spreadsheets.google.com/ccc?key=tLm0U-zoptmlhEk_B_DteaAhl=en It's not too fancy, but please note that it does have multiple sheets/ tabs at the bottom: Members: Go here and enter your profile info so that we can see where you live, what your skills/interests are, etc. Meetings: List of meetings. For now I went ahead and put the 14th down for our first meeting! Notes: Put random notes/discussions/crap about the group here. I'll give everyone (in this discussion) permissions to edit the spreadsheet. If you have trouble viewing or editing it, let me know and I'll try to fix it. -- PJ On Nov 11, 4:44 pm, Aniruddh Bajirao abaji...@gmail.com wrote: 14th or 21st both are good for me. How about the others? On Wed, Nov 11, 2009 at 1:24 PM, Chris Dempsey cdal...@gmail.com wrote: How about the 14th or 21st? I'm in the Plano area but I own a car so traveling isn't a problem. :) On Wed, Nov 11, 2009 at 10:49 AM, Aniruddh Bajirao abaji...@gmail.comwrote: As PJ suggested 'Dallas Droid Devs'... Lets plan an informal meet and get started... Any suggestions on when n where we can have a meet... On Wed, Nov 11, 2009 at 7:03 AM, Chris Dempsey cdal...@gmail.com wrote: I am interested in a Dallas Droid developer group. I think PJ has the right idea. Start informal and see where it goes. On Wed, Nov 11, 2009 at 1:22 AM, PJ pjbar...@gmail.com wrote: Dallas Droid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a local Android Dev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successful Dallas Android Dev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can the Dallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: When Dallas devs get together, they can share info about local opportunities * Discuss local interests (like... uh... Dallas Cowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having a Dallas Android Group? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create a Dallas Android Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys there (although it is more entrepreneur related). They also sometimes have the mobile monday meeting in their office space.. But I would not mind getting a bit involved in a Android Dev group. There is a North Texas PC Users group somewhere (My father is a part of it). They meet on a weekend, and have break out groups I think for different technologies.. Maybe get a subgroup started there? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please help me to choose Android Phones (For Android development)
I can't agree more with Eric. Why get 20 phones that are all identical? Get some variety so that you write apps that work as expected for multiple devices. You can't put a price tag on quality. It's not worth saving $50 per phone if you end up writing an app that breaks on a particular device and you get a bunch of upset customers and bad ratings/image. You definitely want to vary things like: * hard keyboard vs soft keyboard * high-res screens vs low-res screens * fast vs slow cpus And Eric's link to that spreadsheet is freaking great. -- PJ On Nov 10, 5:42 pm, Eric Wong (hdmp4.com) ericwon...@gmail.com wrote: I would say get at least one unit for each Android models out there? Since every unit seems to have slight variation of Android implementation and apk tested on one may not work on the other. Hope this spreadsheet would helphttp://spreadsheets.google.com/pub?key=rdm8c2ZfSDKd5l-dVy4SrnAoutput... Cheers Eric On Nov 10, 12:31 pm, Ash ashwin.disco...@gmail.com wrote: I'm new to android development. We need to buy around 20 phones for android development for our university. Please share your views and comments on the phone you think is good for Android development. Thank You -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Recording direct system audio??
I have found another way to record audio without using MediaRecorder, but I'd like to hear feedback from an Android OS/audio expert. I use the AudioRecord class, which records audio and allows you to read the data into your own buffer. You can also do something like: int SAMPLE_RATE_IN_HERTZ = 8000; int BUFFER_SIZE_IN_BYTES = 4096; int CHUNK_SIZE = 320; AudioRecord audioRecord = new AudioRecord (MediaRecorder.AudioSource.MIC, SAMPLE_RATE_IN_HERTZ, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, BUFFER_SIZE_IN_BYTES); audioRecord.startRecording(); while (true) { int bytesRead = audioRecord.read(buffer, 0, CHUNK_SIZE); } Similarly, the AudioTrack does playing via buffers. So, you can do playback by doing something like: AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_SYSTEM, SAMPLE_RATE_IN_HERTZ, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, BUFFER_SIZE_IN_BYTES, AudioTrack.MODE_STREAM); audioTrack.play(); int bytesWritten = audioTrack.write(buffer, 0, CHUNK_SIZE); You can even record and play simultaneously, i.e. record audio into your buffer via audioRecord.read(), then play that same data via audioTrack.write(). Of course, I'm leaving out a lot of details such as proper looping, handling buffer overlows, using non-zero offset values instead of hard- coding 0, handling stops and restarts, etc. But hopefully this gives you an idea. Note that as soon as you startRecording(), you must immediately and constantly consume the audio data, otherwise you will lose the data and get buffer overflows. This can be mitigated with larger buffers and chunks. But beware if you are debugging and stepping through code, because you will get buffer overflow errors, presumably because there's a separate system thread that is still constantly recording and filling its internal buffer, and that buffer will fill up quickly while you're debugging your own thread. Anyway, there's a non-MediaRecorder solution that you can play with... but again, I have no idea if it's the preferred method, and I'd like to hear comments from an Android OS/audio expert. -- PJ On Nov 9, 10:39 pm, Hunter Peress hunt...@gmail.com wrote: One more way of framing the Issue. Is there a way to access things with AID_SYSTEM,AID_AUDIO (aka /dev/msm_pcm_out) from an app? This capability...to record direct from the system. was available on iphone years ago. so, I see this as a pretty darn pressing issue. Not to mention that people have been asking for this capability for android for years now too. On Nov 9, 6:57 pm, Hunter Peress hunt...@gmail.com wrote: Im trying to record audio directly from the system. Using the standard API, you can only record from the MIC or phonecalls, ala: MediaRecorder Some ways I've tried is to read from /dev/audio and /dev/eac from my app, but I think the sandbox of the app is preventing this. Im thinking about using the NDK, but Im not sure if that would overcome the sandbox aspect ? Ideally, there is some solution outthere to access the audio sub- system directly. Whether it be directly to alsa, to the AudioFlinger, to /dev/eac Anyone have ideas? This file here:http://www.google.com/codesearch/p?hl=ensa=Ncd=11ct=rc#-EqHK0vgjLY... apparently accesses /dev/audio, but when I try, it says it doesnt exist. Any clues would help,thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Keyboard-less device support
my lack of hardware Home, Menu, and Back keys is killing me Even devices that lack a hard keyboard still have those keys, though, right? Are there any devices that *don't* have hard Home, Menu, Back buttons? -- PJ On Nov 9, 6:34 pm, Mark Murphy mmur...@commonsware.com wrote: GT wrote: Are keyboard-less devices supported? More Android devices lack a keyboard than have them. I am developing apps for an Android device that does not have any hardware keys except for a power button and I have been running into hurdles left and right. Not having a keyboard is not a big problem but my lack of hardware Home, Menu, and Back keys is killing me. By sending a Go to home screen intent I can simulate the Home key but I have yet to find a way to have software Back and Menu buttons. Worse yet, even if I did get my keys working I don't see how to make them always available to the user. There doesn't seem to be a way to keep them accessable from the status bar and I haven't found a way of creating a floating menu that always stays on top of all other activities. I might be able to bring up my menu using the power button but I'm not sure it will work. Does anyone have any insight into this? Questions of this nature are much better asked on [android-porting]. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can i divide a picture/image into parts
An idea: http://developer.android.com/intl/fr/reference/android/graphics/Bitmap.html#createBitmap(android.graphics.Bitmap, int, int, int, int) -- PJ On Nov 10, 2:45 am, Nasir itsna...@gmail.com wrote: Hey, I am new to Android and need your guidence and suggestions on a problem im trying to solve. I want to divide an image into 4 parts just like a puzzle game but could not find any tutorials on it. After an image is divided into parts i need to store each part in an array. Any idea, please help me in this scenario!! Looking forward for your kind response... Thanks! Nasir Ibrahim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can i divide a picture/image into parts
Er, let me try that link again (the spaces screwed it up): http://developer.android.com/intl/fr/reference/android/graphics/Bitmap.html#createBitmap(android.graphics.Bitmap,+int,+int,+int,+int) On Nov 10, 10:50 pm, PJ pjbar...@gmail.com wrote: An idea:http://developer.android.com/intl/fr/reference/android/graphics/Bitma..., int, int, int, int) -- PJ On Nov 10, 2:45 am, Nasir itsna...@gmail.com wrote: Hey, I am new to Android and need your guidence and suggestions on a problem im trying to solve. I want to divide an image into 4 parts just like a puzzle game but could not find any tutorials on it. After an image is divided into parts i need to store each part in an array. Any idea, please help me in this scenario!! Looking forward for your kind response... Thanks! Nasir Ibrahim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How can i divide a picture/image into parts
Okay, the Google Groups website is doing more harm than good when trying to fix my links. :) The Bitmap method that I was suggesting that you check out is: createBitmap(Bitmap source, int x, int y, int width, int height) Returns an immutable bitmap from the specified subset of the source bitmap. So, first you create a Bitmap object for the whole image, then you can get sub-rectangles from it using the above method. I've never actually done this myself, but from looking at the API I suspect this would work. Hope this helps, -- PJ On Nov 10, 10:51 pm, PJ pjbar...@gmail.com wrote: Er, let me try that link again (the spaces screwed it up):http://developer.android.com/intl/fr/reference/android/graphics/Bitma...) On Nov 10, 10:50 pm, PJ pjbar...@gmail.com wrote: An idea:http://developer.android.com/intl/fr/reference/android/graphics/Bitma..., int, int, int, int) -- PJ On Nov 10, 2:45 am, Nasir itsna...@gmail.com wrote: Hey, I am new to Android and need your guidence and suggestions on a problem im trying to solve. I want to divide an image into 4 parts just like a puzzle game but could not find any tutorials on it. After an image is divided into parts i need to store each part in an array. Any idea, please help me in this scenario!! Looking forward for your kind response... Thanks! Nasir Ibrahim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please help me to choose Android Phones (For Android development)
Pankaj, I'm in the same boat as you are: I'm an independent developer that doesn't have funding to buy 20 phones. The emulator comes with a lot of options, so that could be used to some extent to simulate different devices. You can simulate slower devices with -cpu-delay, set the resolution with -dpi-device and - scale, etc.: http://developer.android.com/intl/fr/guide/developing/tools/emulator.html#startup-options But, it's impossible to test for everything. When I published my first app, I found out the hard way that for Hero phone users, the soft keyboard wouldn't pop out for them. I got some bad reviews and I had to publish a quick fix. Neverthelss (I'm pre-empting the Android haters), I'd much rather an app work on 80% of 20 different Android devices than 100% of a handful of Apple devices. No open platform is perfect, but Android rocks in my book. On Nov 10, 11:07 pm, Pankaj Godbole panka...@gmail.com wrote: I agree that quality is priceless. I know this first-hand from spending several years in testing and quality assurance. It might be possible for an institution to purchase 20 different phone models to test on. But how is an independent individual developer like me supposed to purchase so many phones, when perhaps all of them would be locked to a carrier and most would come with a 2yr service agreement? I am also not based in the US. Is there a more feasible way without compromising on quality? Eric's spreadsheet is awesome! Here's another one I found pertaining to US carriers:http://spreadsheets.google.com/pub?key=tIuLv6KThktwpCyNu5lbrWQgid=0 - Pankaj. On Nov 11, 9:13 am, PJ pjbar...@gmail.com wrote: I can't agree more with Eric. Why get 20 phones that are all identical? Get some variety so that you write apps that work as expected for multiple devices. You can't put a price tag on quality. It's not worth saving $50 per phone if you end up writing an app that breaks on a particular device and you get a bunch of upset customers and bad ratings/image. You definitely want to vary things like: * hard keyboard vs soft keyboard * high-res screens vs low-res screens * fast vs slow cpus And Eric's link to that spreadsheet is freaking great. -- PJ On Nov 10, 5:42 pm, Eric Wong (hdmp4.com) ericwon...@gmail.com wrote: I would say get at least one unit for each Android models out there? Since every unit seems to have slight variation of Android implementation and apk tested on one may not work on the other. Hope this spreadsheet would helphttp://spreadsheets.google.com/pub?key=rdm8c2ZfSDKd5l-dVy4SrnAoutput... Cheers Eric On Nov 10, 12:31 pm, Ash ashwin.disco...@gmail.com wrote: I'm new to android development. We need to buy around 20 phones for android development for our university. Please share your views and comments on the phone you think is good for Android development. Thank You -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dallas Android Developers
Dallas Droid Devs. It's catchy. Quick, someone reserve the domain! I think the biggest barrier to forming a local Android Dev group is the fact that developers can hang out in the IRC channel (and this Google group) and find lots of discussion there, from the comfort (and whim/speed) of their own homes. So, some people might not feel the extra effort is worth it. So an important step to creating a successful Dallas Android Dev group is to brainstorm and come up with a convincing list of incentives to create/join a local group. Developers will ask, What can the Dallas group offer me that the worldwide community can't? The answer is stuff like: * Job placement: When Dallas devs get together, they can share info about local opportunities * Discuss local interests (like... uh... Dallas Cowboys? Whataburger? hahaha...) * Get out of the house and meet in person * etc. I'm personally not gifted at organizing social events, but I'd strongly consider joining/supporting. On Nov 10, 9:54 pm, Aniruddh Bajirao abaji...@gmail.com wrote: Anyone interested in having a Dallas Android Group? On Fri, Nov 6, 2009 at 9:42 PM, Aniruddh Bajirao abaji...@gmail.com wrote: If we have enough people interested lets create a Dallas Android Dev-group. We can have planned meets. Will definitely be interesting and useful to share knowledge and experience as well as to get answers to questions. Above all it would be very interesting to meet and network with other Android Enthusiasts. On Fri, Nov 6, 2009 at 8:51 PM, cpick cp...@vmenu.com wrote: You might check the Texas Startup Blog. Alex Muse has a happy hour down at the info mart first monday of the month. Usually some android guys there (although it is more entrepreneur related). They also sometimes have the mobile monday meeting in their office space.. But I would not mind getting a bit involved in a Android Dev group. There is a North Texas PC Users group somewhere (My father is a part of it). They meet on a weekend, and have break out groups I think for different technologies.. Maybe get a subgroup started there? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence. ... Albert Einstein. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Aniruddh Bajirao www.ryze.com/Aniruddh -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence. ... Albert Einstein. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Aniruddh Bajiraowww.ryze.com/Aniruddh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: finishActivity doesnt work
finishActivity() is intended to be used to force-finish an activity, *** from the same activity that started it ***. So, if you want to force-finish Activity B, then I think Main Activity is the only one that can do it via finishActivity(), because Main Activity is the one that started it. However, I think there's a way for Activity C to terminate and to go back directly to Main Activity and to ask Main Activity to destroy all activities above it (B). Let me see if I can find that... -- PJ On Nov 5, 2:58 pm, Bob Cai caibo...@gmail.com wrote: Hello, In main Activity, I called startActivityForResult(intentB, 100) to start a new activity B, then in B, I called startActivity(intentC) to start another activity C. Lastly I wanted to call finishActivity(100) in C to close activity B, but seemed it was not successfully destoried(I can use BACK key to see it's still there.). Anyone can give advice of this? Thanks, Bob -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: finishActivity doesnt work
Check out this discussion, it sounds similar to what you want to accomplish: http://groups.google.com/group/android-developers/browse_thread/thread/a6a2161fe6ec064f/1cb8a1ef843b0787 Specifically, check out FLAG_ACTIVITY_CLEAR_TOP at: http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP Hope this helps! -- PJ On Nov 5, 4:48 pm, PJ pjbar...@gmail.com wrote: finishActivity() is intended to be used to force-finish an activity, *** from the same activity that started it ***. So, if you want to force-finish Activity B, then I think Main Activity is the only one that can do it via finishActivity(), because Main Activity is the one that started it. However, I think there's a way for Activity C to terminate and to go back directly to Main Activity and to ask Main Activity to destroy all activities above it (B). Let me see if I can find that... -- PJ On Nov 5, 2:58 pm, Bob Cai caibo...@gmail.com wrote: Hello, In main Activity, I called startActivityForResult(intentB, 100) to start a new activity B, then in B, I called startActivity(intentC) to start another activity C. Lastly I wanted to call finishActivity(100) in C to close activity B, but seemed it was not successfully destoried(I can use BACK key to see it's still there.). Anyone can give advice of this? Thanks, Bob- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: finishActivity doesnt work
Hmm, I went back and read the Javadoc for finishActivity(), and it's not clear whether activities should be allowed to use finishActivity() for activities that it didn't start. I can interpret it both ways. So, you may be right; maybe it should work. But at the very least, maybe you could try the different approach above. /shrug I hope you let us know how it turns out, because I've only used finish (), and not finishActivity(). On Nov 5, 4:54 pm, PJ pjbar...@gmail.com wrote: Check out this discussion, it sounds similar to what you want to accomplish:http://groups.google.com/group/android-developers/browse_thread/threa... Specifically, check out FLAG_ACTIVITY_CLEAR_TOP at:http://developer.android.com/reference/android/content/Intent.html#FL... Hope this helps! -- PJ On Nov 5, 4:48 pm, PJ pjbar...@gmail.com wrote: finishActivity() is intended to be used to force-finish an activity, *** from the same activity that started it ***. So, if you want to force-finish Activity B, then I think Main Activity is the only one that can do it via finishActivity(), because Main Activity is the one that started it. However, I think there's a way for Activity C to terminate and to go back directly to Main Activity and to ask Main Activity to destroy all activities above it (B). Let me see if I can find that... -- PJ On Nov 5, 2:58 pm, Bob Cai caibo...@gmail.com wrote: Hello, In main Activity, I called startActivityForResult(intentB, 100) to start a new activity B, then in B, I called startActivity(intentC) to start another activity C. Lastly I wanted to call finishActivity(100) in C to close activity B, but seemed it was not successfully destoried(I can use BACK key to see it's still there.). Anyone can give advice of this? Thanks, Bob- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Dallas Android Developers
Where in Dallas do you live? (I live in Plano and develop in my spare time.) What do you specifically mean by user group, and what benefits do you foresee from a local group? -- PJ On Nov 4, 1:33 pm, Henry_Aigtch asmedr...@gmail.com wrote: Looking for a Dallas Based Android user group... anybody now of one? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where put file with data?
In the past, when creating a file in the local directory, it put it under /data/data/packagename/files/ Example: /data/data/com.companyname.appname/files/test.txt Also, SharedPreferences are persisted under shared_prefs subdirectory instead of files. Example: /data/data/com.companyname.appname/shared_prefs/test.Name.xml Also, you can explore the file system's directory structure by using the DDMS GUI, or by using adb to get a UNIX shell into the emulator. Another option is the raw resource, as was mentioned above. Another option is the sdcard, but why store app data on external storage when you can store it locally? (Also, if you must access the sdcard from Java code, consider using android.os.Environment.getExternalStorageDirectory() instead of a hard- coded path.) -- PJ On Nov 5, 4:17 am, sangorys sango...@gmail.com wrote: I have a similar question. I just want to add a .txt file in my program. Where can I put it ? Thanks On 4 nov, 20:20, WoodManEXP woodman...@gmail.com wrote: /sdcard/ works well. On Nov 2, 1:01 pm, Wojciech Topolski wojciech.topol...@gmail.com wrote: Hi I have a problem with files. I would like to add file with database inserts to my app. Where should I put this file? In res/then? This file will have 5 MB, so after operation I would like to remove it from system. I know about /res/raw/file, but this file is only readably by InputStream importSql = res.openRawResource(R.raw.import_sql); Best regards. -- === Wojciech Topolski wojciech.topol...@gmail.com === -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where put file with data?
Sorry, WoodManEXP's response confused me. You're talking about bundling a file with the app. (So of course putting it on filesystem or sdcard doesn't solve your problem, you want to delete it post- installation.) Good question. Is res/values truly writable? I've seen this topic come up quite a few times. Sounds like a good candidate for a Dev Guide page. :) -- PJ On Nov 5, 4:17 am, sangorys sango...@gmail.com wrote: I have a similar question. I just want to add a .txt file in my program. Where can I put it ? Thanks On 4 nov, 20:20, WoodManEXP woodman...@gmail.com wrote: /sdcard/ works well. On Nov 2, 1:01 pm, Wojciech Topolski wojciech.topol...@gmail.com wrote: Hi I have a problem with files. I would like to add file with database inserts to my app. Where should I put this file? In res/then? This file will have 5 MB, so after operation I would like to remove it from system. I know about /res/raw/file, but this file is only readably by InputStream importSql = res.openRawResource(R.raw.import_sql); Best regards. -- === Wojciech Topolski wojciech.topol...@gmail.com === -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where put file with data?
That's what I figured. It seems like it would be difficult to delete something bundled with your application. You're essentially modifying the apk file itself post-install. Another option is to host your data outside the app on the web. / shrug -- PJ On Nov 5, 8:16 pm, Mark Murphy mmur...@commonsware.com wrote: PJ wrote: Is res/values truly writable? At runtime? No. Nothing in res/ is. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to know the device state(landscape/portrai) programatically
Out of curiosity, why do you ask? (If it's only because you want to have a different layout for landscape, then you should know that you can specify layouts specifically for landscape in /res/layout-land) -- PJ On Nov 5, 6:09 am, manoj manojkumar.m...@gmail.com wrote: Thanks Mogimo. On Nov 5, 2:54 pm, Mogimo mogimo...@gmail.com wrote: You can use getResource().getConfiguration() from your Activity. Then you will see it in Configuration.orientation. HI all, I want to know the device state programmatically. I mean whether the device is in portrait mode or in landscape mode by programming (in a class which extends the Activity). Thanks, Manoj. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to set the unlock pattern?
Is that possible!? That seems to me to be almost on par with changing the user's gmail/Google account password! Okay, I gotta hear why your app needs to do this? If it IS possible, then there would have to be an associated permission with it. See if you can find it at: http://developer.android.com/reference/android/Manifest.permission.html I see DISABLE_KEYGUARD, but that's it. -- PJ On Nov 5, 5:37 am, Tomas Sjöberg tomas.c.hjelmb...@gmail.com wrote: How to set the unlock pattern? Is that an intent? BR /Tomas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Not sure where to find out how to do this - the Busy spinning icon
I'm not sure if I've ever seen that icon in the upper right corner, but I've seen apps pop up a dialog while fetching data, etc. If that happens to be what you want, you could use what's called a ProgressBar. There are two kinds: the spinner kind, and the kind that actually shows the progress (percentage complete). I agree that ProgressBar isn't an intuitive name for the Spinner kind. -- PJ On Nov 5, 1:16 pm, furby wookie...@gmail.com wrote: I have been doing searches for this on Google but I am obviously using the wrong words to look for it. How does one go about showing the icon that spins in the upper right hand corner of the screen while something else is going on? I was trying to call it a Spinner but that is not exactly what it's called in Android... and then I tried Busy Icon and nothing useful pops up... I tried a few other things but for some reason I am drawing a blank as to what the real term for it is... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Not sure where to find out how to do this - the Busy spinning icon
Maybe: http://developer.android.com/reference/android/R.attr.html#progressBarStyleSmallTitle On Nov 5, 8:56 pm, PJ pjbar...@gmail.com wrote: I'm not sure if I've ever seen that icon in the upper right corner, but I've seen apps pop up a dialog while fetching data, etc. If that happens to be what you want, you could use what's called a ProgressBar. There are two kinds: the spinner kind, and the kind that actually shows the progress (percentage complete). I agree that ProgressBar isn't an intuitive name for the Spinner kind. -- PJ On Nov 5, 1:16 pm, furby wookie...@gmail.com wrote: I have been doing searches for this on Google but I am obviously using the wrong words to look for it. How does one go about showing the icon that spins in the upper right hand corner of the screen while something else is going on? I was trying to call it a Spinner but that is not exactly what it's called in Android... and then I tried Busy Icon and nothing useful pops up... I tried a few other things but for some reason I am drawing a blank as to what the real term for it is... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Regarding the database schema of Android native database
If there isn't any documentation, you could always get the schema directly from the source. Read the section Examining sqlite3 Databases from a Remote Shell from the Dev Guide: http://developer.android.com/guide/developing/tools/adb.html#sqlite This describes how to view databases for an application, but this technique also works for examining the system's databases, too. You just need to know where they are, e.g. try: # sqlite3 /data/system/ accounts.db Hope this helps! -- PJ On Nov 1, 9:30 pm, richard xiaofeng.richardwei2...@gmail.com wrote: Hello all, I want to build my own cloned databases of all or some of the Android native databases like Contacts, Calllogs, Mediastore, Settings, etc. I want to know wheher it is possible and How I can know the database schemas of these databases? Is there any documentation on this? Thank you very much. regards Xiaofeng -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to add file .sqlite extension to our project
So you have a pre-populated database that you'd like included with the application upon installation? I'm not sure what the preferred solution is for this, but it might be possible to accomplish this via a raw resource. In general, a raw resource is a file that can be bundled with your application and accessed via: R.raw.* See: http://developer.android.com/guide/topics/resources/resources-i18n.html I assume that you've already gotten SQLite to work in general. If not, I highly suggest the Notepad tutorial, which is a great primer: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android SDK not working on Windows 7
For what it's worth, I had a similar issue. I didn't get any error messages, just a window blink and immediate shutdown with no error messages. The lack of any error message was very frustrating. But then I realized that I had not installed Java since installing Windows 7. So, I installed the Java SDK, and this solved my problem. Hope this helps someone! -- PJ P.S. This discussion thread probably belongs in the android-beginners group. On Nov 3, 7:43 pm, hoss spence bendaka...@gmail.com wrote: Actually I just tried it and it worked. The only thing I can think of was that I rebooted and perhaps that fixed something environmental. I looked more closely and Edo's original problem and realize I had a different issue anyway . Mine was looking for some resource that it couldn't find. My apologies for being misleading. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to add file .sqlite extension to our project
(I'm reposting this response because I think I accidentally replied only to the original author.) Archana, So you have a pre-populated database that you'd like included with the application upon installation? I'm not sure what the preferred solution is for this, but it might be possible to accomplish this via a raw resource. In general, a raw resource is a file that can be bundled with your application and accessed via: R.raw.* See: http://developer.android.com/guide/topics/resources/resources-i18n.html I assume that you've already gotten SQLite to work in general. If not, I highly suggest the Notepad tutorial, which is a great primer: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please help. On Nov 3, 6:55 am, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListActivity and SQLiteDB problem - can't refresh list
Well, you get 100 cool points for knowing that you should use AsyncTask, to let the query run in the background. It seems odd that the list populating makes the UI stuck for a while. Can you give us an estimate of how many rows and columns are in your list, and how long the UI is stuck while it's being populated? -- PJ On Oct 29, 4:11 am, Hilly hi...@labpixies.com wrote: Hi, It will be great if someone here will know how to help me with the issue bellow. What is the best way to display a database queries results on the screen using ListActivity? I need the db queries to run in the background and I also need to be able to make different queries and refresh the screen according to the query result. I am using the ListActivity class with a SimpleCursorAdapter in order to display the db queries result on the screen. At the moment, I am doing the db queries at the background using AsyncTask, when getting the results I want the list to be updated immediately, but I can't find a good way to do it. It worked only when I used the changeCursor(cursor) function to set the adapter to a new cursor with the new results. But I don't think this is a good solution since it seems to stuck the UI for a while. I also found some posts about notifyDataSetChanged() but I am not sure if/how/when I should be using it with a SimpleCursorAdapter to make the view refresh. Can anyone tell what I am doing wrong? Or give a code example or link to something like this that works? Thanks! Hilly -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Provide a database packaged with the .APK file or host it separately on a website?
I've seen 3-4 different people ask some variation of this question in these forums. It seems like a very common question/need. I'd like to see this specific topic addressed in part of the Dev Guide, with various uses cases and proper solutions. Pankaj, regarding your specific application: Approach 2 sounds more sensible because the application is decoupled from the data. You could change the data without affecting the application, and vice versa. You could even take this modular approach a step further and allow installation of pluggable, multiple databases. For example, maybe db1 has Bible verses, db2 has Chinese fortunes, db3 has funny movie quotes, etc. People could choose to install only the database(s) that they care about. (With approach 1, you would have to include all databases in the apk file, which could become cumbersome.) My two cents. :) -- PJ On Oct 29, 1:34 am, Pankaj Godbole [Andruid] panka...@gmail.com wrote: Here is some background about my app: I am developing an Android app that will display a random quote or verse to the user. For this I am using an SQLite database. The size of the DB would be approximately 5K to 10K records, possibly increasing to upto 1M in later versions as new quotes and verses are added. Thus the user would need to update the DB as and when newer versions are of the app or DB are released. After reading through some forums online, there seem to be two feasible ways I could provide the DB: 1. Bundle it along with the .APK file of the app, or 2. Upload it to my app's website from where users will have to download it I want to know which method would be better (if there is yet another approach other than these, please do let me know). After pondering this problem for some time, I have these thoughts regarding the above approaches: Approach 1: Users will obtain the DB along with the app, and won't have to download it separately. Installation would thereby be easier. But, users will have to reinstall the app every time there is a new version of the DB. Also, if the DB is large, it will make the installable too cumbersome. Approach 2: Users will have to download the full DB from the website (although I can provide a small, sample version of the DB via Approach 1). But, the installer will be simpler and smaller in size. Also, I would be able to provide future versions of the DB easily for those who might not want newer versions of the app. Could you please tell me from a technical and an administrative standpoint which approach would be the better one and why? If there is a third or fourth approach better than either of these, please let me know. Thank you! Pankaj Godbole Andruid -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to delete contact list and email from device
Why in the heck would anyone want an app that deletes all their contacts and e-mails? I hope you realize that when people try to install your app, they're going to get a big fat warning when they install your program, saying that your app will have permissions to delete their contacts. So if you are trying to be malicious, it's not going to work. :) By the way, my response above should give you a hint as to the solution to your question. On Oct 29, 7:40 am, android_freak saifyzeenw...@gmail.com wrote: hi I want to delete contact list and and available emails in the device. how do i do that I have tried this for contact deletion but getting exception context.getContentResolver().delete (Contacts.Phones.CONTENT_URI,null,null); please suggest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Put some image on background of a row of a ListView
For background image, try: android:background=@drawable/my_image http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int) http://developer.android.com/reference/android/view/View.html#setBackgroundDrawable(android.graphics.drawable.Drawable) http://developer.android.com/guide/topics/graphics/2d-graphics.html Don't know if repeating backgrounds is possible or not. (But what's the difference between a repeating 1px image and a solid background color?) On Oct 29, 10:50 am, Gustavo Melo pipoc...@gmail.com wrote: ListView Question ! I know it's possible change the row color, but it's possible to put some imagem on background? And if yes, it's possible to create an imagem 1px and repeat-x or repeat-y like CSS? -- []'s Gustavo Melo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to add file .sqlite extension to our project
My earlier suggestion was incomplete, assuming you want to continue to modify the database afterwards. This question has already been discussed and there's a great answer for it. Please see: http://groups.google.com/group/android-developers/browse_thread/thread/4ffd437aeb35d29e -- PJ On Nov 3, 7:44 am, sham shamcs shamc...@gmail.com wrote: I believe Android supports sqlite. There is a sqlite library in Android. I didnt use it.But normally we will add the file using adb command in Linux On Tue, Nov 3, 2009 at 6:25 PM, Archana archana.14n...@gmail.com wrote: Hi.. Can anybody tell me whether android support file with .sqlite extension? how can we add this file to our project.?is it same as .db file?i have one file with .sqlite extension.I need to fetch data from that. i dont understand how to add it.Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Intents and navigating the GUI
Don't create a new intent for the main GUI. Just call finish() instead. Also, if you want your main menu Activity to detect this event and do anything special when it comes back to it, it can override onActivityResult(). I'm leaving out some details such as howto return a result (RESULT_OK), how to pass a Bundle on info back to the main menu if desired, etc. But if you do the Notepad tutorial, it teaches this concept well: http://developer.android.com/guide/tutorials/notepad/index.html Hope this helps! -- PJ On Nov 2, 11:36 am, chippie d4046...@tees.ac.uk wrote: Hey guys I've got an application that displays a list to the user ... I've also programmed a menu and when the user clicks on something in the menu this launches a new intent that in turn displays a new GUI. My problem is that I can't understand how I get navigate back to the main menu. So far in my new selected GUI i create a new intent for the main GUI, but this looses all saved settings Sure this isn't the right way of doing it? Kind Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Multitouch support in Android 2.0
A huge thank-you, Diane, for giving us this information. :D On Oct 27, 5:18 pm, RichardC richard.crit...@googlemail.com wrote: You missed the ;) in my reply - sorry was not ment as a serious response. On Oct 27, 10:00 pm, niko20 nikolatesl...@yahoo.com wrote: Wait, if I use two mice, they both control the same pointer. There isn't a way to have multiple pointers. At least on windows - maybe on Linux you can do so more easily? -niko On Oct 27, 3:33 pm, RichardC richard.crit...@googlemail.com wrote: niko20 wrote: Now, if only there was a great trick to do multitouch on the emulator ! just use 2 mice ;) On Oct 27, 8:27 pm, CraigsRace craig...@gmail.com wrote: Does anyone know if every phone will support multi-touch (I remember talk about the G1's hardware might not support multi-touch)? On Oct 28, 5:08 am, niko20 nikolatesl...@yahoo.com wrote: Dianne, Thanks for the great info. Yep looks like you just get the count of pointers and walk through that. Now, if only there was a great trick to do multitouch on the emulator ! (I should be getting an actual phone soon though) -niko On Oct 27, 11:45 am, Dianne Hackborn hack...@android.com wrote: It's basically just some new APIs on MotionEvent: http://developer.android.com/reference/android/view/MotionEvent.html http://developer.android.com/reference/android/view/MotionEvent.htmlHmmm and I'm not sure why, but in the doc all of those new APIs are in gray, so they should be easy to see. :) Or here is the API diff report: http://developer.android.com/sdk/api_diff/5/changes.html http://developer.android.com/sdk/api_diff/5/changes.htmlI see that I didn't get around to writing documentation in MotionEvent on the way multi-touchworks; sorry about that. Basically there are new actions that tell you when additional fingers go down and up, and each MotionEvent you receive allows you to query for the number of pointers in the event as well as the x, y, size, and pressure of each of those points (and the historical data for all those points as well if you want to collect all data since the last motion event you received). So it should be pretty straight-forward. The main thing to watch out for is the difference between the index in the current event for a pointer's data vs. the pointer ID for that pointer: http://developer.android.com/reference/android/view/MotionEvent.html#... http://developer.android.com/reference/android/view/MotionEvent.html#...The pointer ID allows you to keep track of the individual fingers across multiple motion events. For example, if the user touches finger 1, then finger 2, then releases 1, then touches 1 again, you would see: Finger 1 down: MotionEvent ACTION_DOWN with one pointer, whose ID is 0. Finger 2 down: MotionEvent ACTION_POINTER_2_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 1 down: MotionEvent ACTION_POINTER_1_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 2 up: MotionEvent ACTION_UP with one pointer, whose ID is 1. (And inspite of what the update documentation says, the API allows for an arbitrary number of fingers, not just 3. I just happened to define convenience constants for the first 3 finger down/up actions, but given their weird naming as seen above and the finger ID mask is actually 255, it is perhaps best just to ignore those constants. :p) On Tue, Oct 27, 2009 at 9:29 AM, Streets Of Boston flyingdutc...@gmail.comwrote: Kind-a burried inside the blog-post on developer.android.com (http:// developer.android.com/sdk/android-2.0-highlights.html), i saw that multi-touchis now supported: Android virtual keyboard •An improved keyboard layout to makes it easier to hit the correct characters and improve typing speed. •The ***framework'smulti-touchsupport*** ensures that key presses aren't missed while typing rapidly with two fingers. •A smarter dictionary learns from word usage and automatically includes contact names as suggestions. I'm really curious howmulti-touchis supported in the API. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums,
[android-developers] Verify musical instrument app idea: microphone, simultaneous record and play, elevation, multi-touch
I have a great idea for an app and wanted to get everyone's input on 4 different technical aspects of it. Some of you might be familiar with the iPhone musical app where you can play it like a flute/ocarina. You blow into the mic and use multi-touch to press a combination of holes to play different sounds. I'm thinking about writing a *similar* app for Android, except it's a *trumpet* instead of a flute. My idea is: * The screen shows three circles in a line, which represent the three trumpet valves. * Touching a circle represents holding down a valve. * Blowing into the mic represents blowing into the trumpet. * Note: On a real trumpet, the note pitch depends not only on the valve combination, but also on the lip vibrations. (Otherwise there would only be 7-8 possible notes.) * I'm thinking that the angle (elevation) of the phone could represent different pitches. So, if you elevate the phone up, you'll play a higher note, for example. The 4 technical aspects that I'd like to verify are: 1. What is the most sensible way to detect blowing into the microphone? My current plan is to do AudioRecord.read() and manually examine the audio buffer data to check for sufficiently high amplitude (volume). I think this will be pretty easy, but just wanted to check whether there's another better way to do this. 2. Is it possible to record and play at the same time? I need to record blowing into the mic and playing sound at the same time. 3. For checking elevation angle, I assume I should use SensorManager. I assume that I want to use getInclination(), but I think I might also need getRotationMatrix() or getOrientation(). Seems pretty easy, but does anyone know of any examples I could look at? 4. For detecting which valves are pressed down, I assume that it's feasible to use the multi-touch feature. However, I have a G1 phone. Is it possible to get multi-touch to work with the G1 phone somehow? (This question probably deserves its own thread!) I'm not going to ask about how to program multi-touch because there's a good discussion of the technical features at: http://groups.google.com/group/android-developers/browse_thread/thread/962b1a27a31e450d Anyway, your input is highly welcome, as well as any other suggestions you might have for this app. (By the way, I might do other instruments too, besides, trumpet, but I figure that if I can get trumpet to work, I can get any other instrument to work.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] android.com e-mail addresses
If someone has an android.com e-mail address, what does that mean? Can serious app developers get one? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with using DDMS to send mock gps location data!
I have same question. Does anyone know what happened? Thank you. On Mar 5, 2:07 pm, rocia rocia...@gmail.com wrote: hi, I encountered with a problem when I use DDMS to send mock gps location data . I checked out the source code of Android and make the latest version.Then put my test apk file of gps to the emulator and start DDMS, but when I use Emulator Control of DDMS to manually Button to send mock location data it says no GPS emulation in this virtual device. But the same apk file works fine in the SDK 1.0 Waiting for your reply,thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---