**** BEGIN LOGGING AT Fri Oct 19 03:00:01 2012 Oct 19 03:00:06 it's kind of a rule Oct 19 03:00:06 Makefiles Oct 19 03:00:06 it would take months Oct 19 03:00:13 fnord`: flymake does that, iirc Oct 19 03:00:21 ah interesting Oct 19 03:00:24 yeah, some IDEs have very nice plugins like xtext+ Oct 19 03:00:28 I pretty much only work on NDK projects Oct 19 03:00:35 p_l: now, but does flymake work with ant and maven? Oct 19 03:00:41 fnord`: also, the incremental compilation was pretty much broken in my experience with eclipse Oct 19 03:00:44 are you going to replace ant and maven with a makefile? have fun with that bullshit Oct 19 03:00:58 I build all my native libraries independently Makefiles Oct 19 03:01:01 p_l: get a faster machine then :P I have a low end laptop and it works well. Oct 19 03:01:02 lol Oct 19 03:01:07 You know ant runs on the command line Oct 19 03:01:17 grothendieck: but invoking ant from inside of a makefile is retarded Oct 19 03:01:18 And you can run ant from a Makefile trivially Oct 19 03:01:22 fnord`: you can make it work with anything, but if I wanted incremental compilation, I'd whip a compile server with ABCL and access it from emacs Oct 19 03:01:26 Not when there are other dependencies to build first Oct 19 03:01:30 grothendieck: sure, but it's retarded. Oct 19 03:01:33 No Oct 19 03:01:35 yes Oct 19 03:01:38 lol Oct 19 03:01:41 the main problem with emacs for java that I have is that neither of the two java modes fit me Oct 19 03:01:43 super dumb Oct 19 03:01:46 stupid, poop poop Oct 19 03:01:48 Why? Oct 19 03:02:01 You have a native library...it is already written to be built by a Makefile Oct 19 03:02:08 because ant already does the entire build! there's no added value by using gnu make Oct 19 03:02:18 You write a wrapper library...use Android.mk which is a wrapper around GNU Make Oct 19 03:02:19 if you want something slick, try maven. Oct 19 03:02:30 write code? why do that when you can use maven Oct 19 03:02:49 fnord`: dunno about Ant, but with maven I ended up facing "there doesn't seem to be any docs for that, try building your build task as maven extension in java,... ha ha" Oct 19 03:03:12 something that was doable with a simple rule in make Oct 19 03:03:12 I was always confused with the NEED for maven Oct 19 03:03:13 Because I've already written the code...it takes like hardly any time at all to write a Makefile... Oct 19 03:03:19 seems like it solved a problem that didnt REALLY exist Oct 19 03:03:26 ron_frow_: java world's need to overengineer... badly Oct 19 03:03:57 i found ant, the android ant task, and ivy to be a great solution for cmdline builds Oct 19 03:04:08 ivy? Oct 19 03:04:12 I can also edit Java, C, Lisp, LaTeX, Perl and whatever else I use on a regular basis in Emacs Oct 19 03:04:14 i heard you like build tools, so I wrote you a makefile to call the correct build tool from within the wrong build tool Oct 19 03:04:17 dawg Oct 19 03:04:19 ron_frow_: wtf, are you serious ? Oct 19 03:04:26 yep Oct 19 03:04:59 all the dependency management of maven; even uses their repos Oct 19 03:05:14 Eh Oct 19 03:05:15 g00s: does ivy include a nice way to make a maven-compatible task for using a non-java compiler that doesn't have pre-existing maven extension, by simple extension-based substitution and cli Oct 19 03:05:17 so if you have infrastructure that relies on ant, ivy can give you some good benefits Oct 19 03:05:20 You kids have fun with your fancy toys Oct 19 03:05:24 Later ;) Oct 19 03:05:27 intellij has incremental build btw Oct 19 03:05:34 g00s: except, google doesn't want android jars in maven repo central... lame Oct 19 03:05:51 ron_frow_: I know. It's also faster in simple displaying text using pure java than native-code using eclipse Oct 19 03:05:52 p_l: uhh … i didn't understand that :) Oct 19 03:06:01 i haven't used ivy with non-java compilers though Oct 19 03:06:37 g00s: I had a project I managed to make compile with maven. Then I tried to add a pass that would generate some of the java files from a saner format and make it a proper part of build process Oct 19 03:06:45 i'd like to see someone write a Makefile to build android applications without ant or maven. It would be quite a beastly one. Oct 19 03:06:45 so for example, you want to grab abs from a maven repo, and still want to use the default android ant build scripts, thats nice with ivy Oct 19 03:07:29 g00s: couldn't find a way to simply "for this task, run program X on each file enging with extension Y, then copy them to Java sources" and have this task be a dependency for java compile Oct 19 03:07:43 I would almost guarantee there's no one here using make to build android apps, unless they are cheating by calling ant or maven from inside of a Makefile, in which case you're using make as a shitty alternative to a bash script. Oct 19 03:08:15 I do Oct 19 03:08:21 p_l: i dunno; i wrote a maven plugin a few years ago; its a pretty handy skill to have if you need to use maven in any nonstandard way; but what you are describing seems easy with ant Oct 19 03:08:24 I'll even prove it Oct 19 03:08:25 show us the makefile that builds android apps without ant Oct 19 03:08:30 I'll give you 100000 internet points Oct 19 03:08:37 g00s: ant. I tried to use maven ;P Oct 19 03:08:48 http://code.google.com/p/paridroid/source/browse/Makefile Oct 19 03:08:51 maven is good is you follow its opinion :) Oct 19 03:09:22 I haven't touched it in a while though Oct 19 03:09:27 but it worked Oct 19 03:09:30 if you can declare all the behavior you need, maven is great Oct 19 03:09:33 it even installs it Oct 19 03:09:44 http://code.google.com/p/paridroid/source/browse/scripts/make_android_toolchain.sh Oct 19 03:09:52 http://code.google.com/p/paridroid/source/browse/scripts/configure.sh Oct 19 03:09:59 I get a lot of hits actually for those scripts Oct 19 03:10:04 So I imagine somebody else is using it too Oct 19 03:10:07 grothendieck: your makefile just calls ant Oct 19 03:10:12 you're missing the point Oct 19 03:10:13 It also builds a library Oct 19 03:10:15 g00s: I'm tempted to wrangle ASDF to do the stuff Oct 19 03:10:17 that ant does a TON of things Oct 19 03:10:25 that if you had to implement in make Oct 19 03:10:27 would totally suk Oct 19 03:10:29 I'm not missing the point Oct 19 03:10:30 Yes Oct 19 03:10:33 That would be pointless Oct 19 03:10:37 What's wrong with Ant? Nothing. Oct 19 03:10:39 did you even read, what i asked? Oct 19 03:10:41 23:08 < fnord`> show us the makefile that builds android apps without ant Oct 19 03:10:42 g00s: just to make a point of "doing dirty deeds with ASDF" Oct 19 03:10:42 No. Oct 19 03:11:04 * g00s googles asdf Oct 19 03:11:13 I stopped reading after " I would almost guarantee there's no one here using make to build android apps," Oct 19 03:11:17 lol Oct 19 03:11:22 grothendieck: you're NOT using make to build android apps Oct 19 03:11:30 you're using make to call the actual build system Oct 19 03:11:41 After I build dependencies Oct 19 03:11:42 there is an important distinction here Oct 19 03:11:47 which is the only reason for using Make Oct 19 03:11:50 "It is roughly what Common Lisp hackers use to build software where C hackers would use say GNU Make. " Oct 19 03:11:54 that I build the android app with ant AFTER I build the other stuff Oct 19 03:11:56 ahh, now it makes sense! Oct 19 03:12:18 then I have the make install just for lulz Oct 19 03:12:26 g00s: and it extends rules through CLOS ;P Oct 19 03:12:30 actually that is pretty damn convenient Oct 19 03:12:46 (defmethod asdf:compile-op ...) ; :D Oct 19 03:15:14 fnord`: I think the NDK makes it possible actually to avoid ant entirely Oct 19 03:15:26 you can write a purely native app since ndk r7b IIRC Oct 19 03:15:42 it just registers callbacks to Dalvik without needing any Java running on top Oct 19 03:16:07 Sucks that you can't get make all (or even most) API calls Oct 19 03:16:12 man there are some pretty mf bad bugs in dalvik in aosp head Oct 19 03:16:13 really only makes sense for OpenGL apps Oct 19 03:16:19 well at least as of a few weeks ago it was Oct 19 03:16:38 and NDK build script is just a wrapper around Make Oct 19 03:17:01 so anybody who has written an app in pure C/C++ avoids ant entirely! Oct 19 03:17:04 grothendieck: I know an office package that is mostly NDK app Oct 19 03:17:10 cool Oct 19 03:17:23 I wish the NDK was more refined... Oct 19 03:17:29 the java part is few activities for settings and file browsing, iirc Oct 19 03:17:39 heh, if you want first class c++ wp8 is your huckleberry Oct 19 03:17:49 ugh Oct 19 03:18:01 g00s: presumably he also wants users Oct 19 03:18:04 lol Oct 19 03:18:07 a former, never released app of mine had its whole core native Oct 19 03:18:17 buying users, yeah. Oct 19 03:18:36 g00s: I'm not sure if I want to call C++ (or *anything*) first class citizen on WP8 ;) Oct 19 03:18:43 grothendieck: do you know of any such apps that contain not even one java file? Oct 19 03:18:43 *any* users Oct 19 03:18:58 not even jni binding stuff. Oct 19 03:19:01 fnord`: Well, sure there is an example of one that comes in the NDK. Oct 19 03:19:08 interesting Oct 19 03:19:12 hello native activity or something Oct 19 03:19:20 right I heard of that Oct 19 03:19:32 I'd imagine some games are like that Oct 19 03:19:32 but you can't really use that to build apps like you can with java. Oct 19 03:19:34 not sure which though Oct 19 03:19:35 games, sure Oct 19 03:19:38 Right Oct 19 03:19:40 good idea for games Oct 19 03:19:42 Which is why ti kidn of sucks Oct 19 03:19:58 g00s: have some distraction: http://youtu.be/oamRCeLNAWA <--- old hit http://youtu.be/Xm-d-A8oNHA <--- a version by the same singer that I didn't know existed :D Oct 19 03:20:44 such a good song Oct 19 03:20:56 yeah Oct 19 03:21:05 It is so stupid having to write a software library to run on GNU/Linux then re-write it or write a wrapper library for it just to register JNI callbacks to a Java client Oct 19 03:21:16 everything sounds better in japanese :D Oct 19 03:21:18 g00s: went to a BB10 presentation yesterday (and came home with a playbook) - seems like quite a nice platform to develop for, they are saying the right things (like "full paid app support in 170 countries today") - but it's a complete waste of time until there are any users Oct 19 03:21:19 When I'm still running it on freakin Linux Oct 19 03:21:21 g00s: not always... Oct 19 03:21:31 g00s: that, on the other hand, is true Oct 19 03:22:12 Leeds: problem with BB, is they are loosing a ton of developer mindshare. WP otoh, is the opposite Oct 19 03:22:26 no, you're right, WP has no significant mindshare to lose Oct 19 03:22:34 I've gone back to just writing code that runs on Linux Oct 19 03:22:45 Leeds: yes, they executed all the mindshare they had Oct 19 03:22:54 lol Oct 19 03:23:25 grothendieck: not joking. They just pulled the rug, then switched off the lights Oct 19 03:23:30 and closed the door ;) Oct 19 03:23:32 hahaha Oct 19 03:23:37 yeah I heard Oct 19 03:23:38 they called it WP7 Oct 19 03:24:23 I've never written code for Windoze and I never will if I can help it Oct 19 03:24:27 have the BB dev tools got better? Oct 19 03:24:44 Who cares, the platform is dying and useless. Oct 19 03:25:20 alex_PP: the stuff the guy was showing yesterday seemed decent - main tool for native dev is eclipse-based Oct 19 03:26:26 * grothendieck takes deep breaths Oct 19 03:26:54 I am going to take a walk, bye! Oct 19 03:27:01 vb/c# .net isn't that bad.. Oct 19 03:27:16 I think RIM still has its tentacles around bigcorps and governments Oct 19 03:27:24 obama uses a blackberry, for example. Oct 19 03:27:36 and as far as I know, he's not allowed to use any other phone for what he does. Oct 19 03:27:47 vb aint great Oct 19 03:27:58 fnord` not for long as I hear it Oct 19 03:27:58 =) Oct 19 03:28:03 what is he switching to? Oct 19 03:28:03 because nothing can be controlled like blackberry can Oct 19 03:28:05 nothing about obama Oct 19 03:28:08 I am just sayin Oct 19 03:28:13 blackberry is bombing bigtime Oct 19 03:28:19 Oh, because you think he wont be reelected Oct 19 03:28:28 I dont know if he will or not Oct 19 03:28:34 I'd like to hope he wont Oct 19 03:28:36 i remember having to decompile are edit the old signing tool to get it to run on linux Oct 19 03:28:40 it depends how many minorties show up to vote, ron_frow_ Oct 19 03:28:43 \ all over the paths Oct 19 03:29:07 o_o, arrive @ hotel, get room 403, naked old woman in 403 Oct 19 03:29:07 folks, keep the politics out Oct 19 03:29:17 people, lock your hotel doors, some employes suck! Oct 19 03:29:54 that was strange Oct 19 03:30:02 happens occasionally Oct 19 03:30:15 irc canbe unreliable Oct 19 03:30:16 apparently so Oct 19 03:30:24 could be a real person messing around, could be a bot... Oct 19 03:30:34 could be a shocked dev, even Oct 19 03:30:45 lolololol Oct 19 03:31:25 p_l: could be, in which case they'd normally apologise, or ask wtf, or something - off-channel... he hasn't, yet, which suggests he's not surprised to be banned Oct 19 03:31:26 grothendieck: you'll lol when one day after writing "a bit about yourself" in a job application you'll stop and say "Fuck, I'm to young to have lived through that" Oct 19 03:32:06 Leeds: depends on people... with some you'll see them back lurking after some time Oct 19 03:32:22 well, unless they got banned ;) Oct 19 03:32:44 anyone have any material or books on how different cultures use mobile technology differently ? Oct 19 03:33:08 not much in terms of books, I think Oct 19 03:33:11 was reading about some interesting problems mobile solved in africa and india; pretty fascinating Oct 19 03:33:11 g00s: i've read some tribes smash the iphone and use the fluids inside as make up Oct 19 03:33:22 hey Oct 19 03:33:30 you might have some results with sociology and psychology papers Oct 19 03:33:30 g00s: check out some of Tomi Ahonen's stuff Oct 19 03:33:34 g00s: got a link by chance? Oct 19 03:33:37 i try to add 40 textviews in list form Oct 19 03:33:43 http://pastebin.com/TcayJJpW Oct 19 03:34:00 tnzr: what i read was in a book called 'The Mobile Frontier' but the chapter was pretty short Oct 19 03:34:02 then i tried to use viewTreeObserver to reposition the textviews Oct 19 03:34:11 g00s: cool thanks Oct 19 03:34:14 but viewTreeObserver needs my textview to become final Oct 19 03:34:23 then when i set to final then app crashes Oct 19 03:34:25 basically a whole lot of people that completely skipped the PC and mobile is their first computing device Oct 19 03:34:27 why??? Oct 19 03:34:49 g00s: wow, yeah.. that would be a good read. I bet that's not uncommon in places like india Oct 19 03:34:55 vanson2012: the reason it needs to be final is because you're referencing it from the scope of that anonymous inner class. Oct 19 03:34:57 how do i program so as to mimic a ListView Oct 19 03:35:12 it has nothing to do with ViewTreeObserver Oct 19 03:35:16 Leeds: thanks, will read about him Oct 19 03:35:32 those who do not understand ListView are doomed to reimplement it - badly Oct 19 03:35:52 I wish to make a synchronized dual ListView Oct 19 03:35:53 ==Leeds Oct 19 03:36:17 when I scroll the left ListView upwards, the right ListView scrolls downward by the same extent Oct 19 03:36:27 I bet you could do that with regular listviews. Oct 19 03:36:45 but ListView won't respond to scrollBy() or scrollTo() Oct 19 03:36:51 properly Oct 19 03:37:03 do you still have the code from when you tried that? Oct 19 03:37:21 I always think of this when I see Leeds: http://www.youtube.com/watch?v=-9CynvMlFyo Oct 19 03:37:28 vanson2012: have you looked at ListView.setSelectionFromTop(index, top) and other such things? Oct 19 03:37:29 no, because they won't work Oct 19 03:37:40 i've done the same thing you just mentioned (basically) Oct 19 03:37:43 with regular listviews Oct 19 03:37:50 vanson2012: so you want us to make your crappy implementation work, but you didnt' want us to fix your attempt with the regular tools Oct 19 03:38:14 interesting choice, oh wel Oct 19 03:38:39 i attempted ListView for 2 days Oct 19 03:38:56 vanson2012: i guarantee what you're trying to do is possible with listviews Oct 19 03:39:17 ListView.setSelectionFromTop sets position in terms of ListView items Oct 19 03:39:23 right Oct 19 03:39:27 you can make it work Oct 19 03:39:35 but how do I reposition ListView in terms of exact pixels / dp? Oct 19 03:39:48 i mean Oct 19 03:39:49 it is exact pixels, from the top of the listview Oct 19 03:39:53 scroll ListView pixels Oct 19 03:40:27 you mean Oct 19 03:40:37 lv.setSelectionFromTop (0, 100) Oct 19 03:40:38 ? Oct 19 03:40:53 then it can scroll my listview downwards 100 pixels Oct 19 03:41:11 do something like this: http://stackoverflow.com/questions/9783144/synchronize-two-listview-positions-when-you-scroll-from-both-list-views-android Oct 19 03:41:13 but … my client requires it to be loopy/warpy Oct 19 03:41:54 ah, the old loopy/warpy Oct 19 03:42:55 http://www.youtube.com/watch?v=rx6HcG-wfGc Oct 19 03:43:21 im sorry Oct 19 03:43:39 loopy warpy, like, zingy flingy? Oct 19 03:43:49 bouncy wouncy like Oct 19 03:44:02 hack ListView Oct 19 03:44:36 im uploading a video to show the effect Oct 19 03:45:09 http://www.youtube.com/watch?v=8AfbI7J9l7Y Oct 19 03:46:32 my client wants exactly this effect to be done in android too Oct 19 03:46:47 he also sent me ios source codes Oct 19 03:46:56 I have no idea what the effect is, from watching that blurry video Oct 19 03:47:01 a lot of good that will do.. Oct 19 03:47:05 unless the effect you want is *actually* blurriness Oct 19 03:47:19 it just looks like two scrolling lists to me Oct 19 03:47:25 i thought the effect was sidewaysy-ness Oct 19 03:47:30 fnord`: precisely Oct 19 03:48:34 right Oct 19 03:48:40 2 scrollviews Oct 19 03:48:56 * fnord` facepalms Oct 19 03:49:19 when i scroll the left one , the right one scrolls opposite direction Oct 19 03:49:30 vanson2012: can you please describe "loopy/warpy effect" in slightly more technical terms? Oct 19 03:49:37 um.. Oct 19 03:49:41 just like Oct 19 03:49:50 when there are 40 entries in a list Oct 19 03:49:53 did you look at the so link i sent you? you can fairly easily do what you want with some modification to that method Oct 19 03:50:14 there is no end or beginning of the list as i scroll endlessly, it just loops Oct 19 03:50:18 0-39 Oct 19 03:50:29 also, why can't you just reverse one of the lists and scroll in the same direction? Oct 19 03:51:16 sampullman: because that wouldn't be cool Oct 19 03:51:33 you know what's cool? reverse-synced scrolling, that's what's cool Oct 19 03:52:04 also, a billion dollars, but that's not important right now Oct 19 03:52:29 just like "CoverFlow" in iOS, when I turn on "Wrap", then it loops between the 0-999 entries, no interruptions of scroll Oct 19 03:52:47 i can still scroll between 0 & 999th entries Oct 19 03:52:57 that's what i mean loopy Oct 19 03:52:58 there isn't a 1-1 correspondence between ios and android Oct 19 03:53:04 you may need to come to terms with that Oct 19 03:53:19 *your client Oct 19 03:53:23 you need to explain this gently to your client Oct 19 03:53:37 "No, I'm not putting a soft back button in!" Oct 19 03:54:30 no, I get an infinite scrolling list which wraps Oct 19 03:54:46 vanson2012: did you mean to say wrap or warp? Oct 19 03:55:09 i think its wrap Oct 19 03:55:25 now it makes sense Oct 19 03:59:11 well i think i keep working on listview then Oct 19 03:59:19 i have to trust listview Oct 19 04:03:19 When I clicked enter after typing new ListAdapter( Oct 19 04:03:26 it generates some codes: Oct 19 04:03:26 http://pastebin.com/gL0W6vWg Oct 19 04:03:49 seems more useful than tutorials usually teaches me Oct 19 04:04:06 but how to use these? Oct 19 04:04:20 How can I diagnose a attr/activatedBackgroundIndicator not working? I have a list view with multi modal selection, yet the items do not change their look upon being selected Oct 19 04:05:30 when i try to build my project, i get an error that says, "conversion to dalvik format failed with error 2". i've tried cleaning my project and running the fix option in android tools. what else should i try? Oct 19 04:06:36 error 2 is better than error 1 :) Oct 19 04:06:51 tell me about it. Oct 19 04:07:04 restart eclipse, as stupid as it may sound. worked for me. Oct 19 04:07:05 haha Oct 19 04:07:13 well how can i get to error 3 Oct 19 04:07:24 hmm ill try it Oct 19 04:12:25 sorry got dc'ed Oct 19 04:12:36 i missed any replies Oct 19 04:12:45 no Oct 19 04:13:45 wow, this was pretty fascinating http://blogs.wsj.com/korearealtime/2012/10/18/kim-jong-ils-grandson-gives-tv-interview/ Oct 19 04:15:02 does he talk about android development? Oct 19 04:16:23 that guy isn't going to be allowed anywhere near north korea politics Oct 19 04:16:34 he hasn't even met his grandfather Oct 19 04:16:38 JakeWharton: even better, he talks about ABS ! Oct 19 04:16:47 yeah i'm sure Oct 19 04:16:53 abs of steel Oct 19 04:17:33 why, why eclipse, must your conversion to dalvik format fail with error 2 Oct 19 04:17:48 real developers use the command-line tools Oct 19 04:18:00 eclipse is for little kids who pretend to be developers Oct 19 04:18:01 i tried eclim, it wasn't good Oct 19 04:18:17 takes way longer via command line to do so many things Oct 19 04:18:42 not really, you're just not very good at command-line-fu Oct 19 04:19:07 no, trust me. which command line tool pulls up android javadocs? Oct 19 04:19:27 chrome & Oct 19 04:19:32 :P Oct 19 04:19:32 lol Oct 19 04:19:45 pft, links docfile.html Oct 19 04:19:59 surfraw Oct 19 04:20:13 How can I diagnose a attr/activatedBackgroundIndicator not working? I have a list view with multi modal selection, yet the items do not change their look upon being selected. Oct 19 04:20:26 if you were any good at command-line-fu, you'd have an alias or script that loads up the javadocs Oct 19 04:20:58 into my beloved vim window? that sounds like an immense amount of work Oct 19 04:21:20 ew, no. just as another screen/tmux session Oct 19 04:21:35 then it's slower than eclipse javadocs feature :) Oct 19 04:21:47 you're hopeless. Oct 19 04:21:48 whatever, just use wget/grep Oct 19 04:22:45 still slower Oct 19 04:22:57 you're the one at a stand-still with error 2 problems. Oct 19 04:23:05 nope Oct 19 04:23:26 not when it's wrapped in a nice script Oct 19 04:23:37 whether it's eclipse or command line telling me error messages, it doesn't matter. and it's cute how you say "error 2 problems" like you understand the issue Oct 19 04:24:14 well, i was just about to explain it to you and tell you how to fix it, but now i don't think so Oct 19 04:24:17 sampullman, eclipse pulls up javadoc in 0 keystrokes if you type in enough of the name Oct 19 04:24:22 you amuse me Oct 19 04:24:25 scant: enable verbose in build output. it's in window preferences. Oct 19 04:24:27 i find that annoying Oct 19 04:24:44 different strokes Oct 19 04:25:03 i prefer a nice steady and familiar stroke Oct 19 04:25:29 that's why you jack off so much Oct 19 04:25:52 at least i'm getting some action Oct 19 04:26:08 can you two go jack each other off elsewhere Oct 19 04:26:21 jeez, the links of offtopic crap weren't as bad as this Oct 19 04:26:41 i think we can all agree that everything we do is better than everything everyone else does Oct 19 04:26:57 we as in each person, individually Oct 19 04:27:06 JakeWharton: I got an idea for a meme: two pictures side-by-side: first picture is of a cruise control gear in a car captioned "cruise control", the second picture is of tom cruise, captioned "cruise out-of-control" Oct 19 04:27:12 JakeWharton: thumbs up if you like this Oct 19 04:27:44 wow wtf Oct 19 04:27:58 hehe Oct 19 04:27:58 JakeWharton you opensource the new project? Oct 19 04:28:09 ron_frow_: not yet Oct 19 04:28:13 cool cool Oct 19 04:28:14 will probably be a few weeks Oct 19 04:28:23 have actual work to do unfortunately Oct 19 04:28:32 I have a listview, and onItemClick, it goes to the detail view of the item the user has clicked. Along with this I want a "swipe to the right" get the user back to the list screen. How I can I implement this functionality? Oct 19 04:28:38 hah Oct 19 04:28:40 actual work sucks Oct 19 04:28:42 me too Oct 19 04:28:56 fix bugs that have already been fixed but not given to general public Oct 19 04:29:04 I love my actual work. I just don't get to show people the code. Oct 19 04:29:17 it happens Oct 19 04:29:18 Nor help others with it as is done with open source work Oct 19 04:29:51 how to know if a ListView scrolls to the end of the list already Oct 19 04:30:09 use a scroll listener, if the position equals the last one, you're there Oct 19 04:30:10 vanson2012: implement onScrollListener Oct 19 04:30:43 view.getlastvisibleposition Oct 19 04:30:45 i see Oct 19 04:31:26 http://developer.android.com/reference/android/widget/AbsListView.OnScrollListener.html Oct 19 04:31:37 JakeWharton you just need to act like djb Oct 19 04:32:13 vanson2012: I just made a demo of what you were asking for and it's incredibly trivial to just use two ListViews with onScrollListeners Oct 19 04:32:26 I didn't even have to look at the docs... Oct 19 04:35:51 fnord`: what a pro Oct 19 04:35:55 ron_frow_: who? Oct 19 04:36:10 dan bernstein haha Oct 19 04:36:26 he always had this arrogant attitude abotu his open soruce software Oct 19 04:36:28 even though i made a sync pair of scrollviews , i have been in google half of the time Oct 19 04:36:39 people would suggest changes, or ask questions and it was like Oct 19 04:36:48 "...its how I meant it to be built, deal with it " Oct 19 04:36:49 haha Oct 19 04:37:16 he built good stuff Oct 19 04:39:00 doesn't change the fact of him being a nutter Oct 19 04:39:16 nutter> Oct 19 04:40:09 How come typing via the keyboard in the emulator isn't workign? It used to. I've got gpu emulation on. Oct 19 04:42:49 vadi2: you have to create the avd for kb emulation Oct 19 04:43:04 I did just make it Oct 19 04:43:53 ron_frow_: I do have very strong opinions on things like scope and APIs Oct 19 04:44:14 I think thats a common trait of intj's Oct 19 04:44:20 I am 100% the same way Oct 19 04:45:06 intjs are only 2.1 % of the population; strong opinions are universal to everybody ;) Oct 19 04:45:25 strong bad opinions are universal to most Oct 19 04:45:30 hahaha Oct 19 04:45:30 forgot a comma Oct 19 04:45:38 find a lot of that in the work place Oct 19 04:45:59 I'm on numbing meds because of how bass ackwards my current employer is Oct 19 04:47:55 I really just need to find another place to work =( Oct 19 04:48:05 if I didnt find my work challenging and interesting work Oct 19 04:48:12 I'd be gone long ago Oct 19 04:48:20 vanson2012: smoothScrollBy works nicely. Oct 19 04:48:26 ron_frow_: i think you said that last year :D Oct 19 04:48:41 numbing meds have given me that "dont give a fuck attitude" Oct 19 04:48:49 which in general has been absolutely fantastic Oct 19 04:49:02 i thought you were joking about the meds; physical pain meds ? Oct 19 04:49:16 made peoples perceptions of me much better Oct 19 04:49:25 no no Oct 19 04:49:34 heh Oct 19 04:49:41 just give me the dont care Oct 19 04:49:43 thought you got into an accident on your crotch rocket Oct 19 04:50:02 ENTP are the master race Oct 19 04:50:18 I told my dr if he could hypnotize me, he said no but he could give me the magic pills that made me not give a shit and they did Oct 19 04:50:30 ron_frow_: are you having to take the numbing meds because of android ? Oct 19 04:50:35 g00s I dumped my old bike going 50 into a ditch Oct 19 04:50:41 but no injuries from that Oct 19 04:50:52 http://sphotos-b.xx.fbcdn.net/hphotos-ash3/560555_4713805282622_551755633_n.jpg Oct 19 04:50:56 to dump that Oct 19 04:51:03 would be blasphemous Oct 19 04:51:14 heh, i dumped my downhill mountain bike over the road one time Oct 19 04:51:37 going 30 on a mountain bike is like going 100 on a motorcycle Oct 19 04:51:49 going 100 on a motorcycle is nothing =) Oct 19 04:51:55 oh i'm sure 9.9 Oct 19 04:52:06 I generally avg 100mph or so from home to work Oct 19 04:52:16 I should say 90 Oct 19 04:52:51 did you show me a matte grey version last week Oct 19 04:53:04 a few weeks ago yes Oct 19 04:53:09 thats what I was looking for Oct 19 04:53:14 but the red is what I actually bought Oct 19 04:53:31 yeah, grey is killer Oct 19 05:17:31 Success! Oct 19 05:17:44 infinite loop top - bottom listview Oct 19 05:17:47 wrap Oct 19 05:20:18 sounds annoying Oct 19 05:49:45 http://pastebin.com/0PktC08B Oct 19 05:49:50 thank you all Oct 19 05:49:55 finally i did it Oct 19 05:52:40 Is there a way to change the Bayer Pattern of a bitmap being loaded into an ImageView Oct 19 05:55:09 epsilonorion: wut Oct 19 05:55:33 It is the color configuration pattern for an image. RGGB, BGGR, etc. Oct 19 05:56:09 I see where I can make a copy of a bitmap and change the configuration that way, however since Android is so slow as is with bitmaps, making another copy of a bitmap is not the way I want to go Oct 19 05:57:30 oh. when you said bayer pattern, i thought you were demosaicing data from an image sensor Oct 19 05:58:24 lol Oct 19 05:58:26 nah Oct 19 05:58:31 just having issues with bitmaps Oct 19 06:07:44 epsilonorion: there are color transformation matrices Oct 19 06:07:50 that might be what you're looking for Oct 19 06:08:33 maybe. I have a bitmap that is in the BGGR format and all I need to do is shift bits and make it RGGB Oct 19 06:10:38 not sure if the tf matricies will do that Oct 19 06:11:50 i see Oct 19 06:12:04 its quite annoying Oct 19 06:12:25 and I don't want to have to require to preprocess the images on another computer before I can view them in android Oct 19 06:12:26 so you just need to call Integer.reverse() on all the color ints Oct 19 06:13:22 no need to make a copy Oct 19 06:14:43 hey guys, how do I programmically add a TextView into a RelativeLayout, and then set position & size for the TextView?? Oct 19 06:14:51 oh, actually you'll need a custom method, similar to Integer.reverseBytes() Oct 19 06:14:56 sampullman: is there an easy way to do that on a bitmap Oct 19 06:15:01 reverse2Bytes Oct 19 06:15:28 wait Oct 19 06:15:31 wtf is RGGB Oct 19 06:15:40 you mean ARGB? Oct 19 06:16:23 vanson: google search will find you plenty of examples of that Oct 19 06:18:09 Bayer Patterns, RGGB Oct 19 06:18:10 http://en.wikipedia.org/wiki/Bayer_filter Oct 19 06:18:49 ok, but when you display it it's going to be ARGB Oct 19 06:20:54 you're going to have to write a function to convert RGGB to ARGB Oct 19 06:20:59 this might help http://www.helicontech.co.il/?id=bayer-rgb Oct 19 06:25:44 vanson2012: you use addView() and pass in a RelativeLayout.LayoutParams instance. Oct 19 06:25:57 You can specify the positioning with "rules" Oct 19 06:26:12 see RelativeLayout.LayoutParams_addRule() Oct 19 06:26:15 hi Oct 19 06:26:21 guys anyone familiar with in app billing? Oct 19 06:26:34 don't ask to ask just ask Oct 19 06:26:39 sampullman: strange that I dont have a problem with one of my other images. The BGGR images are fine, however the RGGB images are having this issue. Oct 19 06:26:54 sampullman: I will look into that and see if it fixes the problem. Thanks Oct 19 06:26:59 i suspect they're not actually fine Oct 19 06:27:42 but close to Oct 19 06:27:52 haha alright Oct 19 06:28:05 i would have guess thed RGGB bitmaps would be the issue, though Oct 19 06:28:08 well anyways, i have in app billing working and i tested it with a real transaction Oct 19 06:28:11 sorry, BGGR Oct 19 06:28:14 the problem is that I need it to verify it with my server Oct 19 06:28:17 anyway i can do this? Oct 19 06:28:27 is tehre any sample code, example, or tutorial Oct 19 06:28:32 for this time of verification on server via php? Oct 19 06:28:44 sampullman: possibly. Thanks Oct 19 06:29:11 rggb would be fairly similar in look to rgb Oct 19 06:31:43 Is there any example, tutorial, or sample code on Android In App Billing Server verification? I have in app billing working and i need to get server verification working, just don't know wheere to make the first step. Oct 19 06:33:15 Tinster: did you go though this? http://developer.android.com/guide/google/play/billing/billing_integrate.html Oct 19 06:34:05 sampullman : yea I have, I have in-app-billing working Oct 19 06:34:35 so, send a message to your server whenever the user purchases something Oct 19 06:34:47 with json, or plaintext, or xml Oct 19 06:34:49 whatever Oct 19 06:34:54 hmm Oct 19 06:35:01 Can anyone here very good at the Android Notification system? I'm having a bit of trouble when having two notifications. Oct 19 06:35:03 have you implemented it before? Oct 19 06:35:14 no, but i've sent messages to servers Oct 19 06:35:18 which is exactly the same Oct 19 06:35:23 in the Google IO Oct 19 06:35:28 on in-app-billing securityy Oct 19 06:35:32 with android Oct 19 06:36:11 it said the best possible method would be Client >> Google Server (signed content) >> Client (proxy content with no decoding) >> MY SERVER (verify Oct 19 06:36:12 ) Oct 19 06:36:24 actually nevermind i think i know how i can work around it Oct 19 06:36:31 thanks Oct 19 06:36:52 you should get a rubber duck Oct 19 06:37:11 ? Oct 19 06:37:28 sometimes just vocalizing your problems helps you solve them Oct 19 06:37:34 in this case, i was your rubber duck Oct 19 06:38:09 hahaha thanks Oct 19 06:38:35 pretty stressed too, hoping i'd get everything right on the first try Oct 19 06:38:51 but now i think the best method is just to do, do, do, fail, fail fail, and do some more until it works Oct 19 06:45:46 Can anyone help me out with notifications fairly quickly? Oct 19 06:46:38 Hi, when I show an Alertdialog, does the code AFTER the AlertDialog.show() continue to get executed or does it until the AlertDialog is gone? Oct 19 06:47:35 http://developer.android.com/reference/android/app/Activity.html#ProcessLifecycle Oct 19 06:49:53 http://www.dreamincode.net/forums/topic/233010-dialogs-and-the-android-lifecycle/ Oct 19 06:52:12 http://developer.android.com/guide/topics/ui/dialogs.html Oct 19 06:53:01 It would depend on the code, of course Oct 19 06:53:19 say I open a network socket Oct 19 06:53:22 show an alert dialog Oct 19 06:53:31 ...socket does nto block simply because there is a dialog Oct 19 06:53:58 or just think...android shows a notification "please charge your battery" Oct 19 06:54:02 but the phone still works Oct 19 06:54:51 Hi everyone. I am looking for a way to set my Android tablet screen to dim instead of sleep, so when I touch it, it brightens again. Any idea? Oct 19 06:55:25 go to #android Oct 19 06:58:14 Hi Oct 19 06:58:57 grothendieck: is there a dialog type which blocks the code? Oct 19 06:59:19 Can I put any IBinder as parameter in asInterface? Oct 19 06:59:20 they all "block the code"... Oct 19 06:59:30 It seems OK. Oct 19 07:14:46 Omar: no. every thing you do with UI in android will be asynchronous. Actually, most everything you do will be asynchronous. Learn to think that way. Oct 19 07:37:32 hi. I've got a problem in eclipse. the screen keeps residues of the javadoc window when my mouse hovers over a method to show hints about the method. what should I do ? i have to always scroll the editor to clear them. Oct 19 07:38:19 Hello folks. Oct 19 07:38:19 I have a strange issue. Oct 19 07:39:18 Even though I've got "" in my manifest. mSipManager.setRegistrationListener() still throws a SecurityException saying that I'm not user 10090, nor do I have android.permissions.USE_IP. What could I be doing wrong? Oct 19 07:39:50 GeorgeJ: look closely at what it says you don't have Oct 19 07:39:56 "USE_IP" Oct 19 07:40:25 That was a typo. Oct 19 07:40:32 Damn! Oct 19 07:41:08 The exception is: java.lang.SecurityException: Neither user 10090 nor current process has android.permissions.USE_SIP. Oct 19 07:41:23 are you sure the is in the right stanza of you manifest? Oct 19 07:41:36 you are using API9+? Oct 19 07:41:59 Here's the code: https://gist.github.com/3916758 Oct 19 07:42:05 There are no additional classes, nothing. Oct 19 07:42:18 Leeds: I am, yes. Oct 19 07:42:27 just a suggestion... Oct 19 07:44:56 I don't really understand why I'd get such an exception. I'm clearly asking for USE_SIP Oct 19 07:45:24 hi2all. I've got some troubles with ndk. I'm trying to include headers that contain includes like this "#include " (no extension for header). And ndk-build throws "No such file or directory" Oct 19 07:45:42 GeorgeJ: permission should be singular, not plural Oct 19 07:46:11 Constant Value: "android.permission.USE_SIP" Oct 19 07:46:34 GeorgeJ, are you user 10090?? Oct 19 07:48:01 GeorgeJ: you have android.permission.INTERNET ? Oct 19 07:48:30 whoops missread your error Oct 19 07:48:55 tdignan: That was indeed the case. Thank you! Oct 19 07:49:03 GeorgeJ: also heed g00s adviaec Oct 19 07:49:03 I should have not overlooked that. Oct 19 07:49:05 advice* Oct 19 07:49:14 hi a few days a go i stumbled across a framework on github that aims to share code between android and ios while using native ui elements but i lost the url and name anyone here knows a framework like this? Oct 19 07:49:21 GeorgeJ: you can autocomplete those values with ctrl + space so it doesn't happen again Oct 19 07:49:31 thebastl: tat was probably an omen Oct 19 07:49:56 tdignan: I've provided the full manifest file. It constains the permission g00s was talking about. Although also in plural form. I've fixed both. Oct 19 07:50:10 well, it also said "USE_INTERNET" Oct 19 07:50:17 it's just "INTERNET" Oct 19 07:50:40 g00s: i have seen it with my own eyes ;) Oct 19 07:50:41 Hmm, actually, yes. Correct! Oct 19 07:53:13 Hi there. Oct 19 07:53:51 if it helps... http://developer.android.com/reference/android/Manifest.permission.html Oct 19 07:57:33 willy jones get it to the next round Oct 19 07:58:22 Is there any example, tutorial, or sample code on Android In App Billing Server verification? I have in app billing working and i need to get server verification working, just don't know wheere to make the first step. Oct 19 08:00:52 every time I look in the docs and find something instead of asking I pat myself on the back for not being a moron Oct 19 08:01:47 (which is not to say I haven't asked dumb questions. I have, I just repressed those memories) Oct 19 08:04:59 Speaking of dumb questions... Oct 19 08:05:40 Fragment retFragment = Fragment.instantiate(cont, SinglePicFragment.class.getName()); ImageView imageView = (ImageView)retFragment.getView().findViewById(R.id.single_image_view); Oct 19 08:05:46 that gives me a null pointer exception Oct 19 08:11:03 2 things: if you're using a fragment, the point of them is to hide and separate the view logic, so don't do that. Two, I am not sure, but I don't think calling Fragment.instantiate will cause onCreateView() to be run, thus there's no view yet. Oct 19 08:23:58 tdingan - you're right, onCreateView isn't being called... Oct 19 08:26:10 how can I get the width of a screen from anywahere? Oct 19 08:26:14 how can I get the width of a screen from anywhere? Oct 19 08:28:57 int screenHeight=getWindowManager().getDefaultDisplay().getHeight(); Oct 19 08:29:12 getWidth() in your case Oct 19 08:29:46 that has to be done from an activity though Oct 19 08:29:52 you need a context Oct 19 08:30:31 Anyhow - instantiating a fragment doesn't call its onCreateView() method, so when I later on do getView() I get a NPE. Any way around this? Oct 19 08:31:07 read the fragment guides so you learn how to use them properly instead of guessing Oct 19 08:31:13 Tee_Pee, ok. but i am using openGL, does it make a difference? Oct 19 08:31:28 nope, this is an android function Oct 19 08:31:52 ok ok.. i'll see thru it Oct 19 08:32:27 tdignan - I am aware of the basics, but I can't find any decent documentation on what I am trying to do here... namely create an image slideshow. In my fragmentpager's getItem() function I try to set the image source of the selected fragment. Oct 19 08:32:58 i love the archos guys :) Oct 19 08:33:12 they removed the firmware for the 101g9 tablet Oct 19 08:36:39 Tee_Pee: you are lucky i am feeling generous today https://gist.github.com/3916982 Oct 19 08:37:50 don't call getView() on your fragments Oct 19 08:39:44 Except that code doesn't help me, since I can have up to 2000 images in my slideshow, I can't just create them all at once and dump them in. But either way, I've figured it out, thanks anyway. Oct 19 08:40:37 sure it does -- it shows you that you can pass the id in before onCreateView and then use it later. Oct 19 08:41:13 aye, that's what I just realized myself :P Oct 19 08:57:06 Morning all, happy friday :) Oct 19 08:57:46 DysonReturns, you got updog bro Oct 19 08:58:38 lol Oct 19 09:02:19 Tracks, what's the meaning of the word "updog"? Oct 19 09:10:58 hi Oct 19 09:11:04 hey Oct 19 09:11:16 any idea if there is a treeview like widget available? Oct 19 09:11:27 yes in the updog repository Oct 19 09:11:34 thx Oct 19 09:11:40 wait Oct 19 09:11:41 no Oct 19 09:11:48 that was a joke sorry Oct 19 09:11:50 i dont know :/ Oct 19 09:12:40 there is an expanablelistview in the sdk Oct 19 09:14:34 and there is tree-view-list cool :) Oct 19 09:21:56 i'd like to develop an app with which I can take pictures of items (clothing) and register them with a forms and submit data to a api Oct 19 09:22:10 would this be hard to make (the using of the camera part) ? Oct 19 09:22:59 mobile8: not really, getting photos from the camera using the built-in camera ui has some quirks though Oct 19 09:23:32 especially on older devices Oct 19 09:25:28 hm, I have a 2-fragment layout, and when the user rotates from landscape to portrait I also want to flip the orientation to two rows instead of two columns Oct 19 09:26:06 that all works fine, but the link from the fragment to the delegate is lost in the rotation process Oct 19 09:26:38 the delegate being the activity Oct 19 09:27:07 ie, MainActivity implements SomeFragment.OnSomeCustomResultClickedDelegate Oct 19 09:33:03 ah, already figured it out, don't set the listener on the fragment using a setter Oct 19 09:33:12 simply set it in onAttach Oct 19 09:33:27 MDijkstra: hmm ok Oct 19 09:33:41 MDijkstra: this is the first app , i want to create Oct 19 09:33:47 MDijkstra: but basically it should be possible? Oct 19 09:33:49 Is the Google Play store fee different for app purchases to in-app purchases? I just setup my first test in-app purchase and google have only taken 25%. I was expecting 30%? Oct 19 09:33:53 or willl i run into a lot issues Oct 19 09:34:35 mobile8: it's not that difficult in general, grabbing the photo is probably the most difficult Oct 19 09:34:49 MDijkstra: http://stackoverflow.com/questions/1536802/how-to-call-built-in-camera-app-from-my-own-application-in-android Oct 19 09:34:52 like this? Oct 19 09:35:17 yeah, but as I said, there are some quirks in older devices Oct 19 09:35:34 regarding resolution, etc Oct 19 09:36:00 plus you may run out of memory since the photo ui takes quite a bit of memory Oct 19 09:36:27 possibly requiring you to deal with saving activity state and stuff like that Oct 19 09:38:50 hmm ok Oct 19 09:39:20 MDijkstra: in case i would had such app built by anyone else, which i also consider, what would be a realistic price? the UI I already designed Oct 19 09:42:13 mobile8: don't know, #android-dev is probably not the place to ask people for business advice :) Oct 19 09:42:34 25cent Oct 19 09:43:12 mobile8: pricing largely depends on the volume you expect to be able to make. Oct 19 09:45:15 morning Oct 19 09:46:13 my app is 3.0+ but i *really* want that menu button on the navigation bar… the problem is if i set my target to 10 to get the menu button, the graphics on my app become really choppy and it puts this weird shading effect around the edges of my views… any ideas on this? Oct 19 09:47:52 ok Oct 19 09:51:44 If it's available to the general public and has large potential appeal, i.e., high potential volume, a lower price makes sense. If it caters to a niche audience, you should ask a higher price. Oct 19 09:53:05 Another important question to ask is, what are competitors asking? Oct 19 09:54:06 And what do you estimate your audience is willing to pay? (i.e. what's their income group, roughly) Oct 19 09:54:25 or if it replaces some kind of hardware Oct 19 09:54:36 That too Oct 19 09:54:39 i'd think you can ask more, then Oct 19 09:54:47 Definitely Oct 19 09:56:32 what about for the "work" involved? for example, my app requires a server for mac/pc that i'm writing as well, so it can interface with other software properly Oct 19 09:58:11 Well, personally I don't count the work per se, but your app sounds like a niche app and having a desktop component, I would go much higher than the regular $1-3 for your average fart app. Oct 19 09:58:26 Your pay is volume * price. Oct 19 09:59:04 Estimate the volume, then put a price on your work, divide the 2 and you have your price :) Oct 19 09:59:42 yeah it's niche for sure Oct 19 10:00:39 If it solves a business problem and saves someone money (which most farts won't do), you can go into the $10-$20 range or even more. Oct 19 10:01:51 am i better off starting out high and then dropping the price if it doesn't sell? Oct 19 10:01:58 or figure out what's correct in the first place? Oct 19 10:02:29 i figure i can get $10 as i'm replacing a $150 piece of hardware Oct 19 10:03:01 also it's music related, and people are used to dropping a lot of money on music software and hardware Oct 19 10:04:36 I don't have actual experience with your kind of apps specifically (mine are mostly low-ball :) ), but what I'd do is start on the low side to get some numbers and ratings, and then jack it up and see what it does. Oct 19 10:06:19 ok good call Oct 19 10:07:42 my server is designed for future apps too, so i'm going to make a simple controller app for free that gets users to install my server on their computer… from there adding more (paid) apps is no big deal and they can be showcased from within the server software or app :D Oct 19 10:08:19 the free app will show off some capabilities of the system i came up with, but only give access to a couple things Oct 19 10:08:23 i dont think changing the price of an app once it starts selling is good Oct 19 10:09:24 well, if the price dropped i'd be miffed if i paid more Oct 19 10:09:33 but then again, we're not talking hundreds of dollars here Oct 19 10:09:42 true Oct 19 10:09:48 HDroid: i more ment, to have it created Oct 19 10:10:03 dropping a price isnt as bad.... i guess most non app products drop in price after a while(cars, videogames) Oct 19 10:10:14 definetly dont raise the price though, that just looks terrible Oct 19 10:10:40 and id say dont drop the price unless its been 6 months or something Oct 19 10:10:51 i'd be happy as hell with $10, so i'll start there and see what happens… it's very niche and only for people who already own $500 music software Oct 19 10:11:23 tech1: ppl are starting to sell side-apps for extending Oct 19 10:11:24 $10 is reasonable for a good app Oct 19 10:11:51 i see. sort of like game dlc? Oct 19 10:11:56 my market will already be aware of the $150 hardware this can replace, so maybe $15 because they'll think "one tenth the cost" Oct 19 10:12:23 well if you are sure people will see it that way. can it really replace the hardware Oct 19 10:12:34 yeah, it improves on it Oct 19 10:12:38 tech1: who's going to notice you raising the price? Oct 19 10:12:53 The people who already bought it are not affected. Oct 19 10:12:55 people who have been watching your app and thinking of buying it Oct 19 10:13:07 Well it might create a sense of urgency then. Oct 19 10:13:38 Lowering it makes people think "let's wait another week, maybe it drops even further" and it shows desperacy. Oct 19 10:13:44 iv never seen any product anywhere raise its price after release. if they did i would think the company has a terrible business strategy Oct 19 10:14:14 Ehh I see it all the time, in all business areas. Oct 19 10:14:15 thats why prices get lowered every 6 months, eg for games and tvs etc Oct 19 10:14:25 It's a necessity even, to compensate for inflation. Oct 19 10:14:26 really? i havnt Oct 19 10:14:35 not for the same product Oct 19 10:14:40 Yes but you're talking about non-evolving goods. Oct 19 10:14:41 and model Oct 19 10:14:50 A TV is outdated Oct 19 10:14:51 can you give me an example? Oct 19 10:15:03 of something which has gone up Oct 19 10:15:46 Gas, heh. Oct 19 10:15:48 i guess good maybe Oct 19 10:15:57 resources yeh Oct 19 10:16:10 Anything non-trend related will go up to compensate for inflation. Oct 19 10:16:25 TVs have to get priced down to clear stock for the next version. Oct 19 10:16:27 since my app is full-screen music control, i don't want a menu button on it (it's 3.0+)… so if i change my target to 10 to force the menu button onto the navbar, i get this weird shaded effect around the edges of some views and choppy graphics performance… any ideas? Oct 19 10:16:42 resources based goods then. definetly not software products though Oct 19 10:17:21 tech1: I dunno, I follow news.ycombinator.com and there's lots of examples there. Oct 19 10:17:45 also the frequency, you buy food and gas almost daily. so that seems to be a factor Oct 19 10:17:56 It also makes sense to start low and call it a special offer because it's new. Oct 19 10:18:16 yeh. if you call it a special offer Oct 19 10:18:21 could be ok Oct 19 10:19:03 But I'd say most people looking at your app will see it for the first time and they'll never know what it cost yesterday. Plus, it really doesn't matter if you're better than your competition. Oct 19 10:19:19 but can you imagine if they released a movie they didnt know would be popular... and said cool its selling, lets raise the price by 25%.... would turn everyone away Oct 19 10:19:26 thats true not many people will notice it Oct 19 10:19:35 Movies are trend-related. Oct 19 10:19:44 but i think its good practice to keep ethical business rules Oct 19 10:19:57 Plus they're already priced too high from the start. Oct 19 10:20:07 yeh thats true Oct 19 10:21:05 id just say if you must change price, drop it after 6 months instead of raising it. but id try to avoid both Oct 19 10:21:13 not that im a business expert Oct 19 10:21:24 thats my strong personal opinion Oct 19 10:21:30 The point is, there is no way to tell the right price for your software. The only way you can find out is by putting it out on the market and experiment. Oct 19 10:21:56 ok i got the fading edge reviewed, but why would graphics performance drop if i change my target from 15 to 10? it's not bad at all, but it was much smoother at 15… i don't know if it's the finger position refresh rate or the screen refresh rate Oct 19 10:22:03 If demand allows it, you'd be crazy not to raise your prices, because you've probably priced it too low initially. Oct 19 10:22:22 reviewed? i mean removed Oct 19 10:22:53 Hm could it be a hardware acceleration thing? Oct 19 10:23:29 i'll try playing with those settings Oct 19 10:24:18 can i assume anything 3.0+ is hardware accelerated? Oct 19 10:25:17 http://developer.android.com/guide/topics/graphics/hardware-accel.html Oct 19 10:26:18 yep i'm there right now :) Oct 19 10:26:40 setting to hw accelerated does fix the problem Oct 19 10:27:55 didn't affect any of my drawing like it said it might (all views are custom), so i guess i'm good to go Oct 19 10:30:00 Leeds: so i thought, and neither should my receiver be dieing because i register it in the manifest with android:process=":remote" Oct 19 10:30:12 erm... Oct 19 10:30:47 if you pass a pendingintent to the alarmmanager which calls your receiver, you *don't* need to keep your receiver running - the system will start it to deliver the alarm Oct 19 10:31:18 Leeds cool, i counted on that Oct 19 10:31:27 Leeds let me pastebin Oct 19 10:31:38 it's very similar to the website but added the notification logic Oct 19 10:32:17 don't mess with android:process - you don't need it Oct 19 10:32:22 alarmmanager stuff is really simple Oct 19 10:34:01 Leeds: http://pastebin.com/NehcGHMZ Oct 19 10:36:09 Leeds i just included it because the tutorial suggested, i'm afraid that if it isn't remote the app won't intercept it when closed Oct 19 10:36:28 as I said, the system will start your receiver to deliver the alarm Oct 19 10:37:27 are you sure the alarm isn't being delivered? Oct 19 10:37:54 Leeds: so just in the manifest ? Oct 19 10:38:15 Leeds: pretty much let me debug 1 last time Oct 19 10:46:08 hey Oct 19 10:46:18 I'm having some trouble with a relativelayout Oct 19 10:47:01 http://pastie.org/private/l8hubomg60jw1cwdd481na Oct 19 10:47:23 one would assume the "next" thingie is at the bottom of the screen Oct 19 10:47:26 but it's on the top Oct 19 10:47:31 and I don't know why Oct 19 10:48:08 eclipse also shows it like this: http://cl.ly/image/052E3N0H353i Oct 19 10:48:22 i.e. it shows that it's aligned to the bottom (green line), but it's still on top Oct 19 10:48:23 help? Oct 19 10:54:41 Leeds: it isn't firing when app it closed Oct 19 10:55:40 tech1: interestingly, once you bought it, the current won't be shown anymore on the market Oct 19 10:55:55 /price/ Oct 19 10:56:05 Leeds: is there a way to debug (or print a message) from the AlarmManager or BroadcastReceiver when the app is closed? Oct 19 10:58:43 mots: not sure what's causing that, but what I generally do is use a vertical linearlayout instead of a relativelayout, then set the layout_weight="1" of the content part (i.e. the stuff that's supposed to go above the Step/next bar) and it'll automatically push the bar to the bottom. Oct 19 10:59:19 mots: drawback of your current solution is that the content window will drop below the button bar if the content is longer than the screen allows. Oct 19 10:59:28 btw, what's the common way to take advantage of multicore cpu ? Oct 19 10:59:37 Thread it like it's hot. Oct 19 10:59:42 (in the android world) Oct 19 11:00:04 HDroid: thanks, I'll try that Oct 19 11:00:12 android layout seems incredibly messy to me Oct 19 11:00:27 It's ok once you get used to it. Oct 19 11:00:39 I like it better than html + css, in fact. Oct 19 11:00:42 HDroid: just fire a bunch of worker threads and let the system cope with it ? Oct 19 11:00:58 Just have to know the tricks of the trade and it'll get easier. Oct 19 11:00:58 i did both gtk and qt and both of them felt much nicer :P Oct 19 11:01:02 TheSnide: pretty much Oct 19 11:01:16 HDroid: so that leads to the next one : how much ?* Oct 19 11:01:27 TheSnide: that's the tricky part :) Oct 19 11:01:40 Not sure if you can detect the number of cores in your app. Oct 19 11:02:06 HDroid: parse /proc/cpuinfo ? :) Oct 19 11:02:14 That could work Oct 19 11:02:52 what the relations between processes and applications ? Oct 19 11:03:02 i'm not sure about android, but when i was reading about max kernel programming, multi-core support is up to the operating system Oct 19 11:03:17 er Oct 19 11:03:19 mac, not max Oct 19 11:03:26 Roughly, a process is an application, but a process can have multiple threads. Oct 19 11:03:57 HDroid: plain new Thread().start() ? Oct 19 11:04:00 ultra-: it's true, but you can help the OS a bit by using threads. Oct 19 11:04:05 ddreamer0: read, read and reread the application lifecycle stuff Oct 19 11:04:21 yeah but the thread management is taken care of by the OS… you just need to make the threads Oct 19 11:04:29 TheSnide: depends on what you're doing... I'd rather use asynctasks and executors. Oct 19 11:04:33 or is there a thin framework for worker pools ? Oct 19 11:04:35 ultra-: true Oct 19 11:04:52 ultra-: it's guesswork, anyhow. Oct 19 11:05:44 Make more threads, app can be parallelized, make too many, app can be paralysed :) Oct 19 11:05:57 HDroid: i'm thinking about having a thread that draws, one that takes user inputs, and several workers that continuously recompute the internal state Oct 19 11:05:57 Hi everyone! I've just started with Android development. Currently I have three items in my app: two EditTexts and one Button Oct 19 11:06:15 kernel and user space are separated for a reason and i'd let the OS handle what's going on with the cores… it should be obvious when to use threads and when not to Oct 19 11:06:18 How would I force them to cover 100% of the width, and align under each other? Currently they're always on the same line... http://paste.ubuntu.com/1289002 Oct 19 11:07:00 ultra-: errr. using threads is on the app. which thread to which core is up to the os Oct 19 11:07:05 TheSnide: anything drawing will have to end up on the UI thread anyhow. I _think_ user inputs need to be on the UI thread as well, but you can offload the workload, of course. Oct 19 11:07:19 As for the workers, depends on what they do. Oct 19 11:07:26 right Oct 19 11:07:50 I imagine they write to model objects, and the UI drawing thread can reload the view state. Oct 19 11:08:25 HDroid: oh. so the events are all dispatched to the main thread ? Oct 19 11:08:37 /dispatched/consumed/ Oct 19 11:08:55 and events == onTouch + onDraw Oct 19 11:09:19 Yes, pretty much Oct 19 11:10:40 HDroid: ok. makes things simpler. Oct 19 11:11:20 anyway, what i was getting at is that just b/c you make a new thread, doesn't mean it'll end up on another core (or maybe i was misreading you)…the thread and core management is up to the OS and you should use threads when they make sense and not worry about it from there Oct 19 11:12:55 i have to work, dammit… bbl Oct 19 11:13:22 also note that Android is an inherently multitasking system - so you could be 'using' multiple cores simply by not being interrupted by background processes Oct 19 11:13:42 true Oct 19 11:15:19 hi Oct 19 11:15:38 how can I have android:layout_toRightAndThenTopOf instead of android:layout_toRightOf ? Oct 19 11:16:28 with android:layout_toRightOf, it's aligned at right-bottom Oct 19 11:16:36 while I need it at right-top Oct 19 11:17:05 ultra-: yeah, but as i was planning to have cpu consuming updates anyway, i just asked if a "best-practice" exists on the matter. Oct 19 11:20:51 i still dont get these chrome tablets .... Oct 19 11:21:00 err, things, not tablets Oct 19 11:21:08 I totally get them Oct 19 11:29:52 when using a tab host, is it possible to destroy the activities in the inactive tabs? Oct 19 11:30:09 hmm Oct 19 11:30:15 i think they get started / stopped Oct 19 11:31:02 Leeds hey man you let me here hangin Oct 19 11:31:16 at one point my app goes over 20mb at runtime because of opening new tabs, i need to remedy this =/ Oct 19 11:31:38 Leeds you think there is a workaround so that my app doesn't need to be running in order for the sheduled alarms go off ? Oct 19 11:31:56 ddreamer0: your app 100% does not need to be running for alarms to go off Oct 19 11:32:17 well sure isn't workin... :( Oct 19 11:32:38 you were saying i don't need: Oct 19 11:32:39 right ? Oct 19 11:33:37 or just remove the " android:process=":remote" " Oct 19 11:33:52 you definitely don't need the android:process Oct 19 11:34:21 put a simple log message in the receiver, as a sanity check Oct 19 11:34:58 Leeds got that Oct 19 11:35:11 isn't firin Oct 19 11:35:22 with the app closed Oct 19 11:35:39 then there's something else going on Oct 19 11:35:52 (i go to applications and manually stop ath app running) Oct 19 11:35:59 ah! Oct 19 11:36:08 you didn't say you were force-stopping the app - that kills alarms Oct 19 11:36:14 this FragmentStatePagerAdapter is driving me insane... Oct 19 11:36:20 that is seen as the user saying explicitly "I don't want this app to run" Oct 19 11:36:20 Leeds: told ya: i want the alarm to go off even with the app closed Oct 19 11:36:42 if the user force-closes your app, the alarm won't fire Oct 19 11:36:44 does anyone know how to change the colour of that arrow that appears to the left of the icon on ABS, showing that you can go back Oct 19 11:37:09 if your app gets pushed into the background, gets pushed off the stack because of lack of RAM - it'll get restarted when the alarm fires Oct 19 11:37:21 i want to program an alarm that's independent from the application being alive Oct 19 11:37:31 is that possible ? Oct 19 11:37:36 if the entire point of the FragmentStatePagerAdapter is to not keep fragments in memory once they're scrolled away from, then keeping the fragments in a List defeats the entire purpose, correct? Oct 19 11:37:50 I can keep saying the same thing Oct 19 11:38:02 if the user *forces your app to close*, your alarms won't fire. that's a solid rule Oct 19 11:38:12 Hi all Oct 19 11:38:14 Hmm, if I were to give a presentation like 'Android 101', where would I start? Should I just cover what the Training Lessons cover or are there video recordings of existing talks like that? Oct 19 11:38:24 if your app gets closed by the system because it needs the RAM, it'll get restarted when the alarm fires Oct 19 11:38:27 I watched a good talk about 'sensor fusion', does anyone know if this API is availiable? Oct 19 11:38:38 http://www.youtube.com/watch?v=C7JQ7Rpwn2k Oct 19 11:38:40 sane users do *not* force apps to close - they just switch away and let the system manage the apps Oct 19 11:38:45 ok, got it Oct 19 11:39:08 just thought there might be a way to force it to remain Oct 19 11:39:11 so stop force-closing your app, and the alarm will work exactly as they're meant to Oct 19 11:39:44 Leeds lol yeah it's not me i want to prevent potential users with taskillers to kill their alarms too Oct 19 11:39:48 as a user, I'm glad that apps can't restart themselves when I've forced them to close Oct 19 11:40:00 users with task killers are idiots, and don't deserve working software Oct 19 11:40:10 haha Oct 19 11:40:29 tell my boss lol Oct 19 11:40:37 sure, get him to come on IRC and I will Oct 19 11:40:38 he's got an app killer Oct 19 11:40:47 i wonder how easy it is to reimage the chromebook and put linux on it :) Oct 19 11:40:58 g00s: I'm going to say pretty easy Oct 19 11:41:04 and wants to make software for users like him Oct 19 11:41:04 haha Oct 19 11:41:06 chromeOS is Linux, of course Oct 19 11:41:08 kinda depends on the drivers Oct 19 11:41:23 availability, thereof Oct 19 11:42:02 but if it was easy, yeah … i'd just put xubuntu on it or something Oct 19 11:42:16 slackware for me Oct 19 11:42:54 and, you can still use skype and stuff :) Oct 19 11:43:40 no Oct 19 11:43:51 I doubt skype have ARM-Linux binaries Oct 19 11:43:58 oh noes Oct 19 11:47:33 Whether or not one can swipe left or right in a FragmentStatePagerAdapter is determined by the passed fragment manager, correct? Oct 19 11:47:44 the number of items etc* Oct 19 11:47:48 it's not quite as bad as Windows RT which has no apps at all whatsoever, but ARM Linux is still a small niche Oct 19 11:48:46 Typically how accurate is the accelerometer? Oct 19 11:49:08 Belacan: it depends on the device Oct 19 11:49:35 typically at least 1/64 g Oct 19 11:49:38 Generally can it measure accelerations of say, 0.1 G? Oct 19 11:49:42 cool Oct 19 11:49:47 what is your actual question? Oct 19 11:49:49 ah Oct 19 11:50:07 but I assume the noise will be greater than 1/64g Oct 19 11:50:31 So my real question is, over a long period of time is the accelerometer quite accurate? Oct 19 11:50:38 generally it's a LSB, or about 300ug/sqrt(hz) Oct 19 11:50:42 Say I wanted to measure the speed of a car using the accelerometer data Oct 19 11:50:50 you can't. Oct 19 11:51:09 why not Oct 19 11:51:24 like, from a standstill Oct 19 11:51:27 then start accelerating Oct 19 11:51:30 that is simplifying a bit, but there Oct 19 11:52:35 are numerous problems. Oct 19 11:52:51 yes, in principle, you can measure a drag racetype accelleration. Oct 19 11:53:02 right Oct 19 11:53:09 so if the car is going in a straight lie Oct 19 11:53:11 line Oct 19 11:53:15 if you know the orientation wiith respect to the car Oct 19 11:53:34 but 'only' .05G error is still 50cm/s/s Oct 19 11:53:45 So after 10 seconds, you have 5m/s - 10mph error Oct 19 11:54:26 hmmmmm I see Oct 19 11:54:41 how about the GPS? Oct 19 11:54:49 can that give an accurate measurement of speed? Oct 19 11:55:05 all thats required is a good reading of relative position change really Oct 19 11:55:55 GPS can give accurate speed - given good signal Oct 19 11:56:11 howver, glitches Oct 19 11:56:23 do occur. Especially with poor signal. Oct 19 11:56:25 Sigh.... This is driving me nuts... I am trying to create an image slideshow with an arbitrary amount of images (500+). What I do is, when I initiate the FragmentStatePagerAdapter, I create only one fragment, and based on which picture was selected, I add fragments to the adapter's fragment list to the left or right as required. This... does not work very well. Should I create all 500+ fragments first, then just display them? Oct 19 11:56:45 Cool, thanks very much SpeedEvil. Oct 19 11:57:00 Belacan: I would suggest the following to google - can't right now Oct 19 11:57:51 'kalman filter GPS' 'accellerometer n900 fundamental limitations',also ##electronics and ##highaltitude Oct 19 11:59:05 Sweet thanks man! Oct 19 11:59:34 my app uses GPS but when it closes GPS is still running. What is the method for shutting off GPS when the app closes? Oct 19 12:02:03 Nevermind, got it fixed. Oct 19 12:02:26 hi all, I have been working on a 'view' to use as a widget in one of my activities - including drawing to it and getting touch events from it etc and all is working just fine Oct 19 12:02:28 im not sure but isnt gps a user setting? they might still want it on for googlemaps etc Oct 19 12:03:24 I would also like to be able to create an instance of my view in the background (during a service thread I think) so that I can use the view to draw something (in memory - not on screen) and then get a capture of that to save to disk as PNG Oct 19 12:03:30 should this be possible? Oct 19 12:03:59 I've been looking at the docs but I haven't found whether it is the right approach or not yet - please feel free to point me at the relevent doc... Oct 19 12:05:25 I don't think you can switch the GPS on/off without the user actually turning it on/off. Oct 19 12:08:22 why do you want to use the view to create a drawable? Oct 19 12:08:42 maybe some kind of drawing program to create drawables dynamically Oct 19 12:09:27 tech1: the view that I've created is for a board game so it responds to touches to place the pieces on the view etc Oct 19 12:09:54 tech1: in some other place I'd like to create some screenshots of games loaded from the DB Oct 19 12:09:56 hey Oct 19 12:10:25 guys I've question about saving auth token on android devices Oct 19 12:10:30 tech1: so I'd like to reuse the same routines I have in the view for drawing those and then save them as an image file Oct 19 12:11:08 so basically I want to encrypt my files on sdcard, but I don't think saving the cipher in shared preference is safe Oct 19 12:11:09 tech1: I'm new to Android dev so I accept I might not be going about it in the best way - happy to listen to suggestions of how to structure things better Oct 19 12:13:38 maybe I need to understand drawables better Oct 19 12:13:45 does a view contain a drawable? Oct 19 12:16:45 im not an android expert myself. but it is good practice to seperate the UI and logic code. View is a class used for layout, a drawable is a graphic, so Views can contain drawables Oct 19 12:16:55 maybe someone else can define it better Oct 19 12:18:12 so perhaps I'm better off putting my logic for how to draw my board into a drawable and make the view use that Oct 19 12:18:30 and then for doing the screenshots I just play with a drawable instead of a view Oct 19 12:18:49 you could just have a class callled Board, which draws the grid Oct 19 12:18:54 yeah Oct 19 12:19:02 so Board would extend drawable? Oct 19 12:19:17 if you look up Sudoku or Tic Tac Toe source code, they should provide the best way to do it Oct 19 12:19:24 sure Oct 19 12:19:37 thanks for the help, you've given me some ideas so I'll go and research now Oct 19 12:20:12 sure. just remember im no expert myself but i think what i said makes sense enough Oct 19 12:20:31 yeah, it sounds more sensible than my original thoughts Oct 19 12:20:48 so I'll read up in that direction and see where it takes me Oct 19 12:20:53 thanks again for the help Oct 19 12:59:29 ok so i changed the package name.. and now..im getting a classnotfound error; for some reason it had com.assid.... then again .com.assid..... ; which i cleaned up Oct 19 13:00:37 maybe your manifest still uses the old one Oct 19 13:00:42 or try a full clean Oct 19 13:01:29 i did use the buid from within eclipse as well Oct 19 13:02:25 you could try building with ant from the command line Oct 19 13:02:46 im thinking its something in what im doing Oct 19 13:03:10 either you missed changing the package name on a file... or its an eclipse bug..... i think Oct 19 13:04:08 it dosn't reference any paticular file name in the build error? Oct 19 13:04:38 No Launcher activity found! Oct 19 13:05:18 check the manifest Oct 19 13:06:26 but i have main and launcher in there Oct 19 13:07:55 im not aware of the package name getting cached anywhere besides your source files Oct 19 13:08:23 maybe the old build apk. you could try manually deleting that Oct 19 13:12:41 android automatically generates the navigateUpFromSameTask codeblock for action bar navigation, which is neat... but is there a way to pass some parameters to the activity navigating back up to? Oct 19 13:13:15 Isn't there an intent? (I'm new to this) Oct 19 13:15:17 nope, you only define the parent activity Oct 19 13:18:14 Seems they invented navigateUpTo(Activity, Intent) for that. Oct 19 13:18:38 Either that, or you could slap stuff on the parent's intent, not sure if that's the correct way. Oct 19 13:19:50 Not sure what you're trying to do exactly, though, but maybe writing to persistent storage (e.g. sharedpreferences) and letting the parent activity reload that onResume would be a better pattern. Oct 19 13:27:42 err i forgot . if the emulators' screenshot button doesnt work.. how else can i get a screenshot ? Oct 19 13:45:50 Assid: are you trying to get a screenshot of an emulator or a device? Oct 19 13:46:02 emulator.. nvm.. i got it : Oct 19 13:46:14 just take a system screenshot Oct 19 14:02:44 Comparing strings. The contents of "response" looks like this: OK,1 If I split it by "," I get data[0] = "OK" and data[1] = "0". How would I be able to check so that data[0] actually is "OK"? Oct 19 14:02:58 Doing: if (data[0] == "OK") returns false Oct 19 14:03:05 uh Oct 19 14:03:06 learn java Oct 19 14:03:08 don't use == for strings. Oct 19 14:03:14 you should be asking this in #java Oct 19 14:03:33 Kottizen: heeh, same mistake as me when I fisrt learn java :D Oct 19 14:03:50 lov: That's what I'm trying :p Thanks, .equals() it seems to be Oct 19 14:04:32 and if lazy for null check then put ok first "OK".equal ... Oct 19 14:05:00 Kottizen: Oct 19 14:05:01 http://docs.oracle.com/javase/tutorial/java/index.html Oct 19 14:05:08 http://docs.oracle.com/javase/tutorial/essential/index.html Oct 19 14:05:13 http://docs.oracle.com/javase/tutorial/collections/index.html Oct 19 14:05:18 read (and comprehend) these. Oct 19 14:05:26 lov: cheers Oct 19 14:05:30 for java language specific questions, PLEASE ask in #java. Oct 19 14:11:02 hey Guys, I need some crypto help Oct 19 14:11:21 I want to encrypt my files on sdcard and want to keep the salt on the device itself Oct 19 14:11:50 I was thinking of moving the salt generation logic to an ndk library Oct 19 14:12:26 anybody? Oct 19 14:12:37 uh Oct 19 14:12:39 is there a question? Oct 19 14:12:53 keeping the salt/key in app private storage isn't a bad idea Oct 19 14:13:11 just remember that while using an NDK library raises the technical sophistication required to crack your app, it doesn't make it impossible. Oct 19 14:13:29 In particular, don't forget that crackers can always debug on your java code, including trapping the inputs/outputs of your native library Oct 19 14:14:15 remember that this is a losing game, and your question shouldn't be "how can I stop this" it should be "how much effort should I put into delaying this" Oct 19 14:14:17 lov: yeah, at best it would make it little bit more difficult Oct 19 14:14:51 my suggestion to company was to use AccountManager, but they want to provide offlilne access Oct 19 14:15:11 if I take the server out of the auth, the crypto is anyway broken Oct 19 14:16:27 so I guess by using ndk, the cracker atleast would have to disassemble a c code, given my app is not that famous, I think I would be saved the bother :) Oct 19 14:19:38 brickhead: yeah, that's a reasonable idea. Oct 19 14:20:33 I heard there was some option for encrypting app in Jelly Bean Oct 19 14:21:10 but looks like its making everyone's life miserable Oct 19 14:22:05 is portability the main reason java was chosen for android. because with something like c++, manufacturers would have to build their hardware to stricter standards? (or programmers would need to do a ridiculous amount of work to get their apps running on all devices).... maybe java was the only option for the device range they wanted Oct 19 14:23:14 java was chosen because almost every idiot can program in java :D Oct 19 14:23:16 tech1: see the Google v Oracle lawsuit. Oct 19 14:23:28 Java was chosen because the Android team wanted a reasonable level of sandboxing and portability Oct 19 14:23:53 C++ brings in the problem of having to compile against different hardware Oct 19 14:24:04 i see. yeh thought so Oct 19 14:25:03 also the native library for c++ has been awfully bad Oct 19 14:25:13 *libraries Oct 19 14:25:50 hi! Oct 19 14:28:25 anyone here good with fragment transaction replace? after my app is backgrounded for awhile the last fragment shown becomes stuck behind all the new ones that get added to the stack Oct 19 14:32:29 hy all Oct 19 14:32:35 how can I change the activity's name? Oct 19 14:32:51 gregtom6: in the manifest Oct 19 14:32:54 I mean the name when the activity is the active in the running program Oct 19 14:33:28 the word in the top of the scene Oct 19 14:33:34 *screen Oct 19 14:33:49 Apparently, it is not possible to show / hide the notification bar dynamically, e.g. when a user touches a button. This is weird, because the default gallery app does exactly that - the notification area shows / hides along with the action bar on user tap. Oct 19 14:34:22 the action bar is easy enough with .hide() and .show(), but how to do it with the notification bar? Oct 19 14:34:46 gregtom6: ? Oct 19 14:34:54 Tee_Pee: setFlags() ? Oct 19 14:35:25 brickhead: when you upload a program to the android, you can see there's a word in the top of the screen with blue background Oct 19 14:35:39 that's the name of the activity Oct 19 14:36:25 how can I change that word? because if I change that in the manifest (android:name ) that will give me error Oct 19 14:37:14 leslie - that's the one. Samples I've found also had a requestFeature() line before the setFlags, which crashed the app as that can only be called before adding content. Oct 19 14:37:14 I think that's your app name Oct 19 14:37:18 or is the actionbar title Oct 19 14:37:21 The flags line alone however, worked like a charm Oct 19 14:38:37 when you've created your project you might have given the same name, but that's just a guess Oct 19 14:40:00 gregtom6: it's the label Oct 19 14:40:04 gregtom6: change android:label Oct 19 14:40:39 I'm using a RelativeLayout to overlay a few widgets below each other but when I switch to landscape they overlap .. How can I solve this ? Oct 19 14:42:39 How should I start animation of list item inside a fragment? Although there are lot of similar questions (like this http://stackoverflow.com/questions/2785336/starting-frame-by-frame-animation), the Runnable solution does not work and fragment does not have onWindowFocusChanged nor any explicit notion about list items content? Oct 19 14:43:42 Hi there, I have knowledge in c#/c++/c programming (no java) and would like to develope my first android project. I would like to create my own tcp/ip library which uses threads and queues. However, I don't really know where to start.. my first basic questions are: are signals supported? how can I use the queue class? Oct 19 14:44:37 IalexI: any reason you're reinventing the wheel? Oct 19 14:45:23 leslie, I would like to connect to a server with a custom protocol Oct 19 14:45:46 ah Oct 19 14:45:48 IalexI: http://developer.android.com/tools/sdk/ndk/index.html Oct 19 14:45:56 Android is linux without some standard libraries you're used to Oct 19 14:46:03 take a look at the docs in the NDK for more information. Oct 19 14:46:23 you can absolutely do low level networking stuff. Oct 19 14:46:37 lov, I want to write the code in Java.. it doesn't make sense to do it in c/c++ imho Oct 19 14:47:29 er Oct 19 14:47:33 ok, I'm confused. Oct 19 14:47:51 ok, so you want to create your library in java, not C? Oct 19 14:48:19 a lot of the networking for Android is bog standard J5SE Oct 19 14:48:20 http://developer.android.com/reference/java/net/package-summary.html Oct 19 14:48:35 http://developer.android.com/reference/javax/net/package-summary.html Oct 19 14:48:36 lov, yes, maybe library was the wrong term... a class which handles the communication Oct 19 14:48:59 I THINK that Signals are not supported in Java, but I don't know that for sure. Oct 19 14:49:00 lov, do you know if signals are supported? Oct 19 14:49:08 I'd recommend that you pick up a book on Java networking. Oct 19 14:49:08 Yes, thats what I read, too.. Oct 19 14:49:18 I am right now in a library ;) Oct 19 14:49:18 The overlap between java and android here is going to be significant if not complete Oct 19 14:49:51 How would a async tcp class work without signals? Oct 19 14:50:01 Is there anything which is used instead in Java? Oct 19 14:50:04 generally it wouldn't :) Oct 19 14:50:16 Java tends to not use polling for networking Oct 19 14:50:29 instead everything tends towards being synchronous. Block till you drop. Oct 19 14:50:43 You MAY wish to ask about java support for this in #java Oct 19 14:50:51 there will be some neckbeards in there who can talk your ears off Oct 19 14:51:17 Well, blocking IO wouldn't be the problem.. Oct 19 14:51:34 I just don't know how to notify another thread about new messages in the queue Oct 19 14:52:05 oh haha Oct 19 14:52:10 that's a totally different beast, I misunderstood. Oct 19 14:52:38 There's a plethora of multithreading, mutex, etc tools you can use Oct 19 14:52:58 quick question, I have an app that I am working on, and my friend made an alert box for users to enter in a password. He correctly hid the password being entered, but the keyboard still shows suggestions. Oct 19 14:53:08 Stuff like Oct 19 14:53:09 http://developer.android.com/reference/java/util/concurrent/SynchronousQueue.html Oct 19 14:53:25 agargiulo: there's a flag for no suggestions in the keyboard. Oct 19 14:53:46 yeah, I know how to do it if the textbox is defined in XML Oct 19 14:53:52 he defined it in code Oct 19 14:53:57 and I can't figure it out Oct 19 14:54:08 lov, its too bad that the android docs don't really have examples :) Oct 19 14:55:19 IalexI: It's not really android specific. Oct 19 14:55:31 At this point it's really bog standard java multithreading practices Oct 19 14:55:56 agargiulo: the xml stuff has java code backing... Oct 19 14:56:05 lov, could you show me how to use "queue" with a custom class as elements? Oct 19 14:56:53 lov: do you know what that is though? Oct 19 14:56:53 uh, sure? Oct 19 14:57:00 Lets stick with the SynchronousQueue Oct 19 14:57:24 SynchronousQueue syncQueue = new SynchronousQueue(); Oct 19 14:57:31 perform method calls as desired Oct 19 14:57:34 boil Oct 19 14:57:43 serves 1+ consumers Oct 19 14:58:15 IalexI: Again, I'd REALLY recommend that you take the java specific questions to #java. They're really good at this to the point of having standard "fuck off and read this link" answers. Oct 19 14:58:34 agargiulo: If he correctly hid the password, then the keyboard shouldn't show suggestions.. If it does, then the keyboard is bugged.. The stock android one doesn't Oct 19 14:59:24 SimonVT: the stock shows the suggestions Oct 19 14:59:28 so he did it wrong Oct 19 14:59:31 /* Oct 19 14:59:38 It'd be relevant to know how he did it Oct 19 14:59:43 one sec Oct 19 14:59:47 http://pastie.org/5084436 Oct 19 14:59:51 SimonVT: ^^ Oct 19 14:59:59 line 13 Oct 19 15:00:19 lov, unfortunately, I got disconnected.. did you write an example? Oct 19 15:00:29 Yeah, that's not correctly Oct 19 15:00:35 SimonVT: I am aware Oct 19 15:00:39 Either android:inputType="textPassword" Oct 19 15:00:44 Or set the same inputtype in code Oct 19 15:00:55 The keyboard doesn't know about your custom transformations Oct 19 15:00:56 I know I need input.setInputType(...); but I don't know what goes in that ... Oct 19 15:01:09 InputType.THE_ONE_WITH_PASSWORD_IN_THE_NAME Oct 19 15:01:17 ah okay Oct 19 15:01:18 thanks Oct 19 15:01:29 textPassword 0x00000081 Text that is a password. Corresponds to TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_PASSWORD. Oct 19 15:01:59 thanks Oct 19 15:02:52 IalexI: not really. Oct 19 15:02:57 10:57:50 < lov> SynchronousQueue syncQueue = new SynchronousQueue(); Oct 19 15:03:00 10:57:57 < lov> perform method calls as desired Oct 19 15:03:01 10:58:01 < lov> boil Oct 19 15:03:01 10:58:10 < lov> serves 1+ consumers Oct 19 15:03:04 10:58:41 < lov> IalexI: Again, I'd REALLY recommend that you take the java specific questions to #java. They're really good at this to the point of having standard "fuck off and read this link" answers. Oct 19 15:04:15 lov, will do, thank you.. btw, your example really helped me ;) I have searched google for almost 30 minutes.. Oct 19 15:04:24 lov, it looks like a c++ template Oct 19 15:05:45 IalexI: they're called "generics" Oct 19 15:06:07 they're not the same as C++ templates; it's more of a compile time static typing and error check Oct 19 15:06:33 see http://docs.oracle.com/javase/tutorial/extra/generics/index.html Oct 19 15:06:58 SimonVT: so setting the InputType made the keyboard stop suggesting things, but now the edittext object is showing the password Oct 19 15:07:34 oh wait, nevermind Oct 19 15:07:44 does anyone have a suggestion for a good third-party network library for android? Oct 19 15:10:50 lov, can you recommend any android/java book (do you really think it makes sense to study a java book for android programming..)? Oct 19 15:12:05 it depends on the java book, but yes, it absolutely makes sense. Oct 19 15:12:29 generally books that focus on writing aspects like multithreading or networking are important. Android is a platform, not a language. Oct 19 15:12:31 IalexI: I think it make sense to learn java if you wanna go for android Oct 19 15:12:57 Java has a lot of patterns for how you do things the java way. android does things the java way. You'll be better off for learning it, I imagine. Oct 19 15:13:05 take a look at http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601 Oct 19 15:13:05 hoangtran, I think its not too far away from c# Oct 19 15:13:41 c# definitely took a lot from java, but they're not really the same beast. You'll have a jumpstart on a lot of things, but be careful of differences. Oct 19 15:13:59 see also http://stackoverflow.com/questions/1237980/java-5-concurrency-book-recommendations Oct 19 15:14:22 IalexI: Java is pretty similar to C#. I'd say that C# is Java with 10 years of hindsight, so there might be some frustrating things with Java that could be done easily in C#. Oct 19 15:15:02 lov, I am just afraid that I will indeed reinvent the wheel, if I take a java book for android development Oct 19 15:15:04 I bet his first mistake is about comparing string with == :p Oct 19 15:15:19 SimonVT: so, another question. How come when I set android:inputType="textPassword" in the XML it takes care of both the suggestions and the visable text, but just input.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD) doesn't? Oct 19 15:15:20 Its clear to me, that java is the language used, but the google api is quite powerful I guess Oct 19 15:17:27 SimonVT: oh wait, got it working Oct 19 15:19:36 Is there a control/widget which creates a list with speech bubbles comparable to whatsapp? Oct 19 15:20:26 speech bubbles is a custom resource you'd have to do yourself. Oct 19 15:20:48 You might want to look at http://developer.android.com/training/index.html before you go any further UI wise Oct 19 15:21:05 Maybe there is an opensource resource, which I could use Oct 19 15:22:28 I am talking about the listview which you see in whatsapp dialogs Oct 19 15:23:31 How can I programmatically add views to my arrayadapter layout? Oct 19 15:24:41 friends, countrymen, i ask again; is there any way to save myself from the hell of having to concatenate thousands of tiny strings together to build a sqlite database? Oct 19 15:26:00 Escherial: a lot of the query commands accept templated queries (x=?) and take a string array Oct 19 15:26:05 Escherial: but essentially... no. Oct 19 15:26:44 Escherial: create your own query builder utility class Oct 19 15:30:39 how can I insert an image in an imagebutton? Oct 19 15:31:05 Escherial: Ormlite? Oct 19 15:32:17 how can i check if a bitmap is currently cached in an lru cache? Oct 19 15:32:20 is there any way Oct 19 15:35:06 lov, dragorn: thanks for the input. building a query builder might not be a bad idea, but the last time i did it felt like i was reinventing the wheel Oct 19 15:35:31 i feel like there should be some kind of compromise between messing with strings yourself and some relatively heavy feature-full orm Oct 19 15:41:19 i'm having trouble getting dividers in ABS Oct 19 15:41:35 dividers between my ActionItem icons Oct 19 15:46:04 i'm having trouble getting dividers in ABS, can someone check it out ? Oct 19 15:46:04 http://pastebin.com/kYJd6Rw1 Oct 19 15:46:17 Could someone explain (or point me to a link) how to programmatically add views to a layout in an arrayadapter? Oct 19 15:46:18 i'm adding my actionitems to my menu programatically Oct 19 15:47:08 Sezerza i think you should inflate the listview or element you would like to add them into Oct 19 15:48:34 can anyone show me to a tutorial that explains what ORM is ? Oct 19 15:48:40 basics are preferrable Oct 19 15:54:49 wow, i just reduced heap size by 8 mb, by recycling my bitmaps when views are recycled after checking thats its no longer in my lrucache Oct 19 15:54:53 huuuge improvement Oct 19 15:56:43 What happens if I give the same android:id to 2 UI elements in different layouts ? Oct 19 15:57:36 They both get the same id Oct 19 15:57:55 * Gx4 Have a nice weekend all! :) Oct 19 15:58:00 SimonVT: so which one is called when I use findViewById ? Oct 19 15:58:15 The first one it finds in the activitys view hierarchy Oct 19 15:58:43 SimonVT: the activity's view hiearchy is defined through setContentView(R.layout.foo) ? Oct 19 15:58:53 That's one way, yes Oct 19 15:58:58 JakeWharton are you around ? Oct 19 15:58:59 SimonVT: I see .. thanks a lot Oct 19 15:59:12 intermittently Oct 19 15:59:22 JakeWharton is it true that i can't have dividers between two actionitems ? Oct 19 15:59:38 the system chooses whether or not a divider is needed Oct 19 15:59:46 i have 2 icons and i'd like a divider at the left of each Oct 19 16:00:03 icons are implicitly separated Oct 19 16:00:10 if you have one icon and text it'd use a divider Oct 19 16:00:16 if you had two text items, it'd have a divider Oct 19 16:00:21 it only puts dividers between icon and text ,yeah Oct 19 16:00:33 argh Oct 19 16:00:38 that's just the behavior of the platform Oct 19 16:00:47 so what's the way to go? make a custom layout ? Oct 19 16:00:54 Don't fight the platform Oct 19 16:01:00 lol Oct 19 16:01:08 its my fk'n boss... Oct 19 16:01:14 +1 Oct 19 16:01:23 use an actionItemBackground that has a divider Oct 19 16:01:50 ah nice Oct 19 16:01:55 how do i get one of those Oct 19 16:02:18 You make one Oct 19 16:02:21 make it or bug a designer Oct 19 16:06:07 ok so i add @drawable/abs__item_background_holo_dark to my "actionBarStyle" ? but how do i add a divider to it ? Oct 19 16:06:34 you make an asset which has a divider on it Oct 19 16:09:38 an actionBarDivider, VerticalDivider o plain divider ? Oct 19 16:10:11 i want the kind that shows between the action items in ABS Demo Oct 19 16:10:21 I've set 'background="@drawable/appbg"' in my and I can see the background in Eclipse's WYSIWYG editor. However, when I run the app on my phone I don't see the background. What have I done wrong? Oct 19 16:11:34 hey guys trying to use gps, on teh emulator it crashes saying network provider doesn not exist ? Oct 19 16:15:56 Can somebody tell me why I have this thick black frame around my dialog window? picpaste.com/2012-10-19_12-11-58-4pznPEVo.png Oct 19 16:21:56 Can somebody tell me what may cause this ugly black backdrop on my dialog? http://picpaste.com/2012-10-19_12-11-58-4pznPEVo.png Oct 19 16:25:34 Anybody? Oct 19 16:26:01 qkzoo1978: if anyone had an answer, they would have provided it. Oct 19 16:26:05 check hierarchyviewer Oct 19 16:26:15 also, posting a screenshot without any source code isn't very helpful Oct 19 16:28:23 I have put a spinner in my layout xml and I want its width to be wrapped depending on its content. that's why i did android:layout_width="wrap_content". I run my project in four devices with systems 2.2, 2.3, 3.2 and 4.0. In the 2,2 and 2.3 devices, when user opens the spinner the width is expanding to all the screen. Can anybody help me to solve this? Oct 19 16:35:49 put it in some container and wrap_parent Oct 19 16:35:59 see the SDK samples Oct 19 16:36:07 lots of things you can do Oct 19 16:36:22 grothendieck will this solve the problem? Oct 19 16:36:32 One way to find out Oct 19 16:36:46 isn't there any property that can set the width when the spinner is open? Oct 19 16:37:06 Of course... Oct 19 16:37:53 See the XML attributes for the android.view.View class Oct 19 16:37:58 which Spinner inherits Oct 19 16:38:12 I would set width to fill_parent and height to wrap_content Oct 19 16:38:23 but the effect this will have depends on what the parent view is... Oct 19 16:38:57 thank you grothendieck i will try it and inform you Oct 19 16:39:56 you can also see dropDownWidth attribute for the Spinner class Oct 19 16:40:10 developer.android.com/reference/android/widget/Spinner.html Oct 19 16:40:13 see the XML attributes Oct 19 16:40:52 good luck Oct 19 16:41:40 Can somebody tell me what may cause this ugly black backdrop on my dialog? http://picpaste.com/2012-10-19_12-11-58-4pznPEVo.png CODE http://pastebin.com/4sWn5dkP Oct 19 16:41:56 I included code this time :) Oct 19 16:42:37 qkzoo1978: did you check hierarchyviewer? Oct 19 16:42:48 I'd be more worried about the ugly stuff behind the dialog Oct 19 16:43:13 Anyway, looks like the default dark theme background.. So you probably forgot to remove it somewhere in your style Oct 19 16:43:43 qkzoo1978: if I had to guess, it's your 15dp of padding Oct 19 16:43:59 grothendieck thank you very much. I didn't know about dropdownwidth. although I tried it as android:dropdownwidth="wrap_content" still is not working Oct 19 16:44:12 okay Oct 19 16:44:14 Maybe android:windowBackground Oct 19 16:44:17 so what does wrap_content do? Oct 19 16:44:21 I removed the padding and its still there, just left over from debuging Oct 19 16:44:59 hey guys trying to use gps, on teh emulator it crashes saying network provider doesn not exist ? Oct 19 16:45:21 background looks for drawable, what is soething "plain" I could use there? Oct 19 16:45:31 windowBackground Oct 19 16:46:16 I figure im missing a setting or need to setup my emulator differently ? Oct 19 16:46:51 grothendieck the width will be depended based on the width of the content. but the width (only when the spinner is open), fills all the screen's width. this happens only on 2.2 and 2.3 android Oct 19 16:48:40 You can also scale the view Oct 19 16:48:44 or set width to wrap parent Oct 19 16:49:01 or see the SDK samples as I suggested Oct 19 16:49:06 Will hierachyviwer run on linux? Oct 19 16:49:17 all the sdk tools run on Linux Oct 19 16:49:34 (AFAIK, I haven't tested them all recently...) Oct 19 16:49:38 cool Oct 19 16:49:39 qkzoo1978: yes. Oct 19 16:49:47 Does SDK work on FreeBSD? Anybody tried it? Oct 19 16:49:57 grothendieck that's what I am doing now. thank you for all Oct 19 16:50:04 cool, good luck Oct 19 16:50:05 hey guys trying to use gps, on teh emulator it crashes saying network provider doesn not exist ? ? Oct 19 16:50:16 do i need to enable that some how ? Oct 19 16:50:22 Drumer306_: I believe this is explained somewhere in the fine manual Oct 19 16:50:45 grothendieck: didnt see anything in the docs about location and sensors Oct 19 16:50:50 so if its not there... Oct 19 16:51:02 Did you add permissions? Oct 19 16:51:06 pass the -gps option to emulator Oct 19 16:51:07 http://developer.android.com/tools/help/emulator.html Oct 19 16:51:20 http://wiki.qemu.org/download/qemu-doc.html Oct 19 16:51:22 Instantiated an org.apache.http.client.DefaultHttpClient - when I call execute(new HttpGet("http://cluon.com/~lawrence/message.txt")) it throws an exception "Unable to resolve host "cluon.com": No address ...." Oct 19 16:51:54 (running in the emulator) ... however other network-aware apps in the emulator work correctly. Am I instantiating the wrong class? Oct 19 16:52:04 grothendieck: will that crash on the users phone ? Oct 19 16:52:15 what? Oct 19 16:52:19 I assume i should catch any exceptions Oct 19 16:52:34 the locationManager Oct 19 16:52:41 You want to use GPS in the emulator..how are you going to simulate GPS without a GPS? Oct 19 16:52:59 There is a way to emulate a GPS...but you have to set this up and tell the android emulator to use this virtual GPS Oct 19 16:53:09 You can feed it coordinates Oct 19 16:53:14 This has absolutely nothing to do with what happens on the phone Oct 19 16:53:20 This is a parameter that QEMU takes Oct 19 16:53:23 does wifiInfo.getIpAddress(); work for getting the ip address when you're on the cell network too? Oct 19 16:53:26 or is just wifi? Oct 19 16:53:31 So you can test how the app will respond to GPS Oct 19 16:55:26 Thanks for your help folks. Oct 19 16:55:57 np Oct 19 16:56:37 grothendieck: I guess im wondering why it crashes right away when requesting requestLocationUpdates(LocationManager.NETWORK_PROVIDER Oct 19 16:56:45 and wondering if that's normal behavior Oct 19 16:57:04 more data - on a real device, I get a "permission denied" exception Oct 19 16:57:19 which makes me think I need to read up on "application permissions" Oct 19 16:57:25 n1gak: do you have internet permission? Oct 19 16:57:29 n1gak: you need a permission to access wifi state Oct 19 16:57:37 Does it work ok if you use FINE instead of NETWORK? Oct 19 16:57:50 Drumer306_: wrap that code in a try { } catch { } block Oct 19 16:58:16 and write the exception stack trace to log Oct 19 16:58:25 then you will know why it is crashing Oct 19 16:58:33 @Leeds - no, it's got "storage" and "Phone Calls" (!) Oct 19 16:58:48 n1gak: that'd be why then... Oct 19 16:58:55 target android 1.5 as minversion ==> phone calls by default Oct 19 16:58:59 anyway Oct 19 16:58:59 later Oct 19 16:59:00 grothendieck: its crashing saying "requested network provider does not exist" Oct 19 16:59:15 Drumer306_: gotta go, sorry -- Google it?! Oct 19 16:59:21 i did :( Oct 19 16:59:28 thanks anyway Oct 19 16:59:28 you need coarse network permission Oct 19 16:59:45 qkzool1978: i have : android.permission.ACCESS_FINE_LOCATION Oct 19 16:59:47 in my manifest Oct 19 16:59:56 How do I "ask" for that permission? Some attribute in AM.xml Oct 19 17:00:10 (AM = AndroidManifest) Oct 19 17:01:03 n1gak: there's lots of documentation about this... Oct 19 17:01:11 at ... ? :) Oct 19 17:01:30 I'm at http://developer.android.com/guide/topics/manifest/manifest-intro.html Oct 19 17:01:44 ha-HAH Oct 19 17:01:56 Thanks guys -- off to read a bit Oct 19 17:02:12 also http://developer.android.com/guide/topics/security/permissions.html Oct 19 17:02:13 Ah Oct 19 17:02:24 is there just something inherently incompatible about using an ORM with a cursor loader? Oct 19 17:02:26 so its crashing because im requesting getLastKnownLocation Oct 19 17:02:26 Thanks, Leeds Oct 19 17:02:45 i guess i could get at the database directly for the cursor loader stuff and use the ORM for convenience... Oct 19 17:04:37 did you get an answer Oct 19 17:04:57 n1gak: Oct 19 17:06:03 yes, qkzoo1978? Oct 19 17:06:33 ok Oct 19 17:07:22 qkzoo1978: Yes , I've gotten enough of an answer that I can do my own research Oct 19 17:07:36 ok Oct 19 17:09:23 and it works - Oct 19 17:10:12 what does sending a geo fix supposed to call back ? Oct 19 17:10:27 im sending it, but nothing is triggering my app, i have the location listener overrides Oct 19 17:10:40 Drumer306_: you're not going to get anything interesting using the emulator. Oct 19 17:10:46 you're supposed to get periodic location update callbacks Oct 19 17:10:57 you'll also get callbacks saying that the GPS is enabled, etc. Oct 19 17:11:01 go find a device and test on that. Oct 19 17:11:24 lov: eventually thats the plan, but sending a geo fix in the console i thought was supposed to update the location Oct 19 17:11:33 yeah I have no idea if that one actually works at this point. Oct 19 17:11:37 haha Oct 19 17:11:38 k Oct 19 17:11:53 How do I get rid of the top bar containing the icon, the app's name and the (empty) menu? http://katja.kottnet.net/phone/2012-10-19_19-05-59.png Oct 19 17:12:49 That's the ActionBar. Generally, you don't want to get rid of it. Oct 19 17:13:28 specify no title in your theme? Oct 19 17:13:29 Kottizen: requestWindowFeature (Window.FEATURE_NO_TITLE); Oct 19 17:13:38 I think... Oct 19 17:13:48 Ah, so that's what the ActionBar is... Thanks! I'd like to get rid of it for the login screen, but have one once signed in. Now I know where to look, and I'll try your example too - DeviantPeer, thanks! :) Oct 19 17:14:10 Kottizen: http://developer.android.com/guide/topics/ui/actionbar.html#Removing Oct 19 17:17:25 how can I set that the graphical layout put the buttons in the right place where I want? because it watches the other button's places, so the graphical layout is unusable Oct 19 17:17:38 I don't know who had this absolutely stupid idea Oct 19 17:18:25 Is there a noticable difference concatenating strings using "+" vs stringbuilder? e.g, prepring a string to write xml to file? Oct 19 17:18:32 The absolutely stupid idea is defining absolute positions for your views Oct 19 17:18:37 Not all screens are the same size Oct 19 17:19:17 SimonVT: well, but can I change that? to watch only the position to margins Oct 19 17:19:33 qkzoo1978: if you decompile your code, you'll see that when you use +, it just uses a stringbuilder Oct 19 17:19:41 I meant difference in performance. Oct 19 17:20:05 is there anyway to get the ip address programmatically when your on a cell network? Oct 19 17:20:10 SimonVT: that's a bad idea, because it should only watch how far are the margins Oct 19 17:20:24 So that would probably be a no then. Oct 19 17:20:31 qkzoo1978: Strings are immutable. Building strings in a for loop requires creating lots of new strings. That's why that method would be slower. Benchmark it. Oct 19 17:20:33 There is a difference in performance Oct 19 17:20:47 gregtom6: So set some margins Oct 19 17:20:58 13:18:53 < qkzoo1978> Is there a noticable difference concatenating strings using "+" vs stringbuilder? e.g, prepring a string to write xml to file? Oct 19 17:21:02 there are some margins originally Oct 19 17:21:07 iirc, it creates a new stringbuilder per + Oct 19 17:21:07 SimonVT Oct 19 17:21:10 Using + involves creating a stringbuilder for every statement where you do it. Oct 19 17:21:24 String src = ""; for(int i = 0; i < 1000; i++) { src = src + i + "\n"; } Oct 19 17:21:34 That involves making 1000 stringbuilder instances and 1000 new strings Oct 19 17:22:00 ooh, nice Oct 19 17:22:02 StringBuilder src = new StringBuilder(); for(int i = 0; i < 1000; i++) { src.append(i); src.append("\n"); } src.toString(); Oct 19 17:22:12 that is functionally identical, but without the overhead. Oct 19 17:22:39 hadees: you can get an ip address but that won't be the external ip address that the world sees. Oct 19 17:22:48 That IP address is further up the line Oct 19 17:23:26 I get it now. stringbuilder good, especially in loops Oct 19 17:23:37 how can I set to not refer any other buttons in graphical layout? Oct 19 17:23:52 it should refer only to margins Oct 19 17:25:11 Your views should be positioned relative to other views Oct 19 17:25:14 You can add margins if you want Oct 19 17:25:17 hello, I was wondering what sort of problems would occur if an async task held a reference to a handler which was a member of an activity that was destroyed. I remember reading that if an async task held a reference to an activity that it may cause a memory link because it had nothing to return to Oct 19 17:25:53 Your activity wouldn't be gc'd if there's still references Oct 19 17:26:10 SimonVT: so then a memory leak would still occur then Oct 19 17:26:11 crud Oct 19 17:27:02 SimonVT: what margins are you talking about? Oct 19 17:27:15 View margins Oct 19 17:27:29 I remember reading that you can tell the asynctask to cancel, how could that be done in the case of a one shot task such as reverse geolocation of one set of coordinates? Oct 19 17:27:49 the guide mentions something about testing isCancelled periodically but i dont know how that would be possible in my case Oct 19 17:28:04 If it's not, then you can't really tell it to cancel Oct 19 17:28:31 spockocktoid: just don't deliver the response if it's been cancelled Oct 19 17:28:43 spockocktoid: if you interrupt the thread, you can call Thread.interrupted() Oct 19 17:28:57 that way you don't have to have a reference to the async task Oct 19 17:28:59 http://developer.android.com/reference/java/lang/Thread.html#interrupted() Oct 19 17:29:08 lagann: thanks ill have a look Oct 19 17:29:28 evancharlton: i would but that requires me to check if the task is cancelled which is a little hard to do in the case i described above for the process of one item Oct 19 17:29:34 the guide mentions checking it in a loop Oct 19 17:36:42 I have a Model that has a ForeignKey(User) .. How can I add a search_field to my ModelAdmin that searches for User.__unicode__ ? Oct 19 17:38:12 CVirus: what does this have to do with Android ... ? Oct 19 17:38:24 evancharlton: wrong channel .. sorry :s Oct 19 17:42:38 How can I make an app that will login in a site and launch the browser (already logged in)? I've thought in making a post request and openning the browser with an intent but that won't keep the cookies Oct 19 17:43:03 CVirus: can you search on a callable? Oct 19 17:43:14 is there anyway to just get month and year for the datepicker? Oct 19 17:44:33 Leeds: LOL .. this is #android-dev not #django :-p Oct 19 17:44:40 ;) Oct 19 17:46:22 lol ;) Oct 19 17:46:42 anywayz, i decided just to popup a dialog Oct 19 17:49:33 SrPx: your best bet is probably to use an activity with a WebView or a WebViewFragment and handle the cookies/etc yourself. Oct 19 17:51:33 so I'm getting the old "Unable to find explicit activity class" FC with a SherlockPrefenceActivity. it's declared in the manifest, has a sherlock theme, etc. Any ideas on what the cause could be? Oct 19 17:51:51 lov: Hmm I see. Is this complicated? I've never made an app Oct 19 17:52:20 >_< Oct 19 17:52:35 I'm going to just say "yes" Oct 19 17:52:56 http://developer.android.com/training/advanced.html Oct 19 17:52:59 start there. Oct 19 17:53:10 actually Oct 19 17:53:11 http://developer.android.com/training/index.html Oct 19 17:53:12 start there Oct 19 17:53:35 see also http://developer.android.com/guide/webapps/index.html Oct 19 17:54:55 lov: oh god. But I'm an experienced programmer does that help? If I just had an overview of the structure of the app development environment that would be enough Oct 19 17:55:34 you're cordially encouraged to click on any of those links. Oct 19 17:55:45 SrPx: the last one that talks about webapps is probably your best bet Oct 19 17:55:47 I am reading the last one now Oct 19 17:55:55 heh Oct 19 17:57:12 I can just make a site in javascript that does what I want and create an icon to launch it like if it was an android app, is that possible? Oct 19 17:57:37 "yes" Oct 19 17:57:41 it's gonna perform like ass though. Oct 19 17:58:14 and probably look like mangled diseased fatass as well Oct 19 17:58:30 note that this is for someone else's site Oct 19 17:59:30 lagann: sorry for the late reply i got dc'd. i don't have a reference to the asynctask. it's an anonymous asynctask that is instantiated when the locationlistener receives a new location Oct 19 18:00:52 spockocktoid: and you want to know if its canceled? Oct 19 18:02:24 yes. I'm essentially using the same code this guide: from http://developer.android.com/training/basics/location/geocoding.html . However instead of using a handler I just implemented the "onPostExecute" function, however I think I may just use a handler Oct 19 18:02:44 lagann: ^^ (sorry i forgot to highlight you) Oct 19 18:06:49 lagann: i realize that in order to send the asynctask a cancelled message i would have to hold a reference to it and call cancel on stop the problem is within the asynctask where i have to check iscancelled Oct 19 18:07:08 since its a one item task i cant really test that Oct 19 18:07:09 spockocktoid: and you want to have it "quit" trying to get location, correct? Oct 19 18:08:46 lagann: quit and let go of any reference it may have to the activity Oct 19 18:09:34 can you change a layout ? for example i am loading some data from a webservice, if it fails , i want to display a status message and change the layout Oct 19 18:09:39 i guess i could use a timeout but im not sure what kind of time would be reasonable Oct 19 18:09:53 i dont even know how viable that would be Oct 19 18:10:10 spockocktoid: well, unfortunately, android has deprecated any way for you to stop a thread, so you have to let getFromLocation finish before you do anything Oct 19 18:10:24 spockocktoid: i've had this same problem multiple times Oct 19 18:10:28 hi. if i've to get latitude and longitude from an addreess i need that the android device is connected to the internet? Oct 19 18:11:06 man that's spells trouble if something like a phone call interrupts the activity Oct 19 18:11:31 would a timeout be at all viable? Oct 19 18:11:34 well, what you can do is check after getFromLocation finishes Oct 19 18:11:38 and you can't do a timeout Oct 19 18:11:46 brb Oct 19 18:11:50 there's pretty much no way to stop it short of killling the process Oct 19 18:12:38 LucaS05: sure, you need to somewhere be able to look up in a database of addresses, i.e. via the Google Maps API Oct 19 18:13:06 you can get your own lat/lng from the GPS, but not from some address Oct 19 18:13:24 lagann: i see, btw thanks for your help so far Oct 19 18:13:46 ok. i'm new to android but i have tought that an internet connection is needed. anyway i'm plannig to use the Geocoder class Oct 19 18:13:49 whats the best way to switch views ? if there is a status update form the server i want to display the text, and remove the listview Oct 19 18:13:56 is right? Oct 19 18:14:08 LucaS05: yes you need internet permissions for geocoder Oct 19 18:14:15 spockocktoid: yeah, it's pretty retarded. you can see all the deprecations around this spot http://developer.android.com/reference/java/lang/Thread.html#stop() Oct 19 18:14:47 Drumer: view.removeView or something, just look at the docs for View Oct 19 18:15:36 sampullman: its more i want to hide it ? Oct 19 18:15:38 thanks spockockto lagann Oct 19 18:15:45 so listview hide, textview show Oct 19 18:15:57 so they would be laid out on top of each other really Oct 19 18:16:02 listview.setVisibility(View.GONE) Oct 19 18:16:26 whats the proper way to layout views on top of each other ? ive only used linear layout ? Oct 19 18:16:29 or relative Oct 19 18:16:34 i just told you Oct 19 18:16:45 View.GONE causes the view to take up no space Oct 19 18:16:58 right.. Oct 19 18:17:06 but wouldnt i have to have both views in my layout file Oct 19 18:17:06 so another view can "appear" where it used to be Oct 19 18:17:19 of course, unless you did it programmatically Oct 19 18:17:36 start one as "gone", and the other "visible", then switch Oct 19 18:17:41 soahhh Oct 19 18:17:43 i see Oct 19 18:17:46 okay thanks let me try that Oct 19 18:18:18 another option is addView/removeView Oct 19 18:20:49 out of curiosity what happens when an asynctask tries to update a ui item of an activity that has been stopped Oct 19 18:21:09 badness Oct 19 18:21:33 its a little hard to test but would it just throw some sort of exception? Oct 19 18:21:57 i would hope so Oct 19 18:22:13 spockocktoid: what you should do is after getFromLocation is finished you should check isCanceled Oct 19 18:22:34 spockocktoid: also, keep a reference to the asyncTask, and when onStop is called, call cancel on the asynctask Oct 19 18:22:49 spockocktoid: when you do this, onPostExecute isn't called Oct 19 18:23:04 lagann: ah ok. awesome ill go ahead and do that. thanks Oct 19 18:23:04 that way, you won't end up updating the UI Oct 19 18:23:31 heh, threaded programming on android is pretty crazy stuff Oct 19 18:23:47 is actionbarsherlock still necessary since the introduction of the support/compatibility library? Oct 19 18:24:13 it seems like the new android project template gives you an actionbar for free now, which i assume is compatible with my minSdkLevel of 8 Oct 19 18:24:18 spockocktoid: yeah, it's a major pain in the ass. Oct 19 18:24:34 seems that it added the support library to my project by default, too Oct 19 18:24:46 Escherial: you still need actionbar sherlock. the support library still doesn't have an actionbar Oct 19 18:25:12 It's included for fragment support, isn't it? Oct 19 18:26:11 ABS is a wrapper for the support action bar Oct 19 18:26:17 much better Oct 19 18:26:33 Does anyone know of a TextView class that will resize the text based on how much space there is? Oct 19 18:26:47 TextView Oct 19 18:27:09 it will change fontsize based on width? Oct 19 18:27:23 oh, i thought you meant resize the view Oct 19 18:27:31 no, you would have to subclass TextView Oct 19 18:27:44 yeah, I was hoping someone already did :) Oct 19 18:28:01 Ankhwatcher: no, there's no actionbar in the android support library: http://developer.android.com/reference/android/support/v4/app/package-summary.html Oct 19 18:28:05 and if i want to check if i'm near a certain latitude and longitude? Oct 19 18:28:12 lagann: ah, huh. Oct 19 18:28:18 thanks Oct 19 18:28:31 droidparts looks like a somewhat promising ORM; i like the injection stuff, seems useful Oct 19 18:28:32 lagann: I never said there was. Oct 19 18:28:45 theTerry: google is your friend Oct 19 18:28:46 http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds/5535672#5535672 Oct 19 18:29:31 yes, I have googled, and I have even used that class from stackoverflow. I just wanted to ask the community at large to see if I was missing something, thanks Oct 19 18:30:58 Ankhwatcher: my bad Oct 19 18:33:36 is the Location class good enough? Oct 19 18:35:37 strange, i can't seem to import the version of ActionBarSherlock i cloned from github as a project in eclipse, despite what the documentation says Oct 19 18:35:45 perhaps i should download the zip instead :x Oct 19 18:38:38 hmm, zip downloaded, no dice :\ Oct 19 18:40:50 I'm implementing a "Login with Google" button in my application .. I was wondering how can I retrieve the user's phone number and address after I got the auth token ? Oct 19 18:41:22 CVirus: grab it from oauth Oct 19 18:41:28 evancharlton: how Oct 19 18:42:18 so I have a url like http://foobar.com:8007/cpi/event and i'm trying to use webview postUrl but nothing happens when I use a port. I even overrode onReceivedError to log errors and I got nothing. Oct 19 18:42:23 with out the port it works fine Oct 19 18:43:45 CVirus: provide it in the scope Oct 19 18:43:58 CVirus: probably something in the userinfo namespace Oct 19 18:44:05 how do i run a function independent of activity after completing an asynctask Oct 19 18:44:08 evancharlton: can you link me to something to read ? Oct 19 18:44:24 suppose i am uploading image and want to keep track of the upload completion in database Oct 19 18:44:37 CVirus: well, I gave you all the terms to search for Oct 19 18:44:38 but don't want to depend on lifecycle of activity Oct 19 18:44:43 but here: https://developers.google.com/accounts/docs/OAuth2Login Oct 19 18:44:50 looks like you can't get phone number and address, though Oct 19 18:45:01 evancharlton: exactly :S Oct 19 18:45:20 Ask your users Oct 19 18:45:22 evancharlton: same thing with facebook Oct 19 18:45:31 "Hey, enter your phone number and address" Oct 19 18:45:35 CVirus: you can get access to contacts; maybe you can search their contact list for the "me" profile? Oct 19 18:45:45 evancharlton: I was just thinking the same Oct 19 18:46:00 evancharlton: thanks a lot :-) Oct 19 18:50:16 hey guys, I'm trying to make my app support different themes and I've run into an issue. When the user selects a theme, the currentactivity is .finish()ed and the activity relaunches and applies the theme in the beginning. Now if my user goes back to the previous activity (onResume(), obviously), the theme isn't applied until the app restarts. What is the best way around this? Oct 19 18:54:22 Restart all your activities Oct 19 18:54:26 How? Oct 19 18:54:45 No idea Oct 19 18:55:00 You can also just take them to the start activity and clear the stack Oct 19 18:55:07 ninjai: it's not easy, i did it using a pretty complex method Oct 19 18:55:21 hm Oct 19 19:03:02 I just ended up shooting the user back to the main activity, which was finished, then used flag activity clear top Oct 19 19:06:29 ninja: that works Oct 19 19:06:35 ninjai* Oct 19 19:14:57 I use a translation animation using XML. But after the animation is completed, the view reverts to its original position. How can get rid of this? Oct 19 19:16:43 animation.setFillAfter(true) Oct 19 19:16:50 or the corresponding xml attr Oct 19 19:17:04 note that it won't move the clickable area, etc Oct 19 19:18:05 sampullman: ok let me try this Oct 19 19:20:55 sampullman: thanks it works Oct 19 19:28:56 hi, i have code, which i change default language in my app. But when i change the activity, my setting are forgeting. I must every time, when the activity is open change the default language? Oct 19 19:33:41 mfratczak: Why not add standard language support to your app? Oct 19 19:37:58 i want give posibility change language, becouse sometimes people have english [default language] in phone, but want have other language app Oct 19 19:45:45 romainguy: perhaps you could pass this on to reto: http://www.h-online.com/security/news/item/Encryption-found-insufficient-in-many-Android-apps-1732847.html Oct 19 19:46:15 sounds like a good blog post / section under d.android.com / Distribute / App Quality Oct 19 19:50:11 sameone can me help with that language? :) Oct 19 19:52:20 mfratczak: you generally want to use the same language that the device is in. Oct 19 19:52:27 Trying to force the language is something that will cause pain and miseray Oct 19 19:52:32 I speak as someone who has tried this. Oct 19 19:53:47 Where do I put this on AndroidManifest.xml? ... directly below the tag? Oct 19 19:53:56 Also is there an overview of the application development folders? Something explaining what each folder does? Oct 19 19:54:09 (I have asked this but disconnected) Oct 19 19:58:31 Also, where do you find where a class is located? For example, I want to import WebView. How do you know what do import? Do you search on google? Oct 19 19:59:25 canadiancow: opensignal just got another 1.3m of vc funding. i think you shuld have kept at it Oct 19 19:59:33 do any of you guys apply Test Driven Development while developing for Android? Oct 19 19:59:40 lov? Oct 19 20:00:00 SrPx, are you using Eclipse? Oct 19 20:01:28 Sicp: yes, just to get used to android, but I would freaking love to understand the folders so I could do it with vim. But yes. Oct 19 20:01:53 you just do Ctrl + Shift + O to fix imports Oct 19 20:02:08 if there are multiple classes with the same name but different sources, you will be prompted accordingly Oct 19 20:02:37 Oh wow. That was practical, thanks. Sicp Oct 19 20:06:22 I'm reading SICP right now... Oct 19 20:06:30 Sicp: we apply a principle of only using Worst Practices Oct 19 20:06:36 at least this way we know that we can only go up Oct 19 20:06:53 Sicp, some people do it as test driven if they prefer that way... Oct 19 20:07:38 hi everybody. What exactly does the installation diagram in a play store entry show? I mean it updates irregularly and not at the same time I get new statistic updates in the developer console... and it doesn't really match any of the graphs shown there... so I am a bit confused Oct 19 20:08:12 hey, I'm getting an issue with the HierarchyViewer when attempting to attach to a window with a custom view: I get a NullPointerException at "10-19 13:07:20.699: W/View(2671): at android.view.ViewDebug.dumpViewProperties(ViewDebug.java:887) Oct 19 20:08:12 " Oct 19 20:08:28 if I disable my custom view, it works just fine Oct 19 20:08:37 or rather, a custom layout Oct 19 20:16:21 where is the prefs.getString (String,String) method? Oct 19 20:16:38 how can I create a string with an integer value? Oct 19 20:16:42 probably SharedPreferences? Oct 19 20:16:51 I mean I have an integer variable Oct 19 20:16:58 yes. Oct 19 20:17:01 this is a java question Oct 19 20:17:03 please go to #java Oct 19 20:17:04 SharedPreferences settings = (SharedPreferences) getSharedPreferences("MYPREFS", 0); Oct 19 20:17:14 Sicp: are you kidding right now? Oct 19 20:17:20 what! Oct 19 20:17:40 getDefaultSharedPreferences? Oct 19 20:18:17 oh whoops Oct 19 20:18:30 I thought you were applying my comment to the getSharedPreferences method call Oct 19 20:18:43 wat Oct 19 20:19:08 hair trigger today Oct 19 20:19:08 so where is that method? :o Oct 19 20:19:40 wait Oct 19 20:19:48 http://developer.android.com/reference/android/content/SharedPreferences.html Oct 19 20:19:54 http://developer.android.com/reference/android/content/SharedPreferences.html#getString(java.lang.String, java.lang.String) Oct 19 20:19:57 o_O Oct 19 20:20:04 you're killing me here Sicp Oct 19 20:21:16 I probably just need Clean Oct 19 20:23:51 there's no way! Oct 19 20:27:16 see for yourself! https://dl.dropbox.com/u/19390574/Screenshot%20from%202012-10-19%2023%3A24%3A03.png Oct 19 20:27:35 impossiburrr Oct 19 20:29:12 uh Oct 19 20:29:19 It's there in the android docs. Oct 19 20:29:22 Check your setup Oct 19 20:29:30 make sure you're referencing the right SharedPreferences or something Oct 19 20:29:54 getSharedPreferences shouldn't need a cast.... Oct 19 20:30:09 oh hahahahaha Oct 19 20:30:10 ok Oct 19 20:30:13 PreferenceManager.getDefaultSharedPreferences(... Oct 19 20:30:15 yeah, you're referring to YOUR OWN CLASS THERE. Oct 19 20:30:24 mystery solved. Oct 19 20:30:32 lol Oct 19 20:30:34 I am looking at it being done in a tutorial AS IS Oct 19 20:30:37 hah, was just gonna say that Oct 19 20:30:39 yeah don't name your Acitivty SharedPreferences Oct 19 20:30:39 ._. Oct 19 20:30:40 he has THE SAME shit on his screen Oct 19 20:30:46 FUCK ME!! Oct 19 20:30:50 then he's an idiot for naming his class SharedPreferences Oct 19 20:30:51 oh fuck, haha Oct 19 20:30:57 no no I just did that :) Oct 19 20:31:04 he has all THE OTHER shit exactly the same as mine Oct 19 20:31:04 then you're the idiot. Oct 19 20:31:09 corrector Oct 19 20:31:10 -r Oct 19 20:31:40 no, that was correct. Oct 19 20:31:42 I am the corrector. Oct 19 20:31:45 I've corrected you. Oct 19 20:31:52 I corrected her Oct 19 20:32:12 i.e. Shining Oct 19 20:32:37 shh, you'll get sued Oct 19 20:36:22 there should be an #android-dev archive for WATs like the one I just pulled Oct 19 20:36:34 like a Rolodex of WATs Oct 19 20:36:41 the WAT Rolodex Oct 19 20:36:50 that's what stack overflow is to me Oct 19 20:37:12 WATs get overlooked on SO by just not appearing as best answers Oct 19 20:37:23 you just have to know how to search Oct 19 20:37:24 like Google's 2nd+ pages Oct 19 21:09:26 i feel a bit stuck...i want to make a list that reflects changes to a table in real time (the table is manipulated by a Service in the background, by the way) Oct 19 21:09:49 i can't figure out how to proceed :\ i've done it before, but i'm trapped in this weird mental funk over whether to use an ORM or just dive in and write all the boilerplate code Oct 19 21:09:57 i don't even remember all the boilerplate code that's required Oct 19 21:11:22 What is a code to get the text inside an asset, so I can do webview.loadurl('javascript:' + text_inside_the_asset); ? Oct 19 21:14:49 Escherial: android fry your brain :P Oct 19 21:15:47 g00s: indeed :\ well, in seriousness, i think it's just that i'm constantly paralyzed by indecision Oct 19 21:16:02 Escherial: go brush your teeth Oct 19 21:16:17 you'll have decided by the time you come back Oct 19 21:16:31 and you'll have clean teeth and fresh breath Oct 19 21:17:02 i concur, brushing teeth is a great activity Oct 19 21:17:07 Ankhwatcher: not a bad idea, but it's a bit hard to do at work. i went to get coffee, but found myself more confused than before. i suppose i'd best just jump into writing all the stupid sqlite support classes Oct 19 21:17:46 have fun! Oct 19 21:18:02 what are they again? SQLiteOpenHelper...an inherited version of ContentProvider...i guess a ListFragment to display my table...? Oct 19 21:18:09 heh, thanks :) Oct 19 21:18:44 is it appropriate to put methods to query and manipulate data in my tables in SQLiteOpenHelper? Oct 19 21:19:02 fyi, you don't have to use sqlite for this Oct 19 21:19:45 this is why you save the boilerplate code and reuse it Oct 19 21:20:49 ORMLite is pretty awesome though Oct 19 21:20:52 I'd just use that Oct 19 21:21:11 I have multiple projects where I did not use an ORM, and they are lame-o. Oct 19 21:21:31 there's also no problem to just use the database classes directly, drop contentprovider unless you provide content for other applications, and in general try to make it as simple and straightforward as possible Oct 19 21:21:46 yes, contentprovider is an abomination Oct 19 21:21:50 avoid at all costs Oct 19 21:21:56 also, you can use ContentResolver.notifyChange without writing content providers Oct 19 21:23:15 protip: if you want to use sql, but don't want the overhead of writing to disk, pass in null for the database name and you'll get an in-memory database. Oct 19 21:23:50 * tdignan_ chindrop Oct 19 21:24:08 that's awesome Oct 19 21:24:12 it's a bit questionable why you'd just want to use sql though Oct 19 21:24:24 can't say i've often found need for in memory sqlite on android though Oct 19 21:24:28 there's GreenDAO Oct 19 21:24:32 seems to me that List is much better than sql table in terms of access and straightforwardness Oct 19 21:24:33 I had to use it for one project Oct 19 21:24:51 it was useful to be able to do selects and joins on our tabular data Oct 19 21:25:26 if i recall, its not possible to create a temporary db on disk; android always creates it in memory. i wonder if it this is still true Oct 19 21:27:49 -DSQLITE_TEMP_STORE=3, yeah Oct 19 21:27:55 :X Oct 19 21:28:06 well, i need to persist the data to the disk...it's a logging application that uploads to a server when there's network connectivity, so it's possible that the device might be restarted in between Oct 19 21:28:12 temporary db on disk: open it, unlink it Oct 19 21:28:25 also, i need both my Activites and Services to be able to manipulate and view the data, so using a ContentProvider to facilitate that seems to make sense Oct 19 21:28:43 thought there might be external files, not sure... I guess sqlite writes everything in a single file Oct 19 21:28:45 alankila: won't it disappear if the device is restarted or if the task unexpectedly ends? Oct 19 21:28:59 ah, wait, never mind, i see what you mean Oct 19 21:29:03 Escherial: sure, that's what temporary means I guess Oct 19 21:29:22 Escherial: no, you do not need/want contentprovider for this use case. It is for exposing your objects to external applications. Oct 19 21:29:59 it's simpler to just write some utility class that maintains the database connection (maybe) and has methods to read/write data in objects or hashmaps or json or whatever you want Oct 19 21:30:12 Escherial: so what /do/ you need to do? you gave us some bits and pieces Oct 19 21:30:23 what would be the best way to implement my own long press, which will update progress periodically and can be cancelled Oct 19 21:30:40 think a timer in a thread? with a boolean for whether it should continue? Oct 19 21:31:32 by objects I meant POJOs or beans Oct 19 21:32:08 the mapping to/from can be even automated by reflection, though in that case it probably starts to step in ormlite territory. I'm not familiar with that, though. Oct 19 21:32:42 I'll have to study it now, out of curiosity. Oct 19 21:34:09 looks like better to just use ormlite than roll your own solution. Oct 19 21:34:36 what is the normal textbox here? Oct 19 21:34:39 in android? Oct 19 21:34:54 where I can write messages Oct 19 21:35:50 gregtom6: probably TextView Oct 19 21:36:04 but TextView is invisible Oct 19 21:36:13 only the text can be seen Oct 19 21:37:49 oh. EditText maybe then? Oct 19 21:38:00 g00s: essentially, i want to log phone call and text events (just the time at which they took place and to whom) to someplace from a Service, then have them viewable and updated as the changes are occurring in a list (possibly a ListFragment) Oct 19 21:38:29 i have the phone call/text capturing thing down, but now i need a database (or some other structure) in which to store them that will persist through restarts of the application (and possibly the phone, too) Oct 19 21:39:01 er, and no, i'm not writing spy software or anything; i'm using this for a research project where i try to pull my routine out of the information that's available from my phone Oct 19 21:42:03 well, that was a pain in the ass Oct 19 21:42:42 I'm probably approaching this problem incorrectly and I'd like some input from someone who's more senior than I am Oct 19 21:43:12 I've got a ListActivity that's got an ArrayAdapter that populates my view Oct 19 21:43:38 what is the best practices way to make a click listener for the item list? Oct 19 21:47:12 getListView().setOnItemClickListener(AdapterView.OnItemClickListener()) Oct 19 21:47:27 I have a Listview I'm cycling through that keeps crashing on the 5th item it cycles through, any ideas ? http://pastebin.com/qwNeRmUt Oct 19 21:47:56 is there a long press progress update of some kind? Oct 19 21:48:57 ultra-: ... long press progress update ... ? Oct 19 21:49:18 qkzoo1978: http://imgur.com/jacoj Oct 19 21:49:37 yeah, some event when i'm pressing… for instance, if i want to give the user an indication of when the long press will complete Oct 19 21:49:58 when he releases it? Oct 19 21:50:05 nope, like progress Oct 19 21:50:10 how far along the long press is Oct 19 21:50:55 ultra-: save the time when they start pressing Oct 19 21:51:08 you can get the long-press duration from .. Configuration, maybe? Oct 19 21:51:13 ok, so i would have to implement it on my own… that's what i wanted to know Oct 19 21:51:18 yes Oct 19 21:51:30 well if i'm doing that, i can just do it all manually and set my own time Oct 19 21:51:40 no Oct 19 21:51:41 no no no Oct 19 21:51:54 be consistent with the rest of the platform Oct 19 21:52:08 oh Oct 19 21:52:13 ViewConfiguration.getLongPressTimeout() Oct 19 21:52:16 gotcha Oct 19 21:52:18 ok thanks Oct 19 21:54:14 lol Oct 19 21:54:15 performHapticFeedback(int feedbackConstant) Oct 19 21:54:16 BZZZTT!!1! Oct 19 21:54:20 from the android developer page :) Oct 19 21:54:32 I can't write in textview Oct 19 21:54:47 what is the name of the thing where i can write texts? Oct 19 21:55:08 I mean the user can write texts, not the programmer Oct 19 21:55:33 So i built AOSP for the NS4G in 47 minutes Oct 19 21:55:35 is that good? Oct 19 21:56:18 pclov3r: are you an egoist? Oct 19 21:56:23 just asking Oct 19 21:56:37 no i'm just curious Oct 19 21:56:43 I don't know what is that, but this question seemed to be a bit egoist Oct 19 21:56:44 for me Oct 19 21:57:23 well, nobody cares about the time you wrote that thing Oct 19 21:57:39 lol Oct 19 21:58:06 major improment form a virutal machine Oct 19 21:58:12 a vm took 2 and and a half hours Oct 19 21:59:34 ok Oct 19 22:00:11 if you were in the us, would you buy a nexus 7 from stapes? any better brick & mortar store ? Oct 19 22:01:27 What is a code to get the text inside an asset, so I can do webview.loadurl('javascript:' + text_inside_the_asset); ? Oct 19 22:02:31 evancharlton: i'm not sure where to put the timer… thread, runnable? Oct 19 22:03:07 do i have to jump through some kind of special hoop to use support library fragments versus actual ones? Oct 19 22:03:38 it's complaining about a ClassCastException when i try to use a tag in my layout xml to include a class that inherits from ListFragment Oct 19 22:03:54 probably significant to mention that it's the android.support.v4.app.ListFragment Oct 19 22:05:43 g00s: I wouldn't care really, nothing wrong w/ staples Oct 19 22:05:46 g00s: if the price was right Oct 19 22:06:07 dragorn: ok, thx. yeah, its 199 Oct 19 22:06:34 g00s: staples is nation-wide and I haven't heard anything particularly egregious about them. I shop there for office-y stuff fairly often Oct 19 22:06:51 (i just remember the early ones having some weird display issues; hopefully they are no longer in stores) Oct 19 22:07:01 ah yes, I forgot that Oct 19 22:07:04 mine didn't Oct 19 22:07:12 is there a good guide on using XML