**** BEGIN LOGGING AT Mon Sep 03 03:00:00 2012 Sep 03 03:00:43 mahkie: ahh i see, i'm not well versed on that Sep 03 03:01:55 maslen: you can always step through in the java debugger when you want to trace something like that Sep 03 03:02:41 or drop Log / stack traces in the code if you don't feel like bringing up eclispe or jdb Sep 03 03:03:06 heh. I have it open in eclipse now. Sep 03 03:03:49 mr6: do you have any thoughts on my predicament? Sep 03 03:04:30 mahkie: text justification? nah I don't mess with UI much Sep 03 03:05:22 mr6: that is my problem i mess with UI too much :) Sep 03 03:06:52 you could subclass the textview and make your own layout engine Sep 03 03:07:31 or, since it can take html-formatted text, maybe it has text layouts built-in? Sep 03 03:08:14 nerdshark: you mean that the alignment is built in the html? Sep 03 03:08:23 it might be Sep 03 03:08:25 i'm not sure Sep 03 03:08:34 i know that textview understands several html tags Sep 03 03:08:43 i dont think html alignment works in textview Sep 03 03:08:46 it might be able to do text layout Sep 03 03:08:47 hm Sep 03 03:08:58 yes but alignment unfortunately does not Sep 03 03:09:17 then there is surely a textview subclass out there that understands css or something Sep 03 03:11:04 i have a froyo devices with front camera, but 2.2 does not have camera.front feature.... what do i do? Sep 03 03:11:09 nerdshark: i hope there was Sep 03 03:11:32 other camera apps works fine with the front camera Sep 03 03:26:47 wow Sep 03 03:26:54 having some serious connection problems Sep 03 03:27:03 mahkie: http://stackoverflow.com/a/9655234 Sep 03 03:27:05 check this out Sep 03 03:27:11 it's a custom view implementation Sep 03 03:27:15 2.2 here. i'm trying to understand what is happening: on a AsyncTask class, i'm processing the result of doInBackground by using a callback method. the processdialog#dismiss is called before the callback. then the progressDialog freezes and only disappears after the callback returns. Sep 03 03:27:29 you could also use a webkitview if you don't need your text to be editable Sep 03 03:28:56 Can I add debug 'logging' by using System.out.println(), or do I specifically need to use some sort of logging framework? Sep 03 03:29:12 bitkiller: onPregressUpdate and onPostExecute? Sep 03 03:29:16 You can Sep 03 03:29:20 But Android has a Log class Sep 03 03:29:21 Use that Sep 03 03:29:47 anyone familiar with android.gesture? Sep 03 03:29:48 dvdh, not using onProgressUpdate. Trying to dismiss in onPostExecute Sep 03 03:31:14 bitkiller: callback is doing any intensive ops? thats UI thread Sep 03 03:31:50 mahkie: does that help Sep 03 03:32:12 dvdh, yes, it take some time...it will need its own asynctask Sep 03 03:32:38 The dismiss() is posted to the message queue.. It will happen once it gets to that message Sep 03 03:32:49 If you can see the dialog freeze, you're doing too much on the ui thread Sep 03 03:33:07 dvdh, thus, what is happening is a priority/queue problem? (SimonVT tip) Sep 03 03:34:28 not exactly a problem Sep 03 03:34:34 but a misuse Sep 03 03:34:37 I am buying Sony Xperia S tomorrow in the morning... anyone wants to persude me not to do it? Sep 03 03:34:40 Was just about to say :p Sep 03 03:34:49 yup Sep 03 03:35:05 What's the best way to handle if I am using a CursorLoader if I wanted to reorder the cursor query? Sep 03 03:36:18 thank you dvdh and SimonVT Sep 03 03:38:24 so ya another asynctask is good, but a quick workaround is to call the callback with a handler msg Sep 03 03:40:02 hmm, i wonder where i can get one of these http://i.minus.com/ibDMbbd4DC0sJ.gif Sep 03 03:45:28 Does it make any sense that my audio doesn't function when I have an android emulator running? As soon as I exit the emulator, my audio turns back on Sep 03 03:49:27 maslen: are you on linux? if so, that would make sense Sep 03 03:50:32 nerdshark: I'm on ubuntu 12.04. Why does it make sense? Sep 03 03:51:00 because some apps on linux block other apps from using sound Sep 03 03:51:07 if the system mixer is not set up right Sep 03 03:51:16 or if the offending app is stupid Sep 03 03:54:35 does any of you guys know how to keep app running when back is pressed? Sep 03 03:55:04 like when an app is closed, keeping it in the background rather than terminating it Sep 03 03:55:15 yes, use a Service for long-running background tasks Sep 03 03:55:53 Leeds: What's a nice way to communicate with such a Service? Sep 03 03:56:10 I imagine sockets would be OK, but it seems low-level. Sep 03 03:56:11 Leeds, not for background tasks, but just like some other programs that stay open when you move to another app. Sep 03 03:56:28 sinaa: Don't they always stay open? Sep 03 03:56:46 AIDL if you want to get complex, broadcast intents if you want to be a little blunter, apparently it's possible to just use direct method calls on the service since they're generally running in the same process anyway Sep 03 03:57:04 Ahh, cool. Thanks Leeds. Sep 03 03:57:17 or possibly shared preferences if you just want to share some state - that's what I do, to be honest Sep 03 03:58:07 rking, apparently they dont. when I press back it destroys the app. but lots of other apps just stay there until I close them myself Sep 03 03:58:38 sinaa: don't confuse Activities with Applications Sep 03 03:58:56 also, don't confuse back with other methods of changing apps Sep 03 03:59:30 if an activity is closed, the app is closed, not correct? (if there are no services and background tasks) Sep 03 03:59:48 also, don't get too attached to your app continuing to run - you're in a managed multitasking environment, and as soon as you're not in the foreground, you drop way down the priority list of things for the OS to keep running Sep 03 04:00:01 save your state, restore it quickly when you're relaunched Sep 03 04:01:00 on relaunch, will it call onCreate or onResume? it seems that it simply destroys it rather than resuming it Sep 03 04:01:02 your app probably isn't important enough to be sucking resources - "back" is an explicit command from the user to go away, so respect it Sep 03 04:01:45 If the Activity was destroyed, onCreate will be called Sep 03 04:02:03 Even if all your activities, services, etc are destroyed, doesn't mean the process isn't kept around for later use Sep 03 04:02:03 and I also want to give an exit button to users. so I want a sort of resume rather than creating a new activity Sep 03 04:02:12 back destroys it, right? Sep 03 04:02:20 Back destroys the activity, yes Sep 03 04:02:24 activity != application Sep 03 04:02:41 Also, don't offer an exit button Sep 03 04:02:42 sinaa: what does your app do? Sep 03 04:02:52 Anyone want to win a Galaxy S3? http://forum.xda-developers.com/showthread.php?p=31053651 Write a horrible shell script and get it. Sep 03 04:03:03 SimonVT: you can offer a logout button or similar, if the context demands it Sep 03 04:03:13 the ui activity is the application. if not correct, what is the applciation? Sep 03 04:03:53 Leeds: Sure, that's different tho Sep 03 04:04:21 Leeds, it interacts with a sort of social networking website. (accesses its json api) and gets data back and displays it Sep 03 04:04:40 what is the difference between Android NDK Platform folders and Android SDK Platform Folders? Sep 03 04:04:57 sinaa: and that's important enough to suck resources when the user isn't looking at it? Sep 03 04:05:14 theres a login overhead here, that I have to check if user is logged in or not. if not, log in. I want to not do that every time the user opens the app. (if its paused, just continue) Sep 03 04:05:36 sinaa: again, do *not* confuse Activity with application - an Activity is one component of an app, and any non-trivial app will generally contain more than just a single Activity Sep 03 04:05:55 oh, f7u12. Sep 03 04:06:01 I had the console open, not logcat. Sep 03 04:06:50 leeds, my problem is that my main activity is just a splash screen (while the app is checking user is logged in or not). once it gets the result, it will launch another activity. Sep 03 04:07:06 yay, splash screen! Sep 03 04:07:14 sinaa: please go back to the drawing board Sep 03 04:07:23 so, the user is always on the secondary activity. and on a back button it just destroys the whole thing (and has to start again) Sep 03 04:07:36 yay Sep 03 04:07:59 Back button just destroys the current Activity Sep 03 04:08:02 its not a timed splash screen :D it can take less than half a second to start the other activity :D Sep 03 04:08:36 hey, even better - entirely *pointless* splash screen! :D Sep 03 04:09:11 SimonVT, yes, but I finish() the parent activity. so it just exits the application based on what I can see. Sep 03 04:09:32 You're still confusing activity and application Sep 03 04:09:38 leeds, should I show a blank page until the app checks for user login? I dont see a better way Sep 03 04:10:08 Your application lives in a process.. Your application can consist of several activities, services, contentproviders, etc Sep 03 04:10:29 Even if they're all destroyed, your process (and thus your application) is still kept in memory Sep 03 04:10:37 For faster load times later on Sep 03 04:10:51 Your application is not destroyed until Android needs the memory for something else Sep 03 04:12:01 SimonVT, that makes sense. now when my secondary activity is closed, and my main activity is also closed (by my app before moving to the secondary one), will it not re-start the application in this case? (dont think it will keep anything in memory) Sep 03 04:12:18 Not your application, no Sep 03 04:12:35 Not unless it was kicked out of memory Sep 03 04:13:18 can I ask NDK questions here or is that a different channel? Sep 03 04:13:34 Your activities, however, will be created again when the application is opened Sep 03 04:13:46 Erected: you can ask here :) Sep 03 04:13:53 ok Sep 03 04:14:00 but if it keeps my app in memory, what would be the point of it? the useful activity is closed and has no data. what will it be storing in memory here? (if there are no services, and activities and ... (maybe a bit of sharedstorage I think)) Sep 03 04:14:33 Speed Sep 03 04:14:37 Efficiency Sep 03 04:15:01 Stronger! Higher! Faster! Sep 03 04:15:25 now my question is, since I'm a noob here, and you guys have far more experience than me, what would be a better way to implement this? (or is it looking fine). as leeds didn't like the splashscreen idea and I might be doing some things wrong Sep 03 04:15:36 sinaa: it means the OS doesn't have to initialise your app again, it can just relaunch it Sep 03 04:16:23 even if it only shaves 50% of your start-up time, if that happens every time a frequently-used app is launched, it saves significant CPU (and therefore power, which is more important) Sep 03 04:17:28 It's much faster to load stuff already in memory, as opposed to starting a new process, then launching your application, which requires reading your apk from the internal memory Sep 03 04:18:04 Keeping stuff in memory doesn't cost anything Sep 03 04:18:12 also, by "what would be the point of it?" I basically meant, what exactly is it storing ? will it be for example the compiled app? Sep 03 04:20:08 You'll have to find someone who knows more about this than I do Sep 03 04:21:20 A better implementation, in my opinion, would be to launch the mainactivity, then proceed from there if you determine they're not logged in Sep 03 04:21:48 Your pointless splash screen just adds extra launch time for users that are already logged in Sep 03 04:22:33 and then changing layouts within the activity? (and it would result in a massive file I think) Sep 03 04:22:51 Just launch a new activity for the login Sep 03 04:22:53 Or show a dialog Sep 03 04:23:11 I have to check with the server anyway, and that would take some time. from 100ms to a second or so. so that would be the time splashscreen would show up. Sep 03 04:24:06 You missed a "on wifi" there Sep 03 04:24:11 How do I make a call to getContentResolver.query() that differentiates the URI type for dir and item listing? Sep 03 04:24:48 if it fails, I show an error. (stays on splash screen, then dialog pops up on top of it, and exit on OK) Sep 03 04:24:55 Don't you cache some stuff you can show the user immediately? Sep 03 04:25:40 Somewhere I read that users actually, if they have to wait, like something like a spinny thing, visual reinforcment I guess. But then again why make them wait in the first place? Sep 03 04:26:32 If the user has to wait possibly seconds every time they launch your app before stuff shows up, your app will be perceived as slow Sep 03 04:26:46 SimonVT, I am using a webview to open my local html file. which will update later with the website's api. but before going to that, I have to make sure user is logged in. Sep 03 04:27:20 but dont all the web-related apps show a progressbar or something? they must check with a server if you are logged in or not. dont they? Sep 03 04:28:02 How do I modify the call to getContentResolver.query() so that it uses either the single list item or the directory? Just calling it automatically calls single list yet I'm returning the whole directory of the cursor. Sep 03 04:28:04 nerdshark: i'm sorry for the late reply. i went out for lunch. i've seent his before although i hoped to stay away from the webview as much as possible as i found it too heavy and hence, slow. :) although thank you very much Sep 03 04:28:17 They cache Sep 03 04:28:32 You say it's some social networking stuff, look at twitter, g+, facebook Sep 03 04:28:40 Content shows up immediately Sep 03 04:28:46 Then it loads new content Sep 03 04:30:27 hmm, I think I'll restructure a bit. Maybe it would be better to store if user ever logged in or not. if not, then show splash screen and check. if they did, show the secondary activity while checking. if not logged in then show login page Sep 03 04:30:34 If I had to stare at a progress bar every time I loaded up twitter, I'd find another app Sep 03 04:32:17 ok, so just one last question before I go :D when I'm on activity X, if I launch another activity Y(login), when logged in, if I finish() Y, will it come back to X? and if so, will it create or resume? Sep 03 04:32:26 I am expecting resume here Sep 03 04:32:39 Yes, it'll go back to X Sep 03 04:32:43 And it'll resume Sep 03 04:33:01 Use startActivityForResult to launch the login activity Sep 03 04:33:04 and will it onPause before going to Y ? Sep 03 04:33:11 Set an appropriate result Sep 03 04:33:20 Check in onActivityResult if the login succeeded Sep 03 04:33:26 Yeah Sep 03 04:33:54 thanks for this(startActivityForResult ). its exactly what I wanted. (knew it existed,forgot its name) Sep 03 04:34:16 thanks a lot. been really helpful and I do really appreciate your help and time :) Sep 03 04:36:58 It's just stuff like this you need to keep in mind Sep 03 04:38:19 does anyone have a url to a link on how to set up URI's / how the uriMatcher works? Sep 03 04:39:43 SimonVT: does abs also do contextual action bars ? Sep 03 04:40:19 Like the listview stuff? No Sep 03 04:40:25 ok, thx Sep 03 04:40:33 That would require a custom ListView class Sep 03 04:49:19 i'm so damn slow writing apps, a part of me wants to say minsdk= 16 … by the time its ready, ics will be the next GB XD Sep 03 04:50:48 GB? Sep 03 04:50:49 Write your apps as if minsdk is 16, just make sure along the way it still runs on whatever your actual minsdk is Sep 03 04:51:05 maslen: gingerbread Sep 03 04:51:07 nvm. Sep 03 04:51:36 * maslen just finished reading through the "Snake" sample, and I think I understand most of the important bits, which is pretty cool :) Sep 03 04:51:45 :) Sep 03 04:52:09 * maslen is not used to anything dealing with UI's Sep 03 04:52:23 (not unless you count command-line argument parsing methods) Sep 03 04:55:37 maslen: you may find this helpful http://www.androidpatterns.com/ Sep 03 04:56:31 not sure if they are keeping it up to date though Sep 03 04:57:53 If I am using a content provider internally, is it safe practice to directly use the URI's without matching them? Sep 03 04:58:53 ? Sep 03 05:00:11 g00s: Looks like it might be useful, thanks. Sep 03 05:00:21 I am setting up a contentprovider to use loaders, but am having trouble on how to make calls to getContentResolver.query() when accessing different tables in the database. Speficially I don't understand what's happening with the uri / static uri matcher, which seem to be important for external requests to the cp. Sep 03 05:01:17 loaders use cp, not the other way = they are loader agnostic Sep 03 05:01:39 lasserix: look at the cp in iosched, its pretty compact & easy to understand Sep 03 05:01:40 Yes, I know. Sep 03 05:03:16 I mean about loaders using cps, Sep 03 05:03:22 UriMatcher simplifies uri matching significantly ^_^ Sep 03 05:03:41 and the .match() uses gettype? Sep 03 05:04:05 no Sep 03 05:04:19 When is getType called? Sep 03 05:05:50 Dunno when, it's just the type of the content Sep 03 05:05:52 mime type Sep 03 05:05:55 Sorry I just can't figure out how to use the matcher, and uri's resolving to some type. Since everything is going on internally, I just want to use the URI itself without matching it or whatever, but would like to understand what's going on Sep 03 05:06:19 lasserix: look at iosched Sep 03 05:06:44 I am but it is a little over my head, or at least I still don't quite get what's going on with all the uri related declarations Sep 03 05:07:42 Espicially if I am just using the CP internally, it seems using a uri matcher is useless? Sep 03 05:08:44 you should be using it Sep 03 05:08:53 like SimonVT says, it makes things easy Sep 03 05:09:33 hello. has anybody tried converting webviews to images? Sep 03 05:09:42 Okay, I think I am slowly understanding. But the getType method is primarly so that a client calling upon the CP will know what type of data to expect back? Sep 03 05:09:58 Yes Sep 03 05:10:39 i heard this was possible in iOS. but i don't see any method to achieve this, is it possible to use webviews as images? and maybe later on add them to imageview's? :) Sep 03 05:13:25 mahkie: maybe there is some way to dump the canvas from the view into a bitmap? Sep 03 05:13:43 oooohhh sounds really heavy Sep 03 05:14:17 I think i've seen it done with other standard view widgets, not sure about webview i'm sure you can find it floating on so somewhere Sep 03 05:18:06 If I have two calls, getContentResolver.query(table1_URI, etc) and getContentResolver.query(table2_URI, etc), by using the uriMatcher.match(uri) I should be able to differentiate between table1_uri and table2_uri? Sep 03 05:18:20 Hello everyone, is anyone else having trouble installing Google Services in the sdk? Sep 03 05:18:30 lasserix: thats the point Sep 03 05:21:07 damn it, i need an ics tablet. just looking at screenshots is not enough to get a good feel for how things work & behave wrt the newer designs Sep 03 05:21:11 Ahhh thanks gooes and Simon, finally got it Sep 03 05:21:33 Yeah they are a lot of fun to develop with Sep 03 05:22:01 If I try to make an in-app purchase of an item that was peviously refunded it get's automatically cancelled. Anyone else has this? Sep 03 05:22:25 heh. one has to wonder .... Sep 03 05:22:55 I've seen it mentioned before somewhere, so I'm wondering if it's a problem at Google's end? Sep 03 05:23:19 or intended behaviour, though that would seem odd. Sep 03 05:24:03 i find myself randomly motivated to set up my own mini GSM network testing lab Sep 03 05:24:47 goos are you professional developer? Sep 03 05:25:40 I'm tempted to splurge on ebay for a bunch of resistors, phone covers, and bluetooth GPS Sep 03 05:26:15 lasserix: just a dev working on his own projects Sep 03 05:26:59 jasta: http://www.h-online.com/open/features/Building-a-GSM-network-with-open-source-1476745.html Sep 03 05:27:55 oh yeah, i know all about this stuff Sep 03 05:28:22 i just randomly thought how useful it would be to have one for testing radio resource control algorithms and timeout intervals on battery life Sep 03 05:28:29 rojo says he's not climbing up to service any antennas though Sep 03 05:28:34 kind of went down this rabbit hole of how to actually optimize battery life on these things :) Sep 03 05:28:58 realizing that quite a lot of things are just kind of "yeah, whatever" decisions made by carriers and manufacturers Sep 03 05:39:22 never heard of Super WiFi before. Sep 03 05:39:23 http://www.rawstory.com/rs/2012/09/02/super-wi-fi-poised-for-growth-in-u-s-elsewhere/ Sep 03 05:39:43 'middle of next year' Sep 03 05:40:04 that's how you know it'll be deployed in 2016. Sep 03 05:40:11 hehe Sep 03 05:40:50 if apple adopts it, it will be here middle of next year :D Sep 03 05:41:24 unlike NFC? Sep 03 05:41:40 hehe, zing Sep 03 05:42:19 So when are we predicting that cloud computing wil be ubitiquous? Sep 03 05:42:31 it already is Sep 03 05:43:05 when we have computational contacts Sep 03 05:43:27 to a degree yeah, but not completely. Where i am, cloud computing = using google docs Sep 03 05:44:17 Leeds: I didn't understand the argument about apple & NFC Sep 03 05:45:18 g00s: apparently there's an antenna design issue, if nothing else Sep 03 05:45:41 no idea Sep 03 05:48:29 in the sense that NFC likes to have a big flat antenna which is near the back cover of the phone, and not covered by metal - it's *very* low-power and short-range - and that doesn't really fit with iPhone designs Sep 03 05:49:17 anyway, now that my second N7 has arrived, a month after it was thought to be list in the post, it is now time for lunch - and I'm in the mood for quiche, dammit! :) Sep 03 05:50:11 hehe, quiche Sep 03 05:50:24 real programmers eat it Sep 03 05:51:06 mmmm quiche Sep 03 05:51:30 mmmmm..... /me out Sep 03 05:51:35 Jak_o_Shadows: http://slashdot.org/topic/cloud/big-surprise-cloud-computing-still-surfing-big-hype-wave/ Sep 03 05:52:40 within that time frame, 2-5 years, most australians won't even have 10Mbit internet... Sep 03 05:53:00 i'm more worried about the privacy implications, but anyhow Sep 03 05:53:25 just need the double holomorphic encryption scheme Sep 03 05:53:40 In australia we're going through another "Legistate twitter! Ban Internet Trolls!" again. Sep 03 06:07:02 I am having a (probably simple) problem with fragments and tabs. When I click on my tab, the appropriate fragment is not displayed. In particular I am not sure what to use for the containerViewId. Do I have to create like a linearLayout and give it an ID just to be the container for any fragments I wish to display? Sep 03 06:09:17 briswolf are you using abs? Sep 03 06:09:30 *ActionBar Sherlock Sep 03 06:09:37 yes! Sep 03 06:09:55 the recomended way to use tabs and ABS is to a use a page viewer to hold the layouts for your different tabs Sep 03 06:10:09 ok. I'll check the samples Sep 03 06:10:11 then on tab selected you can switch between the pages in the pager viewer adapter Sep 03 06:10:19 *pager view not page viewer Sep 03 06:10:19 I looked at the sample for tabs and it used a tabhost... hadn't seen that before Sep 03 06:10:26 ok great Sep 03 06:10:34 yeah tabhost is deprecated, way to do is with a pager adapter Sep 03 06:10:42 last i heard anyways Sep 03 06:10:47 ok thanks I'll get reading Sep 03 06:11:08 no worries good luck! Sep 03 06:12:30 if its just a couple tabs, you don't really need a ViewPager Sep 03 06:12:47 https://github.com/JakeWharton/ActionBarSherlock/blob/master/samples/demos/src/com/actionbarsherlock/sample/demos/TabNavigation.java Sep 03 06:13:09 I've read that Sep 03 06:13:14 and yeah my tabs work Sep 03 06:13:23 but I am confused how to change the fragment Sep 03 06:13:31 my first fragment is defined in the layout for the activity Sep 03 06:13:37 hm my opengl android app doesnt recover from window switches Sep 03 06:13:55 in the page viewer adapter you can specify a layout id for each page Sep 03 06:14:00 each page corresponds to a tab Sep 03 06:14:07 Good evening. Anyone know anything about the OMGB build for the Rhodium devices? I have a problem and was hoping someone could help. Sep 03 06:14:22 i'm not sure but I think you have to remember to manage them (ie when tab unselected / remove the fragment or whatever) Sep 03 06:14:38 KaliBoson you mean orientation change? Sep 03 06:14:39 in onTabSelected(), you could switch() on tab.getPosition() and show() and hide() your fragments Sep 03 06:14:54 based on which tab is selected Sep 03 06:15:19 ok, that sounds simple enough Sep 03 06:37:13 um, can i change the targetSdk of abs to 16 ? Sep 03 06:39:11 SimonVT: around ? Sep 03 06:42:46 mmm... gazpacho! Sep 03 06:43:36 Is the sample for fragments/tabs/viewpager a bit out of date in ABS4.1? Sep 03 06:43:48 it uses the tabhost Sep 03 06:44:16 no Sep 03 06:44:21 no? Sep 03 06:44:24 cool Sep 03 06:44:37 there are alternate samples that use the action bar tabs Sep 03 06:44:45 oh I see Sep 03 06:45:58 JakeWharton: is it safe to change the targetSdk to 16 for abs 4.1.0 ? Sep 03 06:46:05 targetSdk doesn't really do anything Sep 03 06:46:12 it can be anything over 11 Sep 03 06:46:19 set it to 18 Sep 03 06:46:25 get all the cool features of the next two releases Sep 03 06:46:37 sorry to be a pain, can you point them out to me? are they in the samples folder? Sep 03 06:46:40 ok, thx. i thought that might be the problem i guess not; just a bunch of red X's when i create a library project out of it Sep 03 06:47:04 briswolf: the api is exactly that of the native action bar API Sep 03 06:47:43 http://developer.android.com/guide/topics/ui/actionbar.html#Tabs Sep 03 06:48:16 I have tabs working, just don't know how to glue that together with fragments. I'm new at this, missing some key concepts I think. Sep 03 06:48:34 they're two totally separate things and you should think of them as such Sep 03 06:48:49 tabs provide a simple callback Sep 03 06:49:15 one way to react to that callback is to do a fragment transaction to change the content vie Sep 03 06:49:16 w Sep 03 06:49:23 yes Sep 03 06:49:29 I got that working Sep 03 06:49:34 now I am trying to use a viewpager Sep 03 06:49:48 JakeWharton: i keep getting red X's on ABS code saying 'the method must override a superclass method' … does this sound familiar ? Sep 03 06:49:57 yes, use JDK 1.6 compliance Sep 03 06:49:58 must have something misconfigured Sep 03 06:50:00 also, don't use eclipse Sep 03 06:50:05 it's not very smart Sep 03 06:50:30 project properties > java compiler > 1.6 Sep 03 06:50:42 look for the 'Disable being stupid' checkbox while you're in there Sep 03 06:50:52 not for you, for eclipse Sep 03 06:50:55 there is a good video on the ABS website Sep 03 06:50:56 didn't mean to imply you're stupid Sep 03 06:51:14 that fixed it, thanks. weird that i have 1.6 set globally in eclipse, but it did its own thing for this project Sep 03 06:51:23 yeah I have no idea why it does that Sep 03 06:51:34 some ADT/Eclipse disconnect going on Sep 03 06:52:42 briswolf: yeah I don't think there's a sample that combines all three of those things Sep 03 06:53:33 ok. before I go further, if I use a viewpager, does that keep all the fragments around even when they aren't visible - i.e. when I go back to an old fragment, does it keep the UI state of all the views? Sep 03 06:53:53 by default a ViewPager only keeps one adjacent page inflated Sep 03 06:54:05 right. So I have to fix my UI issues anyway Sep 03 06:54:11 gah I dislike that about android. Sep 03 06:54:37 I assume then all a viewpager gets you is some nice slide transitions Sep 03 06:54:40 and the gestures Sep 03 06:54:42 hey, is there a simple way to edit relative layouts? i have a layout with about 20 buttons, everything is relative to something. when i try to move something everything goes carzy Sep 03 06:55:04 briswolf: precisely Sep 03 06:55:10 it's just visual sugar Sep 03 06:55:16 socket: use better layouts :) Sep 03 06:55:19 socket: what do you mean by simple? You could edit the xml? or use the graphical editor? Sep 03 06:55:53 a graphical editor like in eclipse, but something that works better Sep 03 06:56:09 can you not use nested linear layouts? Sep 03 06:56:29 or maybe an absolute layout... if you really need it Sep 03 06:56:34 NOOO Sep 03 06:56:41 *hides* Sep 03 06:56:41 im writing a calculator, all the calculator buttons Sep 03 06:56:42 hehe Sep 03 06:56:49 socket: you should try GridLayout Sep 03 06:57:14 http://android-developers.blogspot.com/2011/11/new-layout-widgets-space-and-gridlayout.html Sep 03 06:57:22 there's an API 7+ back port Sep 03 06:57:49 not sure why they picked 7, pretty sure I had it working 4+ before without the need of it being a library project too Sep 03 06:58:31 so for a calculator design, you're thinking grid layout is the best? Sep 03 06:58:44 absolutely, the buttons are basically in a giant grid! Sep 03 06:58:59 or multiple grids Sep 03 06:59:16 thanks, i will give it a shot Sep 03 07:08:03 JakeWharton: actually a viewpager lets me go between 2 tabs without having to worry about persisting the state of the UI in the old tab - unlike the fragmentTransaction.replace method - although I have a feeling that I am using that wrong, and should be adding the old fragment to the backstack... so much to learn. Sep 03 07:08:29 yeah it keeps one adjacent page in each direction Sep 03 07:08:47 a reliance on stateful views is always a bad decision though Sep 03 07:08:53 yes, I agree Sep 03 07:09:06 how do I persist the state of my fragment, or where? and for how long? Sep 03 07:09:06 briswolf do you really want the back button to switch a tab? Sep 03 07:09:22 lasserix: not really, no. Sep 03 07:09:42 then i dont think you have to worry about adding it to the backstack anyways Sep 03 07:10:38 ok. The reason why I want to keep the state of my UI is that it was setup by talking to an accessory Sep 03 07:11:21 the info is cached, but it is cached in a remote service. I can only access that service from a worker thread, not the ui thread Sep 03 07:11:49 I can't recall if this is a limitation of the service or something I mandated (perhaps as a workaround for something terrible, like binding the service...) Sep 03 07:12:22 in short, I think I should move the cached information to my local application so I can populate the fragment each time it is inflated. Sep 03 07:15:27 What kind of info is it? Sep 03 07:16:11 model number, serial number, battery level <- battery level is the sticky part for me, the others are cached locally in my wrapper library Sep 03 07:16:47 I will just have to do it async and the label might not be there for a little while. I think that is the right way to do it anyway Sep 03 07:16:49 hmm Sep 03 07:17:30 just make sure the null label is moving to give the semblence of progress happenning Sep 03 07:17:39 *is animated somehow Sep 03 07:17:44 ok great suggestion :) Sep 03 07:17:45 thanks Sep 03 07:18:07 seriousily that's why mac users never say their mac crashes, it just pauses and works... Sep 03 07:18:22 hah most mac users don't use xcode obviously Sep 03 07:18:58 don't get me started on mac! I will be banned for life ;) Sep 03 07:20:10 Are you developing for fun? Sep 03 07:21:19 no, it is my full time job. I do it all, palmos, winmo, bb, android, ios, embedded C firmware, hardware design... Sep 03 07:21:58 Oh wow, hardware design too huh? Sep 03 07:22:00 briswolf: which mobile platform do you enjoy the most ? Sep 03 07:22:07 well, I love java Sep 03 07:22:09 so not iOS Sep 03 07:22:23 and then there is apple :/ Sep 03 07:22:36 I am enjoying android a lot, but it is also hard going to learn the concepts of the ui Sep 03 07:22:46 in particular the XML/java divide for me Sep 03 07:22:56 in the BB days I did all layouts in java Sep 03 07:23:00 I know I could do that here Sep 03 07:23:06 but I like doing things "the right way" Sep 03 07:23:12 hence why I am learning fragments now Sep 03 07:23:21 because I know my work will need to go on tablets soon Sep 03 07:23:39 It gets factorially easier as time goes on Sep 03 07:23:53 usually I do driver/library development and so not much UI stuff Sep 03 07:24:03 or, as little UI as I can to get by Sep 03 07:24:04 ahh Sep 03 07:24:16 but I am putting in the effort this time Sep 03 07:24:28 any good urls on developing drivers via usb for android devices? Sep 03 07:24:47 as in, the android is the USB host? Sep 03 07:24:58 the android documentation is rather good around USB Sep 03 07:25:13 Yeah, I have a microphone adapter I wanted to write drivers for so i could plug it into my tablet instead of having to haul my labtop around Sep 03 07:25:29 cool. I'm sure you could do it. Might need to study the USB spec first Sep 03 07:25:54 I have been working with USB since 2007, it can be a bit to get your head around. especially isochronous stuff, which your mic probably is... Sep 03 07:26:18 you would probably be better trying it on linux/win desktop first using libusb - that will be easily ported to android Sep 03 07:26:28 lbusb cool Sep 03 07:26:33 *libusb Sep 03 07:26:36 thanks Sep 03 07:26:44 also, you might need to go native on android to get the throughput... who knows. when hardware is involved things tend to get complicated Sep 03 07:26:54 do you know what the mic outputs? Sep 03 07:27:00 can you get a spec from the manufacturer? Sep 03 07:27:03 yeah but I'm going to have to cross that bridge at some point Sep 03 07:27:06 otherwise you will be reverse engineering Sep 03 07:27:06 yeah I believe so Sep 03 07:27:11 and that ain't fun. Sep 03 07:27:15 I've seen some people maybe do it already for linux Sep 03 07:27:26 or attempt or there's been curiousity Sep 03 07:27:28 ahh cool. well you might be able to port that to android Sep 03 07:27:30 ok Sep 03 07:27:33 cool Sep 03 07:27:43 Thanks! Sep 03 07:27:52 unless... unless it is isochronous Sep 03 07:27:54 and then maybe not Sep 03 07:28:00 maybe android only supports bulk Sep 03 07:28:03 anyway, have fun! Sep 03 07:28:45 I will figure it out, future project. Still gota complete what's on the stack already Sep 03 07:28:51 but thanks again Sep 03 07:28:55 yeah, tell me about it Sep 03 07:30:45 Have you done any work with the biofeed mechanisms? Sep 03 07:31:04 no, I've not heard of them Sep 03 07:31:17 Oh you probably have I am just using some outdated term Sep 03 07:31:58 *brain interface devices Sep 03 07:32:13 oh cool. no :) Sep 03 07:32:16 I haven't Sep 03 07:32:44 There's a bunch of different companies but I've seen some around 200-300 dollars Sep 03 07:32:55 just EEG type equipment? Sep 03 07:33:00 Basically Sep 03 07:33:15 And you can use pattern recognition to train behaviors Sep 03 07:33:30 I've been in some studies, I have an identical twin brother. We've done all kinds of scientific tests Sep 03 07:33:44 I've had the caps on, been in MRI machines etc Sep 03 07:33:48 I think the classic example is that there's a game where there's a box you tie a rope around by turning the box, usually with some button controls, but then they override that so you control the box's rotation by thinking about it Sep 03 07:33:52 it is interesting stuff Sep 03 07:33:55 oh crazy Sep 03 07:34:19 yeah, here in australia they do a lot of that research through the twin registry Sep 03 07:34:35 anyway it's 5:30pm I best go home :) Sep 03 07:34:39 Then again I saw this article the other day! Sep 03 07:34:41 good chatting, thanks for the help Sep 03 07:34:44 http://www.extremetech.com/extreme/134682-hackers-backdoor-the-human-brain-successfully-extract-sensitive-data Sep 03 07:34:52 oh well nice to meet you! good luck on your projects Sep 03 07:35:00 thanks too Sep 03 07:35:10 are you on twitter? Sep 03 07:35:14 Not yet Sep 03 07:35:19 but I stick around here all the time Sep 03 07:35:30 ok. cool. I am in here every few days Sep 03 07:35:32 seeya Sep 03 07:35:36 See ya! Sep 03 07:40:19 What layout does settings.apk use? Sep 03 07:49:38 it's a PreferenceActivity Sep 03 07:51:38 hi, can someone help me please? http://stackoverflow.com/questions/12239871/android-in-app-check-if-an-item-has-been-purchased Sep 03 07:59:17 is there a way to set the gridview to only have 1 row? Sep 03 08:04:33 well tableview will do the job for what i need Sep 03 08:07:33 hahaha Sep 03 08:08:16 going thru and teaching myself unit tests, JUnit, etc. wrote a test class for one of my business objects, real simple stuff Sep 03 08:08:23 end up finding a bug thanks to the tests. Sep 03 08:09:56 in AndroidManifest.xml under application i had theme that worked until i added screenOrientation landscape to activity under application Sep 03 08:11:37 i tried adding screenOrientation landscape to application also but didnt fix Sep 03 08:15:21 stupid question; using dropbox integration - whats the difference between having dropbox app on your phone and letting it sync directories you specify, vs using their api ? i guess one thing i can think of maybe is that it can access files in your private data space ? anything else ? Sep 03 08:16:42 dropbox app i think not support syncing (mobile app) Sep 03 08:16:52 just a client for browse ur account Sep 03 08:19:43 ah, ok - i guess that is what dropsync does Sep 03 08:21:25 Bear10 a linear layout will do that Sep 03 08:22:03 g00s: oh dropsync maybe do; i just said about official dropbox client Sep 03 08:24:33 FragmentPagerAdapter only loads fragments, correct? If I had two layouts in the adapter: layout A with two listfragments and layout B with whatever, I can't use FragmentPagerAdapter n'est pas? Sep 03 08:24:57 Hey guys Sep 03 08:25:35 Hello sasson Sep 03 08:28:43 lasserix, yeah thats true but then i run into lint issues saying things like "nested layout weights are bad for performance" even though its only 2 levels Sep 03 08:28:52 in the end i just went with a table layout, seems to be doing the trick Sep 03 08:31:21 I want to call a different image each time a timer is set off, the img files are named "letter1" "letter2" "letter3" and so on, I want to call the images as imageName = "R.drawable.letter" +currentLetter; (currentLetter is an int increasing each call) and then set the image as imageABC.setImageResource(imageName); ... but the setImageResource only get if I hardcode "R.drawable.letter1" Sep 03 08:31:22 /2/3 Sep 03 08:32:15 the wierd thing is the eclipse tells me setImageResource() should get an int Sep 03 08:35:50 goedemorgen! Sep 03 08:36:49 morning Sep 03 08:38:19 sasson all the values of R are generated automatically, so I dont believe you can simple overload the "+" to get the right id Sep 03 08:38:49 what you could do is populate an array of all the R.drawable.* Sep 03 08:38:55 then iterate through that as you need Sep 03 08:39:38 sound good... could I make a folder of imagaes in the R.drawable directory? Sep 03 08:39:51 no Sep 03 08:39:56 will cause problems Sep 03 08:40:24 But since this sounds important you should take the time to properly make your drawables accomadate different screen types Sep 03 08:40:58 ie R.drawable.hdpi R.drawable.mpdi basically, you just drop the corresponding file (with the same name) in the different folders and android will pull the corresponding one Sep 03 08:41:04 true. but how is that got anything with populating an array with the R.drawable ? Sep 03 08:41:21 ohh I c Sep 03 08:41:38 So you make int[] mDrawables = { R.drawable.letter1 ... } Sep 03 08:41:50 and iterate that as you need Sep 03 08:43:11 sounds good Sep 03 08:44:15 But in general you cannot assume ids in R.* will be neatly incremented Sep 03 08:45:32 if dorring the run if application will try to pull a file from the R directory and for some reason it won't exict would it crash the app? Sep 03 08:45:53 Umm Sep 03 08:45:58 so I'll put it in try/catch...? Sep 03 08:46:07 the R directory is an index of pointers Sep 03 08:46:52 I could be wrong, but it does not contain files themselves, android system on compile generates reference ids (R.*) for stuff in your folders (layout, drawable, etc) Sep 03 08:47:16 so I won't get a null exception but I don't know what will the pointer will point to... Sep 03 08:47:47 Files in your drawable folder will, unless I am mistaken, never change Sep 03 08:47:51 during runtime Sep 03 08:48:38 but I assume they can change dorring a virus run or messing with files and excidentily delete them Sep 03 08:48:48 i dont think so Sep 03 08:48:54 virus run ~~~ Sep 03 08:48:57 ;) Sep 03 08:49:01 i mean if the hardware corrupts maybe? Sep 03 08:49:16 yeah but if that's going on the app is the least of the persons worries ;p Sep 03 08:49:34 :) Sep 03 08:49:48 are you making a slideshow app ? Sep 03 08:50:23 game app with random letter picking in the start Sep 03 08:50:30 thanks for your help, I'll let you know how it went Sep 03 08:51:00 cool yeah should be no problem, but if you use bitmaps don't forget to call recycle from time to time so you dont get OOM problem Sep 03 08:51:53 I'll keep that in mind Sep 03 08:53:24 how do i force a viewpager to scroll to a certain page? Sep 03 08:53:39 sasson ya gever Sep 03 08:58:16 lasserix: pager.setcurrentitem? Sep 03 09:02:17 sup socket Sep 03 09:09:49 ixc thanks i figured it out i always think its set page Sep 03 09:11:14 ahoy Sep 03 09:11:45 is there a way to get raw frames from a running MediaRecorder? Sep 03 09:12:42 i use camera.setPreviewCallback() which doesn't work when MediaRecorder is running, has anyone figured out a way to get the raw data of the currently captured frame? Sep 03 09:12:52 not sure whether to make a service or a singleton.. want to make a component that handles background updating of datas Sep 03 09:22:53 How to change textsize in my listfragment?! Sep 03 09:23:29 theme? other layout? Sep 03 09:23:37 Oh yeah Sep 03 09:23:42 Man I am blanking tonight Sep 03 09:25:35 run a thread in the background that executes every 10ms and calls: for(int i=0; i :) Sep 03 09:27:15 the background thread is necessary because a listview doesn't have all of it's views as children at any one point (this is a known bug in listview) Sep 03 09:28:06 not having ALL views as children is not a bug i think.. it purposely rolls through the views which are not on the screen anymore? Sep 03 09:28:31 might be out of context, just joined. Sep 03 09:28:46 you should learn about sarcasm from sheldon Sep 03 09:29:39 do i get points for creativity? Sep 03 09:29:49 a part of me wants to try and implement that in code to see if it'll work :x Sep 03 09:31:36 in AndroidManifest.xml under application i had theme that worked until i added screenOrientation landscape to activity under application Sep 03 09:32:44 i spam this question not by choice but by necessity Sep 03 09:37:54 Howdy #android-dev Sep 03 09:42:41 Is-it possible in a gridlayout row to have the height of the second column element? Sep 03 09:43:56 hello Sep 03 09:44:07 hi Sep 03 09:44:16 wanna get Sony Xperia S later today Sep 03 09:44:20 anyone wanna prevent me? Sep 03 09:44:21 :| Sep 03 09:44:43 for app development? Sep 03 09:44:57 how hard do you think google employees laugh when you say the word "standards" Sep 03 09:45:26 does anybody know how can i know the contacts are updated in my phone through android application? Sep 03 09:45:27 anyway i got a prob, i set the background for a webview to be transparent and it comes up as white in xperia Sep 03 09:45:32 any suggestions? Sep 03 09:46:10 or anybody suggest me how to contact synchronize Sep 03 09:46:24 in android application Sep 03 09:47:02 jagruti_: http://developer.android.com/guide/topics/providers/contacts-provider.html Sep 03 09:49:44 Leeds: do you mean i will use the contact database right? Sep 03 09:49:59 that's how you deal with contacts, yes Sep 03 09:52:04 Leeds: can you suggest me something more.because i have never used the content provider Sep 03 09:52:33 you read that whole page, and the introduction to content providers, already? Sep 03 09:52:39 i have use the content observer and i can get the onchange() function work when somebody will update the contact in phone Sep 03 09:53:43 SpearThruster: why not get a nexus for dev :| Sep 03 09:54:45 man. http://news.ycombinator.com/item?id=4469424 Sep 03 09:55:00 Fabrice is one /smart mother fucker/ Sep 03 09:58:10 g00s: nah, nexus devices are too wonderful. How are you supposed to understand the misery of your users without a non-aosp device? Sep 03 09:58:23 Ankhwatcher: :) Sep 03 09:58:24 g00s: holy fuck, he never ceases to amaze Sep 03 09:58:45 How do I findViewById on a custom list fragment? Sep 03 09:59:20 Ankhwatcher: my droid-1 is fulfilling that duty of emulating misery very well Sep 03 09:59:48 p_l: i bet you would like that story ^^^ Sep 03 10:00:13 Emulated Misery was my Nirvana cover band Sep 03 10:00:22 oh, on d.android.com appear view source link :) Sep 03 10:00:22 hah Sep 03 10:03:06 Why does my listfragment try to resolve as a view when i am findingviewbyid? Sep 03 10:04:34 for getting the updated contacts what is the better way? like fetch directly from phone,contact database or from sqlite database as per performance? Sep 03 10:04:53 findviewbyid, cast it Sep 03 10:05:01 oops, wrong end bold Sep 03 10:05:02 sorry Sep 03 10:07:30 How can I know if the device I'm running on has 32-bit colors by default? Sep 03 10:07:51 I am but it keeps trying to resolve as a view Sep 03 10:09:51 yall dont help me .. yall DONT help me Sep 03 10:28:10 Fuck it is frustrated when a previous saved worked Sep 03 10:29:49 lasserix: previous saved what? Sep 03 10:30:55 Can you call findViewById on a fragment declared in the xml/ Sep 03 10:32:42 lasserix: how about findFragmentById? Sep 03 10:33:10 Hello Sep 03 10:34:06 I have problem with populating listview from JSON.. I suppose this is a common problem.. I have found some examples on google but nothing helped.. Sep 03 10:34:26 here is my code: http://pastebin.com/198NaV2M Sep 03 10:34:30 mr6: google's fault; that method is named rather cryptically Sep 03 10:34:32 mr6 yeah that was it just did it in the AM totally missed findfragment Sep 03 10:34:34 common people have common problems Sep 03 10:34:43 here is the error: http://pastebin.com/ETZusp4p Sep 03 10:35:14 torniker, can you read that exception out loud for yourself? Sep 03 10:35:16 mh`: hah what can I say, I've never even used fragments in code, just apparently know how to search apidocs Sep 03 10:35:26 torniker, it tells you what you're doing wrong Sep 03 10:35:33 not related to listviews or json at all Sep 03 10:35:45 fa-tale? fa-toll? Sep 03 10:35:56 just read this torniker: "android.os.NetworkOnMainThreadException" Sep 03 10:36:06 dude spoiler alert Sep 03 10:36:11 :) Sep 03 10:36:27 Zharf, I can but i dont know how to fix it Sep 03 10:36:41 dont do network on main thread Sep 03 10:37:22 ixc, If I create a new thread then I cannot access UI Sep 03 10:37:42 paradox (tm) Sep 03 10:37:49 please, read some articles about android and threads Sep 03 10:37:49 there's this thing called StrictMode... Sep 03 10:38:05 lazy devs get around it by disabling it or targeting old apis... Sep 03 10:38:32 mr6: its good way to make ANR Sep 03 10:38:44 torniker would never do that though so he is going to go search for docs on updating the UI from a background thread Sep 03 10:39:00 will msg.split(":") work if msg contains "SomeText: other:text" ? Sep 03 10:39:16 note the space between the first colon and the word after that colon Sep 03 10:39:55 space is a character, not different from others Sep 03 10:40:25 mr6, so there is a way to update UI from background thread right? Sep 03 10:40:27 ixc: i wasn't suggesting it Sep 03 10:40:45 right Sep 03 10:40:48 torniker: yes it is usually called IPC Sep 03 10:41:03 and android makes it child's play with AsyncTask Sep 03 10:41:33 mr6, thank you.. I'll go search for IPC now :) Sep 03 10:41:41 mr6: *IRC Sep 03 10:42:00 even without it you've got things like runOnUIThread which simplify the hell out of what real programmers have been doing for ever Sep 03 10:42:18 if you have constant background thread, then create two handlers, one in the UI thread and one in the background thread Sep 03 10:42:31 then just send messages from background to ui thread Sep 03 10:42:57 no if is not constant .. I just get the data from some url and put it in the list view Sep 03 10:43:15 torniker: AsyncTask is full of win for you Sep 03 10:43:22 asynctask is quite high abstraction and makes life hard on more complex situations Sep 03 10:43:46 so what shall i use? Sep 03 10:43:56 AsyncTask sounds good for that purpose Sep 03 10:44:26 but keep in mind that if you do a lot of HTTP queries to same server, you should keep the client object between these requests Sep 03 10:44:45 because otherwise there are unnecessary http roundtrips Sep 03 10:44:53 TCP roundtrips sorry Sep 03 10:44:55 aolin, thanks Sep 03 10:45:01 aolin: yes but this guy didn't know about threads 2 min ago Sep 03 10:45:21 mr6: oh, I see Sep 03 10:45:47 aolin: but you're right, asyncTask is great for one-off tasks Sep 03 10:47:36 that supposes that http keepalive is long enough and that the device doesn't drop the connection (out of packetloss or otherwise) Sep 03 10:48:34 mh`: well if there is more than few seconds between the requests it doesn't matter anyhow Sep 03 10:49:04 depends how big the requests + responses are Sep 03 10:49:04 mh`: but if the requests are back to back and you're using asynctask setup that creates new HttpClient every time, it's the most uneffient way to do the job Sep 03 10:49:10 the restart of window scaling can be significant on high latency Sep 03 10:49:18 hah, yeah, of course :) Sep 03 10:49:46 mh`: I've seen that so many times on android apps not done by me :D Sep 03 10:50:09 Why wouldn't a viewpager instantiate any items? Sep 03 10:50:18 aloa Sep 03 10:50:36 lasserix: is this a riddle? Sep 03 10:50:45 I like riddles Sep 03 10:51:01 I am looking for some more information about android device encryption - an ideas ?? (not http://source.android.com/tech/encryption/android_crypto_implementation.html) ;D Sep 03 10:51:10 I find my Viewpager via xml, instantiate the adapter, set the adapter and nothing Sep 03 10:52:32 Pinas: hah there's more info on that page then you need I would imagine Sep 03 10:53:10 Fucking getcount Sep 03 10:53:26 Pinas: if you need more that that maybe go ahead and dig into the AOSP code Sep 03 10:54:13 Is calling setContentView several times a bad idea? Sep 03 10:55:11 mr6 - you probably are right, what I am actually looking for is some infor what exactly is encrypted. When reading this document I think that only /mount/sdcard and /data is encrypted - but what's done with the data stored in /system ? Sep 03 10:55:16 Is there any reason I can't reuse setContentView? Sep 03 10:55:36 Pinas: why would /system need to be encrypted? it's read-only Sep 03 10:56:18 mr6 yea that's right but encryption should protect against read not write Sep 03 10:56:36 Pinas: oh? Sep 03 10:56:40 please explain Sep 03 10:57:15 hi Sep 03 10:57:17 can I publish an application containing DES encrypted files on Google Play ? Sep 03 10:57:24 mr6: well if I encrypt data i don't want someone to read this data. If /system is read-only everyone can read data on this partition. Sep 03 10:57:33 but you can't put any data into /system Sep 03 10:58:14 mh` - yea that's what I realised right now ... Sep 03 10:58:22 keanu Sep 03 10:58:30 maxagaz: umm...you can publish it sure but why / how will you decrypt? Sep 03 10:58:33 maxagaz: why not? Sep 03 10:58:53 p_l: because of some laws in the US Sep 03 10:58:53 mr6, mh` sorry for the stupid question and thx for your help Sep 03 10:59:03 maxagaz: the laws in US were about export Sep 03 10:59:23 Pinas: if you think that was a stupid question just stick around... Sep 03 10:59:24 maxagaz: and DES is no longer covered (by being shitty encryption choice) Sep 03 10:59:34 p_l: if you are selling a product that includes DES in a app store that is hosted in US, then you are exporting crypto, aren't you? Sep 03 10:59:39 p_l: what about aes ? Sep 03 10:59:40 ya we're happy to import your bad encryption np Sep 03 10:59:52 hrnt: i believe that's called 'importing' Sep 03 11:00:02 maxagaz: so if you a) are not based in USA b) limit distribution to USA, it should be fine Sep 03 11:00:06 if I have already created an sqlite DB on the phone using JS/jQuery, can I access it normally using Java? Sep 03 11:00:20 wut, the U.S. still cares about "exporting crypto"? Sep 03 11:00:26 I thought all that stuff died like over decade ago Sep 03 11:00:38 alankila: for example if you are using crypto in a iOS app (even SSL!) then you need to declare that Sep 03 11:00:40 Sicp: afaik yes, why don't you try it? Sep 03 11:00:43 p_l: I'm not in the US but google play is in the us Sep 03 11:00:48 mr6: yea maybe reading some even more stupid question will raise my confidence - i need that know :D Sep 03 11:00:48 hrnt: I'm not sure if Google Play can be considered to be located in just one place, afaik Sep 03 11:01:00 I am writing the code, mr6; just wanted to make sure Sep 03 11:01:14 because you see, when there is no creation to be done, I am not sure what will go into the DBHelper class Sep 03 11:01:15 hrnt: really. I doubt anybody actually cares. Sep 03 11:01:16 so...yea Sep 03 11:01:18 maxagaz: technically... I'm not sure what they could do to you Sep 03 11:01:25 alankila: well, they do, although it is pretty random Sep 03 11:01:30 p_l: try and find out Sep 03 11:01:42 Sicp: well if it doesn't work for some reason you can always just dump the db and re-import Sep 03 11:01:46 p_l: okay, so at most, I should would maybe just have to rewrite some code Sep 03 11:01:47 as things are usually in the iphone land :P Sep 03 11:01:56 http://www.buildingiphoneapps.com/buildingiphoneapps/2010/9/21/submitting-ios-app-with-encryption-part-1.html Sep 03 11:02:08 see this for example, it has a screenshot of the questionnaire you need to fill when releasing an app to the app store Sep 03 11:02:16 same for blackberry! Sep 03 11:02:53 hrnt: for the app store version, I already removed the aes encryption and replaced it by an obfuscation code Sep 03 11:02:54 mh`: well, I'm not US citizen nor resident there. And if I really wanted, I could download the crypto part from other source Sep 03 11:03:08 http://zetetic.net/blog/2009/8/3/mass-market-encryption-ccats-commodity-classification-for-ip.html here is the whole process (fortunately no longer required) Sep 03 11:03:15 http://stackoverflow.com/a/11372765/282638 Sep 03 11:03:22 answer ^ Sep 03 11:03:26 also, I'm not sure if AES is controlled export... not to mention that Android pretty much requires encryption support since 2.2 Sep 03 11:03:47 Ui blows Sep 03 11:06:03 lasserix: agreed Sep 03 11:06:54 If I am using ABS but I need one of my tab navigations to include >2 listfragments what can i do? Sep 03 11:06:55 mh`: note that the answer only applies if your app is 5x002. Sep 03 11:07:07 Can fragments be emdbedded in fragments? Sep 03 11:07:31 keanu.jpg Sep 03 11:08:58 well, the answer is pretty simple... Since android and ios contain encryption, if the application is going to be restricted in that country, there are no androids and iphones to begin with, I guess. Sep 03 11:09:08 its not just about restrictions for the 10th time Sep 03 11:09:11 there are declarations to be made Sep 03 11:09:14 stop misleading Sep 03 11:09:35 so I would argue that filling that form in any other way except stating "it uses maximum encryption for everything, even your mom", just to cover your ass costs no sales. Sep 03 11:09:43 http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113770 Sep 03 11:09:46 see this Sep 03 11:09:51 um, that you should fill that form in that particular way Sep 03 11:09:57 the US export laws are not that simple Sep 03 11:10:00 Hello, I have a performance problem with the Android emulator and opengl 2...After a while the fps is coming down...I traced the execution and it seems the glBufferSubData function I use is taking more and more time (starting from 3 ms down to 30).Has anyone got the same problem? Sep 03 11:10:34 What's the worst that could happen if I just use setContentView to handle my tabs so that I can implement ABS and be compatable and still use multiple list fragments?!?! Sep 03 11:11:00 how do i center everything in the layout ?http://s12.postimage.org/dwpypipvf/grid.jpg Sep 03 11:11:16 layout_gravity Sep 03 11:11:20 the absolute worst? Sep 03 11:11:38 i suppose there's a non-zero chance you cause a singularity Sep 03 11:11:39 thanks lasserix Sep 03 11:11:40 Yeah if I just put setContentView in my tablistener Sep 03 11:11:54 Awesome, I always wanted to do that one day anyways Sep 03 11:13:10 this is my DBHelper class, http://pastebin.com/028yPjfC and this is my SMSListener class, http://pastebin.com/gup6CAe0 ..why would I get an error at line 40 of the SMSListener, the fixes say "change the contructor of DBHelper to be "Context, SMSListener" Sep 03 11:13:17 isn't "this" the context? Sep 03 11:13:26 lasserix: android:layout_gravity="center" doesnt change anything Sep 03 11:13:48 that's a gridview right? Sep 03 11:13:50 what is even more bizarre is that the encryption rules apparently cover stuff libraries do behind your back. Like any good bureaucracy's shit, what they want you to comply with is in fact impossible for you to comply with. Sep 03 11:13:58 as I understand you can change UI from asyntask from onPostExecute method, is this right? Sep 03 11:14:10 yes lasserix, grid layout Sep 03 11:14:15 so because user can encrypt the data partition, I guess your app is now using encryption. Sep 03 11:14:18 torniker also on what the update methods Sep 03 11:14:48 lasserix, ok I can do for example: setListAdapter(new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, ChanList)); Sep 03 11:15:05 alankila: just don't use anything made in the US if it's that big of a deal Sep 03 11:15:14 socket try gravity on the parent view of the gridview? Sep 03 11:15:22 lasserix, and it work fine, but when i try to use custom view like new ChannelAdapter(MainActivity.this, R.layout.chanitems, ChanList) Sep 03 11:15:30 lasserix, it gives me error Sep 03 11:15:31 I have a better idea: how about U.S. fixes some of these types of laws. Sep 03 11:15:41 fortunately you can nowadays avoid the encryption registration for most of the apps that are not specifically about encryption Sep 03 11:15:48 alankila: whats in it for us Sep 03 11:15:49 lasserix, android.os.NetworkOnMainThreadException Sep 03 11:16:04 i can't remember the exact rules but i remember that our app that just used SSL qualified for that exception Sep 03 11:16:47 torniker i have no idea but im assuming for that you have to do post, i was refereing to progress indicator from async task's convience method Sep 03 11:17:03 also you want to use a loader Sep 03 11:17:25 loaders are like async tasks designed for lists Sep 03 11:17:35 google loader load manager Sep 03 11:17:46 lasserix, thank you Sep 03 11:18:14 hmm, imho loaders are not just for lists Sep 03 11:18:22 *are like Sep 03 11:18:42 CursorLoader perhaps Sep 03 11:19:18 i've used loaders to load data over the network, for example Sep 03 11:19:56 yeah that's what torniker seems to be doing? Sep 03 11:20:33 yes he was just correcting your 'designed for lists' Sep 03 11:20:35 lasserix, hrnt yes I am trying to load data from network to listview Sep 03 11:27:15 hello Sep 03 11:27:58 damn fun when customer decides he wants complete redesign of program after it was designed and half-way having it programmed. Sep 03 11:28:33 is it not possible to change app icon in an update? Sep 03 11:29:34 is it my computer or does eclispe work extremely laggy? especially the layout graphical editor... Sep 03 11:30:09 sudarshanpbhat: it is, but it can take quite a while before it's updated on the various sources (play ondevice store, web store, etc.), maybe you're running into that. Sep 03 11:30:51 socket: both Sep 03 11:31:28 With the latest macbookpro it is usable, but when I can harldy use it with my 5 year old laptop Sep 03 11:31:38 -when Sep 03 11:34:14 HDroid: no. The launcher icon is not getting updated in the drawer on s2 Sep 03 11:34:48 HDroid: running gingerbread. Sep 03 11:36:11 Oh ok.. but it is on the emu? Did you replace it in all densities? Sep 03 11:37:49 HDroid: Yes. I replaced for all densities. Sep 03 11:38:07 Is it possible that S2's launcher is keeping it cached? Sep 03 11:38:31 If i create a shortcut of my app on homescreen i get the updated icon. Sep 03 11:38:45 Possibly Sep 03 11:41:10 anyone who knows how linkedin made its html5 android app load so darn fast? Sep 03 11:41:23 if i use a webview or a cordovawebview, it takes 8 seconds for it to load Sep 03 11:43:30 Can I set a shadowLayer and Alpha to a paint at the same time? after I set the shadow layer, the alpha won't work. I draw with the paint will be opaque Sep 03 11:48:02 kevwilde: get the apk off a rooted phone, start reversing, you can learn a lot Sep 03 11:56:08 Hey, is there a cool new easy way to catch a longpress on a map or is this solution on Stack Overflow my best bet? http://stackoverflow.com/questions/1678493/android-maps-how-to-long-click-a-map Sep 03 12:02:18 The other method I've found is creating your own MapView implementation: http://www.kind-kristiansen.no/2011/android-handling-longpresslongclick-on-map-revisited/ | http://blog.js-development.com/2009/12/mapview-doesnt-fire-onlongclick-event.html#solution Sep 03 12:08:05 from Android, I can't seem to be able to open a database that was created by phonegap Sep 03 12:08:15 is there any workaround to this? I've been looking a lot Sep 03 12:13:53 hmph Sep 03 12:17:17 this is probably a FAQ but is there a way to set the android:overScrollFooter introduced in API Level 9, when targeting API Level 7 or so? Sep 03 12:17:44 the propery is only available to me when im using API Level 9 (obviously) but i'd like to target level 7 and handle this property for level 9 Sep 03 12:19:54 or do i need to publish multiple apks Sep 03 12:22:40 Bear10: if it isn't in the support library you are expected to check api level at runtime and handle accordingly Sep 03 12:22:49 mr6, alright thank you :) Sep 03 12:22:57 several patterns shown here: http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html Sep 03 12:26:16 mr6, ty should be helpful Sep 03 12:26:33 Oh Android :'( Sep 03 12:27:05 ((AlertDialog) dialog).getListView().getCheckedItemPositions(); : size > 0, but all positions are false. Sep 03 12:28:20 This pattern makes me cry. Sep 03 12:32:10 HDroid, which one Sep 03 12:32:15 the ones mr6 linked? Sep 03 12:32:28 Nah I was just ranting about my own code, sorry :) Sep 03 12:32:37 But I guess I just misunderstood. Sep 03 12:50:51 other than admob, is there a way to make money out of a free app? Sep 03 12:55:56 if i want to lower/raise the volume in my app, do i have to define my own listeners in each activity? or is there some global possibility to control media volume inside the application? If i use my side buttons I can onlymanage the ringtone volume, even when inside my app. Looking at other apps, there i can regulate the app volume Sep 03 13:20:31 What's the windows keybind to grab some text and put in the strings file? Sep 03 13:24:28 how do I draw two buttons to take up half of the available space each? Sep 03 13:24:36 in xml preferably Sep 03 13:26:34 Ankh, in LinearLayout? Sep 03 13:26:55 vavirta: yeah Sep 03 13:27:42 just a second Sep 03 13:27:50 Just did that and found excellent stackoverflow post about that Sep 03 13:27:52 Ankhwatcher: layout_width=0 and layout_weight=0.5 Sep 03 13:27:56 ... Sep 03 13:30:29 yeh, just like that Sep 03 13:32:22 oh that's nice Sep 03 13:32:27 thanks Sep 03 13:33:52 so does anyone remember that clever keybind for extracting text? Sep 03 13:36:03 ah Sep 03 13:36:13 Alt+Shift+A, S Sep 03 13:40:57 wow, never noticed that keybind, thanks Ankhwatcher Sep 03 13:42:09 sonOfRa: the only problem with it is that it doesn't prompt lint to rescan, so it will continue to bitch at you after you've solved the problem. Sep 03 13:43:23 what's a clean way to incorporate a webview into my application in terms of sticking some custom html somewhere and doing string interpolation on it Sep 03 13:43:51 I was thinking, stick it in the raw folder, load it and do basic string interpolation.. but if anybody has a better suggestion I'd love to hear it Sep 03 13:59:23 I'm trying to access SQLite db outside of "DBHelper extends SQLiteOpenHelper". My idea is to store the reference to DBHelper in for example the MainActivity and then access it from anywhere Sep 03 13:59:40 Is that the proper way to go about it? Sep 03 14:01:58 dokma: why not use a content provider? Sep 03 14:02:22 I've started android dev 5 days ago so I don't know all the ways to do stuff Sep 03 14:02:27 content provider for share data Sep 03 14:02:30 let me google content provider Sep 03 14:02:40 is that a class? Sep 03 14:02:42 dokma: google keywords: android database thread safe Sep 03 14:02:44 like ContentProvider? Sep 03 14:03:01 lol... how did you know I'm doing this from a thread? Sep 03 14:04:59 ixc: am I safe if I never run parallel queries from different threads? Sep 03 14:06:21 you shouldnt use database "outside of dbhelper" Sep 03 14:07:08 if u wanna figure it out and do it fast, make a singleton helper Sep 03 14:07:29 ixc: I see. So I should share one instance of DBHelper accross threads. From what I see in docs SQLiteDatabase has locking Sep 03 14:11:12 If I have started a Service (which does some network stuff in a separate thread) from an Activity and that activity is destroyed for whatever reason, will that thread in the service still be alive? Sep 03 14:13:56 zerribert: yes Sep 03 14:16:41 Guys, why when I create class for widget, which extends from AppWidgetProvider... and when I do a constructor ... it recreates every time when onReceive called.. :/ Sep 03 14:17:37 I have for example public class SomeWidgetProvider extends AppWidgetProvider { public SomeWidgetProvider() { Log.i("console","CONSTRUCTOR CALLED!"); } ... and it always prints to console.. when I tap on it Sep 03 14:22:51 Hi, Sep 03 14:23:32 When ANR, I get a message "ActivityManager: Load: 0.56 / 0.59 / 0.5" Sep 03 14:23:44 what are the three numbers Sep 03 14:24:07 jimmy_lo_chien_f: i think those are the system load Sep 03 14:28:38 Hello! Help me please with my question http://pastebin.com/Dy6zxg2m Sep 03 14:30:30 http://pastebin.com/knv2Y6cf Sep 03 14:45:34 Yauhen90: presumably your question is about how to use IRC? Sep 03 14:51:19 no Sep 03 14:51:44 my question about task Affinities Sep 03 14:54:33 there, was that so hard? Sep 03 15:21:43 I want to launch a dialog when someone clicks on an overlay, should the dialog be a function of the Activity the overlay is on? Sep 03 15:22:26 yes Sep 03 15:23:33 Good, how do send the launch back? Sep 03 15:24:15 it's pretty straight forward, the easiest way would be to put the logic in a custom onclickhandler in your oncreate() Sep 03 15:25:30 in your oncreate grab the overlay object with View overlay = findViewById(R.id.overlayname); Sep 03 15:27:20 then... overlay.setOnClickListener(new OnClickListener() { public void onClick(View v) { doStuff(); } }); Sep 03 15:27:36 preds_: ah okay so the Overlay should be declared in xml layout? Sep 03 15:27:42 as a View? Sep 03 15:27:58 as whatever view type is suitable for your application Sep 03 15:28:04 but yes, the xml would be suitable Sep 03 15:29:03 well I have a mapview and I want to interpret clicks on it. Sep 03 15:29:34 so I put an overlay over the mapview in the layout and listen for clicks on that overlay. Sep 03 15:31:18 sounds viable, and just toggle if the overlay is shown or not by defaulting it to visibility="gone" in your xml and overlay.setVisibility(View.Visibile) in the activity Sep 03 15:31:30 I'm off, glhf Sep 03 15:31:39 preds_: thanks! Sep 03 15:47:41 guys, does anyone know how to debug endless boot loop? Sep 03 15:48:04 funky81: #android-root might, this is a channel for app dev? Sep 03 15:50:50 okay, thanks Sep 03 15:57:00 Can anyone see why this xml file is generating a java.lang.nullpointerexception? http://pastebin.com/WJe2W55s Sep 03 16:01:09 Anyone use App-Inventor with Linux? Mine never detects any devices. Sep 03 16:01:24 jimi_: what linux distro Sep 03 16:01:47 louielouie, Ubuntu. I added a udev rule and restarted udev, without avail Sep 03 16:02:06 SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" Sep 03 16:03:13 did you add: , OWNER="yourusername" Sep 03 16:04:22 louielouie, I did not. I will try that now. Sep 03 16:05:18 louielouie, added and restarted, adb just shows ???????????? no permissions Sep 03 16:05:59 jimi_: check that the files in /proc/bus/usb/ are actualy owned by the correct username Sep 03 16:06:46 Bus 004 Device 031: ID 045e:0084 Microsoft Corp. Basic Optical Mouse Sep 03 16:06:48 -rw-rw-r-- 1 root usb 52 Sep 3 05:18 /proc/bus/usb/004/031 Sep 03 16:07:01 for example, that mouse is at that node, which on my system, is owned by root/usb Sep 03 16:07:50 louielouie, checking, but i dont htink /proc/bus/usb/ exists here Sep 03 16:09:00 jimi_: the same files also exist at /dev/bus/usb Sep 03 16:09:49 jimi_: try consulting "Configuring USB Access" on http://source.android.com/source/initializing.html - I used this, but replaced with my username (and make sure you don't leave in the angle brackets) Sep 03 16:11:51 Anyone know how to prepare a query with an OR conditional? Sep 03 16:15:35 louielouie, yeah, still getting ?? no permissions, looking at /dev/bud/usb, they are chownd to jimi jimi Sep 03 16:16:34 it's louie louie oh yeah or oh baby Sep 03 16:16:40 hehe Sep 03 16:16:53 haha Sep 03 16:17:25 maybe clever can help you more :) Sep 03 16:19:28 why i can't update SDK beyond level 10? Sep 03 16:19:59 have you update adt ? Sep 03 16:20:42 adt? Sep 03 16:21:45 ah it is downloading adt now Sep 03 16:29:02 hmm Sep 03 16:29:17 I am not sure that the app-inventor is the best tool for me. I thought this was an app to develop real apps, not baby apps Sep 03 16:31:42 Is ti possible to create an object from a static variable without importing its' class. The static variable is also an object Sep 03 16:33:25 jimi_: app inventor to me is like scratch, which is more of a learning tool Sep 03 16:34:29 louielouie, ah ok. I got it working. I am a pretty decent programmer. I think i might be better off starting off using the sdk? Sep 03 16:35:31 jimi_: yea - prob easiest way to get started is with Eclipse + ADT Sep 03 16:41:48 there is no SDK platform beyond API 10 with the newest ADT, why? Sep 03 16:47:19 hi Sep 03 16:49:05 dd_: what Android SDK Tools version do you have? with the latest (20.0.3) you should be able to see all the way to Android 4.1 (API 16) Sep 03 16:58:19 Is it a naming convention to postfix all activity classes with Activity? For instance MainActivity, SettingsActivity, etc. Sep 03 17:27:55 guys, if you were to buy a cellular phone today what would it be? i just fucked my old one up Sep 03 17:33:15 can I pass a View from an activity to a service? Sep 03 17:33:41 or can the service acquire the View of an Activity part of the same Manifest, so it can draw into that activity? Sep 03 18:18:07 How do I reference default icons for instance Android Option Menu Icons Sep 03 18:18:15 Is-it possible in a gridlayout row to have the height of the second column element instead of the first one? Sep 03 18:28:11 platzhirsch look on developer's guide website there's an icon pack Sep 03 18:28:58 lasserix: thanks, looks like I've finally found them Sep 03 18:33:22 in ADT when I click "finish" on the create an activity dialog it just refreshes without doing anything Sep 03 19:42:33 https://github.com/Pitel/glslnfc/blob/master/src/cz/pitel/glslnfc/GLSLRenderer.java#L112 any idea why, when I run this method again, with different shader, it doean't work? (it gets stuck on the last frame of previous shader) Sep 03 19:43:28 shader seems to be compiled correctly Sep 03 20:40:29 hello, most android ARM bassed systems are made with hardfp, correct? Sep 03 20:41:13 gandhijee_: softfp Sep 03 20:41:25 well, softfp ABI Sep 03 20:43:26 Office Space Poster Sep 03 20:43:26 Top 5000 Sep 03 20:43:39 upsz Sep 03 20:43:42 nothing Sep 03 21:07:48 p_l: is the kernel built with hard? Sep 03 21:08:24 gandhijee_: kernel internals are built for specific cpu, and usually kernel avoids floating point Sep 03 21:12:03 romainguy: re buildLayer(), do you have a minute? Sep 03 21:16:50 When I open my application the main activity onCreate() is executed, when I open a PreferenceActivity and use the "go back" button the onCreate method is not executed again Sep 03 21:17:12 Is there a method which is executed when reentering an activity which I could override? Sep 03 21:17:56 onResume Sep 03 21:18:11 SimonVT: thanks :) Sep 03 21:18:17 If you need stuff to happen, based on what happens in your PreferenceActivity, consider startActivityForResult and onActivityResult Sep 03 21:18:39 What's the easiest/fastest way of making a swipe action to change tabs within a tabhost/tabwidget? Should I use ViewPager instead? Sep 03 21:19:02 SimonVT: neat Sep 03 23:06:59 do I have to call Cursor.moveToFirst or does Cursor.moveToNext does that automatically? Sep 03 23:08:43 You can just do moveToNext Sep 03 23:08:49 It starts at position -1 Sep 03 23:08:50 thanks Sep 03 23:08:54 moveToFirst moves it to 0 Sep 03 23:09:00 -1+1 = 0 :p Sep 03 23:09:11 smart Sep 03 23:51:58 How do I make a on off button? Sep 03 23:55:14 I mean I know how. But I want it to make like a togglebutton Sep 03 23:57:03 optimusM: a bit of fucking patience, please Sep 03 23:57:17 Im having patients Sep 04 00:02:11 And what's wrong with togglebutton? Sep 04 00:03:20 I want it to be a button that has a custom background Sep 04 00:03:41 like the ICS on/off button for wifi Sep 04 00:03:53 That's a Switch Sep 04 00:04:14 I don't think i can use a switch on api 8 Sep 04 00:04:42 There are backports Sep 04 00:04:56 sorry what is a backport? Sep 04 00:05:50 Someone made it work on older platforms Sep 04 00:08:00 i think they also discussed that in the i/o 'multiversion uis' class Sep 04 00:08:45 until i saw that, i thought the switch was just a restyled checkbox or something. not really sure why there are check boxes, switches, and toggle buttons Sep 04 00:08:58 they all seem the same to me :) Sep 04 00:10:13 Yea same here Sep 04 00:11:21 Do i need to have the complete source of cm7 to compile the apps? Sep 04 00:11:36 or is their a work around that I can just use eclipse with ubuntu? Sep 04 00:37:45 So Sep 04 00:37:51 errr Sep 04 00:37:56 hai Sep 04 00:38:12 So I have managed to get a custom view in my ActionBar... Sep 04 00:38:40 but it is not maintaining state properly as in for ex. device rotation. Sep 04 00:39:18 Does the actionbar have lifecycle callbacks like an activity or fragment? Sep 04 00:39:43 onSave/RestoreInstanceState Sep 04 00:39:46 all views have it Sep 04 00:40:29 if I want to specify the valueFrom in an objectAnimator of say.. the width of the object it's animating, will I need to extend the object to provide that property? Sep 04 00:41:07 romainguy_: one thing I should mention is that my customview is actually an actionlayout not an actionview. Should it be the latter? Sep 04 00:42:43 jaldhar: a layout is just a subclass of a view Sep 04 00:43:31 romainguy_: but if it is defined in xml, how do I get at it in code? Sep 04 00:43:36 ah Sep 04 00:43:42 you'll ha eto create a custom view then Sep 04 00:43:44 oh wait findViewById right? Sep 04 00:44:02 oh Sep 04 00:44:15 I see now I think. Sep 04 00:47:02 @romainguy_, If I handle making sure references aren't sticking around, is calling setContentView a few times going to cause the app to break at some point? Sep 04 00:48:08 no Sep 04 00:48:16 but it's weird Sep 04 00:48:21 I'm doing so because I can't figure out how to make ABS + tab navigation work where one of the tabs contains multiple listfragments. Sep 04 00:48:23 and it requires you to handle the back stack manually Sep 04 00:48:44 Okay, great thanks! Sep 04 00:49:39 is there some way for an app to globally register an action for selected text? Sep 04 00:49:59 meaning, no matter which app I select text in, I'll always have access to that action? Sep 04 00:52:25 xero_: not that I know of Sep 04 00:52:33 Share is the closest thing Sep 04 00:54:59 romainguy_: the context menu of the standard browser looks suspiciously extensible though Sep 04 01:04:03 romainguy_: to make my app appear on the Share list, I need an intent filter, right? Sep 04 01:09:44 ClassNotFoundException after adding jar and referencing one of its classes Sep 04 01:09:47 tried clean Sep 04 01:17:07 anyone around Sep 04 01:21:00 anyone around Sep 04 01:21:36 romainguy_: re buildLayer(), I'm actually not quite sure how to do this. I would need it to happen as soon as possible after the layout is added, but I'm unsure of where to call it. I can't do it as the user starts dragging the view, and I can't do it immediately before starting the animation, since the delay would be quite noticeable in both cases. Any idea how to approach this? Sep 04 01:25:56 is the repo process resumable? Sep 04 01:26:26 what if my internet disconnects? Sep 04 01:26:40 im kinda thinking it might Sep 04 01:27:41 wow both android channels are dead Sep 04 01:27:43 ugh Sep 04 01:28:18 whoa romainguy_ is alive in here! Sep 04 01:31:04 yeah Sep 04 01:31:23 added JAR to project. still get ClassNotFoundException Sep 04 01:31:36 SLF4J library Sep 04 01:31:52 tried the Class.forName() trick without luck Sep 04 01:32:05 Make sure the jar is exported Sep 04 01:32:13 Or, just put it in libs/ and stop messing with java build path Sep 04 01:57:19 morning Sep 04 01:58:10 i have connected 8 android devices via usb and wrote a short bash script to get all their IDs and push data to all of them Sep 04 01:58:25 half way through some of them seem to drop off Sep 04 01:58:36 is there any possible reason for this Sep 04 01:58:44 only 4 out of the 8 finished Sep 04 02:01:07 omg Sep 04 02:01:27 after about 2 weeks of writing ios code and working with xcode, i want to hang myself Sep 04 02:01:40 objc is a complete fucking disaster Sep 04 02:01:51 ios is a disaster Sep 04 02:01:53 xcode is a disaster Sep 04 02:01:56 ugh Sep 04 02:02:16 jasta: same could be said about android :p Sep 04 02:02:24 mostly, it's objc. Sep 04 02:02:31 depends on perspective really :) Sep 04 02:02:34 actually, no, mostly it's xcode. Sep 04 02:02:36 then objc Sep 04 02:02:37 then ios Sep 04 02:02:45 what's wrong with objc Sep 04 02:02:58 it's verbose, ide goes against ingrained user intuitions Sep 04 02:03:22 but if it makes $, heck I'll stick with it ;) Sep 04 02:03:24 hi, I have got a problem which I think needs some re-thinking on my part. I have some code which runs in oncreate and it possibly can throw and exception, and if this happens I want to display an alertdialog (with a URL link) and then when they click OK I would like the application/activity to exit Sep 04 02:03:28 so much of this stack just doesn't play ball with the rest of the industry Sep 04 02:04:04 briswolf: catch the exception and display a dialog? Sep 04 02:04:04 It seems I cannot create a modal dialog on android... at least that's what I have read Sep 04 02:04:12 exactly what I want to do Sep 04 02:04:24 briswolf: ahhh i remember that Sep 04 02:04:35 continuous integration is a nightmare, automated unit testing is seemingly a second class citizen, xcode likes to pretend that it invented a new folder metaphor and doesn't have any need for that useless old "directory" thing Sep 04 02:04:39 it's just crazy Sep 04 02:04:58 i think it's: you cant create dialog in the lifecycle callbacks Sep 04 02:04:59 ive been fighting like every single piece of software in the stack it seems like Sep 04 02:05:18 even remote desktop crap so i could vnc into our build server...apparently OS X doesn't _actually_ implement VNC, it just implements a VNC-like protocoL? what is this noise? Sep 04 02:05:20 jasta: i felt the same way when i first started with android :) Sep 04 02:05:38 dvdh: me too, but that was because android was brand new and didn't have any maturity at all Sep 04 02:05:41 it has it now! Sep 04 02:05:50 hehehe Sep 04 02:05:55 the ios stack has no excuse. it's like 4 times older. Sep 04 02:05:56 jasta: xcode is terrible, and what makes it worse is you have to learn macos (if you are a dreaded "switcher") to use xcode, which just compounds things Sep 04 02:06:04 and finder is SO TERRIBLE don't get me started Sep 04 02:06:12 I bought parallels for mac Sep 04 02:06:21 it was the best productivity tool I ever bought Sep 04 02:06:27 briswolf: i've bene pretending, trying to just VNC into a machine when i need xcode and otherwise use vim and command-line for everything else Sep 04 02:06:27 briswolf: i remember diana hackborn was recommending people not use modal dialogs Sep 04 02:06:33 but it just fights me at every step! Sep 04 02:06:41 show the error on the UI Sep 04 02:06:51 jasta: parallels will let you use windows explorer, tortoise svn... Sep 04 02:07:05 briswolf: i use linux on all of my workstations... Sep 04 02:07:09 jasta: but in the end you are still stuck in mac os using the worst IDE ever Sep 04 02:07:23 hehe, yeah, xcode is just....my god Sep 04 02:07:32 anyway, I didn't come to bash apple Sep 04 02:07:37 I've done that enough in the last year Sep 04 02:07:45 the .xcodeproj directory structure thing too. it's so funny that even ios developers don't seem to understand how to wrestle that thing into something suitable for version control Sep 04 02:08:14 all the ios guys i know are basically like "fuck it" and just commit arbitrarily anything xcode touches in there, even if it totally wrecks automated builds, other developers, etc. Sep 04 02:08:15 dvdh: yeah, I want it to be like blindingly obvious Sep 04 02:08:33 dvdh: I suppose I have really no choice, or I could finish the app right away and show a toast, not very nice Sep 04 02:08:46 briswolf: i dislike toasts too Sep 04 02:08:51 dvdh: maybe I will use an asynctask to spawn a messagebox Sep 04 02:08:55 toasts are awesome if you use them right Sep 04 02:08:56 yup :D Sep 04 02:09:02 was gona get to workarounds Sep 04 02:09:04 use a handler Sep 04 02:09:05 its just that ive only ever seen 1 app use it right Sep 04 02:09:06 yeah. thanks, I will try that out Sep 04 02:09:31 toasts have a place Sep 04 02:09:37 I don't think this is a good use of a toast Sep 04 02:09:42 the alarm apps usage of them is _perfect_ Sep 04 02:09:49 basically a nice little confirmation of what you've done with some additional data Sep 04 02:10:27 man, i've been wrestling with android.gesture... it ain't pretty :( Sep 04 02:10:56 another question - is it possible to make an asynctask which doesn't return anything from the doInBackground function? I have tried AsyncTask but it doesn't work :) Sep 04 02:11:15 Why would you want that Sep 04 02:11:19 thought u can return null Sep 04 02:11:28 yeah I don't even want to have to do that Sep 04 02:11:39 Why do you have to do it? Sep 04 02:11:40 I want doInBackground to be void not Void Sep 04 02:12:16 why? just to run something on the background thread and then update the ui when it finishes, but I don't need any data per-se from the background task Sep 04 02:12:27 probably me doing things the wrong way again Sep 04 02:12:31 You're not making sense Sep 04 02:12:45 Ah, so it actually does work Sep 04 02:12:52 Use a thread? Sep 04 02:13:06 yes I could Sep 04 02:13:10 just wondering... Sep 04 02:14:09 man, i'm suspecting google's gesture search isn't even using android.gesture now... Sep 04 02:15:37 actually yes AsyncTask if you return null from the doInbackground function. Never mind me. Sep 04 02:15:59 briswolf: praise the null! Sep 04 02:18:31 Void god = null Sep 04 02:22:13 alankila: now thats just inviting it to be initialized Sep 04 02:25:59 dvdh: the only problem with this method is that I have other code in onResume which will crash since the code didn't run correctly in onCreate - this is a nightmare of workarounds for a simple bloody error message! Sep 04 02:26:30 it's unfair. I should be able to trash my app on startup with a meaningful message Sep 04 02:26:43 and not have to write dozens of lines to do it Sep 04 02:26:44 Is there any reason not to copy com.android.internal classes and use them in my project? Sep 04 02:26:50 hmm, how bout u finish this activity or fragment and let the initiating one display the dialog? Sep 04 02:27:02 the initiator is the launcher Sep 04 02:27:08 saik0: if they are using exclusively public APIs in public ways, no. Sep 04 02:27:18 that is, documented ways. Sep 04 02:27:40 hehe move to onstart then? :p Sep 04 02:28:12 jasta: since you were talking about setting up a gsm lab, i thought you might dig this http://news.ycombinator.com/item?id=4469424 Sep 04 02:28:12 yeah... how about I get over it and continue living my life Sep 04 02:28:40 well, its not gsm ;) Sep 04 02:28:44 jasta, huh? is ebing in an internal package and being public not mutually exclusive? Sep 04 02:29:10 saik0: read carefully: if they are _USING_ ... Sep 04 02:29:40 g00s: CDMA? hhahahaha, what? :) Sep 04 02:32:33 jasta: Ah, yes. it is. AndroidHttpClient: Y U FINAL? =( Sep 04 02:33:33 doesn't google recommend you use HttpURLConnection now? Sep 04 02:36:17 jasta: not for <= Froyo Sep 04 02:37:30 http://android-developers.blogspot.com/2011/09/androids-http-clients.html Sep 04 02:39:28 I dont understand what you meant by using public APIs in "public ways" Sep 04 02:41:18 saik0: i clarified. in documented ways. Sep 04 02:45:02 jasta: thanks for the help Sep 04 02:47:40 anyone tried pushing a lot of data via USB to multiple android devices? Sep 04 02:49:37 praveenmarkandu: multiple devices simultaneously? how are you connecting these USB devices, as accessories (the devices are the host) or as "devices" (the android device is the host) Sep 04 02:49:39 praveenmarkandu: i /think/ briswolf did a lot of usb. no idea if he can help Sep 04 02:49:42 :D Sep 04 02:50:02 or is there a PC box involved Sep 04 02:50:27 briswolf: connecting them as devices Sep 04 02:50:47 well it says devices when i run 'adb devices' Sep 04 02:51:16 sorry I am confused. What are you plugging into the android? Sep 04 02:51:20 just a PC? Sep 04 02:51:22 im trying to sync a lot of content to multiple tabs at once Sep 04 02:51:37 ok. so one PC, multiple android devices Sep 04 02:51:46 content is on a PC. which is connected to a USB hub which connects to 8 galaxy tabs Sep 04 02:52:06 what are you using to communicate? ADB? Sep 04 02:52:12 yes Sep 04 02:52:26 right. I haven't done anything with ADB for communications Sep 04 02:52:40 on windows ADB has trouble keeping more than 4 devices 'online' Sep 04 02:52:52 I see Sep 04 02:52:55 on linux all work but transfer drops halfway Sep 04 02:53:02 is there any other way to open a generic channel over the USB line? Sep 04 02:53:16 or you would need to use manufacturer type things like samsung kies? Sep 04 02:53:19 dont know, you tell me Sep 04 02:53:31 haha. Sorry I haven't actually done anything like you are asking about Sep 04 02:53:39 bbs lunch Sep 04 02:53:41 i have the divice drivers from samsung kies Sep 04 02:53:53 no problem. thanks **** ENDING LOGGING AT Tue Sep 04 02:59:58 2012