**** BEGIN LOGGING AT Sat Oct 13 03:00:02 2012 Oct 13 03:10:02 hey everyone, I gotta problem with some code I am writing. My sockets work great in the emulator but always timeout on my device, I do have permissions set in the manifest...any thoughts? Oct 13 03:15:33 http://developer.android.com/training/basics/firstapp/starting-activity.html <- I'm trying to follow this tutorial without using Eclipse Oct 13 03:16:01 and I'm getting a cannot find symbol error when I run ant debug Oct 13 03:16:10 for R.layout.activity_display_message Oct 13 03:16:20 what exactly does R.layout. pull from? Oct 13 03:17:20 you're using ant? Oct 13 03:17:24 res/layout/ Oct 13 03:17:48 Leeds yeah Oct 13 03:17:58 so my res/layout just contains main.xml Oct 13 03:18:27 is there another file that should be in there that eclipse would generate? Oct 13 03:18:37 no Oct 13 03:18:45 layouts correspond to things displayed on the screen Oct 13 03:18:58 is R.layout.activity_display_message what you are passing to setContentView? Oct 13 03:19:27 yup Oct 13 03:19:27 following along that tutorial Oct 13 03:20:12 ok, you should probably switch it to R.layout.main then Oct 13 03:20:28 the values in R.layout are generated from the files which are in res/layout/ Oct 13 03:20:34 nah Oct 13 03:21:09 can i use onRetainNonConfigurationInstance() in a dialog fragment? Oct 13 03:21:10 does every activity need a separate layout file in res/layout/ ? Oct 13 03:21:11 the tutorial tells you to create a new Activity in Eclipse - or if you're not using Eclipse, to create a new Java file... presumably Eclipse's "create new Activity" also creates a placeholder layout, which isn't mentioned Oct 13 03:21:17 muhoo: no Oct 13 03:21:27 yeah that's really annoying Oct 13 03:21:28 typical Android doc 'bug' Oct 13 03:21:29 Hail_Spacecake: no, but it's usually convention to do so Oct 13 03:21:34 they have some directsions for it you're not using eclipse Oct 13 03:21:37 but not enough I suppose? Oct 13 03:21:51 they don't list what imports you need for the specific things in the tutorial either Oct 13 03:22:08 Hail_Spacecake: to be honest, I think they're sort of assuming that if you choose not to use Eclipse, you probably don't need every little thing spelling out for you Oct 13 03:22:22 or to put it another way, if you can't read between the lines, stick to the point'n'drool IDE Oct 13 03:23:01 lol Oct 13 03:23:12 or... well, they're probably not actually thinking that clearly, but that's the way the docs are written Oct 13 03:25:01 you're definitely expected to be able to work out imports on your own, which I think is reasonable enough Oct 13 03:36:43 i think they assume the use of eclipse that does auto-imports Oct 13 03:39:49 yeah and that's annoying, 'cause I'm not using eclipse at all Oct 13 03:40:15 i think they assume it's easy as hell to look in the doc and see the full classpath Oct 13 03:40:21 cause, it is, heh Oct 13 03:41:27 Hail_Spacecake: and if that's a problem for you - use Eclipse Oct 13 03:41:55 trying to do java without eclipse or intellij is like trying to write lisp without paren matching Oct 13 03:42:07 ] Oct 13 03:42:22 there are plenty of other perfectly capable programmers' editors out there Oct 13 03:42:35 -> ... on the top of every component's page in API doc Oct 13 03:43:21 speakingcode: don't be silly, reading the docs is for chumps Oct 13 03:43:37 well, I like using vim, for one Oct 13 03:43:49 i'd have to strongly disagree muhoo. they certaintly make it faster and can help you catch slipups easily, but it's perfectly feasible to write java without either of those or any IDE for that matter Oct 13 03:43:50 see, now I'm embarrassed Oct 13 03:44:22 but the main reason I don't like using eclipse is because I don't understand what it's doing for me Oct 13 03:44:34 one could use a plain text editor if they want to really be a massochist... Oct 13 03:44:47 Hail_Spacecake what its doing for you in terms of android, or in general? Oct 13 03:44:47 that's basically what I'm doing Oct 13 03:44:52 well in general Oct 13 03:44:59 I've never gotten the hang of eclipse Oct 13 03:45:05 but I also don't code in java often Oct 13 03:45:24 well, the main features of it i use are code completion, object reference (intellisense i guess?) and refactoring/renaming Oct 13 03:45:33 vim is far from a plain text editor Oct 13 03:45:47 yeah I kind of like those features, and I wish there was a good way to add some of them to vim Oct 13 03:46:00 suppose you have a class that yuo reference in 400 different lines, or a method, and you decide you need to change it's name, eclipse will update every reference for you and does a damn good job IMO Oct 13 03:46:00 but eclipse is also a really complicated systme that adds a lot of overhead to a project Oct 13 03:46:02 and I don't understand it all Oct 13 03:46:08 http://insenvim.sourceforge.net/ Oct 13 03:46:11 and so on Oct 13 03:46:42 "About 814,000 results" for "vim refactor" Oct 13 03:46:50 gawd, i never expected that dialog boxes would be such a massive PITA Oct 13 03:46:52 nod Oct 13 03:46:59 not saying vim can't do it Leeds Oct 13 03:47:10 just saying it's one of the built-in features of eclipse Oct 13 03:47:17 mmm... passive pita... with falafel Oct 13 03:48:08 bundles are making my life miserable Oct 13 03:48:11 with tzaziki sauce Oct 13 03:48:57 anyway, the point is that if you choose to use vim rather than Eclipse - that's a perfectly reasonable choice, and it comes with pros and cons... pro being far more lightweight development, con being that you'll have to either do some stuff yourself by hand, or do some setup work to have it automated Oct 13 03:49:37 actually, the android lifecycle is making my life miserable. it's way more complex than a desktop app. Oct 13 03:50:07 muhoo it's a bit to chew at first but it's actually pretty nice and reasonable Oct 13 03:50:37 one thnig that helps me a lot (since yuo mentioned bundles) is using static singletons to hold data instead of doing all that serialization and passing bungled around Oct 13 03:50:40 welli can see WHY it is the way it is, what problems they are solving, etc. but it's still an obstacle in my way. Oct 13 03:50:47 it helps to remember that it's a modular application environment, rather than just a lump of code which sometimes talks to the OS Oct 13 03:51:30 speakingcode: how do store data in a static singleton? Oct 13 03:51:37 speakingcode: don't use static variables in android apps Oct 13 03:52:09 codebutler give me a reason why? Oct 13 03:52:13 the process can die at any time, you can't rely on things being there Oct 13 03:52:16 heh, i figured if it sounded attractive to me, it'd be considered evil and un-androoid-like :-) Oct 13 03:52:41 considering google recommends it Oct 13 03:52:44 i'm gonna have to disagree Oct 13 03:52:50 where does google recommend it? Oct 13 03:53:00 well i may have to either rearchitect this entire app, or write some very miserable serialzization hack. Oct 13 03:53:30 but i can't in good conscience violate the way anddroid is designed, it'll bite me in the ass later, i'm sure Oct 13 03:53:43 i'll find it, give me one sec Oct 13 03:53:54 muhoo: what sort of data? Oct 13 03:54:41 Leeds: it's a tree of domain objects. each object is a point on a graph. when you click on a point, you should get a dialog to edit the point's data, then that gets passed back to the activity, which updates the graph Oct 13 03:55:02 sounds like you want a database... Oct 13 03:55:10 seemed simple at the time :-/ Oct 13 03:55:14 it's tree data. Oct 13 03:55:27 being stored in sqlite, of course. serialized as json Oct 13 03:55:51 i do not want to create a tree databse in SQL Oct 13 03:56:23 so you are storing in sqlite or not? Oct 13 03:56:38 yes, i am. as strings, json. Oct 13 03:56:46 right, so what's the question? Oct 13 03:57:21 they get unserialized as domain objects-- java objects. Oct 13 03:58:41 Leeds: the question is, they're all one blob in the database. i restore them to java domain objects in memory. now i have to edit one.how do i pass it to a dialog fragment, an get it back edited? Oct 13 03:59:06 well... you could pass it to the dialog fragment, then get it back edited Oct 13 03:59:18 "it" meaning an Object? Oct 13 03:59:21 because i can't Oct 13 03:59:30 muhoo: you can stuff json into the bundle Oct 13 03:59:32 i can pass only getString or getInt Oct 13 03:59:43 There is normally no need to subclass Application. In most situation, static singletons can provide the same functionality in a more modular way. If your singleton needs a global context (for example to register broadcast receivers), the function to retrieve it can be given a Context which internally uses Context.getApplicationContext() when first constructing the singleton Oct 13 03:59:44 oh, if i send the whole thing, yes, that was one of the hacks i was considering Oct 13 03:59:54 http://developer.android.com/reference/android/app/Application.html Oct 13 04:00:03 but remember, i'm not editing the whole tree. just one node on it. Oct 13 04:00:27 so pass the node, get it back Oct 13 04:00:50 i could pass it as a json string. then now, how do i know which one it was? Oct 13 04:00:58 it's in a TREE Oct 13 04:01:12 how do you know which one it is before you pass it? Oct 13 04:01:15 it's not like each node has a unique id. which was one of the hacks i was considering. Oct 13 04:01:21 and I don't know why you'd be passing json strings around Oct 13 04:01:32 this just all feels pretty weird, so... good luck with that Oct 13 04:02:16 well it is pretty weird. that's why i'm stuck. Oct 13 04:02:33 if it was something obvious and pedestrian, it'd be done already :-) Oct 13 04:02:51 muhoo: can you create a string representation of a path in the tree? Oct 13 04:03:10 hmmm Oct 13 04:03:13 not currently, but i'd have to come up with one. Oct 13 04:03:15 this seems really simple Oct 13 04:03:28 use an MVC/MVP pattern Oct 13 04:03:37 yay, buzzwords! Oct 13 04:03:39 or, just a hack, create unique ids for each node. then it's easy to tell what came back. Oct 13 04:04:07 Leeds heh, i guess? i mean, he's talkign about how to get something back to edit, heh Oct 13 04:04:14 in a view Oct 13 04:04:18 from a data model Oct 13 04:04:23 i was hoping to just have the whole thing in RAM and pass object pointers around. not in android. this isn't GTK :-) Oct 13 04:04:47 passing objects in java is passing object pointers Oct 13 04:05:01 right, i was hoping to do that Oct 13 04:05:09 but you can't do that with the android lifecycle model. a Oct 13 04:05:15 you can't pass objects between activities. you can use a singleton but only if you're careful, since it can be re-created at any time. Oct 13 04:05:16 sure you can Oct 13 04:05:27 i pass objects in all my applications Oct 13 04:05:34 you're not supposed to, i'm told. Oct 13 04:05:40 docs say, use bundles. Oct 13 04:05:46 if they're easy to serialize, i pass them via bundles Oct 13 04:05:54 bundles support ONLY strings or ints. you can pass whatever you like, as long as it's a string or an int. Oct 13 04:05:58 Leeds: that is how i ended up with json. Oct 13 04:06:08 if they aren't, i use a singleton. you just have to be mindful of how your singleton is initialized and how it may be killed/started at any point Oct 13 04:06:34 muhoo: nonsense Oct 13 04:06:42 actually, wait, that's not completely correct. bundles support Serializables Oct 13 04:07:01 and objects can be stringified fairly easily using json Oct 13 04:07:08 so either way... Oct 13 04:07:11 yeah, maybe this is easier than i thought it'd be. Oct 13 04:07:33 or Parcelables Oct 13 04:07:47 the only hard part is uniquely identifying the nodes, and i can just put in an id to get around that. Oct 13 04:08:01 if they are compelx objects with layers of "nested objects" that can be tough sometimes, or computationally taxing... in that case use a singleton pattern Oct 13 04:08:16 but as codebutler mentioned be mindful of lifecycle. doesnt mean you can't or shouldn't Oct 13 04:08:41 you may find this helpful http://www.slideshare.net/burkeeric/android-app-anatomy (especially slide #11) Oct 13 04:08:44 speakingcode: yes, it is, nested objects. the singleton sounds like it'd save me coding time at expense of some risk of future bugs. Oct 13 04:09:08 it's fairly easy to make it safe, in my experience Oct 13 04:09:54 if you want to pass something to a dialog and get it back edited - as I said before - pass the thing to the dialog and get it back edited... it's not rocket science Oct 13 04:10:04 IIRC the singleton will get killed if the application task does Oct 13 04:10:14 i agree with leeds Oct 13 04:10:35 or, use a simple middle man to reduce coupling.. i.e. a controller Oct 13 04:10:53 Leeds: and if the "thing" is an object, implement Serializable or Parcealable in it, correct? Oct 13 04:11:00 yup Oct 13 04:11:11 or just use json! Oct 13 04:11:13 and add an ID so i know which thing it was and where that fits Oct 13 04:11:31 or just use json, which amounts to the same thing, but has overhead :) Oct 13 04:11:31 or a path, assuming each level of your tree is ordered Oct 13 04:11:48 yup, but, iirc all the member classes will need to implement serializable/parclable as well, recurively down Oct 13 04:11:53 all good suggestions, thanks Oct 13 04:12:07 i've already implemented that recursively using json Oct 13 04:12:16 there ya go Oct 13 04:12:18 because one of the things this structure needs to be is transmissable over the web Oct 13 04:12:19 sounds like the work is done Oct 13 04:12:40 all except the node id, which, i think i've realized is necessary. Oct 13 04:12:46 wow, great, thanks for talking me through this. Oct 13 04:12:54 as weird as it is :-) Oct 13 04:13:23 muhoo: if you tree is ordered... you can just have a string like "1.2.3.4" ... which is the index at each level Oct 13 04:13:27 sometimes you need to work *with* Android a bit, rather than fighting it... most of the guys working on it aren't entirely insane, just slightly unusual :) Oct 13 04:13:44 codebutler: that's a great idea, thanks. Oct 13 04:13:56 yeah, lots of value in what Leeds just said Oct 13 04:14:29 Leeds: indeed, thanks. it's a new way of thinking Oct 13 04:15:19 i wuold say though, imo, android isn't very prescriptive. it's prescriptive in terms of UI patterns but underneath the UI yuo can pretty much do whatever you want, mindful of the environment/lifecycle Oct 13 04:15:36 heh, the 1.2.3.4 is perfect, because they're ArrayLists all the way down Oct 13 04:16:23 speakingcode: it seems very TMTOWTDI so far, yes Oct 13 04:16:53 and now for something completely different: http://www.youtube.com/watch?v=IhJQp-q1Y1s Oct 13 04:17:16 personally i wouldn't want my dialog or any view making changes to an object directly, i would rather notify a controller and let it modify the object Oct 13 04:17:46 i.e. an object that is part of the application layer Oct 13 04:17:57 that's a bit more functional, and saner, yes. wild mutatation can get scary quickly. Oct 13 04:18:54 oh fish, oh fishy fish fish. Oct 13 04:19:56 is there a better tutorial for learning basic android development than the official one? Oct 13 04:20:51 not sure how youve implementedy our tree but i assume it has a get() type method. i wold do something like nodeView.onClick() { controller.setCurrentItem(tree.get(clickedItem))... then the dialog can do something like onConfirm() { controller.updateCurrentItem(... Oct 13 04:21:15 then no need to serialize back n forth from dialog to elsewhere Oct 13 04:23:12 i would say the training and api guides are pretty giid Hail_Spacecake. Android Bootcamp 2012 series on youtube is good too, takes you through iteratively refining a single app as you learn more n more... it moves a bit slow in places cause ti's recorded from a live class and people ask some ridiculous questions Oct 13 04:23:30 but it's good overall Oct 13 04:23:32 Hail_Spacecake: you need to take things more easily... Oct 13 04:27:47 http://www.fiercedeveloper.com/story/samsung-devices-considered-best-testing-android-apps/2012-10-13 Oct 13 04:27:56 seems devs prefer sammy & htc Oct 13 04:28:25 i wonder if lg makes the next nexus; heh … i hear bad things about lg. maybe wait for somebody else's nexus Oct 13 04:28:30 I think everyone does, by market share Oct 13 04:28:54 who makes nexus 7? Oct 13 04:28:59 asus Oct 13 04:29:00 asus Oct 13 04:29:00 asus? Oct 13 04:29:02 ah yeah Oct 13 04:29:04 thought so Oct 13 04:29:43 haven't been too happy with motorola Oct 13 04:30:01 although the xoom i have at work is tons better since ICS update, i'll give them that Oct 13 04:30:18 thing was unusable with honeycomb. serious issues Oct 13 04:31:30 i was expecting more from moto by now since google acquired them; i guess they really do intent to just let them do their own thing for the most part Oct 13 04:31:56 i'm glad we haven't had a bunch of nexus phones from Moto Oct 13 04:32:06 they haven't made a single thing i've been impressed with in years Oct 13 04:33:49 ah lol man. just talked to a friend at a local startup hackathon event i skipped out on. glad i did. the three teams are a website about hydroponic microgreens, some hip label, and a button to tell content creators to write a sequal article... as if commenting or the myriad other communication channels aren't sufficient Oct 13 04:34:46 hophop label* Oct 13 04:35:34 * g00s just sold his lisp book; p_l would be upset Oct 13 04:36:08 i've kept all my programming books Oct 13 04:36:43 i'm trying to get all my possessions to about what can fit in a backpack. i've been converting my library to digital for a while; used to have 8 book cases Oct 13 04:36:57 understanding Ada... intro to berkeley Unix.. progamming Pascal Oct 13 04:37:08 but paul graham doesn't have an ebook version of his lisp book :/ Oct 13 04:37:58 g00s that's pretty cool. i was like that for a good while, i've become intamtely attached to my anchoring physical possesions now Oct 13 04:38:25 actually, funny that pg wrote an article about stuff Oct 13 04:38:38 http://www.paulgraham.com/stuff.html Oct 13 04:38:55 <[deXter]> g00s, what about your clothes? Oct 13 04:39:12 [deXter]: still have those :D Oct 13 04:39:16 <[deXter]> :) Oct 13 04:40:04 mostly audio equipment and computer stuff, and books, records, and gems/minerals Oct 13 04:40:49 yeah, i'm selling off my guitar stuff. acoustics are such a pita having to keep them climate controlled Oct 13 04:41:06 my dog broke my electric, so i don't have to worry about that so much :D Oct 13 04:41:35 i really have turned into a hoarder. but my rule is it must be contanied in the smallest room of my house. i'd sell or leave behind most of it for the right adventure Oct 13 04:41:40 amps, pedals, rack, effects processors have to go Oct 13 04:42:14 speakingcode: for a while, if i got one thing i told myself i had to give up another Oct 13 04:42:36 so, sounds like you have a system that works for you Oct 13 04:43:12 i suppose Oct 13 04:43:19 problem is right now i rarely use any of this stuff Oct 13 04:43:26 so it's just sitting Oct 13 04:43:45 i've accumulated like 11 desktops some of which i've never turned on Oct 13 04:45:03 by the time "one day" gets around android devices that are 1000 times as powerful will probably cost 5 bucks and i'll have no interest in doing all the hacky things with them i keep telling myself i'll get to doing one day Oct 13 04:45:11 Oct 13 04:46:32 I've managed to almost completely stop acquiring computers in the past few years - that is, until my office closed down, our sites went virtual, and the boss pretty much said "take your desktop and our server home" Oct 13 04:47:11 i've acquired more since i decalred i wiould never pay for one again Oct 13 04:47:15 I do have approximately 12 Android devices at home Oct 13 04:47:31 damn. i was overwhelmed with three, had to give up Oct 13 04:47:43 got tired of two sitting there never used Oct 13 04:48:26 its pretty ridiculous, how commodotized these things are becoming and how massively produced they are. a million androids activated aily and rising Oct 13 04:48:35 4 phones - one with a dead screen... 6 tablets - 3 cheap Chinese, 3 mainstream... Logitech GTV box... original eink nook... and a new little TV stick I got this week Oct 13 04:48:47 I guess that's 13ish now :) Oct 13 04:49:36 and thats just one family of device. let alone desktops, laptops, netbooks, all types of non-mainstream devices n chips. and oh yeah, BB, iphone, etc etc etc. it's... disgusting, lol Oct 13 04:50:21 oh, and a spare N7 which I will - hopefully! - be selling on Monday Oct 13 04:51:16 there are small cities in asia built entirely out of disposed electronics and equipment where the millions of inhabitants make a living smelting rare earth metals until the toxic fumes kill them at a young age Oct 13 04:51:42 yay globalisation! Oct 13 04:53:25 thats probably the main reason i hoard this stuff. just for humanity's sake Oct 13 04:55:20 android derp. whenever i set my edittext to multiline, android gets rid of the "send" button and replaces it with a return key. how can i either (1) prevent this behavior or (2) put a bar at the bottom of the textview that moves with the soft keyboard, which has a button on it to send the message Oct 13 04:56:04 hmm Oct 13 04:57:47 whomp: are you using imeOptions? Oct 13 05:05:41 Leeds, yes. Oct 13 05:06:02 that's the only way i know of to wrap the user's text Oct 13 05:06:51 okay, paste code please Oct 13 05:07:00 also, some of the stuff in imeOptions is advisory Oct 13 05:10:18 Excuse me, can I control the bluetooth keyboard Caps/NumLock-LED on android? For Linux, I did it like this: ioctl(fd, KDSETLED, LED_CAP); fd is a file descripter of '/dev/console'. But I did it on Android 4.04, it always returns -1, and did nothing. How can I solve that? Thanks. Oct 13 05:12:00 https://gist.github.com/3f21aa49cd5c3744f073 Oct 13 05:12:18 it has a couple redundant pieces but it's the whole thing Oct 13 05:13:02 Leeds, it works in lots of cases, but not with multiline enabled, because apparently android can't figure out how to put two buttons in the same keyboard Oct 13 05:13:49 dunno, but there's a chance someone else will... Oct 13 05:14:32 yeah, hopefully Oct 13 05:17:59 Hello! Simple question. I have a Fragment called FinalScore with a button, btnBGround. The Fragment has a function, updateValues(), in which the background color of btnBGround is set to black. Oct 13 05:18:32 anyone good with fonts? figuring out what they are? Oct 13 05:18:50 However, when updateValues() is called, ((Button)getView().findViewById(R.id.btnBGround)).setBackgroundColor(Color.BLACK); throws java.lang.NullPointerException Oct 13 05:19:23 It appears that updateValues() can't see the View FinalScore - how do I allow it to find objects within FinalScore? Oct 13 05:25:09 are there any built in classes or anyone got any library recommendatinos for visualizing data? things like graphs, charts, etc Oct 13 05:28:47 Any ideas? Oct 13 05:32:39 Alright, well, goodnight! Oct 13 05:32:43 Thanks anyway! :] Oct 13 05:57:56 Leeds: you were selling your n7 ? Oct 13 06:09:48 Need somebody who has time patience and knowledge to guide me a bit please. Oct 13 06:13:19 g00s: got a spare Oct 13 06:13:58 Leeds: have you been using it for dev? or testing ? Oct 13 06:16:01 nope - neither of them Oct 13 06:21:38 For something to display in say MainActivity.java, it has to be in MainActivity.java, right? I can't simply put it into Menu.java and say that it should happen in MainActivity.this Oct 13 06:22:18 Or maybe I'm just stating it to confusingly.. Oct 13 06:23:06 Streusel: what 'thing' are you trying to display? Oct 13 06:23:11 I got this in Menu.java, http://upaste.me/b7ae130887df4216 should it work or not? because I get a red error line below the MainActivity.java, however if I don't do it it won't display Oct 13 06:23:31 the toast is a simple test item to see if it's actually executing my request Oct 13 06:25:55 you're missing something - maybe everything - which I can't explain while having my lunch Oct 13 06:26:06 corrected the paste Oct 13 06:26:12 I had the mainactivity in the wrong location Oct 13 06:26:28 however this of course still doesn't resolve the error. Oct 13 06:28:44 Streusel what exactly are you trying to do? Oct 13 06:29:17 well I'm so desperate right now I just want the button which is located in menu.java to execute a message, using toast.. Oct 13 06:29:25 since I can't do the rest either. Oct 13 06:29:37 what is menu.java? an activity? Oct 13 06:29:39 As I usually use the text/msg to see if the button even gets executed Oct 13 06:29:44 it's a listactivity Oct 13 06:29:55 public class Menu extends ListActivity Oct 13 06:30:27 and what you pasted is from MainActivity, right? Oct 13 06:30:30 and where is the button defined? Oct 13 06:30:34 no Oct 13 06:30:42 button is defined in Menu Oct 13 06:30:44 .java Oct 13 06:31:05 which xml file? Oct 13 06:31:29 I did have it in MainActivity.java for a second to test if it worked and it did, however what I want the button to do is to call upon the activity of Menu.java that's why I have it there. Oct 13 06:31:49 no, stop Oct 13 06:31:55 the button id and other such data is in main_activity.xml Oct 13 06:31:59 ups Oct 13 06:32:00 you're spouting nonsense Oct 13 06:32:03 I mean activity_main.xml Oct 13 06:32:05 .. Oct 13 06:32:06 step back Oct 13 06:32:37 which is the launchable Activity in your app? Oct 13 06:33:11 MainActivity.java has a public class MainActivity extends Activity {} Oct 13 06:33:20 simple question, simple answer Oct 13 06:33:20 so I suppose you want to hear MainActivity.java Oct 13 06:33:30 no, I want to hear MainActivity Oct 13 06:33:40 k, MainActivity. Oct 13 06:34:14 so you want to launch Menu from MainActivity, right? Oct 13 06:34:17 and MainActivity calls setContentView on an xml layout, right? Oct 13 06:34:29 Menu.java is a ListActivity Oct 13 06:34:38 this is all irrelevant Oct 13 06:35:03 Don't get your question leeds Oct 13 06:35:03 it doesnt matter what it is, what matters is what you want to do Oct 13 06:35:24 Streusel: in MainActivity, in onStart, you call setContentView, right? Oct 13 06:35:40 I have no onStart I got an onCreate.. Oct 13 06:35:51 sorry, onCreate... onStart is Services Oct 13 06:36:03 so in onCreate... setContentView? Oct 13 06:36:30 I believe so if you by that mean the time = (Button) findViewById .. Oct 13 06:36:48 is findViewById the same as setContentView? Oct 13 06:36:51 jesus Oct 13 06:36:56 are apples the same as Hondas? Oct 13 06:37:07 doubt it Oct 13 06:37:21 really? Oct 13 06:37:29 so, do you call setContentView in onCreate, or not? Oct 13 06:37:32 no Oct 13 06:37:42 no? Oct 13 06:37:56 your app would not work if you didnt Oct 13 06:37:57 no Oct 13 06:38:09 I got contentview Oct 13 06:38:21 setContentView(R.layout.activity_main); Oct 13 06:38:25 ... Oct 13 06:38:28 Streusel: what is your native language? Oct 13 06:38:32 english.. Oct 13 06:38:33 -_- Oct 13 06:38:38 I don't believe you Oct 13 06:38:42 it is.. Oct 13 06:39:06 then do you want to make a basic attempt to actually answer questions, or just give up on this? Oct 13 06:39:23 I want to continue and learn more, as well as solve this problem Oct 13 06:39:33 are you doing something dumb like trying to learn in AIDE? Oct 13 06:39:37 however all I get are questions I have no knowledge of how to reply to Oct 13 06:39:53 then say "I don't know" rather than making up nonsensical answers Oct 13 06:40:02 ask someone to explain their question Oct 13 06:40:42 what didn't you understand about the question "do you call setContentView in onCreate, or not?" Oct 13 06:41:03 I remember the last time I was trying to find stuff out you only told me to learn java and that was it.. I believe you repeated yourself about 3 or 4 times Oct 13 06:41:15 okay, then I'm done here Oct 13 06:41:43 I didn't know that setContentView is an actual thing, as I hadn't used it previously. Oct 13 06:41:47 I didn't have the need to. Oct 13 06:41:59 therefore I assumed that it was the findviewbyid Oct 13 06:42:12 right... that's more total and utter bollocks Oct 13 06:42:17 .. Oct 13 06:42:25 wasting your time, and the time of anyone who tries to help you Oct 13 06:42:44 how so? I'm trying to learn something, I never said I was good at this. Oct 13 06:42:49 I wanted a simple question answered Oct 13 06:43:03 well maybe it would become more complex as it goes but still.. Oct 13 06:43:36 what you just said was "I didn't understand the question, so I made up an answer" - do you really think that is ever going to lead to you learning? Oct 13 06:43:44 no Oct 13 06:44:02 I guessed and hoped you would tell me that the answer is right or wrong Oct 13 06:44:14 in which case I would've learned that setcontentview is not findviewbyid Oct 13 06:44:20 you did and I learned that Oct 13 06:44:29 and then we got stuck Oct 13 06:44:48 if you need to be told that setcontentview is not findviewbyid, your problems go much deeper than anything anyone here can help you with Oct 13 06:45:33 and as I've now said a couple of times, if you're just going to guess answers to questions, you're wasting your time and everyone else's Oct 13 06:45:33 so, going back to the problem Oct 13 06:45:38 so you want to launch Menu from MainActivity, right? Oct 13 06:46:16 through that button Oct 13 06:46:26 napoleoncomplex: good luck, I look forward to watching you attempt this Oct 13 06:46:36 well I was attempting to do that from the Menu Oct 13 06:46:44 Leeds: ill see in about 5 minutes if it makes sense Oct 13 06:46:45 however if that's not possible I'll do it from MainActivity Oct 13 06:46:55 Streusel: do you understand what activities are? Oct 13 06:47:22 you have 2 activities right now, MainActivity and Menu Oct 13 06:47:31 and a third called splash Oct 13 06:47:34 when your apllication starts, MainActivity is the active activity Oct 13 06:47:43 right, defined in the manifest Oct 13 06:47:49 yes Oct 13 06:47:54 so, from that activity Oct 13 06:47:57 what would you like to do Oct 13 06:48:04 that is the only activity that is on the screen at that moment Oct 13 06:48:28 so anything that happens, needs to happen in mainactivity, until you launch another activity Oct 13 06:48:33 Well I don't care in which activity the button is in, all I want to do is have the button complete an action of going into Menu Oct 13 06:48:56 Alright, so I need to move the button into MainActivity. Oct 13 06:49:01 yes Oct 13 06:49:40 and you should care in which activity things are, because otherwise nothing will work Oct 13 06:49:51 k done Oct 13 06:49:55 I moved it over Oct 13 06:50:11 so now it works? Oct 13 06:50:14 well yes Oct 13 06:50:23 however the button is still supposed to call up Menu Oct 13 06:50:45 let me fumble around a bit more Oct 13 06:51:15 my advice is you should do some android beginner tutorials Oct 13 06:51:23 yeah Oct 13 06:51:24 so you understand the concept of how to structure your programs Oct 13 06:51:28 I did Oct 13 06:51:36 however the tutorial went on to making a new app Oct 13 06:51:40 which I didn't like so I had to stop Oct 13 06:51:42 before continuing it Oct 13 06:52:04 Alright, great I got it. Oct 13 06:52:26 ListActivity was initiated using the button Oct 13 06:52:39 Now I only have to get back once I press an option within it. Oct 13 06:52:55 which the tutorial apparently skipped.. Oct 13 06:53:35 thanks for not giving up on me napoleoncomplex Oct 13 06:54:16 np, though i think you need to try harder on doing things yourself, and understanding them Oct 13 06:54:36 well I wanted to do the button in the Menu activity Oct 13 06:54:59 I didn't know that I had to do it in the MainActivity as it was only loading the MainActivity, or the Menu activity at a time.. Oct 13 06:55:05 why? the button is supposed to launch the Menu activity Oct 13 06:55:13 that was new so knowing that helps Oct 13 06:55:20 would've solved the issue a long time ago Oct 13 06:56:11 napoleoncomplex: I've got a wall here, you're welcome to relax by banging your head against it a few times Oct 13 06:56:12 ok Oct 13 06:56:32 Leeds: it's been a good day so far, zen mode over here :P Oct 13 06:56:36 Streusel: this is like the first thing in the tutorial. http://developer.android.com/training/basics/firstapp/starting-activity.html Oct 13 06:56:53 I read that.. Oct 13 06:57:05 well not all Oct 13 06:57:13 you should read it all Oct 13 06:57:20 and this appears to be a different page than the one I had previously when I installed all Oct 13 06:59:22 "I read that... well, I didn't finish reading it, and that wasn't what I read, but still, I read that" Oct 13 07:02:02 codebutler, should the public void sendMessage be within the onCreate brackets or outside of them? Oct 13 07:02:35 Streusel: you need to stop guessing and take the time to learn basic java syntax Oct 13 07:06:50 but why? i already know javascript why is java so hard? Oct 13 07:36:32 I don't get it. I have an Intent which has extras (and I can see them in the debugger ). But even though the Bundle is not null, when i try to extract the content of this bundle (in onActivityResult) i get null values. Oct 13 07:36:32 http://pastebin.com/VF1h3UpD Oct 13 07:47:58 Streusel, you may want to search youtube for some basic android programming tutorials as well Oct 13 07:48:40 sometimes video helps those who are lost and have trouble knowing where to focus Oct 13 07:48:45 I did, I used thenewboston's site as a main start point, got till number 21 and then stuck because he started a new app in 22 which I really disliked because he didn't go through with ListActivity and how to get back to the front page. Oct 13 07:54:31 which is better using a listener for a button or using onClick in a button? Oct 13 07:55:43 I feel like onClick is better for performance, both do the same thing but listener requires extra lines requiring extra space and it's an activity that is silently waiting in the background while onClick is only executed on click.. Oct 13 08:07:01 morning Oct 13 08:07:35 i want to start a timer, call a method when it reaches a certain value, and be able to cancel it in the meantime… is asynctask the way to go? Oct 13 08:08:30 how long is the timer? should it continue if your app isn't in the foreground? Oct 13 08:10:58 the timer is short, perhaps a second Oct 13 08:11:29 user holds a button down, once the timer elapses some options are available… kinda like a long-press but i want the time to be configurable to the user Oct 13 08:12:10 it's also going to animate a transition on the display but i don't think that part matters yet Oct 13 08:14:32 ok then why you don't try a Timer with a Runnable? Oct 13 08:16:12 ok so not asynctask? Oct 13 08:16:32 i suppose that doesn't give me anything timing related anyway Oct 13 08:16:40 I think asynctask is too heavy for that Oct 13 08:17:33 ok i'll try it, thanks Oct 13 08:20:00 http://pastebin.com/ywb7c9pk Oct 13 08:20:15 you can try this if you want... could be written much better, but you get the basic idea... ;) Oct 13 08:23:54 thanks… what is class.foo? Oct 13 08:24:14 a reference to the class that's using it? Oct 13 08:24:32 er, no that can't be it Oct 13 08:26:23 I'm watching romainguy give a lecture on youtube called "Making the Android UI Fast and Efficient by Romain Guy " Oct 13 08:26:26 oh, yeah it looks like it… so i pass in "this"? Oct 13 08:35:42 right I passed in this, for the class... foo() is the function in class to be called... as already said it's just quickly written and could be much more elegant and generic... ;) Oct 13 08:48:26 hi Oct 13 08:48:59 I'm interested in why my galaxy s3 starts certain stuff on it's own, like google search, play store, gallery, google+, dropbox, shazam Oct 13 08:49:34 I only want those to run when I click on them, especially google+, dropbox and shazam ... where can I change that ? Oct 13 08:51:49 the developer channel probably isn't the right place for this... I guess these apps listen to a specific Broadcast intent, e.g. the device starts or a network connection is first enabled and then start their services in the background... Oct 13 08:52:06 yeah don't ask here b/c you'll get an answer like that one ;) Oct 13 08:52:30 :) Oct 13 08:52:40 evelytte: they're services that automatically run in the background Oct 13 08:52:53 I am not sure but I think you can't suppress them from being started Oct 13 08:53:03 play store is checking for updates, dropbox is listening to sync files, etc etc Oct 13 08:53:08 if you really want to you can try some Task Manager software that try to close these services Oct 13 08:53:19 but it's definitely not recommended Oct 13 08:53:26 why don't you want them to start? Oct 13 08:53:47 no it's not… if your phone is running ok, then leave them… those services are there for a reason… just uninstall anything you don't want Oct 13 08:54:10 if you need a task manager you probably have an old/crappy phone (like the one my employer provides) and maybe it's time to get a new one Oct 13 08:54:12 full ack... :) Oct 13 09:02:47 does anyone know of good tutorials to start off android development with on linux? Oct 13 09:04:26 d.android.com Oct 13 09:04:53 http://developer.android.com/training/basics/firstapp/index.html Oct 13 09:05:07 sampullman, thanks a lot :) Oct 13 09:33:08 does anyone have an example of adding fragment programatically with layout properties? Oct 13 09:43:20 Hi, I have a question about naming ids. For example, I have different menus in my overflow menu in different activities. But some are called the same, for example 'Copy', it just copies different things. Oct 13 09:44:26 Do I have to name them uniquely or will onOptionsItemSelected() _know_ which one I mean, when I have multiple menu/activity1.xml menu/activity2.xml? Oct 13 09:44:49 Since I inflated the correct one in onCreateOptionsMenu() Oct 13 09:45:34 the second Oct 13 09:45:50 like 2 layouts can each have a R.id.button Oct 13 09:46:04 it looks in the 'current' for one with that id Oct 13 09:46:16 if you look in R.java you can see the ids generated for the names Oct 13 09:46:28 But I see all of them in autocomplete, no? Oct 13 09:47:10 So it's good practice to have like @+id/menu_copy in activity1.xml and activity2.xml? Oct 13 09:47:28 it's ok to have the same id in different layouts/menus, if you want to... sometimes it even makes sense to do it the same way... e.g. when you load different menues or layouts for different devices... so it will only check for the one that is acutally being loaded Oct 13 09:47:50 Great, thanks. Oct 13 09:48:38 if both copy buttons do about the same it's a good idea to same them the same... if they are essentially different it might be better not to name them the same. It might keep you from making mistakes and it's better for yourself to distinguish the actions they do... Oct 13 09:50:28 Thanks. I thought so but wanted a second opinion on that. Oct 13 09:50:40 you're welcome... :) Oct 13 09:52:24 So, I have this adapter, in which I have a list of, well, buttons with a text view on them, basically, and also a list of person-like objects, with IDs and names and other characteristics. Oct 13 09:52:47 How can I sort the list of buttons by characteristics of the list of persons, taking into account each button represents a person? Oct 13 09:53:32 I don't think I can use a map because then when the gridview tries to get elements by position it won't work (since person IDs aren't ints incremented by one for each person) Oct 13 10:01:50 Point.x = int??? Oct 13 10:02:01 i add that to an int and it concatenates like a stirng Oct 13 10:02:10 nevermind, this is simple and i'll rtfm Oct 13 10:04:38 wtf is this? Log.i(classID, "amount+size: " + (int)gridButtonSize.x + amount); Oct 13 10:04:51 amount is int, -1… size.x is 182… prints 182-1 Oct 13 10:05:15 ignore the (int) Oct 13 10:05:44 if amount is 1, prints 1821 Oct 13 10:15:50 How can I change my application's background colour? Oct 13 10:17:19 Changing the background colour on my theme seems to mangle dialogues (and I imagine a good deal of other things) Oct 13 10:26:14 Ah, right, android:windowBackground Oct 13 10:35:32 Can I populate a gridview asynchroniously? Oct 13 10:35:45 just putting setAdapter in a new thread won't work. >.> Oct 13 10:43:02 Hmm Oct 13 10:46:10 Can I notifyDataSetChanged from within the adpater itself? Oct 13 10:46:33 So it makes whatever view uses that adapter refresh children etc? Oct 13 10:47:41 I can but apparently it won't really make do anything Oct 13 10:47:58 make the gridview* Oct 13 11:02:07 Hi, im looking for an "easy" way to connect from my app to my server through SSH, I've seen a few librarys but they all seems to be pretty advanced and I don't know which one that will do the job for me in the end Oct 13 11:02:18 basically I just want a execute one command on my server Oct 13 11:02:29 connect, execute command, disconnect Oct 13 11:17:37 hello! I'd like to create a master MIDI device using android as device and USB as device <-> computer connection. Is it even possible? (i.e. to let an android device be recognized as device) If yes, where should I start learning from? Oct 13 11:20:10 Duzzy maybe use http://www.jcraft.com/jsch/ Oct 13 11:20:42 Mikevin: interesting Oct 13 11:20:44 didnt know about it Oct 13 11:22:12 Mikevin: yeah I have checked that one out, it looks fairly complicated though Oct 13 11:23:31 How is Whatsapp, for example, able to receive messages when the phone is asleep, and then wake the phone and notify the user of the message? Oct 13 11:23:58 I want to create an application that wakes on the press of a bluetooth-headset-button Oct 13 11:24:29 But I don't understand how to wake the phone at such events Oct 13 11:24:39 Duzzy I think you could do it, use this code http://stackoverflow.com/questions/2405885/any-good-jsch-examples Oct 13 11:25:39 public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{ Oct 13 11:25:39 public String getPassword(){ return passwd; } Oct 13 11:25:39 public boolean promptYesNo(String str){ Oct 13 11:25:39 Object[] options={ "yes", "no" }; Oct 13 11:25:39 int foo=JOptionPane.showOptionDialog(null, Oct 13 11:25:41 str, Oct 13 11:25:42 Duzzy maybe it's overdone for your use but it'll work I guess Oct 13 11:25:44 "Warning", Oct 13 11:25:46 JOptionPane.DEFAULT_OPTION, Oct 13 11:25:49 JOptionPane.WARNING_MESSAGE, Oct 13 11:25:51 ops... Oct 13 11:25:52 Pastebin... Oct 13 11:26:05 I wasnt meant to paste anythin, was a mistake... Oct 13 11:27:00 hehe Oct 13 11:27:18 Mikevin: I never found that one, will try it, thanks Oct 13 11:28:04 Duzzy np Oct 13 11:29:51 does Android provide anything to draw attention to a TextEdit? I have a simple dialog with an EditText. When the user clicks the Create-button I check whether he has entered something into the EditText. If it's empty I want to notify the user to enter a text. Oct 13 11:30:24 But a simple Toast isn't really eye-catching Oct 13 11:30:41 So does Android maybe provide something to highlight the EditText? Oct 13 11:30:44 evident also takes some time I guess Oct 13 11:30:56 evident: change edittext style then Oct 13 11:32:08 hmm ok working with the style would work... I was just wondering if there maybe is something by default that lets the EditText flash... Oct 13 11:33:51 anybody got a greenDAO example project to share? Oct 13 11:34:11 evident wouldn't setError() fit your needs? Oct 13 11:35:27 Mikevin: ahh cool thank you... didn't know that exists! I will have a look at that! :) Oct 13 11:36:47 evident: it even looks nice =) Oct 13 11:38:11 evident, Yes! see setError! Oct 13 11:38:52 hey, i'm building an app that uses a webservice to fetch data and update the database. I'm wondering where do i put the db code that creates the database as this has to be done only once when the application runs for the very first time. what is the right place to put that code ? Oct 13 11:39:00 EditText gets a special highlight, and even pops a special panel with a message near it Oct 13 11:40:21 since API Level 1 even Oct 13 11:40:57 SPYGAME: you can do it in the onCreate() of your DBHelper class that extends SQLiteOpenHelper Oct 13 11:41:27 evident: yeah, but do i need to create an activity or service for that as well ? Oct 13 11:41:45 Mikevin, sorry. I just woke up and didn't see your mention of setError, heh. Oct 13 11:43:27 mrenouf haha no need to say sorry for helpin someone Oct 13 11:44:07 people tend to overlook setError, I only first used it recently myself. Oct 13 11:44:49 Basically you just create a class DBHelper extends SQLiteOpenHelper ... in that you need an onCreate() that creates the tables... then you need an onUpgrade() method that manages what happens when you upgrade your DB (e.g. add new columns)... So you can alter your tables there... And you need a Constructor for your DBHelper class that calls the super constructor. And this one needs a "version number" of the database... Oct 13 11:45:19 and only when you increase that number by one, on the next execution it will call onUpgrade() Oct 13 11:45:32 and in your Activity you basically just create an instance of your DBHelper Oct 13 11:45:41 mrenouf it's always weird to discover those kind of things. Oct 13 11:45:57 and communicate with it... the DBHelper class also gets all the methods for reading and writing from the DB Oct 13 11:47:12 got it, SPYGAME ? :D Oct 13 11:47:46 Meh, im always getting Failed to install myapp.apk on device '0019a12e0ecc8e': EOF Oct 13 11:47:50 or timeout Oct 13 11:48:10 I've increased the timeout for the ADB connection time out Oct 13 11:48:13 I hate to break unwritten-irc-rules, and re-ask my question, but I think the question is very basic, and you guys just overlooked it :). I want to know how apps such as Whatsapp can receive messages and wake the phone, even when the phone is asleep, and how I can implement that in my own app, to wake the phone when a button on a bluetooth-headset is pressed. Any ideas? Oct 13 11:48:19 but still im getting those errors Oct 13 11:48:25 What can I do to get it working? Oct 13 11:48:56 evident, yeah for sure now Oct 13 11:51:13 Duzzy have you tried clean? Oct 13 11:51:58 Duzzy or create a new device maybe Oct 13 11:52:08 mrenouf: do you know how I can keep my dialog visible? http://pastebin.com/umf0ZmpB When I check for the empty field in the onClick of the positive button, it shows the error icon, but closes the dialog right then... Oct 13 11:52:46 evident, it's shown when the view has focus Oct 13 11:53:04 evident, so it's losing focus somehow Oct 13 11:53:23 Mikevin: yeah I tried clean, and im running the app on my phone Oct 13 11:53:26 oh wait Oct 13 11:53:38 *actually looks at code* Oct 13 11:53:40 :-) Oct 13 11:54:12 why keep the dialog open? Oct 13 11:54:46 Duzzy: if ADB can't connect to the device, try restarting eclipse, then the computer and also the device.. sometimes it's messed up... I experienced that, too... Oct 13 11:55:16 mrenouf: because when nothing is entered into the EditText I just want to notify the user and let him enter a title and try again Oct 13 11:55:51 but when the onClick() reaches it end it automatically closes the dialog... Oct 13 11:56:33 right. the dialog is uneccessary I think. just setError() and setFocus() Oct 13 11:56:52 and the error message will be displayed floating above the field Oct 13 11:57:41 dont do your validation in the dialog Oct 13 11:57:47 well but the edittext is inside a dialog... Oct 13 11:57:54 oooh Oct 13 11:57:56 it's an alert dialog with a custom layout where the EditText is in Oct 13 11:58:04 gotcha Oct 13 11:58:29 O Oct 13 11:58:35 but I guess the onPositiveButton() listener assumes that the dialog can be closed after onClick() has been called Oct 13 11:58:49 I'd have to look at how setPositiveButton() is implemented Oct 13 11:58:50 yeah Oct 13 12:02:01 you may need to build it yourself Oct 13 12:02:17 hmm, nothing I try works... Oct 13 12:02:59 mrenouf: yeah it seems so that AlertDialogs will close automatically once the buttons have been clicked... that kinda sucks.. but ok... ;) Oct 13 12:03:31 yeah, cancellable=false, but still dismiss()-able Oct 13 12:03:52 Duzzy: persistance is even more important than ability imo ;) Oct 13 12:04:17 its just how AlertDialog.Builder is setting it up, not really part of AlertDialog Oct 13 12:04:31 right Oct 13 12:05:16 How come it is so unstable? Oct 13 12:05:39 I mean, most of the times I try to install the new code it fails Oct 13 12:05:52 oh wait, it might be actually. something called AlertController, which is internal Oct 13 12:06:53 evident: You should setError when the text changes, not when the button is clicked Oct 13 12:07:47 evident, have you tried calling .show() in your handler? Oct 13 12:07:59 mrenouf: yes... doesn't work... Oct 13 12:08:08 kind of a longshot, probably dismiss() is called AFTER Oct 13 12:08:11 ahh Oct 13 12:08:29 SimonVT: hmm that seems right... but can I disable the positive button somehow until there is a text in the EditText? Oct 13 12:09:13 mrenouf: right, dismiss() will be called automatically... so showing the dialog again in the onClick() doesnt work Oct 13 12:09:18 I don't think so, and I don't think you should tbh Oct 13 12:10:23 You can ignore the input if it isn't valid, and notify the user or something Oct 13 12:11:37 so you think I should setError in a listener on the EditText that checks if something is in there, and if the user clicks the positive button anyways even if there is no content in the EditText, warn them with a Toast or something and close the dialog? Hmmm Oct 13 12:14:39 When I'm trying to do AccountManager.getAuthToken(… "https://www.googleapis.com/auth/drive"….), the user gets the error "Couldn't sign in. There was a problem communicating with Google Servers. Try again later.". Is there an issue with Google server, or am I doing something wrong? Oct 13 12:14:59 Say I have a bitmap (2400x1600px) which i draw to canvas, how can I allow the user to zoom in and out of it? Oct 13 12:15:40 I'm running 4.1.2, there seemed to be an issue with this, but it seems Google fixed it last month: http://code.google.com/p/android/issues/detail?id=37649 Oct 13 12:15:49 psyclopolis: by cropping and scaling ? Oct 13 12:16:09 Hey, I'm currently trying to find a possible memory leak in my app. I read some article by Romain on it. What I don't completely understand is, are references to member variables kept on orientation change? Oct 13 12:17:26 Say, I have something like 'private MyObject myObject;' and it needs a context for it to be created. 'new MyObject(this);' Oct 13 12:17:30 psyclopolis: we use this library to allow users to do zoom: https://github.com/jasonpolites/gesture-imageview Oct 13 12:18:06 Will that leak because I use 'this' (the activity) instead of the ApplicationContext? For example when I rotate, the activity is restarted, but MyObject still uses a reference to the old activity? Oct 13 12:18:32 Or are members also re-created, since they are allocated in onCreate() Oct 13 12:19:05 thankyou tofi9 that looks promising Oct 13 12:19:10 kakazza: It's a completely new instance of your activity, the old is GCd Oct 13 12:19:27 kakazza: it depends whether you keep MyObject alive. Android uses a garbage collector. Meaning, anything referenced from a stack or static field are kept alive. Also, their references will be kept alive. Oct 13 12:20:14 Hmm, I see. I'm having a hard time locating the leak. But I think it's related to orientation change. Oct 13 12:21:17 kakazza: have you tried DDMS? http://developer.android.com/tools/debugging/ddms.html Oct 13 12:21:28 D/dalvikvm( 106): GC_EXPLICIT freed 39K, 51% free 5370K/10823K, external 3125K/3903K, paused 76ms Oct 13 12:21:46 then the orientation change Oct 13 12:21:50 Suddenly: D/dalvikvm(17865): GC_EXTERNAL_ALLOC freed 693K, 43% free 9540K/16711K, external 15931K/16856K, paused 72ms Oct 13 12:22:20 I can't seem to reproduce it properly on my device. All I have is a logcat for a remote device, running on Jenkins. :\ Oct 13 12:23:57 tofi9: I did. But I am not sure where I can find the numbers for the external heap. I seem to only see the numbers for the first few numbers. Oct 13 12:24:26 guys, huge explosion in ICS numbers for my app lately. this is great news. Oct 13 12:24:45 tofi9: Sorry I have never added an external library to an app before... How do I go about it? Oct 13 12:25:39 psyclopolis: copy/paste relevant classes & resources into your project Oct 13 12:25:54 > 50% this week Oct 13 12:26:27 psyclopolis: check IsLibrary in Project Properties > Android menu Oct 13 12:26:40 psyclopolis: Then add it as library in build path of other project Oct 13 12:27:48 psyclopolis: sorry about my reply, cthulhu2's suggestion is probably a cleaner solution Oct 13 12:29:26 thankyou both Oct 13 12:29:35 kakazza: no idea. probably (instead of searching for the largest objects), start searching for memory allocations of Bitmaps and classes inheriting from View? Oct 13 12:32:10 Sorry for repeating my question, hoping new joiners might have an answer: When I'm trying to do AccountManager.getAuthToken(… "https://www.googleapis.com/auth/drive"….), the user gets the error "Couldn't sign in. There was a problem communicating with Google Servers. Try again later.". Is there an issue with Google server, or am I doing something wrong? Oct 13 12:33:53 More info: I use a Google Apps account & Logcat: GLS error: Unknown XXXX@XXXX.com https://www.googleapis.com/auth/drive Oct 13 12:35:12 how do i allow add permission to use internet in my manifest, any resource ? Oct 13 12:35:57 http://developer.android.com/guide/topics/security/permissions.html Oct 13 12:36:08 http://developer.android.com/guide/topics/manifest/manifest-intro.html Oct 13 12:37:02 (I just searched for permissions on the dev page and clicked the first hit) Oct 13 12:37:32 while I searched for manifest permissions :) Oct 13 12:38:17 lol Oct 13 12:40:03 I just grabbed the question "how do i allow add permission to use internet in my manifest, any resource ?" and placed it in Google and selected the first hit…. http://developer.android.com/guide/topics/media/mediaplayer.html Oct 13 12:40:19 hey sry to ask in here, i know its the wrong chan, but all others are dead. this is the 1st time ive used rom toolbox pro to back up my apps, which is what i wanna do right now so i can flash the latest nightly for my device Oct 13 12:40:42 Yep, wrong channel indeed Oct 13 12:41:19 my question is, can i just back up the apps without the data, cuz i havent ran any of the apps since installing them,, so idont wanna waste the space with backing up the data too, i just wanna back up the apps so i can restore them and not have to re dl them all after i flash the new rom Oct 13 12:41:27 Ob1-W4n: you can ask in the right channel Oct 13 12:41:33 yea i know SimonVT , sry ;/ Oct 13 12:42:09 i asked in the normal channel i would for this, but it was dead, anyways, sry, just forget it, didnt mean to fuck up ur guys convo Oct 13 12:42:20 no you didn't Oct 13 12:43:47 huh, yea i did, i asked in #fnv, thats the chan im usually in and most my bros are in, and where this be ok to ask there Oct 13 12:44:00 tofi9: for what it's worth, if you hadn't added the random "any resources?" bit, you'd have got your answer... Google doesn't do conversational search, really Oct 13 12:44:03 How do people test for lower api levels (e.g. API level 8)? Oct 13 12:44:24 ? Oct 13 12:44:34 i said sry, and forget it lol Oct 13 12:45:05 Ob1-W4n: please take the hint and go away Oct 13 12:45:12 Apologizing about it doesn't make this the right channel Oct 13 12:45:37 i know, so i said im sry and forget it and i wont ask about that type of thing in here again Oct 13 12:46:35 anyone know of a way to automaticaly turn your phones screen on when you deploy your project? Oct 13 12:47:18 ive never asked anything but dev related questions in here before, just was late and didnt think it was a big deal, i know it is now lol Oct 13 12:47:22 <3 Oct 13 12:47:52 what is the level of permission if there's no permission set in the manifest ? Oct 13 12:48:23 you set permissions for different functions Oct 13 12:48:26 Unless, to test older APIs, I should use my 4.1 image and just set the API level to X? Oct 13 12:49:09 tech1, so if i haven't set any permission for any function does that mean that access to all functions is available or vice-versa ? Oct 13 12:49:45 If you want internet access, you need the internet permission.. if you want to write to external storage, you need the permission for that.. etc.. Oct 13 12:49:49 certain features require you ask for the respective permissions. if you say nothing the manifest, you can't use those features Oct 13 12:49:50 Not everything is protected by permissions Oct 13 12:50:18 Tobias|: you have different devices to test on, if possible - otherwise you use the emulator Oct 13 12:50:41 looks like they're asking the other way around, giving other apps permissions to his Oct 13 12:51:33 Leeds: Do I need to use a froyo emulator to test API 8, or can I use the jellybean emulator and API level 8? Oct 13 12:51:54 you use an AVD built from the appropriate OS images Oct 13 12:52:07 you should *always* use the latest SDK tools Oct 13 13:03:19 i am working on a custom ListView with a custom adapter and have overrided the getfilter function to filter from an edittext search box, but for some reason when notifyDataChangedSet is called there the updated listview is missing the first element of the new data Oct 13 13:03:44 i have debugged that the new data has the correct values Oct 13 13:08:49 should i post the code for my custom adapter? Oct 13 13:21:36 Are there any downloadable (and free) UI elements/widgets available? What you get in Eclipse is pretty limited Oct 13 13:25:19 There are lots, just gotta find them Oct 13 13:36:57 omfg - win8 is too smart for me! Oct 13 13:37:18 i coulnd even figure out, how to shutdown my computer Oct 13 13:37:35 You're not the only one Oct 13 13:37:49 it was odd in 1995 to press start to stop Oct 13 13:37:57 but there is even no start in 2012 :) Oct 13 13:38:19 monsti, heh Oct 13 13:38:33 win server 2012 is ieven more odd Oct 13 13:38:43 pressing ESC starts the metro stuff Oct 13 13:38:49 LOL Oct 13 13:38:51 so no more vim on my servers ... Oct 13 13:40:23 why would my ListView be missing the first value of a dataset i have sent to it? Oct 13 13:42:45 erek: do you have a custom adapter? Oct 13 13:42:52 yes Oct 13 13:43:15 maybe you are doing something wrong in the getView() Oct 13 13:44:27 http://pastebin.com/zBZgUesK Oct 13 13:44:31 that's the getview Oct 13 13:53:05 there appears to be some sort of a lag Oct 13 13:54:14 erek: try to inflate the view every time - just for testing Oct 13 13:55:00 try to check if the items.get(position) is null Oct 13 13:55:09 my 5 cents... Oct 13 13:56:18 So I have this gridview with this nice adapter... Oct 13 13:56:40 If an adapter does notifyDataSetChanged() from within itself, will the gridview update the views? Oct 13 13:58:44 yes Oct 13 13:58:58 Yay. Oct 13 13:58:59 Uuuh Oct 13 13:59:27 I wanna make updating and populating it async, what methods from inside the populatelist method of my adapter should I run on UI thread? Oct 13 13:59:39 If I try to throw populate in a new thread just like that it apparently silent-crashes Oct 13 14:00:02 Don't do anything that has to do with ui async Oct 13 14:00:26 But right now after you press the button to open the activity with that gridview it takes like 2 seconds to open it :[ Oct 13 14:00:36 While all the views are being made Oct 13 14:01:00 You can populate a list async, then pass it to the adapter on the ui thread Oct 13 14:01:32 But drawing etc happens on the ui thread Oct 13 14:01:42 Well I'm doing that but the UI still has to wait for the list to be full which takes a little bit before it draws the whole gridview with all the elements in the list Oct 13 14:02:18 Hmmm Oct 13 14:02:27 Maybe your ui is just horribly inefficient and could use some work Oct 13 14:02:38 Probably Oct 13 14:05:37 Hmm Oct 13 14:05:49 monsti: hey, i checked my TextView containing my data, and it's there correctly Oct 13 14:09:51 hi shmooz Oct 13 14:28:45 http://www.fastcompany.com/3002112/samsung-wins-latest-round-its-patent-spat-apple how awesome Oct 13 14:30:00 Hi Oct 13 14:30:45 I see an error message "WakeLock finalized while still held" Oct 13 14:31:17 Would the wakelock be released? Oct 13 14:35:43 monsti: you won't believe this, but it was a bug with RelativeLayout Oct 13 14:50:36 Hello. Fragments are giving me a problem. I define them in my xml layout which mostly works fine. However if I start a FragmentTransaction which alters the layout and then rotate the device (or anything that recreates the activity) the xml layout is displayed not the transaction layout. Oct 13 14:51:58 Hey folks, I'm trying to use an intent to open the package manager to install an apk. Right now I'm provided with an application selector dialog which I would like to avoid. I've tried using Intent.setComponent, but I apparently can't figure out the proper component name for PackageManager. This: "new ComponentName("com.google.android.content.pm", "com.google.android.content.pm.PackageManager")" results in a crash because the call cannot be f Oct 13 14:52:02 How can I receive SMS messages and read them? I'm using API level 16. Oct 13 14:52:46 Ok perhaps I should be programmatically creating the fragments you might say. But then the problem is if I replace the fragments in xml with ViewStubs, I get an exception "android.view.ViewStub cannot be cast to android.view.ViewGroup" Oct 13 14:53:17 so how do I handle this? I can't be the only one who has had this problem. Oct 13 14:54:02 ianliu: just look: http://www.apriorit.com/our-company/dev-blog/227-handle-sms-on-android Oct 13 14:55:50 hblaub: Is there any "official" documentation about this? How would I know I had to get the "pdus" from extras? Oct 13 14:55:53 ianliu, same question here Oct 13 14:57:23 jaldhar: xml declaration is really only for when you don't need to perform transactions on them Oct 13 14:57:27 And ViewStub, why are you using that Oct 13 14:57:38 You have to inflate it before you can use it for anything Oct 13 14:58:24 ianliu: "The raw pdu of the status report is in the extended data ("pdu"). " from http://developer.android.com/reference/android/telephony/SmsManager.html Oct 13 14:59:08 i am having a problem with a ListView OnItemClick() in the MainActivity thread reading GetItemAtPosition(position).toString() while the list gets filtered and updated from a Custom List Adapter... when an item is clicked the GetItemAtPosition seems to still think it's the original values before being filtered... Oct 13 15:02:00 SimonVT: I have to use view stubs don't I? To fill them with different fragments depending on the transaction? Oct 13 15:02:17 No, you add fragments to a viewgroup Oct 13 15:02:21 Mostly a framelayout Oct 13 15:02:55 SimonVT: ahh. Ok let me try that... Oct 13 15:11:55 Seriously folks, I'm desperate.. What's component name for the PackageManager? Nothing works for me Oct 13 15:13:28 what do you want? update or install an apk? Oct 13 15:14:04 monsti: Update.. The only problem is, that my intent brings up the application selector list Oct 13 15:14:23 is xml frequently used in java projects, or is that more android specific ? Oct 13 15:14:37 monsti: And as I am sure that I definitely want to open the package with package manager, I would like to avoid that Oct 13 15:14:50 * davieslacker <- newb Oct 13 15:15:07 davieslacker, more android specific Oct 13 15:15:15 but i believe ant uses xml Oct 13 15:15:26 however a java program does not require the usage of xml at all Oct 13 15:15:32 and in tomcat for example, it is used for web config Oct 13 15:15:51 i would like to understand one thing Oct 13 15:16:00 why on earth is the default code full of errors? lol Oct 13 15:16:16 but I'm guessing even in java it could potentially be a good way to store information Oct 13 15:16:24 yup Oct 13 15:16:30 also... anybody have experience with codenameone ? Oct 13 15:16:51 pehlert: http://pastebin.com/Lmghh2Gn Oct 13 15:17:02 is it worth messing with, I saw it in the netbeans plugins, stating it can cross develop apps for ios android blackberry windows phone 7... Oct 13 15:17:03 wow Oct 13 15:17:31 pehlert: there will be always a confirmation dialog - you can't avoid this Oct 13 15:17:32 the same as phonegap ? :D Oct 13 15:18:06 monsti: It's not about the confirmation dialog but about the application selector because that will be confusing for the users Oct 13 15:18:23 pehlert: theck the link Oct 13 15:18:37 I'm guessing I should probably dive into straight java a bit more before I get into some second tier of API that will just obfuscate things in my brain Oct 13 15:18:49 pehlert: That's how I am doing it, but that will still ask me what application I would like the file to handle Oct 13 15:19:00 davieslacker, yup you should Oct 13 15:19:23 how do i test my app on avd? Oct 13 15:19:31 monsti: That was meant for you, not me ;.) Oct 13 15:19:36 Install it, run it Oct 13 15:19:50 pehlert: so there is a 2nd application install that claims to handle the content type Oct 13 15:19:54 create one with avd manager..r .. click on a code window for your project and run... Oct 13 15:20:00 SimonVT, how do i build it in the first place? :D Oct 13 15:20:01 pehlert: why do you install such applications?! Oct 13 15:20:13 or plug in an android device by usb.. click run... that part excites me.. Oct 13 15:20:14 SimonVT, total android noob, sorry Oct 13 15:20:28 SimonVT, im using eclipse + adt plugin if that helps Oct 13 15:20:43 http://developer.android.com/training/basics/firstapp/running-app.html Oct 13 15:20:45 monsti: Because Dropbox and many others are amongst them Oct 13 15:20:47 oi oi oi Oct 13 15:21:16 pehlert: dropbox claims to be a packetmanager content type handler? Oct 13 15:21:19 well - yeah :) Oct 13 15:21:45 http://developer.android.com/training/basics/firstapp/index.html the whole thing is a good way to start... that's where I jumped in at Oct 13 15:22:01 monsti: Unfortunately, yes.. Oct 13 15:22:04 which is also where I'm stopped at now... but I decided to mess with java alone for a bit now just to get a feel for it better Oct 13 15:22:34 you can follow tuts, but I guarentee the best way to learn is decide to build an app Oct 13 15:22:44 and go search for how to achieve x as you go Oct 13 15:22:52 I can confirm Oct 13 15:23:02 davieslacker, i tried tht Oct 13 15:23:12 was actually confusing due to errors in default templates? Oct 13 15:23:21 yeah, but the first tutorial that shows you how to actually use everything is kind of a good thing to follow at minimum I suspect Oct 13 15:23:26 and lol my machine shows "50% charging" Oct 13 15:23:35 tht ? Oct 13 15:23:39 yup Oct 13 15:24:08 so... i got a successful build, but it doesn't appear in the launcher. what do i require to create a launcher? (sorry used to linux terminology) Oct 13 15:24:44 when I learned languages in the past, I will say I learned best when I had a very specific application in mind and just worked it out as I went... but again I needed to at least know how to work the IDE components or commandline components Oct 13 15:24:44 you need a main intent filter Oct 13 15:25:03 mornin Oct 13 15:25:16 ron_frow_, hmm? Oct 13 15:25:16 ron_frow_ how's that ducati treatin ya Oct 13 15:25:27 fantastic Oct 13 15:25:47 creeping up on my 600mi service and have to fork out 220 bucks for first service Oct 13 15:25:47 wei2912 : you may need to stick with more of the default templates in AVD Oct 13 15:25:53 wei2912: are you running it on windows ? Oct 13 15:25:59 davieslacker, on linux Oct 13 15:26:02 cause I can't seem to get it to run at all in windows atm Oct 13 15:26:17 i used "BlankActivity" Oct 13 15:26:21 its annoying, spends forever starting up on the android screen then crashes... tried all kinds of settings Oct 13 15:26:34 pardon me if i look like i didnt read anything Oct 13 15:26:38 because i didnt :P Oct 13 15:26:46 davieslacker - is this a tablet avd image? Oct 13 15:26:46 just jumped in Oct 13 15:27:05 ron_frow_: I leave it in the default jellybean 4.1 Oct 13 15:27:20 but does it appear like a tablet ui Oct 13 15:27:31 if you you need to install haxm and use the intel atom image Oct 13 15:27:39 makes a huge difference Oct 13 15:27:55 arm, wvga800... yea I think its running tablet sized.. but I don't know how else to get it Oct 13 15:28:10 so... how do i create a launcher? :D Oct 13 15:28:20 or should i just trash it and restart? Oct 13 15:28:32 wei2912: not sure what you mean by launcher, you really should read that tutorial wei2912 Oct 13 15:28:36 read up on intent filters in AndroidManifest.xml Oct 13 15:28:43 wei2912 you need to go to the tutorial first and foremost Oct 13 15:28:51 davieslacker, speakingcode im there already Oct 13 15:28:58 ron_frow_, ah what i need, thanks! Oct 13 15:29:06 I can't understand why this isn't working: http://pastie.org/5052746 The id has a value and I am using "intent.getIntExtra(ARG_ITEM_ID, -1);" in the Fragment to get the int. But the int isn't in the Bundle Oct 13 15:29:17 wei2912: go to help, AVD manager, New... pick your api and other options... click create Oct 13 15:29:21 then hit start Oct 13 15:29:24 davieslacker, yup Oct 13 15:29:27 done all taht Oct 13 15:29:29 then on your code page hit the play button Oct 13 15:29:34 yup Oct 13 15:29:36 just couldn' Oct 13 15:29:42 not to sound like an ass, but it sure seems like there is a lot of real elementary questions being asked right now Oct 13 15:29:46 couldn't find the run button, too used to it being closer Oct 13 15:29:50 then you got faulty code, or you got some bad setting on the avd Oct 13 15:29:55 I'd suggest googling for stuff, or trying it Oct 13 15:30:08 the stock jellybean images when used as a tablet Oct 13 15:30:18 can BARELY run on windows even on a powerful manchine Oct 13 15:30:22 machine Oct 13 15:30:24 ron_frow_: makes sense... its the only api I setup though... Oct 13 15:30:27 http://www.atomontage.com/?id=faq Oct 13 15:30:31 http://www.atomontage.com/?id=faq Oct 13 15:30:31 http://www.atomontage.com/?id=faq Oct 13 15:30:31 http://www.atomontage.com/?id=faq Oct 13 15:30:32 http://www.atomontage.com/?id=faq Oct 13 15:30:33 http://www.atomontage.com/?id=faq Oct 13 15:30:34 you have to install intel haxm and use the intel atom image Oct 13 15:30:35 http://www.atomontage.com/?id=faq Oct 13 15:30:37 :3 Oct 13 15:30:41 not helping Oct 13 15:30:48 ron_frow_: I think I did Oct 13 15:30:56 it wouldnt start either Oct 13 15:31:02 I dont know Oct 13 15:31:33 davieslacker, i set everything to default except for ram, which is at 1024 Oct 13 15:31:36 ron_frow_: do I need to do aninything special to make it use the haxm ? Oct 13 15:31:51 and relax, i hv 8gb here. Oct 13 15:32:02 wei2912: try setting screen to smaller and lowering ram to 512 Oct 13 15:32:05 you have to chose the x86 architecture when you create the avd image Oct 13 15:32:07 davieslacker, okay. Oct 13 15:32:10 I read on windows that can help... Oct 13 15:32:12 ron_frow_, ah... Oct 13 15:32:58 ron_frow_: lol... I'm doing it on linux now... spaced out.. thought I was on windows for a min.. I was so following your suggestion.. Oct 13 15:33:03 it runs fine on here though Oct 13 15:33:05 heh Oct 13 15:33:08 brain fart.. Oct 13 15:33:35 it should help everywhere Oct 13 15:34:29 you end up emulating an entire architecture AND the software vs an image that runs taking advantage of intel processor supprot for that Oct 13 15:34:29 wei2912: for what its worth though, its ten times better just plugging up an android device in usb debugging mode Oct 13 15:34:37 suppose so Oct 13 15:34:43 the emulator isnt real smooth on operation Oct 13 15:34:49 I just dont know if there is a haxm for linux Oct 13 15:34:56 with haxm its damn near native Oct 13 15:35:19 hell, I plugged in my htc desire phone, and my nexus 7 tablet by usb at same time, set it up to run on all available devices... so I hit play and my app comes up on both devices Oct 13 15:36:15 well, I hope I can give, it a whack on windows, I'd sure like to see it perform better. I havent used it much cause its just so damn slow Oct 13 15:36:39 the system I can't get it to run on is a core2quad with 4gb ram Oct 13 15:37:14 I have an i7 desktop that's not setup atm... I can't wait to get my space cleared and get my baby running again Oct 13 15:37:25 if it doesnt work right on there.. then I'm clearly doing something wrong Oct 13 15:37:41 emulator is shit Oct 13 15:37:48 davieslacker, okay, i will tell you what's the problem Oct 13 15:37:51 with my code Oct 13 15:38:02 i mean, even when it's going well it's still sluggish in my experience. device is way better to use if yuo can Oct 13 15:38:04 so i selected the default options and received non-compiling code. Oct 13 15:38:27 in MainActivity.java: "R cannot be resolved into a variable" Oct 13 15:38:29 whats the error with yuor code wei2912 ? Oct 13 15:38:38 it's not automatically building properly Oct 13 15:38:46 try cleaning the project and see if that forces a rebuild Oct 13 15:39:11 speakingcode, cleaning the project? Oct 13 15:39:17 and make sure Project->build automatically is selected (in eclipse) Oct 13 15:39:22 project -> clean... Oct 13 15:39:26 ah Oct 13 15:39:55 same thing Oct 13 15:40:05 build automatically is selected. Oct 13 15:40:34 i dunno. reinstall ADT, heh :-\ Oct 13 15:40:45 maybe start a new project with blank activity, and don't do anything to any of the files or code... just hit run Oct 13 15:40:50 just to see if its working Oct 13 15:41:05 R.java is built automatically and it's critical for your application Oct 13 15:41:36 maybe you need to run the android sdk manager and see if you're missing anything vital from that Oct 13 15:41:53 you could try making a change to res/layout/main.xml - add a space at the end then delete it, then hit save. that miht force it to rebuild R.java Oct 13 15:41:55 speakingcode, davieslacker apparently it got "merged" with my old files (damn dropbox) Oct 13 15:42:06 works now anyway Oct 13 15:42:24 thanks a lot for your help, speakingcode davieslacker ron_frow_ Oct 13 15:42:37 np Oct 13 15:42:42 okay Oct 13 15:42:44 works! Oct 13 15:43:08 np... like I said, I'm a newb too... I've found over the years trying to help others with issues even if I don't get it, helps me learn Oct 13 15:43:10 np Oct 13 15:43:26 hell, two googlers are better than one... Oct 13 15:43:28 heh Oct 13 15:45:03 davieslacker, :) Oct 13 15:45:24 davieslacker, want me to help you with java's first steps while you help me with android's first steps? Oct 13 15:45:34 what does it really mean when a listener consumes an event? Oct 13 15:45:49 wei2912: you hang out on freenode a lot? Oct 13 15:45:55 Joozey it means the listener is notified and it does something Oct 13 15:45:55 davieslacker, not really Oct 13 15:46:34 wei2912 : cause I'd be likely to hit you up.. I don't exactly spend hours and hours on pc these days like I did when I was a teen... so i'm just picking it up in tiny bits as I can Oct 13 15:46:44 i.e. it receives data and responds to it, uses it, whatever Oct 13 15:47:00 if I'm online, I'm on freenode... in here, hardware, linux android xda-devs... a lot of chans.. Oct 13 15:47:06 davieslacker, okay Oct 13 15:47:19 davieslacker, guess we should start with tutorials and ask questions then :) Oct 13 15:47:28 if not as davieslacker, then as DaveWM or DaveWM_ Oct 13 15:47:30 and why does that need to be returned? For example in the touchlistener, what happens if I return true or false? Oct 13 15:47:33 davieslacker you would be wise to dive into pure java for a while before android, IMO. android incorporates lots of somewhat advanced java concepts and techniques all over the place Oct 13 15:48:00 wei2912: the people in these chans generally appreciate it if you go through the basics by googling and following instructions on the main sites involved first... lol Oct 13 15:48:31 speakingcode: yeah, I'm starting to think that is the way to go, gonna do a little java for a bit first Oct 13 15:48:33 davieslacker, i know, but that one was very confusing to me Oct 13 15:48:41 hopefully now i know why Oct 13 15:48:44 Joozey Returns Oct 13 15:48:45 True if the event was handled, false otherwise. Oct 13 15:48:47 so it's all fine :D Oct 13 15:49:00 but at least I got hello world and sending the string to a second activity on android and eclipse under my belt... so I know where I want to end up at... Oct 13 15:49:36 damn we need a bot for the api docs... message! Oct 13 15:49:38 wei2912: well I know it was annoying me that I couldnt get the emulator running on windows Oct 13 15:50:41 maybe its a 64bit windows 7 issue... or some weird setting I have somewhere in windows.. I'm always messing with stuff and can't leave well enough alone Oct 13 15:50:56 davieslacker are you experienced with OO programming at all? Oct 13 15:51:07 but why would some class want to know that? I assume there's an observer pattern behind it... what is the subject, iterating over all the listeners calling their onTouch() method, gonna do if it reads true or false? Oct 13 15:51:27 Joozey it's for the system, i don't really know why Oct 13 15:52:08 I noticed when using false, the touch wouldnt always work or something... returning true goes well. but by default eclipse let the methods return false Oct 13 15:52:18 hm.. Oct 13 15:52:19 esp. multitouch was screwed when returning false Oct 13 15:52:22 my guess would be if it gets a true back it knows it needs to look ni a queue to process it Oct 13 15:52:31 I have around 1 outof memory exception per 70 000 installs - should I care? Oct 13 15:52:37 something like that, in a much more elagant fashion Oct 13 15:52:38 app crashes lol Oct 13 15:52:47 The idea is that I'm not doing anything great there.. no big image manipulations etc Oct 13 15:52:48 okay Oct 13 15:52:51 thus I think.. Oct 13 15:52:56 this can happen to literally EACH app Oct 13 15:53:00 no matter what it actually does Oct 13 15:53:13 I see those as some "background noise", am I right here? Oct 13 15:53:29 spobat yeah, could be the device it's running on. look at the output of the crash report Oct 13 15:53:39 speakingcode: from age 11-17 I had learned all kinds of stuff. somet c, visual basic, html, java script, TCL script.. probably leaving a lot out.. then I had a gap where life took me away from my 24/7 geek ventures and tossed me into the manual labor field and into a relationship... then at 25 I was learning c#.. built a few applications... then sort of got side tracked away... 31 now and here I go again... Oct 13 15:53:53 speakingcode, it's about xml inflation Oct 13 15:53:53 so I get programming fundamentally... Oct 13 15:54:20 is it in a listview or something spobat? Oct 13 15:54:33 but its still difficult to get into, not quite like riding a bike. If I had messed with stuff off and on I'd have retained it maybe Oct 13 15:54:38 speakingcode, it's a layout with 2 buttons + 1 textview Oct 13 15:54:39 SimonVT: help again? I took your advice and changed the fragments in my xml layout to empty FrameLayouts. But now try as I might I get an IllegalStateException "The specified child already has a parent. You must call removeView() on the child's parent first." when I try and FragmentTransaction.add a fragment. Same if I use .replace Oct 13 15:54:43 all within a relative layout Oct 13 15:54:48 really, nothing special Oct 13 15:54:52 what did i do wrong again? :( Oct 13 15:54:53 lol Oct 13 15:55:43 that is clarified by the returned exception, or lack thereof :P Oct 13 15:56:00 has anyone got any experiance with this library https://github.com/jasonpolites/gesture-imageview ? Oct 13 15:56:01 I think what's changed most since my teen years is the concept of reusing code... class and object based programming becomming MORE standard than it was Oct 13 15:56:24 davieslacker, thanks for the insight :> Oct 13 15:56:32 who are you talking to by the way? Oct 13 15:56:35 davieslacker yeah. well, some concepts you'll want to be familiar with from java that are used a lot in android are interfaces, inheritence, asynchronocity and callbacks, serialization of data/objects, anonymous and inner classes Oct 13 15:56:36 I remember most projects I had being only a few pages of code, now a simple project contains tons of pages of stuff I have no clue why I need... lol Oct 13 15:57:07 asynchronicity? is that a word? Oct 13 15:57:17 it is! Oct 13 15:57:20 asynchronicity Oct 13 15:57:33 well, ,thanks for the advice, I'm certainly gonna dig around in java a bit first now Oct 13 15:57:42 well... second.. but.. yea. Oct 13 15:57:44 http://en.wiktionary.org/wiki/asynchronicity Oct 13 15:58:32 SimonVT: nevermind http://stackoverflow.com/questions/6035711/android-fragment-with-compatibility-package-on-2-3-3-creates-specified-child explains whats happening. Oct 13 15:59:18 yeah you'll want to be strong in object oriented stuff, classes, all that. i would suggest reading oracl'es java tutorial series, it can be a little bit intimidating as it's no fluff, but... it's no fluff :-) Oct 13 15:59:21 I get it, return value varies among the different listeners. returning true for onTouch means you want to receive more actions triggering onTouch, returning true for onKey means you want to stop receiving because you're done. That is massively confusing. Oct 13 15:59:46 Joozey don't overthink it Oct 13 16:00:31 views are in a heirarchy Oct 13 16:00:46 returning true says i've handled this, don't send it up the chain any further Oct 13 16:01:14 except for onTouch, because onTouch has multiple different actions triggering that method Oct 13 16:01:29 it was massively confusing because the eclipse doc is not explaining it at all Oct 13 16:02:06 consult to google.com Oct 13 16:02:32 if you return false for onTouch, means you're not interested in any actions whatsoever, even if you did consume the DOWN action, you wont be notified for RELEASE either Oct 13 16:04:39 why is that confusing? Oct 13 16:05:00 true - yes, i'm consuming this event. give me the actions. false- no, i'm not consuming this, don't give me the subsequent actions Oct 13 16:07:22 interesting :D Oct 13 16:07:56 like that, sounds less confusing Oct 13 16:09:11 the confusing part about it, IMO, is that onTouch has multiple actions which semantically are events themselves Oct 13 16:09:19 I read consuming as in, I have done something with it. Not as an indication that you want to consume it. I was confused as why the subject would need to know wether or not I did something with the event. But it makes sense now, I need to tell the subject I want to use it. Oct 13 16:09:30 yeah Oct 13 16:09:51 but, implementing onDown onUp onThis onThat would be a PITA Oct 13 16:09:56 gtg bye :) Oct 13 16:10:01 good luck wei2912 Oct 13 16:10:08 speakingcode, thanks :) Oct 13 16:10:18 you too for your projects :) Oct 13 16:10:26 thanks i'll need it Oct 13 16:10:27 hmm... i can do one last thing Oct 13 16:10:35 speakingcode, how do i change the background color? Oct 13 16:10:41 of ? Oct 13 16:10:44 the whole screen? Oct 13 16:10:48 yup Oct 13 16:10:56 go to the layout xml file for that activity Oct 13 16:11:05 hehe, maybe, usually you do want the different touch actions under different functions Oct 13 16:11:05 probably res/layout/main.xml if you just used all the defautls Oct 13 16:11:07 is there a function to delete a directory without the need to do it recursively. Oct 13 16:11:16 speakingcode, okay, im there. Oct 13 16:11:41 in the topmost element, probably a or Oct 13 16:11:49 if a device doesnt unregister from GCM (push) and sometime passes, device switches off, back on...will the device still be registered for the service, or does the registration timeout/expire? Oct 13 16:11:52 Don't do it like speakingcode says, set the android:windowBackground attribute in your theme Oct 13 16:12:04 lol Oct 13 16:12:06 lol Oct 13 16:12:10 thanks SimonVT Oct 13 16:12:19 You're welcome =) Oct 13 16:12:20 SimonVT, in my theme? Oct 13 16:12:35 ultra noob here :( Oct 13 16:12:38 simon will be happy to answer the subsequent questions about this Oct 13 16:12:45 speakingcode, heh, thanks anyway :) Oct 13 16:12:57 lol Oct 13 16:13:02 http://developer.android.com/guide/topics/ui/themes.html#ApplyATheme Oct 13 16:13:07 lol, i'm just jabbing at him. he is right i.e. it's better practice to set it in the theme, if you wanti t globally Oct 13 16:13:08 :F Oct 13 16:13:22 You can have per-activity themes Oct 13 16:13:52 but to answer you quickly, yuo can add android:background="#RRGGBB" in the root layout element, it will apply only to that layout of course, not any other activity Oct 13 16:13:53 Also, it's more efficient to do it like that Oct 13 16:14:04 SimonVT he is still w/ a single activity, default new project setup Oct 13 16:14:26 Pretty sure lint warns you now if you set a background on the root of your layout Oct 13 16:15:20 doesn't seem to for me. i actually just did for some fragments, but each has its own color Oct 13 16:15:21 where do i put it? Oct 13 16:15:33 within the < > Oct 13 16:15:46 Check the page I linked Oct 13 16:15:51 They even set windowBackground Oct 13 16:16:14 so like Oct 13 16:16:23 i.e. an attribute of the opening tag of the layout Oct 13 16:16:30 if you do it theme-wise, it's slightly different Oct 13 16:16:54 It might check where the layout is used Oct 13 16:17:05 what is it, #FF0000 ? shrug Oct 13 16:17:22 Anyway, the point is.. Setting it on the root view: Draw windowBackground, draw root view background.. Setting it in the theme: Draw windowBackground Oct 13 16:17:28 haven't touched styles/ themes in a while, woohooo Oct 13 16:18:40 after this im going off Oct 13 16:18:55 ah black background Oct 13 16:18:59 Sicp, speakingcode thanks a lot! Oct 13 16:19:09 I helped?.. Oct 13 16:19:12 where? Oct 13 16:19:16 oh you mean SimonVT Oct 13 16:19:17 i think he meant SimonVT Oct 13 16:19:17 Sicp, ah sorry Oct 13 16:19:17 lol Oct 13 16:19:18 of course Oct 13 16:19:19 SimonVT, Oct 13 16:19:22 of course Oct 13 16:19:27 tab autocompletion failed :D Oct 13 16:19:37 probably best not to give SimonVT any credit. his head gets all big ;-p Oct 13 16:19:57 t.t Oct 13 16:20:05 speakingcode, backgroundColor was what i used Oct 13 16:20:12 eer heard of simon says? that's the simon they're talking about Oct 13 16:20:26 lol Oct 13 16:36:14 what do I use instead of cursor.requery()? Oct 13 16:37:46 what does it even mean for a method to be deprecated? it just no longer functions or is it just that it's now inadvisable to use it? Oct 13 16:40:03 It still works, you just shouldn't use it Oct 13 16:40:04 Sicp: It will function for now, but support for it will be dropped in the near future Oct 13 16:40:22 so I just reinitialize my cursor I guess Oct 13 17:06:34 Hey gang, my button is left unclickable after I animate it, any idea why? Oct 13 17:07:05 Hey, want to sleep a background thread, but wake it up when the user changes a setting, could someone point me to an example of this? Oct 13 17:08:33 Ankhwatcher: you'd probably want to use some thread locking wait/notify Oct 13 17:08:35 when I tried to do it I accidentally created code that sleeps the UI thread whenever a user changes a setting. doh! Oct 13 17:11:56 tofi9: this is what I have now: http://pastebin.com/dHx8Qd9f Oct 13 17:13:37 I'm setting the background for my application through an appStyle. But when applying a padding to the rootview, I get double background :( Oct 13 17:15:51 ok fixed it by using windowBackground Oct 13 17:17:29 1) you're synchronized(this) is useless. 2) you can replace Thread.sleep with myGloballySharedObject.wait() and in your UI thread; whenever you commit your h_mode change, you can say myGloballySharedObject.notify() to wake up the waiting thread. 3) I don't understand your need for this background thread. Why don't you just start a background thread when you need it, and let it die off when it's finished? Oct 13 17:17:46 Ankhwatcher: preview reply for you Oct 13 17:18:17 any ideas why my android project would take minutes stuck at 100% to deploy Oct 13 17:20:11 tofi9: thanks, I'll implement wait Oct 13 17:23:37 How can I define the absolute position of a button inside a RelativeLayout ? Oct 13 17:24:47 Ankhwatcher: good. In that case, please read this to understand where you WILL need a synchronized: http://stackoverflow.com/questions/2779484/why-wait-should-always-be-in-synchronized-block Oct 13 17:26:49 what is margin start and -end? Oct 13 17:26:50 https://dl.dropbox.com/u/6559846/duh.PNG Oct 13 17:28:04 tofi9: thanks again Oct 13 17:30:08 need lite help with BaseExpandableListAdapter, can somebody? (I can in Russian) Oct 13 17:36:34 need lite help with BaseExpandableListAdapter, can somebody? (I can in Russian) Oct 13 17:41:33 tofi9: do I need try/catch with wait? Oct 13 17:43:03 Ankhwatcher: java reference can help you further on that http://developer.android.com/reference/java/lang/Object.html#wait() Oct 13 17:43:21 ta Oct 13 17:45:52 need lite help with BaseExpandableListAdapter, can somebody? (I can in Russian) Oct 13 17:47:32 AlexUADP: I think you should just ask you question. If someone knows the answer, they can reply. Oct 13 17:56:27 ok many code maybe, in "public View getChildView(int !!groupPosition!!, int childPosition, " i create child layout in layou is button i set clicklistener convertView.findViewById(R.id.imgbtnGPS).setOnClickListener(this); QUESTION how correct way in "public void onClick(View v) {" get !!groupPosition!! Oct 13 17:59:49 AlexUADP: may be you can set/get tags on the View? http://developer.android.com/reference/android/view/View.html#setTag(java.lang.Object) Oct 13 18:04:00 setTag the first that tried public void onClick(View v) { View vp = (View) v.getParent(); if (vp.getTag() == null) Log.d("ASE", "vp.getTag() == null"); Oct 13 18:05:27 in onClick(View v) v is clicked button parent (i think it is convertview) no tag Oct 13 18:06:56 set tag on button not good button on view many Oct 13 18:07:04 tofi: x Oct 13 18:10:26 AlexUADP: in your getChilView you'll need to set the tag to whatever you want to set it to. For example: myChildView.setTag(Integer.toString(groupPosition))…… on your on click: myChildView.getTag() /* get me my groupPosition back */ Oct 13 18:10:43 is there a way to let an android device appear as a MIDI one? So that I can send MIDI signals to the computer Oct 13 18:10:50 (via USB) Oct 13 18:14:41 tofi9: create child view Oct 13 18:14:45 public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { Oct 13 18:14:52 .. Oct 13 18:14:53 convertView.setTag(groupPosition); Oct 13 18:14:58 convertView.findViewById(R.id.imgbtnGPS).setOnClickListener(this); Oct 13 18:15:03 please to use pastebin.com Oct 13 18:15:04 public void onClick(View v) { Oct 13 18:19:24 sorry Oct 13 18:19:26 http://pastebin.com/34rs5vSY Oct 13 18:23:53 AlexUADP: does it work when you set the tag on imgbtnGPS? May be your 'convertView' is not a direct parent of imgbtnGPS? Oct 13 18:28:19 1. if set tag inn button all ok Oct 13 18:28:23 2. convertview is .xml 3. for button direct parent is LinearLayout XXX and this LinearLayout is root of .xml Oct 13 18:29:06 set tag to every buttons not good idea. try seek root parent Oct 13 18:29:40 hi Oct 13 18:29:48 can I combine string resources like that? Oct 13 18:30:08 mep 0 + @string/points Oct 13 18:30:19 Nope Oct 13 18:30:21 AlexUADP: I don't know about the hierarchies much. Try to iterate through the parents, and see whether Android or your code adds some View in between your button and child parent Oct 13 18:30:23 -.- crap Oct 13 18:30:46 ty anyway! :D Oct 13 18:32:12 spobat: you can probably write a function that replaces all @string/* with something useful Oct 13 18:32:18 A question, do you save your settings via static final string constants? Oct 13 18:32:52 like this: static final String PREFERENCE_FIRST_START = "first_start"; if(..exists(PREFE...)) {...} ? Oct 13 18:33:08 ..or do you use @string/ constants for this purpose? Oct 13 18:34:31 I somehow think the first is better Oct 13 18:34:59 spobat: sounds to me a own personal preference thingy. Don't know whether Android has some guidelines on this. I personally only use string resources for things that needs to be translatable into foreign languages Oct 13 18:40:36 tofi9: thanks http://pastebin.com/qc6mMdv9 rewrite, code work. I think a lot of code for a simple task Oct 13 18:41:29 Set the tag on the view with the listener Oct 13 18:41:51 With Google Now, when you press the button on a bluetooth headset, the phone wakes up and starts Google Now voice recognition. How can I mimic that in my own app? To wake Android on pressing the phone on my bluetooth headset, I mean. Oct 13 18:43:09 SimonVT: many buttonы on layout waн with seek parent - shorter Oct 13 18:45:53 Your code will probably break when you in the future decide to redo that layout and forget to change the code Oct 13 18:46:01 If you set the tag on the view itself, it wont Oct 13 18:49:48 SimonVT: yes this code with parent tag may be have trouble, but set tag every buttons and editviews is redundant code. Optimal code its detect in Click what is parent Oct 13 18:53:57 anyone alive in here? Oct 13 18:54:15 Redundant? How many views do you have per row? Oct 13 18:54:44 AlexUADP: I agree with SimonVT. An alternative that doesn't break is: Oct 13 18:54:49 findViewById(R.id.imgbtnGPS).setOnClickListener(new OnClickListener() { Oct 13 18:54:49 @Override Oct 13 18:54:51 public void onClick(View v) { Oct 13 18:54:52 onImgbtnGPSClicked(v, groupPosition); Oct 13 18:54:53 } Oct 13 18:54:53 }); Oct 13 18:56:00 ok not sure I'm in the right channel but I just did a dd of all of the bml partitions on this Samsung Gravity I have but I can't tell which partition links to what on the phone and mount doesn't tell me anything Oct 13 18:56:18 Haldrie: sounds like #android Oct 13 18:56:30 -root Oct 13 19:20:45 hi Oct 13 19:20:47 tofi9, SimonVT: i have 9 buttons all click at this button sended in anoth class public void onClick(View v) {actions.Start(v.getId(), parent gorup);} in code with parent 9 line for set +8 line onClick (17), if set tag on all buttons 9+9+3 (21), if click every button 9*3 (27) Oct 13 19:22:28 tofi9, SimonVT: I am trying to remove duplicate code (I study android after C#) and looking for ways to optimize the code Oct 13 19:22:45 You probably shouldn't put that many buttons on a single row Oct 13 19:26:39 if i want to show a dialog in an activity, can i simply exchange "extends Activity" with "extends FragmentActivity"? no side effects? Oct 13 19:27:52 cliffer: if you need just a simple dialog, you don't need fragmentactivity Oct 13 19:29:12 Hello Oct 13 19:29:17 I am Japanese Oct 13 19:29:22 I live in Japan Oct 13 19:29:24 hi Oct 13 19:29:26 cool Oct 13 19:29:41 I want to put on png file on the Button Oct 13 19:30:01 In my case,ping file on the server Oct 13 19:30:02 can i simply exchange "extends activity" with "extends fragmentactivity"? Oct 13 19:30:07 what's that got to do with you being japanese Oct 13 19:30:22 cliffer: yes, it will not break anything Oct 13 19:30:36 but make sure you need it. Oct 13 19:30:42 is fragmentactivity like activity only with fragments? Oct 13 19:30:56 ya, i want to show a dialog Oct 13 19:30:56 String filePath="http://www....../Web-YKK/small/P-apple.png" Oct 13 19:31:01 with fragments and loaders (which are pretty helpful) Oct 13 19:31:16 cliffer_: to display dialog you don't need fragmentdialog Oct 13 19:31:24 dialogfragment* Oct 13 19:31:32 Button one_Button = (Button)findViewById(R.id.one_button); Oct 13 19:31:32 one_Button.setOnClickListener( (OnClickListener) this); Oct 13 19:31:33 //one_Button.setBackgroundDrawable(file); Oct 13 19:31:34 you can just use dialogs. Oct 13 19:31:35 Drawable d = Drawable.createFromPath(filePath); Oct 13 19:31:40 but can't Oct 13 19:31:40 licksjp: dont paste code, man Oct 13 19:32:01 tell me BBS? Oct 13 19:32:13 Iwant past code Oct 13 19:32:30 what for you're casting this to OnClickListener? Oct 13 19:33:28 you can't set images from web like that, anyway Oct 13 19:33:29 Part`: i dont need it? im following http://developer.android.com/guide/topics/ui/dialogs.html, first section: Creating a Dialog Fragment Oct 13 19:33:52 cliffer_: see this class for example http://developer.android.com/reference/android/app/AlertDialog.html Oct 13 19:34:16 teach me pastbin URL? Oct 13 19:34:18 yeah, on your link there is also reference to AlertDialog Oct 13 19:34:30 wat. Oct 13 19:35:26 If an android api accepts parameters of width and height as (int w, int h), what are the units expected? Oct 13 19:35:34 is it pixels or dip? Oct 13 19:35:36 pixels Oct 13 19:35:46 but you can easily convert in both sides Oct 13 19:35:55 how do you convert dip to pixels? Oct 13 19:36:09 try google it, it's somewhere on stackoverflow ;-) Oct 13 19:36:43 http://stackoverflow.com/questions/4605527/converting-pixels-to-dp-in-android Oct 13 19:37:20 one_Button.setBackgroundDrawable(d); Oct 13 19:37:32 this source but Can't show Oct 13 19:37:39 licksjp: there is a project named UrlImageViewHelper Oct 13 19:37:45 find it on github Oct 13 19:37:52 and apply it for your button, it's not that hard Oct 13 19:38:11 it does also some caching, etc. ootb Oct 13 19:39:13 Part`: what is UrlImageViewHelper? Oct 13 19:39:25 Part`: i'm using alertdialog and his builder in a class extending dialogfragment like described in the dev-guide i posted above. is this bad style or why do you say i dont need it? Oct 13 19:39:50 cliffer_: it depends on the dialog type you need. Oct 13 19:39:58 licksjp: http://bit.ly/UUY4sM Oct 13 19:40:08 if you need just message and 'yes', 'no', there is no reason for using dialogfragment Oct 13 19:40:29 just build alertdialog and show it. Oct 13 19:40:46 what would be the reason to put it in a class? Oct 13 19:40:53 if i use it several times? Oct 13 19:41:14 Part`: ty Oct 13 19:41:39 well, there is still posibility to extract class for using standard dialog, instead of fragments. ;-) Oct 13 19:42:15 but, fragments are cool, and maybe it'll help you somehow - so answering your question - no worries about extending FragmentActivity instead of Activity Oct 13 19:42:18 BUT Oct 13 19:43:00 Part`, thanks Oct 13 19:43:27 remember to use fragments from support library, if you plan to support devices with android below 3.0 Oct 13 19:43:39 it is my first app and im following guides, so i really dont know what i need and what not :) Oct 13 19:43:49 ya i included the v4.supportlib Oct 13 19:48:04 but i gives me a strange error: The method show(FragmentManager, String) in the type DialogFragment is not applicable for the arguments (FragmentManager, String) Oct 13 19:48:22 for me, the given arguments match the requested ones Oct 13 19:48:58 you're using getSupportFragmentManager? Oct 13 19:49:16 or getFragmentManager? Oct 13 19:50:26 2nd Oct 13 19:50:34 use first then :) Oct 13 19:51:04 if i answered first, then your reply would have been "use 2nd"? :) Oct 13 19:52:13 no, getFragmentManager uses native FragmentManager from 3.0 and above Oct 13 19:52:34 ah k, so i could use it if my min. api would be > 11 Oct 13 19:53:00 >=11 Oct 13 19:53:03 yeah, but if you're using DialogFragment from support library, then it's expecting FragmentManager from support library Oct 13 19:55:14 so: you can use native DialogFragment and it'll work with getFragmentManager, or you can use one from support library, but it requires FragmentActivity and getSupportFragmentManager Oct 13 19:55:38 in first case, you don't even need FragmentActivity, since Activities from api level 11 comes with fragment support by default. Oct 13 19:56:13 hi Oct 13 19:56:22 so all my fav android dev's how the hell, do I make folder..... just so I can group files Oct 13 19:56:29 is java really that retarded Oct 13 19:56:53 haha, yeah, creating folders and managing files from Java is pain ;) Oct 13 19:57:01 dam Oct 13 19:57:09 hi, with a livewallpaper what is the prefered way of exiting in case of an unrecoverable error (in this case, failed mem allocation in NDK code) ? Oct 13 19:57:16 like really, whats the harm in creating a package within a package ? Oct 13 19:57:36 will it still be available in my main package ? Oct 13 19:57:46 its like a private package for the package Oct 13 19:57:48 Drumer306_: File mediaStorageDir.mkdirs() Oct 13 19:57:53 I'm trying to have a layout with a title bar, a scrollview and an AdView, but I get bad proportions between these three layout, could someone tell me what's wrong with it ? https://gist.github.com/3885936 Oct 13 20:00:02 if you would be so nice to answer one more question which is bothering me since some time and for which i could not find an answer: is it enough to use onSaveInstanceState and onRestoreInstanceState to have persistent variable values in my activity? or is there any situation forcing my variables to have other values other then the saved ones in onSaveInstanceState? Oct 13 20:00:29 the msg above goes to you, Part` :) Oct 13 20:00:46 but thx anyway Oct 13 20:03:10 cliffer_: onSaveInstanceState and restoreInstanceState should do the job Oct 13 20:03:26 you got any problems with them? Oct 13 20:03:51 Part`: i got problems before using them :) Oct 13 20:04:40 they work fine Oct 13 20:09:36 Part`: in a class with an async task, im using onRetainNonConfigurationInstance() and getLastNonConfigurationInstance();, this seems to be another way to handle orientation changes (in combination with a progress dialog). can i exchange this with onsaveinstancestate? based on your answer that onsaveinstancestate/onrestoreinstancestate is enough in all situations, i would expect a positive answer. Oct 13 20:10:03 or dont you know onRetainNonConfigurationInstance() Oct 13 20:10:16 Sorry for my silly question, but I want to learn (after a lot of desktop is not clear). http://pastebin.com/dTKcAytT Oct 13 20:11:25 cliffer_: well, i'm not using depracated methods so often ;) Oct 13 20:11:31 AlexUADP: so what is the question? Oct 13 20:11:56 http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance() Oct 13 20:12:04 (please, don't be so offensive) Oct 13 20:12:09 Part`: and you dont know the from the time where they were not deprecated :) Oct 13 20:16:16 cliffer: //on text change get action from parent //and set actions.Name = ed.GetText(); Oct 13 20:18:43 cliffer_: i`m dont undersnad why in reaction on textchanged i can not get access to EditText Oct 13 20:24:07 AlexUADP: i'm sry Oct 13 20:26:53 cliffer_: what is "sry"? Oct 13 20:27:01 sorry Oct 13 20:27:05 i cannot help you Oct 13 20:28:53 onSaveInstanceState can survive if the process is killed. onRetainNonConfigurationInstance only is saved to memory Oct 13 20:29:23 generally you just would use onSaveInstanceState, but if you have something that uses a lot of memory you can save some effort of reloading it by also using onRetainNonConfigurationInstance Oct 13 20:29:23 t Oct 13 20:29:24 he Oct 13 20:29:34 the function names are pretty horrible Oct 13 20:30:41 they are called methods Oct 13 20:31:50 still horrible as methods Oct 13 20:37:04 onRetainNonConfigurationInstance is just for stuff that would be nice to save, but isn't really required to recreate the activity.. e.g. the framework uses it for loaders Oct 13 20:41:44 how do i encode my url string ? Oct 13 20:41:51 for proper http connections ? Oct 13 20:46:30 Does UrlImageViewHelper Android1.6 ok? Oct 13 20:46:56 there are many syntax error Oct 13 20:47:38 Syntax error on tokens, TypeArgument1 expected instead Oct 13 20:47:57 UrlImageViewHelper.setUrlDrawable(imageView,filePath,R.drawable.spple); Oct 13 20:48:03 is it possible at all to get the raw picture from the camera? I really want to get the picture in any lossless format, and it appears that raw is unimplemented and setting the format does nothing, the jpeg is always jpeg, raw is always null or otherwise does not work Oct 13 20:57:49 hey there. Oct 13 20:58:08 What's the best way to implement a "shareware" type app? Oct 13 20:59:04 Some apps are available as DEMO and FULL, others offer a PRO version, which when installed lets the regular free version have more features... Oct 13 20:59:35 What's the best way to do it? Then there's also the possibility of having a free app with an in app purchase that enables the full version... Oct 13 20:59:39 RedNifre, uhh, I'd load it up with ads and annoying crap, and ask to pay to get rid of it Oct 13 21:00:14 yeah, but HOW do you pay? separate ad free app? "key" app that removes ads in the free app? in app purchase for ad removal? Oct 13 21:00:43 And I don't like ads, I was thinking of offering a two month free trial. But I'm not sure about this. Oct 13 21:02:18 In app purchase Oct 13 21:02:43 RedNifre, what do you mean how to pay? the google has money APIs http://developer.android.com/guide/google/play/billing/index.html Oct 13 21:03:16 what's the name of the UI feature that lets your scroll between screens by wiping left or right Oct 13 21:03:26 viewpager Oct 13 21:03:28 viewpager Oct 13 21:03:36 then you will know if they paid, and you stick whatever logic around that if paid, or release two versions with only the paid version containing the paid stuff Oct 13 21:03:50 heh thanks Oct 13 21:04:05 managed to get the answer before I was able to give a coherent description Oct 13 21:04:36 edman007 I know that there are options, I just wonder which one is the best. What do you think? Oct 13 21:05:52 if i do free trial, what can I do about people uninstalling and reinstalling the app to get another free trial period? Oct 13 21:07:39 RedNifre, IMHO, it depends a lot on the application, and your target market, I prefer just paying to get rid of the ads, then you get money either way, and the user can always use the full app, if you want to do a trial you got to deal with users trying to get around it by getting their google id, and just track that (not sure if google will do it, you probably got to call home during the first startup and keep track of it on your Oct 13 21:07:40 server) Oct 13 21:09:37 but I think google handles most of the re-install abuse type things with http://developer.android.com/guide/google/play/licensing/overview.html Oct 13 21:10:21 to get around that they'd have to make a new google account and wipe their phone (unless they do really advanced crap that's not worth it) Oct 13 21:10:35 oh, he left... Oct 13 21:11:08 SimonVT, do you know where viewpager comes from? Oct 13 21:11:36 The documentation says to use one of the support packages but I can't see that as an option to download in the sdk manager Oct 13 21:20:08 hello Oct 13 21:20:45 need help with recycling views in a listview Oct 13 21:25:12 dark_element, then you should probably ask a question Oct 13 21:25:31 edman007 heh was searching while i was typing Oct 13 21:25:44 edman007 found the answer Oct 13 21:26:46 edman007 i wanted to recyle viewlist rows with different layouts Oct 13 21:27:46 spuz: it's a the v4 support package Oct 13 21:28:01 ahh Oct 13 21:28:03 http://developer.android.com/tools/extras/support-library.html Oct 13 21:28:08 sampullman, yeah I know, I'm not sure how to get the support package Oct 13 21:28:29 * edman007 wants to try and get a lossless image from the camera, does android support that at all? so far my conclusion is no Oct 13 21:28:40 lossless? Oct 13 21:28:54 sampullman, as I said, unfortunately, that documentation says to use one of the support packages but I can't see that as an option to download in the sdk manager Oct 13 21:29:15 it's in extras Oct 13 21:29:15 sampullman, not jpeg, raw (RBG565/YUV/etc), png, tiff, whatever.. Oct 13 21:29:32 err, raw/png/tiff are ok Oct 13 21:29:36 jpeg is not Oct 13 21:30:37 i see Oct 13 21:30:56 i'm trying to take a picture of stars... and the noise in the images is ridiculous, so I'm trying to combine images to remove the noise, thus I want the very fine detail in the noise Oct 13 21:31:24 are you sure the jpeg you're getting is actually lossy? Oct 13 21:31:47 ah, nevermind Oct 13 21:32:06 i would guess you'd have to do some pretty low level stuff to get the direct camera output Oct 13 21:32:20 probably not possible in a regular app, but im not positive Oct 13 21:33:11 sampullman, yea, as far as I can tell, they put it in the API, and then google tried to implement it and found that RAW images don't fit in the heap so they dropped support for it, but then I google and a few people said they got it to work Oct 13 21:33:40 or at least, kinda... Oct 13 21:41:13 What is textColorHighlight ? Oct 13 21:41:45 sounds pretty self explanatory... Oct 13 21:41:56 edman007: I'm using it on a button but nothing changes Oct 13 21:43:15 edman007: any clue ? Oct 13 21:43:20 is the button highlighted? Oct 13 21:44:11 as the name implies, it controls the color of the highlight, it doesn't say it highlights things... I don't even know if buttons can be highlighted (maybe they can...) Oct 13 21:44:15 edman007: highlighted == touched ? Oct 13 21:45:16 i doubt it, but the API docs probably say something about highlights Oct 13 21:49:28 CVirus, http://stackoverflow.com/questions/3882064/how-to-change-color-of-button-in-android-when-clicked google is your friend Oct 13 21:59:03 can anyone here help me make an app? Oct 13 22:00:07 or not? Oct 13 22:00:09 Mr_Tinkles: I'm sure someone in here would be willing to take your money =) Oct 13 22:01:02 you see I'm making an app for an Internet radio station I listen to Oct 13 22:01:17 that's run by a friend of mine Oct 13 22:02:12 okay… what do you need help with? Oct 13 22:02:42 I need help with making the actual app as ive never made one before Oct 13 22:02:57 you said you were making one Oct 13 22:02:59 voila: http://developer.android.com/training/basics/firstapp/index.html Oct 13 22:03:07 that seems to imply that you've done somethingl ike that before =/ Oct 13 22:03:13 s/ike that before/already Oct 13 22:03:21 nope I haven't Oct 13 22:03:37 k, check out sampullman's link, shoudl help you get started Oct 13 22:05:30 looks like javascripting again :/ Oct 13 22:05:43 well, it's not. Oct 13 22:06:11 I just hope its not too hard to do Oct 13 22:06:45 it is quite hard if you haven't done any sort of logical programming before Oct 13 22:07:39 I might struggle then as ive never programmed before Oct 13 22:07:55 well it's a great adventure either way Oct 13 22:07:59 full of fun and learning =) Oct 13 22:08:07 yay Oct 13 22:12:37 Apologies if this is a FAQ -- is there a straightforward way to enable full filesystem encryption? I'm running cm9 on a rooted device. I'm also reading http://source.android.com/tech/encryption/android_crypto_implementation.html -- any other sources of help [or simpler ways] to do this. Oct 13 22:15:59 kbs: have you asked in #android-root ? I think your question better fits there... Oct 13 22:17:09 evident: ah; didn't know of that channel, thanks. Oct 13 22:18:36 kbs: no problem... I just guess you might get a quicker answer there... :) Oct 13 22:28:26 hey guys, i made a habit tracking app over the last few weekends, https://play.google.com/store/apps/details?id=si.modrajagoda.didi Oct 13 22:28:30 its also open source Oct 13 22:28:40 https://github.com/blaztriglav/did-i Oct 13 22:28:49 feedback welcome, and enjoy :) Oct 13 22:41:25 Is it just me or are actionbars confusing? Oct 13 22:42:16 napoleoncomplex: heh. Interesting idea, nice you put it on github. Oct 13 22:43:08 <[deXter]> napoleoncomplex, I read that as hobbit tracking app. :( Oct 13 22:43:29 kbs: thanks, i mostly did it for myself, so i thought i might as well put up the source Oct 13 22:43:52 ah, wouldn't that be a cool map addition to the LOTR book, to see where everybody is as the book progresses Oct 13 22:44:24 [deXter]: i still might pivot, ill let you know :P Oct 13 23:01:56 napoleoncomplex maybe a seperate report time for every activity? Oct 13 23:03:27 hey y'all Oct 13 23:03:55 Mikevin: i wanted to avoid that Oct 13 23:04:19 at least for me personally, i dont want to be bugged multiple times a day Oct 13 23:05:06 what's the case you'd like to have this for? Oct 13 23:05:20 napoleoncomplex ah ok, just a thought for if you wanted more people to use it Oct 13 23:06:07 napoleoncomplex not personally but was thinking people might want to get the notification near when they planned to do it Oct 13 23:07:40 Mikevin: true, though that would mean the activity is done at the same time every day Oct 13 23:07:58 i guess i didnt even think of that with my always moving schedule :) Oct 13 23:09:35 napoleoncomplex haha, the use depends on your view of the app. is it trying to help people learn habits or is it just to check if they have them Oct 13 23:10:00 napoleoncomplex because the last one doesn't really have a use for seperate notifications Oct 13 23:10:58 i might be an outlier here, but i might as well explain how i got to making this Oct 13 23:11:10 ok, so more questions about the camera, what do I have to wait for when taking a picture? It seems like if I call startPreview() and then takePicture() the APIs seem to deadlock...and they lock up the camera in my emulator Oct 13 23:11:10 ive been trying to track/build my habits for a while now Oct 13 23:11:56 started out with a pen/paper system, then found a nice website for it in routinetap, and that kept me in check Oct 13 23:12:05 <_jonathan> does anyone know if all devices have libsonivox.so and libvorbisidec.so ? Oct 13 23:12:30 but what kept happening was, i had all my questions entered, i just needed to go to the website and enter them, i spend the entire day behind the computer at work/home, yet somehow i still didnt answer them for half the days of the week Oct 13 23:12:53 so i waited and waited for them to make a mobile app Oct 13 23:13:04 then i made a bookmark to the website on my phone, used that for a while Oct 13 23:13:09 still didnt track half the time Oct 13 23:13:25 so i said, screw this, i need to build my own thing, that doesnt let me skip days, and bothers me every single day Oct 13 23:13:28 keeps me accountable Oct 13 23:13:32 and thats how i got to this :) Oct 13 23:13:37 napoleoncomplex haha sounds familiar, not with habit building but in general. but i guess someone who is training his/her habits isnt all that great at going to that website every day Oct 13 23:14:11 Mikevin: yeah, it was more intended for people to stop avoiding their goals Oct 13 23:14:31 napoleoncomplex it's a great idea, i'm surprised you didn't find 10 of those haha Oct 13 23:14:31 "people" being me :P Oct 13 23:15:09 you mean other apps? Oct 13 23:15:32 you should make a hardcore version where it's an OS and you can't call without checking your habits Oct 13 23:16:04 yes, you said you were waiting for someone to make such an app. i'd have guessed it already existed Oct 13 23:16:25 Mikevin: i meant routinetap specifically, theres a bunch of others out there, true Oct 13 23:16:35 but then i thought if im switching systems, might as well make it my own :) Oct 13 23:16:39 ah =) Oct 13 23:17:39 little question btw: why is your source so deep down? there are 3 folders without other content Oct 13 23:19:17 thats pretty standard, since it represents every part of the project name (si.modrajagoda.didi in this case) as a seperate folder Oct 13 23:19:47 not intentional, but ive never named my project anything less than 3 fields, since the example they give is something like com.android.project Oct 13 23:20:31 "they" being eclipse, when youre making a new android project Oct 13 23:25:31 napoleoncomplex: The convention of starting your package name with your domain name, reversed, is an old, old java convention. Oct 13 23:25:48 yeah java is old old old Oct 13 23:26:14 monsti: Not that old, only about 17 years since it hit the public consciousness. Oct 13 23:26:28 21-22 years since it started, depending on where you draw the line. Oct 13 23:26:38 puff: huh, had no idea Oct 13 23:26:44 why the hell does eclipse suggest that then Oct 13 23:26:47 puff: in 1996 a professor told me "soon everybody has 133 MHz and 32mb ram, then java will be fast" Oct 13 23:26:57 *SNRK* Oct 13 23:27:05 what really was needed was buying HotSpot Oct 13 23:27:20 and even then... stack machines... hehehehehe Oct 13 23:27:44 puff: i have an i7 with HT and 4 cores and 16gb ram - i am still waiting for java to be fast :) Oct 13 23:27:56 napoleoncomplex: Eclips suggests it because it's a standard java practice. Oct 13 23:28:15 monsti: Work expands to fill the space available. So does stupidity. Oct 13 23:28:26 monsti: no, java got fast. The programs written in java grown bloated Oct 13 23:28:32 monsti: I've used java applications that were amazingly fast, but most people don't take the trouble to code for that. Oct 13 23:28:47 <_jonathan> I like to name my packages in the form "A.B" Oct 13 23:28:49 puff: jar files suck by definition Oct 13 23:30:17 napoleoncomplex: http://web.archive.org/web/20010610045734/http://java.sun.com/nav/whatis/storyofjava.html Oct 13 23:30:36 monsti: what could you possibly mean by that? Oct 13 23:31:24 sampullman: M$ added a GAC with precompiled assemblies - java programms still have t unzip and compile jar files everytime you start them Oct 13 23:32:01 i enhanced compiletime for my android apps just by unpacking the jar files and use the precompiled class files Oct 13 23:32:14 which is really odd in 2012 Oct 13 23:32:22 i don't see why that makes jar files "suck by definition" Oct 13 23:32:54 yeah - look closer :) Oct 13 23:33:25 puff: im not a stranger to java that much, i was just surprised that this is not something everyone does :) Oct 13 23:34:01 isnt the explanation that you dont clash with other namespaces? or is that completely irrelevant in android dev? Oct 13 23:34:13 when I click a link/button in a webview, the dom element turns blue -- how do I make this not happen? Oct 13 23:40:38 I think it's just fine to continue to use deep namespaces - it's mostly hidden to the user anyway, and it might help the package-manager avoid trampling over the N apps that would otherwise all be named "photomanager.activity" :-) Oct 13 23:43:48 as my website name is stupidly long, and possibly not very pernament, i just use localhost.myprogramname Oct 13 23:44:09 heh Oct 13 23:45:04 I dunno that it's about websites necessarily, but hey. whatever floats your boat and avoids namespace collision... Oct 13 23:56:33 I have to update a list as the cursor data changes; help. Oct 14 00:19:36 What is the best way to populate a list view from a db? Oct 14 00:19:41 also what format should I use? Oct 14 00:19:46 XML..sqlite? Oct 14 00:19:48 etc Oct 14 00:20:22 cursor. Oct 14 00:21:03 my question has to do with listviews too. Q: what is the best practice in updating a listview with dynamic cursor data? Oct 14 00:22:36 chrassidy: a database is pretty much sqlite by definition on Android Oct 14 00:22:54 ah ok Oct 14 00:23:59 Any insight into best way to update my list? I can't find notifyDataSetChange(). Oct 14 00:25:02 Is there a workaround I'm not clued in on where we 'invalidate' current cursor and load a new one? Oct 14 00:25:12 pique: what sort of adapter are you using? Oct 14 00:25:18 sqlite cursor Oct 14 00:25:50 if im performing inserts i'd like to display changes with a refresh btn Oct 14 00:26:05 pique: what sort of adapter are you using? Oct 14 00:26:18 thought i answered that. example? Oct 14 00:26:44 listview Oct 14 00:26:47 pique: what sort of adapter are you using? Oct 14 00:26:55 do you know what an adapter is? Oct 14 00:27:13 its a meta object used to populate a list Oct 14 00:27:29 done repeating yourself? Oct 14 00:27:31 Hello gentlemen. Could anyone help me with a PhoneGap problem? It's not listing my phone as plugged in, so I can't preview the app on it. Is it because I'm using the 2.3.3 SDK and my phone is 4.0.4? Oct 14 00:27:55 and... what sort of adapter are you actually using? Oct 14 00:28:12 ok sounds good Oct 14 00:28:58 are you calling setAdapter on your ListView? Oct 14 00:29:36 correct Oct 14 00:29:53 and what are you passing as the parameter to that call? Oct 14 00:30:06 my spinner doesn't show anything in the space where it should show the item that i've selected. what might be wrong? https://gist.github.com/6d4018e02512c550383d Oct 14 00:30:08 custom adapter Oct 14 00:30:19 it has its own class Oct 14 00:31:15 which presumably inherits from BaseAdapter? Oct 14 00:32:10 ArrayAdapter actually Oct 14 00:33:22 so why wouldn't you have notifyDataSetChanged? Oct 14 00:34:12 it does. Oct 14 00:34:29 the error was i wasnt targeting the adapter. Oct 14 00:34:50 um... Oct 14 00:35:22 80% errors are user based, so not a spectacular suprise. Oct 14 00:35:29 thanks for you patience. Oct 14 00:35:41 right... Oct 14 00:36:35 my spinner doesn't show anything in the space where it should show the item that i've selected. what might be wrong? https://gist.github.com/6d4018e02512c550383d Oct 14 00:37:21 <_deXter_> Anyone here uses a Kindle for reading textbooks / development reference etc?/ Oct 14 00:37:58 <_deXter_> whoops, wrong channel. :/ Oct 14 00:45:24 Nobody for the PhoneGap issue? Darn. Oct 14 00:47:02 whomp post ur code for the adapter Oct 14 00:47:23 whats he i ssue Flickerdart Oct 14 00:47:33 Flickerdart: That doesn't seem like a PhoneGap issue Oct 14 00:47:37 my onItemSelected method? Oct 14 00:47:41 Oh Oct 14 00:47:56 Well, I've got USB Debug Mode on, and the computer sees the phone fine Oct 14 00:48:15 Not sure what else I can do Oct 14 00:48:17 FlickerDart: Are the drivers installed? do "adb devices" Oct 14 00:48:31 the whole adapter Oct 14 00:48:42 Do where? Oct 14 00:48:42 does the phone show a USB debug notification when you plug it in? Oct 14 00:48:51 also, i set the dropdownviewresource and the view in the constructor of the spinner adapter to be the same. in the googe tutorial, they're different though: simple_spinner_dropdown_item vs. simple_spinner_item Oct 14 00:48:52 Yes, it shows the debug notification Oct 14 00:48:57 FlickerDart: The MTP or USB drivers and the adb drivers are different. Are you using linux? Oct 14 00:49:03 Windows 7 Oct 14 00:49:13 also, dunno about phonegap - but you should generally be using the *latest* SDK and tools, even if you're developing for an older platform version Oct 14 00:49:19 whomp spinner uses two views Oct 14 00:49:23 one for the list that drops down Oct 14 00:49:30 well, goto android-sdk\platform-tools directory Oct 14 00:49:36 and one for the selected item that shows in the spinner after the dropdown has disappeared Oct 14 00:49:36 and run adb devices Oct 14 00:49:52 would the dropdown one be a listview? Oct 14 00:50:22 no Oct 14 00:50:43 the spinner handles that, you just handle the view it uses for each item in your spinner adapter Oct 14 00:50:44 what would it be? Oct 14 00:50:59 There isn't anything called ADB devices, but there's an application called ADB Oct 14 00:51:04 Should I run that? Oct 14 00:51:13 would it just be a view with a single item? Oct 14 00:51:21 Flickerdart: open a cmd window, navigate to that directory and run Oct 14 00:51:23 adb devices Oct 14 00:51:26 Flickerdart: there's a command-line tool called adb Oct 14 00:51:28 Oh ok Oct 14 00:51:36 you need to implement getView() and getDropDownView() within the adapter you're using, if you're using a custom adapter Oct 14 00:51:51 i'm not Oct 14 00:53:20 maybe i need to Oct 14 00:54:49 I might be navigating wrong, cause it's not working Oct 14 00:55:09 I'm doing "DIR C:\path\to\folder" Oct 14 00:55:28 it is CD C: Oct 14 00:55:52 CD C:\path\to\folder Oct 14 00:56:16 http://developer.android.com/guide/topics/ui/controls/spinner.html Oct 14 00:56:20 Aha, got it, thanks Oct 14 00:56:21 oh lord Oct 14 00:56:26 adb devices doesn't see the phone Oct 14 00:56:29 i've looked at it already Oct 14 00:56:55 Flickerdart: Which phone is this? You need separate drivers, if It is some Galaxy Phone other than the GNex Oct 14 00:57:02 LG G2x Oct 14 00:57:32 Do I get the drivers for it with the SDK manager? Oct 14 00:57:54 Flickerdart:You can't get them through that. Not sure. This thread http://forum.xda-developers.com/showthread.php?t=1752074 looks promising Oct 14 00:58:52 Hm, mine is P-999, I'll go look for that model's ADB driver Oct 14 00:59:14 whomp you'reo nly giving your adapter a single view Oct 14 00:59:19 you need to provide it two Oct 14 00:59:36 could they be the exact same? Oct 14 00:59:40 you can reuse the same one if it works, but you need to explicitly provide it in two parameters Oct 14 00:59:43 yeah if that works Oct 14 00:59:57 but you need to pass it in for both arguments Oct 14 01:01:09 hmm Oct 14 01:01:11 hold on Oct 14 01:01:53 Windows is taking its sweet time to install these drivers... Oct 14 01:02:45 :) It should detect new devices and one of those should be Android ADB or something like that Oct 14 01:03:04 I'm off.... Good luck Flickerdart Oct 14 01:03:07 do spinnerAdapter.setDropDownViewResource(...) whomp Oct 14 01:05:46 how long does it take for an APK update uploaded to the play store to be published? Oct 14 01:05:54 i did that Oct 14 01:06:03 quadmasta it varies, can take several hours Oct 14 01:06:20 okay Oct 14 01:06:43 I only have one app published and it's dead simple Oct 14 01:06:53 what's with all of the new hoops I've gotta jump through? Oct 14 01:06:59 hoops? Oct 14 01:07:08 high-res icon and 2 screenshots Oct 14 01:07:28 my app only has one screen :/ Oct 14 01:07:46 because they want the Play app/sites to have a consistent look n feel Oct 14 01:08:00 and it's easier if they force you to provide the elements they build the look around Oct 14 01:09:04 it's a pain in the ass :) Oct 14 01:09:24 I took a screenshot on my phone and tried to upload it, wasn't the right res Oct 14 01:09:28 agreed... could be worse tho Oct 14 01:09:31 yeah Oct 14 01:09:44 native res screenshot isn't good enough? Oct 14 01:09:45 WTF? Oct 14 01:09:46 just scale it to the right res on gimp or something, only takes a second. Oct 14 01:09:53 I just cropped it Oct 14 01:09:55 annoying but not too hard Oct 14 01:10:01 that'll work Oct 14 01:10:12 the other screenshot is just a black box with white text that says "Boring screenshot" on it :) Oct 14 01:10:26 ADB drivers successfully installed Oct 14 01:10:35 Thanks for your help guys Oct 14 01:10:48 haha nice Oct 14 01:11:07 i wonder how long some profane message in a screenshot will sit up before google warns/noticies/bans Oct 14 01:11:17 or completely fake screenshot Oct 14 01:11:18 <_deXter_> I was thinking of the same thing. Oct 14 01:11:51 <_deXter_> How about: "This space for rent"? :D Oct 14 01:12:10 or a herpes pe... eh nevermind Oct 14 01:12:25 a troll or rick roll Oct 14 01:12:33 <_deXter_> yeah Oct 14 01:12:39 <_deXter_> or put in an iOS screenshot lol Oct 14 01:12:41 ohh man a rick roll app would be fun Oct 14 01:12:48 animated gif of the haymaker the bus driver put on that unruly passenger? Oct 14 01:13:03 gifs aren't allowed, me thinks Oct 14 01:13:11 Put up fake love notes to a woman named Cindy Oct 14 01:13:22 If anyone asks about them, deny everything Oct 14 01:13:28 ohh i know what i'm gonna do Oct 14 01:13:34 i'm gonna make a sort of scavenger hunt puzzle Oct 14 01:13:42 with steganographic app screenshots on Play Oct 14 01:14:23 that'l make my downloads jump from ten to..... ten ;-p Oct 14 01:15:11 in my GCMBaseIntentService messagereceived() can I create a notification directly or are there any limitations? Oct 14 01:16:08 statusbar notification? Oct 14 01:16:26 when i create a notification here and set a pending intent to open an activity, i have problem setting flags like single shot and update current and i also cannot pass bundles (well it works on the first notification) Oct 14 01:16:45 also i get a warning when i click on the notification saying "you are starting an activity form a non-activity intent" Oct 14 01:16:47 yes speakingcode Oct 14 01:17:10 post ur code Oct 14 01:17:13 "startActivity called from non-activity intent) Oct 14 01:22:37 speakingcode, any ideas on my issue? Oct 14 01:23:09 u put setDropdownViewResource? Oct 14 01:23:14 cause i didn't see it in ur posted code Oct 14 01:24:32 yeah i did Oct 14 01:24:45 i just duplicated the same view in a different file, and set that as the dropdown resource Oct 14 01:25:12 guess ill go to mkyong.com and wade through poor english Oct 14 01:25:35 should be pretty simple Oct 14 01:27:24 post the code u have now wit hthe dropdown view set, and with the implementation of onItemSelected Oct 14 01:28:39 and let me see the xml for your spinnerrow Oct 14 01:29:52 my guess is because you're not using android.R.layout.simple_spinner_item that the adapter doesn't know what to do with the view you're supplying Oct 14 01:30:45 so you either need to use that view ro extend ArrayAdapter into another adapter class Oct 14 01:35:13 yeeeaahhh it works Oct 14 01:35:40 i thought we had to supply our own view to it (i didn't see the "android" before "R.layout.simple_spinner_item") Oct 14 01:35:56 ah yeah Oct 14 01:36:01 cool Oct 14 01:36:06 thx man Oct 14 01:36:17 np. sorry i fumbled through that so sloppily Oct 14 01:36:30 no worries, it was a subtle error Oct 14 02:54:44 Any hints about what I might be doing wrong? onClick isn't firing on my Button in a fragment. Oct 14 02:56:54 hey guys is there a way to take a previous view / activity off Oct 14 02:57:06 like pop it off the navigation stack **** ENDING LOGGING AT Sun Oct 14 03:00:02 2012