**** BEGIN LOGGING AT Mon Mar 12 02:59:58 2012 Mar 12 03:00:04 seems like WifiManager.getConfiguredNetworks() only returns a list if wifi is not disabling or disabled?!? Mar 12 03:07:41 is it possible to know far away an object is when viewed through the camera? maybe something like focal length? Mar 12 03:08:04 any way to have an app that only has a broadcastreceiver and no activity? Mar 12 03:08:17 (where the broadcast receiver gets registered on install) Mar 12 03:16:08 Anybody seen or have an idea how to fix a flickering OpenGL screen, that stops flickering after the first orientation change? Mar 12 03:16:30 Happens only on my device apparently. Mar 12 03:17:04 To be more precise, every second eglSwapBuffers call displays a black screen Mar 12 03:28:37 so about pro guard - how do I get my ide to add a config? Mar 12 03:37:03 trentg: is that device triple buffered? Mar 12 03:37:10 cause thats really odd sounding Mar 12 03:37:18 That's what I thought Mar 12 03:37:38 But it goes away after orientation, I found after much headaches Mar 12 03:38:40 hey batos Mar 12 03:53:00 hello all Mar 12 04:17:52 hi all. Mar 12 04:20:28 question: I'd like to find the unlock history of my galaxy S2, running android 2.3.6. Can someone pls point me to a logfile somewhere on my device? Mar 12 04:20:52 I have found an app that lets you do this, but I dont have it installed, and I need 'previous' history. Mar 12 04:41:53 Hey guys, anyone know how I can get the parent context from an AsyncTask thread? Mar 12 04:42:11 I'm trying to run a thread in the background to register the app with C2DM Mar 12 04:42:24 and i want to call: PreferenceManager.getDefaultSharedPreferences(this); Mar 12 04:42:36 but "this" isn't valid in that scope Mar 12 04:42:51 just use the activity name like C2DMActivity.this Mar 12 04:42:59 whatever your activity name is Mar 12 04:43:18 Oh! Mar 12 04:45:06 thanks QubeZ :) This is literally my 7th day doing java hehe. Mar 12 04:45:11 avleen: np Mar 12 04:45:12 still getting to grips with it Mar 12 04:45:41 actually, you should always get in the habit of fully qualifying the 'this' Mar 12 04:45:49 never just use 'this', always qualify it Mar 12 04:45:59 Sounds like a good habit to be in Mar 12 04:46:13 I usually do that kind of thing in python, too Mar 12 04:46:20 certainly makes the code more obvious Mar 12 04:46:26 exactly Mar 12 05:37:57 With ActionBarSherlock 4.0, how do make the overflow menu appear on GB, as in HC and CS? Right now I just get the standard panel menu at the bottom when I press "Menu" and no overflow icon at right Mar 12 05:52:50 Hmm, looking at the demos on 2.3.x works the same. Maybe its not intended to emulate the same behavior as ICS Mar 12 05:53:43 I guess the only case where a hardware menu button is going to expand the overflow menu from the action bar is a device that's been upgraded to ICS Mar 12 05:54:11 hey folks, im getting this error here when i try to update a sqlite db.. error updating school=SBCC using UPDATE personal SET school=? WHERE _id=? Mar 12 05:55:12 Tricknology: where is your actual code query? Mar 12 05:55:42 you cannot use _id = ?... ? is for strings typically and you cannot intermix strings and int's in your query using ?'s Mar 12 05:57:02 sorry, i meant... you cannot intermix String and int in your queries using ?'s. Mar 12 05:58:29 QubeZ; this is the method http://pastebin.com/XbkVKtpd Mar 12 05:59:46 oh i see what yo mean Mar 12 05:59:53 1st issue: you're passing the dbname? It should be the table name Mar 12 06:00:03 1:59 Mar 12 06:00:21 wait did I already miss DST? Mar 12 06:00:49 mrenouf: depends, where you are. But yes, DST was almost 24 hours ago for me Mar 12 06:01:14 its is the tablename, misnomer Mar 12 06:01:33 oh, right... last night. I was expecting the 1:59->3am jump Mar 12 06:02:36 Tricknology: ok so 2nd issue: your where args cannot have ? unless your whereArgs support int[] but since you are using String[] you need to actually statically set your where like "_id = " Mar 12 06:02:40 get me? Mar 12 06:02:46 I want this code to update a specific element with a specific column name and id.. any idea how to do that? or just use a for loop to iterate through the _id? Mar 12 06:03:04 ya you have to loop Mar 12 06:03:40 well, dont you know the _id ? Mar 12 06:03:45 i do Mar 12 06:04:08 so pass that into your updateValue method... add a new parameter: long rowId and pass the _id that you know into the method Mar 12 06:04:11 then use that there Mar 12 06:04:14 well, time for Zzzz Mar 12 06:04:15 i have a string array of id's, it could be int too.. Mar 12 06:04:31 String where = "_id = " + rowId; Mar 12 06:04:43 ok, thanks i wasnt sure of the syntax Mar 12 06:04:56 btu wont whereargs still be all weird? Mar 12 06:05:20 ya you nneed to fix that entire method :\ Mar 12 06:06:08 so let me get this straight, you are looping through a set of _id's and updating the school column to whatever you're passing in? Mar 12 06:07:09 yes Mar 12 06:07:45 basically, just changing the school from sbcc to whatever they put in there Mar 12 06:08:10 ok so loop through the _id's and pass them in one by one to your updateValue Mar 12 06:08:22 wherever it appears in the table.. Mar 12 06:09:16 http://pastebin.com/index/XbkVKtpd Mar 12 06:09:23 you obviously need to put your whereArgs in there Mar 12 06:09:58 how abou this? http://pastebin.com/qAAwCHwe Mar 12 06:10:01 String[] whereArgs = { "school = " + newSchool }; Mar 12 06:10:08 ooh ok Mar 12 06:10:47 uh that paste didnt show up QubeZ Mar 12 06:11:05 which one? Mar 12 06:11:07 im seeing yours Mar 12 06:12:29 wait, you dont need to loop through the _id's... i thought you were trying to do something else Mar 12 06:12:51 look at one of mine: http://pastebin.com/yzzea1Uw Mar 12 06:13:31 if you know the new school and the old school to be replaced, you just do an update on all rows that match that... no need for looping Mar 12 06:16:58 Tricknology: http://pastebin.com/7ZN1iBFK Mar 12 06:17:29 obviously, change the oldShool with the column in your actual database, probably just school right? Mar 12 06:17:55 http://pastebin.com/eeh5SD8J Mar 12 06:18:01 Qubez, how about this? http://pastebin.com/e9p5LUzB Mar 12 06:18:28 look at my last pastebin Mar 12 06:18:43 if you need to update all rows with the new school name, my last pastebin is all you need Mar 12 06:19:10 you pass in the oldshool name you want to replace and the newschool name you want to take its place.. then that small snippet handles the update to all rows Mar 12 06:19:11 ooh, that's sexy Mar 12 06:19:11 thanks Mar 12 06:19:33 the .update() snippit? Mar 12 06:19:54 the whole method... use that, just pass in the table name, new school and old school strings Mar 12 06:22:33 ok thanks for the tip :) Mar 12 06:22:41 np Mar 12 06:22:53 actually you can get rid of that int flag = 0; too Mar 12 06:22:56 not needed anymore Mar 12 06:25:30 I've improved it so that it will take jsut abot any data i throw it.. http://pastebin.com/c2kn1m6x Mar 12 06:25:41 because the colname may not always be school.. etc Mar 12 06:26:28 looks good, just remove the int flag = 0; <-- not needed anymore Mar 12 06:26:43 thx much :) Mar 12 06:26:48 wait, also why are you sending it ContentValues vals? Mar 12 06:26:51 just do that in the method.. one sec Mar 12 06:27:02 aah i see what ur saying Mar 12 06:27:30 bravo Mar 12 06:27:38 http://pastebin.com/g5A0u1X1 Mar 12 06:28:26 alright, bed time. G'luck. Mar 12 06:28:34 night, thanks Mar 12 06:28:39 np Mar 12 06:30:15 working :> ! Mar 12 06:42:58 Hi all..is it possible to find whether the application is homescreen or not (dynamically) ?...Thanks Mar 12 07:03:00 Morning Mar 12 07:03:16 anybody in Berlin the next 2 days, for Droidcon? ;-) Mar 12 07:35:02 Hi all! I am really struggling to understand fragments and multi-pane layouts. I am trying to follow these two tutorials, but they are vastly different and I dont know who I should follow.. any suggestions? Mar 12 07:35:02 http://android-er.blogspot.com/2012/01/listfragment.html Mar 12 07:35:08 and this: http://mobile.tutsplus.com/tutorials/android/android-sdk_fragments/ Mar 12 07:35:33 the first one is easy enough to understand, but its rather different than the second one there Mar 12 07:35:47 and the second one, is just very confusing and no source is offered, so yea Mar 12 07:36:15 scratch that, source is available Mar 12 07:46:26 re all Mar 12 07:46:35 ppl, I add ViewPager in my app and set Toast notification inside its startUpdate() and finishUpdate(). When the pager is empty it always trigger start/finish methods. Why? Mar 12 07:46:42 Also, how to get the moment when I change the page? I just need to keep widgets data into database before page deletion. Mar 12 07:47:15 Hello guys, I have a prebuilt .so file and I want to link my ndk code to it. can anyone help about that? Mar 12 07:50:22 is this for android x86? Mar 12 08:02:49 Yo yo Mar 12 08:04:12 I have a question about SharedPreferences - is there any way to validate the value of a user-defined preference before a commit, if they are changing it via an EditTextPreference. Mar 12 08:04:13 ? Mar 12 08:04:28 how to get the moment when I change the viewpager? I just need to keep widgets data into database before page deletion. Mar 12 08:05:46 Like say for whatever reason the preference is "favorite prime number" - currently set to 11 - they pull up the EditTextPreference, enter 33, hit OK. Mar 12 08:06:08 I can have the OnSharedPreferenceChangedListener detect if that's a prime or not, but I don't think it has the previous value. Mar 12 08:06:27 So I'd have no way of reverting the value unless I cache the preference beforehand. Mar 12 08:06:57 Is there a callback that fires after a new value has been sent, but before it's been committed to the database? Mar 12 08:16:49 Anyone who knows fragments and multi-pane layouts well here? Mar 12 08:17:09 or know how to work with them at all? Mar 12 08:19:21 how do u scroll down in the layout editor in eclipse? ive got stuff in a scroll view but i neeed to scroll down to keep editing? Mar 12 08:19:28 <[deXter]> Untouchab1e, Don't ask to ask, just ask! Mar 12 08:20:52 [deXter]: I know, sorry.. anyways, I have a simple application with several ListViews with associated ListAdapters to customize layout, etc.. However, I now want to put this together into a Multi-pane layout where there is one list with main titles (continents, countries, cities), and clicking upon each item will bring up the associated list Mar 12 08:21:00 however, according to this tutorial: http://mobile.tutsplus.com/tutorials/android/android-sdk_fragments/ Mar 12 08:21:15 they have two fragments, and two associated activities.. Mar 12 08:21:24 so my question is, do I have to make a new fragment for each of the lists? Mar 12 08:21:49 or in broader aspects, what do I have to do with my countries\continents\cities lists to make them work into the multi-pane fragment layout Mar 12 08:24:45 or can I have one fragment that somehow handles all the lists? Mar 12 08:33:38 any ideas? I really need help on this one Mar 12 08:37:19 hi i'm using an map activity to display the users location on a map and some other users locations for listening to location updates (passive) im using a service which is the best way to let the ui know that i have a better location available in the serivce Mar 12 08:37:46 f.e. if i write the location to my user database object is there any construct that kind of autoupdates the locations= Mar 12 08:38:04 or do i have to pull with a timer from ui Mar 12 08:43:58 Is there a list of the currently used sdks out there? Mar 12 08:44:44 DashCC: do you mean API levels? Mar 12 08:44:53 (i.e. OS levels) Mar 12 08:56:16 DashCC: ? Mar 12 09:13:21 when i navigate away from my tabhost activity and come back the tab wont repopulate, yet it seems to do the exact same code, any ideas? Mar 12 09:14:16 i guess it needs to save/restora activity state Mar 12 09:14:42 yeh but it goes thru the exact same method calls when it comes back Mar 12 09:14:46 weird Mar 12 09:16:02 I am 1 week android guru, and that question will be my next Mar 12 09:16:10 now I work with viewpager :) Mar 12 09:17:08 hehe Mar 12 09:17:55 good luck Mar 12 09:19:16 Leeds: sorry, was in a meeting. I mean generally a chart or something how the android sdk (for example 2.2, or 2.3.3) is used out there Mar 12 09:19:31 so I can make assumptions which one I can safely use and still support many users Mar 12 09:19:41 i can grab one for you off the dev console if you like Mar 12 09:19:52 stats on an app i have out there, quite useful graphs Mar 12 09:20:29 ppl, why this method works with the last page in viewpager? https://github.com/RaD/ando-gettext-editor/blob/master/src/ru/securelayer/rad/ando/AndoMain.java#L270 Mar 12 09:20:36 DashCC: so you mean http://developer.android.com/resources/dashboard/platform-versions.html Mar 12 09:20:44 but generally 2.1+ is all Mar 12 09:22:13 DashCC http://dl.dropbox.com/u/4194619/liquidpaper_march2012.jpg Mar 12 09:24:10 ah nice, right what I was looking for Mar 12 09:24:13 Thanks, both of you Mar 12 09:24:17 np Mar 12 09:29:16 How can i sort out a managedQuery() that should return contacts. I want it to just return the Phone-contacts and not the facebook,twitter,SIM etc? Mar 12 09:30:44 Hello, I try to create a custom view by extending the view class.I created an XML layout and added it to a linearlayout.My problem: In the onMeasure function, I only get 0 for parent size....The linearlayout fills the screen. Mar 12 09:31:28 I use measurespec to get the width and height,but only 0 is returned... Mar 12 09:32:32 The view uses "fill_parent" Mar 12 09:32:44 maybe thats what 0 means Mar 12 09:33:26 Since I want to override the onDraw I need to get the view size.... Mar 12 09:35:29 sorry i cant be of much help, keep googling someone will wake up soon Mar 12 09:36:24 sry for asking again i have an 2 activities (not an list activity, map and custom) and in both i display data from sqlite database and i change/update the data from an service. how do i "autoupdate" the displayed data? is there something like sqlite-data-changed listener? (what is the android way to handle this) Mar 12 09:56:16 thebastl: you need to set new adapter which contains new cursor Mar 12 09:56:55 vavirta: but the adapter ist only in case i have a listactivity right? Mar 12 09:57:12 well how do you show your data from database? Mar 12 09:57:27 on a map Mar 12 09:57:34 I bet you use a cursor to fetch data from it? Mar 12 09:57:38 yes Mar 12 09:58:07 haven't worked with map before but I'd guess that need to get new cursor Mar 12 09:58:20 i will read about adapters Mar 12 09:58:21 and do what ever you did when showing the data first time Mar 12 09:58:32 I have a really weird error, which I'm hopin that I've just messed up somewhere. Mar 12 09:58:33 the brief discription looks like it's what im looking for Mar 12 09:58:40 but replace the old cursor with the new one Mar 12 09:58:43 i thought its just for use with lists Mar 12 09:58:51 thx vavirta Mar 12 09:58:54 If I "update" a tab in my ViewPager, it always shows the data in the first "tab" Mar 12 09:58:55 no problem Mar 12 10:00:00 I have three of those, [A][B][A], two of the same type just with different data. I set the different sources to the [A]'s, but it still manages to "update" the first tab with the "other" data. Mar 12 10:00:24 It's a bit hard to describe, but it's like my second initialization isn't really pulling up a new one. Mar 12 10:02:59 what's your prefered pastebin here? Mar 12 10:05:15 I set onClick in the xml, but i get an IllegalStateExeption when it tries to call the method Mar 12 10:07:10 ppl, I can't copy on field into another on the page of viewpager, f1 f1 Mar 12 10:07:27 https://github.com/RaD/ando-gettext-editor/blob/master/src/ru/securelayer/rad/ando/AndoMain.java#L270 Mar 12 10:08:15 how to get the current view from viewpager? Mar 12 10:12:01 I set custom adapter to listview.. Do I get the view which is going to reused? Mar 12 10:12:17 eclipse is so dire Mar 12 10:13:16 anyone know how the fuck you can get a transformer prime in the uk? Mar 12 10:13:28 hehe Mar 12 10:13:33 i could pick one up here Mar 12 10:13:36 in in taipei Mar 12 10:13:49 curse you Mar 12 10:13:57 :) Mar 12 10:13:58 i've ordered from two different places Mar 12 10:14:11 both times been told 'yep we have some in stock, we'll take your money and ship it out now!' Mar 12 10:14:24 then to find out 3 days later they never even had any :/ Mar 12 10:14:34 yeah retailers do that Mar 12 10:14:50 ah Mar 12 10:14:55 that's also how I got screwed over when the galaxy tab was released Mar 12 10:15:06 *galaxy tab 10.1 Mar 12 10:15:15 'yeah we have it!' Mar 12 10:15:19 *people preorder* Mar 12 10:15:23 'haha, no we don't' Mar 12 10:16:04 fuckers Mar 12 10:16:21 didn't realise lying to consumers was such common practice Mar 12 10:18:27 How can i sort out a managedQuery() that should return contacts. I want it to just return the Phone-contacts and not the facebook,twitter,SIM etc? Mar 12 10:23:47 hi guys, is normal that (just created) 4.0.3 emulator doesn't show soft keyboard? Mar 12 10:27:00 morning Mar 12 10:27:11 Hi :) Mar 12 10:34:17 if I set an alarm using AlarmManager.set and kill my application with task manager, is there a way to receive an intent which is set with AlarmManager in my BroadcastRecceiver, which is part of the application I kill? Mar 12 10:34:47 when I declare my receiver, I can specifify android:process=":remote" but that didn't work Mar 12 10:35:15 zhulikas: if you force close an app its AlarmManager alarms are cleared. If you don't want that to happen don't force close it. Mar 12 10:35:28 seriously Mar 12 10:35:30 but how can I be sure users don't do that :| Mar 12 10:35:37 zhulikas: you can't Mar 12 10:35:39 why doesnt the APK uploader in google market work in chrome Mar 12 10:35:42 such bs Mar 12 10:35:46 I want to be able to set alarms far in the future Mar 12 10:35:56 so even after phone is turned off/on, I would still get it Mar 12 10:36:13 for this it's fine I guess, I can start service on BOOT and do something about it Mar 12 10:36:16 zhulikas: then you need to persist the alarms somehow and reregister them with AlarmManager at boot Mar 12 10:36:22 hmm Mar 12 10:36:31 well, that's good point Mar 12 10:36:34 zhulikas: and possibly whenever your app is started in case the user has force closed it Mar 12 10:36:54 hmm Mar 12 10:37:09 so if I start a service (which is part of my app) on BOOT, does my app start on boot as well? Mar 12 10:37:14 and it could be force closed then? Mar 12 10:37:28 or can I declare a service which is independent from my application Mar 12 10:37:53 so when I boot, I register my alarms in alarmManager and even if someone kills the app, alarms would still be fired Mar 12 10:38:23 zhulikas: services are part of your application, the same way your activities are Mar 12 10:38:45 hmm... so register on boot, register on app start and hope for the best? :D Mar 12 10:40:54 zhulikas: you can run any component of your app in a separate process Mar 12 10:41:07 zhulikas: you can receive the BOOT_COMPLETED intent with a BroadcastReceiver. Mar 12 10:41:30 zhulikas: after you get that intent, you'll want to set a timer for a few seconds, because BOOT_COMPLETED is hectic and stuff will run slow.. Mar 12 10:41:35 then fire your app from there Mar 12 10:41:41 you know how you say "market place" what do you say now its called Play? Mar 12 10:41:43 play palce? Mar 12 10:41:47 playground? Mar 12 10:42:10 CallumTaylor: keep calling it market, for the love of god Mar 12 10:42:15 maybe google will change it back Mar 12 10:42:17 i really want to haha Mar 12 10:42:28 i was making a joke in an email to a client Mar 12 10:42:39 and got stuck on what to call it now google's change it to play Mar 12 10:42:41 so retarded Mar 12 10:42:51 Google Brothel Mar 12 10:43:19 CallumTaylor: umad Mar 12 10:43:26 storkme I mad Mar 12 10:44:03 I think the apps section should still be called the market Mar 12 10:44:08 everything else can be play, whatever Mar 12 10:45:20 he mad Mar 12 10:47:13 i am a bit upset about it. i think it's not fair to say that the apps are for play, when they are for utility... say, car locator? is that a tool, or a toy? I think the former. Mar 12 10:47:56 BRB GUYS IM GOING TO PLAY TWITTER Mar 12 10:48:03 awesome Mar 12 10:48:03 its retarded Mar 12 10:48:08 whoever thought of the name should be fired Mar 12 10:48:35 i dont think its that bad Mar 12 10:48:58 CallumTaylor: won't be the first bad decision GOOG has made.. Look at personalized search.. epic fail. Mar 12 10:49:05 true. Mar 12 10:49:21 google, just hire me, ill fix everything for you Mar 12 10:49:31 you just have to interview 8 times, no prob Mar 12 10:49:37 ez Mar 12 10:49:45 http://www.catonmat.net/blog/my-job-interview-at-google/ Mar 12 10:49:58 This obviously smart guy came to google to interview from Latvia and didn't get the job Mar 12 10:50:29 They did let him publish the article though, which is nice. Mar 12 11:06:48 Mario 64 has corrupted my knowledge of the word "dire" Mar 12 11:06:55 every single time I hear "dire"... Mar 12 11:06:59 Every single time, without fail... Mar 12 11:07:13 I automatically think in my head, "dire dire docks" Mar 12 11:07:40 My brain is has that circuit completely and irrevocably wired. Mar 12 11:07:49 haha Mar 12 11:08:01 i rarely hear the word dire Mar 12 11:08:30 I think I might have possibly played the "dire dire docks" level quite a few times, or it must have been really hard. Mar 12 11:08:37 I can't really recall the level very well... Mar 12 11:08:45 but I still have the damn word association. Mar 12 11:08:56 it had water and platforms that go up and down Mar 12 11:09:04 Yeah, I remember that much Mar 12 11:09:17 probably had the annoying spider things Mar 12 11:09:25 Then again, that could describe almost 40-60% of the levels Mar 12 11:11:16 Also, Burnout Paradise. I constantly hear in my head, "Race southwest to the Wind Farm" or bullshit like that when I hear certain things Mar 12 11:11:23 strange problem, I can run my app in the emulator, but on my phone, I get this error message: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{...}: java.lang.ClassNotFoundException: ... It worked just fine yesterday, and I didn't do any change, so what can be wrong ? Mar 12 11:11:35 Curse video games with repetitive phrases. Mar 12 11:12:44 lol, I just finished mass effect 3 Mar 12 11:12:46 Hi! Are the x86 images supported by the Emulator ? Mar 12 11:13:00 and when you can't figure out what to do Mar 12 11:13:04 they repeat it every 30 seconds Mar 12 11:14:28 I thought the Mass Effect 1 dialogue options are boring and limited, and the game sucked. Mar 12 11:14:32 Also, elevators. Mar 12 11:15:07 s/are/were/ Mar 12 11:16:36 my transformer prime just arrived Mar 12 11:16:37 fuck yea Mar 12 11:16:49 I liked the potential ME1 had, but the implementation was bad, yeah Mar 12 11:16:50 how much did you pay for it? Mar 12 11:17:27 60 something euro's Mar 12 11:17:42 I was more immersed in Dead Space 1 and 2 than I ever was in ME Mar 12 11:17:50 different kind of game, though Mar 12 11:18:07 yes, better. Mar 12 11:18:11 :p Mar 12 11:18:41 or what is the best way of testing a software without the real x86 AMD tablet ? Mar 12 11:19:11 i got it for free Mar 12 11:19:14 company fucked up my order Mar 12 11:19:59 I wonder if I should get a cheap tablet for testing my app, or just use the emulator Mar 12 11:20:13 cheap tablet Mar 12 11:20:16 imo Mar 12 11:20:20 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee- Mar 12 11:20:21 the emulator is a pain in the ass Mar 12 11:20:21 cheap tablet Mar 12 11:20:29 emulators are slow fuck Mar 12 11:20:33 djszapi: I guess setup a vmware or virtualbox or something Mar 12 11:20:49 dada: and then what is the next step ? Mar 12 11:20:58 to flash the x86 image that is working ? Mar 12 11:21:23 djszapi: well, "flash" is not the proper term. you install it like an operating system Mar 12 11:21:41 How can i sort out a managedQuery() that should return contacts. I want it to just return the Phone-contacts and not the facebook,twitter,SIM etc? Mar 12 11:21:42 yeah. Mar 12 11:22:26 djszapi, i think emulating a system with the same processor arch type as your computer is quite fast Mar 12 11:22:41 way faster than emulating ARM Mar 12 11:22:43 zhongfu: depends on technique used Mar 12 11:22:46 on my 3 year old laptop Mar 12 11:22:54 djszapi: something like http://androidspin.com/2011/01/24/howto-install-android-x86-2-2-in-virtualbox/ (not tested myself, don't know how good the article is) Mar 12 11:22:57 2GHz intel c2d t5750 Mar 12 11:23:05 3gb ddr2 ram Mar 12 11:23:19 a AVM similar to a GNex took around 15 minutes for first boot Mar 12 11:23:34 I ran Android 3.2 in VMware, ran quite well when it comes to speed Mar 12 11:24:04 p_l, x86/x64 is fast on pcs Mar 12 11:24:10 I imagine it must be difficult or non-existent to test multitouch on the emulator Mar 12 11:24:35 dada: thanks. Mar 12 11:25:26 hey guys. I'm doing some research on mesh networks and wanted to use some android smartphones as sensors (to detect mesh nodes and do some measurements). now I know that there is no 802.11s implementation for android, do you think it will be a pain to e.g. create & send some custom tcp/ip packets for testing etc? Mar 12 11:25:59 capture network traffinc, maybe even analyze it a bit or at least forward somewhere Mar 12 11:26:06 you can root the phones Mar 12 11:26:13 Cav: not totally sure, but im thinking youll need rooted devices Mar 12 11:26:20 not sure thats doable in user level land Mar 12 11:26:22 that's not a problem Mar 12 11:26:41 once you are rooted, you are basically in linuxville, i'd try #android-root Mar 12 11:26:55 some devices might have more cooperative network cards Mar 12 11:26:58 well, not fully linuxville, userland will be different, but a lot will work Mar 12 11:27:12 a lot of the devices will have broadcoms Mar 12 11:27:14 yea that would be my second question, which device to choose Mar 12 11:27:20 Cav: aren't there? don't some android phones use mac80211? Mar 12 11:27:28 or a mac80211-based driver Mar 12 11:27:31 I should say Mar 12 11:27:37 MDijkstra: that doesn't give you 802.11s Mar 12 11:27:44 MDijkstra: 802.11s is the new mesh standard, released in oct 2011 Mar 12 11:27:48 ah Mar 12 11:27:57 802.11s is a separate driver in the mac80211 framework Mar 12 11:28:01 iirc Mar 12 11:28:24 Cav: you'll probably have a hard time getting even monitor mode running, more so .11s Mar 12 11:28:44 OTOH, modern android devices can do host mode Mar 12 11:28:51 so you could simply get a cheap usb wifi stick Mar 12 11:28:54 or are the major android devices delivered with OSS wifi drivers by now? Mar 12 11:29:02 I dunno, I've never checked Mar 12 11:29:17 *usb host mode Mar 12 11:29:24 hm Mar 12 11:30:54 I don't know how android communicates with the wifi hardware at all Mar 12 11:31:01 guessing it uses the same stuff as iwconfig Mar 12 11:31:07 but could be different Mar 12 11:31:25 yea that's what I was worried about Mar 12 11:32:03 I thought maybe someone did some experimental wifi magic before Mar 12 11:32:15 I've submitted some patches to b43 Mar 12 11:32:21 but not on android Mar 12 11:32:40 Cav: maybe some people did, but you should ask on #android-root or look at the blogosphere Mar 12 11:32:49 maybe #freifunk? Mar 12 11:33:09 * Ge0rG is interested in this topic as well, but has no time to follow Mar 12 11:33:27 Cav: are you going to sum up your results when you found anything? :D Mar 12 11:33:33 haha I asked on andorid-root too, they forwarded me to #networking, let's see where I land next Mar 12 11:33:36 hello, i need to write a web app that can have direct access to user sim phone number or similar and display same. I need pointers please Mar 12 11:33:53 Ge0rG: sure, there'll be a paper about it if we get it to work ;) Mar 12 11:34:05 Cav: I didn't want to wait for another year :P Mar 12 11:34:30 it has to be finished till summer ;) Mar 12 11:34:35 well, end of summer maybe Mar 12 11:37:05 which is preferable for the configuration menu item name? "Settings" or "Options" or other? Mar 12 11:37:42 I'll go with "Settings" Mar 12 11:37:47 thanks for the feedback Mar 12 11:38:18 maybe someday, translations. Mar 12 11:38:51 Can I retrieve user phone number from Webkit browser??? Mar 12 11:39:18 hopefully not. Mar 12 11:39:44 not very nice in sense of privacy Mar 12 11:40:00 pragma_: IIRC "Preferences" is most common in android-land... Mar 12 11:40:30 am i offtopic?? Mar 12 11:42:26 does java.util.Date.getTime() and Calendar.getTimeInMillis() return the same value for exactly the same time? Mar 12 11:44:22 Ge0rG: "Preferences" is a long word for a menu... Mar 12 11:45:17 Menu items are generally short words. Mar 12 11:45:27 Prefs' Mar 12 11:45:30 Opts:| Mar 12 11:46:08 Settings. Mar 12 11:47:32 http://www.techshout.com/img/android-actionbar.jpg Mar 12 11:47:34 proof. Mar 12 11:47:52 yeah Mar 12 11:47:57 it must be idiot-friendly Mar 12 11:47:59 http://getfile8.posterous.com/getfile/files.posterous.com/minming/MvV2hTDy441R1nRbrmZLHtoXUtZULfMDZjOJpXHpaoCYCH0t9X3JPmT3B1Ww/android-menu-icons-06.png Mar 12 11:48:03 More proof Mar 12 11:48:38 3 different icons for the settings menu item in that last screenshot, lulz Mar 12 11:49:35 oh, right, that's the point Mar 12 11:50:23 and yeah, I like how Google's apps suck. way to flagship. Mar 12 11:53:47 this just in no one is perfect Mar 12 11:54:03 is it that big of a deal Mar 12 11:54:28 is using punctuation that big of a deal? Mar 12 11:56:57 pragma_: what's with the touchscreen interface on that device? Mar 12 11:57:08 my app Mar 12 11:57:17 Kittens: what? Mar 12 11:57:40 the back, home, menu bar on the bottom of the android-actionbar.jpg Mar 12 11:57:55 is that like, stock ICS or something? Mar 12 11:58:03 I dunno Mar 12 11:58:06 I haven't used ICS Mar 12 11:58:19 :o Mar 12 11:58:26 where'd you get that screenshot then? Mar 12 11:58:49 http://www.techshout.com/img/ Mar 12 11:58:52 my app's src icon used to be a little yellow folder with a package in it, now it's only a folder that I need to unfold completely, why ? Mar 12 11:59:04 in eclipse Mar 12 12:00:45 oh, that little nugget of information was more important than it was seniorized to be Mar 12 12:01:08 and pragma_ I see, just a random assortment of images Mar 12 12:02:37 * pragma_ stares at Kittens. Mar 12 12:03:01 uh...irregardless Mar 12 12:03:07 definately Mar 12 12:03:27 eh, mine wasn't really a word Mar 12 12:03:41 neither was mine Mar 12 12:04:18 Scrabble will accept neither of those Mar 12 12:05:03 oh, cool Mar 12 12:05:31 you're right http://www.d-e-f-i-n-i-t-e-l-y.com/ Mar 12 12:07:48 it's funny how we rarely get gamedevs in here Mar 12 12:08:34 what the fuck Mar 12 12:08:43 theres no way to cancel an upload in progress in the market Mar 12 12:09:00 also https://play.google.com/publish 404 Mar 12 12:09:28 seriously google... sort it out Mar 12 12:10:10 why do you think you should use https://play.google.com/publish ? Mar 12 12:10:19 try https://play.google.com/apps/publish Mar 12 12:10:27 because it used to be market.android.com/publish Mar 12 12:10:30 should work the same Mar 12 12:10:44 aha Mar 12 12:10:56 Things will never again be the same Mar 12 12:10:59 That's the way it is Mar 12 12:11:06 Changes, bro Mar 12 12:11:09 :) Mar 12 12:11:17 fuck change Mar 12 12:11:41 you want to reproduce change? Mar 12 12:11:58 change makes my job harder Mar 12 12:12:00 hi guys Mar 12 12:12:30 sorry girls, ignore EvOox-, he's obviously a bigot and chauvinist pig Mar 12 12:12:30 CallumTaylor: you're a clerk, right? Mar 12 12:12:35 I guessed everybody in android dev was already used to things changing... Mar 12 12:12:52 a what? Mar 12 12:13:11 should I change "android dev" to general open source dev? Mar 12 12:13:37 pragma_: ?? Mar 12 12:14:43 android is closed source Mar 12 12:14:46 why would you lie Mar 12 12:19:01 question: if I play a sound using MediaPlayer, how can I prevent the sound from being stopped on orientation change (and there for activity desctruction/recreation) Mar 12 12:21:29 any1 knows something about sqlite here? Mar 12 12:21:56 not 100% android dev related tbh, but using sqlite on android so... Mar 12 12:22:24 OFF-TOPIC! Mar 12 12:22:36 so anyway, did anyone watch the football game? Mar 12 12:22:40 lol Mar 12 12:22:51 handegg? Mar 12 12:25:34 sqlite is like sql but on a diet Mar 12 12:25:36 alowaniak: whats up Mar 12 12:26:19 lol handegg Mar 12 12:26:19 well; http://pastebin.com/UUnyRtPX Mar 12 12:26:22 i hate that game Mar 12 12:26:25 too many pads Mar 12 12:26:32 Does anyone know if you can use an offset in ninePatch ? Mar 12 12:26:49 So it doesn't only write in the stretched area Mar 12 12:27:21 got any idea why i get the foreign key mismatch error mikedg? Mar 12 12:28:03 different datatype ? Mar 12 12:28:52 they're both integer Mar 12 12:28:59 alowaniak: but i get "foreign key m...? Mar 12 12:29:11 then what do you mean with a "mismatch" ? Mar 12 12:29:19 it says foreign key mismatch DallaRosa Mar 12 12:29:25 accidently copied wrong Mar 12 12:29:45 well that is my error when i try to execute the insert shroomyreader Mar 12 12:29:52 ooh Mar 12 12:30:01 are you sure the foreign key exists ? Mar 12 12:30:09 Check all your constraints Mar 12 12:30:20 well ye but the thing is i don't get why it even complains about the foreign key Mar 12 12:30:27 they prolly call it sql lite since they cut down on exception information Mar 12 12:30:39 because it voilates some constraint prolly Mar 12 12:30:48 i got a primary key in a_new, and a foreign key to that primary key in b_new Mar 12 12:30:57 and i want to copy data from a_old to a_new Mar 12 12:31:08 how could it then possibly complain about the foreign key? Mar 12 12:31:41 perhaps it doesn't have rights ? Mar 12 12:31:51 try to recreate it in a proper sql for testing Mar 12 12:32:06 but i can insert with insert into a_new values(null, "test", "test") Mar 12 12:32:20 Does anyone know why this AnimationDrawable isnt starting? It is in an ActionBar and currently loads the first frame and doesn't animate: http://pastebin.com/VhXN3kjz Mar 12 12:32:41 so you can insert without giving the foreign key ? Mar 12 12:33:13 ..no i'm not even doing anything in the table that has the foreign key Mar 12 12:33:25 b has foreign key and a has the primary key the foreign key is linked to Mar 12 12:33:42 and i can insert into a with normal row, but not with a select from an old a (which has no constraints whatsoever) Mar 12 12:33:58 I don't know if you already got the answer but Mar 12 12:34:02 but it said a mismatch Mar 12 12:34:14 hi all Mar 12 12:34:17 Ok. Nevermind. Apparently it is working now. Mar 12 12:34:20 are you sure its not a datatype fault ? Mar 12 12:34:28 anyone know where i may start looking for this ? http://pastebin.com/uRyuqpCE Mar 12 12:34:30 alowaniak: you're not passing table_a_id when inserting Mar 12 12:34:32 right? Mar 12 12:34:39 don't you have to pass that too? Mar 12 12:34:58 doesn't the exception give any more info ? Mar 12 12:35:29 damn... i found the error i guess... i created the foreign key constraint wrong (wrong reference name) Mar 12 12:35:40 DallaRosa i wasn't even inserting into the table with table_a_id Mar 12 12:35:50 dat constraint Mar 12 12:36:15 really weird how i could insert normally but couldn't insert with a select though.... Mar 12 12:40:53 I'm having an error with Android emulator, "Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]" thngs is the SDCard on my AVD is 4GB big and the -partition-size param is 256, the .apk is 145MB big, so I should have enough space. What can I do to sort this out? Unfortunately, I have no real device to use instead of the emulator. Mar 12 12:42:06 lulz, 145MB apk Mar 12 12:42:34 pragma_: it would be smaller if it could :) Mar 12 12:42:41 it could Mar 12 12:42:47 it should Mar 12 12:43:04 it won't xD Mar 12 12:43:24 still I need a way to make this run on the emulator and I can't figure out the out of space error, anyone has tips on it? Mar 12 12:43:55 my tip would be to use less space Mar 12 12:44:25 move the data out of the apk and into a separate file Mar 12 12:44:49 like an app extension= Mar 12 12:44:50 ? Mar 12 12:45:39 CurrentlyCurrent: Have your tried increasing the partition size even further? If nothing else to see if the app (for some reason I can't explain) increases in size past your limits? Mar 12 12:45:55 drlaban: I can try to :) Mar 12 12:46:06 do you need a 64-bit jdk for building ICS? or 32-bit will do? it's no longer available in the repo "lucid partners" Mar 12 12:47:13 just soh the 145mb apk Mar 12 12:47:13 lol Mar 12 12:47:54 DallaRosa: soh? Mar 12 12:47:54 CurrentlyCurrent: even if you can install it in the AVD, you won't be able to release that Mar 12 12:48:19 DallaRosa: I'm well aware of that, it'd need to by 50MB with the extension file for the images, in this case :) Mar 12 12:48:23 CurrentlyCurrent: Are you going to release this on Play= Mar 12 12:48:47 CurrentlyCurrent: yeah Mar 12 12:49:00 drlaban: not with this APK size, i know i wont be able to, but I need to test it on AVD for the functionalities of the thing, then I can worry about space. Mar 12 12:49:56 can't dex files be only xmb large? or is that not the case here? Mar 12 12:49:57 CurrentlyCurrent: Alright. I found something on SO that basically ends up in adding -partition-size 1024 on the Default emulator option. Mar 12 12:51:06 CurrentlyCurrent: http://www.stackoverflow.com/questions/2239330 Mar 12 12:52:03 disregard what i just said, that was about amount of method references Mar 12 12:56:24 anyone ? http://pastebin.com/uRyuqpCE Mar 12 12:57:53 fanno: post your PhoneWindow.java code, around that line 1778 Mar 12 12:58:08 drlaban: -partition-size 1024 solved it, thanlks :) Mar 12 12:58:43 QubeZ: say what ? PhoneWindow.java is android file Mar 12 12:58:57 the error is "outside" my app Mar 12 12:59:13 fanno: oh ok, I thought it was your code Mar 12 12:59:16 you did something like addListener(null) somewhere...? Mar 12 12:59:32 that's the only think i can follow out of that tbh Mar 12 12:59:43 ya, its too vague to follow-up on Mar 12 12:59:48 I cant recreate it it happens on users device. (auto reported crash dumb) Mar 12 13:00:01 alowaniak: was that for me ? with the listener ? Mar 12 13:00:09 ye Mar 12 13:00:49 since it gives a npe on a dispatch event... mayb a listener is null or something Mar 12 13:00:56 complete shot in teh dark though Mar 12 13:02:36 what Mar 12 13:02:55 alowaniak: sure =) any shot is better that none i am looking tho i dont think i am Mar 12 13:03:47 First textViews, layout perfect Mar 12 13:03:56 other textviews, layout fucked Mar 12 13:04:00 oh android Mar 12 13:04:27 98% of the time someone blames android, they're doing it wrong Mar 12 13:04:32 duh Mar 12 13:04:33 fanno: hmye tbh I would also kinda assume that a addListener kinda method would check for null input tbh? Mar 12 13:04:35 1% of the time, it's the oem/carrier customization Mar 12 13:04:49 the other 1% is magic? Mar 12 13:05:01 nah it's actually android's fault i would assume Mar 12 13:05:01 honestly my dad just bought a galaxy tab (the latest model) Mar 12 13:05:02 20% of the time its Google's inability to be consistant in its syntax and coding conventions Mar 12 13:05:03 the other 1% is android :) Mar 12 13:05:08 and playing with that after playing with an ipad... Mar 12 13:05:09 I gotta say Mar 12 13:05:12 seriously, 'obtainStyledAttributes' Mar 12 13:05:16 OBTAIN? WHAT THE FUCK Mar 12 13:05:19 ics is getting WAY WAY WAY better than ios Mar 12 13:05:24 ron_frown: +1 Mar 12 13:05:33 even my father a die hard IOS guy was impressed Mar 12 13:05:36 I'm fucking waiting for htc to update to ics Mar 12 13:05:41 this custom rom is buggy as fuck Mar 12 13:05:49 im still waiting for my S2 to be upgraded to ICS Mar 12 13:05:54 shroomyreader I wouldnt *COUNT* on that happen Mar 12 13:06:00 im still waiting for jelly bean! Mar 12 13:06:04 I've worked directly with their android dev teams Mar 12 13:06:04 ... they said they would Mar 12 13:06:11 this year :'( Mar 12 13:06:24 I wouldnt say there is incompetence, but back then they were pretty damn bad Mar 12 13:06:24 it sucks that this will be my last update Mar 12 13:06:37 give them some credit Mar 12 13:06:38 alowaniak: i also look at http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2.1_r1/com/android/internal/policy/impl/PhoneWindow.java/#1778 and other versions of the same file. i cant find anywhere where the like 1778 match "dispatchKeyEvent" Mar 12 13:06:48 I think its a pretty big strain to keep all those models updated Mar 12 13:06:56 does anyone know when the S2 will get the ICS update... Mar 12 13:07:28 is that the sensation ? Mar 12 13:07:39 shroomyreader are you familliar with the android build environment? Mar 12 13:07:56 not really, I know java Mar 12 13:08:03 but just dived into android about 2 weeks ago Mar 12 13:08:09 why ? Mar 12 13:08:12 they have a very good system to have variants for diff models Mar 12 13:08:33 <`z> honeycomb is awesome Mar 12 13:08:35 android is very different to standard java Mar 12 13:08:36 eg, if they wanted to tweak ui here and there and then build it for 10 diff models Mar 12 13:08:39 although it uses the same syntac Mar 12 13:08:40 synta Mar 12 13:08:40 they could do it pretty easily Mar 12 13:08:44 <`z> because i can use my gnex to control hc tablets Mar 12 13:08:45 syntax Mar 12 13:09:00 btw anyone disliking the new ics ui to ? Mar 12 13:09:02 `z, honeycomb is crap compared to ics Mar 12 13:09:23 <`z> ron_frown, honeycomb is kinda okay Mar 12 13:09:38 <`z> lemme try to get a tablet interface on my gnex Mar 12 13:09:39 <`z> :D Mar 12 13:10:16 <`z> screen density: from 320 to 200 Mar 12 13:10:19 <`z> rebooting phone Mar 12 13:10:21 <`z> gogogo Mar 12 13:10:43 alowaniak: i and not setting any listeners to null =( Mar 12 13:11:02 well.. to be fair I got outta honeycomb just as soon as ics came out Mar 12 13:11:23 but it was buggy, and a lot of stuff that was 3.x specific api wise was Mar 12 13:11:30 problematic Mar 12 13:11:35 hmm well ye fanno i obv didn't meant blatantly setting null, but mayb some variable happens to be null Mar 12 13:11:38 i would doubt that though Mar 12 13:11:39 anyway Mar 12 13:11:51 PhoneView.java i got Mar 12 13:12:09 has dispatchKeyEvent at about line 1780ish Mar 12 13:12:16 and only NPE i can see coming from there Mar 12 13:12:22 would be the event it gets passed being nulll =/ Mar 12 13:13:10 <`z> fuck Mar 12 13:13:18 <`z> density too high Mar 12 13:13:25 <`z> not tablet mode :( Mar 12 13:13:50 also i doubt about the listener cause code in the dispatchKeyEvent has: "Callback cb = getCallback(); if(cb != null) cb.dispatchKeyEvent(event) Mar 12 13:13:53 <`z> okay, trying 180 Mar 12 13:14:14 so no way to screw it up by setting the listener to null (which would be really weird if it was the cause anyway) Mar 12 13:18:03 Anyone know what's wrong here? http://stackoverflow.com/questions/9667260/preferenceactivity-and-broadcastreceiver-implement-dynamic-preferences Mar 12 13:18:03 so ye fanno, got srsly no idea what's causing it, my best guess now is the KeyEvent it gets passed being null but that seems so weird that I don't really see that being possible neither tbh Mar 12 13:23:39 alowaniak: indeed, it is reported from a few different android versions also. so not sure what is going on. but i defenatly do not see how it can happen. Mar 12 13:23:54 anyways i am off i will be back later. ! Mar 12 13:24:00 thanks for help so far Mar 12 13:24:10 np Mar 12 13:24:47 i am correct that the error seems to happen within the android framework right ? Mar 12 13:25:48 I would say so ye Mar 12 13:26:57 do you have a keylistener with a callback being fired? Mar 12 13:27:33 one thing I noticed that was extremely fucking weird lately Mar 12 13:27:47 our custom hardware registers random screen input events Mar 12 13:28:00 *ONLY* when booted with hdmi plugged int Mar 12 13:28:17 I think its treating CEC communication as input events with false input event hits Mar 12 13:36:15 hmm Mar 12 13:36:37 i got a content provider backed with a db with 2 simple tables Mar 12 13:37:03 with a 1 to many relation Mar 12 13:37:17 so for every record in table a there are multiple in table b Mar 12 13:37:53 How do I grab the main Activity of my app from a BroadcastReceiver? I tried casting the Context passed in onReceive(), but I get ClassCastException. Mar 12 13:38:06 (to be more precise table b holds dates which represents how often something in table a is used) Mar 12 13:38:22 how could i possibly return that in a Cursor? Mar 12 13:40:04 http://www.ossramblings.com/android-wallpapers-are-bad-design Mar 12 13:44:11 i wonder what's the simplest way to create a single horizontal line 1 pixel wide in xml Mar 12 13:44:43 ah, just a view with a background color :D Mar 12 13:45:48 quick question.. (or maybe its not quick at all), I have a multi-pane layout with two listfragments.. however, how can I change one of the listfragments with another one when an item in the first list is clicked? Mar 12 13:46:21 "traditionally" I would do this by just starting the appropriate activity, but since we are dealing with fragments, that approach is obsolete obviously Mar 12 13:49:57 Untouchab1e: there's an example of that in the official documentation iirc. Mar 12 13:50:13 Mikellip: ah ok, Ill look through that then, tahnks Mar 12 13:50:14 thanks* Mar 12 13:50:24 http://developer.android.com/guide/topics/fundamentals/fragments.html Mar 12 13:56:02 How can I get the main Activity instance from inside an BroadcastREceiver instance's onReceive() method? I probably don't make any sense. heh Mar 12 13:56:21 I thought it would be the Context object, and a cast would work, but apparently not. Mar 12 13:56:24 that peekBinder isn't something you can use starlon? Mar 12 13:56:34 peekBinder? Mar 12 13:57:02 ye i got no idea what it is tbh, i just saw: "peekService(Context myContext, Intent service)" Mar 12 13:57:22 peekService* Mar 12 13:57:41 that myContext sounds as if you could somehow set the context or something Mar 12 13:57:44 idunno, just a wild shot Mar 12 13:58:32 no, I don't think so. I'm not interacting with a service. Mar 12 13:58:48 hmk Mar 12 13:58:49 starlon: .... what? Mar 12 13:58:53 "the main activity instance" Mar 12 13:59:04 is your broadcast receiver being registered programatically, or in the manifest? Mar 12 13:59:15 In manifest. Mar 12 13:59:15 is it an inner class of an activity, or it own class? Mar 12 13:59:21 ok, well, guess what porkchop Mar 12 13:59:24 It's its on class. Mar 12 13:59:25 you shouldn't be trying to "find" activities Mar 12 13:59:28 you should only be sending intents Mar 12 13:59:40 you absolutely should not be trying to cache activities, for that matter, because that way lies leaks Mar 12 14:00:11 This may explain my issue more deeply. http://stackoverflow.com/questions/9667260/preferenceactivity-and-broadcastreceiver-implement-dynamic-preferences Mar 12 14:00:13 the context you get in the receiver may or may not be related to anything else in your app. When your receiver is called, your Application may or may not even exist. Mar 12 14:00:25 The guy answered the original question, but check the comments. Mar 12 14:00:46 lov: makes sense. kinda :) Mar 12 14:00:58 ah Mar 12 14:01:08 ok, using the activity's context in your intent constructor is A-OK Mar 12 14:01:14 that only uses the context to determine the packagename Mar 12 14:01:22 (the packagename for your app, not your class) Mar 12 14:01:34 Using AlarmManager.. Is it possible to register an activity as receiver for the alarm? .. Mar 12 14:01:54 Tried using registerReceiver(receiver, intentfilter) but it didn't work as expected Mar 12 14:01:57 can you pastebin your whole manifest, please? Mar 12 14:02:05 not just the snippets in stackoverflow Mar 12 14:02:19 Hey! Any ideas how to build android with make 3.82 ? Mar 12 14:02:29 I would not like to downgrade it for everything... Mar 12 14:02:30 nope :> Mar 12 14:02:52 lov: https://gist.github.com/2022122 Mar 12 14:03:05 djszapi: did you file a bug on b.android.com ? Mar 12 14:03:35 djszapi: You can easily install make in some dir and put that in $PATH without downgrading the system make. Mar 12 14:03:42 lov: not really since I need it asap, cannot wait... Mar 12 14:04:01 djszapi: You can also check whether your system's make is called "3.82" but has actually had the bug patched out of it. Mar 12 14:04:06 ndim: yeah, but that kind of pollution goes normally haywire. Mar 12 14:04:27 Pollution? Where? Mar 12 14:04:41 djszapi: probably no way around it. Let the env that uses make reference that particular make. Mar 12 14:04:51 mkdir _b && cd _b && ../configure --prefix=$PWD/../_i && make all install Mar 12 14:04:55 starlon: Hmph. I'm not sure offhand what the problem is, sorry. Mar 12 14:05:08 lov: k thanks for looking Mar 12 14:05:09 starlon: try taking the intent filter out, and removing the action in the intent Mar 12 14:05:13 well Mar 12 14:05:14 leave the action in Mar 12 14:05:16 but take the filter out Mar 12 14:05:24 Put that beside your android source code, have the script you source to set up your environment change PATH, and you are done Mar 12 14:05:27 quite clean Mar 12 14:05:58 djszapi: I have successfully built AOSP using what Fedora 16 calls make "3.82". Mar 12 14:06:41 I some cases I was not sure what was happening, but that could be solved by running "make -j1" instead of "make -j2". Mar 12 14:06:53 ndim: pollution as in two different versions of a very core package and executable on the system. Mar 12 14:07:15 lov: I just want to access my FroyVisuals instance from inside onReceive() of my BroadcastReceiver instance. I'm not sure if removing the intent-filter will teach me that. :) Mar 12 14:07:35 ndim: using -j5 in here. Mar 12 14:07:45 Mikellip: Ive read the fragments-documentation, and ive put up a transaction to replace the fragment. And when I run the app and click the list item, the app doesnt crash, but the view doesnt seem to change either.. hmm Mar 12 14:07:46 So? AOSP comes with its own cross compile versions of C compilers, its own version of adb, etc... Mar 12 14:08:00 ndim: but that is not the same topic Mar 12 14:08:06 those things are for cross-compilation Mar 12 14:08:18 but I would pollute the "host" system with two distinct make versions. Mar 12 14:08:18 My system comes with adb. Mar 12 14:08:24 mine does not. Mar 12 14:08:47 ndim: we have these patches: http://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/make Mar 12 14:08:48 Adding make to that list of stuff needed for AOSP does not create much more pollution than AOSP itself already creates. Mar 12 14:08:58 were you referring to any of those, or some different ? Mar 12 14:09:36 starlon: please don't try to reference activities or services directly inside of your receiver Mar 12 14:09:49 well Mar 12 14:10:01 you can reference the classnames, don't try to reference instances, or bind to services or anything Mar 12 14:10:19 the receiver will be killed silently if it doesn't return in a couple seconds Mar 12 14:10:34 also, don't make your activity statically referenced anywhere or anything Mar 12 14:10:44 unless you really know what you're doing Mar 12 14:11:37 ndim: has this make version the bug patched out ? Mar 12 14:11:45 which bug btw ? Mar 12 14:11:52 lov: Do I need to implement another receiver? The one I have, then broadcast another intent that FroyVisuals catches with a dynamic receiver? Mar 12 14:12:20 djszapi: Can't remember the exact one. http://pkgs.fedoraproject.org/gitweb/?p=make.git;a=tree;h=refs/heads/f16;hb=refs/heads/f16 for comparison. Mar 12 14:12:29 man Mar 12 14:12:30 my app Mar 12 14:12:37 viewpagers *everywhere* Mar 12 14:12:39 it's very pretty Mar 12 14:13:02 Maybe I need the one receiver inside my FroyVisuals class. hmm Mar 12 14:13:37 anyone know if the htc hero supports gles2? Mar 12 14:13:41 Mikellip: actually, it does show, but the views are on top of eachother Mar 12 14:13:48 ndim: have you also changed the relevant mk file in question to avoid this check and let you go with your 3.82 on Fedora ? build/core/main.mk Mar 12 14:15:34 djszapi: Yupp, changed the error to a warning Mar 12 14:18:57 I created a custom view and have only had luck building the layout programmatically. I want to do it in an xml file instead so I added an xml file to /res/layout but when I do LayoutInflater.from(getContext()).inflate(R.layout.myCustomView, this), it doesn't find the xml file. Mar 12 14:20:43 ndim: what did you want to present with this post "mkdir _b && cd _b && ../configure --prefix=$PWD/../_i && make all install" ? Mar 12 14:23:02 starlon: yeah. I think best would be to figure out what you're trying to do. Why are you using the receiver? Would it be smarter to simply have the activity register a receiver at runtime? Mar 12 14:23:08 djszapi: That is how you compile make from source code without touching any directory outside the one you unpacked the make source tarball to. Mar 12 14:23:30 To avoid "pollution". Mar 12 14:23:50 not getting. Mar 12 14:24:33 my idea is that I am gonna install cmake manually to some folder not being in the path, and I will call it with absolute path. Mar 12 14:24:37 make* Mar 12 14:25:01 If you get make-3.81.tar.bz2 and unpack it to make-3.81/ you can run those commands inside make-3.81/ Mar 12 14:25:15 All the build files will the be in _b/, and the installation will be in _i/ Mar 12 14:25:23 ndim: yes Mar 12 14:25:42 I created a custom view and have only had luck building the layout programatically. I want to do it in an xml file instead so I added an xml file to /res/layout but when I do LayoutInflater.from(getContext()).inflate(R.layout.myCustomView, this), it doesn't find the xml file. Mar 12 14:25:58 Elaborate on "it doesn't find the xml file" Mar 12 14:25:59 So you add PATH="/path/to/make-3.81/_i/bin:$PATH" and you are done. Mar 12 14:26:52 ndim: I do not even need to pollute that way Mar 12 14:27:00 I can use make with full path (absolute). Mar 12 14:27:11 anyone with alarmmanager-experience? Need to give user notification of something 5 minutes into the future, a certain action should be taken whether or not the app is running (if user clicks on the notification, something in the app (like changing the UI) should happen) Mar 12 14:28:12 XeruX: use the Alarm Manager to send an intent that starts a service or launches an activity or shows a notification or whatever. Mar 12 14:28:17 Can views in different activities have the same ID ? Mar 12 14:28:19 XeruX: I'm not sure what the question is. Mar 12 14:28:38 gho5t: er Mar 12 14:28:43 gho5t: just call "setContentView" :X Mar 12 14:28:59 how can I change programmatically the startColor gradient of my shape ? Mar 12 14:29:14 gho5t: you can call setContentView on xml resource references, then findViewById. Calling the Activity's findViewById is equivolent to calling it on the root view Mar 12 14:29:25 ndim: thanks. Mar 12 14:29:29 I can't find something helpful on google about that Mar 12 14:29:45 i'm setting the drawable of a checkbox, but the checkbox is not chnging its size... Mar 12 14:29:55 maxagaz: it's entirely possible that you can't. Take a look at the source for shapedra2able. Mar 12 14:29:59 er, shapedrawable Mar 12 14:30:04 tapas: set the background drawable. Mar 12 14:30:50 lov: aaah :D Mar 12 14:31:36 lov: trying that.. i'm not sure it'll help though Mar 12 14:31:48 lov: I'm not sure if that's what I need. Let me ask this - when people build custom views, do they usually put the view's layout in an external xml file or do they just build it programatically? Mar 12 14:32:22 both Mar 12 14:32:36 do you have any ideas how I can specify that my jre/jdk7 version should be comptabile with the version 6 for build ? http://paste.kde.org/437990/ Mar 12 14:32:38 is there a null drawable available in android? Mar 12 14:33:32 so if I want to use xml I have to put an id on my layout file and use findViewById? Mar 12 14:34:45 i'm not finding my layout xml file when I do R.layout.myCustomLayout Mar 12 14:34:46 if you want to get the view in code then ye Mar 12 14:34:47 that is the issue Mar 12 14:35:11 So it can't find the field "myCustomLayout"? Mar 12 14:35:16 right Mar 12 14:35:18 Did you import your projects R? Mar 12 14:35:28 Has the project been rebuilt since adding the xml? Mar 12 14:35:34 it used to be beneficial to publish app updates on sunday afternoon to land in the "new apps" section of the market. currently, there is only "top free - new". is there any recommended time to update the apps? Mar 12 14:35:37 I have import android.R; Mar 12 14:35:46 you need your own R Mar 12 14:35:47 There's your problem Mar 12 14:35:48 ok Mar 12 14:35:49 the generated one Mar 12 14:36:01 brake derms are shot and you need a new transmission Mar 12 14:36:16 also make sure you don't start name with a number ;) Mar 12 14:36:19 Sometimes, I have found that Eclipse/ADT needs me to manually clean the project and then build it anew to make sure my R is regenerated. Mar 12 14:36:55 Is there a convenient way to draw a bitmap (scaled up lots, no filtering) with a visible pixel raster? (if that's even the right word) Mar 12 14:37:10 nice thanks Mar 12 14:37:22 is this the code I need to inflate my layout now: LayoutInflater.from(getContext()).inflate(R.layout.knob, this); Mar 12 14:37:26 getting an error on that Mar 12 14:37:49 beyond using a raster image as a pattern, anyway Mar 12 14:39:04 crap. Is it because I need to make my control a ViewGroup Mar 12 14:39:08 instead of a View Mar 12 14:39:13 it will have child controls Mar 12 14:39:51 gho5t: no! Mar 12 14:39:52 first up Mar 12 14:39:55 guys i have different tablets with android, all registered with the same gmail account. If i buy an app on one of those will i be able to download and install it on all devices without paying again? Mar 12 14:39:57 where are you using this layout Mar 12 14:40:01 is this for a viewadapter or something? Mar 12 14:40:04 or is it for your activity? Mar 12 14:40:27 I'm trying to create a reusable control. It's a knob that is used for navigation Mar 12 14:40:29 lov: I set the alarm, and the receiver (defined in the manifest) then adds a notification.. WHen the user clicks on the notification, I want the app to start running (if it's not running), and maybe change the UI (depends on the notification), but nothing happens if the app is running. Mar 12 14:40:30 If this is for your activity's main layout, use setContentView; don't use layout inflater. Mar 12 14:40:33 it will be used by my app Mar 12 14:40:37 ok Mar 12 14:40:39 in multiple activities Mar 12 14:40:46 so you're making your own view Mar 12 14:40:49 yeah Mar 12 14:40:50 correct? Mar 12 14:40:51 ok Mar 12 14:41:27 in the inflate method, don't actually give it the view to inflate into Mar 12 14:41:39 so make it .inflate(R.layout.knob, null) Mar 12 14:41:53 lov: the intent the notification was added with isn't handled if the app is running, which makes me sad. Mar 12 14:42:11 actually, wait. Mar 12 14:42:47 ok that built but I'm getting a runtime error now Mar 12 14:42:55 Hmm. I'm not sure you're actually supposed to use premade layouts for custom views... Mar 12 14:43:11 gho5t: well, yeah, the layout inflater inflates the layout and then returns it to you; you need to capture it and do something with it. Mar 12 14:43:20 so you think I might have to build up the control programatically Mar 12 14:43:35 e.g. manually add textviews to the canvas Mar 12 14:43:36 etc Mar 12 14:43:41 well, no. Mar 12 14:43:46 What you'll generally do is this: Mar 12 14:44:03 well, hmm. Mar 12 14:44:09 if you want to pre-include textviews, etc, hmm. Mar 12 14:44:14 right Mar 12 14:44:44 this is interestingly enough NOT the usual path developers take Mar 12 14:45:00 they'll just override a viewgroup, etc, and still inject content within Mar 12 14:45:03 but obviously you don't want to do that Mar 12 14:45:48 http://developer.android.com/resources/articles/layout-tricks-reuse.html Mar 12 14:45:51 yeah it's pretty custom Mar 12 14:46:09 that might be what you're looking for Mar 12 14:47:37 not really Mar 12 14:47:42 I want custom interaction etc Mar 12 14:47:56 I'll just do it programmatically Mar 12 14:48:07 just wanted to see if I could separate the view from the logic and keep it clean Mar 12 14:50:55 for actionbar 'action modes', can you only have two items before the rest are pushed into the overflow menu? Mar 12 14:50:57 yeah, sounds like there's nothing for you to do but actually inflate different views at runtime :( Mar 12 14:51:07 how do you rotate the android sim on mac osx? Mar 12 14:52:15 CurrentlyCurrent: look at the emulator docs on d.android.com, lists all the key commands Mar 12 14:52:23 replace "control" with "mac key" or something Mar 12 14:53:03 and remember that if you are using example mac book pro, you need to press fn to activate function keys Mar 12 14:53:17 fn + f11 is actually f11, f11 itself just decreases volume Mar 12 14:54:25 hi Mar 12 15:01:08 got it, needed to use MenuItem.SHOW_AS_ACTION_ALWAYS Mar 12 15:06:45 is there anything you need to do to make your app available to people running ics? Mar 12 15:07:25 dont have a maxSdkVersion less than 14? :P Mar 12 15:07:30 someone is reporting that one of my apps isn't available, but I haven't done anything to restrict it Mar 12 15:07:40 what's the app Mar 12 15:07:43 no, theres no maxSDKVersion set Mar 12 15:07:46 and can you paste the manifest? Mar 12 15:07:59 https://play.google.com/store/apps/details?id=com.amphoras.bladechecker Mar 12 15:08:21 http://pastebin.com/De6iTj27 Mar 12 15:08:39 oh man that's gonne be fugly Mar 12 15:08:44 you have no target set Mar 12 15:08:46 and min is 3 Mar 12 15:09:04 that said, it's compatible with everything i own except my logitech revue Mar 12 15:09:13 i can get it on my galaxy nexus Mar 12 15:10:18 maybe its a problem with the rom he is using Mar 12 15:10:53 what are the problems with not having a target set? Mar 12 15:11:41 As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion, the system may enable compatibility behaviors to ensure that your app continues to work the way you expect. You can disable such compatibility behaviors by specifying targetSdkVersion to Mar 12 15:11:41 match the API level of the platform on which it's running. For example, setting this value to "11" or higher allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or higher and also disables screen compatibility mode when running on larger screens (because support for API level 11 implicitly supports larger screens). Mar 12 15:12:35 http://developer.android.com/reference/android/os/Build.VERSION_CODES.html Mar 12 15:12:37 read through that Mar 12 15:12:53 thanks Mar 12 15:19:45 JakeWharton, you around? Mar 12 15:20:41 using Theme.Sherlock.Light.DarkActionBar makes the Android layout editor crash! hehe Mar 12 15:21:23 Tried with ADT17? Mar 12 15:21:33 checking Mar 12 15:21:47 oh, nope. is it out? Mar 12 15:21:54 There's a preview Mar 12 15:22:03 16.0.1.v201112150204-238534 Mar 12 15:22:12 Yeah I think I tried it on my laptop... one sec Mar 12 15:22:52 Basically the layout editor is a bit buggy, which has already been reported on the android issue tracker Mar 12 15:23:17 Oh I'm sure... I just haven't run into a *crash* yet Mar 12 15:23:34 and it's been improving Mar 12 15:23:51 With ABS3.5 it wasn't possible at all to use any sherlock themes Mar 12 15:24:10 but it's kind of fitting, Jake's stuff is so crazy it crashes preview Mar 12 15:24:52 awesome, and I got my android-15 emulator in a boot-loop (SIGSEGV) Mar 12 15:25:03 probably need to wipe user data? Mar 12 15:25:50 Or just recreate it Mar 12 15:30:15 Hey I wrote a simple sync adapter. But after the auth dialog disappers not account is shown in the account list, but the contacts are sync. Any hint what I might have forgot? Mar 12 15:30:19 Uhh, yeah, still crashes on ADT 17 preview 4 :-( Mar 12 15:30:25 submitting bug report Mar 12 15:30:45 how best to capture stack trace/debug info? Mar 12 15:32:46 Ooh, it's a JVM crash! Mar 12 15:32:56 # Problematic frame: Mar 12 15:32:56 # J java.util.regex.Pattern.escape(ZZ)I Mar 12 15:33:01 ggggggggggg Mar 12 15:35:01 mrenouf|work: If you want to report it, you should probably just make a small test case with just the part that actually causes the crash.. Much easier for them to figure out rather than "crashes when using ABS" Mar 12 15:36:09 it should probably crash with the simple ABS sample app Mar 12 15:36:43 I'm not going to pick apart ABS to find the issue, especially since there's zero go on, there's no Java stacktrace, just a native JVM segfault Mar 12 15:36:44 I mean, ABS is a big library. Find out what's crashing it, put just that part in a test project, then report Mar 12 15:37:23 someone with a debug JVM could figure this out pretty quickly Mar 12 15:37:45 seems like a JVM bug to me Mar 12 15:37:55 it's kind of concerning that something as high level as ABS could crash the JVM though Mar 12 15:37:59 I played with ABS 4.0 over the weekend, put it in all my apps. I was having trouble with proguard, getting a setfault related to theming and whatnot. Mar 12 15:38:09 I mean, it's not using JNI or anything, is it? Mar 12 15:38:13 I ended up removing obfuscation, and did a couple of cleans and the build worked out good Mar 12 15:38:40 MDijkstra, it's not in native code, it's in Pattern.escape, but it could have been the result of stack corruption earlier up Mar 12 15:38:47 yeah Mar 12 15:39:17 Eclipse uses JNI, lots of it Mar 12 15:39:19 (SWT) Mar 12 15:41:03 the interesting bit is the light theme works fine. Jake might be able to shed light on what might be different. I think he does some tricks with ContextWrappers Mar 12 15:48:13 Todays moral question. I have a friend that has a great idea to an Android game. However, I am noticing his implementation of the idea is poor and he is adding additional ideas that is bloating the great idea. Since he is a my friend, I cannot simply steal the idea. I have also asked to fork it, but he wants to work on it alone.. Any suggestions what I can do? Mar 12 15:48:46 watch him try and fail, then say "I told you so" ? Mar 12 15:48:56 let your friend fail Mar 12 15:49:09 you gave him suggestions and offered to help. Mar 12 15:49:14 problem is, he has no time plan either. Mar 12 15:49:17 if he's not willing to accept help, you can't feel bad when it doesn't work Mar 12 15:49:26 so it just working randomly on it and the weeks go.. Mar 12 15:49:32 * lov shrugs Mar 12 15:49:42 do you have a vested interest in seeing him succeed, aside from him being your friend? Mar 12 15:49:48 i.e. are you also running a game company together Mar 12 15:50:01 if not, it's his choice how he dicks around Mar 12 15:50:04 nope, both just random developers Mar 12 15:50:22 you could always do a brown bag teaching session with him or something Mar 12 15:50:25 but i think it the idea can be monetized and be really good. Mar 12 15:50:32 explaining how time planning works, how it helps, how he should work on modules, etc Mar 12 15:50:41 eh Mar 12 15:50:44 everyone has great ideas Mar 12 15:50:47 I've got a few great ideas Mar 12 15:50:48 tell us the idea Mar 12 15:50:52 we're not his friends! Mar 12 15:50:55 * MDijkstra runs Mar 12 15:50:56 the real determiner is time, effort, and skill Mar 12 15:51:12 true, and I think i can personally make this happen Mar 12 15:51:20 4.0 emulators finally work with snapshots! yay! Mar 12 15:51:26 its just a shame to see the idea just be crippled.. Mar 12 15:51:51 squeakytoy, he might also be right. you have to consider that Mar 12 15:52:00 right? Mar 12 15:52:07 as in, poor implementation? Mar 12 15:52:28 if he wants to do it himself, you need to let him Mar 12 15:52:40 I know... :-/ Mar 12 15:52:44 how else will he learn? Mar 12 15:52:54 its not about learning, its about making $$$ ! Mar 12 15:53:05 well, learning how to make $$$ Mar 12 15:53:19 everything is about learning Mar 12 15:53:23 i have no problem giving him 75% of profit Mar 12 15:53:37 something tells me that doesn't interest him Mar 12 15:53:54 any more than I would be happy someone taking over one of my ideas and paying me for it. Mar 12 15:54:09 mrenouf|work: Take my idea, develop it, and give me money plz Mar 12 15:54:15 I am happy to let you do this Mar 12 15:54:18 we can chat if you like Mar 12 15:54:24 lov: well. it depends on how much I guess ;-) Mar 12 15:54:25 its like seing someone describing the first iphone, but not fully understanding how great it really can be Mar 12 15:54:26 I have an idea for an app that blends vegetables like a salad shooter Mar 12 15:54:33 I call it the iSaladShooter Mar 12 15:54:46 squeakytoy, you mean like Steve Ballmer? ;-P Mar 12 15:54:52 squeakytoy: you're in a tough spot, but in the end it's not your decision to make, it is his. Mar 12 15:55:00 * squeakytoy nods sadly Mar 12 15:55:01 if he doesn't want your help, don't force it on him Mar 12 15:55:11 then you'll be down a friend and an awesome app Mar 12 15:55:33 ive even asked him if i could "buy" the idea :-) Mar 12 15:55:35 but nope Mar 12 15:55:50 damn you guilt! Mar 12 15:55:56 preventing me to backstab and become rich.. Mar 12 15:56:29 if you're positive he'll fail, implement it your way as an exercise Mar 12 15:56:38 and when he fails, offer to go halves w/ him on your version Mar 12 15:56:54 squeakytoy, you can always work with him after the first iteration, when he's proved your point for you Mar 12 15:56:55 assuming you feel like putting in the work w/ the risk of no reward if he succeeds Mar 12 15:57:04 but "when" he fails, can be in 2 years. He has no time plan at all. Mar 12 15:57:22 no iterations, just happy-coding when he is bored. Mar 12 15:57:40 is he doing it for monetization Mar 12 15:59:25 i.. think so Mar 12 15:59:51 anyway, the bottom line is, even though it pains me, its his idea and i shouldn't do anything Mar 12 16:18:07 Hello. What;s wrong with minEms and maxEms? How can I make a text view size «predictable»? Mar 12 16:19:17 Lachezar: by using dip Mar 12 16:19:54 synic: Not good (although it works): I want to say: make the field 5 characters wide, and ellipsize above that. How? Mar 12 16:20:13 synic: I want to emulate table columns in a list view. Mar 12 16:20:42 Lachezar: android:ellipsize Mar 12 16:22:20 minEms + maxEms + ellipsize Mar 12 16:22:37 however, note that min/maxEms=5 is not 5 characters, its like 3 Mar 12 16:23:41 birbeck: my tests show minEms=8, maxEms=8 and field is 20 characters wide :( That's why I am wondering what's wrong with *Ems. And I am using monospace font... Mar 12 16:24:10 synic: ellipsize works, but I fail to make the fields predictably wide. Mar 12 16:24:32 i am not sure how android measures ems, but it is still predictable and relative Mar 12 16:24:38 Lachezar: I think the problem is more likely in the layout for each of your rows Mar 12 16:24:42 not the textview Mar 12 16:25:01 ah yes, there is that, if the textview is larger than the table cell Mar 12 16:25:12 Hey Mar 12 16:25:17 synic: ?!? minEms="8" maxEms="8" layout_width="wrap_content" Mar 12 16:25:34 Lachezar: no, the containers in your row Mar 12 16:25:45 can you pastebin your row.xml? Mar 12 16:25:53 synic: RelativeLayout... Mar 12 16:26:13 I <3 RelativeLayout Mar 12 16:27:01 synic: Well... If minEms and maxEms ahve to do with the PARENT layout... Then they're useless for me... Mar 12 16:27:58 How do I calculate the amount of px/dp/sp to specify explicit width, when I know the number of characters I want to display? Mar 12 16:28:11 they don't, but the textview will end up resizing to the container constraints Mar 12 16:28:28 wouldn't that depend on the font in question, Lachezar ? Mar 12 16:28:46 synic: OK. Now I get it... But with Relative Layout, wrap_content and no weight... Mar 12 16:29:21 evancharlton: It would! That's why I was hoping *Ems would do the trick, but alas.... Mar 12 16:30:55 alas! ergo! hence! fair lady! Mar 12 16:31:02 http://developer.android.com/reference/android/graphics/Paint.html#getTextBounds(char[], int, int, android.graphics.Rect) Mar 12 16:31:09 you MAY be stuck :| Mar 12 16:32:42 lov: DOH! I have to make a custom adapter, just to measure a text field? Mar 12 16:32:53 lov: That would s*ck... Mar 12 16:33:24 well, hmm Mar 12 16:33:43 it sounds a lot like you need to override textview, because you want the actual text size to change based on the content Mar 12 16:33:56 unless there's a clever way of setting this as an attribute which I don't understand Mar 12 16:34:08 lov: I could override the Adapter, and enumerate all text fields, find a tag that specifies «fixed» width, measure the width and apply it... Mar 12 16:34:56 lov: I want the opposite: I want the text view to be fixed size, independent of content, however the size is dependent on a «standard» content. Mar 12 16:36:38 ... right. The textview size is static, but the font size of the content changes so that it fits the textview. Mar 12 16:36:58 if you're lucky there's some sort of scaling attribute but I don't know of one Mar 12 16:37:11 if romainguy_ ever pokes his head in, he might be the best person to answer this Mar 12 16:37:39 lov: erm, no... the font and font size do not change. I am using «monospace» to mitigate character width dispersion. Mar 12 16:38:39 It seems I am unable to instruct the text field to be 8 characters wide (based on current font, font size and font attributes). Mar 12 16:38:43 anyone notice that with canvas.drawArch 90 degrees is reversed from where it should be? Mar 12 16:38:54 * lov shrugs Mar 12 16:39:02 ok, so you want up to 8 chars and after that you ellipsize Mar 12 16:39:07 To make matters worse: When I make the field 70dp it looks OK in designer, but not in emulator, and even worse on the actual device. Mar 12 16:39:14 lov: Yes. Mar 12 16:39:25 huh, I thought you could set widths in ems or something Mar 12 16:39:54 dps may actually not be appropriate here; you MIGHT want to actually use pixels or something Mar 12 16:39:55 lov: Tried, does not work as expected. I have a text field with 8 zeros, and ems="8" and it does not work... Mar 12 16:40:38 lov: By «does not work» I mean the field is much bigger (or smaller) than the 8 zeros text. Mar 12 16:44:29 I need some help. I am trying to return the ID of a contact from a ListView(intent) but i dont know how to select the ID of the clicked contact please help me: http://pastebin.com/czNwt0N6 Mar 12 16:45:06 rows 30-32 is the problem Mar 12 16:46:28 uggghhh Mar 12 16:46:37 please do not cache the cursor Mar 12 16:46:39 that is a bad, bad idea. Mar 12 16:47:06 use listView.getItemAtPosition Mar 12 16:47:09 or some other such method Mar 12 16:47:56 The id parameter in the itemclick method is the _id column Mar 12 16:49:09 lov: will getItemAtPosition get me the ID Mar 12 16:50:01 Duke_Puke: the id parameter of the onItemClicked(...) IS the _id column. Mar 12 16:50:16 hm in an uml class diagram, how would i denote the association between an activity calling another activity via an intent ? Mar 12 16:50:23 Duke_Puke: getItemAtPosition() will return the cursor rewound at the specified position/. Mar 12 16:50:42 so i should just forward the id-parameter straight into the setResult? Mar 12 16:51:17 Duke_Puke: That's what I do (assuming _id is a unique, repeatable, predictable column in the cursor0. Mar 12 16:52:46 Lachezar: Two sec I'll try :) Mar 12 16:55:00 Lachezar so it sould be like this http://pastebin.com/CpWLikKr or did i understand you wrong? Mar 12 16:55:20 my "drawable" being a GradientDrawable, this changes its color: drawable.setColor(0x8800FF00), but how to change its startColor instead ? Mar 12 16:55:42 so, what is the best time of day / weekday to push updates to android market, eh... google play? Mar 12 16:56:16 why would it matter? Mar 12 16:57:31 Ge0rG: when the app is ready? Mar 12 16:58:06 not the week-end in the case your new app has a big bug Mar 12 16:58:17 it takes weeks for most users to get the updates, so it doesnt matter much when you upload it Mar 12 17:00:38 Duke_Puke: Looks about right... Mar 12 17:01:25 Lachezar: It crashes. I also made the baseapplication take it as a Long so i really don know what the problem is :/ Mar 12 17:01:32 Duke_Puke: I'm not sure about the new Intent(). Mar 12 17:01:59 Duke_Puke: replace the new Intent() with getIntent() Mar 12 17:02:09 Lachezar: ok Mar 12 17:02:56 All: I am not sure if what I'm relating to Duke_Puke is right: when returning value do I use the getIntent(), or do I create new Intent()? Mar 12 17:03:18 new intent Mar 12 17:03:21 ^ Mar 12 17:03:26 I've always used getIntent(), then putExtra() and then setResult(..., ...) Mar 12 17:03:30 FAQ: Do I use Airtime or Megabytes when I'm using an app? Mar 12 17:04:25 Intent data = new Intent(); data.putExtra(FOO, "bar"); setResult(RESULT_OK, data); finish(); Mar 12 17:05:09 Duke_Puke: Seems the other members around disagree with me, so you should probably post the exception... Mar 12 17:05:31 * Lachezar is being homicided by the ems... Mar 12 17:07:09 * Lachezar bids farewell and good night to everyone... Mar 12 17:08:01 Lachezar: There is no exception. I just get very wierd numbers back. for instance now the parameter-id is 195 and its incresing +1 when i take the next name in the contact list. Mar 12 17:09:50 hey does anyone know of a websites support ticket system with an android counterpart app Mar 12 17:10:30 nope. Mar 12 17:10:40 do feel free to write one yourself, though Mar 12 17:10:59 if it was called bugdroid, would he be sued by google? Mar 12 17:11:03 lov, you dont know of any, or your sure they are non? Mar 12 17:11:08 birbeck: no, by LucasArts Mar 12 17:11:14 heh Mar 12 17:11:29 gggggg Mar 12 17:11:54 Can I use an android virtual device from the android sdk to test a website in mobile? Mar 12 17:12:00 sure Mar 12 17:12:01 yes Mar 12 17:12:01 https://play.google.com/store/apps/details?id=com.zendesk.android&feature=search_result Mar 12 17:12:22 you can even use webdriver in android to run tests on your mobile site Mar 12 17:13:54 lov, autoscaling text is really really tricky Mar 12 17:14:11 But I've done it. Mar 12 17:14:45 i use AutoResizeTextView by Chase Colburn Mar 12 17:14:51 It ends up being iterative because you can't predict the exact px a font will render with (width). Mar 12 17:14:59 works perfect with no hassle Mar 12 17:15:12 The process is straightforward though, probably very similar to mine Mar 12 17:15:32 render text in offscreen buffer -> check pixels -> render onscreen? Mar 12 17:15:39 i am on a windows 64 bit, i have the android sdk installed and am using the virtual device manager, any chance on a link for webdriver setup? Mar 12 17:15:40 yeah Mar 12 17:16:16 MDijkstra: obviously not something you want to wrap around all of your text views :) Mar 12 17:16:19 MDijkstra, more or less... measureText does that for you Mar 12 17:16:29 but it works great for the two places i have needed it Mar 12 17:17:15 birbeck: you could probably prove it terminates in at most n iterations Mar 12 17:17:38 somehow euclid's algorithm springs to mind Mar 12 17:18:20 yeah, Log(n) if you do a binary search, and stick to whole 'sp' sizes Mar 12 17:18:40 N being the range of min->max allowed text size Mar 12 17:18:44 glook: a what now? Mar 12 17:18:57 webdriver? Mar 12 17:19:03 but the tricky thing is, it's not always linear Mar 12 17:19:13 damn you font hinting Mar 12 17:19:17 MDijkstra the guru of the Android can you please help me out? Mar 12 17:19:24 I am? ;p Mar 12 17:19:40 Dijkstra is a networking algo guru Mar 12 17:19:48 MDijkstra yuo solved another problem for me before :) Mar 12 17:20:00 oh, but I've never worked with the contacts provider Mar 12 17:20:01 network path cost? Mar 12 17:20:07 yup Mar 12 17:20:08 dijkstra's algoritm Mar 12 17:20:20 shortest path * Mar 12 17:20:36 Sink trees 'n shit Mar 12 17:20:48 MDijkstra: i havent looked into how it works all that closely, ive never noticed any slow down using it, but i would be cautious to over use it. it has worked great for what i needed, so i just set it and forget it Mar 12 17:20:55 MDijkstra might not have been the smartest IRC nick choice ;) Mar 12 17:21:03 MDijkstra ok, what a pitty :/ i have stupififed my code somwhere and dont know how to get out of the stupidityswamp Mar 12 17:21:21 stupidified* Mar 12 17:23:11 My tummy is calling for food. If anyone gets a idea how to solve my mystery feel free to PM me Mar 12 17:23:44 maven is giving me nothing but problems this morning Mar 12 17:25:19 lov, thanks. i would like to use a mobile emulator, other than opera mobile emulator, for viewing a website on an android device Mar 12 17:25:51 I have set up the android sdk, and have two devices in my vdm, but I am new and don't know what should happen after i start the device so that I can get to a browser Mar 12 17:26:18 glook: the emulators take a while to start Mar 12 17:26:22 okay Mar 12 17:26:27 make sure you check off snapshot so that next time it saves the state Mar 12 17:26:33 (when you start it) Mar 12 17:26:35 maybe i am not waiting long enough. thank you. oh good okay Mar 12 17:26:36 cool Mar 12 17:28:18 Hey guys, if I want a static background, and implement it as a tiled image with a background color and a gradient. Does that mean it draws to the screen 3 times? Will Android be smart about it and cache the combined image and only draw it once? Mar 12 17:32:05 glook: yeah, wait for the emulator to boot. You'll eventually boot to the lock screen. Mar 12 17:32:14 glook: the emulators are fully featured line for line android devices; they're not simulators Mar 12 17:32:19 so you can install apps on them, etc Mar 12 17:32:34 im so sick of hearing about android os version fragmentation Mar 12 17:32:48 but i am also sick of my ns4g not being updated to the latest Mar 12 17:35:30 does anyone actually run into as much fragmentation issues as the blogs would have you believe? I certainly don't. Mar 12 17:35:56 well, uptake of a new version is very slow Mar 12 17:36:16 ok but is that really a problem? Mar 12 17:36:21 it's still improssible to target 4.0 on phones for non-optional features Mar 12 17:36:25 *possible Mar 12 17:36:37 "fragmentation" tends to be a misnomer Mar 12 17:36:43 jayd16: in userspace apps, not really Mar 12 17:36:48 the biggest problem isn't "fragmentation" its "oem fuckups" Mar 12 17:36:49 not if you code it right Mar 12 17:36:59 WHOOPS, GALAXY S DECIDES YOU CAN NEVER SAVE TO APP PRIVATE STORAGE AGAIN Mar 12 17:37:02 YAAAAAAY Mar 12 17:37:04 lov: yes, but it's all the same really Mar 12 17:37:09 canadiancow|work: not at all Mar 12 17:37:12 yeah, I use FTS3 in this app Mar 12 17:37:17 from a developer persepctive? Mar 12 17:37:18 and some phones just don't have FTS3 Mar 12 17:37:18 yes it Mar 12 17:37:20 wtf Mar 12 17:37:24 i dont even know what you eman Mar 12 17:37:24 "fragmentation" is the idea that you have all sorts of different configurations and resolutions and you just have to handle them Mar 12 17:37:33 oh Mar 12 17:37:36 "oem fuckups" is "the oem introduced bugs into the framework that you have to special case phone by phone" Mar 12 17:37:37 i dont call that fragmentation Mar 12 17:37:48 i see fragmentation as oem's fucking stuff up Mar 12 17:37:48 well, different configurations meaning different api levels too Mar 12 17:37:52 yeah Mar 12 17:37:56 I just call a spade a spade there Mar 12 17:37:56 the difference if the changes are intentional Mar 12 17:38:01 it's not the OS's fault if the OEMs are fucking idiots Mar 12 17:38:10 not at a technical level Mar 12 17:38:13 but the licensing could be more strict Mar 12 17:38:13 or due to bugs or other unintended problems Mar 12 17:38:18 doubtful Mar 12 17:38:24 I mean I'd love it to be Mar 12 17:38:34 I'd love google to say "fuck it, you're out. no more prerelease android for you, you suck too hard" Mar 12 17:38:41 but with the oems it's a game of who sucks the least hard Mar 12 17:38:44 meh, this problem will be resolved in a couple of years Mar 12 17:38:44 the fact remains that as long as oems CAN fuck it up, there is going to be bad 'fragmentation' Mar 12 17:38:47 not who is the best Mar 12 17:38:55 when android is mature enough that it doesn't matter if you're a major version behind Mar 12 17:39:04 and as long as google doesnt control updates (the same way MS does for desktop windows), there will be issues Mar 12 17:39:04 er Mar 12 17:39:16 MDijkstra: I'd say we're already at the point where it's ok if you're a version (or two!) behind Mar 12 17:39:22 ICS came out, but half the market is still on froyo or so Mar 12 17:39:29 canadiancow|work: solution: tell USERS. Mar 12 17:39:29 no way people are going to cut froyo support Mar 12 17:39:40 lov: yeah, but it's still kind of a pain to deal with froyo given that ICS exists Mar 12 17:39:45 what makes android look really bad in the press is that android 4.0 has been out for 6 months, and most phones run android 2.x Mar 12 17:39:53 birbeck: this Mar 12 17:39:53 there are best practices that mitigate the potential problems pretty well Mar 12 17:39:57 however, there is only one phone release between 2.3 and 4.0 Mar 12 17:40:00 MDijkstra: I'm not really sure what you're suggesting here. Mar 12 17:40:33 what dealing is there? a few if's? Mar 12 17:40:36 if that Mar 12 17:40:37 lov: that froyo as a base target isn't so great Mar 12 17:40:41 besides "oooh shiny" what major differences exist in ics? Mar 12 17:40:46 the press is all flame bait anyway... Mar 12 17:41:02 MDijkstra: why are you targeting froyo? Mar 12 17:41:02 mikedg: loaders, the more advanced actionbar stuff spring to mind Mar 12 17:41:28 mikedg: I'm actually targeting 1.6, but I could target froyo if I wanted Mar 12 17:41:32 I meant 13:40:19 < MDijkstra> there are best practices that mitigate the potential problems pretty well Mar 12 17:41:46 I'd honestly like to know what you see happening that would cut down on backwards compat issues Mar 12 17:41:54 arent loaders in the compatability packages? Mar 12 17:41:55 hello! Mar 12 17:41:55 but which wouldn't prevent new and interesting apis from being introduced Mar 12 17:42:02 oh, nice Mar 12 17:42:07 you guys are on the ball this week Mar 12 17:42:14 oh hi evancharlton Mar 12 17:42:16 lov: that the changes introduced between the widely deployed version and the new shiny version become smaller Mar 12 17:42:17 HELP HOW DO I COMPUTER Mar 12 17:42:22 getting the weekly fragmentation scarefest out of the way on monday morning Mar 12 17:42:32 now we can focus on actual issues for the rest of the week Mar 12 17:42:36 its afternoon Mar 12 17:42:36 has a non-free android phone any disadvantages for developing? Mar 12 17:42:37 MDijkstra: .... right, so what you're asking is that LESS interesting things be done. Mar 12 17:42:38 East Sidde Mar 12 17:42:48 canadiancow|work: "Your version of Android is out-of-date. However, your device manufacturer or carrier has not released an update. If you want to update to the new version, which improves $FOO and adds $BAR, tap here to contact your carrier." Mar 12 17:42:58 consumer pressure works. Mar 12 17:42:59 Bundestrojaner: it depends on what you mean by non-free. Any android phone should be acceptable for testing. Rooted phones will let you do more interesting things. Mar 12 17:43:02 lov: that's a natural consequence of a development cycle Mar 12 17:43:06 XMPPwocky: hahaha good luck with TAHT. Mar 12 17:43:12 how many android users even know what ICS is Mar 12 17:43:16 lov: that the changes will become less dramatic as time goes on Mar 12 17:43:17 16 Mar 12 17:43:20 I asked around, XMPPwocky Mar 12 17:43:22 XMPPwocky: google isn't going to go nuclear on their partners. Mar 12 17:43:28 "Your device is no longer supported, click here to buy the new shiny" stubborness works people Mar 12 17:43:32 that kind of shit will make them all scramble to figure out how to make Bada work or something Mar 12 17:43:42 [13:42:48] canadiancow|work: "Your version of Android is out-of-date. However, your device manufacturer or carrier has not released an update. If you want to update to the new version, which improves $FOO and adds $BAR, tap here to contact your carrier." Mar 12 17:43:48 lov: I mean, I don't expect google to significantly change the UI in the next 4 releases, at least Mar 12 17:43:49 especially since the carriers all control what devices ship and what firmware is on it Mar 12 17:43:50 lov: so when i buy it on amazon without contract, i have root acces, and with contract not? Mar 12 17:43:50 thats just going to get us 1star ratings Mar 12 17:43:57 Bundestrojaner: no Mar 12 17:43:58 canadiancow|work: not in the app Mar 12 17:44:03 in Android itself Mar 12 17:44:03 Bundestrojaner: the phone will be the same regardless of your contract :P Mar 12 17:44:08 oh Mar 12 17:44:09 *basic UI metaphors Mar 12 17:44:10 no Mar 12 17:44:13 how would that work? Mar 12 17:44:16 Bundestrojaner: most phones can be rooted, anyway. Mar 12 17:44:16 the oem would just remove that code Mar 12 17:44:20 ^^ Mar 12 17:44:28 XMPPwocky: that sounds exactly like the email i had to send to 100,000 amazon customers this week Mar 12 17:44:48 "customers" cause 7/8 are from app of the day Mar 12 17:45:03 lov: I mean, if I don't have some fancy library google added in android 9.0, that's fine Mar 12 17:45:18 but I don't want to have to use compatibility libraries for the basic stuff Mar 12 17:45:19 been over a week since my last update was published to the play store (still market at the time) and no update on amazon yet Mar 12 17:45:23 o_O Mar 12 17:45:35 so how do you suggest handling the fragments api? Mar 12 17:45:37 MDijkstra: so you justwant to bitch and moan Mar 12 17:45:41 what would have been YOUR solution? Mar 12 17:45:44 I'm serious Mar 12 17:45:50 what is the best way to create a fling effect in a custom view (drawing on the canvas)?Use animator or timer?What about the velocity management(is there an interpolator for this? Mar 12 17:45:50 no fragments until 3.0 is the most recent version! Mar 12 17:46:01 all I'm seeing is: development is hard :'( Mar 12 17:46:03 i'd also really fucking love to see backwards compatibility libraries from Google Mar 12 17:46:05 thegrinch1: probably an animator Mar 12 17:46:07 mikedg: oh come on, that's not what I suggested at all, not using fragments Mar 12 17:46:08 thegrinch1: no time for serious questions, theres bitching to be squashed sorry Mar 12 17:46:09 *snrk* Mar 12 17:46:12 Hey XMPPwocky Mar 12 17:46:23 Hello, i have an issue with cursors. I have been able to collect data in a cursor. But i want to store individual column data of a single row into a string array. Mar 12 17:46:23 you realize that the apis are actually backwards compatible, and that there's an official compatibility library Mar 12 17:46:26 pretty much everything that isn't fragments is deprecated Mar 12 17:46:26 right? Mar 12 17:46:28 mikedg: I wasn't bitching at all, I was simply saying these problems will eventually go away Mar 12 17:46:29 I mean, seriously? Mar 12 17:46:31 that's all Mar 12 17:46:35 which is a good method to do that ?can anyone help? Mar 12 17:46:42 the problems will all go away once android is abandoned Mar 12 17:46:49 lov: though abs is nice, i wish it was integrated in the offical compat lib Mar 12 17:46:51 we'll have to stop thinking about the future Mar 12 17:46:55 *being more widely used Mar 12 17:46:55 birbeck: tru dat Mar 12 17:46:58 windows mobile 6.5 is in its prime right now Mar 12 17:47:00 lov: cause it doesnt have stuff like share action providers Mar 12 17:47:15 and a few notable issues with different platform versions Mar 12 17:47:29 mikedg: again, your words, not mine Mar 12 17:47:45 google says use actionbar, dont use menus, but provide no means to for older apps Mar 12 17:47:54 yes and ill make you talk like a puppet Mar 12 17:47:58 until you start making sense Mar 12 17:48:04 birbeck: the api levels config stuff works wonders Mar 12 17:48:10 res/layout, res/layout-v11 Mar 12 17:48:11 birbeck: you have a funny definition for "no means" Mar 12 17:48:15 birbeck: if you cant make an action bar in old apps you are a twit Mar 12 17:48:17 similarly, res/menu, res/menu-v11 Mar 12 17:48:21 theres been action bars for years Mar 12 17:48:24 even before honeycomb Mar 12 17:48:28 it's a ui pattern Mar 12 17:48:38 mikedg: what's so nonsensical about "because android development is becoming more evolutionary than revolutionary, the fragmentation issues will largely dissapear in time' Mar 12 17:48:41 that just coincidentally has some useful helpers now Mar 12 17:48:54 MDijkstra: it doesn't matter what you are saying, im not listening Mar 12 17:48:55 mikedg: before abs i was using the action bar design pattern in my apps Mar 12 17:49:00 please do not directly address me Mar 12 17:49:05 birbeck: ok, so the problem is? Mar 12 17:49:15 lol Mar 12 17:49:17 nice one Mar 12 17:49:21 #android-dev is angry Mar 12 17:49:22 that is should be in the official compat lib Mar 12 17:49:24 angry about fragments Mar 12 17:49:28 raaar raaar raar Mar 12 17:50:15 if they want developers using action bar, but also want developers to support versions prior to 4.0 Mar 12 17:51:07 fragments, loaders, viewpagers, etc are great, but only half the solution Mar 12 17:51:47 yeah, actionbarcompat should be official Mar 12 17:52:07 why isn't it, anyway? Mar 12 17:52:46 its on their site, but their recommendation is roll your own Mar 12 17:52:55 imo it should be a link to abs. Mar 12 17:53:19 that would be great if they helped to maintain it Mar 12 17:53:19 yeah, I'm using it in a couple of projects, was just wondering why they never included it in the compatibility lib Mar 12 17:53:27 jake has done a great job on it though Mar 12 17:53:47 yeah, it's very nice Mar 12 17:53:57 and of you pros have any experiance locating cause for error when the crash happens inside the android framework ? Mar 12 17:54:09 fanno: check logcat Mar 12 17:54:11 fanno: debugger Mar 12 17:54:30 fanno: usually the exception message provides some clue as to what's wrong Mar 12 17:54:44 errors inside the framework suck, but usually caused by some problem code, you gotta step through and find out what is causing the error Mar 12 17:56:00 http://pastebin.com/FwsFZbwS Mar 12 17:56:06 i was just about to past that =) Mar 12 17:57:15 either get a debugger, or look at PhoneWindow.java and check which pointer is null Mar 12 17:57:17 i can't recreate the issue, it happens on a client device an it is automatic reported to me Mar 12 17:57:33 could be that it's trying to deliver an event to a delegate of some kind Mar 12 17:57:37 but you passed null Mar 12 17:59:00 i tied looking at PhoneWindow.java for all the versions i could find =P i don't see anything with DecorView.dispatchKeyEvent on that line. Mar 12 17:59:33 which version are you running? Mar 12 18:00:30 MDijkstra: minimum version ? Mar 12 18:00:46 no, which version of android are you testing the app on? Mar 12 18:01:13 MD 1.5 and 2.2 Mar 12 18:01:28 so, on which version does it crash? Mar 12 18:01:34 but like i said i cant recreate it it has automatic been reported to me Mar 12 18:01:42 ahhh Mar 12 18:01:47 sorry, missed that Mar 12 18:01:56 Android Version:2.2.1 Mar 12 18:02:23 it has also happen on a 2.3 i think it was Mar 12 18:06:42 i look on http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3_r1/com/android/internal/policy/impl/PhoneWindow.java and down. i assume that is what i would need to do to locate potentual error. Mar 12 18:07:08 well, if the stacktrace you just posted was from 2.2.1 Mar 12 18:07:18 the line offsets are going to be off Mar 12 18:08:29 but i dont find any files where PhoneWindow.java:1778 is inside "DecorView.dispatchKeyEvent" function. Mar 12 18:08:51 MDijkstra: yes i know that, i look from 2.3 ----> 1.5 no line number match Mar 12 18:09:36 wyvern`, you never got back to me last week, did it work or did you give up? Mar 12 18:13:23 Doesn't default propertie scope (package) kind of break OOP practices? Mar 12 18:14:12 code1, lots of stuff breaks oop Mar 12 18:14:31 code1, package scoping doesn't necessarily break oop Mar 12 18:14:45 it just breaks from common access-control modifiers Mar 12 18:15:24 So what's standard practice? To make properties private by default or leave out for package scope? Mar 12 18:15:40 make everything the strictest you can until you need otherwise Mar 12 18:15:53 i.e. private Mar 12 18:15:57 Yeah that's what I thought :) Mar 12 18:16:11 And then modify on as-needed basis Mar 12 18:16:24 Hi Mar 12 18:16:25 it is possible to recognize my device(android) usb connection as joystick Mar 12 18:16:27 ? Mar 12 18:16:50 MDijkstra: this is if i assume correct should be the correct version. http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2.1_r1/com/android/internal/policy/impl/PhoneWindow.java/#1778 it is inside the DecorView class but not the dispatchKeyEvent function. =( Mar 12 18:17:00 pfn: do you generally organise src into packages based on functionality? Mar 12 18:17:05 jalmeida: depends on the device, I think there's a demo of someone controlling a game with a gamepad Mar 12 18:17:22 code1, depends, but yeah, generally Mar 12 18:17:37 i.e. com.example.foo for things like FooActivity, FooService etc. Mar 12 18:17:47 jalmeida: oh, and android version, of course Mar 12 18:17:59 and com.example.bar for things like BarActivity, BarService etc. Mar 12 18:18:02 code1, not so much Mar 12 18:18:04 jalmeida: but if it supports USB Host mode, then I guess joysticks/gamepads should also work Mar 12 18:18:16 jalmeida: as long as they're USB HID devices Mar 12 18:18:21 code1, usually create packages for general grouping of functionality, and not quite so fine-grained Mar 12 18:18:36 code1, e.g. consider how java and android have organized their packages Mar 12 18:19:12 I'm coming back to Java after a long break (before packages and package scope properties!) Mar 12 18:19:14 USB Host mode fine. it works to windows and linux games? Mar 12 18:19:21 before? Mar 12 18:19:26 so it's kind of new to me! Mar 12 18:19:29 java has had package-private since its inception Mar 12 18:19:44 since at least 0.9beta Mar 12 18:20:12 really? we didn't learn about them then! :/ Mar 12 18:20:21 MDijkstra: android version is 2.3 Mar 12 18:20:28 package private bugs me :) Mar 12 18:20:33 i wish i could have package hierarchy private Mar 12 18:20:36 so very badly i want that Mar 12 18:20:42 you do get that in scala Mar 12 18:20:44 jalmeida: right, could be that the specific rom has a different offset Mar 12 18:20:52 (that is, descendent-package-private) Mar 12 18:21:02 what do you mean by package package private? Mar 12 18:21:03 descended private package Mar 12 18:21:12 whats the best way to pack a bunch of audio files around 10-15 in an app? where it wont be huge apk filesize Mar 12 18:21:15 does anyone else not see it Mar 12 18:21:19 jalmeida: gets quite difficult to figure it out, then Mar 12 18:21:37 hkhalid, compress the audio files, stream them from a server, download on-demand Mar 12 18:21:40 etcd. Mar 12 18:21:45 pfn this is for pakistan Mar 12 18:21:53 where they have bad connection via cell Mar 12 18:22:05 needs to be packed, where they can download when on wifi and then go about themselves Mar 12 18:22:12 steaming over edge sucks ass Mar 12 18:22:27 so compress it down to 8kbps Mar 12 18:23:05 hkhalid: just use HTTP? Mar 12 18:23:10 download an archive, unzip it? Mar 12 18:23:33 over wifi, that is Mar 12 18:24:37 pfn: when you say general grouping of functionality to you mean put all Activities in one package etc? Mar 12 18:24:49 service in another... Mar 12 18:24:51 Is anyone can help me on this question? https://groups.google.com/group/actionbarsherlock/browse_thread/thread/e284fd2b0841d0ef Mar 12 18:24:59 code1: it depends on which you find most convenient Mar 12 18:25:26 MDijkstra what do you mean just use http? they have edge! it will still be slow, they want to play via the app not unload and unpack, they will be clueless and that sucks as user experience just to play songs Mar 12 18:25:31 MDijkstra: and to playstation3 , It is possible use the android controller to this device ? Mar 12 18:25:38 pfn you are peaking about lowering the quality? Mar 12 18:25:39 jalmeida: no clue Mar 12 18:25:48 hkhalid: you just said they could preload with wifi... Mar 12 18:26:07 hkhalid: hkhalid> needs to be packed, where they can download when on wifi and Mar 12 18:26:18 so download when they're on wifi Mar 12 18:26:22 how hard is that to implement? Mar 12 18:26:23 not hard Mar 12 18:26:24 :p Mar 12 18:27:08 MDijkstra: right, I think the example (Foo & Bar) I gave earlier makes most sense to me, just wondering if there was anything wrong with that way of doing it. Mar 12 18:27:10 MDijkstra meaning they will donwload it once when they are wifi with good connection and not have to worry aobut it after leaving the wifi connection Mar 12 18:27:42 code1: I usually don't make stuff package private anyway Mar 12 18:28:39 MDijkstra: you mean you leave out the scope modifiers? Mar 12 18:28:48 no, I always provide them Mar 12 18:28:54 i dont like java's protected modifier Mar 12 18:28:57 code1, it's needlessly nested if you put activity/unit-of-work-per-package Mar 12 18:29:01 i want subclasses to access it, but not siblings Mar 12 18:29:17 protected is a slightly more relaxed package-private Mar 12 18:29:27 canadiancow|work, simple answer, move it into another package Mar 12 18:29:30 restricting a download to wifi-only is stupid and will cause many people to not install it Mar 12 18:29:45 pfn, i dont like it Mar 12 18:29:55 hkhalid: yes, so what's the actual problem you're trying to solve? Mar 12 18:30:07 JulienDev: i responded to your thread with an answer Mar 12 18:30:27 if I want to use my mobile connection to download large files, that's my and my data plan's choice. Mar 12 18:30:53 readme: Yes, just received it. Thank you. I'll let you know if I have some problems Mar 12 18:31:26 pfn: could you explain what you mean by needlessly nested? Mar 12 18:31:38 code1, too many directories, too many imports Mar 12 18:31:56 i see Mar 12 18:32:25 So you have few / no nested packages? Mar 12 18:32:37 only where it's logical to group Mar 12 18:32:51 and so you avoid too many imports Mar 12 18:33:16 if I want to save an arraylist of a custom object, what method do I use in onSaveInstanceState(Bundle outState)? outState.putSerializable() ? Mar 12 18:33:35 canadiancow|work: what's wrong with protected? Mar 12 18:33:55 code1: i want to allow subclasses to access it, but not other classes within the package Mar 12 18:34:27 canadiancow|work: I'd also suggest protected :P Mar 12 18:34:43 So protected allows other classes to access it? Mar 12 18:34:44 protected allows othe classes within the package to access it... Mar 12 18:34:49 in the same package i mean? Mar 12 18:34:50 DammitJim: you just need to make it Parcelable for the objects Mar 12 18:34:52 yes code1 Mar 12 18:35:06 DammitJim: then there's a function for including an ArrayList Mar 12 18:35:12 of Parcelable objects Mar 12 18:35:26 @canadiancow only if they are subclassed. Mar 12 18:35:31 ? Mar 12 18:35:32 Hmm, that's not very good design! What;'s the solution? Mar 12 18:35:39 sounds about right because that's what Logcat is saying.. that it couldn't parcel it or something Mar 12 18:36:19 class com.example.A { protected Object x; } class com.example.B { private void doSomething() { new A().x = "o hai protected field!"; } Mar 12 18:36:24 so, my arraylist needs to implement Parcelable? Mar 12 18:36:31 no Mar 12 18:36:31 dammit Mar 12 18:36:35 the object it contains does Mar 12 18:36:44 DammitJim: what readme said Mar 12 18:38:59 canadiancow|work: Is that by design? Doesn't sound right to me! Mar 12 18:39:11 it is by design Mar 12 18:39:17 http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html Mar 12 18:39:30 package-private is more accessible than private Mar 12 18:39:36 protected is more accessible than package-private Mar 12 18:39:48 public is more accessible than protected Mar 12 18:40:05 i think in C# you have private, protected, internal, protected internal (!!!), public Mar 12 18:40:09 somethin glike that Mar 12 18:40:10 ok, so that means I have to fill in the writeToParcel method in my custom object with all the properties of the object, right? (also readFromParcel)? Mar 12 18:40:15 so you can get hte "subclass, but not sibling" Mar 12 18:41:06 man, scary, you have to make sure when you write to parcel, that the stuff is in the order you are going to read it Mar 12 18:41:46 DammitJim: yeah, it's a PITA Mar 12 18:41:46 canadiancow|work: Looking at that table, they are definitely short one modifier. Mar 12 18:45:09 How would i make a Coin Flip game? Mar 12 18:45:23 tomtiger11: generate a random number (0 or 1) Mar 12 18:45:28 You get a coin Mar 12 18:45:43 use a bitcoin! it flips easily Mar 12 18:45:47 herriojr, putParcelableArrayList() ? Mar 12 18:46:14 readme: How do i do that, then, how do i get a picture to show up with heads or tails? Mar 12 18:46:26 tomtiger11: you can use two pictures Mar 12 18:46:33 tomtiger11: but what i'd do Mar 12 18:46:37 is use a 3d model of a coin Mar 12 18:46:40 you can make one in blender Mar 12 18:46:57 Dont know how to use blender Mar 12 18:47:07 so learn :) Mar 12 18:47:08 and then use hand gestures to "flip" the coin Mar 12 18:47:22 if you want your coin flip app to stand out, it's going to have to shine Mar 12 18:47:27 better make it 3d Mar 12 18:47:36 I call heads. Mar 12 18:47:49 code1: You lose Mar 12 18:48:01 SimonVT: best of three ;) Mar 12 18:48:14 anyone who agrees to use a coin flip app to settle the score is pretty ignorant, though Mar 12 18:48:17 tss Mar 12 18:48:19 considering how easy it would be to fake Mar 12 18:48:37 readme: just flip the phone Mar 12 18:48:39 i'd just flip my phone; screen is heads Mar 12 18:48:43 code1: i was thinking the same :) Mar 12 18:49:15 shlumph: wouldn't want it to land tails then! ;) Mar 12 18:50:21 readme: Awesome ! I also had to set @style/Widget.EatWatch.Default.ActionBar.TabView Mar 12 18:51:17 JulienDev: cool, now refactor my name :) Mar 12 18:51:30 yes ;) Mar 12 18:56:27 How do i change the background of my app? Mar 12 18:56:35 not in xml Mar 12 18:57:33 in yaml? Mar 12 18:58:52 In the application code Mar 12 18:59:06 *Activity.java Mar 12 19:01:05 Hello? Mar 12 19:03:43 -.- Mar 12 19:03:49 z Mar 12 19:03:53 hey evrbody, i wonder if anyone knows any breadcrumb navigation component for android ?> Mar 12 19:04:05 hmm, weird. i have a BaseAdapter that returns 8 on getCount(), but is only called with position == 0 and ==1 Mar 12 19:05:29 tomtiger11: Get a reference to the View (findViewById) and call .setBackgroundX method on it. Mar 12 19:05:53 Hello! Quick question from a total newbie: Does the android emulator (of the SDK) have a "portable" edition? If not, can you run it without admin priviledges on a Windows machine? Finally, are there any other emulators available? Mar 12 19:05:56 tapas: that's the lazy loading at work Mar 12 19:06:27 code1: Not setBackgroundColor() Mar 12 19:06:44 FDFlock, the emulator isno an installed app, it's effectively portable Mar 12 19:07:21 tomtiger11: replace the X with Color, Drawable, Resource as required. Mar 12 19:08:02 MDijkstra: oh i see.. all items should be visible though.. the screen is empty. i wonder if some exception is masked somewhere Mar 12 19:08:32 Whats the . for? Mar 12 19:09:11 pfn: Thanks, that's great. Is that true for the whole SDK? Total size of emulator/SDK? (please excuse my ignorance) Mar 12 19:09:12 tomtiger11: . is used to access elements and methods of an object or class Mar 12 19:09:23 * FDFlock is actually a Linux user, but might have to install it on Windows (it's not really for himself) Mar 12 19:09:41 FDFlock, yes true of the whole sdk Mar 12 19:09:44 tomtiger11: he is implying you should call setBackgroundColor() on a View Mar 12 19:09:48 thats what the . was for Mar 12 19:09:58 dunno how big, a gig maybe Mar 12 19:10:04 FDFlock: yeah the sdk is just a zip archive - extract and run :) Mar 12 19:10:11 What are the colors i can use then (in the () Mar 12 19:10:16 ouch, not that much space... Mar 12 19:10:18 brb Mar 12 19:10:31 pfn: depends on what you need Mar 12 19:10:53 pfn, code1 : Thanks for your very helpful answers! Mar 12 19:11:24 back Mar 12 19:11:33 np, actually pfn is right it's going to be close to a gig Mar 12 19:11:40 readme: What colors can i ue then? Mar 12 19:12:27 tomtiger11: Stuff like red, green, blue and any combination of the three Mar 12 19:12:42 700mb+ depending on how many API's you want to download Mar 12 19:13:12 has anyone seen the problem on ICS where notification icons dont show properly? Mar 12 19:13:53 mine show huge or something Mar 12 19:14:18 SimonVT: What do i put inbetween the () then? Mar 12 19:14:30 yea pfn Mar 12 19:14:32 http://developer.android.com/reference/android/view/View.html#setBackgroundColor(int) Mar 12 19:14:38 any idea why or how to fix? Mar 12 19:14:42 heard of hex color codes? Mar 12 19:14:45 im just starting to look into it, but i thought id come here first Mar 12 19:15:07 canadiancow|work, not offhand make them bigger or smaller maybe heh Mar 12 19:15:28 SimonVT: I meant what is the hax value for, lets say yellow Mar 12 19:15:36 Google that shit Mar 12 19:15:39 Okay, so maybe someone can help me. I am writing an android application which has a service, and then the service creates another thread to deal with an XMPP connection. I have figured out sending messages from the main service thread to the XMPP thread, but how the hell do I get any kind of data back either from the XMPP thread to the service thread, or from the XMPP thread to the original activity? Mar 12 19:16:05 At the moment I am using Looper/Handler to get info from the service thread to the XMPP thread Mar 12 19:16:25 * neilalexander scratches head Mar 12 19:16:34 SimonVT: The hex value will be different to the one needed Mar 12 19:16:36 neilalexander: with a callback function, or with an Intent Mar 12 19:16:37 Use a handler to post it back Mar 12 19:17:05 SimonVT: like setBackGroundColor(0x(Whatever)) Mar 12 19:17:11 neilalexander, handler is correct Mar 12 19:17:17 I dont know the 'Whatever' bit Mar 12 19:17:35 What I don't really understand is how if I create a handler in the main service thread or the UI thread, how I then give that to the XMPP thread to send messages back to Mar 12 19:17:37 neilalexander, create a handler against the main looper Mar 12 19:17:55 looper. get main looper Mar 12 19:18:12 tomtiger11: 0xAARRGGBB, A = alpha, R = red, etc Mar 12 19:18:22 readme: Do you know why there is no padding on the last tap? http://dl.dropbox.com/u/23108587/device-2012-03-12-201621.png Mar 12 19:18:31 pfn: Can I do that from within a worker thread? Mar 12 19:18:42 yes Mar 12 19:19:10 Hm :( Mar 12 19:19:22 SimonVT: Can you give me what id need for yellow and red? Mar 12 19:19:35 tomtiger11: No. Stop being lazy and investigate a bit yourself Mar 12 19:19:49 SimonVT: Your awfully kind... Mar 12 19:19:50 pfn: I see the getMainLooper() function inside the service thread, but from my XMPP worker thread I do not see anything like that. Am I going about this wrong? Mar 12 19:19:53 I know Mar 12 19:20:05 neilalexander: Just pass the handler to the worker thread? Mar 12 19:20:16 SimonVT: Is it that easy? :O Mar 12 19:20:28 The handler is attached to the thread it's instantiated on Mar 12 19:20:31 neilalexander: also, each android component does not have its own thread Mar 12 19:20:32 So yeah, it's that easy Mar 12 19:20:36 but that shouldn't be relevant here Mar 12 19:20:38 just saying Mar 12 19:20:54 Well, I shall give it a try and see what I can come up with. Thanks pfn, SimonVT Mar 12 19:21:12 neilalexander, get main looper is static om looper Mar 12 19:21:26 hi guys :) are files in getExternalFilesDir visible in a FileManager? Mar 12 19:21:31 pfn: Oh, well that makes things even easier. Thanks! Mar 12 19:21:42 faenil: yes Mar 12 19:21:51 SimonVT: - The method setBackgroundColor(int) is undefined for the type Mar 12 19:22:01 SimonVT, so they can also copy files inside that directory and/or delete files? Mar 12 19:22:07 yes Mar 12 19:22:32 faenil: yes, see the docs: Mar 12 19:22:34 SimonVT: So, do you know whats wrong with my code then? Mar 12 19:22:39 "There is no security enforced with these files. All applications can read and write files placed here." Mar 12 19:22:43 JulienDev: not sure, maybe the font size? Mar 12 19:23:07 readme: - The method setBackgroundColor(int) is undefined for the type - You know how to fix that? Mar 12 19:23:10 JulienDev: try taking some letters out and see if it corrects itself Mar 12 19:23:10 MDijkstra, I've read the docs on that API call :) Mar 12 19:23:20 tomtiger11: yeah, call the method on a type that has that method Mar 12 19:23:25 tomtiger11: show whole line of code. Mar 12 19:23:48 readme: Yes, when I remove some letters, like Messager. everything is fine. Really weird Mar 12 19:23:55 pfn: Something like mainHandler = new Handler(Looper.getMainLooper());? And then just like I've done up until now with sending Messages? Mar 12 19:23:56 readme: public void red (View view) { Mar 12 19:23:56 setBackgroundColor(Color.RED); Mar 12 19:23:56 Toast.makeText(null, "RED CARD!!!", 10) Mar 12 19:24:02 ;* Mar 12 19:24:11 neilalexander, yes Mar 12 19:24:15 pfn: Perfect. Thanks for the guidance Mar 12 19:24:43 tomtiger11: change to: view.setBackgroundColor(Color.RED); Mar 12 19:24:45 faenil: but generally most people will also be able to read/write files in the internal storage Mar 12 19:24:47 readme: Maybe Android wants every tabs with the same width when on a static tabbar Mar 12 19:24:54 MDijkstra, and this sentence isn't particularly clear to me :D "These files are private to the applications, and not typically visible to the user as media" Mar 12 19:24:56 hmm and the adapter gets called twice for position == 0, but not for the remaining 8 positions Mar 12 19:25:00 very very weird.. Mar 12 19:25:02 faenil: the barrier to rooting your device isn't very big Mar 12 19:25:06 MDijkstra, you mean people with rooted device? Mar 12 19:25:15 faenil: yeah Mar 12 19:25:23 faenil: maybe they mean i Mar 12 19:25:28 MDijkstra, I actually want to let the user put files inside my folder, because it's a 3d model viewer Mar 12 19:25:30 *not visible to the user on device Mar 12 19:25:36 but certainly visible from a file manager Mar 12 19:25:46 I meant a file manager on the device Mar 12 19:25:54 JulienDev yeah, I think so as well Mar 12 19:25:57 Hi! What am I doing wrong about the ligcc thingie ? http://paste.kde.org/438260/ Mar 12 19:26:03 readme: You see whats wrong with it? Mar 12 19:26:08 has anyone seen (or know how to fix) the problem on ICS where notification icons dont show properly (too big) - slightly diff behaviour on phones than tablets? Mar 12 19:26:08 faenil: I did as well Mar 12 19:26:21 faenil: but why not simply let the user open files with an existing file manager Mar 12 19:26:24 and open them in your app? Mar 12 19:26:30 readme: Anyway thank you again. Messager. wiil make the job ;) Mar 12 19:26:38 faenil: what kind of model viewer, btw? Mar 12 19:26:48 biological, by any chance? Mar 12 19:26:51 MDijkstra, it's not possible atm ;) the file manager in the app is restricted to one folder atm :) Mar 12 19:27:06 readme: What is toast 'Context' Mar 12 19:27:12 tomtiger11: i didn't see your code Mar 12 19:27:15 tomtiger11: did you pastebin it? Mar 12 19:27:55 readme: Followed your view.* thingy, but what is Toast 'Contect' Mar 12 19:28:00 faenil: no, I mean android supports registering your application as a viewer for model files Mar 12 19:28:12 faenil: so if they open a file from any application it'll ask to open your app Mar 12 19:28:12 MDijkstra, STL, OFF, OBJ, PLY, Mar 12 19:28:15 tomtiger11: Activity, Service, etc extend Context Mar 12 19:28:21 MDijkstra, I've already done that ;) Mar 12 19:28:23 ah, nothing I am familiar with then Mar 12 19:28:23 you need Context to do anything valuable in android Mar 12 19:28:34 tomtiger11: please read the intro android tutorials on d.android.com Mar 12 19:28:35 Would NULL be fine there then? Mar 12 19:28:38 NO Mar 12 19:28:42 MDijkstra, it's already registered ;) Mar 12 19:28:47 you should use "this" Mar 12 19:28:52 AHHHHHHHHH!!!!! Mar 12 19:28:52 yeah Mar 12 19:28:57 :) Mar 12 19:29:21 faenil: but hm, I'd generally put the files into some predefined dir in external storage Mar 12 19:29:22 MDijkstra, what about yours? :) Mar 12 19:29:28 if you want to go that route Mar 12 19:29:32 MDijkstra, that's what I want to do :D Mar 12 19:29:35 for the internal file manager Mar 12 19:29:45 isn't getExternalFilesDir the way to do that? ^^ Mar 12 19:29:45 faenil: so simply get the root of the external storage Mar 12 19:29:53 and append MyFancyDirFor3DModels Mar 12 19:30:05 ok just that way ;) Mar 12 19:30:13 MDijkstra, what about your viewer? Mar 12 19:30:53 oh, I haven't written a viewer, I'm just looking to install a 3d protein visualization package at this moment Mar 12 19:31:17 MDijkstra, mine is mostly made for building studies, restauration, etc Mar 12 19:31:24 ah Mar 12 19:31:25 MDijkstra, I see Mar 12 19:31:28 Trying to use ActionbarSherlock4.0 and after doing a git pull to update to 4.0, I can not get it to build. I have 2340 errors, all of which seem to be "cannot be resolved to a type". Anyone know how I fix this? Mar 12 19:32:15 any ideas for this lgcc linkage issues ? Am I supposed to have a dynamic version of that library, or the format is somehow not okay ? Could someone please clarify this ? Mar 12 19:32:33 damccull, target api 14+ Mar 12 19:32:45 I believe it is already checked on api 14. Mar 12 19:33:23 Both ABS and your project has to be built against api14 Mar 12 19:33:43 Well I'm just trying to get the library to build right now. I haven't hooked it into a project yet. It used to build by itself. Mar 12 19:36:04 a little less conversation a little more action please Mar 12 19:36:21 oh dangit. Ok, lemme fix something I tihnk i broke and it'll probably magically work :) Mar 12 19:37:37 error: Error: No resource found that matches the given name (at 'text' with value '@string/yellow'). Mar 12 19:39:13 http://developer.android.com/guide/topics/resources/string-resource.html Mar 12 19:42:50 WOOT: http://code.google.com/p/android/issues/detail?id=26694#c6 Mar 12 19:43:33 "Red Card!!" - Multiple annotations found at this line: Mar 12 19:43:33 - error: Error: No resource found that matches the given name (at 'text' with value Mar 12 19:43:33 '@string/red'). Mar 12 19:43:33 - android:text="@string/red" Mar 12 19:44:09 I just added ABS4 to my project this morning, working fine. What you have seems like something is just ouright missing from the classpath Mar 12 19:45:44 Hmm. I removed and recloned ABS instead of using the update. I deleted my .project file, and now when I create new project from existing source, there are no source files in eclipse, though they exist on the hard drive. How do I fix that? :) Mar 12 19:49:16 k. I got this app of mine, that launches an AsyncTask that usually runs for a minute, or so. The task was stored in a variable in the main Activity. Suddenly, I get a phone call, and I answer it. I return to my app to see what's going on. Question: do I have any guarantee that the variable I just created still points to my recently created AsyncTask? Mar 12 19:49:46 mrenouf|away: a google project or a personal project ? Mar 12 19:50:13 Hmm...why does it work if I put the ActionbarSherlock folder outside of my workspace before I try to create from source? Mar 12 19:51:11 g00s, um, I can neither confirm nor deny... yadda yadda Mar 12 19:51:41 mrenouf|work: has just confirmed, abs4 being used at google :D Mar 12 19:55:37 We don't all get to work on apps that only target 3.0+ :-( Mar 12 19:55:50 I have a GradientDrawable drawable.setColor(0x8800FF00) in the UpdateWidgetService of my app, it works for the layout that's in my app, by not for the widget, why ? Mar 12 19:56:16 why does the tooltip for Allow Backup in the manifest gui say "This is not the attribute you're looking for"? Mar 12 19:57:14 damccull, it says that, literally? Mar 12 19:57:20 mrenouf|work: it would be interesting if someone over there went into detail, what exactly they do for their apps that need to support lower than 3.0. many apps have some title bar looking thing Mar 12 19:57:25 well it says "you are" Mar 12 19:57:26 but yes Mar 12 19:57:32 hover over it in the gui in eclipse Mar 12 19:57:37 and it says that, literally Mar 12 19:57:43 lol Mar 12 19:58:01 someone didn't update the string resource it sounds like Mar 12 19:58:21 or maybe is a cute way of saying it's deprecated Mar 12 19:58:34 interesting. Is it replaced by backupagent? Mar 12 19:59:13 * Izhido uses sad puppy eyes on the channel Mar 12 19:59:55 * neekers will be off this afternoon to see the john carter movie, please take a message... Mar 12 20:00:03 having an issue with a control loop that checks an EditText for input, if no input is found it is SUPPOSED to give a value of 0.0f to the variable/s anyone up for this one? Mar 12 20:00:54 instead this Control Loop assigns the 0.0f value to the variable even if there is some sort of input within the EditText. Mar 12 20:01:54 My app wont install on my phone :( Mar 12 20:02:31 have you compiled it into an apk? Mar 12 20:03:35 some extra info would be nice tomtiger11 Mar 12 20:03:45 :( Mar 12 20:03:46 stealth_creation: Yep, then when i install it via HTCSync, i get an error Mar 12 20:03:49 that is true as well Mar 12 20:04:19 to be honest, I have yet to even get that far, still in the beginner stages of development for the Android platform. Mar 12 20:04:22 liek what the error is and stuff liek that Mar 12 20:05:52 So, I've always been curious about these test projects I see everywhere. Does anyone know of a good primer on what these are? Mar 12 20:06:26 Is there any additional tricks for using JIT under Android-ARM? Mar 12 20:11:17 uh, the select timezone function of the settings app has to be the biggest UI fail i've seen in a long time, at least on 2.2 Mar 12 20:11:47 nobody on my question? Mar 12 20:12:29 g00s, quit using 2.2 already Mar 12 20:12:35 what device are you on again? Mar 12 20:12:38 droid-1 Mar 12 20:12:48 you could upgrade to 2.3 pretty easily Mar 12 20:12:48 but yeah Mar 12 20:12:54 i have a DST bug in my app, i'm trying to reproduce Mar 12 20:12:56 you are definitely eligible for an upgrade Mar 12 20:12:57 just do it already Mar 12 20:13:06 oh well, thanks anyway Mar 12 20:13:06 official update ? Mar 12 20:13:10 Izhido: uh Mar 12 20:13:10 lemme see ! Mar 12 20:13:26 Izhido: did your application get recreated? It is possible that no, it does not exist. Mar 12 20:13:31 Izhido: read the docs for the application lifecycle Mar 12 20:13:40 Izhido: if you're doing something that's going to last for like a minute, strongly consider moving it to a service Mar 12 20:13:48 um Mar 12 20:13:59 I'll do :) Mar 12 20:18:35 it would be great to be able to select some API call and search to see if there have been any issues with that Mar 12 20:18:40 in the defect tracker Mar 12 20:19:18 g00s, no, upgrade device Mar 12 20:19:26 g00s, the droid1 is so completely out of date in terms of hardware Mar 12 20:19:34 g00s, there's really no reason to ever update it to something newer Mar 12 20:19:40 g00s, you can always put cyanogenmod7 on it Mar 12 20:20:20 i want to stay with official build, because the bt works and i can't afford to break that. i doubt even cm guys care about the droid-1 now Mar 12 20:20:42 its a vanilla 2.2.3 that works, thats good enough for me Mar 12 20:20:59 g00s, cm 7.whatever it is works perfectly Mar 12 20:21:04 it doesn't get patches anymore probably Mar 12 20:21:10 but neither does your official firmware Mar 12 20:21:20 i got a patch a few months ago Mar 12 20:21:24 seriously Mar 12 20:21:36 2.2.2 to 2.2.3 Mar 12 20:21:43 oooooh... not Mar 12 20:21:45 :p Mar 12 20:21:47 what is the name of android 2.2? as 2.3 is named as gingerbread? Mar 12 20:21:50 froyo Mar 12 20:22:02 pfn, thnx Mar 12 20:23:25 * g00s hates DST bugs, fuuuu Mar 12 20:23:59 how do you have a dst bug... you suck :p Mar 12 20:24:18 pfn: exactly, i don't even do anything with it Mar 12 20:24:22 ABS: The type android.support.v4.app.FragmentActivity cannot be resolved. It is indirectly referenced from required .class files Mar 12 20:24:24 how do I fix? :) Mar 12 20:24:37 Offending code: public class HouseHunterActivity extends SherlockFragmentActivity { Mar 12 20:24:46 damccull, you're missing the android-support jar Mar 12 20:24:58 ABS includes the support jar Mar 12 20:25:02 I thought the ABS project was supposed to have it. I put it in that. Mar 12 20:25:42 Build.VERSION_CODES.ICE_CREAM_SANDWICH <---- does this variable really exists on froyo. actually i am looking into action bar compatibility example. and over there they use this variable. so i was wondering how did they have that variable when version was only 2.2 Mar 12 20:25:44 Tho if you're doing eclipse builds there might be strange things going on, requiring you to include it Mar 12 20:25:57 jahid: It's inlined when compiled Mar 12 20:26:11 jahid, does not exist in froyo Mar 12 20:26:14 Oh, this is new... Mar 12 20:26:17 jahid, what you do is target api14+ Mar 12 20:26:20 "Since the library is an extension of the official support library you must also have the android-support-v4.jar referenced by your project." Mar 12 20:26:35 used to be part of the ABS, but now it seems part of my project Mar 12 20:26:35 SimonVT, Inlined? Mar 12 20:27:25 The value is inserted instead of reading the variable at runtime Mar 12 20:27:38 damccull, right, it used to be separate, now it's a required dependency Mar 12 20:28:02 interesting. So ABS must have it AND my project must have it, correct? Mar 12 20:28:17 well, your project requires it because it depends on abs Mar 12 20:28:28 but ABS won't compile without it either it seems Mar 12 20:28:49 I have a expandable listview that when pressed and dragged the entire listview can be dragged and will snap back into place when you let go Mar 12 20:28:56 I dont want this behavior Mar 12 20:28:58 That entirely depends on how your IDE behaves.. When doing ant builds it's not required to include it Mar 12 20:29:02 I want it to remian in place Mar 12 20:29:16 ugh, i hope the harmony calendar shit does not have a dot bug on 2.2 Mar 12 20:29:24 s/dot/not Mar 12 20:29:43 pfn, if that does not exists then how this code will compile? http://developer.android.com/resources/samples/ActionBarCompat/src/com/example/android/actionbarcompat/ActionBarHelper.html Mar 12 20:29:54 jahid, you /need/ to target api14+ Mar 12 20:30:06 jahid, it will compile fine if you target api14 Mar 12 20:30:40 pfn, api14 is which version of android? like 2.2, 2.3, etc Mar 12 20:30:46 jahid, 4.0 Mar 12 20:32:24 pfn, aha, you mean i should compile with target api14, and that will still work on 2.2 because those variables will be replaced with values? Mar 12 20:32:35 jahid, yes Mar 12 20:32:48 pfn, i understand. thanks a lot Mar 12 20:33:30 anyone? Mar 12 20:33:44 btw this is only an issue for me in 3.1 Mar 12 20:36:17 canon's download links for their camera software for mac 10.7 have been busted for the past week, what a bunch of retards Mar 12 20:37:01 if I put Theme.Sherlock in the manifest's theme block, I get a no such theme error...What did I do wrong now ?:) Mar 12 20:39:49 hehe, nm. Forgot the @style/ Mar 12 20:40:14 pfn, is 2.3 is froyo too? Mar 12 20:40:45 froyo is all that is, ever was, and ever will be Mar 12 20:42:30 jahid: 2.3 is Gingerbread. Mar 12 20:43:10 lov, is there any place where can i find this version table? Mar 12 20:43:10 jahid: see Mar 12 20:43:18 yes Mar 12 20:43:25 search for Build.VERSION_CODES on d.android.com Mar 12 20:43:41 http://developer.android.com/reference/android/os/Build.VERSION_CODES.html Mar 12 20:43:54 also, see the list on Mar 12 20:43:56 http://developer.android.com/sdk/index.html Mar 12 20:44:01 love, i had that open, but that doesnt have GB Mar 12 20:44:15 lov, sorry my bad, it has Mar 12 20:44:18 lov, thanks a lot Mar 12 20:44:22 http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#GINGERBREAD Mar 12 20:46:17 android version means os version, and api level means android sdk api version? Mar 12 20:46:52 Android OS version and SDK versions relate almost precisely. Mar 12 20:46:54 btw Mar 12 20:47:09 almost precisely hehe, poor choice of words Mar 12 20:47:20 but perhaps you still understand Mar 12 20:47:26 jasta, when we say 2.2 so we mean os and sdk both version? on that case what does api level means? Mar 12 20:47:32 Hey all, have a quick question about implementing parcelable. Trying to extend Hey all, quick question about subclassing. Trying to extend the http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/NameValuePair.html class in order to implement parcelable but It will only let me do it as an interface Mar 12 20:47:33 2.2 = 8 Mar 12 20:47:35 any suggestions? Mar 12 20:47:40 = froyo Mar 12 20:47:48 just learn it all jahid Mar 12 20:47:48 jahid: API level is just a single scalar integer that maps to the version. Mar 12 20:48:08 StlTenny: look to see how they do ParcelableUuid Mar 12 20:48:17 canadiancow|work, on your 2.2=8, here what does 2.2 means and 8 means? they are version for what? Mar 12 20:48:22 ParcelUuid, rather Mar 12 20:48:23 api level is monotonically increasing Mar 12 20:48:30 Android 2.2 was codenamed Froyo and has an API level of 8 Mar 12 20:48:42 Android 2.3 was codenamed Gingerbread and has an API level of 9 Mar 12 20:48:47 Android 2.3.3 was codenamed Gingerbread and has an API level of 10 Mar 12 20:48:52 etc Mar 12 20:49:04 if the api changes, you get a new api level Mar 12 20:49:13 but the api didnt hcange for 2.3.1 or 2.3.2 Mar 12 20:49:19 g00s: I'm not having an issue writing the parcelable class, I'm having an issue trying to extend NameValuePair unfortunately Mar 12 20:49:28 or at least not enough to warrant a new sdk Mar 12 20:49:58 StlTenny: that's because NameValuePair is an interface. You need to use the 'implements' keyword. Mar 12 20:50:07 canadiancow|work, ahh i think now i understand. so basically 2.2 is android vresion which relates os and sdk. where as api level represents api version. am i correct? Mar 12 20:50:21 sort of? Mar 12 20:50:25 ok Mar 12 20:50:30 readme: Ahh, so it is an interface? I was looking at the doc and it seems to be defined as a class. Mar 12 20:50:39 if all you know and understand is api level, you'll be fine Mar 12 20:50:49 StlTenny: public interface NameValuePair Mar 12 20:50:53 http://developer.android.com/reference/org/apache/http/NameValuePair.html Mar 12 20:51:03 StlTenny: but you might just want to use BasicNameValuePair. Mar 12 20:51:34 canadiancow|work, thats not true. because on my cell it shows software vresion 2.2. where as when i code i need to know which api level is for 2.2, which is 8 Mar 12 20:52:21 fair Mar 12 20:52:26 either way Mar 12 20:52:28 just learn it all Mar 12 20:52:36 readme: Reading the wrong doc :/ I guess that was on me. http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/NameValuePair.html. Basic name value pair is suitable for my needs. End result is I want to pass an ArrayList of them through intent.putParcelableArrayListExtra("headers", (ArrayList) headers); Mar 12 20:52:51 canadiancow|work, thanks Mar 12 20:52:52 http://developer.android.com/guide/appendix/api-levels.html Mar 12 20:53:00 zee docs Mar 12 20:53:35 readme: From one activity to another, that the best way to go about it, or am I making this more complicated than it needs. I tried doing it as a serializable object, but no luck. Got the "value unable to marshalled" error Mar 12 20:53:35 StlTenny: I think you should define your own object that represents the data you are passing more accurately than BasicNameValuePair, then include a method in that object that can build out a List of NameValuePairs from the object's fields. Mar 12 20:53:58 StlTenny: no, *definitely* pass your data through intents using parcelable Mar 12 20:54:03 don't use any global crap, ever Mar 12 20:54:14 When developing, do you know if there is a difference between the android mobile developer and tablet version of android ? Mar 12 20:54:23 you are right to do it this way Mar 12 20:54:44 john_doe_jr: theres only one 'version' of android Mar 12 20:54:49 well two if you count google tv Mar 12 20:55:03 but in terms of phones/tablets, it's all the same code (assuming they are both running, for example, 4.0.3) Mar 12 20:55:05 readme: Yeah, I'm aware. Abandoned the static option a while back. And basic name value pair is exactly what I want for my purposes. (Being used for name value pairs in a rest request). Thanks Mar 12 20:58:23 why doesn't dialog stop the rest of the activity until it's dismissed? Mar 12 20:59:08 because this isn't Javascript Mar 12 21:00:47 lulz Mar 12 21:02:01 why would anybody want to create a dialog and then continue doing whatever while the dialog is still on the screen? Mar 12 21:04:42 Progress dialogs? Mar 12 21:07:17 ... they could have just added an option to wait Mar 12 21:08:59 ? Mar 12 21:09:23 that's like...what Mar 12 21:09:28 i dont get it Mar 12 21:09:49 canadiancow|work: I don't think Ktomislav does, either. Mar 12 21:11:03 hello captain obvious Mar 12 21:11:53 i think technically Mar 12 21:11:56 his title is operator Mar 12 21:11:57 not captain Mar 12 21:12:12 Hello I'm going to save down sevral id's linked to a imagepath. I'm using SQLite. But to save all id's in a column i thought of a array. Question: Should i use List ArrayList or Int[]? Mar 12 21:12:48 ... Mar 12 21:13:07 an ArrayList is a List Mar 12 21:13:08 for the record Mar 12 21:13:37 is ArrayList and List the same thing? Mar 12 21:13:52 a List is an abstract contract Mar 12 21:13:59 ArrayList is a concrete implementation of List Mar 12 21:14:04 ArrayList is a List, but List isn't necessarily an ArrayList Mar 12 21:14:12 this, this, and this Mar 12 21:14:34 But if you're using a database, just use the cursor? Mar 12 21:14:41 its a subclass then Mar 12 21:14:50 is they need to be fed any good? Mar 12 21:14:52 has anyone encountered a problem with intellij where you can no longer "watch" variables in the debugger? Mar 12 21:14:53 screenshots are pretty crappy Mar 12 21:14:57 It's an implementation :p Mar 12 21:15:00 Wrong channel, pfn Mar 12 21:15:04 don't care Mar 12 21:15:05 answer me Mar 12 21:15:06 :p Mar 12 21:15:19 is it ok to use ArrayList. Back wen i was learning everybody i talked to said I was a bit r-tarded using ArrayList Mar 12 21:15:40 [17:14:57] It's an implementation :p Mar 12 21:15:41 this Mar 12 21:15:42 well, for your public api that you share with other people, it should be List Mar 12 21:15:49 oh SimonVT, how i love having you around here Mar 12 21:15:58 haha, great http://imgur.com/M6zLW Mar 12 21:15:58 my hands get a big break from typing :) Mar 12 21:15:58 SimonVT: Can i update a cursor afterhand? Mar 12 21:16:02 but in general, arraylist is the "best" general-purpose list Mar 12 21:16:02 haha Mar 12 21:16:15 Duke_Puke: no Mar 12 21:16:24 "best" ? Mar 12 21:16:25 g00s, nice, is that how you got through school Mar 12 21:16:45 canadiancow|work: averagest? ;) Mar 12 21:16:57 SimonVT: Thats why I thought of a ArrayList. Simple to add a new Int Mar 12 21:16:58 it's an implementation Mar 12 21:17:07 i cna think of cases where it would be significantly worse than a linkedlist Mar 12 21:17:12 Can someone point me in the direction of how to disable the selector for the action bar? specifically, the icon? Mar 12 21:17:14 canadiancow|work, if one were to pick any list implementation without knowing jack-shit, they're probably best served by an arraylist Mar 12 21:17:15 like... a stack Mar 12 21:17:21 even in the case of a stack Mar 12 21:17:26 a linkedlist blows up memory usage Mar 12 21:17:30 if your list is huge Mar 12 21:17:40 linkedlist has something like a 10x memory-overhead vs. arraylist Mar 12 21:17:43 does anyone know how to prevent a listview from scrolling in 3.1 Mar 12 21:17:53 try setEnabled(false) Mar 12 21:17:55 faint545: "disable" ? Mar 12 21:18:14 evancharlton: or, replace Mar 12 21:18:17 the listview is able to be dragged and then snaps back into place when let go I do not want this behavior Mar 12 21:18:18 faint545 just take away the android:icon in the actionbar xml, worked for me Mar 12 21:18:27 Duke_Puke: An arraylist is fine then :) Mar 12 21:18:30 faint545: what are you trying to do? change the icon? make it not do anything? disappear? Mar 12 21:18:46 pfn: It should probably hold 2-5 integers Mar 12 21:18:55 evancharlton: I don't want the selector color to show up if someone clicks it. Mar 12 21:19:09 pfn: In case nobody would go berserk and tag a hundred people in one image Mar 12 21:19:14 even pushing and popping off of a small arraylist is no big deal Mar 12 21:19:23 unless you're doing a bajillion times a second Mar 12 21:19:27 Duke_Puke: if you're storing five items, why not just use int[] ? Mar 12 21:20:02 evanchalton, think it would be easy with the .add method as for the .remove Mar 12 21:20:11 Duke_Puke: use SparseIntArray Mar 12 21:21:02 everyone in this channel should read through http://domino.research.ibm.com/comm/research_people.nsf/pages/sevitsky.pubs.html/$FILE/oopsla08%20memory-efficient%20java%20slides.pdf Mar 12 21:21:06 and then get horribly depressed Mar 12 21:21:19 evancharlton, yeah, saw that, it's an awesome preso Mar 12 21:21:24 as for depressed Mar 12 21:21:25 not really Mar 12 21:21:33 evancharlton, thanks Evan i might just use that one Mar 12 21:21:34 this is talking about a typical enterprise app Mar 12 21:21:40 with a huge load of in-memory data Mar 12 21:22:02 of course, one should be aware that memory isn't free and bloat up with lots of datastructures all over the place Mar 12 21:24:09 http://venturebeat.com/2012/03/10/the-new-mobile-platform-wars-its-time-to-look-beyond-ios-vs-android/ Mar 12 21:24:31 evancharlton: When they talk about key int the SparseArray they mean the value right? Mar 12 21:24:46 g00s, no it's not Mar 12 21:28:20 Duke_Puke: no Mar 12 21:28:33 Duke_Puke: I doubt it. In that context, I would expect the key to be the index Mar 12 21:28:52 JesusFreke: kind of Mar 12 21:28:56 when they talk aobut the key, they mean the value? Mar 12 21:29:01 evancherlton it has separate keys,indexes, and values Mar 12 21:29:05 Duke_Puke: yes Mar 12 21:29:31 well, index meaning the user-level index. not the internal "here's where it's at" index :) Mar 12 21:30:00 So, i've noticed that the ActionBarSherlock demo app has the selector for the app icon in the action bar disabled/transparent so when a user tries to press it, theres no visual feedback.. But I can't seem to figure out how it was done via the source code... Mar 12 21:30:05 * pfn ponders how to implement a last-viewed-item line in a listview Mar 12 21:30:05 i.e. the index if it was a normal array, without all the sparseness taken out Mar 12 21:30:20 i.e. if it was visible, it should be flagged as displayed somehow in the adapter Mar 12 21:30:21 evancharlton: Wow this just got quite complicated. But i can still save the ArrayList into a databasecoulumn right? Mar 12 21:31:04 Duke_Puke: it's up to you to decide how to serialize that Mar 12 21:31:40 evancharlton, I thought of Serializing my classmate said it wouldnt work Mar 12 21:35:03 Where are the android git mirrors nowadays? Mar 12 21:35:14 appamatto, source.android.com has links Mar 12 21:35:22 pfn, should it be a seperate view or just an indicator on the list item? Mar 12 21:35:26 pfn thanks Mar 12 21:35:44 SimonVT, an indicator on the list item Mar 12 21:36:07 haven't really wrapped my head around how it'd be done yet Mar 12 21:36:08 Then just save the id or whatever of the newest item when moving away from the list ? :o Mar 12 21:36:26 newest list item for which getview has been called Mar 12 21:36:56 You can get the id of the newest item when you call notifydatasetchanged Mar 12 21:37:28 that doesn't work Mar 12 21:37:45 the adapter is constantly updated with new information Mar 12 21:37:56 Sure, just a temp variable until the list is no longer visible Mar 12 21:37:56 e.g. think of a logcat or irc channel, I suppose Mar 12 21:38:04 i don't get it, Calendar c = Calendar.getInstance(); c.set(200, Calendar.JANUARY, 1) is giving me a time which is one hour off now because of DST Mar 12 21:38:13 the adapter will be constantly notified about new data Mar 12 21:38:17 Duke_Puke: serialization doesn't have to mean Java serialization. Just write it to a comma-separated list of ints or something Mar 12 21:38:25 whether or not a list is subscribed is a different matter Mar 12 21:39:17 java + date stuff = the suck Mar 12 21:39:26 pfn, I don't see any links to the source Mar 12 21:39:28 You could also use setUserVisibilityBlargh.. When passing false, save id, when passing true, tell adapter to mark that item Mar 12 21:39:32 g00s: JodaTime Mar 12 21:39:45 I was looking for a gitweb or just something I can pull one of the AOSP projects from using git Mar 12 21:40:14 Actually that's probably a better solution :P Mar 12 21:40:15 you can pull any of the projects individually if you want to Mar 12 21:40:17 SimonVT, yeah, it's generally hacky and not quite guaranteed to be precise. need to add a user visibility flag to the adapter Mar 12 21:41:06 pfn, is the issue that you throttle updates or something? Or what do you mean with precise? Mar 12 21:41:20 evancharlton: how do i initiate a comma-separated list? int[]? Mar 12 21:41:43 SimonVT, no, just that there is no contract on the adapter when views are retrieved Mar 12 21:41:54 SimonVT, i.e. listview could be pre-caching views Mar 12 21:42:13 Ah Mar 12 21:42:17 Scrolled up stuff.. Mar 12 21:42:19 SimonVT, which would make a last-viewed line inaccurate Mar 12 21:42:37 Yeah, I see Mar 12 21:43:23 Interesting :p Does listview actually pre-cache? Mar 12 21:43:47 no it doesn't Mar 12 21:44:06 Well there you go Mar 12 21:44:36 evancharlton: or i just make it a delimited string and the un-delimit it and put it into a int[] Mar 12 21:44:47 yeah, I guess I just need to not be lazy and implement such a line Mar 12 21:44:54 * pfn wants a last-read line in his irc client Mar 12 21:46:24 Duke_Puke: right, that's my point Mar 12 21:46:26 pfn: Semi-related: http://thedoghousediaries.com/ Mar 12 21:46:44 evancharlton: Thanks for the help :) Mar 12 21:46:50 SimonVT, heh Mar 12 21:49:15 anybody use this on android ? http://www.date4j.net/ Mar 12 21:49:43 g00s, most people want to use jodatime, dunno about date4j Mar 12 21:50:36 ick http://stackoverflow.com/questions/5059663/android-java-joda-date-is-slow Mar 12 21:50:42 no thanks Mar 12 21:50:45 and its huge Mar 12 21:50:59 15 seconds? seriously? Mar 12 21:51:22 oh, tz db loading Mar 12 21:54:27 has anyone encountered a problem with intellij where you can no longer "watch" variables in the debugger? Mar 12 21:58:46 How I can throw an event from a AsyncTask? Mar 12 21:59:32 what kind of event Mar 12 21:59:39 publishProgress Mar 12 21:59:40 ObjectEvent Mar 12 22:06:27 Is there any callback that I can override in Fragment to some statements after the layout has been completed? Mar 12 22:07:03 Calling view_getWidth() or getHeight() in onViewCreated returns incorrect sizes, because the layout has not been completed yet at that point Mar 12 22:07:17 this has caused me to resort to calling getWidth() and getHeight() many more times than I would like to. Mar 12 22:07:28 because I think using a timer would just be a bad idea. Mar 12 22:09:50 A quick look suggests this could be useful: http://developer.android.com/reference/android/view/View.html#addOnLayoutChangeListener(android.view.View.OnLayoutChangeListener) Mar 12 22:10:07 Oh, api11.. Mar 12 22:10:28 SimonVT: yeah, that is worth a try. Thanks Mar 12 22:10:38 Probably out of luck then, unless you subclass and implement your own listener Mar 12 22:10:40 actually that's very good.. now I can have it work after it hanges :) Mar 12 22:10:47 readme, onViewCreated? Mar 12 22:11:04 mrenouf|work: layout isn't complete yet when onViewCreated is hit Mar 12 22:11:07 mrenouf|work: He needs to wait until it's measured Mar 12 22:11:21 I think SimonVT's suggestion will be perfect Mar 12 22:11:37 maybe I'll let them resize the view :D Mar 12 22:11:40 oh, didn't see that. yep. have you trued onActivityCreated? Mar 12 22:11:47 readme: Note the api level tho, in case you support <11 Mar 12 22:11:49 that might still be too early Mar 12 22:12:14 oh no.. it won't be in the compat lib? Mar 12 22:12:25 Nope Mar 12 22:12:30 not View Mar 12 22:12:37 just Activity compat stuff Mar 12 22:12:58 you can extend a view and hook onMeasure :-/ Mar 12 22:13:11 oh, that's a good idea Mar 12 22:13:24 but I think you might be trying to sovle a problem that should be handled by a layout Mar 12 22:13:34 I'd imagine that listener is called in onLayout.. It has the boolean changed parameter for when bounds change Mar 12 22:14:28 I will extend the view Mar 12 22:14:33 it is settled Mar 12 22:14:35 thanks for the help Mar 12 22:22:51 romainguy: do you have any suggestions as to how to override the selector for just the home icon in Actionbar? Mar 12 22:24:58 ActionBar.setHomeButtonEnabled(false)? Mar 12 22:25:30 when changing map overlays we can see the change immediately? Mar 12 22:26:01 or we need to do some refreshing Mar 12 22:28:35 SimonVT: oh wow, thank you. I don't know how I missed that. Mar 12 22:36:52 When an animation ends, the view is put back in the same place it was at the start of the animation. I need my view to be in the place the animation ended at, in the position it ended at.. Is this possible? Mar 12 22:37:14 I'm using RotateAnimation to rotate a view in place, I need it to start at 0, and end at 90, for example, and stay at 90. Mar 12 22:41:26 is there a way to give a checkbox a border ro do u have to use a drawable Mar 12 22:43:14 you could give it a really ugly and inefficient border by sticking it inside of a FrameLayout with padding. Mar 12 22:47:11 nevermind on my question. it was just made a moot question due to something else i discovered. Mar 12 23:24:07 hello! :) Mar 12 23:28:25 I'm trying to write my first android application (besides the simple hello world) and i'm trying to load a file that i placed in assets directory. i googled and i see people using getAssets() by using the AssetsManager but i couldn't find an example to understand how to use it. can anyone assist me please ? Mar 12 23:29:34 Hey guys, I'm loading a bunch of high-res bitmaps into a ViewPager, and I'm running into the dreaded OOM Exception, because there are so many views with large bitmaps. Anybody know how I might limit the number of views to say... 3 at a time or something, or otherwise improve this implementation? Mar 12 23:30:48 i probaby need to use getResources instead Mar 12 23:49:18 Anyone here using an actual profiler to profile their code (Not allocation tracker -- a profiler)? Mar 12 23:50:37 I'm looking less for something that counts memory allocations and more something that times the runtime and keeps track of how many calls are made to various methods Mar 12 23:51:14 have you looked at...uh...traceview? Mar 12 23:51:18 its part of android Mar 12 23:51:26 i think its called traceview Mar 12 23:51:28 oh nice Mar 12 23:51:50 I should have looked outside the box (in this case the box is eclipse) Mar 12 23:53:00 traceview has eclipse/adt integration Mar 12 23:54:53 evancharlton, what's with the constant +o ? Mar 12 23:54:55 cool Mar 12 23:54:57 I'll install the plugin Mar 12 23:56:16 Hey guys, I'm loading a bunch of high-res bitmaps into a ViewPager, and I'm running into the dreaded OOM Exception, because there are so many views with large bitmaps. Anybody know how I might limit the number of views to say... 3 at a time or something, or otherwise improve this implementation? Mar 12 23:57:11 you're usually better off tiling the bitmaps Mar 12 23:57:26 canadiancow|work: never removed it Mar 12 23:57:32 plus, I like to show off Mar 12 23:57:42 to remind you of your position, serf Mar 12 23:58:32 Chronax: the problem is that you need to be well below the memory limit, or else you'll still go over it on devices with less memory than yours Mar 12 23:58:41 Yeah, I dig that. Mar 12 23:58:54 Is there a way to only load the previous, current, and next views on a ViewPager? Mar 12 23:58:59 Or in some other way lazy-load it? Mar 12 23:59:06 Or recycle bitmaps as they go out of focus? Mar 12 23:59:08 Or something? Mar 12 23:59:09 ;) Mar 12 23:59:12 I'm pretty sure it does all of this Mar 12 23:59:58 or well, not completely sure Mar 13 00:02:05 Woo, dropped off there. Mar 13 00:02:09 Any ideas? Mar 13 00:02:45 yeah, implement view recycling in your pageradapter Mar 13 00:03:19 implement image tiling so you don't have to keep the high-res image in memory Mar 13 00:04:11 hm in an uml class diagram, how would i denote the association between an activity calling another activity via an intent ? Mar 13 00:05:04 ANdi``: an arrow? Mar 13 00:06:27 eh my question rather is: would it be an association or sth else ? Mar 13 00:09:10 ANdi``: seen this? Mar 13 00:09:13 http://stackoverflow.com/questions/8868699/uml-class-diagram-for-android Mar 13 00:09:50 specifically http://research.cs.queensu.ca/~dingel/cisc836_F11/androidWithActivities.pdf Mar 13 00:09:53 MDijkstra, can you elucidate on view recycling? I already have the destroyItem removing the views... is there a way I can recycle the bitmaps or something too? Mar 13 00:12:54 brx_ yes but didn't want to put that much effort into it :) Mar 13 00:13:09 anyone know how to play a video inside an webview with out doing crazy code like this? http://stackoverflow.com/questions/4989738/how-to-play-a-video-in-a-webview-with-android Mar 13 00:13:27 ANdi``: :P Mar 13 00:13:30 well, if implemented correctly you should already be destroying pages as they move out of view Mar 13 00:14:00 recycling them should help improve performance, but not necessarily memory usage Mar 13 00:14:16 how big are these images you are loading? Mar 13 00:17:41 I think you should look at improving the memory usage of your individual image views Mar 13 00:17:50 instead of trying to optimize the adapter Mar 13 00:19:12 Chronax: for example with: https://github.com/ened/Android-Tiling-ScrollView Mar 13 00:21:36 Killer. Mar 13 00:21:39 Thanks, MDijkstra Mar 13 00:22:14 np Mar 13 00:23:03 Actually, though. Mar 13 00:23:08 This isn't what I need. Mar 13 00:23:15 This is 1 huge image being scrolled around, right? Mar 13 00:23:22 Broken into tiles. Mar 13 00:23:25 yeah Mar 13 00:23:30 for multiple zoom levels Mar 13 00:23:30 I'm using a ViewPager, so it's several different images. Mar 13 00:23:40 All of which are always full screen. Mar 13 00:23:50 yeah, so your viewpager will page between these images Mar 13 00:24:01 right, so how big are your images? Mar 13 00:24:08 and do you want to zoom in them? Mar 13 00:24:44 No. Mar 13 00:24:46 Not at all. Mar 13 00:24:58 oh look Mar 13 00:25:01 my system bar disappeared Mar 13 00:25:04 Lemme ax this: Is there a way for me to recycle bitmaps that aren't currently in view, and only load them when they are in view? Mar 13 00:25:08 well not really - i have the soft menu button Mar 13 00:25:09 s/view/focus Mar 13 00:25:13 but no back, home, or app switch Mar 13 00:25:27 Chronax: it already does this for you, through destroyItem Mar 13 00:25:41 recycling won't help your memory usage Mar 13 00:26:20 again, how big are those images? Mar 13 00:26:35 I thought the issue was that it was loading all N images in memory at once, in order to be ViewPaged through? Mar 13 00:26:50 Also, as I scroll through, destroyItem() isn't being called. Mar 13 00:27:00 no, what would the point of instantiate/destroyItem be then? Mar 13 00:28:49 I'm just not sure when it's called. Mar 13 00:28:56 It's definitely not being called as I'm flipping through. Mar 13 00:29:03 wait Mar 13 00:29:22 setOffscreenPageLimit(1) Mar 13 00:29:25 sorry :\ Mar 13 00:29:31 What will this do? Mar 13 00:29:43 set the limit of offscreen pages retained to 1 on either side Mar 13 00:29:46 so 3 in total Mar 13 00:29:51 Oh! Mar 13 00:29:52 I see. Mar 13 00:29:54 Interesting. Mar 13 00:30:07 it's probably set to some ridiculous number by default Mar 13 00:30:10 So that should be doing what I want. Mar 13 00:30:19 It was actually set to 2, which may have been my problem. Mar 13 00:30:44 still, 5 instead of 3 images crashes the app Mar 13 00:30:55 you might want to optimize mem usage further Mar 13 00:31:34 ie, resize images to your screen DPI Mar 13 00:31:49 so you don't have to keep the full highres image in memory Mar 13 00:37:45 Well, here's the deal. Mar 13 00:37:59 I'm invoking an API to get these images, and I pass screen-size as a parameter. Mar 13 00:38:12 So, it's giving me back images that are exactly the device's screen size. Mar 13 00:40:52 MDijkstra: Will the destroyItem method be invoked after the setOffSCreenPageLimit() threshold has been exceeded or something? Mar 13 00:41:13 MDijkstra: And, in that case, should I actually be recycling the bitmaps in addition to removing the views? Mar 13 00:41:39 it should, although I've never checked if it actually does Mar 13 00:50:21 when you include jni code in a project, when it installs, does it unload the .so file outside the apk? Mar 13 00:54:04 Is there any way to actually check the in-memory size of my Bitmaps? Mar 13 00:54:15 Like, after it's decompressed from JPEG? Mar 13 00:54:22 In MB, or in my case... GB? Mar 13 00:54:23 ;) Mar 13 00:54:53 im going crazy how do I get a webview to open a video that is on the device... everytime i try i get an error about the device can't open the intent. I'm basically doing this. Mar 13 00:54:55 http://stackoverflow.com/questions/3380767/launch-mediaplayer-on-link-click-in-webview Mar 13 00:56:36 the video in questions does play in the media player Mar 13 01:05:52 is anyone using qt for android here? Mar 13 01:07:16 no Mar 13 01:09:29 anyone know how to get a a link to play an internal video.... I keep getting No Activity found to handle Intent. But when I use my file explorer it can play the video quite fine. Mar 13 01:16:23 roger_padactor: where is the video located? Mar 13 01:16:38 ah, somewhere on external storage Mar 13 01:16:58 yeah. in the error the file path is correct. Mar 13 01:19:53 http://pastebin.com/u6ccH16A in the html i jsut havetest when i touch it I get the error and my app crashes... the mp4 file does play on the device. i've tried playing it through the file explorer. Mar 13 01:20:11 MDijkstra: ^^ Mar 13 01:24:24 roger_padactor: ah, I think the problem could be that it's a relativeurl Mar 13 01:24:28 you're trying to load Mar 13 01:24:40 or the correct mime type isn't specified Mar 13 01:24:48 let me see the code I use to open an external pdf Mar 13 01:24:58 mp4 Mar 13 01:25:09 (also, why don't you use AppendixActivity.this.startActivity()? Mar 13 01:25:38 or well, view works in this case, just wondering Mar 13 01:27:02 Intent intent = new Intent(Intent.ACTION_VIEW); Mar 13 01:27:03 intent.setDataAndType(Uri.fromFile(f), "application/pdf"); Mar 13 01:27:05 hello Mar 13 01:27:05 is what I do Mar 13 01:27:17 hmmm relative url? bu in the error it knows where the file is... which is odd Mar 13 01:27:32 that's probably not the issue then Mar 13 01:27:32 is there a size parameter i should stay for the size of my apk right now i have 56.5megabytes Mar 13 01:28:06 raunchpup: 50MB max, but think very carefully about using an external media package if you're getting anywhere *near* 50MB Mar 13 01:28:16 roger_padactor: although I always use custom url schemas when doing something like this Mar 13 01:28:34 raunchpup: http://android-developers.blogspot.com/2012/03/android-apps-break-50mb-barrier.html Mar 13 01:29:57 Thank you will ook into that site Mar 13 01:31:29 i see i need to figure how to get the file smaller then most definately Mar 13 01:31:37 thank you for the insight and help Mar 13 01:31:44 Heh, i found an amusing typo just now.. when the Maps.MyLocationOverlay handler discards a location update from a fallback source: http://avleen.com/i/3l-nrmbio76wwows.png Mar 13 01:31:46 "udpate" Mar 13 01:31:47 :-) Mar 13 01:32:24 raunchpup: you're welcome, and good luck :) Mar 13 01:32:42 will be back for sure Mar 13 01:37:47 i think its cus its file:///mnt instead of /mnt :) yup it works now... Mar 13 01:55:31 Newbie questions, part B: I installed Android SDK on a Windows XP VM (for testing it on my Linux box), and the VM froze and became unbootable! Safe mode doesn't start either, stops while loading "mup.sys"... Are there any known problems? Mar 13 01:56:08 That VM was important to me... not terribly, but quite Mar 13 01:57:47 I'm trying to download a image from a url using HttpURLConnection and BitmapFactory to decode it. The thing is this works only when I'm debugging and when I put break points. If I let the code run the image returned it's null. The routine is running under a AsyncTask. **** ENDING LOGGING AT Tue Mar 13 02:59:58 2012