**** BEGIN LOGGING AT Sat Apr 05 02:59:58 2014 Apr 05 03:07:48 any idea to align two equals: Apr 05 03:07:56 1 * 1 = 1 Apr 05 03:08:00 1 * 11 = 11 Apr 05 03:08:39 i want the second equal under the first equal Apr 05 03:08:56 use six labels in a grid Apr 05 03:12:09 Pragma: more explanation Apr 05 03:12:29 are you mean gridview? Apr 05 03:12:38 2nd equal under first equal, in what Apr 05 03:12:46 in your code? in your layout? Apr 05 03:12:55 layout Apr 05 03:12:59 textview Apr 05 03:13:22 hmm, pragma's solution is probably easiest Apr 05 03:13:52 but i will set the values programmatically Apr 05 03:13:58 put textviews in places that are fixed, maybe something like (equation) (equals) (result) Apr 05 03:14:08 yeah, you can refer to the textview in your code Apr 05 03:14:22 TextView tview = (TextView) findViewById(R.id.textview1); Apr 05 03:14:33 tview.setText("1 + 1"); Apr 05 03:14:36 etc etc Apr 05 03:15:07 gridview might work, I've never used it Apr 05 03:15:38 recursor94, what hackathon are you at? Apr 05 03:16:17 bbdude: nice idea, with using margin Apr 05 03:16:44 it helps to just go nuts and get a feel for how layouts work more Apr 05 03:17:19 change parameters, look at the rendered view, rinse, repeat Apr 05 03:21:28 bbdude: Just one run by the college I go to. It's only among students that go here. Apr 05 03:21:52 I found out how to force the overflow to appear on the screen Apr 05 03:22:05 but I just can't understand why I can't get the other items to appear on the action bar. Apr 05 03:22:11 There is *definitely* enough space. Apr 05 03:22:54 and I have showasaction set to always. Apr 05 03:22:56 Always!! Apr 05 03:31:11 I'm using the support library, but I'm testing on 19. Apr 05 03:41:22 * pragma- stares at Pragma Apr 05 03:48:43 hello all, i was wondering if anyone had the time to help me build a rom from source, ive got everything set up and the source downloaded, im just having trouble getting the device blobs and what not from my device Apr 05 03:52:06 Andromendous see topic; try #android-root Apr 05 03:56:51 MFW I realize I was creating a completely separate bitmap for every single map marker (over 700) Apr 05 04:07:25 is there any way an ActionProvider could display either a listPopupWindow or PopupWindow? i'd like an action in the actionbar , that when pressed, showed a grid of things to choose from. not sure how to do it Apr 05 04:15:11 Does http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getAddress() return the address even if bluetooth is off? Apr 05 04:24:02 recursor94: You still here? Apr 05 04:27:07 hey guys Apr 05 04:28:36 I'm still here Apr 05 04:28:43 codeguru: Apr 05 04:29:13 recursor94: can you pastebin me your menu XML file? Apr 05 04:29:25 Can I gist you it? Apr 05 04:30:15 sure, that works, too Apr 05 04:30:28 pastebin and gist are synonyms in my book Apr 05 04:30:45 https://gist.github.com/recursor94/9987541 Apr 05 04:32:35 recursor94: The problem is android:showAsAction="always". This only works for the native action bar. Apr 05 04:32:57 one sec and I'll show you how to do it for the appcompat actionbar Apr 05 04:33:14 I actually still have the theme set to holodark. Apr 05 04:33:29 Now I realize that that probably doesn't work for the support library. Apr 05 04:33:38 https://github.com/codeguru42/ExerciseMachines/blob/master/main/res/menu/list_actions.xml Apr 05 04:33:55 Here's an example. I had the exact same problem, so I hope that helps. Apr 05 04:34:43 The key is that you have to declare another namespace for the appcompat lib. Apr 05 04:34:55 So does that label have to be the exact same name as the app project name? Apr 05 04:35:04 And can you elaborate on that? Apr 05 04:35:08 From what I understand, it is common practice to use the name of your app as the namespace, but it isn't necessary. Apr 05 04:35:28 The label has to be whatever you declare at the top: xmlns:exercise="http://schemas.android.com/apk/res-auto" Apr 05 04:35:50 since I used "exercise" here, all the other labels are also "exercise" Apr 05 04:35:59 Alright, and taht essentially creates a new namespace? Apr 05 04:36:02 yes Apr 05 04:36:06 Ah. Apr 05 04:36:11 I'll try it out now Apr 05 04:36:14 it "imports" the appcompat namespace Apr 05 04:36:16 thanks so much for your help! Apr 05 04:36:18 :D Apr 05 04:36:21 no problem Apr 05 04:36:37 I recently figured this out when I had the exact same issue. Apr 05 04:39:08 THANKS! Apr 05 04:39:09 :D Apr 05 04:39:15 But now the menu button doesn't work Apr 05 04:39:19 I really don't understand why Apr 05 04:39:21 BUT WHO CARES Apr 05 04:40:07 canadiancow you around? quick UI question Apr 05 04:42:16 Anyone know why FragmentStatePagerAdapter is apparently constantly recreating my fragments while still keeping the old one in memory? I had to resort back to FragmentPagerAdapter Apr 05 04:42:54 ugh, what i'm trying to do should be so simple but … as usual, this is turning out to be an epic pain in the ass Apr 05 04:43:12 fragmentpageradapter does a swell job of reusing the fragments, but I'd like to understand why .__. Apr 05 04:43:18 basically, trying to show a popupWindow for an actionprovider like so http://cl.ly/image/1w3Q2O1X113T Apr 05 04:43:43 however, they have spinners in there, which use their own Windows … so that can't be a popupWindow Apr 05 04:43:56 (can't add a window to a window from what i gather) Apr 05 04:44:08 so what the hell can this thing be ? Apr 05 04:45:23 anywhere you're trying to show a popupwindow, make sure you're using the parent activity as the context Apr 05 04:45:36 unfortunately I'm not very familiar with actionproviders :/ Apr 05 04:46:35 JakeWharton if you are around, how would you show an arbitrary dialog-thingy with spinners from an ActionProvider ? http://cl.ly/image/1w3Q2O1X113T Apr 05 04:47:28 If I want to create a planner app that triggers an activity that reminds the user to do something after a specified interval of time, and then continue to repeat that activity until the task has been completed, would setRepeating be the correct method to use? I want this to run even in the background after the app has been closed. Apr 05 04:51:19 g00s: if you own the action view you can anchor a popup window to it. Apr 05 04:51:43 Don't really know otherwise. You can always do hacks Apr 05 04:51:47 recursor94, sounds like you want a service or a broadcast receiver. check these pages out http://developer.android.com/guide/components/fundamentals.html Apr 05 04:52:29 I haven't used either in android yet, so I'm afraid I wouldn't be much help with implementation Apr 05 04:52:31 JakeWharton yes, i have some example code that uses popupWindow but .. can't use the spinner in there since the newish (post HC) ones seem to create another Window Apr 05 04:52:52 old style spinners used to be dialogs i think. maybe that thing is a dialog :| Apr 05 04:52:57 recursor94, I just worked with them today I will pastebin the links I learned from. Apr 05 04:53:18 JakeWharton thanks Apr 05 04:53:47 recursor94, http://pastebin.com/VgcmZFuH Apr 05 04:54:06 sweet thanks! Apr 05 04:55:05 I saved all the links I used learning how to craft code for Android, I have 400-500, I am thinking of putting into a guide or something. Apr 05 04:55:17 hmm, i don't think that blob can be a dialog because the BG doesn't dim Apr 05 04:55:58 g00s, what about a custom NavigationDrawer ? Or at least use it to figure out how the background dims with a .png Apr 05 04:56:35 I'd like to think of myself as a decent java programmer, although I certainly don't know everything. Apr 05 04:56:42 aretecode actually, i'd like it to behave exactly like google books. i just want a popup with spinner. no dimming Apr 05 04:56:44 But android development is something completely new! Apr 05 04:57:19 g00s, have you tried looking through the Google Music app? It is open source as far as I recall. Apr 05 04:57:45 hm, the Player from GB ? Apr 05 04:58:03 pretty much abandoned. the newish one is not open i don't think Apr 05 04:58:15 Shoot. Apr 05 06:14:27 g00s, that's just a popup window... Apr 05 06:14:51 so an actionProvider showing a popupWindow ? Apr 05 06:15:20 oh, you mean Spinners don't work in a popup? Apr 05 06:15:36 dunno, I figure it should work like any other view Apr 05 06:15:49 spinners use their own Window. Apr 05 06:16:03 (when clicked) Apr 05 06:16:42 allright, well i'll try Apr 05 06:16:48 so if you put a spinner in a popup you get an error? Apr 05 06:18:03 i'm not 100% sure yet. the folks that tried did, judging from SO. i may be able to use spinnerMode="dialog" to get around that Apr 05 06:18:23 its going to take me a while to figure this out still, i didn't want to go down a road with no hope Apr 05 06:18:30 if its not a popupwindow, that is Apr 05 06:19:04 the Kindle app has exactly the same sort of thing, when you click 'Aa' in the actionbar Apr 05 06:19:11 a nice sheet comes out Apr 05 06:23:09 pfn i've read over docs for ActionProvider like 10 times, and i'm still confused how this is different than a regular actionView Apr 05 06:23:32 last time i had this reaction was originally reading over the Loader framework Apr 05 06:23:41 and I am lost Apr 05 06:23:51 saw a post on AskReddit Apr 05 06:24:06 about people telling they made money from Android apps Apr 05 06:24:28 I have no freakin idea as to what someone would like to pay :'( Apr 05 06:25:00 I make about $600 a week Apr 05 06:25:25 that's pretty good Apr 05 06:25:47 I make $20 if I'm lucky Apr 05 06:25:55 Ologn: Apr 05 06:26:03 what does your app do Apr 05 06:26:16 awesome Ologn Apr 05 06:26:19 and the money comes from sales Apr 05 06:26:30 Looney, I have a number of apps. I have not figured out how to monetize any of my game apps though. Apr 05 06:26:44 nice Apr 05 06:26:59 how did you go on about the thought process Apr 05 06:27:11 hey people will pay for this app if done nicely Apr 05 06:27:13 oh oh, he wants the recipe Apr 05 06:27:24 Amen g00s Apr 05 06:27:27 Looney, my apps are free, I make money on ads Apr 05 06:27:36 even more ipressive :D Apr 05 06:27:45 more cool Apr 05 06:27:59 The formula is I would read Eric Ries's The Lean Startup, Paul Graham's essays etc. Apr 05 06:28:14 but thing is that how does one make people engage in app to use/buy Apr 05 06:28:28 ok Apr 05 06:28:46 Looney, read Paul Graham's Startup = Growth essay Apr 05 06:28:50 hi all Apr 05 06:29:00 Ologn but do you have a startup ? Apr 05 06:29:02 must do Apr 05 06:29:09 or did you just apply the principles from that book ? Apr 05 06:29:31 i was going to read the steve blank book Apr 05 06:29:40 g00s, well I went back to college and have been doing apps during breaks - and a little bit during the school year Apr 05 06:29:50 I went back to school though Apr 05 06:30:01 Ologn what program / degree ? Apr 05 06:30:10 g00s, Computer Science Apr 05 06:30:16 o nice :) Apr 05 06:30:25 Actually I am 3 classes short of a degree still Apr 05 06:31:00 Well one thing they talk about is a minimally viable product - just get something usable and get it out fast Apr 05 06:31:14 yup Apr 05 06:31:28 the viability is key Apr 05 06:31:39 Version 1 of this took me like 2-3 days to do https://play.google.com/store/apps/details?id=com.panaceasupplies.android.panaceadb Apr 05 06:31:48 Maybe 4 days, I have notes somewhere Apr 05 06:31:55 People liked it so I worked on it more Apr 05 06:31:56 i thought about making an app for steam but turns out that valve has published the app officially Apr 05 06:32:32 Someone else already did the Java library which handles the heavy lifting, I just stuck a simple Android UI on it and some elementary logic Apr 05 06:32:53 It's like a science experiment Apr 05 06:33:42 You have a hypothesis, but do not know how the experiment will go Apr 05 06:34:05 That's why you do a minimally viable product. If it goes nowhere, you move on. Apr 05 06:34:28 You only wasted a few days or weeks. Working month after month on an app before Version 1 makes no sense. Apr 05 06:34:59 People were hungry for an app that could handle Microsoft Access files so even 2 or 3 days work saw results Apr 05 06:35:05 50-100k install bracket Apr 05 06:35:09 And once I saw the desire was there I did more work on it Apr 05 06:35:45 nice response from people Apr 05 06:35:50 :) Apr 05 06:36:09 My book app has 782,000 active installs Apr 05 06:37:30 wow Apr 05 06:38:14 the thing to which my question boils down is that how do you go on about finding an idea Apr 05 06:38:41 I made a small POC YouTube blockage circumnavigation app Apr 05 06:38:52 YouTube is blocked still Apr 05 06:39:18 I was and am not sure that how to tell people about the app Apr 05 06:39:34 Well, my yardstick is I do apps which can have a mass appeal, unless I can do it very quickly Apr 05 06:39:57 had the working POC app over weekend Apr 05 06:40:09 I get distracted easily so took the weekend Apr 05 06:40:24 I added admob Apr 05 06:40:28 for tracking purposes Apr 05 06:40:36 get how much did I make Apr 05 06:40:45 *guess Apr 05 06:41:07 ? Apr 05 06:41:33 $20 Apr 05 06:42:48 well you are off by a margin of two decimal places Apr 05 06:42:59 last time I checked, I had 0.02$ Apr 05 06:44:06 I usually put the manifest permissions in for Admob in v. 1, and maybe clear out some screen real estate for it, but don't turn it on until it has some traction Apr 05 06:47:58 even that 2 cents are gone :'( Apr 05 06:54:17 well, if I drag the reporting period thing they show up :-D Apr 05 07:39:41 all tis has boil down to is scripting for people Apr 05 07:40:15 but what can one do, man's gotta eat Apr 05 07:44:59 * g00s still can't figure out the difference between actionView & actionProvider Apr 05 07:45:23 very little info on the interwebs about ActionProvider. i wonder if it was lost of most Apr 05 07:52:15 isnt there a searchactionprovider? Apr 05 07:52:40 there is Apr 05 07:53:33 there must be something more to actionProvider than 'also has menu' … they could have called it ActionMenu or something :) Apr 05 07:54:53 canadiancow do you use Play Books at all ? Apr 05 07:55:11 every day Apr 05 07:55:53 canadiancow Ok, excellent. its nice btw ;) now when reading the book, looks like a split action bar. two things: Aa and the TOC symbol (lower left) expose 'sheets' Apr 05 07:56:00 do you know what those are? Apr 05 07:56:08 (Android classes) Apr 05 07:56:22 PopupWindow? hacked dialog? Apr 05 08:00:25 i dont Apr 05 08:00:28 ask me during business hours Apr 05 08:00:31 :P Apr 05 08:00:36 gnight Apr 05 08:01:25 canadiancow gnight Apr 05 09:09:51 sup Apr 05 09:10:03 have a question about this image, https://www.dropbox.com/s/ixxayc9gtgcey2m/Screenshot%202014-04-05%2012.09.23.png Apr 05 09:10:19 where do I patch it to get that fixed? nothing I see should be stretchable.. Apr 05 09:34:47 Hey, Anyone here familar with GCM? Apr 05 10:03:41 danijoo, maybe... you should just ask your questions Apr 05 10:04:37 the documentation says, that after each app-update (new versioncode), the app should request a new registrationID from gcm. Apr 05 10:04:44 Im wondering why this is the case Apr 05 10:05:03 as this makes it kinda hard to keep ids synced with my backend :> Apr 05 10:18:10 hi, I just started with android development and I have an issue trying to include push notifications: as soon as I add the "google-play-services_lib" library to my project it doesn't run anymore: eclipse hangs and goes ot of memory. Increasing -Xms/-Xmx doesn't help. OS is Gentoo Linux Apr 05 10:21:59 any error ? Apr 05 10:24:33 and how do you add the lib? any build tool or the jar Apr 05 10:35:16 danijoo: I add the lib importing /extras/google/google_play_services/libproject/google-play-services_lib in eclipse as Existing Android Code into Workspace, then right clicking on my project --> properties --> android --> add (library) Apr 05 10:36:46 and you dont get any error messages? Apr 05 10:37:08 danijoo: it just hangs Apr 05 10:37:33 danijoo: after a few minutes I clicked on "run" Apr 05 10:37:37 at the properties of you library project, it it marked as library project? Apr 05 10:37:42 and I have to force close eclipse Apr 05 10:37:54 danijoo: no, it isn't Apr 05 10:38:09 the play services lib has to be marked as library project Apr 05 10:38:30 try to follow this guide: http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject Apr 05 10:39:02 and be sure to not have google analytics or google admob sdk added beside play services Apr 05 10:42:16 Hey, I want to create the following layout, I could use to pointers on how this should be done. [ParentView][TextView1][TextView2][/ParentView] you only see textview1, when you drag it to the left, you make room for textview2 and it moves into the visible area, when you let go the view goes back ... any idea how this should be done? Apr 05 10:43:41 danijoo: I was wrong, "google-play-services_lib" is marked as library by default when I import it Apr 05 10:43:58 @jellybee hm.. maybesome kind of scrolls view that scrolls back to beginning when youch is released? Apr 05 10:44:06 scrollview* Apr 05 10:44:22 @darkbasic did you follow the guide? Apr 05 10:45:44 danijoo: I'm trying right now, I just imported the lib as I previously did and checked if "is library" was marked or not Apr 05 10:46:27 unfortunately im not very familiar to eclipse since i migrated to AS Apr 05 10:49:14 danijoo: the guide does the very same thing I did. the only difference is "Declaring library components in the manifest file", but it shouldn't be the culprit Apr 05 10:56:26 mh dunno Apr 05 11:01:43 danijoo: any idea how can control a scrollview like that? Apr 05 11:04:38 @jellybee what about an onTouchListener to check if touch is released Apr 05 11:04:54 and when its released you do scrollView.fullScroll(FOCUS_UP) Apr 05 11:05:01 which should scroll it to the beginning Apr 05 11:05:48 public boolean fullScroll (int direction) Apr 05 11:05:49 direction the scroll direction: FOCUS_UP to go the top of the view or FOCUS_DOWN to go the bottom Apr 05 11:06:02 thanks, ill try Apr 05 11:17:06 mm, fullScroll(HorizontalScrollView.FOCUS_LEFT/RIGHT) does seem to move the scrollview... weird Apr 05 11:18:11 calling it twice in a row works... weird Apr 05 11:23:09 strange Apr 05 12:33:53 why doesn’t for edittext field in layout xml automatically pull up the soft keyboard? Apr 05 12:34:13 or it’s because I’m testing on an emulator? Apr 05 13:03:35 yaw I think it does pull up the keyboard Apr 05 13:03:51 MohammadAG: it doesn’t in the emulator Apr 05 13:04:07 isn't the emulator considered a hardware keyboard? Apr 05 13:04:38 yaw it doesn't Apr 05 13:04:45 you'll need to pull it up manually Apr 05 13:04:58 to be safe, I'd use performClick() Apr 05 13:05:47 it’s not pulled up in the emulator. Apr 05 13:06:04 Doesn't it automatically do that even without requestFocus? Apr 05 13:06:04 I use Nexus 5 emulator with soft keyboard Apr 05 13:06:42 yaw it's not pulled up on my deivce Apr 05 13:06:46 so it's not an emulator thing Apr 05 13:06:55 razor1101 nope Apr 05 13:07:14 MohammadAG: ahem, it’s an emulator. just a Nexus 5 emulator running 4.4 Apr 05 13:07:25 yes, I got that Apr 05 13:07:41 I'm saying it doesn't work on an actual device Apr 05 13:07:51 so it's not an emulator issue Apr 05 13:08:04 MohammadAG: oh ok. Apr 05 13:08:27 but why would you have a cursor blinking in an edittext and not pull up the keyboard by default? Apr 05 13:09:49 do someone use Android Studio? I get "Unresolved Android dependencies Error:com.android.support:appcompat-v7:19.+ (double-click here to find usages.)" Apr 05 13:10:00 I'm just starting a new project Apr 05 13:10:03 yaw, because those aren't connected on android Apr 05 13:10:36 Mavrik: what do you mean? Apr 05 13:10:41 yaw, it's an annoying (and common) issue: http://stackoverflow.com/questions/5105354/how-to-show-soft-keyboard-when-edittext-is-focused Apr 05 13:10:57 yaw, PLEASE don't do dumb stuff like performClick() to mitigate it tho, use IMM Apr 05 13:11:20 click will have bunch of side effects when you don't want it to do what you want Apr 05 13:11:24 Mavrik: yeah, I use that when I control the direction of focus. Apr 05 13:11:47 darkbasic, there are input states where you have focus in edit box and no keyboard Apr 05 13:11:51 I thought there was an xml tag similar to for pulling up the keyboard Apr 05 13:11:56 e.g. physical keyboard, user dismissed keyboard, etc. Apr 05 13:12:12 yaw, I couldn't find any :- Apr 05 13:12:14 / Apr 05 13:12:29 yaw, at least nothing that would work like expected and wouldn't annoy users Apr 05 13:13:14 can someone help me with my "Unresolved Android dependencies Error:com.android.support:appcompat-v7:19.+" issue with Android Studio? Apr 05 13:14:54 Mavrik as dumb as performClick() sounds, I find it the best way to do this Apr 05 13:15:19 but please, if there's a reason why it's dumb, I'd be happy to switch Apr 05 13:15:58 MohammadAG: I think it can trigger all click listeners on the view, when you don’t need them to run Apr 05 13:19:05 MohammadAG: the system of triggering callbacks, most likely http://en.wikipedia.org/wiki/Observer_pattern, is expensive. Apr 05 13:24:52 http://files.linuxsystems.it/files/android_studio.png Apr 05 13:24:57 *darkbasic throws his Nexus 5 out of the window* Apr 05 13:31:04 darkbasic I think your issue is the one in yellow at the top Apr 05 13:31:18 "Gradle project sync failed" Apr 05 13:31:35 I had that two days ago when I imported a project in Android Studio, couldn't figure it out either Apr 05 13:31:36 Mavrik: I know, but sync fails because of appcompat Apr 05 13:31:48 MohammadAG: Apr 05 13:32:08 * MohammadAG checks Apr 05 13:32:15 If I remove appcompat in build.gradle I can run it without problems Apr 05 13:32:55 oh nice, OS X isn't opening Android Studio Apr 05 13:35:36 darkbasic weird, I just created a new project and it worked Apr 05 13:35:40 it did download some files though Apr 05 13:43:22 MohammadAG: which version of Android Studio? Apr 05 13:43:35 0.5.3 Apr 05 13:44:20 MohammadAG: try 0.5.4 the one I'm using, I will try to downgrade to 0.5.3 Apr 05 13:47:31 I hate how Eclipse runs like crap on every device I've owned Apr 05 13:48:08 the day it was rewritten in Java was a sad day :P Apr 05 13:49:27 I wish I could use Xcode tbh Apr 05 13:50:52 MohammadAG: same issue with 0.5.3 Apr 05 13:56:40 where is the feature and promo graphic used? Apr 05 13:56:57 it was used once on play.google.com and also in the play-store app on my phone but now they are all gone! :3 Apr 05 13:57:12 I can't find a place where they are displayed Apr 05 14:00:33 sorry for the connection-loss! Apr 05 14:21:10 "java.lang.ClassNotFoundException: Didn't find class "com.astuetz.viewpager.extensions.PagerSlidingTabStrip" on path: DexPathList[[zip file ...." - Any ideas ? :/ Apr 05 15:01:03 csst0111 include the lib in Order & Export Apr 05 15:34:54 <[ProB]CrazyMan> hi, I tried to connect an Touch Screen monitor with USB Connector to an Android board, I got it to work that it detects something, but only if I have 5 fingers on the screen I could move the pointer, somebody an idea what I have to change in the *.idc file? Apr 05 16:14:48 hey Apr 05 16:17:48 question, if I have an activity that spawns a DialogFragment in it's onCreate(), how do I get it to not spawn a new one each time I rotate the screen? Apr 05 16:30:03 agargiulo: you can inspect the launch intent or see if there is saved data, and save data. The easiest way is to just save a bool in the savestate bundle Apr 05 16:30:36 then if that bool is there, don't recreate the fragment? Apr 05 16:30:47 Yeah, things I forgot I could do Apr 05 16:30:48 yeah, just don't do whatever you do to make the dialog Apr 05 16:31:02 if you only want it to show up once, ever, throw a bool in your savedprefs Apr 05 16:31:04 er shareprefs Apr 05 16:31:06 or something Apr 05 16:32:01 yeah, it's for a welcome message, more or less. So it will only show up once anyway, but everytime I rotate the screen, it recreates it. which I guess makes sense Apr 05 16:33:01 yeah. so what I do for that is the function that displays the welcome message also sets a sharedpref Apr 05 16:34:46 yup, thanks Apr 05 16:36:29 hi all Apr 05 16:37:05 is it possible to get your money using western union from google play account? Apr 05 16:37:14 agargiulo: and then of course the same function looks for that shared pref and just returns w/out doing anything, if it finds it. that should solve the rotate, too, w/out even worrying about the state bundle. Apr 05 16:38:02 dragorn: well, if they rotate while the dialog is shown Apr 05 16:38:59 agargiulo: I don't know DF's default behaviors there, but I assume your problem is your oncreate makes a new one since it gets fired after rotation; if your oncreate calls a function to make the DF that only happens when you don't have the sharedpref, it should solve it Apr 05 16:39:12 DialogFragments can be found by tag, just like other fragments Apr 05 16:39:29 I guess I need to do more research on fragments Apr 05 16:39:34 thanks Apr 05 16:48:15 whats an easy java library for parsing json? Apr 05 16:48:20 any recommendations? Apr 05 16:49:32 gson Apr 05 16:51:04 hi there Apr 05 16:52:29 i've got a slight problem with my lg nexus 4 phone, i did my last phonecall about 6hrs ago, went to sleep, connected the power cable to the nexus, woke up, called a friend, but couldnt hear anything Apr 05 16:52:48 i verified that it is a problem on my side, by calling 2 more friends Apr 05 16:52:51 same result Apr 05 16:53:07 i cannot hear them, and they cannot hear me Apr 05 16:53:25 but, when i turn on the speaker, everything is fine, i can hear them and they can hear me Apr 05 16:53:33 dgtl, try #android (not #android-dev) Apr 05 16:53:44 rsz_, oh, sorry, okay, i will Apr 05 17:03:03 hey Apr 05 17:04:10 I'm a bit drunk and probably shouldn't be coding atm, but is there a better way to do this? http://pastebin.com/u40Fcrxx Apr 05 17:04:45 I want it to only send updates to google if its not the first run Apr 05 17:12:11 looks good enough for me. Apr 05 17:16:23 I just realized it would be better to monitor real changes than first run Apr 05 17:16:38 but thanks Apr 05 17:26:27 anyone having super thin actionbar using actionbarsherlock on 2.3 Apr 05 17:37:03 I did for a while but then I did something and it was fixed Apr 05 17:37:03 :D Apr 05 17:37:42 I cant remember what I did, but I know that if you use this it will be fixed: http://jgilfelt.github.com/android-actionbarstylegenerator/ Apr 05 17:38:55 or maybe one of the other here: http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html Apr 05 17:50:28 I'm having an issue with eclipse/ADT, every time I use the 'export' button my versionCode and versionName get reset to 1 and 1.0 respectively however building/running normally is fine, anyone experienced this or know what the issue is? Apr 05 17:55:17 Quacked, it turns out i was setting my actionbar height to 10dp -____- Apr 05 17:55:38 I must have done that awhile back and I didn't notice it because the parameter doesn't apply to later versions Apr 05 17:57:31 anyone know if 2.3 supports alpha transparency for image buttons or whatever Apr 05 17:57:36 alpha layer isn't showing on 2.3 Apr 05 17:57:44 rather, it's not transparent Apr 05 18:08:17 hi Apr 05 18:08:48 hi Apr 05 18:09:12 ive made a custom listview with a click listener that changes the background color of the clicked item Apr 05 18:09:26 but when scrolling away from the item and back again, the color disappears Apr 05 18:11:20 anyone experienced that before? Apr 05 18:11:30 colorcache is not working Apr 05 18:14:26 xabdullahx, the view is recreated. you have to store the background color for each item (or each item with non default color) and apply it when creating the view Apr 05 18:14:39 xabdullahx: listview redraws items when they get into view. there is no guarantee it will be the same view object next time the item is visible Apr 05 18:14:54 its not enough to: ((TableLayout)view).setBackgroundColor(Color.YELLOW); Apr 05 18:14:55 xabdullahx could be something to do with view recycling Apr 05 18:15:03 ? Apr 05 18:15:12 xabdullahx do it in your getView implementation Apr 05 18:15:39 i want the user to click to change color Apr 05 18:15:58 i will try Apr 05 18:16:05 what about setting the item as activated in your adapter? Apr 05 18:20:06 in the getView, it works, but how do i include the onlclick listener? Apr 05 18:23:33 xabdullahx, easiest way is thelist.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE) and then in the onclick listener, setSelection(position) Apr 05 18:23:45 or something like that Apr 05 18:25:45 i am not sure how that is going to help, but thank you Apr 05 18:26:14 the adapter will keep track of the selected item for you Apr 05 18:27:21 the adapters getview implementation? yea. But i still need some code that says if (this list that have been chosen) view.setbackgroundcolor(yellow) Apr 05 18:30:06 mmm. you'd use a drawable state-list to apply the background colour. but if you don't want to do that, just add a variable like selectedPosition to your adapter, set it when the user clicks, and check the current position against that position in getView to see if they match, then apply the background colour. Apr 05 18:41:28 leslie, alright thanks. it works now. Made a list of integers. for the positions of those that are yellow Apr 05 18:42:50 xabdullahx, https://github.com/lesleh/ListStyling there's an example of what I mean Apr 05 18:45:15 ah ok Apr 05 18:51:02 Hi, are any of you using android studio? I'm trying to import a .jar file, what I did was: I pasted the .jar file into the libs folder, rightclicked, added as library and rebuilt. Android studio then finds the .jar and I'm able to use the functions in the .jar file, however when I try to run the application I get a NoClassDefFoundError. When I check the .jar file in the libs folder, all classes are "IntelliJ stubs" and a "sources Apr 05 18:52:34 Pro9, is the jar referenced in your build.gradle ? Apr 05 18:54:23 leslie, yes it is, but only the build.gradle "inside the app" Apr 05 18:54:39 but only in the build.gradle* Apr 05 18:55:39 right. have you tried reimporting the gradle project? Apr 05 18:56:20 tools, android, sync whatever it's called Apr 05 18:57:38 leslie, tried, but it still gave me the same error Apr 05 18:57:53 huh, strange Apr 05 19:00:40 There could be something wrong with the .jar file, but that seems strange, but since this is my first time working with android studio I'm not entirely sure I did it right while importing Apr 05 19:01:22 I'll post a screenshot of how one of the classes within the .jar file looks, and perhaps someone knows if they are supposed to look like that Apr 05 19:01:58 if you have a line something like this in your build.gradle it should import automatically, I think - compile fileTree(dir: 'libs', include: ['*.jar']) Apr 05 19:08:08 leslie, my build.gradle both has a specific line for the .jar file and the line that you posted under dependencies, my concern is that android studios sais "sources not found" when I open the files in the .jar http://i.imgur.com/syhqWz5.png Apr 05 19:08:37 jar files don't generally contain source code Apr 05 19:08:49 so that's normal Apr 05 19:11:24 Pro9, why not use the maven central version instead of supplying your own jar? Apr 05 19:12:30 leslie, I'm not really sure on how to do that Apr 05 19:12:46 add this line under dependencies: compile 'org.kohsuke:github-api:1.50' Apr 05 19:14:38 leslie, I will do that, i guess I should also remove the .jar file I added by myself to? Apr 05 19:14:45 yup Apr 05 19:15:59 Pro9, I suspect the problem you were having is that the jar you were trying to use depended on other jars that you didn't include. if you use the maven central version, it'll include those libraries automatically. Apr 05 19:16:42 like the jackson library for example Apr 05 19:18:27 leslie, ye, I think your right Apr 05 19:22:17 Can I decompile an apk to get an xml file? I erased one of my xmls that I worked really hard on, but I can't recover it. I tried changing name.apk to name.apk.zip and extracting, but it gives me mumbo jumbo as xml Apr 05 19:22:31 eghdk apktool Apr 05 19:36:20 leslie, using the maven central version seem to work fine, but when I try to run the application I get an error: "duplicate files during packaging of APK" http://pastebin.com/Hyp4xa5P any ideas? Apr 05 19:37:25 leslie: Which one of those packages do I have to download? Apr 05 19:37:31 from apktool? Apr 05 19:42:12 What's the easiest way to track the cause of an out of memory error? probably because of bitmap usage? Apr 05 19:43:37 heap dumps and MAT Apr 05 19:47:02 In case your interested: The "duplicate files" error seems to be some bug: http://stackoverflow.com/questions/20673888/duplicate-files-copied-android-studio-0-4-0 Apr 05 19:49:21 It's not really a bug.. Pretty sure the gradle output tells you what to do as well Apr 05 19:58:04 Im having trouble getting JSON response from a url Apr 05 19:58:14 does anyone have experience with this? Apr 05 19:59:37 what's the issue? Apr 05 19:59:42 dont be so generic Apr 05 20:00:35 gdrc: im trying to get a json response from the hacker news api. i have the url: https://hn.algolia.com/api/v1/search_by_date?tags=story, and all i want to do at this point is get a response Apr 05 20:00:56 perfect Apr 05 20:01:00 how do you make the call? Apr 05 20:01:14 gdrc: ive tried using httpurlconnection and then connecting, but my app is crashing and i dont have enough experience with logcat to understand why Apr 05 20:02:01 you don't need experience to read text Apr 05 20:02:08 gdrc: ill send you a pastebin Apr 05 20:02:11 lol Apr 05 20:02:21 do you ask for json in ui thread? Apr 05 20:02:31 yes Apr 05 20:02:41 im asking for json in onCreate Apr 05 20:02:54 YOU CAN'T :D Apr 05 20:02:59 how come? Apr 05 20:03:22 if you android 2.x you can. are you using gingerbread? Apr 05 20:03:46 gdrc: just fyi, its crashing on the this line: request.connect() Apr 05 20:04:04 gdrc: no Apr 05 20:04:07 not using gingerbread Apr 05 20:04:12 using kitkat Apr 05 20:04:25 on android 3+ you cant do network stuff on ui thread Apr 05 20:04:30 ohhhh Apr 05 20:04:48 gdrc: so should i create a new thread within onCreate to bypass this? Apr 05 20:04:58 you should you asynctask or yes, new java thread Apr 05 20:05:15 and use Handler to notify the ui thread Apr 05 20:05:31 ok, but doesnt that introduce the same problem if i create a new thread within oncreate? Apr 05 20:06:00 no becouse it would be a worker thread and not the ui Apr 05 20:06:14 so you are allowed to do network stuff Apr 05 20:06:46 gdrc: ok, so once i get the json in the worker thread, i need to send it back to the ui thread to do work on it right? Apr 05 20:06:55 yes Apr 05 20:06:58 with an handler Apr 05 20:07:23 gdrc: ok Apr 05 20:07:28 gdrc: thanks for being patient with me Apr 05 20:07:48 gdrc: ive never used a handler before, could you point me to an example where two threads communicate via a handler? Apr 05 20:08:25 gdrc: do you recommend spawning a worker thread within the ui thread? or is there a better way? is async task better? Apr 05 20:08:31 http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html Apr 05 20:08:51 thanks! Apr 05 20:08:58 Try to avoid async task Apr 05 20:09:01 ok Apr 05 20:09:02 it's pretty bugged Apr 05 20:09:11 thanks for the help, ill try and work on it now Apr 05 20:10:36 you're welcome Apr 05 20:15:22 Hope to do some android work at job, I'm sick with iOS Apr 05 20:18:01 Android is an abusive companion tho :P Apr 05 20:18:32 abusive indeed Apr 05 20:19:30 g00s: any luck w/ your BT sockets? Apr 05 20:20:05 dragorn i think using createInsure improved things. went from like 50% probability of connecting to about 90% maybe Apr 05 20:20:26 dragorn if you get a chance to look at your project from GB, i'd appreciate the targetSdk from the manifest Apr 05 20:20:39 g00s: oh it's all in public git Apr 05 20:20:48 dragorn oh cool, link Apr 05 20:20:50 ? Apr 05 20:20:57 g00s: http://kismetwireless.net/gitweb/?p=kisbee.git;a=summary Apr 05 20:21:03 g00s: under 'android' Apr 05 20:21:50 dragorn awesome, thanks. hm, target=15 Apr 05 20:22:04 g00s: as I said, rocking the 2010 code in there Apr 05 20:24:00 yeah … hm, device.createRfcommSocketToServiceRecord(SPP_UUID); Apr 05 20:24:28 so this would have had different behavior up to 9; and then 10+ Apr 05 20:24:36 from what i gather Apr 05 20:28:53 bit it doesn't seem you noticed anything unusual, so i'm stumped Apr 05 20:34:14 g00s: I definitely didn't, it was pretty much consistently just fine w/ my hw Apr 05 20:34:36 yeah, now i'm really confused :P Apr 05 20:35:09 and I never heard complaints, but as I said, not a huge userbase for that one, either Apr 05 20:35:19 i guess what i find strange, is, for me - both work - but one fails more oftenn Apr 05 20:35:45 its just probabilities. i would expect one either worked or didn't - black & white Apr 05 21:01:47 Is it ok if I make a textview global? Apr 05 21:02:08 or is that not recommended? Apr 05 21:14:55 as a private member of your activity class? Apr 05 21:15:07 birbeck: yes Apr 05 21:15:14 that is standard practice Apr 05 21:15:53 s/activity/fragment Apr 05 21:16:32 birbeck: basically what im trying to do is create a separate thread with a runnable, and create a handler so i can talk to the ui thread. in my thread, i send my handler a message, which then calls a function, but my function does not have access to the textview because of scope Apr 05 21:16:51 birbeck: so i tried to make the textview outside oncreate, but it crashed :( Apr 05 21:18:00 I have a very simple android APP where I'm trying todo an HTTP post, the code is here: http://pastebin.com/u934s1UC no matter what when I hit submit button tied to that action the app crashes. I've tried different addresses and code. I can't think why this isn't working. can anyone help? it's faily simple Apr 05 21:18:58 mantazer: yeah, so just save a reference to that textview in onCreate() (if in activity) or onCreateView() (if in fragment) Apr 05 21:19:19 oh ok Apr 05 21:19:24 birbeck: ill try it, thanks Apr 05 21:19:50 or wherever your view is being inflated, but those are the most common Apr 05 21:29:02 dragorn still there by any chance ? when airplane mode is on, does BT sometimes work? i had a problem on froyo where the BT adapter reported enabled, but airplane was on - and no connections could be made Apr 05 21:30:04 i would have thought, if airplane was on, BT would be disabled Apr 05 21:36:45 i have an action bar search, it works and all Apr 05 21:36:54 now i want to pass additional data (such as a category) to it Apr 05 21:37:12 well to the activity that gets called when a search is performed, at least Apr 05 21:37:19 Did you unblocked me from #android yet or not? I am stop using Android and moving to Windows mobile and Nokia we pay Android, advertise Android and we get banned in #android not fair. Apr 05 21:41:03 looks like the only way is to override onQueryTextSubmit Apr 05 21:41:43 I have 10,000 Android users, i will now start my campaign to advertise Nokia/Windows Mobile's cause Android community seems to be arrogant. And we still have to pay Android no way. still my nick is banned in #android for no reasons. Apr 05 21:44:15 IamTrying nobody gives a fuck, move on Apr 05 21:45:13 tstivers: lol Apr 05 21:45:19 is there an easy way to close all tabs opened by intellij's debugger? Apr 05 21:45:44 so overriding OnQueryTextSubmit doesn't seem to be working... mainly because no suitable method was found to override... Apr 05 21:45:45 tstivers, that is how hate creates. Windows did it long time ago, and Google has shown how to treat it. Now Android is arrogant like Microsoft, so others time to show them Apr 05 21:46:33 well i can tell you one thing, IamTrying, bitching in a channel on irc sure isn't going to put a dent in android's market share Apr 05 21:46:34 tstivers, Android become like God, they became so arrogant that behaves like childish, for simple reason they banned someone and without any warning reasons. Apr 05 21:47:24 tstivers, YES it will. 10,000 users can spread virus/spread malware/exploits Apr 05 21:47:33 tstivers, hate can burn a lot Apr 05 21:47:46 so now you're going to spread malicious software to android devices Apr 05 21:47:53 can't imagine why you got banned from #android Apr 05 21:48:30 tstivers, i do not know why they banned me. I was not rude i was explaining my bugs related to Android, its being while they still banned me for no special reason. Apr 05 21:51:07 I created a thread, so that I can do some work, and pass back some information the the UI thread. should i be doing everything within the run() method? Apr 05 21:51:44 my maps api key just won't work, SHA1 matches, api key matches, just won't work... Apr 05 21:51:48 authorization failure Apr 05 21:51:53 so frustrated right now Apr 05 21:53:01 I'm getting "Unknown Error" with GoogleAuthUtil.getToken() Apr 05 21:53:05 was working just fine last night Apr 05 21:53:12 did not change anything >> Apr 05 21:58:58 looks like we're both having a shit time getting google to auth us, frankdrey Apr 05 21:58:59 lol Apr 05 21:59:26 I feel like Google finds joy in silently breaking APIs Apr 05 22:09:27 Is it possible to send a JSONObject within a bundle? Apr 05 22:10:24 when you're publishing a game with admob ads, are you supported to keep your phone's ID as the test device so you can't make $ off your own ads? Apr 05 22:12:35 ok Apr 05 22:12:41 googleauthutil works fine on my dad's n4 Apr 05 22:12:42 >.> Apr 05 22:13:24 well that makes sense Apr 05 22:13:28 wifi had died on my phone Apr 05 22:13:32 >.> Apr 05 22:15:53 i have a searchview, i want to add additional data to the intent that gets passed to the search activity Apr 05 22:15:53 how would i go about doing this? Apr 05 22:20:32 tstivers, intent.putExtras inside calling activity, and getExtras() inside new activity Apr 05 22:21:37 yes bbdude but i don't create the intent is the problem Apr 05 22:21:47 the searchview creates the intent and calls the activity i told it to on it's own Apr 05 22:22:10 oh i'm not sure sorry Apr 05 22:22:44 I am using a SearchView widget with custom suggestions. I have a content provider that contacts google places to populate the suggestion autocomplete. I have this working. I am trying to include lat and lng in my Google Places request. I am unsure of how to get the lat and lng from the activity to the provider when the suggestions get queried. Any suggestions? Apr 05 22:22:47 i think the only option is to override startactivity Apr 05 22:25:44 Does anyone have experience with making http calls within a thread that is separate from the UI thread? Apr 05 22:26:31 im trying to make a request, in a different thread than the UI thread, and when I do, my program crashes when I call the connect() method on my httpURLConnection Apr 05 22:26:45 been working on this for too long... Apr 05 22:26:46 :( Apr 05 22:27:08 use an asynctask Apr 05 22:27:30 someone on irc told me to stay away form asynctasks and go with threads and handlers Apr 05 22:27:47 did they say why? Apr 05 22:27:57 bbdude: would you mind taking a look at my pastebin? its not too long.. Apr 05 22:27:59 bbdude: no they didnt Apr 05 22:28:05 I use something like https://gist.github.com/px-amaac/9998933 Apr 05 22:28:49 bbdude, shadynastys: this is what im doing now: http://pastebin.com/tCMfE7se Apr 05 22:29:00 mantazer: I had difficulty with that before I did an asynctask. I looked at both approaches at least a bit Apr 05 22:29:25 DoYouKnow: so you suggest using asynctask as well? Apr 05 22:29:31 yes Apr 05 22:29:42 Use async task for short things. it really depends on how much data you are consuming. Apr 05 22:29:46 or producing. Apr 05 22:30:10 for a quick one off http request. use async task. Apr 05 22:30:36 ok, well maybe im having a more fundamental problem. I think im using threads correctly, its just that my program breaks on connecting via httpurlconnection Apr 05 22:31:51 shadynastys: that gist you sent me, I dont have to create a separate thread or asynctask for that? Apr 05 22:31:55 is it already built in? Apr 05 22:32:20 yup Apr 05 22:32:44 that is y it is called asynchttpclient Apr 05 22:33:34 I didn't have much luck with that Apr 05 22:33:41 tried asynchttpclient. didn't work Apr 05 22:33:45 it is a lib i believe. Apr 05 22:33:49 DoYouKnow: what was the issue? Apr 05 22:34:30 a bug with downloading a binary Apr 05 22:34:37 octet-stream Apr 05 22:34:49 but for html it may work Apr 05 22:34:53 didn't try tht Apr 05 22:35:20 I needed to download a weird radar data file Apr 05 22:35:29 like a 5 MB binary Apr 05 22:36:46 I posted more of the code Apr 05 22:36:47 https://gist.github.com/px-amaac/9998933 Apr 05 22:37:34 http://loopj.com/android-async-http/ Apr 05 22:37:38 for the lib Apr 05 22:38:57 shadynastys: thanks Apr 05 22:39:31 dont reinvent the wheel. Someone has done the hard work for you. Normally I shy away from libs so i dont have to rely on them in the future. But asynchttp is used by some pretty big apps. Apr 05 22:39:42 I just did an asynctask doinbackground method for the downloading portion of the program. I passed the value of a edittext to that, and it got the appropriate data, and analyzed it (in the background), then it returned a variable called detailed that I +='d the output of the processing methods Apr 05 22:40:28 mantazer: it doesn't have a connect method. Check the docs. You've already connected with open connection. Use readstream. http://developer.android.com/reference/java/net/HttpURLConnection.html Apr 05 22:40:43 which were using a library I accessed from doinbackground() as well Apr 05 22:41:16 eventually, I'm going to return a picture Apr 05 22:41:18 a bitmap Apr 05 22:41:21 of radar data Apr 05 22:41:50 DoYouKnow: You might actually need something other than Async task. if you are dling 5mb of binary. Just know that If your app leaves in the middle of your async request you might have some issues. Apr 05 22:42:16 mantazer: you were crashing on connect because connect doesn't exist. Apr 05 22:42:42 MachineX: lulz. Apr 05 22:43:09 MachineX: rookie mistake Apr 05 22:43:16 i was following an example online Apr 05 22:43:18 shadynastys: I tested it out... it's crashed before and I only had to reboot it once when it got stuck in a loop Apr 05 22:43:25 I hated async task for that reason. I was trying to stream some audio once and had soo many issues with async task. I used a service instead. Apr 05 22:43:25 guess i shouldve referred to docs directly Apr 05 22:43:31 but that was from something I did Apr 05 22:43:40 I programmed a loop by accident Apr 05 22:43:40 mantazer: easily done. :) Apr 05 22:44:44 shadynastys: although, I still have to add some cleanup to my app Apr 05 22:45:01 right now it's dumping the data files in the root of the sdcard, before I go to production I need to fix that Apr 05 22:45:08 but that should be easy to change Apr 05 22:45:54 why is -1px an invalid margin but -1dp is fine? Apr 05 22:46:09 DoYouKnow: just be careful. Async task is only for short quick tasks. Not suited for downloading large amounts of data. They can cause memory leaks if i remember right. Apr 05 22:46:23 shadynastys, that is not true Apr 05 22:46:35 except the memory leak part. anythign can cause memory leaks Apr 05 22:46:44 oh Apr 05 22:46:51 wow, maps v2 api just isn't working at all Apr 05 22:46:55 I thought the memory leak part was wrong. Apr 05 22:47:01 I've tried literally everything Apr 05 22:47:12 Async tasks are not for long running tasks. Apr 05 22:48:11 AsyncTasks should ideally be used for short operations (a few seconds at the most.) < what's the issue with them with "long running" tasks? Apr 05 22:48:31 If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs provided by the java.util.concurrent pacakge such as Executor, ThreadPoolExecutor and FutureTask. Apr 05 22:48:50 can someone please help me troubleshoot my api issue, I need to get this app out asap Apr 05 22:48:51 ok Apr 05 22:48:58 DoYouKnow, I heard in here that it's because only a few (or one?) Asynctask can run at a time Apr 05 22:49:18 by default, they run serially Apr 05 22:49:27 but you can specify other options Apr 05 22:49:34 like with a ThreadPoolExecutor Apr 05 22:49:57 oh, I see Apr 05 22:50:04 I think I have the feel for some apps that use them now Apr 05 22:50:14 didn't they change that in honeycomb or something, canadiancow ? I can't remember which direction it changed though Apr 05 22:50:29 yes, it changed from parallel to serial by DEFAULT Apr 05 22:50:33 but you can still set it to whatever you want Apr 05 22:50:40 ah I see Apr 05 22:51:04 bbdude: you need to provide us with more information than "things are not working." Apr 05 22:52:50 Hi Apr 05 22:52:52 bbdude: Maps v2 api is working just fine. I am currently working with it. Solved. :) Apr 05 22:53:04 did you create a new api key? Apr 05 22:53:22 it was working for me until i changed my package name and generated a new api key Apr 05 22:53:28 No because my api key is working. Why would i create a new one? Apr 05 22:53:42 did you add your package name to your api key? Apr 05 22:53:55 or just click generate api key? Apr 05 22:54:48 I'm having issues with the latest android studio. it won't generate my R.java file into my gen folder Apr 05 22:54:54 anyone else have this problem? Apr 05 22:55:54 If you changed you package name you need to include the package name with the SHA-1. SHA-1;packagename then generate new key. Apr 05 22:56:03 I need suggestion on a solution for this problem: Let's say i create an app where users can upload their media. Consider it as a forum, and take an uploaded media as a 'thread' or 'post'. Let's say a user creates a 'thread' and other users make 'posts' in that thread. These posts consist of media and i want all users to be able to manage and view all their media they have uploaded, no matter to which thread. Now how should i go about regard Apr 05 22:56:03 ing deleting that thread (for example, if it is inappropriate, or the original thread creator wants to delete his/her thread). Should i also delete all 'posts' made in it? Apr 05 22:56:49 Strat:yes. Apr 05 22:56:50 shadynastys: asynchttpclient seemed to have worked when i gave it google's home page as the url, but for some reason im getting this error when i give it the url to hacker news api: javax.net.ssl.SSLException: hostname in certificate didn't match: Apr 05 22:57:04 shadynastys: have you seen it before? Apr 05 22:57:36 mantazer: you have to catch that exception Apr 05 22:58:01 then continue going but warning the user Apr 05 22:58:03 shadynastys, i mean, should i delete these posts from the server also? That is, the users that have made these posts will have it deleted from their profile (even if their posts were appropriate). Besides, I want all users to be able to view their uploaded media Apr 05 22:58:04 or something Apr 05 22:58:10 DoYouKnow: ok ill try it Apr 05 22:59:12 Strat: If the thread is inappropriate or thread creator wants to delete it then all posts in that thread are gone. Apr 05 22:59:22 anyone know why android studio would fail to generate R.java for my imported project? it works just fine on my other computer Apr 05 22:59:27 That is how any forum works. Apr 05 22:59:40 okay thank you shadynastys Apr 05 23:00:42 Yeah an original forum, where posts are made up of text Apr 05 23:01:21 but for example, let's say a person uploads a video and an other person uploads a video response to the first video. Then the first video will be deleted. What to do with the videorepsonse? Apr 05 23:03:56 Strat: Store the videos from each user with the individual user. Reference them on the page that they are posted on. If the thread gets deleted then the user still has their uploaded video connected to them. Every time a user uploads a video for any reason ie. response post/new thread post the video and post should be connected to the user. Not the thread. Apr 05 23:04:50 hattusili_III what have you tried? Apr 05 23:04:53 wow great! Apr 05 23:05:02 :) Apr 05 23:05:18 that indeed seems like a solution that keeps the media from the users! Apr 05 23:05:23 shadynastys: i googled a lot of stuff, but all of the solutions were for older versions of android studio Apr 05 23:05:24 Thanks shadynastys!! Apr 05 23:05:27 good luck. Apr 05 23:05:32 thank you! :) Apr 05 23:05:42 they involved a "Sources" tab in the project structure menu, that no longer seems to exist Apr 05 23:06:04 shadynastys: like this http://stackoverflow.com/questions/16586899/android-studio-cannot-resolve-r-in-imported-project Apr 05 23:06:37 I haven't been able to figure out android studio yet Apr 05 23:07:20 hattusili_III your error can be cause by different things. Apr 05 23:07:32 I thought I could build a maven project in it, but so far I've only been able to get it to build with mvn.bat Apr 05 23:07:48 got some errors Apr 05 23:08:04 shadynastys: i can't figure out what though. i cloned this project onto my laptop from my git repo, and it's working just fine on my desktop Apr 05 23:08:20 so i can't see what's wrong on my laptop. all the files and settings are the same Apr 05 23:08:35 go to VCS > View Changes and see if there's anything important being ignored Apr 05 23:08:45 *Show Changes View Apr 05 23:09:21 as I can get my application keep the screen always lit? Apr 05 23:09:24 hattusili_III It is hard to pinpoint what is happening. Look for stray import statements. Check your settings on your desktop make sure they match up with settings on your laptop. Also make sure Android studio is updated on both. It may be an issue with a new android studio version that is not showing up on your desktop. Apr 05 23:10:04 frankdrey: there are no changes. Apr 05 23:10:29 shadynastys: that may be the issue, a new bug. the android studio on my laptop is newer than the one on my desktop Apr 05 23:11:11 yes update both.. I ran into something similar a few days ago. Apr 05 23:12:04 hattusili_III also because we should cover all the bases here. You posted 1 stack O solution I am assuming you have seen this but Have you tried http://stackoverflow.com/questions/16622515/android-studio-dont-generate-r-java-for-my-import-project? Apr 05 23:12:19 DoYouKnow: catching the exception didnt do it. im still getting this error: javax.net.ssl.SSLException: hostname in certificate didn't match: != <*.algolia.io> OR <*.algolia.io> OR Apr 05 23:13:25 catch (SSLException e) {warn user; ;} Apr 05 23:13:49 shadynastys: ah i saw that one too, but that option seems to be missing Apr 05 23:14:03 mantazer: didn't work? Apr 05 23:14:24 DoYouKnow: unfortunately not Apr 05 23:15:04 mantazer: https://www.google.com/#q=javax.net.ssl+ignore+certificate&safe=off Apr 05 23:15:15 question: if i'm compiling roms using ccache and decide to move servers, can i just take the ccache with me? Apr 05 23:15:19 transfer it to the new server? Apr 05 23:17:16 hattusili_III: is it a gradle build? Apr 05 23:17:35 yes it is Apr 05 23:17:38 mantazer: http://stackoverflow.com/questions/7256955/java-sslexception-hostname-in-certificate-didnt-match Apr 05 23:17:44 see the post rated "5" there Apr 05 23:17:54 you could add a hostnameverifier Apr 05 23:18:03 that's what they did Apr 05 23:18:11 hattusili_III: can you post your build.gradle files? Apr 05 23:18:22 as a gist or pastbin Apr 05 23:18:28 shadynastys: sure, i'll set up a gist Apr 05 23:19:45 mantazer: it's just a variable you set Apr 05 23:20:22 shadynastys: https://gist.github.com/MarkJr94/9999334 Apr 05 23:21:10 DoYouKnow: the setHostnameVerifier and getSockerFactory methods are not usable anymore Apr 05 23:21:16 depracated i think Apr 05 23:22:04 hattusili_III: not it. Just checking. lame. didnt think that was an issue but had to check Apr 05 23:25:24 hattusili_III: wish i could help. Not sure whats up though. I have to get back to my code issues. This channel always distracts me. :) Good luck. Apr 05 23:25:42 shadynastys: good luch with you too. thanks for the help Apr 05 23:25:46 It is probably something real stupid. When you find it you are going to hate yourself for not seeing it.. Apr 05 23:39:13 I'm trying to get a program to compile, but it's not cooperating. Someone send me a main project and a library project with instructiosn to import both and add projectB as a library to projectA. Can someone confirm the steps I need to take to do this because apparently I'm doing something wrong because I'm getting compiler errors everywhere. Apr 06 00:12:12 I am trying to remove a fragment, as part of a fragment transaction Apr 06 00:12:39 and it isn't calling the fragment's onSaveInstanceState() Apr 06 00:13:01 what am I doing wrong to short circuit the lifecycle? Apr 06 00:13:27 I mean, I could probably manually call onSaveInstanceState(), but this seems like a _really_ bad idea. Apr 06 00:13:45 (it really does seem like anything worthwhile to do in Android, is a fucking hack.) Apr 06 00:26:19 I need to display a Zoomable svg in my app. Ideas? Apr 06 00:28:19 i'm developing an android app for my university final project. i need the application to post a facebook status and a tweet. ive been playing with the facebook sample apps but cant even get them to work on my android device without deleting the facebook app. they work fine on the emulator; the issue is something to do with SSO... does anybody have any experience with this? is there an easy Apr 06 00:28:19 solution to posting to both sites? maybe using a webpage rather than posting directly from the app ? if anyone has any experience with this or any advice it'd be greatly appreciated. i'm losing my mind... Apr 06 00:38:32 hey guys Apr 06 00:43:50 what service do I need to install to be able to import android.content.pm.PackageManager Apr 06 00:52:02 I have an NDK build with several shared libraries in separate android.mk files. The build takes a long time because it re-compiles every library every time, even if I haven't made modifications. Is there a way to speed up the build process by only compiling libraries modified since the last build? Apr 06 01:26:33 several weeks into looking in this channel Apr 06 01:26:40 and it really is one of the most useless channels, on the planet. Apr 06 01:26:57 sad. Apr 06 01:27:03 hey pal Apr 06 01:27:21 we try our best, we all have our own problems you know Apr 06 01:28:33 TSCHAKMac, haven't seen you contribute to it's usefulness Apr 06 01:28:50 neither have I from you. Apr 06 01:29:05 I'm not whining ;) Apr 06 01:29:28 I'm frustrated at the complete mess that the Android API is. Apr 06 01:30:32 so dev for ios Apr 06 01:30:34 yea , true dat Apr 06 01:31:02 the documentation from Google is incredibly terse, and is missing a lot of valuable information that I had to learn from a combination of StackOverflow and trial and error... Apr 06 01:31:15 as well as digging into the source code of the classes Apr 06 01:31:37 and I do dev for ios, among many other platforms, have for over 30 years, now. Apr 06 01:31:46 Android is the new Win32. Apr 06 01:32:35 A client specifically wants an app where the interactions are arranged around traversing master/detail views inside an action tabbed view of four main views, each drilling down into sub views. Apr 06 01:32:55 to mimic the interactions of his iOS app. Apr 06 01:33:27 and trying to swap out fragments, while being able to view page between tabs, and maintain state Apr 06 01:33:46 is proving to be a massive pain in the ass…mostly because I'm having trouble finding out valuable pieces of information I need Apr 06 01:34:22 such as how to properly swap out those items in the viewpager, and maintain state, so that if a user wanders off into another tab, and comes back, the state is properly preserved Apr 06 01:34:56 so I am here, reading API documentation and stabbing in the dark until I can get something to work Apr 06 01:35:10 because I've never gotten a straight answer out of this channel. Apr 06 01:35:39 so fuck it, I'm going back to work. Apr 06 01:36:32 Because we're not all geniuses? Apr 06 01:36:53 Why not save state manually? Apr 06 01:37:01 374 members in this channel, statistically, somebody has done this Apr 06 01:37:12 TSCHAKMac, onpause? Apr 06 01:37:28 serialize that Apr 06 01:37:46 I'm considering that. I need to see if onPause is called if i remove a fragment in a transaction. Apr 06 01:38:15 ok Apr 06 01:42:13 TSCHAKMac http://notionink.wdfiles.com/local--files/kishore/fragment_lifecycle.png Apr 06 01:45:36 i have a Layout with clickable=true, focusable=true, and background="?android:selectableItemBackground" … but when i touch it, the selection indicator doesn't show Apr 06 01:45:48 anyone know why that might be ? Apr 06 01:46:57 onClick fires though Apr 06 01:55:00 g00s what about android:attr/activatedBackgroundIndicator ? Apr 06 01:55:31 I'm not sure what the difference is between activated and selected Apr 06 01:56:10 selectableItemBackground should work, its what is used ln listitems for example Apr 06 01:56:44 let me try Apr 06 01:56:46 when I looked up ListView stuff, activatedBackgroundIndicator is what was used. like in simple_list_item_1 Apr 06 01:57:21 hm, not working either. so weird Apr 06 01:57:28 no wait, simple_activated_list_item or something. Apr 06 01:58:52 I think this just makes me appreciate the simplicity of css that much more Apr 06 02:02:41 crap, this is like android 101 why the hell isn't this working Apr 06 02:03:16 if i put a Button with borderlessButtonStyle in that layout, it works as expected Apr 06 02:03:46 but if i try to apply background="?android:selectableItemBackground" to the layout itself, i dont get anything Apr 06 02:06:55 heh, i just read this http://www.slate.com/blogs/business_insider/2014/04/04/apple_vs_android_developers_see_a_socioeconomic_divide.html Apr 06 02:07:03 "Here’s Why Developers Keep Favoring Apple Over Android" Apr 06 02:07:12 because, its a fucking PITA with little return Apr 06 02:07:43 I would say it is the opposite Apr 06 02:07:50 hmm no time to read now but thanks for link Apr 06 02:08:00 imho ios is a dying platform Apr 06 02:08:33 there is a link in there about why designer's don't pay attention or whatever, that was interesting too Apr 06 02:08:51 and low income on android app is chicken-and-egg...devs ignore android users and stick to the crowded overserved ios market...hence android users remain underserved and hence spend less Apr 06 02:09:12 thing that bothered me recently is how selected state can only be applied to colours. Apr 06 02:09:38 leslie oh were you asking about bolding the font the other day ? Apr 06 02:09:45 yep, g00s Apr 06 02:09:50 ah yes, remember now Apr 06 02:10:41 tbh, I really like how xaml does it Apr 06 02:10:43 g00s is da boid wid da j00s ;) Apr 06 02:12:58 job gets done, no excuse, code stays tight but the guy hangs l00s Apr 06 02:13:05 lol ok i'm done sorry Apr 06 02:13:42 yo yo boom chikachika boom boom Apr 06 02:13:50 i don't even know what that was about...never know when the goofy rap muse strikes! Apr 06 02:15:56 Hi all. Question: How would I change 1 specific rule of a view i've set in XML? I was looking into a way by deleting and then adding the new rule through using a LayoutParams, but I can't find a way to get a LayoutParams based on the XML Apr 06 02:18:04 ThomQ: excellent question...wish i knew! :( Apr 06 02:18:19 to be specific, i've got a bunch of text and image views in a RelativeLayout, and I'm using android:layout_below on all to position them. Sometimes on of the view's isn't filled with a string or image though, so have to remove that view so it doesn't leave a gap on screen. the layout_below values get all messed up then Apr 06 02:18:38 myke: lol, finally. After 100's of n00b questions, i've finally got a decent one :P Apr 06 02:19:38 can't you inflate another view and replace that one instead of just deleting it? Apr 06 02:20:17 hmm, I could, but that'll take some total restructuring Apr 06 02:20:33 isn't there another way to get views to 'float' to the top, till they hit another filled view? Apr 06 02:21:25 ThomQ if you make the visbility gone, shouldn't that help ? Apr 06 02:21:30 trying to play with dagger. i want to have a common pure java project that contains my retrofit beans and services, but i cant figure out how to add a dagger module from another dependent project Apr 06 02:21:30 well...try different layout types? Apr 06 02:22:22 because it seems like i have to register every activity and fragment in the module annotation Apr 06 02:23:23 i have a rest api and two client apps that ideally would all share the same pojos and retrofit services Apr 06 02:23:38 mark the module as library=true Apr 06 02:23:43 i did that Apr 06 02:23:57 then include=Foo.class it your app1 module and app2 module Apr 06 02:24:20 Foo.class is the other module? Apr 06 02:25:06 yeah Apr 06 02:25:09 the library module Apr 06 02:25:25 cool. thanks @JakeWharton... loving retrofit btw ;-) Apr 06 02:26:15 and im sure i'll like dagger just as much when i figure it out... been a while since ive used guice so coming from spring its quite different Apr 06 02:26:53 g00s: Awesome, that works Apr 06 02:26:58 thanks! Apr 06 02:27:02 ;) Apr 06 02:27:04 but i understand the limitations of injection with the android lifecycle Apr 06 02:27:40 Still, there must be a way to have views in a relative layout being abled to be stacked ontop or underneath each other, right Apr 06 02:28:24 birbeck: well Dagger isn't Android-specific by any means. It just works well for Android because it avoids most of its faults. Apr 06 02:29:06 JakeWharton is an ActionProvider just an ActionView with a submenu ? Apr 06 02:29:09 yeah, i like that otto, retrofit, okhttp and dagger are all pure java while still focused on android Apr 06 02:29:17 g00s: yep Apr 06 02:29:27 ok, thanks Apr 06 02:30:00 thanks jake, for the libraries and the help. i need to go get a beer now though ;-) Apr 06 02:30:09 wish i could buy you one Apr 06 02:30:30 birbeck what no starbucks :P Apr 06 02:30:32 gotta get scott and you together for happy hour someday Apr 06 02:30:41 nah, i quit that Apr 06 02:48:18 ok, I've basically conceded defeat, and am writing a singleton to keep activity state Apr 06 02:49:32 trying to thread stuff through the usual mechanics just isn't making enough sense in my head to keep at it, i've been stuck for a week. I have to keep going. Apr 06 02:53:46 layout is an instance of LinearLayout. I need to add a generated view or, if it exists, remove it then re-add it. How can I check if a given view exists in layout? Apr 06 02:54:31 use its id, sam1am ? Apr 06 02:56:40 leslie: I am setting layout like this: layout = (LinearLayout) findViewById(R.id.graph1); Apr 06 02:57:07 you can assign an ID with .setId(), sam1am Apr 06 02:57:09 And then layout.addView(graphView); Apr 06 02:57:35 heya, is there any way to use svg or other vector formats for drawables? Apr 06 02:57:56 leslie: How do I tell findViewById to look in the given layout? Apr 06 02:58:17 all views have a findViewById method Apr 06 02:58:27 oh right Apr 06 02:58:28 okay Apr 06 02:58:33 thanks I'l try that Apr 06 02:58:34 zzxx https://code.google.com/p/svg-android/ Apr 06 02:58:36 sam1am: you can just do my_view_group.findViewById Apr 06 02:58:43 ... im a slow typer :P Apr 06 02:59:14 leslie: Thanks! thats great **** ENDING LOGGING AT Sun Apr 06 02:59:58 2014