**** BEGIN LOGGING AT Fri Aug 30 02:59:58 2013 Aug 30 03:00:55 never mind. I restarted a second time and it appears to be working Aug 30 03:25:47 dcow: hmm.... maybe safe to just create new ones then. Aug 30 03:31:14 Anyone familiar with Android Studio. If I want to include a project like ViewPagerIndicator, how do I include it correctly into my project Aug 30 03:40:39 hey everyone, I'd like to compile the project here: https://github.com/CyanogenMod/android_external_exfat Aug 30 03:41:11 however, I'm getting two compile time errors: in function exfat_pread:external/exfat/libexfat/io.c:291: error: undefined reference to 'pread64' Aug 30 03:41:22 in function exfat_pwrite:external/exfat/libexfat/io.c:305: error: undefined reference to 'pwrite64' Aug 30 03:41:39 actuallu they're errors during linking Aug 30 03:41:48 anyone have any ideas how to solve this? Aug 30 03:42:25 hey does anyone know how to apply the Holo theme to a Notification.Builder / RemoteView? It seems to be using the old pre-Holo theme on buttons that I'm adding to the layout. Thanks. Aug 30 03:47:12 hey RyanM... you still there Aug 30 03:52:22 Hi all, I changed my MainActivity to extend FragmentActivity so I could use Fused Location services but now I'm getting a "java.lang.ClassNotFoundException: Didn't find class" error. Does anyone know how I can fix this? Aug 30 03:53:13 Hi I am having problems with GCM on Android 2.3 and 2.2 I am getting the following error: http://pastebin.com/W9ti99VU Aug 30 03:55:49 any ideas? Aug 30 04:07:33 totic a few people have mentioned issues with gcm and 2.3 / 2.2 … unless that was you and i forgot :P Aug 30 04:08:14 that was me! Aug 30 04:08:20 I got it working on 3 > Aug 30 04:09:00 I got it working on GS2, GS4, GTab 7-2 but not in GTab 7-1 Aug 30 04:10:46 it should be the same for each, right? O.o Aug 30 04:11:46 so i wonder, when google updates play services, if they even test it themselves on all these devices Aug 30 04:13:57 it shouldldddd... Aug 30 04:13:59 but no Aug 30 04:15:48 ok.. i am running the kali linux distro. i installed the android development toolkit. the issue i am have is i cannot access my phone from the computer..^^my phone is a samsung sch-i200 ^^this is the error i am getting:Error mounting: mount: /dev/sr1 already mounted or /media/VERIZON MOBILE busy Aug 30 04:15:56 can anybory help Aug 30 04:16:31 should I learn android dev or iOS dev Aug 30 04:16:45 I am very knowledgeable of Mathematics, Java, C++ and some assembler knowledge Aug 30 04:16:45 learn both Aug 30 04:17:04 Which should I start with? Aug 30 04:17:41 well, if you ask in iphonedev, they will say iphone, if you ask here, we will say android Aug 30 04:17:50 kinda depends what you need to do Aug 30 04:18:09 fool what kind of phone do you have' Aug 30 04:18:10 I want the skills to look good on a resume Aug 30 04:18:15 I have a note II Aug 30 04:18:20 but I don't really ever use it Aug 30 04:18:26 foolcool: do you have a mac? Aug 30 04:18:50 then i would start with android Aug 30 04:18:57 as far as i'm concermed, if this is about prettying up your resume, you've failed from the gate Aug 30 04:19:25 i hope you have a better reason, like, you find it interesting Aug 30 04:19:44 btw, the bubble is almost over, you're late to the resume-prettying party Aug 30 04:20:56 g00s: well I'm starting a java devel job in 2 weeks, but I'm trying to get some freelance work in the meantime Aug 30 04:21:12 and cleaver: I have a vm running windows 7 running vmware running osx, lol Aug 30 04:21:35 no, I don't find it interesting. I find cuda and gpu programming interesting Aug 30 04:22:16 freelance work in 2 weeks? Aug 30 04:22:19 yeah, that doesn't happen Aug 30 04:22:32 foolcool: i was trying to port my android app to ios, but no mater what i did, cant get osx to boot in the emulator Aug 30 04:22:37 so thats just a dead end Aug 30 04:22:38 i've just been searching around on the internet Aug 30 04:22:49 I just have way too much free time Aug 30 04:24:09 take advantage of it while you can Aug 30 04:24:14 then you start working... Aug 30 04:24:37 Is anyone familiar with android studio and including local libraries. I am having a really hard time getting a library included into the project? Aug 30 04:25:53 Hi, I'm trying to incorporate GooglePlayServices in my application but as soon as I make my MainActivity implement GooglePlayServicesClient.ConnectionCallbacks,GooglePlayServicesClient.OnConnectionFailedListener I get a "android java.lang.ClassNotFoundException: Didn't find class" error. Does anyone have any insight into what I may be doing wrong? Aug 30 04:27:13 foolcool: if you want a project, go grab my Penroser source code and do something cool with it. https://github.com/JesusFreke/Penroser/ ;) Aug 30 04:29:58 you could add some other penroser tilings in addition to the P3. Of course, you'll have to figure out how to generating the tilings for them efficiently. Aug 30 04:30:07 JesusFreke: what's it supposed to be? Aug 30 04:30:24 "Infinite Penrose tiling generator for Android" Aug 30 04:30:29 (https://play.google.com/store/apps/details?id=org.jf.Penroser) Aug 30 04:30:53 Just one of my old sideprojects, that's been sitting around unloved for a while. Aug 30 04:31:09 It was a fun one though :) Aug 30 04:31:35 interesting, my searches for opencl + ios are not encouraging there Aug 30 04:31:42 i thought they had that Aug 30 04:31:42 and seems like it would be up your alley (re: gpu/cuda) Aug 30 04:32:56 yeah, I'm checking it out now Aug 30 04:33:03 I'm preparing for my monthly shower too Aug 30 04:33:10 mentally preparing that is Aug 30 04:33:11 uh oh Aug 30 04:33:13 sounds dangerous Aug 30 04:33:21 who knows what you'll find! Aug 30 04:33:32 right Aug 30 04:39:26 Hi, does anyone here use Android Studio? I have run into an issue Aug 30 04:43:57 i use AS as textedit++ Aug 30 04:44:23 stick to the very basics, everything works ok :) Aug 30 04:46:31 g00s: okay, well you may be able to help. No worries if you cannot. I'm trying to get Play Services working and have my code implementing GooglePlayServicesClient's ConnectionCallBacks and onConnectionFailedListener. Both of which, when run together or independently, compile but cause my code to crash at start with a " java.lang.ClassNotFoundException: Didn't find class" exception. I'm new to android dev so it's very likely I hav Aug 30 04:46:31 screwed up somewhere but I cannot find my problem Aug 30 04:47:11 Algorithm seems maybe the scope of your dependency in gradle then Aug 30 04:47:35 I have compile 'com.google.android.gms:play-services:3.1.36' Aug 30 04:47:36 in the dependencies section of my build.gradle. One thing I've noticed is that under libs I have the support jar but not a play services one Aug 30 04:48:09 g00s: Any suggestions on what to fix the dependency issue? Aug 30 04:48:21 what to do to fix the dependency issue Aug 30 04:48:49 hm, try dependencies { releaseCompile { … your services library } } Aug 30 04:49:10 oh wait, compile should be fine Aug 30 04:49:34 yeah, it is compiling and sending to my phone. It just crashes on launch Aug 30 04:50:27 what class is causing the ClassNotFoundException? Aug 30 04:50:35 MainActivity Aug 30 04:50:39 oh Aug 30 04:51:04 The class declaration is: public class MainActivity extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener Aug 30 04:51:42 :( i haven't used play services yet Aug 30 04:52:15 presumably the play services is on the phone, and all of that Aug 30 04:52:33 okay, thanks for the help. I'm tempted to go back to my LocationManager version I wrote the other day. I have just read that this was much easier and more accurate/battery efficient Aug 30 04:53:16 yeah, I also installed the sdk with the sdk manager. Unfortunately the guides on d.android.com don't' cover the sdk/dependency setup Aug 30 04:55:02 did you build using gradle from the command line ? Aug 30 04:55:23 seems like this should be enough: Aug 30 04:55:26 no, I haven't tried that Aug 30 04:55:28 dependencies { Aug 30 04:55:28 compile project(':libproject:google-play-services_lib') Aug 30 04:55:28 } Aug 30 04:55:40 thanks, I'll try with that Aug 30 04:57:35 it gives me a "Project with path ':lib project:google-play-services_lib' could not be found in project ':Tracker'" Aug 30 04:58:02 oh, well that specific invocation would be for a subproject Aug 30 04:58:26 oh, should I put in the main build.gradle? Aug 30 04:58:48 sorry, like I said I'm brand new. But I really appreciate the help! Aug 30 04:58:57 np , i haven't tried this either Aug 30 04:59:12 well - from the sdk manager, i think you can do two things Aug 30 04:59:40 if you check extra/google play services, you'll probably get some jar/aar/apk in your extras folder Aug 30 05:00:00 which then would have to be physically copied into your project, dunno maybe like a libs/ folder Aug 30 05:00:05 but Aug 30 05:00:13 there is also 'google repository' Aug 30 05:00:35 which may have play services in there too - and gradle should pick up the artifact automatically Aug 30 05:01:14 okay thanks, i'll try that. Aug 30 05:01:26 i wish they would just put this shit on maven central or their own repo, having the sdk manager copy repos is fing stupid Aug 30 05:02:11 Algorithm so, if you use 'google repository' your invocation would just look like : compile "com.google.xyx:version" or something Aug 30 05:03:09 get it working from the gradle command line first Aug 30 05:03:29 once that happens, sync the gradle model to intellij Aug 30 05:03:35 I completely agree. and I have that in my build.gradle. It compiles but gives me that error Aug 30 05:03:51 is intellij difficult to setup for android? Aug 30 05:03:58 oh, i meant AS Aug 30 05:05:10 okay. I'll look into compiling from the command line. Aug 30 05:05:30 It seems that if it compiles from AS, it would probably give the same result? Aug 30 05:05:53 honestly , i don't trust AS atm Aug 30 05:06:04 i just use it to edit the source code, syntax highlighting, etc Aug 30 05:06:12 i use gradle from the command line Aug 30 05:06:21 okay, I'll check that out Aug 30 05:09:58 cd .. Aug 30 05:10:10 / Aug 30 05:10:27 Sorry about that. I typed that in the wrong window. Aug 30 05:10:38 we would never have guessed :) Aug 30 05:10:48 at least it wasn't your password Aug 30 05:10:52 * JesusFreke has done that one before Aug 30 05:11:09 Nice! haha Aug 30 05:11:52 when I run ./gradlew packageDebug where should I find the apk? Aug 30 05:12:05 somewhere in build/ Aug 30 05:12:10 I forget where offhand Aug 30 05:12:44 at least, assuming it's the same as what gradle usually uses (I use gradle for a non-android project, but haven't really used it for an android project yet) Aug 30 05:12:58 thanks JesusFreke. I was in the main project Aug 30 05:14:42 g00s: That build didn't have the error… Thanks for the help Aug 30 05:14:53 hm Aug 30 05:14:57 I'm tempted to use Eclipse. I just don't really want to learn the old one right before the new one Aug 30 05:15:11 in AS, sync the gradle build Aug 30 05:15:22 okay Aug 30 05:15:53 in toolbar, little gradle icon with down arrow Aug 30 05:18:00 That worked. Thanks for the help! Aug 30 05:18:16 is that something that I should have been doing every time I edited the build.gradle file? Aug 30 05:19:27 yeah Aug 30 05:19:44 well thank you so much for the help! Aug 30 05:19:50 ;) yw Aug 30 05:20:27 You will likely be seeing a lot of me on here over the next few weeks Aug 30 05:21:25 i'm a beginner with gradle Aug 30 05:22:38 but clearly much further along than me. I have one more question Aug 30 05:23:24 Currently I have database writes in a separate thread. But would it be better to put them in something else? They are added from a service so I don't believe intent services or asynctasks are an option Aug 30 05:28:27 the writes should be in a separate thread, yeah Aug 30 05:28:53 you'll need to clarify 'added from a service' Aug 30 05:30:05 In the version before using Play Services I had a location listener in a thread in a service and wrote to the database upon receiving an update Aug 30 05:30:27 for reading large quantities and sending over the network I created a new thread but wrote to the database in the service's thread Aug 30 05:33:12 ok, so thats the UI thread then. yeah, you should put that in a thread Aug 30 05:33:35 wait, what's the UI thread? Aug 30 05:33:48 the service's thread is the main (ui) threaf Aug 30 05:33:51 *thread Aug 30 05:34:24 oh, I started a new thread in the service. I read that was preferable to a service inside a thread because of the order the OS will terminate processes when it needs resources Aug 30 05:35:43 well, there are a few things that need to be coordinated, the listener callbacks, networking, and db Aug 30 05:35:52 the listener callbacks could probably be on the main thread Aug 30 05:35:59 ah, hmm Aug 30 05:36:08 but the db / networking needs to be off the main thread Aug 30 05:36:08 that's good to know Aug 30 05:36:17 anyone try including viewpagerindicator with android studio. Doing local libraries is kicking my butt Aug 30 05:36:33 i mean, as long as your callback isn't doing anything long on the ui thread :) Aug 30 05:36:39 yeah. should I be spawning a new thread every second to do a database write or passing messages Aug 30 05:36:46 oh no, Aug 30 05:36:51 don't spawn threads every second Aug 30 05:36:58 use something like an Executor Aug 30 05:37:04 I was thinking the callback was running on a separate thread but I guess I was mistaken. It wasn't really time consuming but it's good to know Aug 30 05:37:09 perfect, thank you! Aug 30 05:37:12 I'll look that up Aug 30 05:37:27 you can also use HandlerThread Aug 30 05:37:46 ah, I remember reading about those Aug 30 05:38:30 thanks again for all the help! I'll read over those suggestions and probably see you back on here later Aug 30 05:39:35 :) Aug 30 05:40:52 is anyone in here using Android Studio, or everyone sticking with Eclipse/Intellij Aug 30 05:48:57 boss got idea to change application title bar text so that first half is in one colour, second half in another. Possible? Aug 30 05:52:58 epsilonorion: Android Studio and IntelliJ are the same thing Aug 30 05:53:48 JakeWharton: I do understand that, but I haven't had any luck finding out how to include your ViewPagerIndicator in either case with a project based on gradle. Still playing with it now Aug 30 05:54:23 it needs to be a separate module Aug 30 05:54:40 let me see if someone wrote a guide for ABS before i switched it to Gradle Aug 30 05:54:44 it'll be the same process Aug 30 05:55:28 http://stackoverflow.com/questions/17642094/how-to-properly-setup-gradle-in-android-studio-for-actionbarsherlock Aug 30 05:55:35 I found a few that I have tried. Specifically http://www.youtube.com/watch?v=wCKWIDGULfY and http://changyeopkim.blogspot.com/2013/05/android-studio-intellij-using-android.html Aug 30 05:56:38 I will check that one out. I am setting it up as a separate module, but no joy yet. Aug 30 06:03:13 so if I pull the viewpagerindicator folder directly over, there is a library folder and a sample folder. I know I can simplify, but assuming I stick with this: so in settings.gradle would I need include '..:viewpagerindicator:library' Aug 30 06:05:21 JakeWharton: and then in my build.gradle file it should be compile project (':viewpagerindicator:library') Aug 30 06:22:36 does anything need to be done to notify google that all my apps are compliant to the new "content policy"? Aug 30 06:22:54 is NDK development on windows a humongous pain? Aug 30 06:25:18 perhaps I'd be better off running eclipse in a VM? Aug 30 06:30:29 also, is image processing a good candidate for the NDK? Aug 30 06:30:39 why Aug 30 06:30:41 and no Aug 30 06:30:56 good candidates for ndk are things where you already have code written in c Aug 30 06:31:04 or things where you want to share your code between android and ios Aug 30 06:31:25 http://developer.android.com/tools/sdk/ndk/index.html Aug 30 06:31:35 what should I look into for image processing on android? Aug 30 06:31:51 not sure :P Aug 30 06:31:58 specifically I want to play around with edge detection Aug 30 06:32:13 libjpeg is a C library and there are some wrappers for it in C++ Aug 30 06:32:25 ok then that is a good candidate for ndk Aug 30 06:32:28 because you already have c code :P Aug 30 06:32:41 but it will probably enlarge your app Aug 30 06:32:49 beucase you need at least three copies of the native lib Aug 30 06:32:54 if not four Aug 30 06:32:54 anyway I'm curious to play around with the NDK Aug 30 06:33:05 i finally have a reason! Aug 30 06:33:30 this is just experimentation. I haven't distributed anything yet Aug 30 06:35:14 OpenCV seems to be advancing pretty well on Android Aug 30 06:39:11 canadiancow: Can't you do multiple apks to avoid that? Aug 30 06:39:16 yes Aug 30 06:39:21 but that's also annoying :P Aug 30 06:39:47 Well yeah, but in the interest of keeping download sizes small. Aug 30 06:40:10 Plus multi-resolution apks as well. Aug 30 06:40:29 yeah ive never personally done that Aug 30 06:40:32 but ive heard it discussed Aug 30 06:40:37 especially with the gs4 and htc one being xxhdpi Aug 30 06:41:23 Although I vaguely recall a scaling/DPI option in settings somewhere. Aug 30 06:41:32 So I wonder if that screws up the apk assumptions. Aug 30 06:45:13 Hm. Seems like I have to revise my theory about how GCM push actually works. Aug 30 06:46:20 I have no idea how they pull it off, but every time I push a message (random time delay) from my server to a device, it's usually on the device and replying within seconds. Aug 30 06:46:51 So either my mobile operator network is unusually good, or the whole 15/30 minute heartbeat thing has been changed. Aug 30 06:47:02 ? Aug 30 06:47:19 that 15 minute "heartbeat" as you call it doesnt mean you only get gcm messages every 15 minutes Aug 30 06:48:04 I know, but it means that sometimes networks drops connections and that heartbeat reconnects. Haven't happened to me once the last 16 hours. Maybe networks are improving! Aug 30 07:00:53 I am still not having any luck pulling the ViewPagerIndicator library into my project within Android Studio Aug 30 07:07:40 JakeWharton: Tried many different ways, but still can't seem to get it. Aug 30 07:08:28 Most typical error is that "Could not find method projects() for arguments [:ViewPagerIndicator] on project.." Aug 30 07:08:32 Question: Imagine a App that - on startup - gets (using REST) some Messages .. while the user is messing around in the app the app gets a GCM tickle - new Messages are there! as I need those messages application wide … whats is the best practice to store them? Aug 30 07:16:34 Not sure what you mean by "store them", but your broadcastreceiver can pretty much do anything, like signalling activities and/or stuffing stuff into databases/content providers. Aug 30 07:17:43 Hi. Can I add the following to the AVD? https://developers.google.com/android/nexus/images?hl=pt-BR#instructions Aug 30 07:24:32 kjeldahl, I mean to store the messages somewhere as they are relevant to any activity Aug 30 07:25:55 jan1337z: Which is why I said content provider. :-) Aug 30 07:28:37 kjeldahl, Isn't that sqlite? Aug 30 07:29:15 I am more about storing objects Aug 30 07:29:21 jan1337z: Can be anything, up to you. It only defines a standard interface and IPC mechanisms. Usually backed by a database yes. Aug 30 07:30:25 jan1337z: Objects live fine in databases. But depending on your access pattern and data size, it may be overkill for your app, but probably not (sqlite is pretty efficient). Aug 30 07:31:07 kjeldahl, okay I continue reading :D Aug 30 07:35:34 kjeldahl, to me it seems I always have to use sqllite for storing … aint that right? Aug 30 07:38:10 jan1337z: It's probably the easiest way to store (semi-)structured data on Android yes. Aug 30 07:38:34 jan1337z another nice library i've been playing with is mvstore, part of H2 Aug 30 07:38:39 thats for k/v Aug 30 07:38:50 hos is it going kjeldahl Aug 30 07:38:58 *how :) Aug 30 07:39:09 Good. GCM works better than I feared! You? Aug 30 07:39:29 oh, just writing a little parser. not much Aug 30 07:40:02 kjeldahl this is pretty cool https://news.ycombinator.com/item?id=6298642 Aug 30 07:40:06 Yeah, I've got two projects lined up, but require some learning and understanding before I can go ahead. Aug 30 07:40:21 Why I don't like SQL in the first place is because there is only insert all … there is no update the dataset (with one new message) - got me? Aug 30 07:40:23 i dont know haskell, but its nice to see alternative languages get used Aug 30 07:41:46 jan1337z: Sounds like premature optimization... What's your insert/update date anyway? Aug 30 07:41:59 insert/update RATE anwywa? Aug 30 07:42:33 g00s: Sounds great. I've given up on syntax alltogether and am firmly in the scheme/lisp camp. ;-) Aug 30 07:42:57 :) Aug 30 07:43:12 http://stackoverflow.com/questions/15277373/sqlite-upsert-update-or-insert Aug 30 07:43:34 What I want to say is that I get ALL my Messages with each REST request … Aug 30 07:43:42 jan1337z i don't get you Aug 30 07:44:17 so you get all your messages, whats the issue with storing those in the db? Aug 30 07:44:18 jan1337z: Now you're confusing stuff. Getting with REST and stuffing into database are two very different things; do not have to be connected at all. Aug 30 07:44:19 If a GCM tickle comes in, I again get ALL messages Aug 30 07:45:21 I don't think its so clean to -> rest request -> delete all old data -> insert new data -> rest request -> delete all old data -> insert new data Aug 30 07:45:50 jan1337z: Put some identifiers in your tickle, and only GET those. Then upsert those. Aug 30 07:45:59 I can't change the REST Interface Aug 30 07:47:13 In my opinion it would be great just to have an ArrayList stored somewhere global and just replace it each time I get new Data Aug 30 07:47:34 (excuse my englisch :D) Aug 30 07:49:03 still don't get me? Aug 30 08:02:10 jan1337z, singleton with arraylist inside? Aug 30 08:02:55 jan1337z: You can store in memory just fine, as long as the amount of data is limited and does not have to be persisted on the device. A content provider can typically use a MatrixCursor or similar for returning "memory stuff" back to apps. Aug 30 08:08:16 kjeldahl i thought i was only a rumor that stalman developed some repetitive wrist injury from emacs; i see it listed as fact on udemy :D Aug 30 08:08:33 haha, oh shit Aug 30 08:09:05 hm... i added tons of textViews to an tableLayout, and added this tab-layout to a scrollview (for having scroll ability). everything works/looks fine, until the items are bigger/more than they fit on the screen => the items offscreen dont get their border drawn. How would i tackle this problem? Aug 30 08:10:04 g00s: I can certainly imagine why. Aug 30 08:10:35 "the creator of Emacs suffered seriously from Repetitive Stress Injury as proof that Emacs’ reliance on Ctrl + combinations of keys forces the user to frequently adopt unnatural hand positions." Aug 30 08:11:04 I switch to mouse left-handed when I feel a tingling sensation... Aug 30 08:11:12 O.O Aug 30 08:11:56 But mostly, I force myself into using keyboard only shortcuts. It's the mousing that gets to my arms.. Aug 30 08:17:34 cyrilmottier i saw your blog post on genymotion and decided to try it out. are you still using it ? Aug 30 08:18:16 g00s: On a daily-basis yes :) Aug 30 08:18:42 It's not perfect of course but do not hesitate to send them your feedbacks. Aug 30 08:19:03 i am trying to get bluetooth working on mac Aug 30 08:19:46 but its nice so far. quick q - how do you know if there is an update to the client piece (player? vm list?) or the vm you downloaded ? Aug 30 08:20:24 for example, i downloaded 1.1.0, but how would i know when 1.2.0 was out - and the api 18 image is experimental Aug 30 08:20:44 so i guess that would get updated also (but i don't know how i would find out, short of always checking) Aug 30 08:24:18 morning guys, design question, where do you usually put code for sqlite db access, in activities or in fragments? Aug 30 08:26:23 heh, "about:debug" in the default android browswer is pretty handy Aug 30 08:26:32 None of them, but if you have to, probably in the activity. Aug 30 08:27:20 kjeldahl, where would be a good place then? A service? Aug 30 08:29:04 g00s: it prompts Aug 30 08:29:12 anyone awake? Aug 30 08:29:18 ubersoldat: It depends on when and where your content should be available. But a content provider is a common (although crappy IMHO) abstraction. If it's for internal use (your app) only, at least stuff it into model classes that theoretically could be called from both activities and fragments when needed. Aug 30 08:30:35 JakeWharton ah good to know, thanks Aug 30 08:33:39 can i somehow detect if an widget is offscren? Aug 30 08:33:51 currently i am redrawing every widget which is quite ressource hungry :P Aug 30 08:34:12 kjeldahl, thanks Aug 30 08:39:26 question: this is my first android app. When I install an app, I can install a service (without interface) and a separate app (with an interface) separately? Aug 30 08:43:38 zquad: No, with a p value of 0.4. Aug 30 08:44:39 what do you mean p value of 0.4? Aug 30 08:47:04 kjeldahl: It means I'm not very certain, I'm no authority on the subject. :-) Aug 30 08:47:44 http://en.wikipedia.org/wiki/P-value but I probably used it wrongly ;-) Aug 30 09:06:48 <^cheeky> hello Android World :) Aug 30 09:12:16 morning all Aug 30 09:15:01 zquad: your application can have a component that is a long-running service and interfaces that interract with it Aug 30 09:16:29 I need to define a drawable to be an empty box with a divider at the bottom, is that possible? Aug 30 09:16:40 Ankhwatcher: Thanks so the service can run in the background consuming the web service independently of the user viewing the results from the webservice?? Aug 30 09:16:49 yes Aug 30 09:17:57 Ankhwatcher, 9.png Aug 30 09:18:16 ubersoldat: ah, nice one Aug 30 09:18:42 http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html Aug 30 09:19:53 Ankhwatcher, you can create a small png file with borders, transparent content and tell 9patch to expand the transparent area Aug 30 09:26:12 hey guys Aug 30 09:26:40 while using the adb push command how do I specify the path to the local file? Aug 30 09:26:41 shadej: yo Aug 30 09:28:34 Ankhwatcher: ? Aug 30 09:28:41 adb push Aug 30 09:28:48 yeah, Aug 30 09:29:21 when specifying the local path am i going to use relative or absolute path Aug 30 09:30:02 shadej: I think you can use either Aug 30 09:31:39 Ankhwatcher: have you ever used it? Aug 30 09:32:05 shadej: I vaguely remember using it while rooting a phone, but I don't think it was recently Aug 30 09:32:22 I think with the root instructions it was pushing from within the folder Aug 30 09:35:25 Ankhwatcher: no once you get into the adb shell ..it becomes hard to specify path because there are devices the emulator and your computer how to differentiate them? Aug 30 09:35:48 how does one use a list with simple_list_item_2? Aug 30 09:38:09 any one familiar with adb push command? Aug 30 09:44:07 can i list the files of my computer from with in the adb shell? Aug 30 09:46:24 ls Aug 30 09:47:25 Ankhwatcher: ls will list the files in the emulator Aug 30 09:47:58 shadej: you ls from outside adb shell for your computer then adb shell ls for the device Aug 30 09:47:58 shadej: why don't you just try pushing something through and see where it shows up Aug 30 09:48:53 perfinion: Ankhwatcher I am specifying the correct path to my file but it says file not found Aug 30 09:49:09 shadej: what command are you trying to run? Aug 30 09:49:12 and from where? Aug 30 09:49:55 perfinion: adb push /home/ubuntuhx/Desktop/ADT /mnt/sdcard/ Aug 30 09:50:20 perfinion: being on the root of the emulator Aug 30 09:50:35 shadej: you dont adb push from inside the emulator Aug 30 09:50:50 exit fist to your normal computer commandline Aug 30 09:50:52 then run it Aug 30 09:51:01 perfinion: oh Aug 30 09:51:07 adb shell is if you want to get a shell on the device Aug 30 09:51:23 there is no adb executable on the device Aug 30 09:51:36 also isnt the path just /sdcard/ ? Aug 30 09:51:52 ie without the /mnt in front Aug 30 09:53:00 perfinion: I dont know i was trying that too Aug 30 09:53:09 perfinion: but now it worked thank you Aug 30 09:53:20 shadej: great :) Aug 30 10:00:12 can anyone point me to a good tutorial about using simple_list_item_2(or a valid alternative) with a recent API? (and possibly Lists/ArrayLists) Aug 30 10:06:12 How can I convert ARGB to Hex color codes (#FFFFFF)? Aug 30 10:06:44 Hex color codes are ARGB… just in hex Aug 30 10:06:57 why do you have to do that anyway? Aug 30 10:07:36 Because I have a Category class with a Colors enum. And they are on hex. So.. for comparing both Aug 30 10:10:32 storing numbers in hex strings is just plain wrong Aug 30 10:10:43 but as I said Aug 30 10:11:02 hex strings are just sequence of hex numbers which you can convert to get ARGB Aug 30 10:15:32 So it is better to store them as ints Aug 30 10:17:03 yes, because that's how OS works with them Aug 30 10:17:34 8 hex digits == 32-bit unsigned int Aug 30 10:17:37 the hex strings are actually the ints :) Aug 30 10:17:42 in string format Aug 30 10:18:26 I'm still not getting this 9 patch thing Aug 30 10:18:58 here is my 9 patch: http://picpaste.com/oChcpGZe.png Aug 30 10:20:35 So if I do ((ColorDrawable) radiobutton.getBackground()).getColor(); if my color is 16759603, I will get 16759603? Aug 30 10:24:28 Hi all, somebody ever used the SIP API ? Aug 30 10:31:26 Why does this: RadioGroup group = (RadioGroup) view.findViewById(R.id.radiogroup); Aug 30 10:31:26 final RadioButton selected = (RadioButton) view.findViewById(group.getCheckedRadioButtonId()); return null? Aug 30 10:31:43 yay, I got my 9 patch working Aug 30 10:34:33 zyngawow: What do you mean? http://developer.android.com/reference/android/widget/RadioGroup.html#getCheckedRadioButtonId() says it returns an int, and null isn't one. Aug 30 10:34:57 kjeldahl, the view.findViewById(blahblah) Aug 30 10:34:58 zyngawow: Ah, scratch that. Aug 30 10:35:20 zyngawow: For the hell of it, check that the id returned is -1 (not found). Aug 30 10:35:33 checking Aug 30 10:35:52 -1 meaning no radio button is selected. Aug 30 10:36:55 2131296262 Aug 30 10:37:39 I'll try cleaning Aug 30 10:37:58 Good idea; it's finding _something_. Aug 30 10:39:49 is there any equivalent field to the html file browse field? Aug 30 10:41:41 afternoons Aug 30 10:44:50 brx_: good afternoon Aug 30 10:48:20 This is weird. I do setBackgroundColor(11167436) and it appears as white Aug 30 10:51:00 Ok... If I do ColorDrawable#. Aug 30 10:51:28 ColorDrawable#getColor() I get -3407872 when the color is 13369344 Aug 30 10:52:51 zyngawow: 11167436 is 0xAA66CC Aug 30 10:53:00 what you might forget is that its actually 0x00AA66cc Aug 30 10:53:08 so you have 0% opacity for your color Aug 30 10:53:14 ah! Aug 30 10:53:25 so (a) just use hex colors and not decimal Aug 30 10:53:54 okay there is no (b) :) Aug 30 10:53:59 Yes there is Aug 30 10:54:05 Manually add the 00 Aug 30 10:54:17 just use hex colors, then you won't get confused by Two's complement Aug 30 10:54:32 you want FF there Aug 30 10:54:39 you actually want 0xFFAA66CC Aug 30 10:56:24 what should be something around -2141873869 if i am not wrong Aug 30 10:56:37 and since that is just not recognizeable at all anymore what it means, use 0xFFAA66cc :) Aug 30 10:56:40 4289357516 Aug 30 10:57:01 no Aug 30 10:57:10 thats why i say use hex do't get conffused by two's complement Aug 30 10:57:23 ColorDrawable#getColor returns an int Aug 30 10:57:23 since it begins with an F it should be a negative number Aug 30 10:58:56 but again: use hex colors and you won't have the problem, to calculate what number it will be :) Aug 30 10:58:59 timroes, so how do I compare the int I get from ColorDrawable#getColor to 0xFFAA66CC? Aug 30 10:59:06 with ==? Aug 30 10:59:26 both are just ints you can do whatever you want with it, java don't care if you use hex or decimal representation Aug 30 10:59:34 but i guess you want to output it in hex? Aug 30 10:59:54 Ok, I get it Aug 30 11:00:09 Integer.toHexString(drawable.getColor()) Aug 30 11:01:29 Hey. Does anyone here speak portuguese? Aug 30 11:01:58 <_ListerWork> si Aug 30 11:18:13 in a content provider Aug 30 11:18:17 backed by a data base maybe Aug 30 11:18:49 wooops that was from yesterday Aug 30 11:18:49 hah Aug 30 11:23:43 Does AssetManager list method Aug 30 11:24:14 assure alphabetical order ? Aug 30 11:26:54 anyone know a trick to make the options menu not dismiss when you pick something? Aug 30 11:28:19 actually I guess I dont need that hmm Aug 30 11:36:35 http://i.imgur.com/7uS9vdw.jpg Aug 30 11:37:02 ? Aug 30 11:39:05 its me Aug 30 11:57:34 this whole maintaining sets of xml files is teious and error prone :-/ Aug 30 11:57:41 tediuos* Aug 30 12:36:20 Hi. Can I add the following to the AVD? https://developers.google.com/android/nexus/images?hl=pt-BR#instructions Aug 30 12:54:55 I'm using the SIP API, I try to call to another SIPProfile, the other receives the call but my first device (caller) is receiving it too inside my broadcast receiver, how can i fix this? Aug 30 13:01:52 night Aug 30 13:01:57 oops Aug 30 13:02:16 Hello, I'm trying to investigate some Android browser code, specifically, the Quick control that can be enabled from the Labs Preferences in the Settings. I found the source code of the settings, but can't find where the Quick Controls are implemented. I want to investigate the Animations and implementation of that Cool feature. Aug 30 13:02:26 Can anyone please show me the way to the source code of that feature? Aug 30 13:02:48 hey, Aug 30 13:02:51 can i ask for some help ? Aug 30 13:03:40 help with? Aug 30 13:04:00 ViewFlipper Aug 30 13:04:17 I'm using ViewFlipper with two views inside. Aug 30 13:04:35 When i swipe to left, im using view01, when i swipe to right im using view02. But my animation doesn't work properly, bacause when i swipe one to right it's ok i get full in/out animation, but when i swipe next time to right i get only in animation without out animation Aug 30 13:04:43 My idea is somethink like in android calendar, when you swipe between months. Aug 30 13:05:19 eitama, maybe this is what you're looking for? http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.3_r2.1/com/android/browser/PieControl.java#PieControl Aug 30 13:07:32 Tmdean: Definetly looks like it! Are there no XML files involved in the implementation? Aug 30 13:07:57 looks like it inflates the layout R.layout.qc_tab Aug 30 13:11:10 http://grepcode.com/file/repository.grepcode.com$java$ext@com.google.android$android-apps@4.2.1_r1.2@packages$apps$Browser$res$layout$qc_tab.xml Aug 30 13:11:15 Tmdean: I see, that is for showing the Current open tabs via Quick Controls, but my question is more general, Aside from all the Java code for the Browser and Quick controls, Where can I see all the Layouts, Strings, XML files that are involved? Aug 30 13:11:23 Oh! you just answered maybe :) Aug 30 13:11:26 Looking. Aug 30 13:12:56 no, I think this class is the implementation for the whole menu, not just the tabs Aug 30 13:18:05 Tmdean: Maybe, I need to continue reading, You helped me a lot. Thanks. BTW, how did you find it? Aug 30 13:18:45 I went to grepcode.com and searched for android browser quick controls or something like that Aug 30 13:21:38 hi , I have a url from the json response in the format http://mysoftware.com:81/docs/api/crm.svc/Contacts .. this does not work in android application and works in iOS . Any idea what is the reason ? Aug 30 13:22:32 Sorry the URl is http://mysoftware.com:81/contacts/placholder.png not the one above Aug 30 13:23:05 chinmaya, doesn't work either Aug 30 13:23:27 its not public yet Aug 30 13:23:42 then, it doesn't work :-p Aug 30 13:23:58 ubersoldat, but the webpage is running in the server Aug 30 13:24:05 and i can see it in chrome Aug 30 13:24:19 ?_? Aug 30 13:25:28 ubersoldat, if i strip the port number from the url it works but not with the port number Aug 30 13:25:45 then your server is running on port 80, not 81 Aug 30 13:27:53 Timdean , i checked with the IT helpdesk and they say its running on port 81 Aug 30 13:29:49 which 'pulltorefresh' library is everyone using? Aug 30 13:30:39 chinmaya, an easy way to tell if a server is running on a port you expect is to try to telnet to it Aug 30 13:30:47 open a command line and type telnet mysoftware.com 81 Aug 30 13:30:56 if it connects, then the server is running on that port Aug 30 13:36:22 that works for any kind of server, not just web servers, by the way Aug 30 13:45:35 chinmaya: Do you have access to the server? Aug 30 13:46:01 Running netstat with the correct listening parameters can reveal which process is listening on which port. Aug 30 13:47:39 how to clear all recent Task ? Aug 30 13:53:01 help me please Aug 30 14:02:27 I have an external library which I'm importing to show an activity. I can animate the showing of the activity using one of my project's animations, but when the activity finishes it does so generically. As I don't want to mess with the library to put my animation in, is there any other way I can override the transition using an animation from my project? Aug 30 14:04:46 hey guys, the icon for this navigation drawer sample project is too much to the left. I think it's causing the opening (sliding) of the drawer to open only when you start from the very left in line with said icon. http://developer.android.com/training/implementing-navigation/nav-drawer.html Does this happen for you guys too? How can I fix this? Aug 30 14:06:09 That's the point? You slide your finger from the outside of the screen in to the screen at the edge where the DrawerLayout is defined (usually "start") Aug 30 14:07:01 lovethang_, yes I know but you have to go far more left than say Facebook's app Aug 30 14:07:09 lovethang_, but yeh my main problem is the icon in the actionbar Aug 30 14:07:15 it's half shown Aug 30 14:07:35 how to clear all recent Tasks ? Aug 30 14:07:39 In that sample there is the application launcher icon and also another icon with 3 small horizontal bars which appears to the left Aug 30 14:07:47 can you help me Aug 30 14:07:57 This is by design and the horizontal bars scroll left and right as the drawer opens and closes Aug 30 14:08:15 lovethang_, yes, and those 3 small horizontal bars are half shown Aug 30 14:08:20 in my device anyway Aug 30 14:08:22 This is by design Aug 30 14:08:31 oh really? :S Aug 30 14:08:43 It is the same for mine and I am quite happy with how it looks and works Aug 30 14:09:16 lovethang_, I litearlly have to use my left hand to open the drawer though unlike other apps Aug 30 14:09:42 I scroll my finger from the bezel on to the screen and it opens just fine Aug 30 14:09:50 You can also click the application icon to open and close the drawer Aug 30 14:10:01 lovethang programmatically Aug 30 14:10:03 lovethang_, I know you can click the application icon to open it Aug 30 14:10:32 lovethang_, people with S3's would find it hard to slide their fingers from the far left Aug 30 14:10:41 You're kind of saying that the DrawerLayout is somehow "wrong" or broken because it doesn't work like Facebook's own implementation Aug 30 14:10:45 My question is, is there a setting to position it Aug 30 14:10:56 no you're misunderstanding the question Aug 30 14:10:58 I would say this is entirely subjective, and you are of course free to tinker with the code to make it more like Facebooks Aug 30 14:12:36 I would have had I known what part of the code determines the buondary for opening/closing lovethang_ Aug 30 14:12:48 I am looking now Aug 30 14:14:19 Do I need to reset each and every alarm on reboot? Aug 30 14:14:23 In AlarmManager I mean. Aug 30 14:16:01 CocoStorm: By the looks of things you will have to alter the v4 support library Aug 30 14:16:43 Oh really? hmm I guess I'll stick to how it is Aug 30 14:16:55 If it's what I think it is then it's a private member, but you might be able to override some various methods Aug 30 14:18:50 I see, it's not too much of a problem I guess but it's good to know Aug 30 14:19:07 Will stick with how it is for now, thanks lovethang_ Aug 30 14:22:45 CocoStorm: I think it should be fairly easy to pass in as a parameter a new size for a field margin to capture the gesture Aug 30 14:22:45 I would like to clear all recent executed application Aug 30 14:22:56 help me please Aug 30 14:24:39 hagui: Sure, this might help you http://bit.ly/1a5CV6O Aug 30 14:27:00 eitama, yes i do , its hosted in rackspace Aug 30 14:27:16 chinmaya, linux or windows? Aug 30 14:28:06 eitama, i dont have that information, i had seen him doing the configuration in windows server OS Aug 30 14:28:20 so i guess it might be windows Aug 30 14:28:47 chinmaya: Well, My seggestion to run netstat to see which port is really being used requires that you have Terminal access via ssh or telnet or remote desktop Aug 30 14:28:49 or Aug 30 14:29:01 ask your IT man to send you the output of netstat with listening port and process params. Aug 30 14:29:09 it's different for linux or windows. Aug 30 14:29:31 eitama , when i do telnet it connects on port 80 Aug 30 14:29:43 that's not what I am asking or suggesting. Aug 30 14:29:43 how in eclipse I can search my project for a word? Aug 30 14:29:45 but he told me there is a loadbalanacer Aug 30 14:29:54 .. or some text? Aug 30 14:30:06 hi Aug 30 14:30:07 does anyone still use eclipse instead of android studio? why? Aug 30 14:30:20 eitama, loadbalancer redirects it to other port 81 Aug 30 14:30:22 superlinux-hp: Surprisingly, Search -> Search Aug 30 14:30:33 I like Eclipse Aug 30 14:30:43 chinmaya: then it's more complicated, and I can't help without having wireshark sniffs. Aug 30 14:30:58 lovethang_, and then where exactly, cos it's unclear to me Aug 30 14:30:59 I want to have an start point (date + time) and an endpoint and then calculate the time by getting their difference Aug 30 14:31:00 ?/ Aug 30 14:31:13 which datatypes would you use for the start/end point= Aug 30 14:31:15 ? Aug 30 14:31:17 eitama let me get the netstat info Aug 30 14:31:23 would timestamp be ok? Aug 30 14:31:36 I have a broadcast receiver Aug 30 14:31:43 lovethang_: are there particular features/behavior studio lacks? Aug 30 14:31:45 I want to pick the phone when the state is ringing Aug 30 14:31:47 vs eclipse Aug 30 14:31:48 superlinux-hp: Search > File ; Type your search keyword, and *.* for which files to search in. Aug 30 14:31:52 any short method to do this Aug 30 14:31:59 aha ok Aug 30 14:32:05 helo: If "excellence" is a feature, then yes Aug 30 14:32:52 louielouie_, thanks Aug 30 14:32:57 lovethang_, thansk Aug 30 14:33:10 chinmaya: if IT guy doesn't know which params to use with netstat, fire him. Aug 30 14:33:19 j/k it has a few bugs we all know, but Eclipse is pretty extensible and is more mature and has more features than most people will ever need Aug 30 14:34:45 can i pass every camera frame to function that takes bitmaps? Aug 30 14:35:13 the camera preview i mean Aug 30 14:35:20 am looking for something similar to TelephonyManager.answerCall(); Aug 30 14:35:34 superlinux-hp: You're asking if you can or you should? :-\ Aug 30 14:35:47 if i can Aug 30 14:37:56 helo, not everyone is only developing for Android. I for one I'm doing some web stuff too. Aug 30 14:38:07 what's web stuff? Aug 30 14:40:24 anyone know if i can connect to the same device via adb over tcp/ip Aug 30 14:41:57 I don't see why not Aug 30 14:43:16 mikedg_, what do you mean? Aug 30 14:46:11 eitama, he shared this information http://pastebin.com/GWup9Qia Aug 30 14:46:44 chinmaya: Fire him. Aug 30 14:46:49 he got this information from IIS Aug 30 14:46:50 hang on. Aug 30 14:47:55 chinmaya: You see in his pastebin, there is only Established and TIME_WAIT Aug 30 14:48:00 means he didn't run the correct command. Aug 30 14:48:02 This is the command Aug 30 14:48:03 netstat -aon Aug 30 14:48:05 for windows Aug 30 14:48:24 ok.. i will check with him Aug 30 14:48:36 thanx eitama Aug 30 14:49:20 chinmaya: For example : TCP 0.0.0.0:24334 0.0.0.0:0 LISTENING 1916 Aug 30 14:49:20 ubersoldat: fwiw, i don't use either... vim ftw ;) Aug 30 14:49:40 1916 is my Skype PID it's listening on port 24334 on all IP addresses Aug 30 14:53:12 hmmm Aug 30 14:57:25 weird, all my unit tests fail when I'm running against a 4.3 x86 image Aug 30 14:58:29 TRUE = !TRUE; Aug 30 14:58:49 not my code, so I'm not gonna investigate, though Aug 30 14:59:26 spoil sport Aug 30 14:59:45 just gonna switch to a 4.1 x86 image Aug 30 14:59:50 since 4.2 x86 image is still a POS Aug 30 15:01:56 and I think 4.1 has everything I want to test with Aug 30 15:07:05 does the 4.3 image spam the logcat with anything? Aug 30 15:19:05 is it possible to make all dates on Calendar view non selectable? Aug 30 15:53:50 Does anyone know how I can make ActionBar tabs look like this? http://picpaste.com/R44rdOgf.png Aug 30 15:54:35 I'm trying to use setCustomView but no matter what I do it always shrinks down to the size of the text Aug 30 15:55:34 (ie it's ignoring match_parent or fill_parent and acting like the custom view is set to wrap_content) Aug 30 15:55:45 tried with layout parameters? Aug 30 15:56:02 thats what i used for padding (no clue if thats what you want, or if its applicable) Aug 30 15:57:23 PatrickBic: i'll give it a go Aug 30 16:01:01 PatrickBic: good call, that didn't quite do it, but it got it closer than it was Aug 30 16:01:27 :) Aug 30 16:01:30 what is left, now? Aug 30 16:01:49 Ankhwatcher, try with this: http://jgilfelt.github.io/android-actionbarstylegenerator/ Aug 30 16:02:06 well there is still some sort of padidng outside the tab view area Aug 30 16:02:35 I bought an android phone to do development on. I don't need/want it for making phone calls, so I did not get any kind of calling plan. But, when I install the battery and turn it on, it won't let me cancel out of the Activiation sequence (and all of the 4 buttons at the button cause the phone to make a short vibration when I press them). How do I configure this phone for dev only? Aug 30 16:02:37 ubersoldat: nah, I already tried that Aug 30 16:04:20 Ankhwatcher, try creating you tabs like this, gives you more control: http://pastebin.com/49Hvu3yd Aug 30 16:05:07 s/you/your Aug 30 16:05:15 williehurl9, http://androidforums.com/incredible-support-troubleshooting/106652-bypassing-activation-screen-no-service-available.html#post990713 Aug 30 16:05:38 PatrickBic: this is what it looks like now: http://picpaste.com/OGyRHjw7.png Aug 30 16:05:39 no guarantee for anything though Aug 30 16:05:53 Is there a version of flinto for android Aug 30 16:06:00 PatrickBic: thx :) Aug 30 16:06:03 Ankhwatcher, is that a textview in there or some menu-control? Aug 30 16:06:25 ? Aug 30 16:06:35 the orange bit with Vehicle is the textview Aug 30 16:06:45 yea, just wanted to be sure :P Aug 30 16:07:06 i made some spreadsheet-table with tons of textviews yesterday :P Aug 30 16:08:53 Ankhwatcher, tried someTextView.setPadding(left,top,right,bottom); ? Aug 30 16:09:59 This design http://img.imgur.com/j3QaJSJ.png or this one http://img.imgur.com/XAdtQDU.png ? Aug 30 16:10:37 la primera Aug 30 16:10:47 second one hurts my eyes Aug 30 16:11:23 same here,although both seem to have too much colors in them imho Aug 30 16:11:59 yeah, it looks more Metro than Android Aug 30 16:12:08 I prefer the second Aug 30 16:12:26 those colors (from the second one) are the standard-android colors, right? Aug 30 16:12:42 PatrickBic: I think that just moved the text in Aug 30 16:29:46 PatrickBic: Thank you very much. I found a solution (LG Vortex) and I was able to skip the Activation step. :) Aug 30 16:36:12 I want my handler to check the state of a togglebutton in my activity class. The handler is static and the button is not so... do I have to pass a reference to the button when I create the handler? Aug 30 16:43:16 I'm trying to animate onLongListItemClick so as you're pressing the button it changes color (like fades to dark blue). If someone could point me in the right direction that would be great. Aug 30 16:45:26 I have an external library which I'm importing to show an activity. I can animate the showing of the activity using one of my project's animations, but when the activity finishes it does so generically. As I don't want to mess with the library to put my animation in, is there any other way I can override the transition using an animation from my project? Aug 30 16:46:29 Extend the activity Aug 30 16:47:43 That means messing with the library code which I'd like to avoid Aug 30 16:48:32 PatrickBic: I got it working, I just needed to turn off the tabstrip thingie Aug 30 16:48:36 How is that messing with the library code? Aug 30 16:49:29 You're not changing the library Aug 30 16:49:33 Well the library is where the code is that contains the activity, as soon as I start changing it I can no longer just plonk in the latest version and it will work as I want, it means in future whenever I upgrade it I will have to keep changing it to put my modifications in Aug 30 16:50:02 Yes the library generates the activity Aug 30 16:50:32 .. generates the activity? Aug 30 16:50:50 I don't think there's really any simpler combination of words I could use to explain that :-\ Aug 30 16:54:22 hey, does anyone know if it's possible to count the number of 'rings' in android Aug 30 16:54:28 of an incoming call Aug 30 16:54:32 or outgoing Aug 30 16:54:41 oh, I thought you were trying to tell how old a phone was Aug 30 16:55:27 lol Aug 30 16:56:47 the pseudorandomizer Aug 30 17:23:31 I just talked my friend into getting a NExus 4 from google for $249 I should be getting commision Aug 30 17:25:10 Hi all, I was sent here because I have NFC questions and you guys are pros. I have an app withe a JTextField and a USB NFC card reader. How can I read the data from the NFC cards into the JTextField Aug 30 17:25:18 he was gonna get a iocean x7 or something Aug 30 17:33:28 hello boys Aug 30 17:43:36 Oh hai Aug 30 17:46:11 Want to build custom aosp rom for my galaxy chat b5330. I have a pc (fx6100 3.3ghz/4gb/500gb) n i run ubuntu 13.04(64) n win7(32). Is my pc fast n capable enough? Aug 30 17:46:12 shmooz: maybe they'll give you a free license for their IDE by way of recompense Aug 30 17:46:52 chris_99: no, the idea is not well-defined. You can't count the number of rings because you don't even know if the remote phone is ringing or playing some mp3 file for ringtone, etc. There is no direct link like that to know what the handset receiving the call is doing. Aug 30 17:47:19 alankila, aha yeah that makes sense Aug 30 17:48:02 Ankhwatcher: he also ordered a Nexus 7 for me, should be here by tuesday Aug 30 17:48:58 PatrickBic: we are the champions... http://picpaste.com/XsxFScBz.png Aug 30 17:49:13 looks neat =) Aug 30 17:49:52 what was it in the end? Aug 30 17:49:53 PatrickBic: it looks good and more importantly it works Aug 30 17:51:05 PatrickBic: I had to turn off the indicator in styles, then the views filled the tabs, then I had to setCustomView and for some reason you can't setCustomView twice so I had to transform the fields Aug 30 17:51:16 (ie change their backgrounds) Aug 30 17:51:43 I spent ages trying to implement stuff in the Theme/styling but none of it worked or made any sense Aug 30 17:55:47 okay I'm off for the weekend Aug 30 17:55:51 bye! Aug 30 17:57:00 have fun Ankhwatcher Aug 30 17:58:07 I need guidence on building aosp from source for a new device Aug 30 17:58:12 Does the elements in "LinearLaout" where android:orientation="vertical" does need to have the layout_height property ? Aug 30 17:58:46 bluesm_: all views require layout_width and layout_height Aug 30 17:59:20 Napalm: But if I specify "layout_weight" it is irrelevent .. Aug 30 17:59:47 yes, but its still required Aug 30 17:59:58 what? layout_weight? Aug 30 18:00:06 in which case the layout_height should be set to 0dp Aug 30 18:00:12 Napalm: Oh.. So then I should make 0dp right ? Aug 30 18:00:13 right Aug 30 18:00:19 yep Aug 30 18:00:21 ah. Now I see what you are talking about. Aug 30 18:00:21 Napalm: Mhm. Ok. Thank you :) Aug 30 18:00:48 Napalm: Do you know, why it is important to specify 0dp ? Aug 30 18:00:51 layout_height is not irrelevant when you use weight.. Aug 30 18:01:00 Napalm: i heard that it make it more performant Aug 30 18:01:07 but I can't understand why Aug 30 18:01:13 its complicated Aug 30 18:01:14 lol Aug 30 18:01:44 anyone else here going droidcon uk this yea? Aug 30 18:01:50 Not really. With weight the linearlayout will make views larger/smaller to match its size exactly Aug 30 18:01:56 SimonVT: Is irrelevant if particular view is in "linearLayout" with orientation="vertical" .... Aug 30 18:01:57 *year Aug 30 18:02:11 weight is for when its inside another layout like a cell the percentage of space it will take up compared to other cells Aug 30 18:02:32 To do this it has to first measure all views, then re-measure all views with weight Aug 30 18:02:43 If the views size is 0dp, it'll skip it in the first measurement pass Aug 30 18:02:47 bluesm_: No it isn't Aug 30 18:03:05 is there a way (script or so) to package an android source bundle up from the repo? Aug 30 18:03:09 Having trouble syncing aosp source Aug 30 18:04:34 Weight on a view that's match_parent doesn't get you the same result as a view that's wrap_content or a view that's 0dp Aug 30 18:04:42 Why can't I import android.support.v4 for my project? Aug 30 18:04:55 Like what do you have to do to be able to import it? Aug 30 18:05:08 Include the support library Aug 30 18:05:26 Add it as a dependency Aug 30 18:09:38 I have android-support-v4.jar under my libs folder, is that what I need SimonVT Aug 30 18:09:39 ? Aug 30 18:09:42 yes Aug 30 18:10:59 How do you add it as a dependancy? Aug 30 18:11:07 *dependency Aug 30 18:13:55 SimonVT, canadiancow Aug 30 18:20:40 keep saying my name. i'll help you much faster that way Aug 30 18:21:00 There was a very good talk at Google I/O 2013 about the complexities (and huge performance penalties) of specifying relative sizes and weights in layouts, that it can require several trips up and down the hierarchy to compute the actual absolute sizes and why you should avoid it at all cost Aug 30 18:21:11 https://www.youtube.com/watch?v=NYtB6mlu7vA Aug 30 18:21:41 I seriously don't know how to add a dependency canadiancow, I'm using Android Studio Aug 30 18:22:02 ^ That's your issue right there *smirks* Aug 30 18:22:47 Are you using gradle? Aug 30 18:24:07 I have a little gradle, I made it out of clay, and when it's dry and ready, with Eclipse it shalln't play Aug 30 18:26:28 how can you check SimonVT ? Aug 30 18:27:01 what's a relative size? Aug 30 18:27:09 You'll have a build.gradle Aug 30 18:27:10 so just like do 100px all the time? Aug 30 18:28:28 mikedg_: That's relatively retarded, so yeah.. it's a relative size Aug 30 18:28:29 mikedg_, yep Aug 30 18:28:40 i make all my widths hardcoded in px Aug 30 18:28:45 that way it always looks perfect on my phone Aug 30 18:29:05 That's horrific lol Aug 30 18:29:17 where would the build.gradle be? Aug 30 18:30:16 https://www.youtube.com/watch?v=rTUwqxHpXMY < lol Aug 30 18:30:38 like under what folder? Aug 30 18:34:01 Napalm: Thank you for sharing this. From now on all of my dreams will be exactly like this. Aug 30 18:36:42 What could I use to store lists of products and shopping lists online? (for an app, obviously) Aug 30 18:38:11 lovethang_: lol Aug 30 18:40:06 zyngawow: SQL locally, synchronised via XML to SQL in the cloud? Aug 30 18:41:03 lovethang_, in the cloud where? Aug 30 18:42:06 Well you could run your own server or rent cloud compute and storage from the likes of AWS or various OpenStack providers? Aug 30 18:42:32 Personally I like AWS Aug 30 18:43:03 So the minSdkVersion and the versionCode are supposed to be stored in both the build.gradle AND AndroidManifest.xml? Aug 30 18:49:14 SimonVT: I opened up Android Studio in a different window using an example package, how come the android.support.v4 is imported for it? Aug 30 18:49:25 But it's not imported for my project? Aug 30 18:56:10 Future Imperfect An IRC client for the modern age. This client is the most exciting one I've ever used. Slick, intuitive interface. Notifications bar and widget show promise. And the fact it is only Beta is all the more promising. The only missing function so far is an automatic reconnect to server (e.g. When there is a change in connectivity). Aug 30 18:56:14 what a nice unsolicited review Aug 30 18:56:47 pfn: I tried yours , it was nice Aug 30 18:58:02 and a bunch of others too, AndChat, AndroIRC .. I'll try Future Imperfect next :) Aug 30 19:00:13 shmooz, "future imperfect" is the title of his review Aug 30 19:00:52 oh. is he talking about your client qicr ? Aug 30 19:01:06 yes Aug 30 19:01:20 yeah it did look nicer, and no ads :) Aug 30 19:01:38 and no weird connection problems like some others Aug 30 19:02:16 lol I was already googling 'Future Imperfect irc client' Aug 30 19:02:36 thinking what an odd name Aug 30 19:02:41 heh Aug 30 19:03:09 does anyone know if its possible to force programmatically the google play upload APK validation to fail? Aug 30 19:03:22 programmatically? Aug 30 19:03:22 huh Aug 30 19:03:27 for example, if I put a version <= the current one, it will fail Aug 30 19:03:28 Is there a way to get all RadioButtons in a RadioGroup? Aug 30 19:03:31 you have to upload manually... Aug 30 19:03:35 zyngawow, getChildren Aug 30 19:03:47 zyngawow, it's a viewgroup, treat it like one Aug 30 19:03:47 but I cant change the version via (Java)code Aug 30 19:04:01 rottz, what exactly are you trying to accomplish Aug 30 19:04:13 rottz, google for malicious code, then put that in your java code Aug 30 19:04:22 google has a few things it filters out Aug 30 19:04:47 when I enable a "debug mode" of my app to test stuff, I want GP to reject it if I forget to disable the debug mode Aug 30 19:04:47 Did I come back at a bad time? Aug 30 19:05:09 (it happened only once, and I rapidly noticed and uploaded a new version 10min later) Aug 30 19:05:21 but still I want to be able to avoid it automatically Aug 30 19:05:30 I will search for it, thanks Aug 30 19:06:50 rottz: sign your debug mode APK with a dev key Aug 30 19:07:06 Google won't allow you to upload if your key expires in less than 10 years or something like that Aug 30 19:07:09 sign it with a key that has an expiry of 1 year Aug 30 19:07:16 default debug key has a 30 year expiry now... Aug 30 19:07:26 oh, interesting Aug 30 19:07:51 it shouldn't let you upload it with a debug key either, should it? Aug 30 19:08:02 it doesn't know what a debug key is Aug 30 19:08:04 other than by expiry Aug 30 19:08:20 but if the key doesnt match the current key it rejects Aug 30 19:08:23 but it doesnt solve my problem Aug 30 19:08:41 so create a new debug key Aug 30 19:08:45 that does solve your problem Aug 30 19:08:48 debug key => rejected Aug 30 19:08:56 save your existing key as your release key Aug 30 19:08:57 no, I have to remember to switch the key every time Im testing Aug 30 19:09:03 no you don't Aug 30 19:09:04 ant release Aug 30 19:09:08 and it signs with your release key Aug 30 19:09:22 obviously, you're looking for an automatic method, why are you releasing a debug build then? Aug 30 19:09:23 uhmm, I have never used ant on android Aug 30 19:09:33 eclipse has an export release build option Aug 30 19:09:39 when you export release build, it should always be a non-debug key Aug 30 19:09:43 that's problem solved right there Aug 30 19:09:59 people that generate release builds from eclipse are fail, too :p Aug 30 19:10:22 the problem is that I generate a release build, with non-debug key, but with debug code Aug 30 19:10:32 I want GP to reject if the code is on debug-mode Aug 30 19:10:42 if the key is wrong GP will reject alrady Aug 30 19:11:01 the problem is that I forget to go and check the code and disable the debug flag before making the final production build Aug 30 19:11:31 * alankila thinks people who pointlessly fracture their development process into multiple processes and separate programs are fail too. They simply have failed to appreciate the power of the kitchen sink. Aug 30 19:12:21 you could easily fracture a human skull against one, for starters. Might not even do a dent to it, especially if it's made from stone or porcelain. Aug 30 19:12:57 rottz, use BuildConfig.DEBUG Aug 30 19:13:12 well, it occurred to me now that I could override this debug flag if the key used to sign the APK is the production key Aug 30 19:13:47 speaking of debug flags, I frankly can't wait until ndk-gdb works on CM 10.2. I'm almost downgrading to 10.1 for this reason. Aug 30 19:13:49 rottz: if (BuildConfig.DEBUG) { /* Malicious code here */ } Aug 30 19:14:00 happily, gf's phone runs CM 10.1 and I can debug my shitty apps with her phone attached when I need it Aug 30 19:14:21 rottz: If BuildConfig.DEBUG == 0 then the bytecode for your malicous payload won't be added to the APK Aug 30 19:15:11 rottz: Although I have to say that's a somewhat nasty hacky way of achieving your end goal Aug 30 19:15:57 using a debug vs. release key would fix this already Aug 30 19:16:01 and properly using BuildConfig.DEBUG Aug 30 19:16:04 solved problem... Aug 30 19:16:53 I only use BuildConfig.DEBUG to turn on Log.* stuff and switch a couple of activities Aug 30 19:18:16 wtf, I think I've been malwared... or something Aug 30 19:18:20 everything is not responding Aug 30 19:18:23 (pc) Aug 30 19:18:35 lol sweetie, that's not being malwared. That's Windows. Aug 30 19:18:49 I'm working on a notification for my app but when I remoteViews.setString is causes my service to crash, does anyone know why? Aug 30 19:19:12 yaodin, why don't you read the log and see why? Aug 30 19:19:15 because we sure can't Aug 30 19:20:43 it's telling me bad notification posed...Couldn't expand RemoteViews for statusbarnotification Aug 30 19:20:50 thanks for the info.. I think I can work around it now Aug 30 19:21:00 yaodin: Although the channels' psychic power is running a little sub-par at the moment, I'm getting a reading that's it's likely that you're trying to make UI changes when you're not executing the call on the UI thread Aug 30 19:21:18 yaodin, read all logs, not just your own Aug 30 19:21:24 and you posted a bad notification... Aug 30 19:22:01 yaodin, if you read the notification manager's logs, you'll see that you called a method you shouldn't, or on the wrong view, etc. Aug 30 19:22:30 I'm trying to change the text of a notification before it's inflated, that shouldn't cause an issue. Aug 30 19:22:51 how can you change the text before it's inflated... Aug 30 19:23:16 The power of Java™ Aug 30 19:24:43 You create a new remoteView, change the text in it then pass it to the NotificationCompat.Builder setContent Aug 30 19:24:54 Why doesnt group.getChildAt(i).setSelected(true); select the child? Aug 30 19:25:15 everything works if I remote the remoteViews.setString() Aug 30 19:25:16 zyngawow, sure it does Aug 30 19:25:25 yaodin, why don't you read the log and see why it's complaining Aug 30 19:25:53 pfn, sure it doesnt :(. Debugged it, code runs, RadioButton isnt selected Aug 30 19:25:55 zyngawow, and iirc, radiobuttons are checked Aug 30 19:25:59 not selected Aug 30 19:26:02 Ah! Aug 30 19:27:12 I am looking at the log, it just says bad notification posted... cound't expand remoteViews for statusbarnotification Aug 30 19:28:45 yaodin, are you looking at the entire log or just filtered for your app Aug 30 19:29:02 and it says more than that, typically, there's an exception stack Aug 30 19:32:37 so i found, android.widget.TextView doesn't have method: setText but i never called setText Aug 30 19:32:46 I called setString so i'm a little confused Aug 30 19:35:56 doesn't have method setText? Aug 30 19:35:57 oh Aug 30 19:36:06 you called setString(R.id.foo, "setText", ...) ? Aug 30 19:36:18 because setText() takes java.lang.CharSequence Aug 30 19:36:23 you used the wrong method Aug 30 19:36:25 yeah, exactly, iv'e also tried setString Aug 30 19:36:28 wrong Aug 30 19:36:41 setTextViewText(R.id.foo, yourtext) Aug 30 19:37:39 goddamnit, windows update fubared my bluetooth again Aug 30 19:38:23 that sucks, don't think I've ever not had trouble with windows bluetooth... Aug 30 19:38:37 when it works, it's beautiful Aug 30 19:39:04 thank you, that worked perfectly Aug 30 19:39:06 but whenever driver updates land, it eats shit Aug 30 19:43:49 hey guys! Is there a dedicated channel for the nexus-series, in particular the (new) nexus 7? Aug 30 19:46:07 is it possible to have different view for tablets ? Aug 30 19:46:14 not the fragment stuff Aug 30 19:46:54 dFence: not an IRC channel but reddit - http://www.reddit.com/r/Nexus7 Aug 30 19:48:00 hrrmpf information overkill ;) Aug 30 19:48:31 basically, what I'm trying to figure out is, whether the new nexus 7 shares the trade of offering a serial console via the headphone port Aug 30 19:49:16 buy one and find out? :p Aug 30 19:49:20 do you know if Location thread can be triggered at the begin of onCreate()? Aug 30 19:49:55 papachan, why not Aug 30 19:49:57 pfn: should be delivered by thursday ;) Aug 30 19:50:05 dFence, then wait a couple days and find out :) Aug 30 19:50:23 but I wanna know NOW -_- Aug 30 19:50:32 post on reddit and hope you get an answer then Aug 30 19:50:34 * pfn doesn't know it Aug 30 19:50:41 dFence: like this? http://hackaday.com/2013/05/30/giving-the-nexus-4-a-serial-port/ Aug 30 19:50:50 louielouie_: exactly Aug 30 19:51:12 why do you want a serial port anyway, are you hacking on your own rom? Aug 30 19:51:17 yup Aug 30 19:51:28 pfn because on one device i have this: Skipped 119 frames! The application may be doing too much work on its main thread. Aug 30 19:51:28 Aug 30 19:51:41 its ok on the others devices Aug 30 19:51:46 yea that is kind of weird. i've used an arduino virtual serial port over USB - not sure why an android one would be useful. arduinos have special serial functions. Aug 30 19:51:53 the kernel of the old nexus7 had hints towards the same function, but I couldn't test it on a live-action device, and I'm not 100% that the code is more than just a stub Aug 30 19:51:54 papachan, then your device sucks Aug 30 19:52:03 pfn you are welcome Aug 30 19:52:44 papachan, figure out why it's skipped 119 frames then Aug 30 19:52:49 use traceview Aug 30 19:52:51 don't guess blindly Aug 30 19:52:57 ok Aug 30 19:53:03 ah ok for really low level debugging - interesting - http://blog.accuvantlabs.com/blog/jdryan/building-nexus-4-uart-debug-cable Aug 30 19:53:40 louielouie_: perfect, now I don't have to dissect my browser history to find these pages again ;) Aug 30 19:54:23 with all the upstream merges from google, I hope that I'll be able to get a decent kernel running, without all the android crap... don't ask why - I'm kinda puristic in that way ;) Aug 30 19:57:47 dFence: someone said those exact same instructions don't work on nexus 7 - http://www.reddit.com/r/ReverseEngineering/comments/1favkm/building_a_nexus_4_uart_debug_cable/ but that doesn't rule out another way to get UART debugging going like the USB OTG they mention in that blog post Aug 30 20:00:11 louielouie_: same in the hackaday-comments, but the old nexus kernel had it, and I remember stumbilng over a dmesg with a very talkative kernel, that had the values necessary for the nexus7-uart Aug 30 20:00:21 Where should I save (on the phone) an ArrayList of Parcelable objects? Aug 30 20:00:25 And how Aug 30 20:00:28 you don't Aug 30 20:00:56 Serializable? Aug 30 20:01:07 what exactly are you trying to accomplish Aug 30 20:01:10 dFence: i think if you really want this, prob nexus 4 is your best bet right now w/o doing a bunch of kernel hacking Aug 30 20:01:23 zyngawow: If you need to serialize parcelable then You're Doing It Wrong™ Aug 30 20:01:35 but it's the hacking I was looking forward to :( Aug 30 20:01:47 pfn, it is simple. Save an ArrayList on the phone Aug 30 20:02:06 lovethang_, serialize it and then.. sqlite? Or would a plain file be better? Aug 30 20:02:08 zyngawow, then save it Aug 30 20:02:16 choose what makes sense for your application and save it Aug 30 20:02:20 Hey guys, For some reason I can't see any of the images or any background color I set? http://pastebin.com/f5KPtgXS layout: Aug 30 20:02:20 http://pastebin.com/cg8YwKrF Aug 30 20:02:22 zyngawow: No my point is that you shouldn't be serializing parcelables Aug 30 20:02:42 lovethang_, if the Parcelable is also Serializable... Aug 30 20:02:50 That shouldnt matter Aug 30 20:03:27 zyngawow: No, my point is that your approach is likely wrong. Save your actual data, don't start trying to capture, serialize and store parcelables. That's just a convoluted recipe for a casserole of nonsense Aug 30 20:03:41 hehe i didn't realize that http://developer.android.com/reference/java/io/Serializable.html actually recommends using GSON now Aug 30 20:04:16 I can't seem to get anything onto the screen even though I am inflating the layout :S Aug 30 20:04:51 lovethang_, does it really matter the object implements Parcelable? I don't think so Aug 30 20:05:19 zyngawow: You're not doing much thinking at all Aug 30 20:05:51 hello guys, can someone tell me what's the key to customize the edittext style? I was trying @style/edittext_style but it doesn't wrok Aug 30 20:05:53 lovethang_, I don't know what you mean. Of course I can serialize Serializable objects and store them in memory Aug 30 20:05:58 Why the heck would that be wrong? Aug 30 20:06:04 zyngawow: A parcelable has a particular function, using it to serialize and store your application data isn't its primary use and there are much better ways. I am suggesting your app design is just ill thought-through Aug 30 20:06:17 it shouldn't matter if your class implements two interfaces, but he's saying it is just the wrong approach. Aug 30 20:06:20 hello pipl Aug 30 20:06:21 :) Aug 30 20:06:30 lovethang_, did I say I was going to make my data parcels? Aug 30 20:06:36 zyngawow: review http://developer.android.com/guide/topics/data/data-storage.html for your options Aug 30 20:06:36 louielouie_, why is it? Aug 30 20:06:44 louielouie_, already looking at it Aug 30 20:07:02 how to get back to mainactivity from oncreate of PreferenceFragment ? Aug 30 20:07:09 As soon as people mention serializing parceables I'm 99% certain they're doing something very silly Aug 30 20:07:25 bc Parcelable is mainly used to pass data temporarily via an Intent , not for permanent storage Aug 30 20:07:46 *instantly, without even showing to the user actual preferences form Aug 30 20:07:49 lovethang_, public interface Item extends Parcelable, Serializable{blah} I have an ArrayList of Items. Is that wrong? Aug 30 20:08:28 zyngawow: I think you're missing the point, you've shown me 1 lines of code which is obsessing over the minutia of your app. My point is that your entire design concept is wrong Aug 30 20:08:36 zyngawow, it works if what you're doing is trivial Aug 30 20:09:29 Hey guys, For some reason I can't seem to get any of the images or any background color I set on the screen even though i'm inflating the layout? http://pastebin.com/f5KPtgXS layout: Aug 30 20:09:36 lovethang_, github.com/zyngawow/ShoppingList . Now I've shown you all the code. Still, if I don't Parcel the data, why would Serializing it be wrong (NOT through parcelable) Aug 30 20:09:40 http://pastebin.com/cg8YwKrF Aug 30 20:09:43 If you're serializing a parcelable then you somehow missed quite a big point somewhere about what it's for. Just because something *can* be done doesn't mean it should be, or it's the right way to achieve an end result Aug 30 20:10:07 So what should I do? My objects NEED to be Parcelable (intent stuff) Aug 30 20:10:22 That's fine, but you don't need to serialize them Aug 30 20:10:46 That's a very expensive operation for a start, and often quite unnecessary Aug 30 20:11:02 Do as you will, I'm only commenting that your app could likely be made better by avoiding doing this Aug 30 20:11:06 lovethang_, that doesnt answer "So what should I do?" Aug 30 20:11:16 You've already told me that is not what I should do Aug 30 20:12:13 I don't know what you should ideally be doing, all I have said is that when people include "parcelable" and "serialize" together it's usually the case there's a much better way of doing something. Precisely what that is for your particular app right now, I don't know. I'm saying you should now go and investigate this Aug 30 20:12:31 louielouie_ already gave you a good link to get started Aug 30 20:15:05 anyone? :/ should I bet using activities instead Aug 30 20:15:52 Hi Devs. Could someone explain to me how to use a normal class that extends Activity in combination with a class that extends AsyncTask ? Aug 30 20:16:38 uh Aug 30 20:17:05 I found a lot of code showing the AsyncTask class and it's contents but not how it is referenced from the main activity Aug 30 20:17:15 This confuses me somewhat :) Aug 30 20:17:35 CocoStorm: Your code looks fine, when you say that you aren't getting x/y/z are you sure that your fragment is even being displayed? Try putting a Log.d in there to check the onCreateView is getting called is probably a good place to start? Aug 30 20:17:52 Zurfer: it's referenced like any other Java object. Aug 30 20:19:02 lovethang_, it's getting called Aug 30 20:19:32 CocoStorm: Is anything at all getting displayed? Try starting with a simple TextView to check? Aug 30 20:20:23 lovethang_, just a black screen even though the theme is Light and whenever I try setting a backgruond color it is still black. Will check using a textview though Aug 30 20:21:22 CocoStorm: It might be a problem with the theme you've selected, I had a similar issue with fragments Aug 30 20:21:58 What I'm trying to do is: I have a main activity in which I want to add a table containing a checkbox, app icon and app name og running apps. This table should be populated from a thread/AsyncTask to prevent locking up the UI thread. I was thinking about using AsyncTask to add elements to the table. There would probably be thread violation issues unless I use the correct approach to onPreExecute, doInBackground, onProgressUpdate and Aug 30 20:21:58 onPostExecute. Aug 30 20:22:23 og = of Aug 30 20:23:28 The AT should also update a ProgressDialog with "current app number add / total apps" progress. This requires some cross thread handling Aug 30 20:24:08 Zurfer: AsyncTask is a somewhat convoluted way of pushing work off the UI thread in to a worker thread, the methods you mention are more for sending messages/notifications to the UI thread rather than for actually sending UI updates to it Aug 30 20:24:24 lovethang_, nothing :( TextView doesn't work Aug 30 20:24:40 CocoStorm: Well don't lose hope, this is a good thing. At least you have something to investigate now? Aug 30 20:25:02 hey guys Aug 30 20:25:09 CocoStorm: Have a good nose over your Logcat when the fragment view gets inflated? Aug 30 20:25:11 I have an XML file that I'm inflating and trying to insert into a FrameLayout Aug 30 20:25:25 lovethang_: Ahh, ok.. What would you suggest instead, that is if you have suggestions/replacements for AsyncTask ? Aug 30 20:25:38 Zurfer, basically you loada in doInBackground and then you populate table in in onPostExecute() Aug 30 20:25:44 the XML file is simply a TextView a style and other layout params set Aug 30 20:25:58 Zurfer, people usually opt for an inner class that extends asynctask in those cases Aug 30 20:26:12 depending on your usecase you could also use Loaders if your app does orientation changes Aug 30 20:26:16 I'm doing TextView tv = View.inflate(mContext, R.layout.mylayout, null) and then doing setText on it before I add the view to the FrameLayout Aug 30 20:26:30 Zurfer: A simple new Thread() would do the job but if you want to push progress updates to the UI then you will have to add something yourself to do that job, but I suspect from what you said you may as well just do the job rather than tell the user you're doing the job, when they can see you doing it anyway? Aug 30 20:26:47 duh Aug 30 20:26:49 lovethang_, nothing unusual in Logcat that I can see. I've been at it for a while and I can't seem to find anything :( Aug 30 20:27:03 lovethang_, creating a thread just means he'll have to reimplement asynctask himself Aug 30 20:27:04 badly. Aug 30 20:27:05 why. Aug 30 20:27:14 however, this doesn't seem to be centering the textview in the FrameLayout, despite having gravity and layout_gravity set to senter Aug 30 20:27:17 * center Aug 30 20:27:18 ideas? Aug 30 20:27:21 asynctask is the easier approach for 99% of use cases Aug 30 20:27:22 in java Aug 30 20:27:25 yeah Aug 30 20:27:26 I noticed something when using a Runnable thread .. When showing the PD (ProgressDialog) it froze when it got to the "loop all running apps"-part, meaning it was animated until it hit that part. This suggest wrong implementation on my part. Aug 30 20:27:36 in scala, I just async { do shit } Aug 30 20:27:37 :p Aug 30 20:27:41 :P Aug 30 20:27:50 and I push progress to the main thread by doing a UiBus.post { ui shit } Aug 30 20:27:59 Mavrik: No because AsyncTask is usually more convoluted than what most people need anyway, and comes with its own difficulties Aug 30 20:28:05 what. Aug 30 20:28:11 really. Aug 30 20:28:11 lovethang_: That's not really true. Aug 30 20:28:11 I mean it basically ran through all the apps/loop before returning... Aug 30 20:28:30 so async { do shit; UiBus.post { progress updates }; more shit; UiBus.post { more progress }; ending poop; UiBus.post { done } } Aug 30 20:28:30 :) Aug 30 20:28:36 AsyncTask is the ideal solution in probably 90% of cases. Aug 30 20:28:39 yep Aug 30 20:28:50 lovethang_, asynctask is not convoluted Aug 30 20:28:55 can anyone else spot the problem? :S Aug 30 20:29:05 I've avoided it sometimes, but usually because I needed something *more* complicated, not less. Aug 30 20:29:13 foo extends AsyncTask<...> { doInBackground() { ... } ; onPostExecute() { ... } } Aug 30 20:29:16 is most of what you need to do Aug 30 20:29:20 Oh gosh no. AsyncTask is built on top of threads and other bumpf anyway, and it's usually unnecessary and just exposes more potential problems for the foibles of AsyncTask Aug 30 20:29:21 Zurfer, did you get "app not responding" dialog? Aug 30 20:29:21 then new foo().execute() Aug 30 20:29:26 that's about as simple as you're gonna get in java Aug 30 20:29:32 lovethang_: like what? Aug 30 20:29:41 I come from the school of using the right tool for the job, you don't need a sledgehammer for a walnut Aug 30 20:29:45 the only really bad thing about asynctask is that onPostExecute may occur after the activity has finished Aug 30 20:29:56 and you need to code defensively against that Aug 30 20:30:05 and that it can keep running after activity has died Aug 30 20:30:07 well, anything onUiThread can run after the UI is finished Aug 30 20:30:08 That's not the ONLY bad thing lol Aug 30 20:30:09 lovethang_: manually handling Threads *is* using a sledgehammer for a walnut. Aug 30 20:30:15 yes, it's the only bad thing about asynctask Aug 30 20:30:21 If the orientation changes your AsyncTask will get trashed too Aug 30 20:30:29 lovethang_, that is what I just said Aug 30 20:30:30 it won't get trashed, it'll keep running Aug 30 20:30:30 As well as many other things which could cause this Aug 30 20:30:33 lovethang_: so will your Threads. Aug 30 20:30:37 http://youtu.be/p9X-TOT5IuU Aug 30 20:30:38 oops Aug 30 20:30:56 stupid hexchat copypaste Aug 30 20:31:01 dangit Aug 30 20:31:12 pfn, it's night here, stop making us crave coffee :P Aug 30 20:31:19 Are you the same person who was in here a week ago complaining that using libraries was a sledgehammer for a walnut? Aug 30 20:31:29 I think so Aug 30 20:31:35 lovethang_: I was considering adding the rows to the table on the fly so the user can see the apps being added. The alternativ is waiting for all rows to be added and then showing the table.. this alternativ is not user-friendly if there are many apps to add to the table.. Aug 30 20:31:48 Yeap, specifically using the entire v4 support library when all you want is a DrawerLayout was ridiculous Aug 30 20:32:05 I'm a proper (C) programmer by trade so I like things mean & lean ¬_¬ Aug 30 20:32:06 *sigh* Aug 30 20:32:10 Mavrik: No, it did not hang long enough to get the ANR Aug 30 20:32:14 Hey folks. Very new to Android development, and very excited. Been working on some little test apps, and wanted to know if there is an internal dictionary on Android that I can get access to without a seperate download. Aug 30 20:32:18 Zurfer: perfect use case for AsyncTask. onProgressUpdate and you're done. Please don't listen to him unless you want to do 3x as much work. Aug 30 20:32:19 how to stop PreferenceActivity right after starting, prior to user being able to see the preferences form ? Aug 30 20:32:32 jmagder, dictionary of what? :) Aug 30 20:32:38 lovethang_, C programmers pull in libraries by the dozens Aug 30 20:32:40 what are you talking about Aug 30 20:32:46 Mavrik: words. Aug 30 20:32:53 pfn, Mavrik hey Aug 30 20:32:54 hmmm Aug 30 20:32:54 Mavrik: Specifically english words. Aug 30 20:33:04 pfn: Depends on the developer. :) Aug 30 20:33:08 jmagder, there is a keyboard dictionary, but I'm not really sure you can access it Aug 30 20:33:17 jmagder, the ones that don't want to get anything done avoid libraries at all costs Aug 30 20:33:18 Try the Moby lexicon? Aug 30 20:33:19 jmagder, you'd probably find that somewhere around input method documentation Aug 30 20:33:37 jmagder, there is a user dictionary content provider Aug 30 20:33:57 pfn: Is that for user specific words? Or for the whole dictionary? Aug 30 20:34:03 lads, need an advice :\ Aug 30 20:34:07 http://developer.android.com/reference/android/provider/UserDictionary.html Aug 30 20:34:12 jmagder, dunno, access it and see :p Aug 30 20:34:13 I hate dictionaries that have all the best 4-letter words removed Aug 30 20:34:15 Hey guys, For some reason I can't seem to get any of the images or any background color I set on the screen even though i'm inflating the layout? http://pastebin.com/f5KPtgXS layout: http://pastebin.com/cg8YwKrF Aug 30 20:34:17 Takes me weeks to add them all again Aug 30 20:34:18 grmpf... lost the link to the google kernel-sources... link, anyone? Aug 30 20:34:24 So I should use AsyncTask as an inner class in my main activity with onProgressUpdate ? Aug 30 20:34:39 Zurfer: yep :-) Aug 30 20:34:41 Zurfer, it's a good way to start, yes Aug 30 20:34:44 pfn: HAha, good point Aug 30 20:34:48 Zurfer: lol no Aug 30 20:35:34 Hehe, being a noob in a forum with experienced devs with different opinions is very confusing :) Aug 30 20:36:00 As someone who has written an AsyncTask-like system because I needed extra features...it would have been way easier to just use AsyncTask, but it didn't support a feature I wanted (deliver results on calling thread, not necessarily UI thread). Aug 30 20:36:01 Zurfer this is how you want to do your asynctask http://stackoverflow.com/questions/3357477/is-asynctask-really-conceptually-flawed-or-am-i-just-missing-something/3359003#3359003 (see hackbod's response) Aug 30 20:36:14 thats the canonical way of doing it Aug 30 20:36:22 don't listen to anyone else Aug 30 20:36:25 Zurfer: By the sounds of it, you may as well just get a thread to do your work rather than turn it in to this whole big thing with progress bars and waiting messages. You'll spend the majority of your effort keeping the user informed about all the progress you're not making Aug 30 20:37:01 always keep the user informed Aug 30 20:37:05 dead time is useless Aug 30 20:37:24 If the user can see the fruits of your labour then they ARE being kept informed ¬_¬ Aug 30 20:37:42 huh, arrays.copyOf is api 9 O.o Aug 30 20:38:05 System.arrayCopy then, wonder if there is a performance difference Aug 30 20:38:17 lovethang_: Nice statement. I do however want to show the user "that something is happening".. Aug 30 20:38:46 I hate when an app basically hangs until it has finished a long running task like populating a list Aug 30 20:39:07 Zurfer: that's good, we need more devs like that :-) Aug 30 20:39:16 Zurfer: I think you should probably just use AsyncTask though because you will probably find more support in using it and it sounds like this is what you could do with more than just getting on with the actual work. Using bare threads doesn't mean ANR, just doing work on the UI thread produces that undesirable result Aug 30 20:39:17 Zurfer: What Android version are you targeting? Aug 30 20:40:11 I prefer to target as low as possibly but probably no lower than 2.2/Froyo Aug 30 20:40:29 If I can target lower than 2.2 then I will Aug 30 20:40:47 madness and grief lies beyond 2.3 Aug 30 20:40:55 I think there gets a point when you target lower to the point of gaining less than you're losing Aug 30 20:42:06 hold up... is the codename for 4.3 razor??? Aug 30 20:42:58 no. Aug 30 20:42:59 I think you are right. I just like to support as many users as possible.. or put in another way: I prefer not to discriminate against old users/devices if I can.. If I can't then so be it. Aug 30 20:43:07 Zurfer: You should make sure you're running on THREAD_POOL_EXECUTOR if you're on >11 and it takes a while, otherwise no other AsyncTasks will run while it does. Aug 30 20:43:10 https://developer.android.com/reference/android/os/AsyncTask.html#THREAD_POOL_EXECUTOR Aug 30 20:43:16 Zurfer, < 2.2 devices are badly EOL Aug 30 20:43:27 EOL? Aug 30 20:43:48 see https://developer.android.com/reference/android/os/AsyncTask.html#execute(Params...) for details Aug 30 20:43:56 end of life, less than 1% of total world devices that show up active is 2.2 Aug 30 20:44:18 Mavrik: that's not true. Aug 30 20:44:18 Mavrik: Ahh, ok.. thats nice to know Aug 30 20:44:39 I don't get googles NCs anymore... Aug 30 20:44:41 RyanM, errr Aug 30 20:44:44 yeah, double checked Aug 30 20:44:44 Froyo accounts for 2.5% of active devices, Eclair even still has 1.2% Aug 30 20:44:48 http://developer.android.com/about/dashboards/index.html Aug 30 20:45:00 Zurfer, sorry, I mislead you, is about ~4% for devices older than 2.3 Aug 30 20:45:01 firmware binaries are labelled "razor", device-kernel is called "flo" Aug 30 20:45:11 dFence, those are device codenames Aug 30 20:45:12 not android Aug 30 20:45:36 me, need some kind of shade for my home office door, so darn hot in here Aug 30 20:45:41 aaah device -> razor, kernel == flo Aug 30 20:45:44 Hey guys, For some reason I can't seem to get any of the images or any background color I set on the screen even though i'm inflating the layout? http://pastebin.com/f5KPtgXS layout: http://pastebin.com/cg8YwKrF Aug 30 20:45:44 I bought a new froyo device two months ago Aug 30 20:45:55 nook simple touch Aug 30 20:46:03 I've got more than enough shade in my life. I throw it at everybody Aug 30 20:46:19 SpeedEvil, I hope you feel ashamed. :P Aug 30 20:46:37 it is a useful device. Aug 30 20:46:46 doesn't count, not a play store device ;-) Aug 30 20:46:48 (I think) Aug 30 20:47:02 quite Aug 30 20:47:14 it is now. but yes Aug 30 20:47:54 There shouldn't be a problem targeting 2.2 (don't remember the level.. maybe 8?) if the code/features that the app requires is supported by that target/level.. This would mean more users can enjoy the app.. Correct? Aug 30 20:48:04 mhm Aug 30 20:50:01 Naturlich, but of course you still have to be sensible about it. If there's a design pattern that would make your app Wonderful™ and it's only available on 2.3 and there was no way you could develop it targeting 2.2, then ask yourself which is the greater good?.. Better app for most users, or crappy app for more users? Aug 30 20:50:29 speaking of nooks, i think the hd+ is a really good deal right now, $149 w/$20 gift card for a 9" tablet Aug 30 20:50:30 The Android version of my HTC Desire / Bravo topped at 2.2.. later on HTC release the 2.3 update I think.. Maybe I'm just nostalgic :) I still have the HTC Desire and use it for tests (rooted and running 2.3.7 via Cyanogenmod). Aug 30 20:50:48 fuck i hated the HTC Desire Aug 30 20:50:52 yeah, Desire got 2.3 update Aug 30 20:50:55 such a messed up bluetooth stack Aug 30 20:51:05 terrible build quality Aug 30 20:51:15 used it for 2 years or so, bunch of stuff started dying Aug 30 20:51:35 I hated HTC for the lack of storage space and memory.. what on earth were they thinking Aug 30 20:51:50 hi Aug 30 20:51:50 god, I wish windows had a stack trace function for whenever apps hang Aug 30 20:52:02 It does :-| Aug 30 20:52:12 not showing up in WER Aug 30 20:52:26 i'm looking for a homescreen widget that shows information (text) that is provided by an external service (via http) Aug 30 20:52:37 MicW, you're in #android-dev, write one Aug 30 20:52:56 ^ Props Aug 30 20:53:33 maybe one here has already written one? Aug 30 20:53:50 Maybe Google is your friend? Aug 30 20:53:57 MicW, if someone has already written one, it'd be in the play store Aug 30 20:54:01 once again, you're in #android-dev Aug 30 20:54:03 write it yourself Aug 30 20:54:21 i see, sorry for offtopic Aug 30 20:54:46 Hey guys, For some reason I can't seem to get any of the images or any background color I set on the screen even though i'm inflating the layout? http://pastebin.com/f5KPtgXS layout: http://pastebin.com/cg8YwKrF Aug 30 20:55:08 interesting, as soon as I type into certain apps, they stop responding Aug 30 20:55:11 * pfn headscratches Aug 30 20:55:17 they respond fine up until when I type something... Aug 30 20:55:32 CocoStorm: Simplify your layout completely to just 1 textview and test? Aug 30 20:57:28 pfn: Yeah I am pretty sure thats just a list of user defined words. Aug 30 20:58:26 ive tried Aug 30 20:59:23 Try harder? ¬_¬ Aug 30 20:59:51 lovethang_, it didn't work Aug 30 20:59:52 CocoStorm: I don't know what else to suggest TBH, how about trashing your fragment class for a small while and creating a new ultra-simple one and testing with that? Aug 30 21:00:09 android-studio question: whenever I create my Google Engine backend - I don't get created the RegisterActivity.java class.. a bit frustrating, maybe you have idea why? Aug 30 21:00:12 Was looking through the "SearchableDictionary" example code, and they just load the dictionary from a text file. No worries, I can create my own using /usr/share/dict/words Aug 30 21:00:28 <_some_guy_> any pro android dev here?? I am a newbie! Aug 30 21:00:31 jmagder: Moby words is FAR better Aug 30 21:00:47 jmagder: https://en.wikipedia.org/wiki/Moby_Project Aug 30 21:01:23 lovethang_: Fascinating, thanks! Aug 30 21:01:48 jmagder: You're welcome :) I use Moby names to infer gender from peoples names which freaks out a lot of end-users of various programs of mine tehe Aug 30 21:04:51 _some_guy_: You're a pro Aug 30 21:04:52 <_some_guy_> can anyone help me on my first project?? Aug 30 21:05:14 <_some_guy_> am sorry i think you've mistaken me with someone else Aug 30 21:05:26 <_some_guy_> am a student currently learning android Aug 30 21:05:37 <_some_guy_> and have a android project as my final year project Aug 30 21:06:26 lovethang_: Great article. I wish I knew about this back in University when I was taking some computational natural language understanding classes. Aug 30 21:08:03 hmm Aug 30 21:08:33 jmagder: Over the years I have found this an indispensable resource for lots of projects Aug 30 21:08:40 hmm, something is really fucked up with my keyboard :( Aug 30 21:08:49 I wonder if those cherry mx clear keys are any good Aug 30 21:09:02 pfn: spill something in it? Aug 30 21:09:03 There are some scripts that take the raw Moby words and compress it to a normalised (binary) format dictionary which is far smaller Aug 30 21:09:26 jmagder, no, apps are hanging as soon as I type something, and yeah, spilled something on it months ago Aug 30 21:10:04 pfn are you on windows ? Aug 30 21:10:16 shmooz, yes Aug 30 21:10:38 that happened to me a few times, once reinstalling the drivers for USB ports fixed it Aug 30 21:11:30 now it happens with my mouse but I think its the cable Aug 30 21:12:59 pc power cycled earlier today, and I installed a bunch of windows updates... Aug 30 21:13:02 I think you can goto System->Hardware and remove the usb ports and when you reboot it automatically detects new hardware and tries to reinstall it Aug 30 21:13:24 yeah, I'll give that a shot, thanks Aug 30 21:16:26 just uninstalling then resacanning for changes Aug 30 21:16:29 lets see if it makes a difference Aug 30 21:21:44 weird... Aug 30 21:21:53 pageant, firefox, and chrome all hang as soon as I press a key Aug 30 21:22:03 hexchat remains working fine, and so do command prompts and explorer Aug 30 21:24:52 this is making no sense at all... Aug 30 21:27:33 pfn: i've had something very strange like that happen once with a bad hard shutdown on win7 64bit. had to perform a repair install and even then had to change permissions on program files to get everything working again. now i have that machine on a UPS. Aug 30 21:28:39 meh, I should rebuild my pc some day Aug 30 21:28:52 I want sata3 and all sorts of goodness Aug 30 21:29:02 my ssd saturates sata2 :( Aug 30 21:32:05 lovethang_, Aug 30 21:34:56 Hey guys, For some reason I can't seem to get any of the images or any background color I set on the screen even though i'm inflating the layout? http://pastebin.com/f5KPtgXS layout: http://pastebin.com/cg8YwKrF Aug 30 21:35:17 I've simplified to just inflate the xml Aug 30 21:35:49 But now the layouts are al the same for each fragment Aug 30 21:35:51 :S Aug 30 21:37:43 fuck it Aug 30 21:37:47 I'll use activities Aug 30 21:38:08 Hello Aug 30 21:38:09 Is there another way to get a working Google Books app besides though Google Play? Aug 30 21:40:30 hmm, interesting, I think my bluetooth dongle broke Aug 30 21:40:41 if it's plugged in, keyboard activity causes some apps to hang Aug 30 21:40:44 not plugged in, it appears ok Aug 30 21:41:40 hm... poking around in the new nexus' kernel, I found a couple hints to a UART-connector, but no definite hint towards how/where it is... Aug 30 21:44:06 pfn: glad to hear Aug 30 21:44:20 how fucked up :-/ Aug 30 21:49:17 i'd rather replace a bluetooth dongle than reinstall windows Aug 30 21:50:41 I'm trying to do a simple scale animation on a view. However, I want it to be easily reversible, even before its finished, and thats not part of ScaleAnimation. Aug 30 21:51:14 I don't find any examples of scaling a view with ValueAnimator.. Aug 30 21:51:28 hm... what kind of debug-output can I expect from adb? (in terms of boot-stages) Aug 30 21:51:31 Do I just animate the "ScaleX" and "ScaleY" properties? Aug 30 22:03:54 <_some_guy_> android app engine is the best choice for ur android app server side application??? Aug 30 22:10:51 Anyone here got experience with Swipe Views? Aug 30 22:12:54 markyosullivan: you mean ViewPagers? Aug 30 22:13:30 he presumably means http://developer.android.com/design/patterns/swipe-views.html Aug 30 22:13:42 http://just-another-blog.net/wp-content/uploads/2013/05/HorizontalViewSwiping.png Aug 30 22:13:56 BB0B Aug 30 22:14:00 ack Aug 30 22:14:24 Anyone used one of them before? Could do with some advice Aug 30 22:14:30 technical difficulties, sorry. (read: still getting used to a mac) Aug 30 22:15:06 markyosullivan: My advice is "read the docs I linked, as well as the dev guide they link" Aug 30 22:16:24 I've looked at both, got a swipe view running but I don't know how to add content to it Aug 30 22:17:32 hah, this is classic "On my MacBook Pro (late 2012), it's taking over 30 seconds to compile my project after making very simple changes (editing a String literal etc). Is this normal? The same change on eclipse would take a couple of seconds for the same project." Aug 30 22:17:42 xavd: There are some things in the gradle plugin that are not fully optimized. Aug 30 22:19:02 markyosullivan: this is a good start http://developer.android.com/training/implementing-navigation/lateral.html Aug 30 22:19:40 and there's a lot of view pager related discussion on Stack Overflow http://stackoverflow.com/questions/tagged/android-viewpager Aug 30 22:19:53 I've read that, I've got a Swipe View working but I don't know how to add activities that I already have so that they can be used for the Swipe View Aug 30 22:20:18 you can't use Activities there - you have to build them as Fragments that are used in the ViewPager Aug 30 22:21:42 Can you not just convert them to Fragments? Aug 30 22:56:06 Hi Aug 30 22:56:57 I have these methods that open up two supposedly different fragments depending on what is clicked. However, for each thing i click the same layout appears. Why is this? http://pastebin.com/nANAWbTB Aug 30 22:58:29 Your layout is the same Aug 30 22:58:31 R.id.content_frame Aug 30 22:58:32 R.id.content_frame Aug 30 23:00:00 markyosullivan, But I inflate my layout from the OnCreateView()? Aug 30 23:00:38 There's no onCreatView() there Aug 30 23:02:10 markyosullivan, that's my main activity. Here is one of the fragments http://pastebin.com/LyUe8F3p Aug 30 23:02:19 the other is the same with a different layout Aug 30 23:05:03 Do you not need 'return null;' Aug 30 23:05:05 ? Aug 30 23:05:30 return null for where? Aug 30 23:05:30 instead of the break Aug 30 23:06:03 markyosullivan, return null instead of the break, really? Aug 30 23:06:20 I'm not an expert, I'm guessing :\ Aug 30 23:06:34 markyosullivan: you can't return null in a void method... Aug 30 23:06:42 That's me told Aug 30 23:07:15 that said, CocoStorm, you forgot a break statement Aug 30 23:07:25 What's calling the selectItem method? Aug 30 23:07:28 case 0 doesn't have a break; it just falls through into case 1 Aug 30 23:07:39 so you'll get the tickets every time Aug 30 23:07:45 That makes sense Aug 30 23:07:46 RyanM, I just realised thanks to markyosullivan when he mentions the switch case. I can't f-ing believe I spent 3 hours on this fiddling with layouts when I just needed to add break; Aug 30 23:08:03 So I did something helpful? :D Aug 30 23:08:18 :-) use the debugger, it makes those bugs much more obvious Aug 30 23:08:32 How does the debugger work? Aug 30 23:08:45 magic Aug 30 23:08:57 (to be honestly, I'm not too sure of the internals) Aug 30 23:09:03 I just know it works. Aug 30 23:09:04 I cannot believe it. I've wasted a day. Now I've failed this test and I wont get the job Aug 30 23:09:09 :'( Aug 30 23:09:13 lol Aug 30 23:10:11 So what happens when you run it? Aug 30 23:14:02 you enter debug mode Aug 30 23:14:45 Okay, might give it a go lol Aug 30 23:14:58 Slight problem with my Swipe View Aug 30 23:15:00 https://lh3.googleusercontent.com/-8itFznuqXyA/UiEmbi3BHtI/AAAAAAAAA9s/AQMNueQ3kBU/w344-h574-no/2013+-+1.png Aug 30 23:15:10 https://lh4.googleusercontent.com/-oNgvPUeMmLE/UiEmc3jTIdI/AAAAAAAAA90/NL-0CoLYGEY/w344-h574-no/2013+-+1+%25281%2529.png Aug 30 23:15:17 displaying the same thing Aug 30 23:16:15 Though I'm pretty sure I haven't added that stuff properly Aug 30 23:16:40 http://pastebin.com/YgPvdAVh Aug 30 23:16:44 That's the code I'm using atm Aug 30 23:17:41 Didn't have a clue how to add textviews, edit texts etc to it until I changed the R.layout. for the onCreateView method Aug 30 23:18:54 um, it's displaying the same thing because you're unconditionally inflating the same layout... Aug 30 23:19:25 and always creating the same fragment Aug 30 23:19:55 So I have to make a switch? Aug 30 23:20:19 or an if statement Aug 30 23:21:03 I don't know what code is referring to what Section the user is currently on Aug 30 23:21:57 Wait Aug 30 23:22:44 Actually I don't know Aug 30 23:22:52 I'm confused by this lol Aug 30 23:24:52 Would it be similar to the getPageTitle(int position) method? Aug 30 23:24:55 what library is GoogleAccountCredential in? Aug 30 23:26:15 markyosullivan: Yes. Aug 30 23:26:35 hello Aug 30 23:28:26 Okay, so could I create a method called getPageContent(int position), then include a switch inside it which would open up a different layout for each position? Aug 30 23:28:49 The only problem with that is that there's already a onCreateView method, would that method not just override it? Aug 30 23:30:41 I'm using fragments in activities, and one of the fragments I'm using needs a variable I need to pass in. If I try to use the FragmentManager to replace the fragment, the old fragment isn't removed, but the new fragment appears on top, so the text is obscured. How can I fix this? Aug 30 23:32:27 markyosullivan: To be honest, I don't have the time to walk you through this. You need to either create the appropriate Fragment in getItem if you're using different Fragments for each page, or use the ARG_SECTION_NUMBER you're passing to inflate the appropriate view in onCreateView. Aug 30 23:37:09 Thanks for the advice RyanM Aug 30 23:37:16 working at it atm :) Aug 30 23:38:05 ah, found it, finally Aug 30 23:38:11 stupid google should make this shit clear on where it's found Aug 30 23:47:04 looks nice, even a chapter on android http://www.informit.com/store/java-coding-guidelines-75-recommendations-for-reliable-9780133439519 Aug 30 23:47:07 (new book) Aug 30 23:49:11 hm, "Do not attempt to help the garbage collector by setting local reference variables to null 243" Aug 30 23:50:24 local references, sure Aug 30 23:50:39 you gain no benefit from doing that, typically Aug 30 23:52:10 Yeah, it's just noise Aug 30 23:57:36 bummer, was hoping for an AS update this week. this past release has been rough. Aug 31 00:01:33 Hi, Aug 31 00:03:32 Just set up android development studio and tried to do a compile of a Hello world and it complains about OpenJDK missing - How come it want openjdk and not my installed Oracle JDK? Cannot run program "/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java" Aug 31 00:14:46 Hello Aug 31 00:15:05 I have a question: Aug 31 00:15:21 How could I copy a folder in my project (containing some HTML, CSS) to somewhere in sdcard? Aug 31 00:15:31 my project = my eclipse project Aug 31 00:27:57 digitsm: Do you just need to store it somewhere and be able to access it from your app, or does it have to be on the SD? Aug 31 00:28:22 Auv5: Not necessarily SD Aug 31 00:28:36 Any where which I can access its absolute path Aug 31 00:29:33 I think you can get a File object and therefore a path from a resource in the "raw" directory. Aug 31 00:29:57 But don't only want a file Aug 31 00:30:18 Auv5: I want a folder with its hierarchy reserved Aug 31 00:31:23 e.g. copying /my_folder/index.html, /my_folder/css/style1.css, /my_folder/css/style2.css Aug 31 00:39:47 digitsm: Turns out you can get a URI to your index.html (with preserved structure) by putting the folder in res/raw and doing something like: http://stackoverflow.com/questions/4896223/how-to-get-an-uri-of-an-image-resource-in-android Aug 31 00:48:47 Auv5: I am not sure the link you provided above can preserve the structure. Specially that I have to give URL of my index.html to a browser. In this case the URL should be in format like "file:///sdcard/my_folder/index.html" Aug 31 00:50:18 The only two ways I could find to access files directly from the project folder in the app are that and http://developer.android.com/reference/android/content/res/AssetManager.html which is the thing behind resources (which should give you better access to the files). Aug 31 00:54:21 digitsm: i have no idea what it was doing, but i found a package on my galaxy S3, that had an entire node.js install (all the js files, and the binary) in its /data/ folder Aug 31 00:54:35 complete with express, connect, and several other modules Aug 31 00:55:44 but in that case, it had to exist as real files for the node binary to handle it, the android browser can maybe handle references inside the apk, and leave it packed Aug 31 00:55:54 worst case, maybe a content provider service? Aug 31 01:07:57 clever: I know about the special url format that webView can handle to access references inside the apk, without unpacking it. Aug 31 01:08:44 clever: But I don't use webView. I want to use GeckoView (the mozilla's equivalent, now in alpha stage) Aug 31 01:09:46 clever: webView had a bug in showing RTL fontfaces, which didn't showed our fonts used in our HTML5 correctly. So I shifted to young GeckoView project Aug 31 01:10:35 Auv5: Thanks. I found this about using AssetManager which does what I want: http://stackoverflow.com/questions/11080386/copy-directory-sub-directories-and-files-to-sd-card-android Aug 31 01:12:16 Auv5: But for using assetManager, where should I copy my folder to my eclipse project? under 'res/raw/myfolder/' or under 'res/myfolder' or under 'assets/myfolder'? Aug 31 01:14:16 digitsm: Personally, I've never used it. From the official docs on it, it seems like assets/myfolder. Aug 31 01:14:44 "Open an asset using ACCESS_STREAMING mode. This provides access to files that have been bundled with an application as assets -- that is, files placed in to the "assets" directory." Aug 31 01:27:16 Auv5: You are 100% correct. But could I copy my folder to somewhere other than sdcard? somewhere more unexposed, where will be deleted if app got uninstalled Aug 31 01:28:02 Auv5: I'm not sure where, maybe somewhere in /data/ for example Aug 31 01:38:32 digitsm: Using the /assests folder in your project should most definitely get it deleted when the program's uninstalled. Aug 31 01:38:50 Oh, nvm. You want to copy it somewhere else. Aug 31 01:40:16 digitsm: http://stackoverflow.com/questions/5627353/how-to-create-file-directories-and-folders-in-android-data-data-project-filesyst Aug 31 01:54:02 is there anyway to run a service in the foreground Aug 31 02:05:27 neer: what are you trying to do? Aug 31 02:07:40 OK, this has bugged me before, but forgot what the problem is, how do I have an edit text with suggestions and multiline and cap sentences cause settings that seems to somehow add "no suggestions" ? Aug 31 02:07:56 setting in code btw Aug 31 02:17:02 Auv5: That was what I exactly wanted. Just a little question. As I realized the "/data" partition is what android calls "Internal Storage" and gets full soon if a lot of apps get installed. Aug 31 02:19:18 Auv5: After reading http://developer.android.com/guide/topics/data/install-location.html I guess with using android:installLocation="preferExternal" in android manifest, only the APK file gets moved from /data/app/ to sdcard and /data/data/your.app/files/ folder (which getFilesDir() refers to) doesn't move. Am I right? Aug 31 02:21:08 "The .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal device memory." Aug 31 02:21:49 Auv5: I am asking this question, because the GeckoView I'm using, caches a lot of data (e.g. 12MB) in /data/data/your.app/files/mozilla/profile_name/cache and I don't want to fill /data/data/your.app/files even more Aug 31 02:22:52 Ah. That and the SD card are unfortunately the only place your app's allowed to put actual files, AFAIK. Aug 31 02:25:57 Auv5: I guess: "private user data" = /data/data/your.app/files, "databases" = /data/data/your.app/databases, "optimized .dex files" must be in /cache/ and "extracted native code" = /data/data/your.app/libs Aug 31 02:27:36 Sounds right. Aug 31 02:29:33 Auv5: There is also getExternalFilesDir(null), which returns a private path (which I don't know where) to somewhere on sdcard, which will be deleted after app uninstall. But I prefer to use getFilesDir() (which returns /data/data/your.app/files) because many devices may not have sdcard. It's a better choice Aug 31 02:29:56 Auv5: Thank you very much for your help. I know completely know what to do. No I must start my code :D Aug 31 02:30:28 No problem. Any time. **** ENDING LOGGING AT Sat Aug 31 02:59:58 2013