**** BEGIN LOGGING AT Sun Mar 31 03:00:00 2013 Mar 31 03:04:24 Where's that Styler guy Mar 31 03:06:56 (Sorry to ask a question twice, but pulling my hair out here) I'm having trouble getting the VelocityTracker to give me correct answers - I feel like I must be doing something dumb, but it's a pretty simple class, so I'm not sure what it could be. Any ideas? Code, etc, http://stackoverflow.com/q/15725154/31455 Mar 31 03:08:34 Why are you calculating it for every move event Mar 31 03:10:27 You're not adding the up event either.. You should move the addMovement out of your switch Mar 31 03:11:11 adb devices return nothing. lsusb = Bus 001 Device 015: ID 1782:5d01 Spreadtrum Communications Inc. added this UBSYSTEM=="usb", ATTR{idVendor}=="5d01", MODE="0666", GROUP="plugdev" in the file /etc/udev/rules.d/51-android.rules ran the command chmod a+r /etc/udev/rules.d/51-android.rules and then checked "adb devices" Mar 31 03:11:19 can somebody help? Mar 31 03:17:38 Where can I look into more to develop an APN to connect? Mar 31 03:20:50 what's the different ways to login to a website? REST API, user authentication... ? Mar 31 03:21:11 what do i need to add to my intent to stop the chooser dialogue popping up when an activity has multiple CATEGORY_DEFAULT options ? is there a way? Mar 31 03:21:12 SimonVT, I should for each move event, no? I mean, if the person for example swipes in a circle. Mar 31 03:21:45 Or is calculate destructive? Mar 31 03:22:17 The velocity isn't relevant until the user lets go of the screen Mar 31 03:22:30 Oh, right, but I was trying to figure out what was going on. Mar 31 03:22:58 I'm not sure how it works behind the scenes, it's not implemented in java.. Haven't looked it up Mar 31 03:23:11 And the strange thing, a steady swipe in one cardinal direction generates positive and negative values in that direction, so I think something is wrong. Mar 31 03:25:05 I don't know, I haven't had any issues when handling it in the UP event Mar 31 03:36:38 SimonVT, incidental, what do you mean UP event? Mar 31 03:37:00 ACTION_UP Mar 31 03:37:05 Oh, also Mar 31 03:37:10 You want to use getActionMasked Mar 31 03:37:39 Or getAction() & MotionEvent.ACTION_MASK if it's not available in your min sdk Mar 31 03:38:00 Oh, interesting. Mar 31 03:58:25 hi. Mar 31 04:00:30 word Mar 31 04:02:11 there is the method webview.findall(string) and this is deprecated in API 16. on the other hand they're urging the programmer to use webview.findallAsync(string). so how can get rid rid of the confusion between the two methods if my minimum sdk is API 8 and my target sdk is API 17 ? Mar 31 04:20:30 there is the method webview.findall(string) and this is deprecated in API 16. on the other hand they're urging the programmer to use webview.findallAsync(string). so how can get rid rid of the confusion between the two methods if my minimum sdk is API 8 and my target sdk is API 17 ? Mar 31 04:30:58 Hi Mar 31 04:31:06 how can i inflate and add a button to a linearlayout? Mar 31 04:31:51 i have the button created with custom background, padding, text and stuff Mar 31 04:32:49 yep, course you can Mar 31 04:33:11 How? where do i define that button? Mar 31 04:33:33 and once defined how do i add it? Mar 31 04:35:00 have a look at findViewById and LinearLayout.addChild() Mar 31 04:37:42 I'm trying to set an animation-list for the emptyView for a ListView but its not displaying at all. I have already ensured that my ImageView that wraps the animation has its LayoutParams set.. as well as trying to hook into onWindowFocusChanged for both the parent Activity and ListView Mar 31 04:38:32 but nothing seems to be working.. I debug stepped the code and it seems that the AnimationDrawable is executing the code and switching frames but its not displaying on the phone.. GNexus 4.2 Mar 31 06:39:47 there is the method webview.findall(string) and this is deprecated in API 16. on the other hand they're urging the programmer to use webview.findallAsync(string). so how can get rid rid of the confusion between the two methods if my minimum sdk is API 8 and my target sdk is API 17 ? Mar 31 06:41:13 Hi guys, whats the command to add an alias to a keystore? Mar 31 06:42:58 http://en.wikipedia.org/wiki/File:Android_chart.png *sigh* Mar 31 06:46:00 Hi guys, whats the command to add an alias to a keystore? Mar 31 06:47:16 nmvictor, the command is keytool Mar 31 06:47:29 but i cannot figure out the correct option Mar 31 06:51:22 rburton-: why so sad? Mar 31 06:52:20 a lot of 2.x users Mar 31 06:53:10 Fragments :( Mar 31 06:57:20 rburton-: i havent had any 2.2 buyers in a while Mar 31 06:57:35 rburton-: starting a new app ? Mar 31 06:57:39 I'm not too concern since my project is for fun Mar 31 06:57:40 ya Mar 31 06:57:43 ChancyChat ;) Mar 31 06:57:52 rburton-: minSdk=15, done Mar 31 06:58:25 yup :) Mar 31 06:59:51 Found Otto tonight which is good. I wanted a bus to handle my communications. Basically embedded JMS ;) Mar 31 07:01:26 http://www.simpsoncrazy.com/content/screenshots/episodes/8f21/8f21_015.jpg Mar 31 07:01:31 ;) Mar 31 07:02:30 hey guys, is there any way I can force my app to be always on top? I'm working on some kind of installer app, and when a specific app gets installed, it starts itself, minimizing my app. I need to keep mine always on top until it's finished -or- stop the other app from starting as soon as it gets installed, but that's a 3rd-party one and I don't want to mess with it :P Mar 31 07:03:53 Hi, I have an app which includes a service and several activities, currently it uses BOOT_COMPLETED receiver to start the service, which then opens an activity to allow authentication for the service to be completed. However, when running this on a tablet (Nexus 7) which has multiple user logins, only the first user ever gets the login activity started. Is there another receiver I can include an intent-filter for, that Mar 31 07:03:53 will get triggered when a new user logs in? Mar 31 07:10:39 abu_rashid: what makes your app so incredibly special, that it needs to present registration immediately on boot completed Mar 31 07:11:38 g00s, its a time limiting app for my kids… nothing special at all, and most certainly not for public consumption, so don't beat yourself up over how many design conventions it flouts Mar 31 07:12:20 I asked a question, if you have an answer, please share, if you don't, just ignore the question, and save me the lectures about good user experience design principles, please. Mar 31 07:12:35 just take it away from them "time is up" Mar 31 07:12:51 yeh thanks anyway Mar 31 07:12:54 there is the method webview.findall(string) and this is deprecated in API 16. on the other hand they're urging the programmer to use webview.findallAsync(string). so how can get rid rid of the confusion between the two methods if my minimum sdk is API 8 and my target sdk is API 17 ? Mar 31 07:12:57 :) Mar 31 07:12:57 Good to see the Square folks releasing their frameworks as open source. It's been great to see when I find complexity sneaking in that there's a framework to help get control again vs. me having to write it myself. Mar 31 07:13:24 abu_rashid, مرحبا Mar 31 07:13:29 I'll be Eric a cup of water on monday. Mar 31 07:14:12 اهلا بك سوبر لينوكس Mar 31 07:15:08 I الصخرة! Mar 31 07:15:39 haha Mar 31 07:16:41 Otto vs Context#sendBroadcast easy choice Mar 31 07:17:11 rburton-, arab also? Mar 31 07:17:28 I'm Italian, Spanish and Google Mar 31 07:17:35 :) Mar 31 07:17:52 i see android development is famous amongst arabs too Mar 31 07:18:01 i think more than iphone Mar 31 07:18:25 I suspect it's the UI that attracts them :) Mar 31 07:25:14 probably more about cost Mar 31 07:25:27 iphones are prohibitively expensive in lower income countries Mar 31 07:26:06 but even so, they are status symbols Mar 31 07:26:14 okay so everyone ignored me Mar 31 07:26:19 * DARKGuy repeats Mar 31 07:26:21 hey guys, is there any way I can force my app to be always on top? I'm working on some kind of installer app, and when a specific app gets installed, it starts itself, minimizing my app. I need to keep mine always on top until it's finished -or- stop the other app from starting as soon as it gets installed, but that's a 3rd-party one and I don't want to mess with it :P Mar 31 07:30:35 dark guy did you try googling it? Mar 31 07:30:46 abu_rashid I did, and that's why I'm here :P Mar 31 07:31:21 as in, google wasn't useful, no stackoverflow searches match what I want to do :P Mar 31 07:31:50 Thre's some that match the question "android always on top activity" Mar 31 07:31:57 or maybe I'm using the wrong keywords. Then again I don't know the names for what I wanna do, android isn't my strong point Mar 31 07:31:58 and they seems to suggest it's not possible Mar 31 07:32:19 one of them talked about a service, but I'm not using a service nor I wanna do one for such a simple app :p Mar 31 07:32:31 http://www.boomtech.in/post/23224589456/android-always-on-the-top-view-system-overlay Mar 31 07:32:35 this link suggests you can Mar 31 07:32:43 its about 5th down on a google search Mar 31 07:32:44 I was wondering if an "am start" command could redo my app back to focus Mar 31 07:34:01 abu_rashid oh I saw that, but it puzzled me, I don't know how to make that work with my current code x_x Mar 31 07:34:40 how about using a timer that checks if your activity is the current activity? and if not, restart it Mar 31 07:34:50 yeah I can try to do that Mar 31 07:35:10 in fact that's the original idea, but then, if I start my activity on each check Mar 31 07:35:16 well, my activity shows a dialog on startup Mar 31 07:35:22 how do I avoid it show the dialog again? Mar 31 07:35:51 there's different method called for different kinds of starts.. read up on the lifecycle of an activity Mar 31 07:38:07 alright, that makes sense Mar 31 07:38:57 do you have a book about android development? Mar 31 07:39:06 if so it should have a chapter about activity lifecycle Mar 31 07:39:24 nope :( they're too expensive and hard to find -.-, I usually search for everything I want to know in google :P Mar 31 07:39:37 otherwise: http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle Mar 31 07:39:40 yeah, android SDK has good info about it Mar 31 07:39:57 oh, that's better than the one I found Mar 31 07:39:59 thanks :P Mar 31 07:40:10 you're welcome :) Mar 31 07:44:08 oh well it was easier than I thought :P Mar 31 07:44:27 calling "am start -a android.intent.action.MAIN -n com.darkguy.dragonfw/.Main" resulted in "Warning: Activity not started, its current task has been brought to the front" Mar 31 07:44:33 which is good enough for me :P Mar 31 07:44:52 um, bye... arabian guy who helped me Mar 31 07:44:52 lol Mar 31 07:45:34 well, see you all Mar 31 08:08:21 hi Mar 31 08:08:59 what's google's policy on the language features? must android java comply with the non-android java language? Mar 31 08:24:10 StingRay_: do your photo shoot ? Mar 31 08:30:28 na not scheduled Mar 31 08:30:35 just something I said I would do Mar 31 08:30:54 tbh I dont fancy getting all the gear setup Mar 31 08:31:06 4 big+ bags of studio lights Mar 31 08:31:27 then I have to charge like 40+ batts Mar 31 08:31:37 for the portable ex lights Mar 31 08:31:46 test radio triggers Mar 31 08:31:50 ugh Mar 31 08:31:54 list is endless Mar 31 08:32:06 ow, you have a lot of stuff. i'm pretty minimal. i only have one camera :) Mar 31 08:32:26 see pressing the power button would be cool Mar 31 08:32:29 :) Mar 31 08:32:32 your lucky Mar 31 08:33:26 boo Mar 31 08:33:35 there is the method webview.findall(string) and this is deprecated in API 16. on the other hand they're urging the programmer to use webview.findallAsync(string). so how can get rid rid of the confusion between the two methods if my minimum sdk is API 8 and my target sdk is API 17 ? Mar 31 08:33:51 deprecated doesn't mean you can't use it Mar 31 08:34:27 yeah.. i know, but i need to move on. got me? Mar 31 08:34:35 @SuppressWarnings is your friend then Mar 31 08:34:50 aha. ok Mar 31 08:37:45 JakeWharton, does that mean they'd remove it? Mar 31 08:38:02 remove the deprecated one? Mar 31 08:38:06 in 20 years maybe Mar 31 08:38:25 haha Mar 31 08:38:30 they haven't removed AbsoluteLayout... you'll be fine Mar 31 08:38:41 ah ok! Mar 31 08:38:46 (͡° ͜ʖ ͡°) Mar 31 08:40:07 it will be deprecated when they switch the java framework to Go ;) Mar 31 08:40:17 honestly I havent looked at go Mar 31 08:40:22 but I'd much rather it be go Mar 31 08:40:23 lol Mar 31 08:40:29 i hope not Mar 31 08:40:41 Go isn't made for this type of programming Mar 31 08:40:51 every experience using java imo is dissapointing Mar 31 08:41:04 and then the fact that we're stuck on an old version of java anyway Mar 31 08:41:15 that won't bother me until September Mar 31 08:41:19 Java 7 is a joke release Mar 31 08:41:21 and then all the funky ass wrappers on wrappers Mar 31 08:41:36 and jni which "blows wang" Mar 31 08:42:13 I am just pissed about half assed generics and the way you have to handle events and asynchronous stuff Mar 31 08:42:22 ron_frown: you should use Java 8 Mar 31 08:42:29 you'll be *really* pissed then Mar 31 08:42:35 haha why is that Mar 31 08:42:41 because it's fucking brilliant Mar 31 08:42:42 they did it differently, but in a worse way? Mar 31 08:42:50 JakeWharton: ok to ask you a few questions about otto ? I'm not quite getting it Mar 31 08:42:58 StingRay_: go for it Mar 31 08:42:59 I think it's what I need Mar 31 08:43:01 :) Mar 31 08:43:13 well atm I have interfaces that send messages Mar 31 08:43:26 holy fuck java is getting date/time api? Mar 31 08:43:32 are they gonnag et it right this time around? =) Mar 31 08:43:33 lol Mar 31 08:43:37 but a message can have modes Mar 31 08:44:08 ron_frown: there was actually a Hacker News article that didn't suck about Java 8 last week that's a good read Mar 31 08:44:11 so for me I can send a Message object that holds a state change, or even just an invalidation of a table Mar 31 08:44:21 ron_frown: the time api is essentially Joda Mar 31 08:44:34 the bad part is I'm coming from the .net world, building c# apps for quite some time Mar 31 08:44:41 ron_frown: http://www.techempower.com/blog/2013/03/26/everything-about-java-8/ Mar 31 08:44:45 and lots of what appears to be coming with java8 have been there for eternity Mar 31 08:44:50 JakeWharton thanks Mar 31 08:44:52 with this subscribe way, how would otto send to subs methods in multiple instances Mar 31 08:44:52 I'll read it now =) Mar 31 08:45:03 StingRay_: you can send whatever you like, Otto just passes them along Mar 31 08:45:29 ron_frown: well they can move faster... C# 1 wasn't much to write home about Mar 31 08:45:39 yeah, lambdas still don't have non-final variable capture :/ Mar 31 08:45:42 mot def Mar 31 08:45:44 most def Mar 31 08:45:51 g00s: that can't be done Mar 31 08:45:54 dude Mar 31 08:45:56 burger arrow Mar 31 08:46:04 hahaha Mar 31 08:46:05 the name just makes java that much cooler =) Mar 31 08:46:19 I like java for what it is Mar 31 08:46:28 I just dont like oracle, and I've been using c# so its Mar 31 08:46:34 feels like a downgrade Mar 31 08:46:36 for now Mar 31 08:46:46 yeah i'd love .NET as a language on the JVM Mar 31 08:47:23 I think there are a ton of naysayers about ms tech even though its open and arguably superior Mar 31 08:47:49 It'd def make my life easier in the porting world if only to rid myself of all the jni bs Mar 31 08:47:57 well there's a ton of problems with it on a fundamental level Mar 31 08:48:25 i don't think many people have a problem with the language or stdlib Mar 31 08:49:32 since 1.6, did java ever improve on generics? Mar 31 08:49:42 1.5 ? :P Mar 31 08:50:49 the whole api as copyright thing is still going on between oracle / google though; lets hope good prevails here. Mar 31 08:51:09 I think the best tool for the job Mar 31 08:51:25 I dont want to just write java off, but it has made my life hell or at least contributed to it =) Mar 31 08:51:33 ms, ibm, even McNealy have submitted friends-of the court submissions … in oracle's favor Mar 31 08:51:34 g00s: was that ever a problem? either Oracle loses 99% or Google pays 1% Mar 31 08:52:06 if apis become copyrightable, almost everybody loses Mar 31 08:52:21 the blast radius goes way outside android / google Mar 31 08:52:43 thank god google has more money... I seriously would be surprised if the richest company in this case didnt win Mar 31 08:52:46 yeah but that's like saying if a meteor the size of New Jersey hits Earth almost everybody loses Mar 31 08:52:48 greed is a motherfucker Mar 31 08:53:03 so ron_frown , http://techcrunch.com/2013/03/30/developers-should-care-about-oracles-upcoming-appeal-of-the-google-lawsuit/ Mar 31 08:53:15 i still don't understand MS's position on this, and why they allow Mono to exist Mar 31 08:53:16 dont get me wrong I totally understand the concern Mar 31 08:53:27 g00s it spreads the platform Mar 31 08:53:37 How can I create a new account on my n7 to test an iap ? Mar 31 08:53:41 they dedicated early on to making it an open technology and even handed out reference implementation Mar 31 08:53:51 I already bought on my regular test account Mar 31 08:53:52 they dont have to build unix support themselves Mar 31 08:53:58 win wn Mar 31 08:54:09 if shit breaks they arent responsible Mar 31 08:54:37 which is why nobody uses it, as well Mar 31 08:54:47 sorry JakeWharton was on the phone, so how is the subscribe methods called ? based on type that they accept ? name ? Mar 31 08:54:48 i personally love mono Mar 31 08:54:56 StingRay_: the type. did you read the website? Mar 31 08:54:59 it performs better than .net in windows Mar 31 08:55:04 I love Mono on a conceptual level Mar 31 08:55:10 just like I love communism Mar 31 08:55:12 its often right up there where the official language support is Mar 31 08:57:58 Is the only solution a factory reset? Mar 31 09:03:19 i think i solved something that was not solved on stackoverflow! Mar 31 09:03:27 you like communism jake?! Mar 31 09:03:29 j/k Mar 31 09:04:46 when you load the webview it complains in a warning about UI thread. all i did is put loadURL() in a handler.post() and it worked! Mar 31 09:05:06 the warning is gone! Mar 31 09:05:27 does your micro usb cable brake often? Mar 31 09:05:33 I'm trying to run my background service in another process. so if application fails service won't go down with it. i define attribute android:process=":remote", now i'm unable to use service static method to check if it's running. i tried checking the ActivityManager ... getSystemService(Context.ACTIVITY_SERVICE) ... but did not find my service there. Mar 31 09:06:52 should i used some shared configuration solution? Mar 31 09:07:13 i kinda wish to avoid this. Mar 31 09:08:59 wdna: you'll probably bind to the service; this is the time (remote process) when ServiceConnection onDisconnect() will be called if the service dies Mar 31 09:09:33 how about, you just make sure your other stuff doesn't crash and put them back in the same process together :) Mar 31 09:13:04 heyyyy Mar 31 09:13:11 how do i do this again? forgot :< Mar 31 09:13:12 query = (EditText) findViewById(R.id.inputSearch).getText().toString(); Mar 31 09:13:43 query is declared as a string Mar 31 09:13:58 i dont want to have 2 variables to get the text Mar 31 09:14:29 g00s, i'm currently in what you can call pre-alpha ... the service is small, but might crash. i need a what checking it's working, i don't what bind to it before. Mar 31 09:16:35 g00s, i has static method checking this, after doing it ":remote: i could not use it. so i'm trying to do the same in remote mode. Mar 31 09:16:43 had* Mar 31 09:17:00 wdna: you can't, its in another process Mar 31 09:17:32 can't i pull it from the system somehow? Mar 31 09:18:05 i think i tried that as a thought experiment once, yeah - but its ugly :| Mar 31 09:18:39 well, the other way is i should try binding to it anyway, and check later ? Mar 31 09:19:07 all that is async, its a pita Mar 31 09:19:48 riccoski: use more parens Mar 31 09:20:01 ((EditText) findById).getText().toString() Mar 31 09:20:33 thanks JakeWharton :) Mar 31 09:25:00 ummm.. i can send something to my plugin onBind i think... Mar 31 09:25:38 I am new to android dev. I need to create an app that has 5 different views, which the user can switch between by clicking one of 5 buttons. I first tried making 5 activities, but switching between activities was slow (each time a button was clicked, I had to create a new Intent and start it). So, I found ViewSwitcher and thought it might be the answer. Mar 31 09:26:15 ...but, it only allows two child views. Is there something like a ViewSwitcher that will allow 5 child views? Mar 31 09:26:26 viewpager? Mar 31 09:26:55 I made test purchase, by theres no option to refund the money in the google play merchant checkout? Mar 31 09:27:13 'Refund some money' is greyed out Mar 31 09:28:37 ViewAnimator Mar 31 09:28:42 ron_frown: that looks like it might work...regarding user experience: if they switch from view 1 to view 5, will they have to see the app paging through views 2, 3 and 4. Or, is it possible to make view 5 appear immediately? Mar 31 09:29:12 I am sure programatically you can jump between views Mar 31 09:29:34 yes Mar 31 09:29:44 by default it will smoothly scroll but you can send it a false flag to jump Mar 31 09:29:58 jake you got more fucked sleep patterns than I do Mar 31 09:30:14 Saturdays are usually program like a fiend until 5am Mar 31 09:30:31 Sundays are veg on the couch and catch up on books/articles/tv/movies/sleep Mar 31 09:30:33 hahaha you are the type Mar 31 09:30:34 ron_frown: thank you :) Mar 31 09:30:43 thats what I tell people in interviews Mar 31 09:30:50 what do you do in your free time for fun Mar 31 09:30:54 code. Mar 31 09:31:05 jakewharton: ViewAnimator looks good too. it can take the false flag to jump too? Mar 31 09:31:05 I ride my bikes, and home improvements and shit too Mar 31 09:31:13 but coding is what I enjoy Mar 31 09:31:36 williehurl9: ViewAnimator doesn't allow swiping like view pager but you can give it animations to transition between children Mar 31 09:32:06 ron_frown: yeah i try to do stuff like that too Mar 31 09:32:20 biking, ice skating, hiking, etc. Mar 31 09:32:32 jakewharton: ah, ok. And you answered my next question (which of the two would be best? it looks like ViewPager is the answer). Mar 31 09:32:55 biking for me is this: http://imageshack.us/a/img688/4849/img20130113194043.jpg Mar 31 09:32:57 ron_frown, JakeWharton: Thank you both :) Mar 31 09:33:02 not actual legitimate excercise Mar 31 09:33:20 JakeWharton: are the any limitations in use of otto in library project ? cause I just inclided otto and subscribed to my object type, tested post in a fragment and the subscriber is not called on the base fragActivity Mar 31 09:33:23 but if I lived in the city I probably would never ride it Mar 31 09:33:32 probably something simple I'm messing up Mar 31 09:35:49 oh well I actully have plans tomorrow so I'm off Mar 31 09:35:51 later gnets Mar 31 09:35:52 gents Mar 31 09:36:02 happy easter for those who celebrate Mar 31 09:36:09 hi guys how you all doin Mar 31 09:36:44 hello dudes Mar 31 09:37:00 is there an easy way to show a specific alertbox when an error happens? Mar 31 09:37:55 i'm trying to find a more efficient way to do somehing Mar 31 09:38:02 maybe with an android function Mar 31 09:38:08 I'm building a game Mar 31 09:39:52 everytime you build a unit you tap a button on the screen and this needs to update my queue table in the database incase they build the units and just close the app Mar 31 09:40:52 problem is someone can tap it like 40 time in like 5-10 seconds Mar 31 09:41:18 is there a better way to do it than to simply make it update everytime they tap the button Mar 31 09:43:01 that'll be like 40 sql queries in 10 seconds Mar 31 09:43:11 from thousands of users Mar 31 09:45:57 thats insane Mar 31 09:46:20 i know i need a more efficient approach man Mar 31 09:46:23 can you help me out Mar 31 09:46:49 do you have performance problems with 40 sql queries ? Mar 31 09:46:52 I'm thinking maybe a timer that executes a single update query after 5 seconds Mar 31 09:46:54 on loop Mar 31 09:47:03 i haven't done it yet it seems stupid Mar 31 09:47:16 I'm looking for a better way Mar 31 09:47:24 where is the database at a computer or at smartphone? Mar 31 09:47:46 It's hosted online Mar 31 09:47:55 I have a server Mar 31 09:48:37 so it would also mean 40 server calls in 10 seconds by thousands of users Mar 31 09:48:55 can you sugget a better way to do it please? Mar 31 09:50:20 when is it going to update ? Mar 31 09:50:53 you mean 40 queries per one person ? Mar 31 09:51:04 40* 1000=would be 40000? Mar 31 09:51:17 if they tap it fast Mar 31 09:51:49 StingRay_: did you read the website? Mar 31 09:51:53 yes Mar 31 09:52:05 looked at examples Mar 31 09:52:07 read the site Mar 31 09:52:08 you cannot put annotations on methods in base classes Mar 31 09:52:21 this will be supported in 2.0 Mar 31 09:53:33 i remember that guava-eventbus bug Mar 31 09:53:37 i filed it :D Mar 31 09:54:07 i thought they fixed it though … anyhow i fixed my version ; was pretty easy Mar 31 09:54:30 when was that? Mar 31 09:54:38 guava has supported annotations on base classes and interfaces for years Mar 31 09:55:33 JakeWharton: I can still register in base class ? Mar 31 09:55:38 were you talking about @Subscribe / eventbus ? Mar 31 09:55:41 StingRay_: yes Mar 31 09:55:43 g00s: yes Mar 31 09:55:51 yeah, that bug was in 11.0 i think Mar 31 09:56:47 anyhow it was maybe jan 2012 timeframe Mar 31 09:57:40 JakeWharton: ok cool, out of interest any timescales on v2 ? Mar 31 09:57:54 StingRay_: 4-6 weeks Mar 31 09:58:13 i also added Bus Ordering, i guess they may add that in the future Mar 31 09:58:30 sounds like an oxymoron Mar 31 09:58:30 Ordering of Listeners Mar 31 09:58:53 https://code.google.com/p/guava-libraries/issues/detail?id=838 Mar 31 09:59:02 i used a priorityQueue Mar 31 09:59:22 someone tried to add that to Otto Mar 31 09:59:30 if you care about ordering, you shouldn't be using an event bus Mar 31 10:01:04 JakeWharton: so performance was the reason you decided against it ? may I ask why thats changed in v2? Mar 31 10:01:12 i've implemented enough event busses in my time ;) Mar 31 10:01:22 g00s: i'm sure they'll add it Mar 31 10:01:28 at least I can get rid of 16 interfaces now :) Mar 31 10:01:29 guava, the great dumping ground of Google Mar 31 10:01:39 StingRay_: yes. sneaky magic :) Mar 31 10:01:46 night Mar 31 10:01:54 night + cheers Mar 31 10:02:01 its the same concept as a BroadcastReceiver priority Mar 31 10:02:15 unfortunately, sometimes you have timing dependencies Mar 31 10:02:41 BroadcastRec. have priorities ? registration order ? Mar 31 10:03:07 yes, there is the idea of ordered broadcasts Mar 31 10:03:32 its very useful. in my eventbus, i have this idea, and the event gets mutated along the way Mar 31 10:03:54 is that not insane to debug ? Mar 31 10:04:03 no :) Mar 31 10:05:17 I dont mean a mutated event Mar 31 10:05:24 tracking priorites etc Mar 31 10:05:33 cause I take it they can change ? Mar 31 10:06:10 how could i handle server down exception in doInBackground ? and be notified after on PostExecute? Mar 31 10:06:37 catch the type of exception ? Mar 31 10:06:43 will be in the message Mar 31 10:06:48 and response Mar 31 10:15:20 ah, here is the bug i filed way back, not sure if this was what you guys were discussing though https://code.google.com/p/guava-libraries/issues/detail?id=783 Mar 31 10:16:07 what are you using guava for? Mar 31 10:17:45 states and actions Mar 31 10:17:58 basically replacing my mess of interfaces Mar 31 10:18:44 but also thinking about ui events too now Mar 31 10:22:07 aften an exception i got no event handling somehow Mar 31 10:22:08 strange Mar 31 10:26:17 yes but i'm looking for a way to fix it Mar 31 10:26:23 like clash of clans has it Mar 31 10:26:42 when they click the build unit Mar 31 10:27:07 my game is similar to clash of clans Mar 31 10:27:41 people click build unit many times how can i update the unit queue in mt database in an efficient way? Mar 31 10:29:04 enwary: are they valid clicks ? Mar 31 10:29:17 as in if I keep pressing build fast Mar 31 10:29:22 is that even valid ? Mar 31 10:29:59 StingRay_: do you use Lightroom ? Mar 31 10:30:17 no, PS is all i need really Mar 31 10:30:48 I'm not into pre-sets, and I think LR is just a preset factory for anything that you can do in PS Mar 31 10:30:50 what do you use for asset management ? Mar 31 10:30:57 of what ? Mar 31 10:31:02 ln Mar 31 10:31:06 oh pics ? Mar 31 10:31:14 yeah :) Mar 31 10:31:32 hey I deal with lots of asset types :) gimme a break Mar 31 10:32:00 well when editing on a AV drive I just use OSX versioning Mar 31 10:32:10 organising I just use Brain + folders Mar 31 10:32:31 viewer I use xnview Mar 31 10:33:21 O.o Mar 31 10:33:29 what ? Mar 31 10:33:35 hehe Mar 31 10:33:56 Brain + Folders is good Mar 31 10:34:03 hence why I cant find anything!!! Mar 31 10:34:18 * g00s prescribes MediaPro to StingRay_ Mar 31 10:34:40 http://www.phaseone.com/en/Imaging-Software/Media-Pro.aspx Mar 31 10:34:46 and searching for stuff is sooooo much more satisfactory when it takes hours/days Mar 31 10:35:54 this is much more than Lr has, but Lr is enough for me Mar 31 10:36:03 but since you dont use Lr ;) Mar 31 10:36:40 show you a test shot i did a few years back Mar 31 10:37:21 https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-ash3/6414_115702646785_4417290_n.jpg Mar 31 10:38:11 whats the story behind it ? Mar 31 10:38:12 is there a way to call cancel within doInBackground ? Mar 31 10:39:51 ifyou know you want to cancel just return from the method Mar 31 10:39:58 g00s: well I wanted to test a few ways to get a killer/attack dog in the shot Mar 31 10:40:13 but you cant when using a fragile little model Mar 31 10:40:37 StingRay_: is that a Belgian Malinois ? Mar 31 10:40:54 no Mar 31 10:41:15 but yeah the dog obviously is not in the same space as the model Mar 31 10:41:16 Cujo? Mar 31 10:41:42 oh, so you composited ? Mar 31 10:41:47 god yes Mar 31 10:42:07 dog + model = (just dog + bits of model) = not good Mar 31 10:42:21 who's idea was this :D Mar 31 10:43:41 ah well his name was zak and he was a very good guard dog, and he was there, so just decided to try Mar 31 10:44:16 I used to fight with him a bit when I took him for walks, so thats me that he's attempting to kill when jumping like that :) Mar 31 10:45:10 and my best friend who's dog it was https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-ash4/284_20602346785_8606_n.jpg was the one holding him Mar 31 11:40:33 StingRay_: You said connecting to a database would take a couple of hours. You lied, this is hard! Mar 31 11:40:34 :P Mar 31 11:48:24 * storkme throws Messages about. Mar 31 11:55:58 whois StingRay_ Mar 31 11:56:09 i hate when that happens Mar 31 12:09:04 can I make my android phone tether to the wifi on my laptop via bluetooth or usb or something? currently connected to a vpn Mar 31 12:09:27 so i get this error: Caused by: java.lang.NullPointerException Mar 31 12:09:47 says on this line: friendsList.add(map); Mar 31 12:10:02 riccoski: have you defined map Mar 31 12:10:13 yeah Mar 31 12:10:21 i have logged map it outputs: {bio=null, uid=32, fullname=james dunn} Mar 31 12:11:05 I've updated my app to fix a issue causing a crash, how are uses on android notified of updates? Mar 31 12:11:17 and you have an instance of friendsList hmm not suree lulz Mar 31 12:11:30 If the crash happens on that line, friendsList is null Mar 31 12:12:10 apple741: Play store will notify them if they have that setting enabled Mar 31 12:12:20 SimonVT: Oh hi, I was wondering is there a quick and easy way of setting up a webservice API? I've only got a week to do this Mar 31 12:12:43 well im adding to it arent i Mar 31 12:12:46 in order to make us of a remote database from my app Mar 31 12:12:55 SimonVT: Thanks, I think I made a mistake though, I didn't update the version number as I was so rushed getting the fix done. Mar 31 12:12:59 ive used this code in another activity and it works fine :x Mar 31 12:13:07 ah well lesson learned I guess :) Mar 31 12:13:47 You're not adding to it if it crashes.. Mar 31 12:14:12 apple741: You're required to update android:versionCode .. That's all that matters when play store checks for updates Mar 31 12:14:21 yeah im trying to figure out why Mar 31 12:14:34 SimonVT: Ah thats ok then I did that :) Mar 31 12:14:37 Thanks SimonVT :) Mar 31 12:14:55 SimonVT: web services Mar 31 12:16:35 Put together some php that queries a database and call it a webservice? Mar 31 12:17:26 SimonVT: That's what I want to do, but apparently that's too much of a dirty hack and that I need to use REST etc Mar 31 12:17:57 I mean my app doesn't need to be THAT secure, since it's only a univeristy PROject Mar 31 12:17:58 but Mar 31 12:18:28 I don't wanna lose marks either for vulnerabilities Mar 31 12:19:25 So find out what REST is and start coding Mar 31 12:19:59 SimonVT: is it possible within a week? it sounds like a handful Mar 31 12:20:02 REST is basically common sense web service dev Mar 31 12:22:32 how easy is it Mar 31 12:22:34 to get into? Mar 31 12:25:51 coco89: questions that like are pretty much not answerable Mar 31 12:26:10 StingRay_: You said it would be pretty quick Mar 31 12:26:12 or if you did want an answer, stupidly easy -- to -- impossible Mar 31 12:26:15 :P Mar 31 12:26:21 quick to what ? Mar 31 12:26:28 something like Mar 31 12:26:31 JSON 15 minutes Mar 31 12:26:36 write / read mysql Mar 31 12:26:36 http clients 10 mins Mar 31 12:27:12 StingRay_, wish I could remember Mar 31 12:28:04 well yeah Mar 31 12:28:13 php bout 15 min Mar 31 12:28:19 HttpClient 10 min Mar 31 12:28:30 check yep, i've done them both Mar 31 12:28:34 and web services? Mar 31 12:28:34 json is almost common sense Mar 31 12:29:00 well then get some data Mar 31 12:29:27 web services ? Mar 31 12:29:34 what else you adding ? Mar 31 12:30:07 that's it Mar 31 12:30:25 I just need to hook up the database to the web service and get and put stuff to it Mar 31 12:30:36 HttpClient Mar 31 12:30:51 yep Mar 31 12:31:07 HttpPost Mar 31 12:31:22 and response Mar 31 12:31:58 StingRay_: Okay, but I need to actually build the webservice. that's what I'm stuck on Mar 31 12:32:35 still not sure what your on about Mar 31 12:32:49 you mean an off ui thread service ? Mar 31 12:33:03 hi, How to know the text width in a canvas ~=text.lenght*10 ? Mar 31 12:33:04 StingRay_: I need to display the database in either XML or JSON right? Mar 31 12:33:13 dont forget I'm not a developer, some terms I just have never heard Mar 31 12:33:16 StingRay_: how would I do this? Mar 31 12:33:31 ask php for it Mar 31 12:33:35 Oh, but I've thought you've done this before? Mar 31 12:33:44 yeah I have Mar 31 12:33:51 and still am Mar 31 12:33:53 and how did you display the database? Mar 31 12:33:53 coco89 : your server side is in php ? Mar 31 12:34:05 coco89: php gives you json Mar 31 12:34:11 well if you output it to that Mar 31 12:34:14 in php Mar 31 12:34:28 StingRay_: so just have a PHP script ? that's considered safe enough right? Mar 31 12:34:29 can format it however you like Mar 31 12:34:40 well no, remember what I said Mar 31 12:34:47 doing what you want is quick Mar 31 12:34:58 doing it secure takes time and a bit of planning Mar 31 12:34:59 webservices is a big word... in your case, you dont need a soap webservice I thing, just HTTP request Mar 31 12:35:07 ^ Mar 31 12:35:32 raz86: Yes, but I need the HTTP request to connect to my database Mar 31 12:35:43 as in Mar 31 12:35:45 to a webservice Mar 31 12:35:58 coco89: I think your missing something here Mar 31 12:36:05 StingRay_: what's that Mar 31 12:36:32 your webserver connects on your database Mar 31 12:36:40 yes Mar 31 12:36:47 so i need that webserver Mar 31 12:36:49 right? Mar 31 12:36:53 yes Mar 31 12:37:01 so i will need to create the web service Mar 31 12:37:06 omg, a webserver Mar 31 12:37:07 to output that database Mar 31 12:37:21 StingRay_: omg what/ Mar 31 12:37:23 you have no http service ? Mar 31 12:37:38 you just have a mySql service ? Mar 31 12:37:40 StingRay_: I haven't set up my web server yet Mar 31 12:37:45 http://yourserver.com/myApp?request=giveMeAservice Mar 31 12:38:25 yeah you need apache + php + mysql Mar 31 12:38:34 so yeah, if you have none, you need :) Mar 31 12:38:41 you cant connect directly with your database... the account for connecting to your bdd must be private Mar 31 12:39:01 raz86, yes I know Mar 31 12:39:04 webserver is an easy interface Mar 31 12:39:10 just some php Mar 31 12:39:19 raz86: so just a PHP script? Mar 31 12:39:38 have you ever make a php site? Mar 31 12:39:41 ye Mar 31 12:40:01 so what is the problem ? Mar 31 12:40:46 you can test your webservice just with a browser Mar 31 12:40:48 I thought I had to know SOAP service or a REST web service to make it secure? Mar 31 12:41:03 SOAP is just a norm Mar 31 12:41:21 REST is an approach with slash, lol Mar 31 12:41:48 but I don't need either of them for this? Mar 31 12:41:49 just PHP? Mar 31 12:41:55 with a SOAP webservice, everybody could use it Mar 31 12:42:09 but, I think that you need just a simple communication Mar 31 12:42:16 yes Mar 31 12:42:24 just a simple communicatoin to get and put stuff Mar 31 12:42:28 on a database Mar 31 12:42:29 do you need authentification? Mar 31 12:42:46 raz86: Well, yes I will be creating a log in page Mar 31 12:44:27 raz86: this means I have to use rest or soap? Mar 31 12:44:28 also brb Mar 31 12:44:36 just be carefull to escape characters when you get POST parameters... Mar 31 12:44:53 not necesseray Mar 31 12:45:17 I see Mar 31 12:45:30 and it will still be secure Mar 31 12:45:42 apply MVC patterns Mar 31 12:46:15 okay Mar 31 12:46:20 Model View Controller, Model your bdd, View : your app, Controller : your app AND the webserver Mar 31 12:46:40 yes Mar 31 12:47:16 So your problem is not really on android Mar 31 12:48:36 Now my question :) How to know the text width in a canvas ~=text.lenght*10 ? Mar 31 12:49:42 paint.gettextsize or something Mar 31 12:49:54 mmmmm is longer than iiiii Mar 31 12:51:12 no, it depends of the text :/ Mar 31 12:51:22 yes Mar 31 12:51:27 read up the doc Mar 31 12:52:19 yes, maybe getTextBounds, thank you Mar 31 12:52:25 Excuse me. Why do i get a Camera server Died on every second camshot? Thrid works, 4th not.. 5th works, 6th not.. http://pastebin.com/28K2HEq3 logcat -> Media Server Died, AudioService died.. Mar 31 12:52:28 exactly that Mar 31 12:54:25 misterli : excpetions ? Mar 31 12:55:30 Camera server died. And straight after mCamera = Camera.open(); failed to connect exception. It looks like that it does not cleanly release the camera. But i dont know why. onDestroy is called Mar 31 12:57:32 misterli : if you want to know it is cleanly released, try to open your native camera Mar 31 12:59:19 it keeps getting black Mar 31 12:59:30 This is annoying because it dont seems to be locked. Just black. Mar 31 12:59:57 now, after 20 seconds (while the screen is black) the camera seems to work. It looks like that it takes ages to get the preview Mar 31 13:01:04 strange behavior, bad release maybe Mar 31 13:01:16 After it has been loaded the preview it works when i try to open it again Mar 31 13:02:01 set camera=null Mar 31 13:02:33 i do, straight after stopPreview Mar 31 13:03:27 and before, camera.release() Mar 31 13:03:42 camera.stoppreview Mar 31 13:04:23 yeah. evrything is there in onDestroy. stopPreview, release, camera = null Mar 31 13:06:06 onDestroy only? Mar 31 13:06:27 StingRay_: so all I need is apache, php and my sql nothing else right. no soap or rest Mar 31 13:06:43 yeah. because ondestroy is always called Mar 31 13:06:54 there's no onResume, onPause in a service Mar 31 13:07:06 onStop ? Mar 31 13:07:06 coco89: what you need depends on what you want Mar 31 13:07:21 coco89: but thats a web dev question more than android dev Mar 31 13:07:30 misterli : super.onDestroy() ? Mar 31 13:07:32 StingRay_: student data (username and pass) and timetable Mar 31 13:07:46 *fake data Mar 31 13:08:20 There's no onStop. Yeas. super.onDestroy is called. It's overwritte. I Debug with the logger to check if onDestroy is thrown/called. It is Mar 31 13:09:03 onDestroy must call super.OnDestroy Mar 31 13:09:25 at the end Mar 31 13:10:41 hey guys...is there any way to port my iPhone Whatsapp Chats over to Android Whatsapp? Mar 31 13:10:50 Tried it out if there's really a different by calling the super.onDestroy before or after my Code in onDestroy. No changes. Even if super.onDestroy is called before my finalizing code it's still processed Mar 31 13:12:51 misterli : no idea, try a new simple camera project to identify what's wrong Mar 31 13:26:11 ReGiStRaS. Yes. It is. Mar 31 13:33:00 Oh, it looks like that its working with other devices. Just my Galaxy S3 has some problems with that Mar 31 13:51:07 Is the ACTIVE / TOTAL INSTALLS live in the google console? Mar 31 13:53:23 Updated once a day or something Mar 31 13:55:09 Thanks SimonVT that makes sense :) Mar 31 14:09:52 Hello. Can i sign up to Google Play as developer for free? Mar 31 14:10:45 no Mar 31 14:12:42 SimonVT: do you use otto ? Mar 31 14:12:54 Yeah Mar 31 14:13:18 if I extend a data type is that classed as "new" by the register ? Mar 31 14:13:35 or will it and the base class be as one ? Mar 31 14:13:48 wut Mar 31 14:14:05 myobject is registered Mar 31 14:14:23 my2ndobject extends myobject Mar 31 14:14:46 cause otto uses the data type for registration right ? Mar 31 14:14:55 that looks like a very handy and simple library to use Mar 31 14:16:00 my2ndobject would also be delivered to subscribers to myobject iirc Mar 31 14:16:08 ok cheers Mar 31 14:16:14 I believe it iterates through the entire class hierarchy Mar 31 14:16:18 Including interfaces Mar 31 14:16:32 well I wondered since you cant subscribe on base clases Mar 31 14:16:45 Oh wait Mar 31 14:16:56 I got it wrong Mar 31 14:17:02 I thought you were posting my2ndobject Mar 31 14:17:20 Yeah, you can register myobject, but only subscribers in my2ndobject will get events Mar 31 14:18:32 JakeWharton: said that it will iterate though base classes in next release (bout 4 weeks or so) Mar 31 14:18:42 yeah Mar 31 14:20:01 I think that'll happens at compile time tho Mar 31 14:20:22 Right now it iterates through methods at runtime to look for subscribers, etc Mar 31 14:20:44 That's why it doesn't look through super classes, would be too slow Mar 31 14:20:48 so use increases overhead Mar 31 14:21:57 Yeah, there's some overhead Mar 31 14:22:00 Not too bad Mar 31 14:22:25 k thanks Mar 31 14:26:10 is it the acceptable when creating a fragment to have an instance return method so I can pass it quite a big config object ? Mar 31 14:26:16 or is that silly ? Mar 31 14:35:12 layout phase happens before onResume, right? Getting an error in maps api while calling newLatLngBounds() in onresume Mar 31 14:38:42 Can somebody explain me map coordinates? http://nutiteq.github.com/hellomap3d/javadoc/com/nutiteq/MapView.html#setFocusPoint%28double,%20double%29 I am trying to use google maps coordinates there but I always get some location from equetor and not from Northern Europe Mar 31 14:39:32 new MapPos(56.9396, 24.2040) Mar 31 14:40:44 well for one map coords generally are in latitude/longitude not x/y Mar 31 14:49:51 ah Mar 31 14:49:54 figured it out Mar 31 14:49:57 friendsList = new ArrayList>(); was missing! Mar 31 14:50:27 Hello, I've a question regarding building an apk with the ADT bundle. Building an apk works fine. Under assets\www there are some PHP files (I've copied a mobile webpage including server side scripts). How can I exclude all PHP files when building an apk? Mar 31 14:53:11 I've already tried to put in my build.xml but without any effect. Mar 31 14:55:21 oh cool listview automatically appends items! Mar 31 14:56:32 well you have to manage the source Mar 31 14:57:01 and unless you append / sort the adapter yourself, pretty sure it just re-reads full source data Mar 31 14:57:05 could be wrong Mar 31 14:57:06 I don't get it. isn't 56.9396 latitude and 24.2040 longitude? Mar 31 14:58:14 i got a small problem. my app is shipped with a sound. now i want to make this sound chooseable. i tried ringtonepreference but there i cannot set an other sound than the system default as default sound. how could i do this best? Mar 31 14:58:35 i dont know, all i know it i have it to get data and out into a list when a button is clicked, clicked it twice, repeated the data straight after Mar 31 16:00:06 When I expand my expandable listview, some of the children arent visible..is there anyway to scroll through the individual expandable listview to see the children? It only has one group, and multiple children Mar 31 16:00:53 Good morning freenode Mar 31 16:02:28 good evening ^^ Mar 31 16:21:14 Wuold it be better to use fragment activity from android.support or from ABS? Mar 31 16:22:04 Nvm I would have to Use ABS anywya Mar 31 16:22:17 silly me Mar 31 16:52:54 just out of curiosity could someone briefly explain a use case for Otto? does it work for say message passing between services and activities Mar 31 16:54:07 if so that seems pretty OP Mar 31 17:17:27 is there a standard "pinned" icon we can use for android? Mar 31 17:30:11 hi, is there a way these days to get facebook contact pictures from the phone? Mar 31 17:37:06 anyone knows? Mar 31 17:54:49 when setting up StrictMode, is penaltyFlashScreen disabled for production devices? Mar 31 17:55:17 I set it up so it should flash the screen and I know a violation occured since it's printed in the log, but no screen flash Mar 31 17:56:39 it's not disabled on production devices Mar 31 17:59:25 well, i tried on a n4 and it didn't flash Mar 31 18:01:40 hello, any way to customize the my location marker in google maps, so that the "go to my location" button will still work ? Mar 31 18:20:47 stork: sure it does Mar 31 18:21:12 are any of you aware of a site that might teach me viewPager as if I'm a complete moron, cause reading 7-8 different tutorials on the net.. Mar 31 18:21:19 they are all different and I still dont get it Mar 31 18:23:09 stork: how about this use case: 10 different places in your app need to listen for location updates Mar 31 18:25:44 Biggest advantage to Otto: You don't have to pass around objects everywhere, attach countless listeners, etc Mar 31 18:25:49 Just register and @Subscribe Mar 31 18:29:12 is there a way to set the language of the developer console? It translates reviews to Dutch, but translations to English are usually much better Mar 31 18:29:53 the old console is in English like I want it :( Mar 31 18:37:39 Starting to think viewPager is the wrong thing for me here Mar 31 18:37:44 pffffffffffffffff Mar 31 18:40:54 Android is amazing. :) Mar 31 18:41:05 F**k android :P I'm stuck Mar 31 18:41:16 Why? Mar 31 18:41:43 I really like developing apps for it. Basic ones but they at least worked. :D Mar 31 18:42:21 I wanna learn an implement a viewPager.. so I can swipe through 4 fragments inside one activity.. Mar 31 18:42:25 Shame I didn't find this channels earlier. Mar 31 18:42:40 half the tutorials I find are either completely outdated or too different from what I wanna do Mar 31 18:42:50 Yo everybody Mar 31 18:42:57 Have you checked SDK samples? Mar 31 18:43:00 So I have a project that is using nothing but activities at the moment . . . Mar 31 18:43:33 But I feel that the UI would be better served by using Tab Fragments to swipe between certain sections, how hard is it to convert from an activity to Tab Fragments? Mar 31 18:44:13 yes Furai. I dont get them and I can't even find a video tutorial on youtube about it either Mar 31 18:44:32 P3nnyw1se: whats your prob ? Mar 31 18:45:51 I've read this Mar 31 18:45:52 http://developer.android.com/training/animation/screen-slide.html Mar 31 18:46:01 and this Mar 31 18:46:02 http://android-developers.blogspot.dk/2011/08/horizontal-view-swiping-with-viewpager.html Mar 31 18:46:11 http://www.edumobile.org/android/android-beginner-tutorials/view-pager-example-in-android-development/ Mar 31 18:46:13 this and a few more Mar 31 18:46:19 and I dont get it .. its as simple as that Mar 31 18:46:34 what dont you get ? Mar 31 18:47:10 like this tutorial Mar 31 18:47:10 http://www.edumobile.org/android/android-beginner-tutorials/view-pager-example-in-android-development/ Mar 31 18:47:25 got stuck right away doing the Mar 31 18:47:34 public Fragment getItem(int position) { switch (position) { Mar 31 18:47:34 case 0: Mar 31 18:47:34 return new DetailFragment(); Mar 31 18:47:57 tells me I can't return DetailFragment I should return Fragment.. eventhough DetailFragment extends Fragment Mar 31 18:48:11 oy Mar 31 18:48:42 does it extend the right fragment Mar 31 18:49:22 it just extends Fragment Mar 31 18:49:27 as it does in the guide Mar 31 18:49:47 well what's the exact error Mar 31 18:49:54 and please don't paste multiline in the chat Mar 31 18:50:06 but does it extend the right fragment... there's one in support library and one in the SDK Mar 31 18:50:38 the exact error is that the 'public Fragment getItem(); .. Change return value 'Fragment' to DetailFragment Mar 31 18:50:46 when I attempt to return DetailFragment in a case Mar 31 18:50:52 and DetailFragment extends Fragment Mar 31 18:52:04 will look Zharf Mar 31 18:53:15 android.support.v4.app.Fragment Mar 31 18:53:18 yeah its the same one alright Mar 31 18:56:29 baah I need some video tutorial or some crap.. Mar 31 18:56:33 I've starred at the code of this one Mar 31 18:56:34 http://developer.android.com/training/animation/screen-slide.html Mar 31 18:56:40 and obviously I just can't wrap my head around it Mar 31 18:57:01 P3nnyw1se: what bit though ? Mar 31 19:00:10 well looking at that one I can't figure out how it knows where it is at any point Mar 31 19:00:28 the adapter Mar 31 19:00:35 you know how a listView works ? Mar 31 19:00:40 and adapter ? Mar 31 19:01:23 I've seen one implemented a few times. its like a scroll List right ? Mar 31 19:01:30 ah ok Mar 31 19:01:41 you probably need to go though the tutorials/learning Mar 31 19:02:06 http://developer.android.com/training/index.html Mar 31 19:03:32 mmm okay.. if you think so.. I dont see how learning about activity life cycles and supporting different language will help on the viewPager but okay Mar 31 19:03:54 well only go though what you dont understand Mar 31 19:04:15 but you should really know how dynamic views are driven by adapters Mar 31 19:04:25 and what those adapters are, and how they can be used Mar 31 19:05:24 alright so my guess is an adapter holds and discards the current views as you slide through them.. Mar 31 19:05:28 is there a section especially for adapters ? Mar 31 19:05:43 Hi Mar 31 19:05:49 tbh not sure, but any good listView tut will do Mar 31 19:06:19 it sort of seems like it might be useful for me JakeWharton (writing an audio streaming app) but at the same time I think it might be a bit heavy.. I don't need *objects* really, just signals Mar 31 19:06:55 I dont at all counter the argument I should read up on stuff.. but I'm not sure what will have direct influence on this, but you say listViews Mar 31 19:07:41 well if you dont understand the listView > adapter > data relations Mar 31 19:07:46 your a bit in trouble Mar 31 19:09:01 but looking at the link you provided Mar 31 19:09:06 I cant pin that out Mar 31 19:10:09 http://developer.android.com/guide/topics/ui/layout/listview.html Mar 31 19:10:45 stork: You probably have a service that handles all the streaming etc. When you launch your activity, you need to get state from the service to the activity to show what is playing, etc. With Otto your service just registers as a producer and posts events when the state changes, and the activity just registers as a subscriber. Mar 31 19:10:55 spank u.. this is beyond my teachings atm. I guess I would simply be at the 'getting started' one Mar 31 19:11:07 but I want this to work Mar 31 19:11:28 That's a lot easier than the usual ways you'd communicate between an activity and a service Mar 31 19:12:04 aye, I won't arge with that - it'd also let me control from the fragments as well without doing some weird magic Mar 31 19:12:07 arguehttp://www.ah.fm/stats/mobileschedule.txt* Mar 31 19:12:17 ugh right click paste. Mar 31 19:13:31 but passing messages around - isn't that a bit cumbersome if all I really want to pass is a started/stopped event? Could I use it for say enum passing? Mar 31 19:13:40 StingRay Mar 31 19:13:51 you mind taking a look at these titles.. and tell me if this is completely outdated Mar 31 19:13:51 http://thenewboston.org/list.php?cat=6 Mar 31 19:14:33 I see they were added during the summer 2011 Mar 31 19:15:40 dunno, but dont seem to be a good listView one there Mar 31 19:15:54 nothing about adapters either Mar 31 19:16:05 Java enums are objects as well Mar 31 19:16:25 so I could use enums or little stub objects Mar 31 19:16:27 P3nnyw1se: well there is an arrayAdapter Mar 31 19:16:30 like a wrapper round a string or something Mar 31 19:16:35 but pretty worthless I think Mar 31 19:16:37 could be wrong Mar 31 19:17:32 well I'm reading the link you provided on adapters.. not that much text on it, but can go on to listView from there Mar 31 19:17:36 Anyone here use X Y Chat IRC? Mar 31 19:17:52 Sure, I guess that would be possible Mar 31 19:17:52 Nvm offtopic Mar 31 19:18:18 so an adapter is a dynamic way to shift views Mar 31 19:18:34 Stingray would I be way off to assume its what the FragmentManager is to Fragments ? Mar 31 19:19:01 no Mar 31 19:20:03 listView = TV adapter = lazerHead data source = optical media Mar 31 19:20:05 :) Mar 31 19:20:40 Hi there, I have downloaded the SDK and the source, but when the debugger stop at a android class, it doesn't show the source. How I can configure it so that it is dislayed the source instead of the .class Mar 31 19:20:58 lol :P ehm.. that example will probably make sense at some point to me Mar 31 19:21:27 Does the play store use fragments when it allows you to switch between the "top paid" and "top free" Mar 31 19:21:31 but I guess you mean the adapter is used to switch Mar 31 19:22:43 well you would expect the laser to move and get stuff Mar 31 19:22:55 across he optical surface Mar 31 19:22:59 the* Mar 31 19:23:10 I expect the laser to switch something but not actually hold anything itself Mar 31 19:23:23 indeed Mar 31 19:23:32 but it reads it and passes it on Mar 31 19:24:16 In iphone apps, we are able to get the device's UDID to use as a unique device identifier. Does the getDeviceId() method do the same for android devices? Mar 31 19:24:18 and fyi in the read head or close to it is probably a nice buffer and ec chip too Mar 31 19:24:21 :) Mar 31 19:28:21 so far I've had to read 6 chapters in the book.. 1: getting Started 2: Activity, Fragments 3: User Interfaces 4: Views 5: pictures, menus: 6: Data Persistences Mar 31 19:28:28 this book has a lot of focus on the GUI Mar 31 19:28:35 I thought Apple is going to stop accepting apps that access the UDID soon Mar 31 19:28:54 SimonVT_: next month I think Mar 31 19:29:07 well end of iirc Mar 31 19:29:30 There you go williehurl9, it's a bad approach on both platforms. Don't do it Mar 31 19:29:36 Read this instead: http://android-developers.blogspot.dk/2011/03/identifying-app-installations.html Mar 31 19:30:59 hello, someone here knows a brazilian andorid-dev channel? Mar 31 19:31:01 9 pages on ListView in my book.. all about creating a String array and displaying that... Mar 31 19:31:02 ........ Mar 31 19:31:20 i need to ask about specific quetions about android in brazil Mar 31 19:32:04 P3nnyw1se: dont matter what the data source / object type is Mar 31 19:32:14 could be a list, array, cursor Mar 31 19:32:22 tis the concept you need to nail Mar 31 19:32:45 yeah I'm just trying to locate some good ABC turtorial about it Mar 31 19:32:50 my book avoids the subject Mar 31 19:35:11 hi, is there a way these days to get facebook contact pictures from the phone? ( without using graphapi ) Mar 31 19:36:10 FragmentPageAdapter!!! I need to learn about this Mar 31 19:36:11 * P3nnyw1se reading Mar 31 19:39:48 well it not that Mar 31 19:40:06 it's the concept of view controller, adapter, data Mar 31 19:40:20 I'm hoping i'm starting to get that.. its included Mar 31 19:40:28 ok cool Mar 31 19:40:29 let me write you something and you tell me no/yes Mar 31 19:40:54 ok, you know I'm a vfx/designer/arty person right ? Mar 31 19:40:59 just checking :) Mar 31 19:41:37 yeah yeah :P but youre still way better at this than I am Mar 31 19:41:40 I'm still trying to grasp concepts Mar 31 19:42:43 so I could theoretically have an ArrayList of my Fragments.. based on some UniqueID in each fragment.. Mar 31 19:43:01 aapt fails while building an apk while using zip, I get a ftruncate error, invalid argument, but I can't seem to get more data, does anyone know if there's a way I can get aapt to dump the commandline it uses? Mar 31 19:43:02 when someone wants to slide through the fragments Mar 31 19:43:10 SimonVT_: hmmm, it doesn't look like any of those will work for me. My app has a particular need for uniquely identifying different devices, even after a device wipe. Mar 31 19:43:30 myAdapter is told to what position it wants to slide.. so it sets the position in the ArrayList of Fragments Mar 31 19:43:38 P3nnyw1se: well you could use the "array index" for such things no ? Mar 31 19:43:41 :) Mar 31 19:44:00 hence why you see swtich(position) Mar 31 19:44:04 and case 0,1,2,3 Mar 31 19:44:39 P3nnyw1se: yes Mar 31 19:44:40 I'm still not quite there I suppose.. but lets say it was case 2 .. and that was fragment 2 Mar 31 19:44:46 I would set the contentView to fragment 2 ? Mar 31 19:44:48 Hey guys Mar 31 19:44:49 I got a question Mar 31 19:44:54 P3nnyw1se: no Mar 31 19:45:05 I'm developing an app that passes in a playlist to a service Mar 31 19:45:16 it's a kinda acyclic thing Mar 31 19:45:20 But when the user builds a new playlist, I want to send this new playlist to the service . . . Mar 31 19:45:51 okay.. well I'm familiar with cyclic arrays..made one as a test once.. but I used 2 pointers Mar 31 19:45:54 'start, end' Mar 31 19:45:56 listView <> adapter >data < adapter > listView Mar 31 19:46:02 Should I send it via a Serializable extra and broadcast receiver? Or should I unbind the service and rebind it with a new list of objects? Mar 31 19:46:25 viiralvx: you can send messages to a bound service via the channel established during bind Mar 31 19:46:53 dragorn: Ah, really? What should I use? A MessageHandler? Mar 31 19:47:00 P3nnyw1se: but yes, adapter handles the data, get the fragment at position and feeds that to listView/viewPager whatever Mar 31 19:47:04 viiralvx: check the example service in the docs; they set it up. But yeah as I recall. Mar 31 19:47:15 dragorn: All right, I'll try that, thanks. Mar 31 19:47:35 alright slowly grasping adapters I guess.. its a little different from the adapter concept I know from java Mar 31 19:48:15 another way to look at the control side of it is replace the data source with a database Mar 31 19:48:16 dragorn: You wouldn't happen to know the difficulty of converting a multiple activity screen app to a tab fragment, would you? Mar 31 19:48:48 listView detects scroll/swipe and asks adapter for info, cause it has nothing to view or needs a new view Mar 31 19:48:56 viiralvx: probably depends on a lot of things, if you can cleanly convert your activities to fragments it's probably fairly simple Mar 31 19:48:58 adapter gets the position that the listView wants Mar 31 19:49:13 then tells the database to go to that row and get the data Mar 31 19:49:17 viiralvx: in general it's not too tricky Mar 31 19:49:25 viiralvx: especially for simpler activities Mar 31 19:49:31 then builds the view in getView / bindView Mar 31 19:49:40 and gives it to the list Mar 31 19:49:54 dragorn: I've never done fragments before, so I'm curious about the entire process of it . . . I've only used activities, my activity right now is relatively simple. I have a "Currently Playing/Playlist" activity with all the music controls and the playlist. Mar 31 19:50:07 the view just displays Mar 31 19:50:12 the adapter just tells what to display Mar 31 19:50:13 ? Mar 31 19:50:15 the listView can also help by passing a recycled view (thats not on screen) for the adapter to re-use Mar 31 19:50:23 dragorn: And then separate activities for Genre playlists, user playlists, etc. . . but I think those would look better in a tabbed layout Mar 31 19:50:54 but in the end the listView/viewPager gets the view back populated and shiny Mar 31 19:51:20 How do i add long text to a TextView with ... Mar 31 19:51:50 How do i get a textview to hide overflow with ... to show there is mode? Mar 31 19:51:53 more* Mar 31 19:52:11 viiralvx: it's not much of a hassle to convert to fragment. You can look at stuff like the actionbarsherlock examples for some nice fragment use code Mar 31 19:52:21 so making this into a childrens show... Mar 31 19:52:22 dragorn: Good stuff, all right, sounds good! Thanks. Mar 31 19:52:23 viiralvx: (which you'll probably want if you're targetting older androids anyhow) Mar 31 19:52:33 do0ob set ellipsize to "end" Mar 31 19:52:40 dragorn: Yeah, I'm using ABS in my application, not sure how well it plays with the older devices, I don't have any to test on and my emulator blows. Mar 31 19:52:48 basicly the viewPager is told 'You're suppose to switch from 2 -> 3' .. and the viewPager asks the Adapter for '3' .. Mar 31 19:53:08 viiralvx: it plays pretty nice. The example code will give you a lot of fragment implementations to look at, too Mar 31 19:53:10 and the adapter makes the actual swap Mar 31 19:53:28 dragorn: Good stuff, good stuff. All right, I know that this app is due in like 3 weeks, so I have to get everything ironed out soon, haha. Mar 31 19:54:26 I see what you mean now I hope StingRay Mar 31 19:54:43 someone please, knows a brazilian chat of android? Mar 31 19:54:47 viiralvx: deadlines make you concentrate :) Mar 31 19:55:03 dragorn: Along with other crap like Theory of Computing exams and Operating Systems exams, it makes me stress. Mar 31 19:57:22 I have a 'ServerApi' class how would I pass it from the mainactivity to another so it can be used there? Mar 31 19:57:52 viiralvx: "it's all broken" and "they all suck". There you go, get an A. :P Mar 31 19:58:08 viiralvx: Hahaha, if only it was that easy. u_u Mar 31 19:58:30 viiralvx: not saying it's all done the best way, but feel free to look at http://kismetwireless.net/android-pcap/ ... There's a link to the git source there Mar 31 19:58:46 viiralvx: that does service message passing and various fragment stuff Mar 31 19:58:53 dragorn: Much appreciated. Mar 31 19:59:31 tibbi: thats it, but i don't want it to split at whitespace Mar 31 20:00:10 aha, not sure then Mar 31 20:00:21 try some other ellipsizes too :p Mar 31 20:01:03 eclipse errors out on start and middle, marque acts the same as end Mar 31 20:01:30 so far i always wanted it to split at whitespace Mar 31 20:01:34 not in the middle of some word Mar 31 20:02:32 tibbi: i'm trying to show as much information as possible, i'm going to use android:scrollHorizontally with it Mar 31 20:14:07 hell Mar 31 20:14:09 o Mar 31 20:15:13 is there an alternative to async task ? Mar 31 20:18:23 thread Mar 31 20:18:27 handler Mar 31 20:18:34 a service Mar 31 20:18:44 with threads or async Mar 31 20:19:05 just use async task Mar 31 20:19:14 or write in C# with mono and use other stuff Mar 31 20:46:22 * P3nnyw1se slaps StingRay_ around a bit with a large trout Mar 31 20:46:24 u here ? Mar 31 20:47:39 anyone confident about viewPagers ? Mar 31 20:49:43 sup? Mar 31 20:50:22 I'm just wondering this is all the code the main Activity has in a viewPager example Mar 31 20:50:34 mAdapter = new MyAdapter(getSupportFragmentManager()); Mar 31 20:50:34 mPager = (ViewPager) findViewById(R.id.pager); Mar 31 20:50:34 mPager.setAdapter(mAdapter); Mar 31 20:51:18 hmm I guess I'm confused as to how I apply that Mar 31 20:51:20 to my 3 buttons Mar 31 20:52:25 nevermind Stingray.. trial and error.. will implement it and change it around Mar 31 20:52:27 untill it works Mar 31 20:55:37 P3nnyw1se: get enough monkeys in front of a computer, and you'll eventually have your program Mar 31 20:56:01 u talking from experience ? :) Mar 31 20:56:04 or a sufficiently tenacious monkey Mar 31 20:56:09 s'always worked for me Mar 31 20:59:08 well I just followed your advice and it was HORRIBLE!.. it smashed my keyboard and flinged its own droppings at the monitor then left Mar 31 20:59:18 I'l admit its an improvement but this app is still not rdy Mar 31 21:06:39 Wow ... I swore JAVA would let me do: Mar 31 21:06:41 FOOBOOLEN ? varX++ : varY++; Mar 31 21:08:00 You should be able to, but not as a standalone statement Mar 31 21:08:05 you would have to assign the result to something Mar 31 21:08:19 or otherwise use it in an if statement, etc. Mar 31 21:08:31 the varY++ Mar 31 21:08:36 needs some Mar 31 21:08:40 ehm :P.. reason Mar 31 21:08:43 to exist Mar 31 21:08:45 what Jesus says Mar 31 21:09:16 FOOBOOLEN = true ? varX++ : FOOBOOLEN = false varY++; Mar 31 21:09:22 like that right ? Mar 31 21:09:26 no Mar 31 21:09:39 result = (FOOBOOLEAN ? varX++ : varY++ ) Mar 31 21:09:53 oh I assumed he used it in a return statement lol Mar 31 21:09:55 dunno what Mar 31 21:09:57 why Mar 31 21:10:13 is there a way to scroll at bottom and be able to select at that list without it scrolling to the bottom Mar 31 21:10:13 ? Mar 31 21:10:48 waa ? :) Mar 31 21:11:12 scroll to the bottom of what? Mar 31 21:11:12 if i set transcript mode it doesnt work as i want Mar 31 21:11:16 ListView Mar 31 21:11:25 just a cheat way to do if (foo) varX++; else varY++; without the else ... i think javascript and/or C++ lets me Mar 31 21:11:26 ahh.. ***** listView :P Mar 31 21:11:31 dunno Parhs Mar 31 21:11:42 * P3nnyw1se slaps capella around a bit with a large trout Mar 31 21:11:45 setSelection seemed to work Mar 31 21:11:49 capella it works but as JesusFreak says Mar 31 21:11:54 its like saying 2+2 Mar 31 21:11:57 but has a glitch and scrolls near to end not end Mar 31 21:12:02 you need it to be int = 2+2 Mar 31 21:12:17 yah but i DONT NEED THE |return| Mar 31 21:12:18 Ah well tinkering on Ham and Chocolate day Mar 31 21:12:23 oops caps Mar 31 21:14:50 yah ! javascript is happy to do: Mar 31 21:14:51 2-2 ? alert("hi") : alert("bye"); Mar 31 21:15:13 interesting! (but stupid) :D Mar 31 21:16:25 javascript is happy to do just about anything Mar 31 21:16:38 it's a dirty whore Mar 31 21:16:41 although it's rarely what you want it to do Mar 31 21:17:58 I know ... but my latest project has me working in javascript ... I hack contributions to Mozilla Mobile, so I'm split between JAVA (the right way) and Javascript (the evil horrible vile nasty way) Mar 31 21:28:10 Small question: What is the best way to time how long it takes to display a fragment? Mar 31 21:29:16 dont know my first suggestion would be Junit somehow start a timer there when it begins Mar 31 21:30:12 hello! :) Mar 31 21:32:07 I have a multi lined about that I added to strings.xml that i show in the about page of my android application. the problem is that when people click on the about page. all the new lines that I added are trimed. Mar 31 21:32:13 P3nnyw1se: Thanks. I'll see if I can do some more research about it. Mar 31 21:32:35 I just tried uploading a new version of my app to google play, but it failed with a message saying that I used a different certificate to sign the new APK from the previously uploaded APKs. The machine I signed the previous ones with is gone (fried, kaput). What should I do now? Mar 31 21:32:37 ufk: What do you mean trimmed? Sounds like a problem with the text view getting clipped? Mar 31 21:32:50 williehurl9: I think you're screwed :-( Mar 31 21:32:59 williehurl9: Gotta change the package name Mar 31 21:33:18 no it's not getting cliped. it's like maybe the textview is converting the text to a different format and maybe i need to use something else for new lines or something like that Mar 31 21:33:44 all that spaces that i add and new lines are converted to one space. Mar 31 21:34:08 ufk: oh. hmm Mar 31 21:34:20 ufk: Are you using XML encoding in the strings.xml? Mar 31 21:34:24 hwrd|work. Oh, OK, so if my package name was com.foo.App, then I can just change it to com.foo.App2 and I should be good? Mar 31 21:34:35 in eclipse in the graphical layout i see the about page properly. but when I execute the application the problem occurs Mar 31 21:34:41 XML encoding?! ahm.. Mar 31 21:34:56 utf-8 Mar 31 21:35:04 that's what you mean? Mar 31 21:35:14 ufk: Yeah… you might need to convert those newlines into "&newlineStupidXMLChar;" things Mar 31 21:35:34 williehurl9: yeah. You have to make a new package entirely. Losing the key is Very Bad in general. Mar 31 21:35:54 williehurl9: calling it whatever2 would work. You won't be able to publish any changes to the existing one. Mar 31 21:35:59 oh Mar 31 21:36:26 ok... how do i get the proper char for new line ? :) Mar 31 21:36:36 ufk: Oh I'm sorry Mar 31 21:36:39 ufk: Look here: http://developer.android.com/guide/topics/resources/string-resource.html Mar 31 21:36:42 thanks Mar 31 21:36:52 Formatting and Styling section. You can probably wrap your whole string in quotes or somehting similar Mar 31 21:36:52 dragorn: yeah, it's sort of ok for now. This is my first android app and I'm just testing out how to work with the app store. So, going forward I'll know to backup my keystore ;) Mar 31 21:39:18 ok cool \n is new line :) Mar 31 21:39:22 thanks Mar 31 21:42:11 Hmmm, how do I change the package name in the app store? Mar 31 21:42:36 I'm there in apps/publish, but the Package name does not seem to be editable Mar 31 21:42:38 ok I hate eclipse more than I did 2 hours ago Mar 31 21:43:32 i'm trying to add google ads to my app. it seems that i need to publish my app in the store without google ads before i get permissions to add google ads to it. is it right ? Mar 31 21:43:50 with the google admob sdk Mar 31 21:44:43 You can't change the package name of an app in play store Mar 31 21:45:11 SimonVT: Oh, OK. So do I have to create an entirely new app? Mar 31 21:45:32 If you want to change the package, yes Mar 31 21:47:14 Is there any viewpager like menu slider library? Mar 31 21:48:27 is there a nice textview text editor for osx ? Mar 31 21:48:35 Lmao thanks JakeWharton Again. Mar 31 21:48:36 I have found the keystore file that I signed the original APKs with. I've exported the app and selected that original keystore, but I'm still getting the failed APK upload to the app store. I'm on a different machine from the one that I originally uploaded the APKs from. Shouldn't this be working since I have the correct keystore file? Mar 31 21:48:50 o_O Mar 31 21:48:57 ufk: np Mar 31 21:49:01 JakeWharton, ViewPagerIndicator Mar 31 21:49:11 oh, nice Mar 31 21:49:15 so am I right in aying that with Otto I need a single instance of Bus in a singleton, or does it handle that magic for me? Mar 31 21:49:25 JakeWharton, you always saving my ass Mar 31 21:49:27 you do it Mar 31 21:50:29 you need a cape. Mar 31 21:51:54 JakeWharton.. hmm why do I know that name Mar 31 22:00:40 if I need to use FragmentPagerAdapter in a viewPager example.. Mar 31 22:00:49 and it only exists in android.support.v4.app.. Mar 31 22:01:06 would you suggest I change all my android.app.fragments and fragment manger to support.v4.app ? Mar 31 22:01:24 if you are using native fragments there's a native fragment pager adapter in the v13 support library Mar 31 22:01:48 hmmm. Mar 31 22:01:49 I see Mar 31 22:03:06 I guess there is really no reason to not use v4.app Mar 31 22:03:17 as I already make use of stuff thats not backwards supported Mar 31 22:05:56 There's really no advantage to using the native fragments. With the support library you get the entire fragment api on all api levels, including bug fixes Mar 31 22:06:31 I see Mar 31 22:07:34 allright, so in the Dev Console, I have 2 options: "Add new Application" and "Add new awesome application" Mar 31 22:07:45 brace yourselves, April 1 is coming Mar 31 22:07:57 The second one is for holo apps Mar 31 22:08:19 * g00s isn't sure if he should take SimonVT seriously Mar 31 22:08:35 SimonVT: I think mean "including bugs" Mar 31 22:08:53 JakeWharton: Well, that as well Mar 31 22:09:05 I hope they fix some as well, not just introduce Mar 31 22:10:15 it's a silly joke Mar 31 22:10:37 well no it was pretty cool Mar 31 22:10:42 hmm sweet mersenne primes Mar 31 22:12:44 someone talk fragmentTransaction.replace with me please Mar 31 22:13:08 in native I just do (int, fragment) Mar 31 22:13:15 in support it wants (int,fragment,string) Mar 31 22:13:16 whats that about Mar 31 22:14:26 it's a tag Mar 31 22:14:35 so you can later see if it exists still Mar 31 22:14:49 findFragentByTag() i believe Mar 31 22:14:57 okay so it would make sense to name it the same thing as my fragment Mar 31 22:14:57 or grab a reference to it and call methods on it Mar 31 22:15:17 it's just a unique string Mar 31 22:15:26 what it is is not that important Mar 31 22:15:31 i'd just use some constant for it Mar 31 22:15:47 do I seriously Mar 31 22:15:51 need to add android.app Mar 31 22:15:54 infront of everything now Mar 31 22:16:13 no, fix your imports Mar 31 22:16:28 I thought I did.. hmm 2 sec Mar 31 22:17:31 hmm in my ft.replace statements Mar 31 22:17:50 it goes 'change xxxx(Fragment) into Fragment Mar 31 22:18:01 eventhough I applied each fragment to the support Mar 31 22:18:02 aswell Mar 31 22:19:47 thats weird guys.. after I changed my fragments to support.v4 and also in my main activity Mar 31 22:20:10 its goes.. replace.(int,Fragment,String) isn't applical for (int,MyFragment,String) Mar 31 22:20:20 why won't it accept my Fragment.. I changed that to be support aswell Mar 31 22:20:37 Did you use getSupportFragmentManager as well Mar 31 22:20:57 Did I use getSupportFragmentMananger you ask.!!! Mar 31 22:20:59 mmmm 2 sec Mar 31 22:23:05 No I did not Mar 31 22:25:46 oh... Mar 31 22:27:19 I'm confused.. isn't getSupportFragmentManager just for FragmentActivities ? Mar 31 22:28:36 yes Mar 31 22:28:59 And support library fragments are just for FragmentActivities Mar 31 22:30:24 I'm confused then.. online it says 'pre honeycomc = fragmentActivity' Mar 31 22:30:40 post honeycomb just use activity Mar 31 22:31:20 Then either they were wrong or you read it wrong Mar 31 22:31:30 Support library fragments = fragmentactivity, native fragments = activity Mar 31 22:32:02 StackoverFlow top answer with 25 thumbs up Mar 31 22:32:05 "If your project is targeting HoneyComb or newer only, you should use Activity and not FragmentActivity" Mar 31 22:32:59 http://stackoverflow.com/questions/10609268/difference-between-fragment-and-fragmentactivity Mar 31 22:33:23 P3nnyw1se: do what you want Mar 31 22:33:41 but as you have heard in here, there is no real reason to use native fragments Mar 31 22:33:55 when the support lib does everything + added adv. of older api Mar 31 22:34:02 I do what you guys suggest Mar 31 22:34:09 not correct Mar 31 22:34:17 how do you know some1 is correct Mar 31 22:34:25 I dont Mar 31 22:34:28 your in a room of diverse and opinionated people Mar 31 22:34:30 :) Mar 31 22:34:39 yes.. but this though seems black/white Mar 31 22:34:50 that site specifically says the opposite Mar 31 22:35:06 dont compare and contrast + - Mar 31 22:35:24 the site doesn't say the opposite Mar 31 22:35:28 if you dont have the knowledge to choose, aquire it Mar 31 22:36:09 It doesnt ? Mar 31 22:36:36 it says that native fragments are available on honeycomb and newer Mar 31 22:36:48 and that if you have to use them on pre-Honeycomb then you have to use the support library versions Mar 31 22:37:15 there is, however, nothing stopping you from using them no matter what you API level Mar 31 22:37:39 in fact, when you use the support library fragments on your API 7+ app it still uses them on Honeycomb and up Mar 31 22:38:28 I just paid attention to this Mar 31 22:38:29 If your project is targeting HoneyComb or newer only, you should use Activity and not FragmentActivity to hold your Fragments. Mar 31 22:38:58 That's a matter of opinion Mar 31 22:40:24 I'm going rogue then Mar 31 22:42:43 alright so I read this online Mar 31 22:42:48 please tell me if its 'true' Mar 31 22:42:50 "he FragmentActivity class adds a couple new methods to ensure compatibility with older versions of Android, but other than that" Mar 31 22:43:09 other than that its pretty much the same as Activity Mar 31 22:43:11 he goes on to say Mar 31 22:43:46 nevermind its irrelevant I picked one Mar 31 22:45:20 the tag is optional? the String tag? Mar 31 22:45:31 I'm not getting errors now, when not applied to the replace(); Mar 31 22:46:10 Hey I can ping my the website on my server using my Android device but I can't open it in my browser. My desktop however can access it Mar 31 22:46:38 Does anyone know what this could cause Mar 31 22:46:44 My server doesn't block anything Mar 31 22:49:24 i feel like I should learn how to use Dagger Mar 31 22:50:54 http://www.edumobile.org/android/android-beginner-tutorials/view-pager-example-in-android-development/ Mar 31 22:51:00 guys could you confirm something for me here Mar 31 22:51:18 if you scroll all the way down to his ViewPagerExample.java Mar 31 22:51:28 he has a switch statement with no 'breaks' in them Mar 31 22:51:29 ? Mar 31 22:51:32 isn't that a mistake Mar 31 22:52:11 praytell; how do break after a return? Mar 31 22:52:29 ... Mar 31 22:52:40 its 01:00 here Mar 31 22:53:01 excuses :p Mar 31 22:55:41 P3nnyw1se: So the day has just begun and you're already making mistakes like that? ;) Mar 31 22:57:01 there is no way in hell this viewPager is working on the first tryout of implement it into my app Mar 31 22:57:08 but ... here .. goes.. nothing 'click' Mar 31 22:59:16 hehe Mar 31 22:59:19 I was right Mar 31 23:00:49 why the hell would my app now not work in profileview Mar 31 23:00:53 but in landscape Mar 31 23:01:53 P3nnyw1se: I'm now pretty sure your randomly typing thoughts you have into here Mar 31 23:01:55 :) Mar 31 23:02:08 what gave it away lol :P Mar 31 23:02:35 I'm also quite confident that you have not done 80% of the into learning stuff on android.com Mar 31 23:02:36 so.. these 4 lines in my xml, make my app crash.. why Mar 31 23:02:36 :) Mar 31 23:03:08 Because of what StingRay_ just said. You're not done learning. Mar 31 23:03:33 Mar 31 23:04:16 I never at any point Mar 31 23:04:19 suggested I was done learning Mar 31 23:04:44 -> ger" , and <- Mar 31 23:05:22 quite how it has not thrown errors at the "," is odd Mar 31 23:05:39 :P Mar 31 23:05:42 dont tease me Mar 31 23:06:07 no I wasnt, it should have put nice big red x's there Mar 31 23:06:15 hehe Mar 31 23:06:47 the ',' Mar 31 23:06:52 of course was added here Mar 31 23:06:53 on mirc ;) Mar 31 23:06:59 oh Mar 31 23:07:04 http://i.imgur.com/AKmYgMm.png Mar 31 23:07:10 I found the mistake Mar 31 23:07:14 do you want to know what it is Mar 31 23:07:23 ;) Mar 31 23:07:25 is there a way to squeeze the images so button to fit ? Mar 31 23:07:28 big V i viewPager Mar 31 23:09:08 StingRay u know I havent done 80% of what you said.. but I'm not gonna crawl away when I run into subjects where you tell me the only way is to read it Mar 31 23:09:11 I read about adapters ;) Mar 31 23:09:23 after all Mar 31 23:09:44 ok now read everything but adapters and you should be fine Mar 31 23:10:04 awww I'm not that bad am I ? Mar 31 23:10:21 you ask questions where the answers are quite clear Mar 31 23:10:33 sometimes in here that will make ppl not want to answer Mar 31 23:10:46 as when answering, you then form new questions Mar 31 23:10:49 I posted 4 xml statements and asked for the error Mar 31 23:10:52 that again are clear in the tuts Mar 31 23:11:04 and thus the cycle goes on and on :) Mar 31 23:11:21 I was on about portrait landscape Mar 31 23:11:26 supportLib Mar 31 23:11:28 etc Mar 31 23:11:50 yeah and I made it work :) so maybe I dont do things in the right order, but I learn stuff everytime Mar 31 23:11:57 I will accept the silent treatement if you guys give it to me Mar 31 23:12:00 not much I can do about that Mar 31 23:12:06 well there is Mar 31 23:12:08 and Mar 31 23:12:14 there is a way you can progress faster Mar 31 23:12:46 I've glanced over the pages you gave me.. some of it.. and I'm not getting my hands dirty with them Mar 31 23:12:52 maybe I'm just weird but I dont learn from reading 100 pages Mar 31 23:12:55 I learn from trying and failing Mar 31 23:13:18 I can't remember half that stuff when I'm done with the page Mar 31 23:13:34 as some1 who has had to study both learning and teaching, I think thats wrong Mar 31 23:14:01 breakthroughs are made by leaps from clear knowledge of a subject into the unknown Mar 31 23:14:03 And what are you gonna try? Code that you make up? Thinking about what the possible classes you need could be called? Thingamajig.java? Mar 31 23:14:26 kakazza.. 4 days ago I had never tried working changes in landscape mod.. Mar 31 23:14:36 I hassled StingRay about it for 1 hour.. read stuff online Mar 31 23:14:38 and more stuff and more stuff Mar 31 23:14:44 and now I have a working implementation Mar 31 23:15:05 And possibly half knowledge. Mar 31 23:15:13 probably :) Mar 31 23:15:15 P3nnyw1se: but you will have missed sooooo much Mar 31 23:15:18 :) Mar 31 23:16:08 compromise StingRay.. you answer my idiotic questions and when I bring them to you and you ask me to read up on a specific subject. I will :P Mar 31 23:16:10 how about that ;) Mar 31 23:17:22 hey like I said not only am i a noob, I'm more an artist than a dev Mar 31 23:17:29 there is but one difference between us Mar 31 23:17:36 I read the docs ;) Mar 31 23:18:21 yeah well I know what works on me.. I read the chapters and I reac docs, but wanting to create fragments the first hour.. reading about fragment manager and transactions Mar 31 23:18:27 that motivated me a lot better Mar 31 23:18:30 than just reading pages Mar 31 23:18:33 but I guess thats just my flaw Mar 31 23:19:06 no, thats just the way most want to do it Mar 31 23:19:24 but almost always thats either wrong, or the slowest approach there is Mar 31 23:19:48 and just a fact, its not like I'm completely oblivious at all times.. sometimes I just blurp out questions without thinking it through Mar 31 23:20:04 most times Mar 31 23:20:08 you said it yourself, writing thought Mar 31 23:20:13 133 words a minute according to an online test Mar 31 23:20:37 anyways, just thought I would offer a perspective Mar 31 23:20:54 cause I have had experience in such things Mar 31 23:20:57 I'm drowning in xml files :( Mar 31 23:21:08 well your perspective is probably true.. but if I'm placed at a desk reading docs Mar 31 23:21:19 I'm gonna be watching tv in 20 minutes... I need to mix it up Mar 31 23:21:20 at least Mar 31 23:21:23 can i roll button.xml button_normal.xml button_pressed.xml button_focused.xml into one? Mar 31 23:27:42 do0ob: u mean drawables ? Mar 31 23:27:55 never done that before Mar 31 23:27:55 yea Mar 31 23:28:15 how would a state list (selector) reference them Mar 31 23:28:31 I have lots of buttons in my UI and i'm ending up with a large number of xml files, for each state Mar 31 23:28:36 suppose you could have 1 set Mar 31 23:28:50 you should have one XML and a bunch of drawables Mar 31 23:29:12 oh, unless those are like XMLs Mar 31 23:29:24 then you'll have one XML to pull them all together and one for each state (instead of a drawable Mar 31 23:29:25 ) Mar 31 23:29:26 JakeWharton: yup, they're shapes Mar 31 23:29:52 and so i have lots of files to manage Mar 31 23:30:39 tbh if you have more than like 4 variations of buttons, maybe it's a design re-think Mar 31 23:30:56 JakeWharton, I was wondering if I can use the ABS fragment stuff and add a tabs to the action bar if i didn't want any affects instead of downloading Android-ViewPagerIndicator? Mar 31 23:31:07 anything more in a small context like a mobile app, may look disjointed Mar 31 23:31:30 I decided to color code areas of my app Mar 31 23:31:45 it looks nice, but its difficult to tweak Mar 31 23:32:05 4 sounds reasonable.. Normal, focused, pressed, activated/checked Mar 31 23:32:12 disabled Mar 31 23:32:15 That's 5 Mar 31 23:32:31 no i mean states x 4 Mar 31 23:32:42 as in 4 distinct button types Mar 31 23:32:54 Oh Mar 31 23:33:04 Yeah Mar 31 23:33:20 nav = 1 type, then maybe dialog = 1 then maybe 2 contextual Mar 31 23:33:34 but more than that I feel is always gonna be a bit…….. much Mar 31 23:33:54 suppose it depends on app Mar 31 23:33:55 :( Mar 31 23:34:20 do0ob: there is another option Mar 31 23:34:28 if you must have lots Mar 31 23:34:57 ? Mar 31 23:34:58 have them all in on "layout" during development Mar 31 23:35:12 so you can manage them in editor easy Mar 31 23:35:34 this is just an idea btw Mar 31 23:35:55 then inflate, detach, pass onto destination Mar 31 23:36:17 na, too much extra code to maintain Mar 31 23:36:20 I would probably consider that if I had like many many to design and manage Mar 31 23:45:32 is the android project still open source? Mar 31 23:46:44 How does one Mar 31 23:46:45 Go about Mar 31 23:46:47 Programming controls Mar 31 23:46:49 In the NOtification? Mar 31 23:50:33 brx_: hope your not still waiting for an answer on that Mar 31 23:50:42 viiralvx: notification manager ? Mar 31 23:51:03 StingRay_: Yeah, but I am programming a music player and the music is controlled from a service Mar 31 23:51:15 oh Mar 31 23:51:19 StingRay_: I'm going to try just starting an intent with the Service broadcast . . . not sure if it will work though. Mar 31 23:51:48 should be fine Mar 31 23:51:51 I think I do that Mar 31 23:52:56 agy2154: action bar tabs don't depend on fragments Mar 31 23:53:03 whether through ABS or not Mar 31 23:53:18 StingRay_: Welp, that didn't work. Mar 31 23:54:22 StingRay_: from my understanding it is, though i hadnt ever dipped far enough in to confirm this first hand Mar 31 23:54:40 google serach would confirm it Mar 31 23:54:42 :) Apr 01 00:03:10 StingRay_ honestly Google cannot be trusted at the moment... :) Apr 01 00:11:21 HAHA!!! Apr 01 00:11:27 It ***** works :P.. sorry the outburst Apr 01 00:24:09 JakeWharton, So all I need is a tab adapter? Apr 01 00:31:34 you need to call .addTab() a few times and then use a tab listener Apr 01 00:31:42 what you do when the listener is called is up to you Apr 01 00:34:19 MAN Apr 01 00:34:24 My app was working Apr 01 00:34:26 Before I stepped out Apr 01 00:34:27 of the room Apr 01 00:34:29 Now it's not working Apr 01 00:34:37 Dunno what I changed or what happened, but everything seems the same . . . . Apr 01 00:36:33 so if I'm using Otto for easy message passing between my service and Activity, what's the easiest way of polling the state of my service when my activity first launches? Apr 01 00:36:53 producer Apr 01 00:37:20 http://square.github.com/otto/ Apr 01 00:37:22 Read this Apr 01 00:37:29 But yep, register a producer Apr 01 00:37:48 just said that to prove I do read stuff Apr 01 00:37:50 :) Apr 01 00:37:51 so I could use it both ways I guess, since it's synchronous Apr 01 00:38:49 Ive added a viewPager for 3 fragments which works fine.. the thing is while swapping through these fragments, I have 3 visible buttons that should be able to take me directly to each according fragment.. I experience problems when using the buttons, and I'm not sure how I the viewPager jump around while maintaining its hierachy Apr 01 00:39:34 By default, stuff has to happen on the main thread.. So yeah :) Apr 01 00:40:02 P3nnyw1se: see thats a statement of "i need to read more" cause there is not even a question there ;) Apr 01 00:40:10 also should you not be sleeping now ? Apr 01 00:40:24 that hadn't occoured to me to use it that way, thanks SimonVT. Apr 01 00:40:26 yeah I should but I'm having a hard time letting it go untill it works :( Apr 01 00:41:47 seems a bit cumbersome Apr 01 00:45:02 GOD DANG IT Apr 01 00:45:05 SOMETHING BROKE Apr 01 00:45:07 AND I CAN'T FIGURE OUT WHAT Apr 01 00:45:08 UGH Apr 01 00:45:19 And it's not stack tracing either Apr 01 00:45:20 Fufufufu Apr 01 00:45:23 I thought I would be able to do this: ViewPager.setAdapter(myAdapter.getItem(x)); Apr 01 00:45:24 but I was wrong Apr 01 00:45:42 P3nnyw1se: very wrong Apr 01 00:45:46 yeah I know Apr 01 00:46:14 Why would you think setAdapter would take anything but an adapter Apr 01 00:48:35 cause I'm not thinking straight :) been awake for 24 hours Apr 01 00:49:25 so I know this is kind of a vague question but.. do you know of any design patterns that would make querying a component using an event bus less cumbersome? like if I want to find out if my service is in state A, I'd have to send an IsStateA message, then recieve it in an onIsStateA function, then pass an IsStateA message back to the callers isInStateAResult function Apr 01 00:50:03 dont know much about patterns but couldnt you use an Observer Pattern for this ? Apr 01 00:50:18 stork: or you can have a object like a message that has args Apr 01 00:50:23 that say what you want Apr 01 00:50:35 With otto, you'd just subscribe to service state events Apr 01 00:50:38 Sounds pretty simple Apr 01 00:51:57 well with an Observer pattern you every class implementing it, will get a notify when a change is made on the subject you 'listen' too Apr 01 00:52:03 at least thats how I remember it Apr 01 00:52:32 right, but someone before mentioned it was possible to do a query with it. Apr 01 00:52:56 really ? Apr 01 00:53:41 the producer will return what you want when a subcriber registers Apr 01 00:53:45 as in the example Apr 01 00:53:47 oh I think I might be being really stupid, I missed the produce annotation Apr 01 00:53:50 this is probably a dumb question Apr 01 00:53:58 but couldn't you just add the query in the notify() Apr 01 00:54:00 of the obs pattern ? Apr 01 00:55:48 2am here, I think this might be a 'deal with it tomorrow morning' problem, sorry for the stupid questions. Laters. Apr 01 00:56:02 2am here too Apr 01 00:56:10 stop being a wimp Apr 01 00:56:12 :) Apr 01 00:58:45 aha! Apr 01 00:58:54 ViewPager.setCurrentItem(); Apr 01 01:00:30 see Stingray I used the docs! Apr 01 01:00:35 lol :P Apr 01 01:01:34 alright its 03:00 but I made it work. Apr 01 01:01:38 and now.. I'm having a beer Apr 01 01:01:50 I dont have any beer.. I'm having a glass of Milk! Apr 01 01:19:26 why would anyone need So "chat with an expert" when we have android-dev :/ Apr 01 01:38:36 anyone know a prepackaged jar for image processing, like opencv, but something that plugs right in as a jar? Apr 01 01:47:56 is there a way I can see 'when' things was introduced into android? Apr 01 01:48:21 P3nnyw1se, yeah the api level Apr 01 01:48:33 P3nnyw1se, go the the android doc. Apr 01 01:48:40 looking at ir right now Apr 01 01:48:43 so here in scrollview Apr 01 01:48:43 http://developer.android.com/reference/android/widget/ScrollView.html Apr 01 01:48:48 its 17 Apr 01 01:48:50 ? Apr 01 01:49:05 P3nnyw1se, no your porbably viewing it as api 17 Apr 01 01:49:12 hmm Apr 01 01:49:32 your basicly viewing the android docs as you ware making an ap for api 17 Apr 01 01:49:40 P3nnyw1se, i think scrollview was in api1 Apr 01 01:49:42 should have been Apr 01 01:49:54 yeah I can see in the construct it was added in API1 Apr 01 01:50:02 gues I can just use constructors Apr 01 01:50:03 for most things Apr 01 01:50:33 Lint can warn you if you use an API that's below your minSdkVersion Apr 01 01:50:36 P3nnyw1se, what do you mean Apr 01 01:50:46 like viewPager e.g. Apr 01 01:50:50 looking up viewPager in the docs Apr 01 01:50:54 I can't really tell when it was added Apr 01 01:50:55 P3nnyw1se, there is a support library for that Apr 01 01:51:20 I'm just curious about versions and thought each might have an API number written in the docs Apr 01 01:51:23 P3 Im guesssing you want to like swipe between screens? Apr 01 01:51:32 I already did this.. Apr 01 01:51:42 I'm just purely interested if an API or version number Apr 01 01:51:44 was in the docs Apr 01 01:51:49 for future references Apr 01 01:52:00 P3nnyw1se, Most of the stuff has a support library to make it compatable with the api you are targeting or it might be an the android.support Apr 01 01:52:24 sure.. I just wanted to go 'wonder when textView was added' and then go to docs and read 'ahhh API 4' Apr 01 01:52:27 if that makes sense Apr 01 01:52:41 So go there, look at the top right Apr 01 01:53:17 http://developer.android.com/reference/android/support/v4/view/ViewPager.html Apr 01 01:53:19 top right ? Apr 01 01:53:23 Support classes has no "added in api x" since, well, they aren't framework classes Apr 01 01:53:23 Yes Apr 01 01:53:28 Ill take a screenshot Apr 01 01:53:28 They're not added in any api level Apr 01 01:53:54 http://i.imgur.com/3mQnlpE.png Apr 01 01:54:39 ah okay seeing it agy2154 Apr 01 01:55:08 No problem P3nnyw1se. Apr 01 01:55:18 SimonVT sure that makes sense Apr 01 01:55:40 didn't think about that was just looking for 'when people were able to use ViewPager' Apr 01 01:55:41 P3nnyw1se, Im actually working on a viewpager irhgt now... Apr 01 01:55:48 well I literally just made one work Apr 01 01:55:53 like 3 minutes ago Apr 01 01:56:35 P3nnyw1se, Don't forget android.support.v4.app Apr 01 01:57:07 ;) Apr 01 01:57:19 been there and hour back Apr 01 01:57:21 or something like that Apr 01 01:57:35 was in heated discussions with StingRay and SimonVT Apr 01 01:57:46 while trying to make it work they kept informing me I was a moron Apr 01 01:58:23 P3nnyw1se, wy? Apr 01 01:58:39 I'm 3 weeks into Android programming.. and I'm jumping ahead of some basic stuff Apr 01 01:58:52 and they think its idiotic.. which it probably is Apr 01 01:59:00 but then again, cause this interested me, I spend 10 hours on this shit Apr 01 01:59:01 and it works Apr 01 01:59:08 so I like to think I worked something Apr 01 01:59:26 P3nnyw1se, Yeah I spend ~8 hours on my app a day Apr 01 02:00:27 I dont see the problem in learning this way.. Now I've been introduced to the adapters, the viewPager etc. Apr 01 02:00:34 it won't be 'new' next time I run into it **** ENDING LOGGING AT Mon Apr 01 02:59:57 2013