**** BEGIN LOGGING AT Tue Jan 20 02:59:59 2015 Jan 20 03:07:27 g00s: also, not sure if you saw the earlier |fyi| re: about:resources Jan 20 03:08:17 Hmm. I'm thinking of using 'throws' clauses to declare the unchecked exceptions that my methods throw (and I don't throw any unchecked exceptions). Jan 20 03:08:29 It seems crazy, but it's neat. Jan 20 03:11:00 is it possible to visualize a multiple select with a SimpleOnGestureListener and its onSingleTapUp method? Jan 20 03:12:02 * capella now I can't do anything, but Jan 20 03:14:15 capella can't see about:resources now, its uninstalled :D Jan 20 03:14:40 was this about the lock screen widget ? Jan 20 03:14:43 moz working on adding a about:resources (or something like that) that will be able to tell you which of your tabs and add-ons are causing Firefox to eat CPU, system time or memory. Jan 20 03:14:45 Question about terminology. What is it called when I click a link and instead of opening in a web browser, it opens with my app? I'd like to do that with an account verification email, where a user clicks the verification link and it opens my app and then verifies their account. Jan 20 03:15:01 capella oh yeah for desktop, thats terrific Jan 20 03:15:11 :) Knew you'd be happy Jan 20 03:15:16 :D Jan 20 03:15:23 do android cameras use bayer filters? Jan 20 03:15:55 I knew there was something happenning, I finally found the author willing to admit it ;) Jan 20 03:15:57 Spynxic don't pretty much all sensors have a bayer pattern ? Jan 20 03:16:32 g00s: so I've heard but I have no experience with working cameras Jan 20 03:16:45 do you mean low pass filter ? i bet most have that Jan 20 03:17:43 Spynxic i'm curious why you would be asking about that though Jan 20 03:18:38 g00s: I have very big plans for the android camera if I find a way to access the individual RGB intensities that make up the pixels Jan 20 03:21:08 Spynxic in android 5 you can access that Jan 20 03:21:11 http://source.android.com/devices/camera/camera3.html Jan 20 03:21:24 "Bayer RAW capture, reprocessing of RAW data." Jan 20 03:21:52 http://www.cnet.com/news/android-lollipop-opens-high-end-photography-options/ Jan 20 03:22:20 you'll have to demosaic it yourself probably O.o dunno, haven't used it Jan 20 03:23:45 g00s: Thank you, exactly what I was looking for. I hope to open my high end photography option at the cost of high battery consumption Jan 20 03:25:39 I'm getting an error: Unable to add window -- token null is not for an application on line 99 of this, but it worked for the person on Stack Overflow. Any ideas? I think it's because of the null parameter I'm passing. http://pastebin.com/nMQJXtYj Jan 20 03:25:53 Would be cool to clearly photograph the sun with an android camera Jan 20 03:28:53 Spynxic the sun would be outside the dynamic range of any sensor found in a phone Jan 20 03:29:23 or dSLR for that matter Jan 20 03:33:09 g00s: Meaning every individual RGB intensity has an equal value when looking at a source like the sun, because the sensor has a cap on the intensity? Jan 20 03:33:54 yes, it will be 255 across the board for all pixels - that is if they aren't damaged from pointing the sensor directly into the sun :) Jan 20 03:35:05 speaking of cameras, seems the samsung nx1 has some interesting qualities of its sensor Jan 20 03:36:05 Well that's a bummer. I'd like to look into why that upper cap exist. Ideally the intensities would scale with the source of light Jan 20 03:38:32 the upper cap exists because almost all measurement devices have precision, accuracy, and range tradeoffs Jan 20 03:39:00 if you were doing somethig for astrophotography, you would pick different optics at least Jan 20 03:42:15 rockynook came out with a book recently http://www.rockynook.com/shop/photography/astrophotography/ Jan 20 03:43:04 chapter 6 covers the sun Jan 20 03:43:37 maybe that will give you some ideas Jan 20 03:50:28 You know it’s time to go home when you are wondering why your activity is not starting.. and you relize you forgot to start it. Jan 20 03:50:59 i did that kinda, wondered why my state wasn't activating - forgot to add it to the state machine :P Jan 20 03:52:04 tricknology even worse, you decide something like - oh, i don't need onPause, just onStop - so you rename the method but forget to rename super.onPause Jan 20 03:52:19 that one took me forever O>o Jan 20 03:52:37 I'm back \ ( ^_^)/ Jan 20 03:54:17 LOL Jan 20 03:54:31 Anyone here familiar with the canonical way to build/deploy/test apps from AOSP that live in /system/priv-app? I asked in #cyanogenmod-dev but I figured the process is much the same as AOSP. Jan 20 03:54:43 stuff like that… you spend so much time looking for the obvious mistake.. “where is it getting null???” break out the debugger.. Jan 20 03:54:58 me too \ ( ^ _ ^ ) / Jan 20 03:55:10 sometimes it takes tiem to just step away and try again later Jan 20 04:00:03 C: Jan 20 04:00:12 anyone got a cool icon pack. Jan 20 04:00:14 I need 5 icons Jan 20 04:00:18 ^_^ Jan 20 04:01:50 DragonPunch, Google the Noun Project Jan 20 04:02:05 okeeeey C: Jan 20 04:04:22 umm.. Jan 20 04:04:32 I’m using b.getString() and the mofo wants to say that it’s a parcelable Jan 20 04:04:34 but it isn't Jan 20 04:04:40 but it did come from a parcelable Jan 20 04:07:41 tricknology: Wha chu say? Jan 20 04:07:47 AAH OK Jan 20 04:07:56 I am sending data between 2 different apps Jan 20 04:08:41 on the return trip.. when I do Bundle b = getIntent().getExtras().. in the debugger I see that there is no map Jan 20 04:08:44 just a parcelable Jan 20 04:08:46 Bundle[mParcelledData.dataSize=7328] Jan 20 04:09:37 now the response object that I’m getting the Strings from is a parcellable Jan 20 04:09:49 String something = parcelable.getString(key) Jan 20 04:10:30 parcellable has no getString method Jan 20 04:10:36 then in the receiving activity I do String something = b.getString(key) Jan 20 04:10:40 well.. Jan 20 04:10:43 it’s a custom parcelable Jan 20 04:10:47 http://developer.android.com/reference/android/os/Parcelable.html Jan 20 04:10:50 err serializable Jan 20 04:11:08 sry.. i was saying parcelable.. it’s serializable Jan 20 04:11:21 some object implements serializable Jan 20 04:11:36 that object has a getValue() method Jan 20 04:11:41 returns a String Jan 20 04:12:25 what's your actual problem? Jan 20 04:13:14 Caused by: java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object (name = com.some.lib.SerializableCustomObject) Jan 20 04:13:42 this is a custom class in your application, that you're trying to send to another application? Jan 20 04:13:52 does both applications have the definition for that class? Jan 20 04:13:56 If not, it's not going to work. Jan 20 04:14:07 ok.. I am not trying to send the whole class Jan 20 04:14:22 I am getting values from the class via its getters. They return strings Jan 20 04:14:46 I put that string into a bundle and pass it with intent and call finish(). the receiving activity gives me that error when I use b.getString(key) Jan 20 04:14:57 The error message says your trying to send the whole SerializableCustomObject. Jan 20 04:15:05 you're* Jan 20 04:15:09 yeah.. it’s funny beacuse I’m pretty sure I’m not Jan 20 04:15:16 look again? :) Jan 20 04:15:17 but I could be.. lol Jan 20 04:15:19 or pastebin some code Jan 20 04:15:27 can’t :/ but thanks Jan 20 04:15:52 before you send it, take a look at it in the debugger Jan 20 04:15:55 as long as nothing weird happens when tryign to pull a String via getter from a Serializable Object I think it’s my bad somewhere Jan 20 04:16:07 the bundle? Jan 20 04:16:24 your sending it in an intent, I assume? Jan 20 04:16:29 then yeah, the bundle associated with the intent Jan 20 04:17:15 yep Jan 20 04:17:19 kk Jan 20 04:20:15 Yeah the bundle only has parcelled data Jan 20 04:20:17 no map Jan 20 04:20:25 on the sending side? Jan 20 04:20:29 or the receiving side? Jan 20 04:20:41 sending and receiving Jan 20 04:21:37 can I merge bundles with putAll? Jan 20 04:21:53 assuming that if I have some duplicate keys, those added with putALl will overwrite them Jan 20 04:22:17 yeah, I would assume yeah Jan 20 04:22:59 thats what I thought but docs not clear Jan 20 04:23:04 parcelable stuck in bundle Jan 20 04:23:44 its parcelables all the way down Jan 20 04:25:12 tricknology: call .size() on the bundle first, then look at it in a debugger Jan 20 04:25:35 looking at the source, .size() (among other methods) will cause it to unparcel the data from mParcelledData, into it's map Jan 20 04:25:46 wtf Jan 20 04:25:48 nice Jan 20 04:26:02 basically, anything that accesses the values will cause it to unparcel Jan 20 04:28:07 mother F Jan 20 04:28:10 that was all I needed Jan 20 04:28:33 Thanks JesusFreke Jan 20 04:28:37 np Jan 20 04:28:42 ok gents, going home. see you all again in about a half hour, lol Jan 20 04:30:27 meh, i hate the 'inner classes can't have static declaration' - is there something i dont get like , this totally doesn't make sense - divide by 0 - or did the language designers get lazy ? Jan 20 04:37:25 What would cause onOptionsItemSelected not to be called when running on a tablet but called when running on a phone? Jan 20 04:39:24 why would I want to use a toolbar and/or action bar instead of a bunch of custom gear at the top of my layout? Jan 20 04:39:44 what all do you get for free? I'm implementing some really custom tabs and it seems like a waste of time. Jan 20 04:40:54 knapper_tech: RTL, accessibility, styling, menu integration, consistency with the platform. Jan 20 04:42:07 I was going to put my tabs into a fragment and throw them into the toolbar so that if I replace the toolbar's fragment, it would get all that free stuff later. Jan 20 04:42:23 Is this going to break the use case? Jan 20 04:42:32 Can you search AS keyboard shortcuts through shortcuts like what does Ctrl+F9 does? It seems you can only search actions but not shortcuts. Jan 20 04:50:52 donniezazen: In Settings > Keymap (Ctrl+Shift+A > "set keymap" > Enter), you can click 'Find Action by Shortcut' on the right. Jan 20 04:52:32 It's a shame we can't do that directly via Ctrl+Shift+A. Would be handy. Jan 20 04:54:40 One thing I'm missing from Eclipse is automatic building. It's nice to be able to break the code and have the compiler instantly tell you what broke. Jan 20 04:56:47 yeah, i find out about things way to often only by doing a build Jan 20 04:57:19 There is an option "Make project automatically", but it doesn't seem to work. :\ Jan 20 04:57:36 that only works for IntelliJ's internal make-based build system Jan 20 04:57:40 Ah. Jan 20 04:57:49 so, try a Maven or Ant project and it'll work Jan 20 04:58:11 or just a IDE project Jan 20 04:58:42 I wonder whether they'll ever add this feature for Gradle builds. Jan 20 04:59:13 that would require significant changes in the gradle tooling api Jan 20 04:59:26 TacticalJoke: find action by shortcut opens a dialog. Firststroke doesn't seem to take Ctrl as input. Jan 20 05:00:11 Try Ctrl+[something]. Jan 20 05:00:23 That pair is the first stroke. Jan 20 05:01:59 Here's an example of where I would've liked automatic building tonight. I was changing a (custom) unchecked exception to a checked exception. I wanted to be lazy and rely on the compiler telling me where I had to put 'throws' and so on. Since this exception is used in so many places, I had to manually build several times to achieve this. Jan 20 05:02:22 I guess I could use 'find references', but it's less lazy (as far as I can tell). Jan 20 05:02:49 TacticalJoke: thanks. that's it. Jan 20 05:03:41 Why did they both about creating a separate dialog for it when search box can do it anyways!! Jan 20 05:03:53 s/both/bother Jan 20 05:04:09 Yeah, it'd be better if you could search for that in the usual places (e.g., Ctrl+Shift+A). Jan 20 05:06:38 Okay, I'd better head off. Have fun. Jan 20 05:17:44 Can't place fragments inside Toolbar? Jan 20 05:18:14 I mean...I just did, but nothing displays if my fragment is a toolbar child Jan 20 05:20:46 finally Jan 20 05:21:04 I have a Paint with a color and an Emboss effect. I'm tracing a Path with my finger, while I'm tracing the color shows, but not the emboss. When I raise my finger the emboss appears. Any ideas?? Jan 20 05:21:05 got the networking done. got all 5 tabs setup. got tab strip + view pager w/ icons setup got search bar at top and did some styling to it. Jan 20 05:21:19 :) ready to release at feb 1st Jan 20 05:22:50 It appears that MaskFilters do not apply while I'm dragging, but I Have no clue why. Jan 20 05:37:41 So I know there is a strings.xml for storing strings, but is there any .xml file I could store icons in? Jan 20 05:38:02 Because right now I just have this "int ICONS[] = {R.drawable.ic_home, R.drawable.ic_profile, R.drawable.ic_rides, R.drawable.ic_settings, R.drawable.ic_about, R.drawable.ic_logout};" in my MainActivity... and it feels gross Jan 20 05:41:30 what are you trying to achieve t0astt ? Jan 20 05:41:41 What is the list used for? Jan 20 05:42:49 MikeWallaceDev it's an integer array that holds icons for my navigation drawer Jan 20 05:43:04 btw, are you a professor? Jan 20 05:43:17 I know it's an integer array... :D Jan 20 05:43:30 what are you using it for? There might be a better way Jan 20 05:43:35 I'm trying to just separate it out of my MainActivity Jan 20 05:43:39 no, I'm not. Just old Jan 20 05:43:59 Ah ok. Just wondering because there's a professor at my university named Mike Wallace and he teaches IT Jan 20 05:44:04 So that would've been a little crazy Jan 20 05:44:16 He must be a great guy... :D Jan 20 05:44:33 ok, why do you even have a list of icons in the first place? :D Jan 20 05:45:43 (when you say navigation drawer, I'm assuming that you mean Action bar...) Jan 20 05:46:18 MikeWallaceDev this might give you a bit more background than I can. I'm still a novice at this haha http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html Jan 20 05:46:40 So that's the tutorial I followed, I'm just cleaning up the code now before I move on to the rest of my app. Jan 20 05:49:54 ok, so the icons are passed in to an adapter... Jan 20 05:49:57 just a sec Jan 20 05:50:06 No problem, take your time Jan 20 05:50:41 Also, if you notice any cleaner way to do what's accomplished in that tutorial, I'd like to hear it Jan 20 05:52:54 see.. there's http://developer.android.com/guide/topics/resources/more-resources.html#IntegerArray Jan 20 05:53:02 but that's probably not a good idea. Jan 20 05:53:59 ok, you can use typed array. Right underneath Jan 20 05:54:25 It has the exact example that you are looking for Jan 20 05:55:29 Ah, perfect Jan 20 05:55:31 That works Jan 20 05:55:33 Thanks! Jan 20 05:58:21 no problemo Jan 20 06:07:13 how would one align an image view and edit text Jan 20 06:07:17 side by side in linear layout Jan 20 06:08:03 orientation=horizontal Jan 20 06:08:36 android:orientation="horizontal" Jan 20 06:09:01 in the parent LinearLayout which encapsulates the edittext and imageview Jan 20 06:10:18 wait what Jan 20 06:10:23 i set orientation to horizontal? Jan 20 06:10:34 yep Jan 20 06:10:51 and make sure that they are not 'match_parent' Jan 20 06:11:26 ok, I found the problem with my emboss painting... Hardware Acceleration... It has to be turned off. Jan 20 06:15:46 http://puu.sh/eLKHX/9ee13b53c2.png - I just set the view to horizontal and my view pager just went away Jan 20 06:16:00 The edit text has to be fill_parent but I need ImageView to the left of the EdiTText Jan 20 06:16:53 ?? Jan 20 06:17:19 What's it called where I click a link on my phone, like myapp://stuff and it opens my app? Jan 20 06:18:57 deep link Jan 20 06:20:00 DragonPunch: I think you need to associate weight also with the views Jan 20 06:20:10 niru: i gave up Jan 20 06:21:11 DragonPunch: you want a linearlayout which holds an imageview and edittext side by side in one row and imageview to the left and edittext to the left ? Jan 20 06:21:21 let me post the code if you want Jan 20 06:21:24 yeah it would look nice Jan 20 06:21:38 if you can i would appreciate it Jan 20 06:22:04 thanks DragonPunch Jan 20 06:29:22 Can I ask a UX question? It's about email account validation in my app during the in-app registration process. Jan 20 06:32:42 DragonPunch: please check the link Jan 20 06:32:56 ok Jan 20 06:33:06 t0astt: yeah, im doing email stuff righ tnow Jan 20 06:33:14 you can give some drawable image icon to the imageview Jan 20 06:34:51 DragonPunch: So after a user logs in with facebook, if their edu email account has not been validated, then they are prompted to enter a .edu email address. They enter it and submit it, and then my server sends that email address an activation email. Right now, that link opens in a browser and does activation on my server. Then the next time they open the app, it checks for activation and if activated routes them to the main part of the app. Jan 20 06:35:20 Would it be better for my app to just do something like this? http://stackoverflow.com/questions/1609573/intercepting-links-from-the-browser-to-open-my-android-app Jan 20 06:35:32 Or what would be the best way? Jan 20 06:36:09 hmm Jan 20 06:37:07 maybe do a email verification to a email broadcast reciever and it opens their gmail app for them Jan 20 06:37:55 Hmm, only problem then is if they don't get their .edu email on their phone or through the gmail app Jan 20 06:39:10 DragonPunch, are you still working on your layout? Jan 20 06:39:32 you're problem is the fill_parent (I mentioned no match_parent :P ) Jan 20 06:39:46 yeah Jan 20 06:39:50 but i NEED it to fill parent Jan 20 06:39:58 yes we r trying to figure it out Jan 20 06:40:17 t0astt: open up a dialog box w/ whatever their .edu email is Jan 20 06:40:22 in a web view Jan 20 06:40:33 that makes no sense man, how is it possible for it to be match_parent AND have an image to the side? Jan 20 06:41:42 not to mention that I notice that you also have a FrameLayout in there... Jan 20 06:41:49 What are you trying to achieve? Jan 20 06:42:03 frame layout is seprate Jan 20 06:42:06 its for my view pager Jan 20 06:42:14 im worried about the top Jan 20 06:42:15 for my search Jan 20 06:42:40 i need an image to the right of the text view Jan 20 06:42:40 the layout that you pasted has 3 items, side by side, in a horizontal layout. Jan 20 06:43:39 Maybe you should look into RelativeLayout Jan 20 06:44:01 Jan 20 06:44:06 xmlns:android="http://schemas.android.com/apk/res/android" Jan 20 06:44:07 android:orientation="vertical" Jan 20 06:44:07 android:layout_width="match_parent" Jan 20 06:44:19 hers my original Jan 20 06:44:19 dude. Pastebin.com Jan 20 06:45:48 alright i'm off to bed. night Jan 20 06:45:54 adios Jan 20 06:49:42 lol DragonPunch Jan 20 06:49:44 that spam Jan 20 06:49:50 ok, I'm off to bed as well, good night all! Jan 20 06:50:00 n.n Jan 20 06:50:13 yeah ik accidentally hit that paste button Jan 20 06:50:19 but good thing its 12:50AM Jan 20 06:52:12 gah hate it when i drink too much beer to code but still want to code... Jan 20 06:53:51 Maybe my subconscious is dislexic and sees IAP as IPA Jan 20 07:05:21 Hello all. Is it possible to return a value from an asynctask onPostExecute()? If so, is that bad practice? Jan 20 07:06:19 I am guessing that by the asynchronous nature of the thing, returning a value would either block the UI thread or not be effective Jan 20 07:07:05 I want to run two asynchronous tasks in order, but since one of them should be reusable for other purposes, I want to call that one, receive a data value from it, then call the next one with that value available. Jan 20 07:08:09 hesperaux you can't reuse asynctask Jan 20 07:08:20 not in the sense that I would reuse the object, g00s Jan 20 07:08:37 in the sense that it would be created and used elsewhere - such that combining the two tasks I mentioned would be counterproductive Jan 20 07:08:46 I always want to do part 1, but sometimes I also want to do part 2 Jan 20 07:09:06 then refine your question, and quit spamming Jan 20 07:09:29 spamming? whatitis- I don't think you know what spam means... Jan 20 07:09:48 My "spamming" was an attempt to do just that: refine my question Jan 20 07:09:54 hello all, question 1, then question 2, but only 3 if 4 then 5 67 Jan 20 07:10:48 hesperaux might be a good time to pick up rxjava. you can start here ;) http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/ Jan 20 07:11:01 whatitis-, I'm not going to argue about how I phrase my questions Jan 20 07:11:11 g00s, I'll check into that Jan 20 07:11:21 good, just state a real concrete question Jan 20 07:12:20 hesperaux: you can run AsyncTask on the serial executor Jan 20 07:13:00 thepoosh, that sounds like it might solve my problem. I'll check into serial execution Jan 20 07:13:18 or simply, define what circumstance is required for task 2 to be ran after task 1, and not concurrently checked Jan 20 07:13:35 i guess i didn't understand the question :) Jan 20 07:15:04 Task1 is to get weather data from a web API and insert it into SQLite. I want the row ID of that insertion in Task2. Task2 is to insert data into SQLite from a form in the activity and also store the row id of the weather data. Later, a Service will be inserting weather data but will do no more. I'd like to use the same task for both so as not to duplicate code. Does that clarify it better? Jan 20 07:15:35 alot of inserting Jan 20 07:15:45 two rows? Jan 20 07:15:47 can probably be refactored Jan 20 07:16:25 there is a table of weather data, and a table of entries. Not all weather data rows will be linked to an entry (some are there for historical purposes) Jan 20 07:17:22 with just words, seems there is no need for an extra asynctask, asynctask are just threads. seems there should be a better handoff than just launching new task Jan 20 07:18:29 I can agree with that - that's kind of why I'm here. I'm not sure of the best way to accomplish this. That's why I said what I was trying to do, in addition to asking how to solve it the way I devised (which might be stupid). Jan 20 07:20:18 just visualize your approach. A thread is great for doing background work, but if needing todo quite a bit of background work, you should look into pooling threads if they aren't related, but if they are, then look into maximizing a single thread to adjust to situations Jan 20 07:20:42 hmm, ok Jan 20 07:21:03 am I correct that inserting into a database should be off the UI thread? Jan 20 07:21:35 adjust as in, if/else then do less or more. Do what you can off UI Thread, but you gotta sync if multiple threads Jan 20 07:22:52 k. That sounds like a good idea. I'll probably just make the insert thread more conditional, then. If I pass in a null extra, it won't bother doing part 2. Jan 20 07:23:05 thanks whatitis- Jan 20 07:23:53 g00s, i'm bookmarking this cuz it does look useful Jan 20 07:24:17 hesperaux yeah, lots of android devs are using it nowadays Jan 20 07:24:48 things change so fast Jan 20 07:25:02 I'm still trying to completely learn the basics of this stuff Jan 20 07:25:46 g00s, I don't know if you remember the sensor app I did last year. It was for school so I had to make it work on a deadline. Now I'm doing projects that I can take time for. Trying to learn things "The Right Way(TM)" from Google's perspective first Jan 20 07:26:16 ah vaguely remember ... Jan 20 07:26:28 was it for medical ? Jan 20 07:26:30 It was a mobile ECG. I did get it to work but the app was fairly buggy :P Jan 20 07:26:39 impressed the judges though Jan 20 07:27:02 cool ! Jan 20 07:27:45 yeah, it was fun. I wanna go back to it and really improve the app - maybe make a product out of it some day. Unfortunately, I probably won't get it done before it is mainstream anyway. I couldn't even patent the device I made because an Israeli company already had one in the US. Jan 20 07:27:49 stupid patents :( Jan 20 07:27:52 concurrency is hard. gotta know all the tools available Jan 20 07:28:37 yeah. The biggest problem with the app as it stands is that the graphs probably use too much CPU and the bluetooth connection is undoubtedly inefficient. Jan 20 07:29:03 Is there a reason google doesn't provide a graphing API? I find that odd Jan 20 07:29:22 google doesn't provide a lot of things heh Jan 20 07:29:25 lol Jan 20 07:29:46 I guess they provide the framework, not the widgets - but they have done plenty of other widgets... Jan 20 07:30:53 Some day I will suck it up and try to make a graph view that pulls data asynchronously from a thread without raging. I had like 3000 data points in the chart but most of them were just aliased away anyway...waste Jan 20 07:30:57 that would be a nightmare Jan 20 07:30:59 hesperaux do you have a link to the israelis company's product ? Jan 20 07:31:00 they shouldn't provide that Jan 20 07:31:11 xD Jan 20 07:31:17 g00s, let me find it Jan 20 07:32:18 g00s, we literally did the same thing for our senior design - a wearable shirt and everything. It might even use the same e-textile threads xD. Found this after we finished: http://mobihealthnews.com/32774/healthwatch-seeks-fda-clearance-for-its-12-lead-ecg-tshirt/ Jan 20 07:32:38 their product has issues that they try to conceal, though. same issues we had Jan 20 07:33:53 wow that is cool. i've seen a few of these but don't bookmark them Jan 20 07:34:13 yeah - it's not quite there yet. But it's coming soon Jan 20 07:34:17 * hesperaux is sad Jan 20 07:35:37 all the other ecg solutions right now are 2 lead only, and they rely on deliberate interaction with them Jan 20 07:35:58 alivecor has a pretty nice app for it as far as I can tell (cuz I don't own their device) Jan 20 07:37:54 hesperaux did your app do any signal processing ? Jan 20 07:38:23 I ran out of time before I could do any advanced stuff. It did some basic low-pass/high-pass filtering Jan 20 07:38:47 the automatic level shifting (voltage centerer) was done in hardware. That had to be that way Jan 20 07:39:07 and there were hardware filters too Jan 20 07:39:49 ECG feature recognition is tough to do quickly =/ I have a book on it Jan 20 07:39:52 <_genuser_> an application var is available to very activity regardless of which activity starts teh app, correct? Jan 20 07:40:22 <_genuser_> s/very/every/ Jan 20 07:40:32 hesperaux http://www.amazon.com/Ambulation-Analysis-Wearable-Subhasis-Chaudhuri/dp/1489984887 Jan 20 07:40:47 http://www.amazon.com/Advances-Cardiac-Processing-Rajendra-Acharya/dp/3540366741 Jan 20 07:41:07 hmm Jan 20 07:41:27 cool stuff, i thought i may want to do something like that at one point. monitor performance running, etc. Jan 20 07:41:36 yeah Jan 20 07:41:47 movement artifacts are the devil Jan 20 07:42:20 the thing is, it will take a long time for cardiologists to trust the data coming from these types of devices Jan 20 07:42:53 thats ok, they'll be replaced by computational techniques eventually Jan 20 07:43:07 xD Jan 20 07:43:12 poor guys lol Jan 20 07:43:40 eventually will be a long time - because people will have them look over the computational conclusions to make sure they are sane Jan 20 07:44:02 plus, there's a certain amount of gut feeling in cardiology it seems Jan 20 07:44:48 in the US the whole medical area is corrupt on many levels; the AMA would work hard to prevent a shake-up Jan 20 07:44:52 _genuser_, i'm afraid I don't know what an "application var" is, so I can't answer your question. It's probably a thing I'm ignorant of Jan 20 07:45:21 yeah that's definitely true. my god have I had my own share of medical snafus (my g/f's experiences) Jan 20 07:45:41 <_genuser_> hesperaux: http://developer.android.com/reference/android/app/Application.html Jan 20 07:46:37 if you mean Context, that's specific to an activity, I believe, unless you get the Application Context. Someone correct me Jan 20 07:47:21 <_genuser_> scenario, options object reads in options from SharedPrefs. If missing, it calculates default values and stores them in SharedPrefs and in memeber variables. Jan 20 07:47:41 <_genuser_> the app can be started via any of the 3 main activities and this object should be available to all. Jan 20 07:48:11 <_genuser_> so I figured, if I can start it in the application object and keep it global then all song and dance should be done once. Jan 20 07:48:22 hesperaux: an activity _is_ a Context Jan 20 07:48:26 so are many other objects Jan 20 07:48:39 application, service, etc. Jan 20 07:51:18 calling getContext() in an Activity - does it get the Activity or the Application? Jan 20 07:51:33 there is also getApplicationContext() - never was sure on the distinction exactly.. Jan 20 07:52:14 * hesperaux has a very patchy knowledge of Android Jan 20 07:52:24 So does Google. Jan 20 07:52:28 lol Jan 20 07:53:37 <_genuser_> yeah, I have a highly "patchy" knowledge of contexts and etc. Jan 20 07:54:00 Can someone tell me why this happens? Jan 20 07:54:00 frameworks/native/libs/gui/Surface.cpp:40:26: fatal error: gralloc_priv.h: No such file or directory #include Jan 20 07:54:08 <_genuser_> and of activities, and of fragments, and dialogs, and pagers, and cards, and ... the rest of it. Jan 20 07:55:07 <_genuser_> JakeWharton: so would you recommend putting a var as static in one main activity and access from others? with some kind of auto detect initialization? Or just put it in application and init on onCreate of application? Jan 20 07:55:26 of what? Jan 20 07:58:15 <_genuser_> JakeWharton: options var, first time calculates special values. used in multiple activities. I was thinking of what's the best approach on where to put it and how to initialize it. Jan 20 07:59:26 <_genuser_> JakeWharton: was going to put it in main activity as static and do: if(options.neverinitialized()) options.initialize(); then it'd be available everywhere. Jan 20 08:00:19 hesperaux and _genuser_: http://possiblemobile.com/2013/06/context/ Jan 20 08:00:31 this is the go-to article for context Jan 20 08:00:45 <_genuser_> thepoosh: ugh, you really think educating people it the best use of your time? :p Jan 20 08:01:01 _genuser_: no, I'm also doing a code review now Jan 20 08:01:10 multithreaded poosh Jan 20 08:01:15 yeah baby Jan 20 08:01:23 lol i am incapable of that Jan 20 08:01:28 <_genuser_> thepoosh: heh, just kidding. I appreciate helpful articles. :) Jan 20 08:01:36 * hesperaux is a pentium MMX on DOS Jan 20 08:01:44 _genuser_: sure that's not unreasonable. ideally each value would lazily compute and cache itself Jan 20 08:02:48 <_genuser_> JakeWharton: right. and then I remember there's this Application object that one can subclass. and I thought maybe it would be an interesting choice. Jan 20 08:03:01 that's a good one since it's implicitly a singleton Jan 20 08:03:34 <_genuser_> oh, I see you like them singletons. Jan 20 08:03:57 that is not the definition of singleton Jan 20 08:05:08 thepoosh, this is a good article. faved Jan 20 08:05:10 there are different kinds of singletons :) Jan 20 08:05:21 yes and no Jan 20 08:05:23 :P Jan 20 08:05:27 <_genuser_> thepoosh: yeah, reading that article. Jan 20 08:05:36 there's one per process, therefore singleton Jan 20 08:05:54 Application is a singleton by sefinition Jan 20 08:05:55 thepoosh GSD detects "singletons, hingletons, mingletons and fingletons" Jan 20 08:06:07 XD https://code.google.com/p/google-singleton-detector/ Jan 20 08:06:09 g00s: wat Jan 20 08:06:10 simpletons? Jan 20 08:06:18 hahahah Jan 20 08:06:38 you shittin me. these are real words, g00s? lol Jan 20 08:07:08 its a dead project i think. i guess nobody cared about their singletons :) Jan 20 08:07:11 <_genuser_> singletons are great in theory. in practice, I find that they're sort a java community specialty. every project must have one or two. Jan 20 08:07:32 there is a correct ration of singletons to xmls to factories in java Jan 20 08:07:34 hesperaux: https://code.google.com/p/google-singleton-detector/wiki/Usage#Understanding_the_Graph Jan 20 08:07:36 *ratio Jan 20 08:07:54 oh aren't they cute haha Jan 20 08:09:50 i am amused Jan 20 08:10:24 even though I do understand why singletons are frowned upon Jan 20 08:11:56 over-educated junior programmers having read a blog on the internet and thus consider themselves experts by blindly regurgitating a misrepresentation of it? Jan 20 08:12:29 <_genuser_> they're alright. I really loved the COM subsystem wide singletons on windows. passing tons of crap back and forth between apps was pretty straight forward. Jan 20 08:12:32 shit just got real Jan 20 08:12:56 <_genuser_> JakeWharton: lol, isn't that true of new programmers and all design patterns and not just singleton? Jan 20 08:12:56 lol Jan 20 08:13:04 _genuser_: yes Jan 20 08:13:06 *cracking up over s/h/m/fingletons Jan 20 08:13:34 you must also conflate the meaning of those patterns, libraries, and techniques into one overarching opinion Jan 20 08:13:38 <_genuser_> but I have written my share of bad code and implemented some patterns pretty badly. Jan 20 08:13:46 i just had somewhat of a fight with a colleague over an unneeded singeton Jan 20 08:13:50 * hesperaux looks up the word conflate Jan 20 08:13:55 dependency injection is another good example of that Jan 20 08:14:08 <_genuser_> hesperaux: you'll forget it again. can't tell you how many times I've looked up conflate. Jan 20 08:14:14 lol Jan 20 08:14:47 <_genuser_> I feel dependency injectino was a solution to a problem that java went to great lengths to first create. Jan 20 08:15:30 I really like android studio now Jan 20 08:15:36 _genuser_: you just proved my point! Jan 20 08:16:08 <_genuser_> JakeWharton: which point? people misunderstanding stuff? Or that dep. inj. was unneeded. Jan 20 08:16:23 conflating patterns and libraries in one overarching opinion Jan 20 08:16:35 JakeWharton: how understand, i am junior, mid, senior? Jan 20 08:16:52 dependency injection is not java-specific Jan 20 08:16:55 <_genuser_> JakeWharton: ah, that point I missed because I was too lazy to lookup conflate yet another once. Jan 20 08:16:58 <_genuser_> lol Jan 20 08:17:17 * hesperaux looked it up - it's a very appropriate word Jan 20 08:17:37 <_genuser_> JakeWharton: true , it's not java specific. Jan 20 08:17:55 <_genuser_> I think design pattern gurus keep creating new patterns where there isn't a need for them. Jan 20 08:18:23 JakeWharton, do you have a degree in CS? just curious Jan 20 08:18:27 <_genuser_> like every new metal band is different from all the others so you create a new category. nu-metal, chunk-metal, disco-metal. Jan 20 08:18:37 the design pattern gurus didn't create patterns, they just documented them already in the wild Jan 20 08:18:37 hesperaux: kind of Jan 20 08:18:55 electronics! Jan 20 08:19:08 <_genuser_> I think it's true of design patterns. each specific scenario brings forth a new graduate student who write it into a pattern and gets with a professor and they publish it together. Jan 20 08:19:13 kind of? What do you mean? Jan 20 08:19:22 g00s: not entirely Jan 20 08:19:32 i working as android developer almost 3 years and haven't read any patterns-related book. only book i have read - bruce eckel thinking in java. and this is awfull. Jan 20 08:19:40 thepoosh well, thats what the GoF did. most of POSA is like that too Jan 20 08:19:41 hesperaux: i have (had) a $30k bill for a thing that i don't put on my resume Jan 20 08:19:46 * _genuser_ quietly looks up conflate. Jan 20 08:20:14 JakeWharton: you're off easy Jan 20 08:20:17 * hesperaux has a 38K bill of his own Jan 20 08:20:30 from what I understand, college bills are higher usually in the US Jan 20 08:20:30 not for CS though - EE Jan 20 08:20:31 hesperaux: it's only use was getting me a job fresh out of school. since that first day at the job it became instantly useless Jan 20 08:20:45 yeah, that's about right Jan 20 08:20:53 still trying to accomplish the first part of that :) Jan 20 08:20:53 <_genuser_> I think you first need to code a lot. anythign you can code. first solve problems on your own. then read some design patterns and see where you could have applied them. Jan 20 08:21:14 _genuser_: all you need to do, is see good code Jan 20 08:21:14 <_genuser_> it gives you a better understanding of how to use it. otherwise, people just read up lot of stuff and then get impatient to use it anywhere. Jan 20 08:21:19 _genuser_: yep. i like reading things and learning that i've been following a pattern which evolved naturally in my skills Jan 20 08:21:20 and then you just use it Jan 20 08:21:38 not a big fan of reading a ton of crap ahead of time and trying to always make the best, perfect thing Jan 20 08:21:45 i'm too busy coding to read books about coding. i reactively learn. lol Jan 20 08:21:56 <_genuser_> JakeWharton: agreed. I see lot of my co-workers forcing design patterns into projects that could have gone without. Jan 20 08:21:59 fakey, yeah I tend to agree with that.. Jan 20 08:22:07 that happens all the time Jan 20 08:22:16 <_genuser_> another problem is literal interpretation of a design pattern without adapting it to your specific scenario Jan 20 08:22:48 "oh i need to do this and that. google it!" that's how i code Jan 20 08:23:09 we had in college a 2 semester course about software design Jan 20 08:23:12 yeah, that's why I have a very patchy understanding of android Jan 20 08:23:14 ... but with a focus on understanding instead of copy/pasting Jan 20 08:24:06 <_genuser_> yeah my android knowledge is like that. "how to make a fullscreen activity". Go! click on a few links, pick the approach with least criticism on stackoverflow, lol. Jan 20 08:24:25 that's useless knowledge to retain though Jan 20 08:24:32 <_genuser_> I have lately moved to reading the documentation and following sample code from google, where available. Jan 20 08:24:40 i google the dumbest things some time Jan 20 08:24:46 just because I value remembering the smarter things Jan 20 08:25:02 bwa Jan 20 08:25:04 <_genuser_> true, each language does some thigns in its own way. retaining that trivia is pointless. Jan 20 08:25:06 nice one Jan 20 08:25:11 * hesperaux rarely uses SO info for use Jan 20 08:25:27 SO helps me initially phrase search terms Jan 20 08:25:40 Yeah. Jan 20 08:26:02 google probably has algorithms to figure out metadata based on coders' googling Jan 20 08:26:04 <_genuser_> I read a quote attribute to Henry Ford. something like, better to remember where the dictionary is than to remember all the information in it. Jan 20 08:26:34 _genuser_, had a teacher in college who believe you needed to memorize it Jan 20 08:27:23 henry ford sounds about 100 years beyond his time. imagine his car if he had 2000s internet heh Jan 20 08:27:30 <_genuser_> I think somethings you do enough that you remember. like back in ActiveX days, I could write DB access code with my eyes closed and pretty much guarantee that it'd compile. muscle memory. Jan 20 08:28:03 "back in the ActiveX days" - when I was playing games and browsing WebTV for cheat codes for my N64 Jan 20 08:28:30 <_genuser_> but more and more languages, frameworks, skillsets are leading to just memory the most important info. Jan 20 08:29:25 <_genuser_> hesperaux: heh, those were funs days. WinNT, VB6.0, customer jobs, pointless code, knocked out in 2 weeks but my boss would charge 2 mo. rest of the time on slashdot. Jan 20 08:30:02 sounds nice - I was just a kid still Jan 20 08:30:06 most of my work these days involve three os's, C++, Java, Js, HTML, and .CSS and I'd be screwed if I had to memorize all the proper syntax ... I still sometimes insert Java code into my JS methods and wonder why they fail at runtime XD Jan 20 08:30:39 capella, I write perl and JS all day - that can mess you up! xD Jan 20 08:30:42 we're still in the wild west days of APIs and programming. assuming governments don't chokehold techology there's a lot of consolidation and refinery to be had in the near future. Jan 20 08:30:51 ooooh yah :) Jan 20 08:30:52 hesperaux: perl alone ;) Jan 20 08:31:00 lol, I love Perl, but damn. Jan 20 08:31:22 it's hard to come home and switch to Java. Very different feel. Jan 20 08:32:32 side note: anyone who wants to write a web api for their app, I recommend using Mojolicious if you like perl. Jan 20 08:32:52 I used to be able to crank out huge BASIC programs and have them run through the interpreter first time ... but that was the *only* active language I was using ... muscle memory has a lot going for it Jan 20 08:33:30 <_genuser_> +1 for muscle memory. Jan 20 08:33:33 100 print "hello capella"; 200 goto 100 Jan 20 08:34:01 <_genuser_> in my vb6.0, I would just put "on error resume next" all over the code. Jan 20 08:34:06 java muscle memory benefits from good wpm Jan 20 08:34:23 <_genuser_> then read logs to figure out what crapped. otherwise, simple error would force the runtime to kill the entire application. Jan 20 08:34:23 _genuser_ rxjava has onErrorResumeNext :D Jan 20 08:34:44 <_genuser_> g00s: heh, nice. in my android code, it blanket the entire functions in try/catch Jan 20 08:35:11 i let my app crash heh Jan 20 08:35:43 gotta go out with a bang :) Jan 20 08:35:49 <_genuser_> lol. Jan 20 08:35:59 has to be like a holiwood movie, shit blowing up all over Jan 20 08:36:03 <_genuser_> more and more, I'm starting to just blanket try/catch and then toast the exception. Jan 20 08:36:21 <_genuser_> what's the point of building pointless AI into the app to catch and recover from errors. the user will crash it if they really want it. Jan 20 08:38:06 problem with try/catch is it continues afterward... good if your code can handle that but if not then you introduce obscur problems later on in runtime Jan 20 08:38:57 <_genuser_> yeah, I'll do try/catch around file open for example and if it craps, toast and return. next around read. if it craps toast and exit. and finally close. Jan 20 08:39:21 i wonder if exceptions in general as we see them in java / c++ etc have been superceded by better ideas Jan 20 08:39:37 which i wouldn't know of, because i'm just using java atm heh Jan 20 08:39:40 odd... my desktop freenode connection isnt seeing activiy Jan 20 08:39:48 <_genuser_> but now I'm starting to do the whole thing in just one try catch. no need to identify specific problems in code. it's a problem so execution must stop. just puke on screen adn return. Jan 20 08:40:13 ah, back after a bounce Jan 20 08:40:50 if your catch ends the whole app then that's like the same thing as an exception without a catch eh? Jan 20 08:41:39 except possibly less informative... or more informative depending on how much you put into the catch block Jan 20 08:42:16 <_genuser_> yeah, I'll just toast e.getMessage(). then of course, the user can say what the error was. Jan 20 08:42:38 <_genuser_> s/he'll report "it says can't open file" and "filenotfound exception" all the same way. it will require a fix anyway, so... Jan 20 08:43:12 better to let a library like crashlytics or bugsense catch the exception and send you a stack trace Jan 20 08:44:16 <_genuser_> does it mail you the stuff? Jan 20 08:44:20 yeah unless your app is directed toward dev-minded users a less detailed and more automatic crash report is a lot more user-friendly Jan 20 08:44:25 maybe they can even pop up a dialog like "WTF were you doing when this crashed" Jan 20 08:44:34 every time i plug my phone into the charger, I lose my connection to wear for like 15-20 seconds Jan 20 08:44:36 <_genuser_> I remember hearing of flurry that does all that. analytics and mails it to a dashboard where you can login and see device based logs. Jan 20 08:45:22 Flurry and ACRA are good crash reporting libraries Jan 20 08:45:49 I'd like to be able to customize my version notes using custom info from crashalytics, so the user would see: change 334433 fixes a bug crashing on foo ... last experienced by you on 12/15/2014. Jan 20 08:47:36 capella when was that FF cpu thing coming ? Jan 20 08:48:00 :) Yoric just got started on it last week Jan 20 08:48:02 I've been involved in a project that used Flurry but haven't used it personally yet, but my personal experience with ACRA I know it's easy to send the report to a server that saves it to a file, or you can open a dialog that creates an email ready for the user to send, and they basically just have to hit "send" to report the crash. Jan 20 08:48:24 lemme see if I can find the bug # Jan 20 08:52:36 firefox has a feedback section on crashes "tell us what you were doing", etc... you'd be surprised how many answers amount to "I was trying to find porn on imgur dammit !!!" Jan 20 08:54:24 most of the time i don't remember what i was doing Jan 20 08:54:33 i was uh, clicking here for some reason ... Jan 20 08:55:02 hence stacktraces Jan 20 08:55:08 and accidentally fell into it Jan 20 08:55:30 or in that case google history. but they don't share it... Jan 20 08:56:06 or maybe they do, with google analytics Jan 20 08:58:54 Hi, I'm trying to develop a custom kernel for htc one x+ international and got everything working except WiFi... please help Jan 20 08:59:00 here is the output of "dmesg | grep WLAN" Jan 20 08:59:10 http://pastebin.com/i2Zga19A Jan 20 08:59:41 <_genuser_> if you guys get a mobile app idea that you think might have potential where would you find fellow devs? Jan 20 08:59:59 <_genuser_> I figure, I just tell my friend and get coding together. Jan 20 09:00:27 <_genuser_> and not worry about people stealing the idea. if I can't finish it myself, most likely other single devs can't finish it alone either. Jan 20 09:01:30 Why does my custom layout have a left margin?? ahhh Jan 20 09:01:38 sorry custom actionbar layout Jan 20 09:03:43 hesperaux http://www.amazon.com/gp/product/B00NP8MDYK Jan 20 09:05:08 g00s, interesting. thanks Jan 20 09:09:46 hey g00s, what kinda apps do you make? Jan 20 09:10:06 One quick question, Do we have native support for SVG files in LP? Jan 20 09:10:46 hesperaux my app is just for weather; talks to br/edr and btle devices Jan 20 09:10:58 what's it called? Jan 20 09:26:59 Raindar ! Jan 20 09:27:14 my favorite weather app :p Jan 20 09:27:45 my custom actionbar layout keeps this left margin and its really annoying Jan 20 09:35:27 Hello! I am going to make a app for a school project. We are currently looking for a opensource SDK to make a 3d map. Any recommendations of SDK? Jan 20 09:36:33 arg android sdk keeps locking up eclipse like it's 1999 Jan 20 09:36:59 use android studio Jan 20 09:37:28 I´m not thinking about IDE. Jan 20 09:37:35 i would but i like to sit in my own shit because it's mine and i know the temperature Jan 20 09:37:54 lol Jan 20 09:37:59 android studio is much better dude Jan 20 09:38:40 look into the maps api Jan 20 09:41:13 MartialLaw, tyty. Any others ? Jan 20 09:42:03 maybe http://nutiteq.github.io/hellomap3d/ Jan 20 09:42:19 simple google search will do ya Jan 20 09:49:34 Hi .. I'm new to android development .. Jan 20 09:51:10 I downloaded the latest Android Studio for Mac Osx 10.7 . Jan 20 09:51:53 I was not able to create a virtual device through AVD .. The creation process starts and crashes with a SIGSEGV. Details at http://pastebin.com/nLi24hxQ. Any clues ? Jan 20 09:57:52 vrishab: i would suggest not using the AVD at all unless you want to complete app testing sometime next year (ie. it is incredibly slow) Jan 20 09:58:52 MartialLaw, oh ok .. what is the recommended way to test my app ( currently I don't have a Android mobile ) .. Jan 20 10:01:26 i would buy some kind of android device. going through the pain of setting up an AVD and then finally getting to use it will be a disappointment. But if you insist then someone else will have to answer your AVD problem because I stopped using it years ago Jan 20 10:03:15 MartialLaw, ok .. Jan 20 10:03:40 vrishab, did you install HAXM? Jan 20 10:03:56 it should be installed with AS but do go into extras/intel folder and install haxm Jan 20 10:04:42 AS's Android project view doesn't allow empty folders. so if you have to create a folder and then add a file to it, you get in trouble. What am I missing? Jan 20 10:04:53 s/allow/show Jan 20 10:11:50 Mavrik, Hi .. I have HAXM 5.2 installed .. Jan 20 10:26:40 is MotionEvent.ACTION_MOVE scrolling for instance in a listview? Jan 20 10:27:45 Mind rephrasing that question? Jan 20 10:27:54 scrolling is in between ACTION_DOWN and ACTION_UP but it doesnt seem to detect that Jan 20 10:28:15 MotionEvent.ACTION_MOVE, can they that action also describe a scroll? Jan 20 10:28:59 vrishab: look up genymotion Jan 20 10:30:19 How can a fragment know when another view was created? Jan 20 10:30:40 What's the typical tool for resolving chicken-egg instantiation issues? Jan 20 10:32:18 besides just using callbacks farther down the chain. I need some other central method to allow views and fragments etc to coordinate instantiation events when their lifecycles don't line up Jan 20 10:34:29 shmooz, trying genmotion . Jan 20 10:43:06 i'm confused, where do i get to IntentCompat? android.support.* don't see that package... Jan 20 10:46:29 ohh.. copy the jar manually. what is this 2013? Jan 20 10:52:37 alright... i'm trying to use a LAUNCHER activity to go to the wallpaper settings for my LWP. I want it to not go back to that main activity after setting the wallpaper, but it always does. Tried intent.setFlags(IntentCompat.FLAG_ACTIVITY_CLEAR_TASK); Jan 20 10:55:33 fakey did you include it in build.gradle? Jan 20 10:55:52 uhh no, how do i do that? Jan 20 10:56:20 http://stackoverflow.com/questions/16746558/android-gradle-build-and-the-support-library/17375109#17375109 Jan 20 10:56:48 if you want to not show an actibvity, you can always call .finish() on it Jan 20 11:00:45 hmm where do i put .finish()? I have a MainActivity that simply has a button that starts an intent for action WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER Jan 20 11:01:02 when i set the wallpaper from there, it goes back to the MainActivity with the button. Jan 20 11:01:10 go away button! Jan 20 11:02:16 ohhh. Jan 20 11:02:33 just finish() on the line after startActivityForResult(....) Jan 20 11:03:12 thanks for the tip! maybe it would have been quicker for me if it weren't 3am lol Jan 20 11:04:00 (this was in the button's onClick method) Jan 20 11:05:04 How would I figure out whether a layout or fragment that is instantiated relative to another in the same tree? Jan 20 11:05:11 *order Jan 20 11:06:03 I would prefer a two-way method that knows when both fragment and layout are instantiated and ready to do business Jan 20 11:10:16 Does anyone know by chance how to force a service to "restart"-- specifically, I need the input method service onCreateInputView to be called manually Jan 20 11:13:55 Hi guys.... custom list for listpreference where I can disable certain items. How would one go about that? Jan 20 11:18:05 the_fog one thing you could do is do prefManager.findPreference("LIST_PREF") and setOnPreferenceChangeListener and check the newValue parameter for the key of that selection and if it's the one you want to disable, return false. Jan 20 11:30:14 knapper_tech: i think the idea of fragments is that they have isolated functionality. so in theory they should not have to know about eachother Jan 20 11:30:49 um weird... i have a button and a TextView. when the TextView is above the button, it works. when I move it to below the button, I get a ClassCastException when i do (Button) findViewById(R.id.button1); Jan 20 11:31:30 osxorgate, I had the same conclusion. I realized that I had one nested fragment that needed to know about the other branch of the tree, so really I just need to push the coordination up the tree in this case Jan 20 11:31:33 fakey: do they have the same id? Jan 20 11:32:03 no, one is 0x7f090001 and the other is 0x7f090000 Jan 20 11:32:21 well, pastebin the code and layout Jan 20 11:35:14 http://pastebin.com/qEtHMkP8 Jan 20 11:35:48 if the TextView is above the Button it works. And the code has nothing but setContentView call above the line that crashes Jan 20 11:39:05 someone plz look at this code where it says NetworkUtil.getConnectivityStatusString: http://viralpatel.net/blogs/android-internet-connection-status-network-change/ Jan 20 11:39:12 NetworkUtil isn’t available to me Jan 20 11:39:37 osxorgate: go figure. Project > clean and now it works. Jan 20 11:40:23 meh :( Jan 20 11:40:46 ultra- looks like NetworkUtil is in the code block on the article Jan 20 11:41:54 wow it’s early, thanks Jan 20 11:42:06 i passed right by that Jan 20 11:42:15 lol :) Jan 20 11:45:07 What are we trying to do by creating a constructor with Super(someString) in it? Jan 20 11:45:35 donniezazen: you are letting the superclass do some initialization Jan 20 11:46:22 the class your class extends has a constructor of its own. Extending that class and calling super executes that constructor Jan 20 11:46:51 executing it tries to ensure that methods you have inherited will operate normally Jan 20 11:47:18 fakey okay cool thanks. I'll look into that Jan 20 11:47:29 sorry, got pulled away there Jan 20 11:49:45 osxorgate: http://ur1.ca/jhbqg Here is the example class Jan 20 11:51:50 Hi I'm learning to use retrofit, in the interface declaration, I'm getting an error over @GET. when I hover over it says @GET not applicable to type. How do I fix it? Jan 20 11:51:51 public class PollService extends IntentService { private static final String TAG = "PollService"; public PollService() {super(TAG);} to put it in a line Jan 20 11:52:34 donniezazen, we answered your question Jan 20 11:52:49 if you're asking about the PollService constructor specifically, that wasn't clear Jan 20 11:54:38 yes. thanks. Jan 20 11:54:53 was just providing more info to be clear. Jan 20 11:55:05 So what are you asking then? Jan 20 11:55:37 You answered my original question which I had. No more questions for now. Jan 20 11:55:45 Ok, very well Jan 20 11:56:09 * hesperaux goes to bed Jan 20 11:58:49 why am i supposed to set the ListPreference summary manually in older api versions? it just shows "%s" Jan 20 12:00:49 Hello Jan 20 12:01:20 Could someone please tell me there is a way to connect many buttons to the same function but make them pass a different argument Jan 20 12:03:26 you can do that Hyrixo. You can use the view passed into the onClick function to get the ID of the view that was clicked: myOnClickFunction(View v) { switch(v.getId()) { case R.id.myButtonId: } etc Jan 20 12:04:03 if you're defining the click function in XML, just make sure you're onClick handler has the prototype: function(View v). If you're registering a listener, you should already have it passing in the View that was clicked. Jan 20 12:04:04 hesperaux, how would that work when i create a variable amount of buttons on runttime Jan 20 12:04:38 Hyrixo, in that case, you'd probably want to create an OnClickListener that implements your stuff, and when you create the buttons you call button.setListener(MyListenerInterface) Jan 20 12:05:11 you can pass it "this" if you choose to have your Activity implement onClickListener and then implement the onClick() in your Activity (as per the inferface contract) Jan 20 12:06:09 goddamn that looks hard << was easier in QT :p Jan 20 12:06:11 I like to do it that way - I have a single onClick() function in my Activity and implement OnClickListener. Then, in onClick(View v), I just change what I do based on the ID. Since you're creating buttons in software, you won't have the ID to compare, but there is probably another way to identify them Jan 20 12:06:46 they've got to have an ID of some kind. Since you created the button itself, it probably has a button.getID() which you could compare with view.getID() in your onClick() Jan 20 12:06:51 I was supposed to be in bed. Jan 20 12:06:54 it's 6AM Jan 20 12:07:08 1PM here :p Jan 20 12:07:29 Hyrixo: where are you? Jan 20 12:07:36 is it a good idea to call WifiManager.calculateSignalLevel() in a thread every second to display the current wifi signal level? Jan 20 12:07:56 Sweden Jan 20 12:08:09 coolio i'm in Oslo Jan 20 12:08:17 i'm from Belgium tho << Jan 20 12:08:23 from the US Jan 20 12:11:22 Can i set a ID on runtime or is that imposible Jan 20 12:12:35 I'm not sure if you can set it at runtime - but you can probably read it. If not, check to see if you can use View.setTag(). It's a useful way to identify elements in software Jan 20 12:13:32 i tried .setID will see what it says Jan 20 12:14:16 something that might come in handy is the ability to create simple unique IDs in the R class from XML Jan 20 12:14:33 it's a less-advertised data type in resources Jan 20 12:15:30 gotta sleep now. good luck Hyrixo Jan 20 12:15:45 Thanks Jan 20 12:16:24 np Jan 20 12:24:00 where should i save objects, that will be needed later in a other activity . Jan 20 12:26:39 Hyrixo: you can pass those objects (if they are plain POJO's) as parcelables to other activities, or use a singleton DataStore that holds the objects Jan 20 12:28:14 bharvag, will i also be able to keep them if for instance the app is closed ? Jan 20 12:33:11 Hyrixo: then you need to save it using database or shared preferences Jan 20 12:33:13 Hyrixo: you can save them, and later reload them. but not directly as objects, you store the metadata Jan 20 12:33:20 -meta Jan 20 12:33:28 whatever things I've mentioned previous won't persist across launches Jan 20 12:34:01 Hmm, ok i was thinking of a second table but it looked so heavy on the load so much querries Jan 20 12:39:20 Is there any way that I could use an image instead of text as value for a radiobutton? Jan 20 12:43:58 Is anyone aware if I can have a custom conversion for a specific field in my class in Retrofit? Or do I have to use a full-fledged converter? Jan 20 12:44:13 I just want to use the normal GSON converter and have one field transposed, that's all Jan 20 12:44:23 but probably implement a converter and delegate to GSON converter if appropriate Jan 20 12:44:45 is there an easy way to get the strongest wifi signal every second? Jan 20 12:44:58 hey guys, i have an issue with using a selector for my recyclerview. i need to set clickable and focusableInTouchMode to true to make things work for my clickable recyclerview row items. every row item which is clicked is also set, but only the current row item seems to be set visually with the selector. does someone know why this happens or how to implement a visual approach for multiple selection of row items in a recyclerview? Jan 20 12:45:15 wifiManager.getConnectionInfo().getRssi() seems to work only on connected access points Jan 20 13:01:26 hi guys, i have a custom viewgroup where i want to draw a couple of place holders if there aren't enough children to populate it fully, what would be the best way to do this? Jan 20 13:05:43 asperon, what are you inheriting of? LinearLayout? Jan 20 13:06:00 danijoo, viewgroup Jan 20 13:07:20 asperon, something like this maybe: while(getChildCount() < MIN_VALUE) { addView(new View(getContext()) } Jan 20 13:08:18 danijoo, i would prefer not to acctually add the view, since i dont want it to be accessable via getViewAtIndex for example, i just want it rendered/layouted in the layout Jan 20 13:09:14 override getViewAtIndex and to not return them Jan 20 13:10:15 danijoo, sure, but that seems a bit extensive, could i override dispatchDraw for example and there draw some more children? Jan 20 13:11:35 dont have much experience with that, sorry Jan 20 13:18:31 what do you do when android studio forgets how to load your project? Jan 20 13:19:15 it seems like it doesn't know how to find app/ Jan 20 13:20:42 "forgets"? :D Jan 20 13:20:44 what did you do? Jan 20 13:21:06 yeah, the :app module doesn't show up in the project navigator Jan 20 13:21:29 it sees all the stuff at the top level, but app is gone Jan 20 13:21:41 tried to reimport the module, but it says it already exists Jan 20 13:21:44 did you change anything? like updating AS? Jan 20 13:21:47 nope Jan 20 13:22:03 just opened it first thing this morning and that's how it loaded Jan 20 13:22:09 weird. Jan 20 13:22:14 well. just reimport it then Jan 20 13:22:21 it's happened before... Jan 20 13:22:34 I think one time it even fixed itself after a while Jan 20 13:25:20 never happend to me. It sometimes fucks arround after an update but not randomly Jan 20 13:26:09 huh Jan 20 13:26:13 sync fixed it Jan 20 14:04:18 Hey , I want my application to show a notification everyday at 08 , so , will alarm manager do the job ? Jan 20 14:13:11 hi Jan 20 14:13:28 i need a create an emulator to samsung galaxy tab 3 lite, how i can do it? Jan 20 14:14:49 The ability to quickly view subclasses of the current class in AS is really nice. ;o Jan 20 14:30:07 Hmm. Anyone know how to stop Android Studio's LogCat from resetting the filter (to the general app filter) every time I run my app? Jan 20 14:30:28 Let's say that I have a custom filter applied -- every time I restart it removes my custom filter and applies my app's general filter. Jan 20 14:30:37 Oh Jan 20 14:30:39 Yeah, that happens Jan 20 14:31:30 hrmpf Jan 20 14:31:39 so how the heck do you attach GDB to an .so inside an aar Jan 20 14:33:42 Another thing I don't understand is that when I put 'Devices' and 'logcat' into the same pane I lose the 'Filter' dropdown. I have to have them in separate panes in order to access that, which means having to switch between them constantly. Jan 20 14:39:11 Okay, I've managed to put 'logcat' under the tab somehow (and now I have access to filters from 'logcat'). Jan 20 14:39:25 in android studio, if I CMD+click a method, it will take me to its declaration... but if I'm clicking on a method declared in an interface, it always takes me to the interface, Jan 20 14:39:49 is there a way to make it list the different declarations so I can choose to go to an implemented method instead of always to the interface? Jan 20 14:41:21 shekibobo, GoTo->Implementation(s) - alt+cmd+B will list all implementations of pointed at method Jan 20 14:42:00 Mavrik: cool, thanks! Jan 20 15:03:53 i need a create an emulator to samsung galaxy tab 3 lite, how i can do it? Jan 20 15:08:23 create emulator with available specifications same to tab 3 lite Jan 20 15:09:07 eg resolution, android version Jan 20 15:30:20 njcomsec, don't you need that specific rom to accurately emulate the device? Jan 20 15:31:34 i dont know about roms Jan 20 15:31:52 i was just assuming he had the emulation tools that came with the sdk Jan 20 15:32:49 some devices just have issues and afaik you need specific roms to emulate them Jan 20 15:32:57 or device images Jan 20 15:33:58 Hi can somebody take a minute and explain to me the lifecycle of bitmap processing? I'm getting hung up on the recycling errors Jan 20 15:36:23 AphelionZ, uhh... can you elaborate more? :) Jan 20 15:36:56 can someone confirm or deny that LG E610 has GCM notificiation issues? Jan 20 15:37:21 Mavrik: sure... here's my code code: http://pastie.org/private/c1xm6jp95zeipazyqxjlqq Jan 20 15:37:29 and my curretn stack trace: http://pastie.org/private/ntbivcbnfzdm0brl72kga Jan 20 15:37:47 I'm just kinda lost on why its getting recycled and what that means, and what the proper order of operations is here i guess Jan 20 15:38:19 AphelionZ, ok, first question: are you targeting/supporting Android 2? Jan 20 15:38:37 negative. API level 19 up Jan 20 15:39:03 AphelionZ, then there's no reason for you to explicitly call recycle Jan 20 15:39:18 ooh cool Jan 20 15:39:56 AphelionZ, recycle call is there from times of Android 2.3, when bitmaps were backed by buffers in native heap Jan 20 15:40:05 and GC didn't see those, so it wouldn't collect them Jan 20 15:40:28 so you had to call recycle explicitly to clear bitmaps out of the memory before last chance collection phase Jan 20 15:42:24 Ah ha OK Jan 20 15:42:33 Let's see how it does when I remove those calls Jan 20 15:42:49 hello. trying to render a Date using android.text.format.DateFormat, but the month i want to render as a word (eg, ‘Jan’). i’ve tried ‘L’ and ‘M’ in the format string, but neither gives me what i want Jan 20 15:44:13 scruz, "MMM" Jan 20 15:44:17 and "MMMMMM" Jan 20 15:44:19 or whatsit Jan 20 15:45:47 thanks. MMM was it Jan 20 15:46:05 Hi all, someone ever used Volley to request JSON and the caching mechanism of Volley ? Jan 20 15:49:47 hello, anyone got experience with websockets and android ? any recommendations for libraries ? Jan 20 15:50:48 flm, sure Jan 20 15:56:18 I'm having an issue where my GCMIntentService does not receive push notifications on some devices (specifically on LG E610) while it seems to work on pretty much all other devices. Any idea what could cause that? Jan 20 15:59:48 osxorgate, Do you have any examples about caching ? Jan 20 16:00:27 osxorgate, which method is the best to request from API inside a fragment, OnCreate or OnCreateView ? Jan 20 16:00:52 flm. depends on what you want.. maybe you only request on button press Jan 20 16:01:10 the docs should say enough about how to cache Jan 20 16:01:40 osxorgate, no, i want to request when the activity is loaded, then parse it into a Listview Jan 20 16:01:44 when i click on a listview item Jan 20 16:01:46 show details Jan 20 16:02:02 and on the Onbackpressed i want go back to the listview Jan 20 16:02:19 with cache from the first request Jan 20 16:20:00 Question: I have an app that I am updating for a client that was written in PhoneCrap. It uses the HTML local storage to store a value. I now need to fish this value out. Is there any way I can tell the new app to use a particular LocalStorage file, as it seems to create a new one rather than using the existing one if it exists? Jan 20 16:20:46 is 6.5.87 the newest versions of the play-services? Jan 20 16:24:00 I need to be able to access file__0.localstorage but when I save/retrieve values, it uses __0.localstorage SQLite files... Jan 20 16:36:54 Hello, which orm would you recommend or a small db on android ? Jan 20 16:41:06 My LG E610 does not receive any GCM messages from my backend, it seems to work on all other phones. An IntentService is used to receive the notificiations and since it's working on most phones I assume that it's configured correctly. Jan 20 16:41:10 exadeci, ormlite Jan 20 16:41:49 but if you ask 3 people, youll get 3 different answers. read the documentation on a few and dicide on your own. Jan 20 16:42:26 I'm not sure what I could try to fix this issue D: Jan 20 16:43:38 exadeci, imo the most used orms are ormlite, greenDao and activeAndroid. Be careful with the last one though Jan 20 16:43:58 danijoo: why is that ? Jan 20 16:45:29 exadeci, by default, android needs the id column to be named "_id", but activeAndroid stores it as "id". As long as you use it, thats ok. But if you want to do stuff out of ActiveAndroid or want to switch to another ORM, you will run into problems Jan 20 16:46:42 danijoo: ok I'll try greendao Jan 20 16:46:43 I once used ActiveAndroid and for switching you have the option to just delete everything in the database or write complicated update scripts to move everything out of the table with "id" and put it into the table with "_id" Jan 20 16:47:13 danijoo: ok pretty annoying :) Jan 20 16:58:50 If a library is available only on mavenCentral() and not in jcenter(), how can I add this dependency using Android Studio V1.0 ? Jan 20 17:00:44 You add maven central to your list of repositories Jan 20 17:01:39 I have added mavenCentral() to the Project build script's "repositories" blocks and it does not work SimonVT Jan 20 17:02:02 added along with jcenter() Jan 20 17:02:15 becuase I have other libs from jcenter Jan 20 17:02:49 Then I guess you're fucked Jan 20 17:03:06 nice. Jan 20 17:03:53 hint: "it does not work" is rarely a sufficient description of the problem :) Jan 20 17:04:31 right Jan 20 17:05:30 Description : it shows the same error message before adding maven central to repositories. Which is : "Failed find : com.xxxxx" Jan 20 17:05:48 s/before/shown before Jan 20 17:05:51 Which library is it? Jan 20 17:05:52 make sure you have the right name Jan 20 17:06:20 TacticalJoke GraphView library : 'com.jjoe64:graphview:4.0.0' Jan 20 17:06:47 yep, JesusFreke I copied it directly from their website Jan 20 17:07:32 Which build.gradle are you adding this to? Jan 20 17:07:32 napster: you should post your build file Jan 20 17:08:04 the project build script : which has the allprojects {} block Jan 20 17:08:14 alexfu in 10 seconds. Jan 20 17:08:25 I think you have to add it to the 'app' build.gradle. Jan 20 17:08:34 Under 'dependencies'. Jan 20 17:08:49 https://gist.github.com/anonymous/dff51f353f2c49325411 Jan 20 17:08:59 TacticalJoke oh! Jan 20 17:09:31 there's even a note about it. Jan 20 17:09:46 To be clear, I mean the 'com.jjoe64:graphview:4.0.0' thing. Jan 20 17:10:08 TacticalJoke oh, yes, thats already in the "app" build script. Jan 20 17:10:12 that part is done right Jan 20 17:10:59 is the spelling correct? "mavenCentral()" Jan 20 17:11:08 Sugar Orm seemed to be a better choice but I get no such table when trying to find elements in a table I get "no such table" but sugar is supposed to create it,no ? https://gist.github.com/exadeci/638847112137c735c957#file-update-java-L6 Jan 20 17:11:50 napster: I'm finding it on jcenter: https://bintray.com/bintray/jcenter/com.jjoe64%3Agraphview/view Jan 20 17:12:09 oh! Jan 20 17:12:48 is there android ndk channel ? Jan 20 17:12:59 napster: i may have missed this but do you need mavencentral? Jan 20 17:13:33 Since TacticalJoke pointed out it is infact there on jcenter, probably No. Jan 20 17:14:20 take out mavenCentral & try to sync Jan 20 17:15:51 no luck! :( Jan 20 17:16:31 you should post both of your build files and the exact error message Jan 20 17:16:48 If it is there on jcenter() and all other libs are working fine, what are the chances for having just one not working! Jan 20 17:16:55 ok,let me post both Jan 20 17:18:40 This is the "app" bscript alexfu https://gist.github.com/anonymous/2eb161eefa15fb393d52 Jan 20 17:19:09 project build script is as posted earlier, minus mavenCentral() Jan 20 17:19:25 napster: and the exact error message? Jan 20 17:19:39 No one uses sugar orm ? Jan 20 17:20:43 exadeci I do, but I'm in trouble at the moment! :) Jan 20 17:21:25 alexfu http://derp.co.uk/7d01a Jan 20 17:21:44 I tried compile 'com.jjoe64:graphview:4.0.0' as well Jan 20 17:22:46 napster: write the version as 4.0.0 Jan 20 17:22:52 and not 4.0.+ Jan 20 17:22:59 already did alexfu :) Jan 20 17:23:49 Are you guys able to add this lib and sync properly? Jan 20 17:28:30 I got a few question what good tool for make icon for android i really not sure what is best to use? Jan 20 17:28:55 napster: im out of ideas. Jan 20 17:29:05 perlsyntax this? compile 'com.jjoe64:graphview:4.0.0' Jan 20 17:29:08 sorry Jan 20 17:29:17 this http://romannurik.github.io/AndroidAssetStudio/ perlsyntax Jan 20 17:29:31 Hope someone can help:) Jan 20 17:29:54 alexfu :( this is going to be a problem. Jan 20 17:30:27 probably I need to dowload the lib and add it as a moduel dependency Jan 20 17:30:38 napster: i would start a new project w/ Android Studio and add that library and see if it works properly w/ a clean project Jan 20 17:30:41 napster, i take look at it Jan 20 17:31:05 worth giving a try alexfu Jan 20 17:31:24 if it works with a clean project i would then just do a full audit and compare your build files and even gradle versions Jan 20 17:33:03 alexfu Same result with a fresh project as well! Jan 20 17:33:45 hi Jan 20 17:33:52 napster: are you on a windows computer? Jan 20 17:34:00 its a mac alexfu Jan 20 17:34:26 hey MyWay Jan 20 17:34:33 mike :) Jan 20 17:34:36 napster: either way, I would probably clear your .m2 folder and re-sync. rather, rename your ~/.m2 folder Jan 20 17:37:06 napster: did you move the mavenCentral() to the repositories block in the allprojects thing? Jan 20 17:37:14 putting in it the buildscript block is wrong Jan 20 17:37:36 napster: try removing ~/.m2/repository/.cache Jan 20 17:37:45 or equivalently, in the app gradle file Jan 20 17:38:20 I don't have ~/.m2 directory at all! :) Jan 20 17:38:52 napster, you know that the dot before m2 means it's hidden, right? Jan 20 17:38:57 JesusFreke yep, and I removed mavencetral() since the lib I'm looking for is available in jcenter() Jan 20 17:39:05 MikeWallaceDev yes :) Jan 20 17:39:15 I don't mean to offend, I don't know how good you are at the command line :) Jan 20 17:40:09 none take Jan 20 17:40:13 *taken Jan 20 17:40:34 crap! I was going to say "you do know that taken takes an n, right?" hahaha Jan 20 17:40:51 :P Jan 20 17:41:05 :D Jan 20 17:41:12 napster: was there a recent change w/ your system? Jan 20 17:41:39 alexfu not sure I understand Jan 20 17:43:02 I'm guessing that you already sent pastebins of your gradle files? (sorry, I just got here) Jan 20 17:43:06 I recently upgraded to the newer version of Android Studio, but it was a fresh install, I removed old installation and all associated files before upgrade. Jan 20 17:43:12 I don't have a ~/.m2 directory either. Hmm. Jan 20 17:43:30 MikeWallaceDev yep, let me get those links Jan 20 17:44:02 app script : https://gist.github.com/anonymous/2eb161eefa15fb393d52 error message : http://derp.co.uk/7d01a Jan 20 17:44:06 napster, just read the first parts of your question, not the rest. did you try changing the order of jCenter() and mavenCentral()? Jan 20 17:44:09 My dependencies are in ~/.AndroidStudio/system/jars and ~/.gradle/caches/. Jan 20 17:44:33 derp.co.uk!! hahaha that's hilarious :D Jan 20 17:44:46 I'm guessing it's .gradle/caches now? Jan 20 17:44:48 Syzygy I removed mavenCentral() completely. The lib I was looking for is infact present in jcenter() Jan 20 17:45:14 didn't you say that from the start? I thought you wanted to use the mavenCentral version even though it's on both Jan 20 17:45:27 well, as long as it works for you it doesn't matter i guess Jan 20 17:45:34 Syzygy sorry for the confusion. Jan 20 17:45:42 no problem Jan 20 17:45:50 napster: does ls ~/.m2 result in anything? Jan 20 17:46:21 alexfu ls: /Users/napster/.m2: No such file or directory Jan 20 17:46:22 Does anyone have an idea why an IntentService wouldn't start on one device, when it starts fine on all others... Jan 20 17:47:41 napster, where's settings.gradle? Jan 20 17:47:48 (pastebin) Jan 20 17:47:51 Syzygy, how you start the intent? Jan 20 17:47:54 one sec Jan 20 17:48:06 the service is triggered by a GCM push notification Jan 20 17:48:28 actually, no. sorry. Main build.gradle is what I meant Jan 20 17:48:32 are you sure its the service and not the gcm broadcast receiver? Jan 20 17:48:48 MikeWallaceDev settings.gradle => include ':app', ':facebook' Jan 20 17:49:00 danijoo, yes, public class GCMIntentService extends IntentService Jan 20 17:49:08 right :) I meant your main build.gradle :) Jan 20 17:49:44 Syzygy, is it receiveing the intent properly and did you check if it reaches the line of code where the intent service is started on that particular device? Jan 20 17:49:54 Here we go MikeWallaceDev https://gist.github.com/anonymous/425d0a654b2c63b7adeb Jan 20 17:50:29 ok napster, I'm looking at this now Jan 20 17:50:42 danijoo, on a working device, first the class is initialized, and then a call from nativestart goes to onHandleIntent (so it doesn't pass through my app at all until that point) Jan 20 17:51:38 on the device where it doesn't work, neither of that happens. Jan 20 17:51:58 Syzygy, You said its not working on one device. Did you check if the broadcast receiver actually works on that one? Jan 20 17:52:11 I don't know how unfortunately Jan 20 17:52:17 how can I check that? Jan 20 17:52:24 well. then nobody can debug it -_- Jan 20 17:52:33 napster, is your error at sync time, or compile/run time? I can sync Jan 20 17:52:34 maybe it's a known issue? Jan 20 17:52:40 napster try running ./gradlew assembleDebug --debug or --info and see if any useful info is printed out Jan 20 17:52:57 MikeWallaceDev Are you able to sync? I can't sync. Jan 20 17:53:07 Syzygy, so you didnt check if the phone receives a gcm message at all? Jan 20 17:53:11 Hello Jan 20 17:53:13 I can sync Jan 20 17:53:19 actually I just found a broadcast receiver that starts the intentservice Jan 20 17:53:21 Hello Gaulois94 Jan 20 17:53:22 strange! Jan 20 17:53:29 alexfu trying Jan 20 17:53:30 Please, why, when I rotate my phone, my main activity's onCreate function is called ? Jan 20 17:53:35 yeah... still looking Jan 20 17:53:45 Gaulois94, because activities are recreated on orientation change Jan 20 17:53:46 danijoo, no, I'm not sure how I should test that. Is there some sample app on the store that can help me do that? Jan 20 17:53:50 Gaulois94, cause it's supposed to be :) Jan 20 17:53:56 Sniff Jan 20 17:54:01 Okay I give up Jan 20 17:54:19 Syzygy, for example you can see by google response from the gcm server if there is an error Jan 20 17:54:29 I just can't use an EGL context, if each time my phone rotate, all of my data's restart Jan 20 17:54:52 Gaulois94, save the data between the orientation change Jan 20 17:54:55 danijoo, don't have access to our backend that sends the notification D: Jan 20 17:55:01 danijoo: How ? Jan 20 17:55:04 or simple say android iy should not recreate it Jan 20 17:55:04 Gaulois94: https://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges <- your activity is torn down and recreated when you rotate. there are ways to handle it. Jan 20 17:55:23 Gaulois94, the solution can be googled in 1 minute Jan 20 17:55:42 Syzygy, then you are fucked. Because you cant narrow down the problem and it could be anything Jan 20 17:55:59 pretty much :/ Jan 20 17:55:59 (this is why I like that being the default behavior - EVERYONE has to deal with it, early.) Jan 20 17:56:09 Indeed Jan 20 17:56:22 Juste too many problems for nothing Jan 20 17:56:32 Syzygy, I think the problem is more likely that there is no gcm message sent at all. maybe the device didnt register properly at your backend or something like that Jan 20 17:56:45 however napster your application ID does give me an error... Jan 20 17:57:05 danijoo, log output says it registered Jan 20 17:57:10 Well, now I understand most of my issues Jan 20 17:57:11 I just removed it from the gist MikeWallaceDev :) Jan 20 17:57:24 Syzygy, maybe the backend fucked the registration process up :p Jan 20 17:57:29 thank you Jan 20 17:57:43 its just "com.napster.testapp" MikeWallaceDev Jan 20 17:57:43 and does it work now napster ? Jan 20 17:57:56 nope, no luck yet. Jan 20 17:58:22 if you see the app bscript, I use many libs from jcenter. Just this one is not working! Jan 20 17:58:28 danijoo, working for all other phones, just not for LG E610. (we have several devices, working for none of them) Jan 20 17:58:34 napster: Unless you own napster.com, you'll have to change that before uploading to Google Play. Jan 20 17:58:44 Just FYI (to avoid your app getting taken down). Jan 20 17:58:56 Syzygy, no idea. but you will have a hard time to debug that if you cant narrow it down :// Jan 20 17:59:05 :) lol Jan 20 17:59:19 * napster doesn't own napster.com anyway Jan 20 17:59:24 does google really check package names against that? oO Jan 20 17:59:30 trying to narrow it down, found some boradcast receiver stuff earlier. put a log message in there at least Jan 20 17:59:34 napster: which lib isn't working? /me is catching up late. Jan 20 17:59:46 groxx 'com.jjoe64:graphview:4.0.0' Jan 20 18:00:43 yeah, so no broadcast is received Jan 20 18:01:15 napster: hm. looks fine to me. could it be a busted cache? Jan 20 18:01:17 well... I just copy pasted your complete dependencies block, and it synced.. Jan 20 18:01:23 Syzygy, the next step would be to check what error code your backend receives from google Jan 20 18:01:30 alright Jan 20 18:02:00 groxx hmm, not sure. Would be nice if tell me how to flush the cache though. Jan 20 18:02:06 ah, i forgot to mention that other GCM stuff doesn't seem to work either Jan 20 18:02:09 and if the device is actually registered at your backend. In your database or whereever you store the ids Jan 20 18:02:09 local stuff Jan 20 18:02:30 not sure if File->Invalidate Caches also deletes your dependencies cache... but try it Jan 20 18:02:31 I believe it used to work Jan 20 18:02:56 napster, ^^^ Jan 20 18:02:56 napster: two things to check: 1) file -> invalidate caches and restart (in Studio). 2) check ~/.gradle/caches/modules-2/files-2.1. if there's a com.jjoe64 folder, I'd probably just delete it. Jan 20 18:03:10 napster: 2 is mostly a guess, but it might work Jan 20 18:03:26 napster: did anything change w/ your computer since the last time you were able to sync dependencies? Jan 20 18:03:40 groxx, in that case, why not just delete ~/.gradle/caches ? Jan 20 18:03:42 ok, let me try this groxx MikeWallaceDev . Jan 20 18:03:55 MikeWallaceDev: personally, I'd probably do that, yeah :) Jan 20 18:04:04 alexfu nope, I synced 'com.google.code.gson:gson:2.3.1' yesterday Jan 20 18:04:18 MikeWallaceDev: figured trying a less nuclear option might be better. and there might be an official "clear gradle caches" method that won't be quite as hacky Jan 20 18:05:11 there's a good chance that "clear gradle caches" == "rm -rf ~/.gradle/caches" :D Jan 20 18:05:11 cache invalidated / restarting AS now... Jan 20 18:06:01 check 1 completed -> no luck Jan 20 18:06:05 going to do check 2 Jan 20 18:06:23 napster, have you tried rm -rf / ? Jan 20 18:06:25 :D Jan 20 18:06:32 KIDDING!!! Don't do that ;D Jan 20 18:06:39 otherwise, it seems like the internet is recommending "rm -rf ~/.gradle" for what seem like sane reasons Jan 20 18:06:44 not yet, If go nuts today, I might want to that :D Jan 20 18:06:51 :D Jan 20 18:07:05 groxx, I believe that will be "check 3" Jan 20 18:07:41 yeah, probably :) it'll definitely mean redownloading everything, but it's probably the cleanest / most-nuclear option, and most likely to work (if it's a cache issue) Jan 20 18:07:42 I think someone on reddit had their app taken down because they had a package name like "com.facebook.whatever". Jan 20 18:07:45 napster, you said that you just reinstalled AS, right? Did you delete the other instance? Maybe something is pointing to the wrong place Jan 20 18:07:58 TacticalJoke, that totally makes sense... Jan 20 18:08:26 there's also a project_folder/.gradle/ folder that is probably worth deleting too Jan 20 18:08:46 groxx Check 2 completed. removed com.jjoe64 Jan 20 18:08:49 no luck Jan 20 18:09:00 alas Jan 20 18:09:39 I would not delete project_folder/.gradle right away, that one has settings in it. Jan 20 18:10:01 napster, did you delete your old instance of AS? Jan 20 18:10:07 MikeWallaceDev: know which ones? Jan 20 18:10:23 danijoo, thanks for the help. I'll see tomorrow if there are any errors on the backend. Jan 20 18:10:23 I'm not too familiar with gradle's internals Jan 20 18:10:32 doesn't matter, just don't do it yet. If you have to, you have to... Jan 20 18:10:38 MikeWallaceDev yep, old installation was cleared properly Jan 20 18:10:43 damn. Jan 20 18:11:30 Should I try deleting project_folder/.gradle too? Jan 20 18:11:46 side effects? Jan 20 18:11:58 napster: dunno. since MikeWallaceDev says no and I have no idea, I'd lean towards "no" first at least :) Jan 20 18:12:08 ok Jan 20 18:12:13 try putting in an older version of the lib... Jan 20 18:12:20 have anyone faced similar issue before? Jan 20 18:12:23 napster: you did mention that creating a new Project and trying to download that dep didnt work as well Jan 20 18:12:36 MikeWallaceDev let me try 3.0.0 Jan 20 18:12:37 You could always rename it. That's (usually) a safe delete, in effect. Jan 20 18:12:46 true Jan 20 18:12:53 alexfu thats correct, tried with a new project, didn't work Jan 20 18:12:58 DELETE ALL THE THINGS!!!! Jan 20 18:12:59 napster: which makes me to believe something is messed up w/ your system. Jan 20 18:13:19 napster: did you try downloading a different library? one that you know works Jan 20 18:13:31 alexfu, it does sound like a cache issue... Jan 20 18:13:32 ah, one more thing to do: kill the gradle daemon. who knows what it's storing in memory. `gradle --stop` should do it. Jan 20 18:13:53 alexfu, I just added his whole dependency block to my project, it worked. Jan 20 18:14:04 nice one groxx ! Jan 20 18:14:08 MikeWallaceDev: right, which means somehting is up w/ his system Jan 20 18:14:09 alexfu take a look https://gist.github.com/anonymous/2eb161eefa15fb393d52 I already have a couple others working ifne. Jan 20 18:15:14 alexfu, just bringing you up to date with what we tried :) Jan 20 18:15:44 yeah, and since it sounds like a new project wasn't able to download it, it's probably something with the shared cache. not sure what else would behave like this. Jan 20 18:15:50 gradle bug perhaps Jan 20 18:16:02 but that's quite a bit more unlikely than wonky caches Jan 20 18:16:06 Killed gradle process, still no luck! Jan 20 18:16:40 what's the error?? Jan 20 18:16:52 I forgot to ask that :D Jan 20 18:17:16 that derp url MikeWallaceDev Jan 20 18:17:17 http://derp.co.uk/7d01a Jan 20 18:17:18 :) Jan 20 18:17:35 :D Jan 20 18:18:16 Could this be anyway due to any sort of issues related to the library itself? Jan 20 18:18:42 napster: I was able to pull it in just fine. Jan 20 18:18:53 right, so thats ruled out Jan 20 18:20:09 another thought: have you been copying around that "compile" line? try deleting it and typing it in by hand, it's possible it has a weird invisible character in it (most IDEs are bad at showing those, and I've had it happen when copying from a website or two) Jan 20 18:20:30 ah, though it did appear in the caches folder, so probably not. hm. Jan 20 18:20:38 let me do that one :) Jan 20 18:21:00 napster, so version 3 didn't work either? Jan 20 18:21:08 is your internet working? Jan 20 18:21:09 :D Jan 20 18:21:18 groxx: Interesting hypothesis. Would be cool if that turned out to be the problem. Jan 20 18:21:22 I don't know MikeWallaceDev what do you think? :) Jan 20 18:21:26 :D Jan 20 18:21:34 Is your computer switched on? Jan 20 18:22:08 that could be it! Jan 20 18:22:09 I can't even tell. I believe the electricity is out here. Jan 20 18:22:53 Did you try groxx's latest suggestion, napster? Jan 20 18:22:56 hand typed and still no luck Jan 20 18:23:00 yep Jan 20 18:23:05 Dough. Jan 20 18:23:11 TacticalJoke: it has caused a couple long-time-to-fix problems for me :) and some chat systems strip the characters, so copy/paste/other people try it isn't a guarantee. and when you're trying so many things, you keep copy/pasting it because it's a pain to re-type it... usually I find it when I `git diff` because it shows in the output :) Jan 20 18:23:23 napster, ... I'm deleting my ~/.gradle/caches for you.. I hope you appreciate this! Jan 20 18:23:36 thats really great. You are so kind MikeWallaceDev Jan 20 18:23:37 :) Jan 20 18:24:14 what's the inverse of "make it rain"? this is losing all your cashes Jan 20 18:24:37 napster: You didn't accidentally enable offline mode or something? Jan 20 18:24:46 derp. shoulda thought of that too. Jan 20 18:25:02 SimonVT ok. how can I check that one? Jan 20 18:25:24 preferences -> gradle Jan 20 18:26:38 napster, killed caches, compiled successfully. Jan 20 18:27:22 OH MY GOD. Sorry for wasting everyone's time. Under Gradle Global settings "offline" was ticked. :( Jan 20 18:27:25 haha Jan 20 18:27:27 lol Jan 20 18:27:31 damn Jan 20 18:27:32 thanks SimonVT :) Jan 20 18:27:38 Thanks a lot SimonVT Jan 20 18:27:42 SimonVT, FTW! Jan 20 18:27:46 there needs to be a more descriptive error for that Jan 20 18:27:53 (but I was also right, your internet was off :P ) Jan 20 18:27:54 ^^ yes Jan 20 18:28:05 kind of "right" Jan 20 18:28:06 alexfu, yep Jan 20 18:28:07 Wow ;d Jan 20 18:28:08 :D Jan 20 18:28:32 Honestly, I didn't know there was an offline mode... Jan 20 18:28:35 I was 5 minutes away from rm -rf ~ Jan 20 18:29:06 There must be some "offline mode" indicator Jan 20 18:29:08 but yeah, the error is incorrect... you should file a bug Jan 20 18:29:20 and mention an indicator :) Jan 20 18:29:22 ah, that reminds me: https://launchpad.net/safe-rm Jan 20 18:29:36 It should at least tell you that you're in offline mode if it fails to resolve a dependency Jan 20 18:29:39 I didn't know there was an offline mode. And I don't remember enabling anything like that in my life time. Jan 20 18:29:42 ^ I tweaked it to abort immediately if I include banned directories, rather than just skipping them. Jan 20 18:30:02 SimonVT: you'd be surprised to know the UI doesnt change in Offline mode Jan 20 18:30:08 of the IDE Jan 20 18:30:38 This must be an IDE bug, not showing a descriptive message. (or is it actually coming from gradle) Jan 20 18:31:11 Pretty sure the android team added it Jan 20 18:31:33 gradle supports an offline flag Jan 20 18:31:46 yeah. prior to that checkbox, Studio was almost unusable on my train-commute. Jan 20 18:31:57 Yeah, but the "passing offline flag to gradle" part Jan 20 18:32:08 Thanks a lot of taking your time to help out TacticalJoke alexfu groxx MikeWallaceDev and the legendary SimonVT Jan 20 18:32:36 You're welcome mate Jan 20 18:32:48 I'll PM you my address for the cheque Jan 20 18:33:03 Don't forget what I said about using 'com.napster'. You really could get a takedown for that. :) Jan 20 18:33:13 yes, and I send you a "blank" cheque Jan 20 18:33:24 :D Jan 20 18:33:41 TacticalJoke yep, will definitely change the package name. :) Jan 20 18:33:57 I'm currently using .android., and I'm not sure whether I should change that before release (because they might have an issue with 'android'). Jan 20 18:34:15 I might change it to 'mobile' or something. Jan 20 18:34:19 yeah, you should probably avoid .android in the package name Jan 20 18:34:40 I don't know if there's any actual rule against it or not Jan 20 18:34:41 Yeah, it's better to be safe than sorry (especially with Google's crazy takedowns). Jan 20 18:35:01 http://www.androidpolice.com/2015/01/20/googles-updated-branding-guidelines-clarify-name-third-party-apps/ Jan 20 18:35:12 finally heh Jan 20 18:35:27 Ah, that's good. Jan 20 18:35:32 A lot of reddit apps will have to change. ; Jan 20 18:35:33 ;o * Jan 20 18:36:11 whoa! That article came out today! Great timing! Jan 20 18:36:15 I'm not saying that it's good because they'll have to change. I mean that as two unrelated thoughts. :) Jan 20 18:37:00 exadeci Is your sugar ORM issue solved? Jan 20 18:37:36 napster: BTW, if you change package name in Android Studio you sometimes have to uncheck 'Compact Empty Middle Packages' in the options for the project view. Jan 20 18:37:50 hehe "Police for Android™" Jan 20 18:37:52 Otherwise you can't change some parts. Jan 20 18:37:54 ok Jan 20 18:39:10 I have a style question. I have a class that wraps SharedPreferences (called PreferencesFile). It has various methods for getting/setting preferences. In order to work, of course, it needs a Context. Jan 20 18:39:33 If I'm calling one of these methods from an Activity, should I be passing "getApplicationContext()" as a general rule? Jan 20 18:39:43 (It doesn't actually make a difference here; I'm not holding onto any Context.) Jan 20 18:39:46 Just asking about general style. Jan 20 18:39:52 as a general rule, yes. Jan 20 18:40:23 All right, thanks. Jan 20 18:42:56 Good night everyone. Thanks again. :) Jan 20 18:43:02 Laters. Jan 20 18:46:10 hey thepoosh Jan 20 18:46:15 g00s: Jan 20 18:46:22 day 3 finished Jan 20 18:46:23 Darn it. My phone keeps disconnected from wireless adb. Jan 20 18:46:30 disconnecting* Jan 20 18:46:51 there is an ANR with nothing catching the main thread Jan 20 18:46:58 i'm puzzled Jan 20 18:47:47 maybe infinite loop ? Jan 20 18:48:37 no Jan 20 18:48:47 i would have seen in when debugging Jan 20 18:48:58 and it happened on 5 devices at the same time Jan 20 18:49:12 thepoosh: hm, I've seen those too occasionally... broadcast receiver? slow onStop? Jan 20 18:49:25 kinda receiver Jan 20 18:49:48 it's a thread maintaining tcp connection, receiving a message and updating the UI Jan 20 18:50:51 by "nothing catching the main thread" I'm guessing you mean something like "ui still responds"? Jan 20 18:50:59 thepoosh maybe deadlock ? Jan 20 18:51:03 like you can scroll or something Jan 20 18:51:11 no scrolling Jan 20 18:51:16 touch event timeout Jan 20 18:51:23 g00s: it might be Jan 20 18:51:29 but i don't understand why Jan 20 18:51:35 tomorrow i'll sit on it Jan 20 18:51:46 yeah deadlocks are hard to untangle Jan 20 18:51:54 deadlocks are easy Jan 20 18:52:04 if you are using synchronized try ReentrantLock Jan 20 18:52:12 i'm not Jan 20 18:52:15 synchronized is reentrant Jan 20 18:52:16 that's the thing Jan 20 18:52:18 data race conditions when you've improperly designed your app are annoying. Jan 20 18:52:19 TacticalJoke, did you see my script for attaching devices to wifi adb? Jan 20 18:52:33 groxx no it isn't O.o Jan 20 18:52:34 MikeWallaceDev: send it on! Jan 20 18:52:42 thats why there is ReentrantLock :) Jan 20 18:52:50 +1 Jan 20 18:52:57 No, haven't seen that. Jan 20 18:53:08 g00s: synchronized is reentrant. Jan 20 18:53:15 thepoosh, I just read above that your thread waits for internet AND updates UI, sounds fishy... Jan 20 18:53:31 :D Jan 20 18:53:45 Whoa, AS also does menu previews. Nice. Jan 20 18:53:48 MikeWallaceDev: it's a pubnub callback that updates db and sends a pulse to the UI Jan 20 18:54:39 g00s: it is. try it. have a synchronized method call itself - if it deadlocks, it's not. if it doesn't, it is. Jan 20 18:55:03 TacticalJoke, thepoosh https://bitbucket.org/risesoftware/scripts/src Jan 20 18:55:10 oops, made a mistake with reentrant - was thinking something else. so if another thread is trying to acquire the lock, ReentrantLock can let it back off Jan 20 18:55:19 it's the one that starts with wifi* :) Jan 20 18:55:30 g00s: yes, ReentrantLock can have timeouts/attempts/etc. Jan 20 18:55:32 g00s: that is the other good thing about it Jan 20 18:55:44 g00s: but synchronized is just as reentrant - same thread can acquire it any number of times Jan 20 18:55:50 and Semaphore can even let another thread release a lock Jan 20 18:55:53 g00s: http://stackoverflow.com/a/11821900/1056359 Jan 20 18:56:26 yeah, i used 'reentrant' incorrectly Jan 20 18:56:48 it also has a timeout mechanism Jan 20 18:56:52 the class Jan 20 18:57:14 i think i tried using .NET once and was appalled at how bad its "equivalent" to POSIX conditions is Jan 20 18:57:23 .NET runtime that is Jan 20 18:57:32 Hi guys Jan 20 18:57:36 hi Jan 20 18:57:54 g00s: anywho, tomorrow i'll force strict mode and try it again Jan 20 18:58:00 i couldn't reproduce Jan 20 18:58:07 :( Jan 20 18:58:15 thepoosh: was it just 'in the wild', or did it happen to you? Jan 20 18:58:33 a long time ago (3-4 years) when I created an updated version of an application, I had to increment soem sort of number Jan 20 18:58:40 which I thought used to be in the android manifest Jan 20 18:58:42 calls them Monitors and they're not even designed correctly :/ Jan 20 18:58:53 'cuz fwiw I've had (unrelated) app updates lock the device up long enough to cause ANRs. only on crappier devices, but they exist. Jan 20 18:59:13 mantas322: if you're using Android Studio now, that's generated from your build.gradle file Jan 20 18:59:20 mantas322: it's still there though Jan 20 18:59:41 groxx: happened to QA Jan 20 18:59:47 she ran over with all devices Jan 20 18:59:54 stacktraces had nothing Jan 20 19:00:04 even though it kept on happening Jan 20 19:00:10 Gradle? Jan 20 19:00:22 I see "Gradle Scripts" Jan 20 19:00:35 thepoosh: huh. don't suppose you're doing anything with .postAtBeginning? Jan 20 19:00:36 do I NOT have to do anything? Jan 20 19:00:53 groxx: there is one thing that's postToBegining Jan 20 19:00:54 mantas322: I'm not sure what the question is there Jan 20 19:00:59 you think it's a suspect? Jan 20 19:01:08 i think it's the UI pulses Jan 20 19:01:15 thepoosh: in principle, yes. you can starve the main thread in a "live loop" if it's not done correctly Jan 20 19:01:25 oh shit Jan 20 19:01:34 * thepoosh looking Jan 20 19:02:10 _generally_ you shouldn't use it. e.g. for UI animations, stick to something that lives inside the view drawing system (e.g. just .invalidate every time for yolo win.) Jan 20 19:02:57 :D Jan 20 19:03:13 in general if there are going to be frequent updates to the UI they should be throttled Jan 20 19:03:31 lol, lack of real conditions in win32 was bad enough for someone to write a paper about it - http://www.cs.wustl.edu/~schmidt/win32-cv-1.html Jan 20 19:04:03 thepoosh you could fix that with rxjava :) Jan 20 19:04:16 g00s: fuck rxjava! Jan 20 19:04:22 hehe Jan 20 19:04:29 no time for that Jan 20 19:05:23 groxx: nope, the only postAtFrontOfQueue is in volley code Jan 20 19:05:26 under this comment Jan 20 19:05:32 // This is a little bit of a hack, but hey, why not. Jan 20 19:07:41 heh. probably fine, I would assume. Jan 20 19:08:16 unless you've got some big main-thread callbacks and they're all happening at the same time? Jan 20 19:08:54 hmmmm Jan 20 19:08:58 tomorrow Jan 20 19:08:59 is there a way, in Gson, to serialize nulls only for certain properties? Jan 20 19:09:04 Does anyone know of a library or service that utilizes OCR to parse information from a cashier's check? Jan 20 19:09:05 it's 21:00 here Jan 20 19:09:55 the_rabbit: I'm the maintainer of openocr: https://github.com/tleyden/open-ocr which might suit your needs Jan 20 19:10:16 the_rabbit: it makes it easy to run your own ocr service (wraps google tesseract in a rest api) Jan 20 19:11:04 JesusFreke: ok its a workday, and my android-dev post still hasn't made it. Jan 20 19:11:42 Hmm. I don't get this. When I download a list of comments in my reddit app, quite a bit of memory is used. I just did a test where I create a copy of every message body (by using "mutableBody = new StringBuilder(body);"), and the memory monitor didn't show any extra memory being used. Weird. Jan 20 19:12:13 tleyden: this is a good start. Thank you. Jan 20 19:12:37 I looked at StringBuilder's source; it uses System.arraycopy. So it does make a copy. Jan 20 19:12:54 trying to port cm11 to Xolo Play T1000, getting error Jan 20 19:13:00 logcat- http://pastebin.com/5rRNDcwU Jan 20 19:13:29 the_prezident: Try #android-root Jan 20 19:14:12 the_rabbit: sure np. file a github issue if you run into any problems Jan 20 19:14:18 SimonVT: I tried but no help so got here Jan 20 19:14:41 Hey , I am trying to use the alarm manager , but not gettig the toast at the required time , http://pastebin.com/Rnn7vjSY Jan 20 19:14:54 the_prezident: Well, this channel is for app dev :) Jan 20 19:15:31 okay, but if u got time i would appreciate ur looking at the logcat thanx anyways :) Jan 20 19:20:11 Interesting. The decompiler "Show Java" seems to censor 'username' and 'password' in variable names. Jan 20 19:22:25 TacticalJoke, gun control? Jan 20 19:23:14 Does it name them cahrlie and fred. How does that work? Jan 20 19:23:50 I have a "public void logIn(String username, String password)" method, and it changes them to "String string, String string1". Jan 20 19:23:55 I haven't seen it change anything else. Jan 20 19:24:14 I guess it's to protect against crazy people who do stuff like this: String password = "hunter2"; Jan 20 19:25:20 And how many people code Strings names string? Jan 20 19:25:46 named* Jan 20 19:27:30 I suppose if you don't know about it, it subverts cheap grepping against decompiler output. Jan 20 19:27:45 But the secret is out now! Jan 20 19:27:46 why would you expect a decompiler to know the original name of the param? it's stripped out Jan 20 19:28:37 I'm assuming it is available in debuggable code with syms left in. Else TacticalJoke wouldn't note it. Jan 20 19:28:52 osxorgate: They're not stripped out. Jan 20 19:28:52 Haven't used decompiler in question myself. Jan 20 19:28:56 All of my other parameter names are there. Jan 20 19:29:52 Which is weird. Hmm. Jan 20 19:30:33 But osxorgate's observation is an interesting data point. I wouldn't expect such info to be available in production code, so it's not a very useful security feature. Jan 20 19:30:54 Maybe something else accounts for it in the method in question? Jan 20 19:31:45 Can't imagine what. Jan 20 19:33:08 ಠ_ಠ (inside Camera.java) (it's still hidden, of course) http://cl.ly/image/1l0W1X2T4022 Jan 20 19:41:12 https://twitter.com/search?q=%22bbc%20news%22%20app Jan 20 19:41:45 getting some favourable reviews so far Jan 20 19:41:46 does anyone know what these diagonal arrows mean in Studio? http://cl.ly/image/1A3i3c3s3I21 Jan 20 19:43:14 home and end Jan 20 19:43:44 groxx: http://apple.stackexchange.com/questions/122514/how-do-i-do-a-diagonal-arrow-keyboard-shortcut Jan 20 19:44:04 Napalm: Nice! Jan 20 19:44:34 weird, I've never seen anything use those Jan 20 19:44:37 thanks tho Jan 20 19:47:42 Hi Everybody! Jan 20 19:48:15 Is this a place where a newbie to programming can get help? Jan 20 19:48:45 Sure, as long as it's Android-related. :D Jan 20 19:48:45 if you're good at asking for help, then yeah! Jan 20 19:49:04 awesome. I will need help Jan 20 19:49:08 ? Jan 20 19:50:18 I wanted to implement an "upcoming events" section to an app i'm working on, I was planning on xml pullparsing or JSON parsing from a feed Jan 20 19:50:22 if (question.isAndroidRelated() && user.isGoodAtAskingQuestions()) { help(user); } Jan 20 19:51:04 It turns out that using Google Calendar would make this easy to manage, especially if the calendar was sharing events on other platforms like a website Jan 20 19:51:20 nullpointerexception on question Jan 20 19:51:43 It looks like my dreams would have come to life if I tried this when the google calendar api v2 was relevant Jan 20 19:52:05 Now the Google Calendar v3 API uses OAuth Jan 20 19:53:28 I'm getting pretty stuck as a newbie trying to figure out how to use the java api clients to use OAuth and to call on a particular calendar Jan 20 19:55:19 My first question is where do I put the .p12 key file in the example here: https://developers.google.com/accounts/docs/OAuth2ServiceAccount#callinganapi Jan 20 19:55:31 Hey , I am trying to use the alarm manager , but not gettig the toast at the required time , http://pastebin.com/Rnn7vjSY Jan 20 19:55:58 (you'll have to scroll up abit from that link) Jan 20 20:00:52 thanks for the response groxx, I did not have to version my test app like I used to. I guess the grundle script took care of it for me. Jan 20 20:01:31 killer: does that same code work for broadcasting e.g. in 1 minute? Jan 20 20:03:17 groxx: Yes , it will broadcast , for now a toast , I am trying to broadcast it at 12.35 am Jan 20 20:03:59 killer: I'm assuming you're targeting API 19 or newer? Jan 20 20:04:25 v0re I'm guessing you just put it wherever, and just specify where it is when you call new File Jan 20 20:04:43 14 or newer (Android 4+) Jan 20 20:04:53 killer: targetSdkVersion, not minSdkVersion :) Jan 20 20:04:59 given an app's process can be killed immediately after onPause(), am i correct in assuming that any I/O in onPause() must be done synchronously to prevent data loss? Jan 20 20:05:22 killer: he means the target sdk Jan 20 20:05:26 groxx: 21 Jan 20 20:05:38 killer: if targetSdkVersion is 19 or newer, setRepeating is an "inexact" alarm. with a repeat interval of 1 day, it's allowed to drift a long way Jan 20 20:05:38 since kitkat alarmManager set and setRepeating are inexact Jan 20 20:05:52 killer: use setExact: http://developer.android.com/reference/android/app/AlarmManager.html#setExact%28int,%20long,%20android.app.PendingIntent%29 Jan 20 20:06:13 OK. so where it reads .setServiceAccountPrivateKeyFromP12File(new File("MyProject.p12")) , new File is pulling MyProject.p12 from a root dir? Jan 20 20:06:59 killer: also, if the device reboots, you'll lose your alarms on most versions. if it's important that it survives a reboot, you probably want to receive boot-completed events and re-register alarms if necessary Jan 20 20:07:15 i'm working on an app to easily browse my (mobile) website, with a few extra features. Currently i got it working to on opening of the app to load my website, but when i click a link on my website it redirects me to my browser(rather than stay in the app), how can i prevent this from happening and let it stay in my own app? Jan 20 20:07:44 bnicholson: yep. newer OSes guarantee at least onStop though (unless you're force-stopped, of course.) Jan 20 20:08:41 v0re: you probably want to put it in res/raw/MyProject.p12 Jan 20 20:08:50 Hey! I'm ready to release my app on google play. Is it mandatory to use proguard when exporting the app from exlipse? Jan 20 20:08:53 eclipse* Jan 20 20:09:05 groxx: thanks Jan 20 20:09:56 why still use eclipse? Jan 20 20:10:04 aceus i hope not because i have an app published right now that doesn't use proguard Jan 20 20:10:10 aceus: no Jan 20 20:10:26 Ok. Because when I've used it the app crashes on startup Jan 20 20:11:03 you might to check why Jan 20 20:11:09 Any other things that I should be aware of? This is the first time I'm publishing an app. Do I need to setup a webpage and a demo. video? Jan 20 20:11:37 aceus: I think you're required to have some contact info (a website and/or a support email), but otherwise there's not much needed Jan 20 20:11:46 are you using reflections or something else? crashing because of proguard would be bad Jan 20 20:11:59 I assume it's best practice to debug until progaurd works properly? Jan 20 20:12:04 Hm Jan 20 20:12:42 yeah, proguard can take some time to configure. most non-trivial apps won't work with it immediately, you'll have to add -keep rules / etc, and some of the libraries you use probably have additional rules you'll need to add. Jan 20 20:12:44 and you might want to look for how to promote app. this way youll get at least few downloads per week as start Jan 20 20:13:22 groxx: thanks. Jan 20 20:13:24 Is there any log output from proguard? Jan 20 20:13:57 found it... Jan 20 20:14:02 if I wanted to use env variables in my gradle file, but keep them in an untracked file, where would I put that file? Jan 20 20:14:12 and what might it be named? Jan 20 20:15:28 i'm working on an app to easily browse my (mobile) website, with a few extra features. when i click a link on my website(in my app) it redirects me to my browser(rather than stay in the app), how can i force to let it stay in my own app? Jan 20 20:15:43 The app will be free of charge to use anyway, so I think I'll skip the proguard Jan 20 20:15:59 been searching on the internet but couldnt find a solution Jan 20 20:17:00 shekibobo: afaik you do something like this: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html Jan 20 20:17:52 groxx: thanks, I'll give it a try Jan 20 20:17:56 kodi Jan 20 20:18:00 xFr0st, I'm trying to understand this... When you say "click on a link in my app" do you mean that your app is a browser? Jan 20 20:18:21 shekibobo: looks like there's also something like this: http://stackoverflow.com/questions/11749384/gradle-include-properties-file Jan 20 20:18:34 I have not tried to do these yet though Jan 20 20:19:07 aceus: most apps aren't proguarded fwiw. it can be beneficial (it can do some optimizations for you), but it's not necessary. Jan 20 20:19:12 groxx, is that the gradle.properties file that is in your ~ ? I use it, works well Jan 20 20:19:21 Ok, good to hear. :) Jan 20 20:19:29 MikeWallaceDev: that's mentioned in the first link, yeah Jan 20 20:20:25 all of my signing config is in a gradle.properties file Jan 20 20:20:27 http://pastebin.com/EQSahKAg Jan 20 20:20:37 MikeWallaceDev: say i'm opening google.com in my app. when i click on the link "Images" (which redirects to images.google.com), that link(images.google.com) gets opened in my browser rather than in my app Jan 20 20:21:13 http://www.androidpolice.com/2015/01/20/googles-updated-branding-guidelines-clarify-name-third-party-apps/ Jan 20 20:21:14 soooooooo... you have a browserView in your app, right? Jan 20 20:21:14 yay Jan 20 20:21:32 MikeWallaceDev: nice. is there a way to use e.g. local.properties for something like that? reading from a fairly global source isn't great for multiple team projects :| Jan 20 20:22:01 ive been trying to get this to work with WebView Jan 20 20:22:16 hmm, not sure groxx , I work alone... Jan 20 20:23:03 groxx: gradle.properties works and can be commited, where-as local.properties should be excluded from your VCS Jan 20 20:23:03 fyi, this is my first attempt to create an android app and i just started following java classes a few weeks back. so my knowledge at this point is quite basic Jan 20 20:24:37 xFr0st: you need to create a WebViewClient and implement the shouldOverrideUrlLoading method and set it on the WebView with WebView.setWebViewClient Jan 20 20:24:37 xFr0st: https://stackoverflow.com/questions/14633367/how-can-i-force-a-webview-app-to-open-links-in-it-instead-of-open-them-in-the-de Jan 20 20:24:37 xFr0st, check the doc for WebView : Creating and setting a WebViewClient subclass. It will be called when things happen that impact the rendering of the content, eg, errors or form submissions. You can also intercept URL loading here (via shouldOverrideUrlLoading()). Jan 20 20:24:49 lol Jan 20 20:24:53 Napalm yeah i'm still confused though, is "foobar" safer than "foo bar"? Jan 20 20:25:10 Napalm: yeah, exactly. but is local.properties auto-loaded if it exists? Jan 20 20:25:15 is "foobar" a trademark? Jan 20 20:25:20 not as one word Jan 20 20:25:27 what if bar is a trademark Jan 20 20:25:28 groxx: yes it is Jan 20 20:25:57 or what if "foo" is a trademark, then is "foobar" ok ? Jan 20 20:26:02 good to hear. thanks :) Jan 20 20:26:04 ty for the info Napalm Ashiren & MikeWallaceDev Jan 20 20:26:11 that should get me going for now :) Jan 20 20:26:12 you're welcome mate Jan 20 20:26:17 g00s: then you probably have to do "bar for foo" :P Jan 20 20:26:18 say with reddit sync if they called it RedditSync and trademarked it, Google cannot pull their app down.. its their name Jan 20 20:26:27 groxx: I added setExact for versions above kitkat , but the code i posted before( http://pastebin.com/Rnn7vjSY) , works neither for api 14 or api 19 . No toast by broadcasting is shown Jan 20 20:26:32 bar for foo for android :) Jan 20 20:26:44 for ( bar android ) Jan 20 20:27:09 Napalm ok thanks Jan 20 20:27:35 Napalm, I bet that's what they'll end up doing Jan 20 20:28:01 killer: make sure you have a manifest broadcastreceiver entry that can receive the intent, and setRepeating on KitKat+ are forced to inexact timing Jan 20 20:28:14 wrong facto g00s :) for² is ok though Jan 20 20:28:38 haha Jan 20 20:29:12 xFr0st: if your just making app that wraps a website and provides extra features.. check my example out https://github.com/slightfoot/android-web-wrapper/ Jan 20 20:31:21 for bluetooth low energy, seems connectGatt needs to be called on main thread for SGS4. But does discoverServices / disconnect also have to be on the main UI thread ? Jan 20 20:31:43 someone should say it's against the policy (Spam and Placement in the Store) -> "Provide a webview of a website not owned or administered by you (unless you have permission from the website owner/administrator to do so)" Jan 20 20:33:05 wow Napalm that would save some time ^^ Jan 20 20:47:07 http://www.slideshare.net/AVGShare/avg-android-app-performance-report-by-avg-technologies Jan 20 20:47:15 looks interesting Jan 20 20:49:42 You know in your project dir, there's that annoying build folder that you always clink into, and then out of, just to go into your module's folder and then go into the correct build folder? Jan 20 20:49:50 Is there a way to remove it? Jan 20 20:50:04 this is what I did: Jan 20 20:50:12 buildscript { buildDir = 'ColoroosApp/build' Jan 20 20:50:30 will that have negative effects that I can't think of? Jan 20 20:52:57 Napalm: i just tried your android-web-warpper, by default it opens google, if i search something and click on one of the results, it opens that in my browser anyway? Jan 20 20:53:35 xFr0st, wouldn't it have been faster to try that? Jan 20 20:53:40 thats the way I designed it.. if you navigate away from the origin it will load a browser.. which is what you want Jan 20 20:53:44 change the base url to your site Jan 20 20:53:45 and see Jan 20 20:54:07 xFr0st: base url https://github.com/slightfoot/android-web-wrapper/blob/master/WebWrapper/res/values/strings.xml#L5 Jan 20 20:54:25 xFr0st: code for check: https://github.com/slightfoot/android-web-wrapper/blob/master/WebWrapper/src/com/example/webwrapper/BrowserFragment.java#L148 Jan 20 20:56:24 awesome, ty Jan 20 20:57:10 jw, is not being able to zoom in/scroll (on non-mobile sites) intended or a bug? Jan 20 20:58:08 generally intended, but I call it a bug :( Jan 20 20:58:33 more often than not it would be useful, and they're just disabling it for aesthetics Jan 20 20:58:44 interesting, if i click through some pages(on the non-mobile site) the new one semi-loads behind the old page Jan 20 20:59:30 this shouldnt be a big issue for me though as my own website(once online) will be fully mobile optimised Jan 20 21:02:07 I hate large changesets. So hard to review. Jan 20 21:03:44 Good thing commits are cheap. Jan 20 21:05:58 yes, I have included the receiver -> Jan 20 21:06:01 Jan 20 21:06:09 Napalm: ^ Jan 20 21:06:58 xFr0st: you disable it for websites that are "responsive", and if your making a website wrapper app, that website should appear and act like a "app" so its a responsive site Jan 20 21:07:34 TacticalJoke: tell them to start squashing their commits Jan 20 21:08:12 isn't that the opposite of what you want to do, to get smaller changes? :A) Jan 20 21:08:14 :)* Jan 20 21:09:02 killer: if thats your receiver, your intent is wrong.. your intent in your snippet should be: new Intent(context, Alarm.class) Jan 20 21:10:09 alright ty Napalm Jan 20 21:15:18 If I'm storing a P12 key in res\raw, is that against best practice? Jan 20 21:16:13 well, if you include it in the apk, it isn't exactly private Jan 20 21:17:08 I need to get alarm permissions for alarm manager? Jan 20 21:18:02 This is where I start to get confused, I would rather use a public key for this API, but the GCalendar API JSON feed seems to require an OAuth authorization Jan 20 21:18:32 So I've created a Service Account but now I need to deal with the key Jan 20 21:27:50 Actually maybe someone can answer another question for me Jan 20 21:29:20 hi guys! Jan 20 21:30:00 When you are managing a Google Calendar you can make it public and it will have a feed available that can be formatted to JSON or JSONC Jan 20 21:30:06 is it possible to create a camera intent which will enforce placing TimeStamp on the taken Picture? Jan 20 21:30:41 and if yes - where to find the right API parameters so I can learn how to do it. Jan 20 21:30:41 eg. https://www.google.com/calendar/feeds/%40group.calendar.google.com/public/basic?alt=jsonc Jan 20 21:34:45 When trying to call that link with HttpPost it comes back with an error requiring authorization Jan 20 21:35:55 (sorry, i should have pasted the ?alt=json extension) Jan 20 21:36:51 I was using httpPost.setHeader("Content-type", "application/json"); Jan 20 21:38:08 Is there a static method for getting the application context (kinda like how Looper.getMainLooper() gets the main looper)? Jan 20 21:39:35 TacticalJoke: not that I remember Jan 20 21:39:56 Nope Jan 20 21:40:06 K. Thanks. Jan 20 21:40:11 TacticalJoke: there isn't unless you're willing to use reflection iirc Jan 20 21:41:03 well, you could technically create a static method on the Application object itself Jan 20 21:41:42 you could also use something like dagger I guess Jan 20 21:43:04 Dagger can't statically inject contexts Jan 20 21:43:14 anymore than you referencing your static field in your Application subclass Jan 20 21:43:32 It's okay; I'm probably gonna use Application.onCreate to get the application context. :) Jan 20 21:43:50 I'm instantiating something that needs an application context. I can instantiate it there. Jan 20 21:44:19 onAttachBaseContext ftw Jan 20 21:44:26 So, where the hell do I download dagger-2.0-SNAPSHOT? Jan 20 21:44:35 sonatype's snapshot repo Jan 20 21:44:43 maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } Jan 20 21:45:48 TacticalJoke: yeah, that's what I do. or just set it in a static field, so you can MyApplication.context from anywhere. (apparently content providers can start before onCreate runs though, so it's not always safe to do so) (and watch out for places you need themed contexts) Jan 20 21:46:03 JakeWharton: +1000 on https://github.com/JakeWharton/butterknife/pull/219 Jan 20 21:46:17 hwrdprkns: try the snapshot, let me know how it works Jan 20 21:46:34 there's also performance improvements (not that there's a whole lot of performance to BK) Jan 20 21:46:55 Yeah, thanks. Jan 20 21:47:13 Is there any good libraries to handle swipe to reveal different views for left and right in a listview? Jan 20 21:47:20 This is just for instantiating my SharedPreferences wrapper ("new PreferencesFile(this);". Jan 20 21:48:02 TacticalJoke: Why can't you just use dagger for that? Jan 20 21:48:07 In an ApplicationModule or whatever Jan 20 21:48:27 Guess I could. I've never tried Dagger. Jan 20 21:48:47 TacticalJoke: it front-loads all of the complication Jan 20 21:48:55 so you suffer you suffer and then the rest of your life is easy as cake Jan 20 21:50:48 I've been passing around Context references in some clumsy way that I suspect is not best practice. Jan 20 21:50:58 Looks neat. Jan 20 21:51:01 Just because I seem to need them all the time. Jan 20 21:51:06 hi Jan 20 21:51:17 I need some help with Java Jan 20 21:51:32 does anybody have a working example of how to detect an internet connection with a listener that tells you when status changes? i’ve tried several examples online and i don’t get any feedback on it Jan 20 21:51:46 FlipBill: Are you passing references to Activities? That can be risky (in some cases). Jan 20 21:52:10 TacticalJoke, Yes. I get that, vaguely. Jan 20 21:52:11 If I have a variable named "inputs", which is a JSONArray, and the value associated with key [1] is a function... Jan 20 21:52:19 JakeWharton: Thanks Jan 20 21:52:19 how do I get it? Jan 20 21:52:28 Specifically it's a CallbackContext Jan 20 21:52:32 It doesn't fall apart too much, or uh, too often. Jan 20 21:52:35 :-) Jan 20 21:52:44 Normally for example I have inputs.optString(0) Jan 20 21:52:57 But with a CallbackContent what do I do?.... Jan 20 21:53:09 err Jan 20 21:53:12 CallbackContext Jan 20 21:53:21 Which is a Cordova object.. let me find the base type Jan 20 21:53:23 I've been careful to be sure the Activity lifetime is longer than the need for the reference... Jan 20 21:53:29 If that what you mean. Jan 20 21:53:39 Okay, yeah. Jan 20 21:53:53 Agamemnus, still working on the puzzle? Jan 20 21:53:55 Honestly I'm not really sure what kind of object it is Jan 20 21:54:09 Yeah, I'm adding a poll for more monetization Jan 20 21:54:19 But I must admit to suffering from great amounts of Android fog in my head. Jan 20 21:54:49 IllegalArgumentException when compiling; I have added android-apt and the dagger-2 repo: http://pastie.org/9844647 here are my gradle files; Jan 20 21:54:55 I have zero idea what I'm missing; Jan 20 21:55:40 FlipBill: Such as what? Jan 20 21:56:22 thats sickhouse Jan 20 21:56:24 I am developing an intense hatred for ViewPager Jan 20 21:56:35 TacticalJoke, oh, where to begin? hehe Jan 20 21:56:44 :) Jan 20 21:57:18 Of many design questions, struggling with how to arrange/think of Activity relationships. Jan 20 21:57:45 Whether to consider them hierarchical in functionality or more as peers. Jan 20 21:57:47 bynarie, i have a few people entering addresses now Jan 20 21:58:01 what u mean Jan 20 21:58:11 Of course that bears heavily on application requirements, but, still... Jan 20 21:58:20 into the "tell a friend" field Jan 20 21:58:26 ohhh i gotcha Jan 20 21:58:27 awesome Jan 20 21:58:28 but most of them are clicking randomly Jan 20 21:58:36 it's nice to make apps behave the way people expect on particular platforms. Jan 20 21:58:40 emailing random corporate customer support Jan 20 21:58:53 And there are so many nuanced behaviors to look out for. Jan 20 21:59:09 e.g.: ALLKids@adph.state.al.us or reply-EMEA-EN@email.hpconnected.com Jan 20 21:59:13 My stuff has a clumsy feel, I fear. I soldier on. Jan 20 21:59:27 ha Jan 20 22:01:46 explodes: what's the error? Jan 20 22:02:07 Wow. Just managed to create an infinite loop spawning Dialogs. That's my fog again! Jan 20 22:02:21 groxx: :( IllegalArgumentException Jan 20 22:02:41 there's more to it than that - where is the error? Jan 20 22:02:53 In Android Studio's "Messages" box Jan 20 22:02:58 double-click it Jan 20 22:03:22 Managed to kill it after only 12000 lines of logcat, so maybe I can find a clue. Jan 20 22:05:33 groxx: double clicking does nothing; http://i.imgur.com/S3Ypqtj.png Jan 20 22:06:52 I'm having a question regarding google play. Jan 20 22:07:04 Is it OK to use same screenshots for 7" and 10" tablet? Jan 20 22:07:24 I guess a 7" tablet may have the same resolution as a 10"? Jan 20 22:07:43 explodes: hm. I wonder if it might be coming from the dagger processor, though it's odd that there's no trace / etc. Jan 20 22:08:00 explodes: unfortunately I haven't done much with Studio and annotation processors :\ not sure what to do next. Jan 20 22:08:16 run on the CLI with --stacktrace Jan 20 22:08:23 just saying IllegalArgumentException tells us nothing Jan 20 22:08:31 kk Jan 20 22:10:40 aceus, It's possible depending on the dpi of the display Jan 20 22:10:43 ... how do I run that Jan 20 22:11:16 Yeah. I dunno really why they say 7" and 10" on Google play, instead of different resolutions? Jan 20 22:11:35 I see the Gradle Console and Gradle window Jan 20 22:11:53 aceus, -> http://developer.android.com/guide/practices/screens_support.html Jan 20 22:13:16 explodes: probably use the terminal window, and type `gradle assembleDebug --stacktrace` Jan 20 22:13:27 yar, ok thanks Jan 20 22:13:36 ./gradlew Jan 20 22:13:57 ^ or that's probably better. I'm not sure how much of a difference there is though. Jan 20 22:14:04 uninstall gradle from your computer Jan 20 22:14:08 it should never be used Jan 20 22:15:08 so far it seems to always do the right thing. is it just because I don't have things in some non-default locations? Jan 20 22:15:24 Here's the gradlew output, I suspect maybe my "Object Graph" is incorrect somewhere ,although it doesn't say that: http://pastebin.com/x7FC5g1e Jan 20 22:15:46 except for the face that the error stems from "Preconditions" Jan 20 22:16:21 show your module Jan 20 22:19:52 ah, this reminds me: JakeWharton does Studio have a way to show annotation processor error messages in the editor? so far I've only managed to get them to appear in the messages window. double-clicking goes to the right place, but that's not quite ideal :\ Jan 20 22:20:37 JakeWharton: I'm going to use sample code first- instead of my version of CoffeeMaker Jan 20 22:23:09 Using https://github.com/google/dagger/blob/master/examples/simple/src/main/java/coffee, I get a swarm of errors stemming around "error: package javax.annotation does not exist" "cannot find symbol class Generated" Jan 20 22:23:18 But we have progress; Jan 20 22:24:08 for an Android app you need to add a dependency for the @Generated annotation Jan 20 22:24:39 see: https://github.com/google/dagger/issues/95 Jan 20 22:25:40 aye, adding dependencies { provided 'javax.annotation:jsr250-api:1.0' } fixes that Jan 20 22:26:12 that issues suggests glassfish; is there a difference? Jan 20 22:26:18 no Jan 20 22:27:12 thanks JakeWharton and groxx! Jan 20 22:27:18 heating! pumping! coffee! Jan 20 22:28:05 moar coffee! Jan 20 22:28:07 caffeine! addiction! Jan 20 22:28:14 even moar coffee! Jan 20 22:28:22 the cycle of life. 'tis a beautiful thing. Jan 20 22:28:41 I started drinking like ten cups a day. Had to cut back a bit. Jan 20 22:28:45 haha Jan 20 22:32:01 theblang: yeah, at that level you've gotta cut back on your side water-intake. otherwise you spend more time going to and from the bathroom than it's worth. Jan 20 22:32:33 groxx so yeah, I wasn't drinking any side water, lol. ridiculous, I know Jan 20 22:34:26 groxx I developed a bacterial infection in the prostate, prostititus. Not sure if that was the cause or not, but I did read too much caffeine and not enough water could encourage an infection like that. Needless to say I cut down pretty quickly Jan 20 22:37:24 theblang: fwiw the vast majority of diuretics in drinks (like caffeine) still end up fairly significantly net-positive when you're not just chewing on pills of it. but totally aside: yeah, 10 is quite a bit :) Jan 20 22:38:23 groxx interesting thing to me is, after the prostititus issue and I quit cold turkey, I never had any withdrawls at all Jan 20 22:40:03 i remember back in the day, weight lifting i'd take twinlab ripped fuel, which was crazy cafeine and ephedrine mixed together XD Jan 20 22:40:15 i think they reformulated it to something wimpy Jan 20 22:40:40 oh and some b vitamin that slowed the breakdown of the caffine Jan 20 22:41:42 Guys, http://pastebin.com/GkcFj5N9 is there something wrong here? Intellij keeps saying that it can't be converted to a drawable (preview mode) Jan 20 22:41:59 theblang: I've found I have next to no withdrawal problems if I don't have coffee on a schedule. if I slurp it randomly through the day, no problems. if I have it every morning, I'm more drained in the morning for a while (never had headaches). Jan 20 22:42:47 SidFerreira: I forget, do you need a "fallback" item in selectors? something with no state selected. Jan 20 22:45:06 groxx: Im not sure, tried it already, it's like the drawables were invalid Jan 20 22:45:59 not sure :\ don't suppose there's a stack trace? Jan 20 22:50:25 groxx: me neither, I *like* coffee but I never have withdrawals if I skip it for a few days Jan 20 22:50:44 on the other hand what I drink can only barely be described as coffee, that's probably the reason why Jan 20 22:50:49 heathen! Jan 20 22:53:04 one heaping tablespoon per cup, I always say Jan 20 22:58:55 API 21 includes Android Wear, right? (4.4W2) Jan 20 23:02:43 explodes: uh, yes unless I'm going senile Jan 20 23:07:08 would it be possible to make an icon showing whether nfc is turned off or on from the app? I know you can’t have a button turning it on or off, but can you just check the status? Jan 20 23:14:18 in_deep_thought yes it is possible Jan 20 23:14:27 yay Jan 20 23:15:10 NfcAdapter mAdapter = NfcAdapter.getDefaultAdapter(context); Jan 20 23:15:11 adapterNotNull = mAdapter == null ? false : true; Jan 20 23:15:15 that’s the code you need Jan 20 23:15:22 if it’s null it’s disabled or not present Jan 20 23:15:40 of course that var is a boolean Jan 20 23:15:50 in_deep_thought ^ Jan 20 23:16:03 possibly also interesting: http://developer.android.com/reference/android/nfc/NfcAdapter.html#EXTRA_ADAPTER_STATE you can get broadcasts with the on/off/turning-on/-off state. Jan 20 23:17:21 more interesting is that in Oct in the US, we will be chip and signature.. which is pretty much chip and nothing.. It will be interesting to see how many replay attacks occur Jan 20 23:29:54 tricknology, replay of chip generated authentication? Jan 20 23:37:12 no, replay an entire transaction Jan 20 23:37:25 IIRC you can trick the card into thinking it’s made a transaction Jan 20 23:37:34 then use HBCE to replay that data Jan 20 23:37:43 it’s not that simple.. but that’s the gist Jan 20 23:37:51 FlipBill^ Jan 20 23:39:09 I don't know anything about it. But I've assumed that the financial institution would generate a unique summary for each transaction so that the chip could respond with a hash for validation. Jan 20 23:39:24 Of course, that means it is online. Maybe I'm assuming too much. Jan 20 23:39:45 So a replay would not work on that. (?) Jan 20 23:39:48 tricknology: a friend of mine already ended up eating for two days for free in USA because of US card processors operating in offline mode (wtf?) Jan 20 23:40:04 p_l, ah. offline. OK Jan 20 23:40:34 I had a friend with a bottomless Sears card years ago. Jan 20 23:40:42 yep.. offline transactions are still enabled Jan 20 23:40:45 it depends on the card though Jan 20 23:40:49 We bought some major appliances. But that's another story. Jan 20 23:40:52 there is a cap tho Jan 20 23:41:04 lol Jan 20 23:41:08 I’m sure that’s been fixed Jan 20 23:41:34 Sears figured it out. But they never asked him to pay the bill! Jan 20 23:41:55 I guess they were embarrassed. Jan 20 23:42:15 Did he do something to the card? Jan 20 23:42:19 or was it just a mistake Jan 20 23:42:29 Only two days of free food Jan 20 23:42:32 put him in jail Jan 20 23:42:36 and let him rot there Jan 20 23:42:42 THROW AWAY THE KEY Jan 20 23:42:43 Nah. It was an accident. Sears managed to issue him a card that was charging some other account. Jan 20 23:43:00 Never found out precisely why. Jan 20 23:43:17 Just one of those weird, rare screwups. Jan 20 23:43:51 He was wondering why they never sent him a bill. Jan 20 23:44:30 my parents bought a tv Jan 20 23:44:34 in the early 90s Jan 20 23:44:47 they had it ready Jan 20 23:44:54 wrong tv Jan 20 23:44:59 bigger model Jan 20 23:45:10 :D Jan 20 23:45:35 I believe this was also at Sears but it might have been another store. Jan 20 23:45:39 Yeah. It happens. I think we got a refrigerator and some other stuff before they noticed. Jan 20 23:45:54 This was around 1978 Jan 20 23:46:01 we had that TV for over 20 years Jan 20 23:46:12 until it turned green and they didn't want to fix it. Jan 20 23:46:16 Gave it away. Jan 20 23:46:29 It probably weighs 100 pounds Jan 20 23:46:40 A huge CRT Jan 20 23:46:58 I saw one like that at the curb just the other day. Jan 20 23:47:06 Interesting Jan 20 23:47:18 I grew up with wooden TVs Jan 20 23:47:29 They gave it away to aa young couple who said they'd go and fix it Jan 20 23:48:08 I see Jan 20 23:48:35 back in your day, when TVs had shows of firefighters, they were real firefighters and your TV really was on fire, right? Jan 20 23:48:55 P Jan 20 23:48:57 :P Jan 20 23:49:11 Yes, we kept we bucket of sand next to the televsion Jan 20 23:49:29 we might need that now, but for a different reason Jan 20 23:49:59 Small kitchen TV was also bulky. Replaced it with LCD one. The cat likes to hide behind the newly freed area Jan 20 23:50:11 The TV doesn't have rabbit ears... it has cat ears. Jan 20 23:50:29 I feel bad for my cats these days. They can't sit on top of CRTs to keep warm anymore. Jan 20 23:50:38 well Jan 20 23:50:49 the wires and cable box can get really hot too. Jan 20 23:51:03 "electric cat" Jan 20 23:51:20 yeah. Goota go now. 'evening. Jan 20 23:51:30 later Jan 20 23:53:18 Anyone know if I can fade in a LinearLayout Jan 20 23:53:26 or a button or TextView or something Jan 20 23:53:40 I know I can use setvisibility but I want to fade it Jan 20 23:54:33 drose379, not sure what you mean by fade, by you can set background to a Drawable with alpha and/or gradient Jan 20 23:54:42 s/by/but/ Jan 20 23:54:57 FlipBill like fade in on a button click Jan 20 23:56:33 I suppose you can progressively change transparency with a bit of animation. I don't know the best way. Jan 20 23:56:49 Good idea, thanks. Jan 21 00:07:58 FlipBill: you can use a TransitionDrawable Jan 21 00:08:44 FlipBill: if your trying to animate a drawable. another option is to use an ObjectAnimator to change the alpha property of the drawable. Jan 21 00:09:02 drose379 Jan 21 00:09:05 sorry that was ment for you Jan 21 00:09:26 Sweet, thank you Jan 21 00:10:30 FlipBill: if your dealing with View animations call animate() on the view and get the ViewPropertyAnimator Jan 21 00:10:36 arg i mean drose379 Jan 21 00:10:41 sorry FlipBill Jan 21 00:10:41 hahah Jan 21 00:26:01 anyone know how to create two libraries using one source? Jan 21 00:26:07 as in two package names.. same source file Jan 21 00:26:09 two libraries Jan 21 00:27:12 tricknology: http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename Jan 21 00:27:27 see productFlavors Jan 21 00:28:03 ooo thnks Jan 21 00:28:09 shit Jan 21 00:28:11 gradle.. Jan 21 00:29:14 any way to just export the thing with a new package name? Jan 21 00:29:17 or is that what this is doing? Jan 21 00:32:38 tricknology: https://code.google.com/p/jarjar/ ? Jan 21 00:35:54 Will this do what I expect? Jan 21 00:35:55 String date = currentDate.MONTH + "/" + currentDate.DAY_OF_MONTH + "/" + currentDate.YEAR; Jan 21 00:36:17 I expect something like 2/12/15 Jan 21 00:45:50 So in android date 0 = january? Jan 21 00:46:09 Or did I screw something up Jan 21 00:47:11 Anyone know how to bypass activation on a Galaxy S5 so i can use this #$^$ thing without having to put it on a carrier? Jan 21 00:49:02 Thats weird, why would january be 0 Jan 21 00:49:27 drose379: because date math. Jan 21 00:49:37 January is basically 0? Jan 21 00:49:49 drose379: if you're building strings for display, definitely use a SimpleDateFormat or something. Jan 21 00:50:03 Theyre being stored in the DB Jan 21 00:50:10 drose379: http://developer.android.com/reference/android/text/format/DateFormat.html Jan 21 00:50:12 drose379: yeah. meanwhile, I think day_of_month is 1-based, but I could forget. Jan 21 00:50:30 I wrote this: Jan 21 00:50:30 drose379: if it's in a db, normalize it to UTC, and save as seconds or milliseconds since the unix epoch. Jan 21 00:50:31 String date = currentDate.get(Calendar.MONTH) + "/" + currentDate.get(Calendar.DAY_OF_MONTH) Jan 21 00:50:31 + "/" + currentDate.get(Calendar.YEAR); Jan 21 00:50:38 and its showing me 0/20/2015 Jan 21 00:50:45 don't store strings for dates. it's not worth it. Jan 21 00:50:58 What should I store? Jan 21 00:51:23 don't format the date yourself. different locales use different date formats, etc. Jan 21 00:51:37 Just adding slashes? Jan 21 00:51:37 drose379: use getTime() on it, store that. Jan 21 00:52:19 Get time returns a date, then should I change the date to a string? Jan 21 00:52:25 I cant store a date object can I Jan 21 00:52:40 Are you storing anything? I think groxx is talking about databases. Jan 21 00:52:45 Check out SimpleDateFormat.format. Jan 21 00:52:58 Im storing this in a database Jan 21 00:53:01 Oh. Jan 21 00:53:21 all i need is day month year though Jan 21 00:53:48 dates should typically be stored as an int/long, using millis or seconds since epoch Jan 21 00:54:03 what about as DATE? Jan 21 00:54:21 the time "component" will just be 0 Jan 21 00:54:22 drose379: out of curiosity, what are you doing with it? "just" day/month/year usually causes problems unless you've considered all the time zone / DST / leap year issues. Jan 21 00:55:01 Just storing it as a start date (the user is creating something in the app) and I want to keep the date that they started on record Jan 21 00:57:41 drose379: just store the value from, e.g. System.currentTimeMillis() Jan 21 00:57:43 drose379: The idea behing storing seconds/milliseconds since the epoch (1970/01/01) is that the date can be formatted at any time. Jan 21 00:57:47 behind* Jan 21 00:57:55 It's way more flexible to store that number than to store a string. Jan 21 00:58:06 If you store a string you can't, for example, change the date format later. Jan 21 00:58:12 you probably still want to store it as a long. sqlite works at second resolution usually, so if you want to query on it you might consider dividing by 1000 first. but longs are faster, easier, and more flexible than just about anything else you can do. Jan 21 00:59:01 Its a MYSQL database Jan 21 00:59:04 and then use android.text.format.DateFormat.getDateFormat().format(new Date(millis)) Jan 21 00:59:34 Iam back \ (^ _^ ) Jan 21 00:59:45 \ ( ^_^ ) / Jan 21 00:59:46 so currentTimeMillis() will return me an int? Jan 21 00:59:51 A long. Jan 21 01:00:11 http://www.imdb.com/title/tt0091306/#Jumpin-Jack-Flash-1986 classic Jan 21 01:00:35 So I can save that long to the DB and access it later Jan 21 01:00:52 If anyone wants to do project together lmk. I can do Android - Server Side Jan 21 01:01:09 drose379: if it's mysql, fwiw you can have a datetime field that has a default value of now(). Jan 21 01:01:24 Shit, true gorxx Jan 21 01:01:26 groxx Jan 21 01:01:29 DragonPunch: see /topic :) Jan 21 01:01:38 Are you accessing the MySQL database directly from Android? Jan 21 01:01:50 Or are you talking to a web server? Jan 21 01:02:04 No, making a http request to PHP page (sending it JSON object) Jan 21 01:02:07 Okay. Jan 21 01:02:33 JesesFreke why Jan 21 01:02:41 drose379: if you're running the mysql db, I'll heartily recommend making sure the db or the machine are very-strictly UTC-based. the silent casting to/from local-time is a constant source of pain. Jan 21 01:02:58 drose379: http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html Jan 21 01:03:09 (for some reason, 5.0 always comes up in my searches...) Jan 21 01:03:35 Thanks, I had a feeling working with date was going to be a pain Jan 21 01:04:27 A lot of people recommend Joda-Time on the client side. I don't know much about it though (yet). Jan 21 01:04:32 I'll probably end up using it for my app. Jan 21 01:04:42 LMK Jan 21 01:05:05 yay Jan 21 01:05:06 http://www.bbc.co.uk/news/technology-30894674 Jan 21 01:05:07 yeah, same. I get by with the Calendar API, but something a bit friendlier would be nice. Jan 21 01:05:12 DragonPunch: "no advertising please, jobs or otherwise" Jan 21 01:05:12 http://www.joda.org/joda-time/ Jan 21 01:05:13 TacticalJoke: Check it out Jan 21 01:05:22 groxx I made the type datetime would the default be current_timestamp? Jan 21 01:05:30 Awesome, Napalm. Must be exciting. :) Jan 21 01:05:31 im not advertising jobs or anything i want to work with someone together so we can do something Jan 21 01:05:34 Reading it. Jan 21 01:05:40 what channel do i join to find people Jan 21 01:05:43 finally Jan 21 01:05:45 who want to work together Jan 21 01:05:52 Did you use RecyclerView? Jan 21 01:05:58 yes Jan 21 01:06:27 Nice tablet UI. Jan 21 01:06:37 groxx im getting a query error Jan 21 01:06:58 drose379: the docs seem to suggest that `default current_timestamp` requires a timestamp column. I think you can set defaults like `default date(now())`, though I haven't written any raw mysql in a while. Jan 21 01:07:12 JesusFreke: what channel can i join to join on projects Jan 21 01:07:38 ah, alright Jan 21 01:07:42 DragonPunch: I'm not an IRC directory, sorry :) Jan 21 01:08:37 DragonPunch: There are tons of project Jan 21 01:08:51 where Jan 21 01:08:56 i want to work with a legit team Jan 21 01:09:03 what do you mean where? Jan 21 01:09:12 wheere can i find a peopple Jan 21 01:09:19 You think all projects are handled by one big corporation? Jan 21 01:09:21 drose379: bleh, maybe not. well, there are always insert triggers :( Jan 21 01:10:10 Corporations are people Jan 21 01:10:13 No prob groxx Jan 21 01:10:14 Just saying Jan 21 01:18:55 DragonPunch: I think normally you can just pick something that you like, a library, or maybe an open source app, and fork their source tree and contribute from there Jan 21 01:19:46 fairuz: that. Jan 21 01:23:46 Why is it that adbd has TCP mode versus USB mode? Why can't it just listen for both kinds of devices? Jan 21 01:24:03 I ask because when I flip it into TCP mode, it doesn't forget about connections made over USB. Jan 21 01:24:03 OmegaVesko: I stick with there :D Jan 21 01:24:25 neilk_: I seem to be able to get it working with both kinds at the same time. Jan 21 01:24:45 evening peoples Jan 21 01:27:18 TacticalJoke: yeah I don't get it. Is there some way for the device to reach out, over TCP, to tell adbd "hey I'm a device and ready to be debugged", as it does when you connect via USB cable? Jan 21 01:34:05 neilk_: I'm guessing you know about `adb connect :`? once you've done that, it kinda fits that description, though it's not automagic (I imagine that would require someone scanning the network / broadcasting to everything on the network) Jan 21 01:34:59 groxx: yes, or the device itself reaching out. Anyway my use case is weird :) Jan 21 01:36:16 yeah, though going to `settings -> developer -> adb over wifi` and having it just appear would be pretty awesome. and possibly pave the way for a device to be connected to multiple computers at once. Jan 21 01:36:46 neilk_: afaik, you have to manually use adb connect, when using adb over tcp Jan 21 01:36:49 groxx: It would be the biggest security hole evar though. Jan 21 01:37:24 neilk_: not really - there would still be the dialog that pops up when it connects Jan 21 01:37:35 I was just about to say that, yeah. there's still the approve-computer dialog. Jan 21 01:37:36 so the device would have to be unlocked, and the owner would have to accept the dialog Jan 21 01:38:03 of course, if you got like 10 dialogs at once it would be confusing. Jan 21 01:38:28 groxx, JesusFreke: yeah, and now that I think about it, the adb credentials are still there anyway, so someone on the LAN wresting control of the IP would not really change anything Jan 21 01:38:46 does volley always pull out new data whenever theirs new data in the database by itself Jan 21 01:38:53 like Jan 21 01:38:58 say from a api response Jan 21 01:39:20 yeah, I'm not sure how resilient the adb protocol is against some sort of reply attack, or MITM or such. Jan 21 01:39:23 replay* Jan 21 01:39:33 it's not much of an issue over adb Jan 21 01:39:38 neilk_: so you dont think it'd be a bit of a security risk, to have your phone let anyone in over WiFi to do anything to it? Jan 21 01:39:57 Napalm: after you've explicitly approved the computer for that purpose? no. Jan 21 01:40:31 groxx: you have to remember that is a recent addition Jan 21 01:40:51 sure. but "auto-search for adb-running computers from your phone" would be even newer. Jan 21 01:41:04 groxx: also i wouldnt want it to ask me all the fricken time Jan 21 01:41:14 haha, yeah, it could certainly be annoying :) Jan 21 01:41:17 Napalm: not *that* recent Jan 21 01:41:19 groxx: or my devices to announce their presence Jan 21 01:41:27 it's been around for.. a couple of years? Jan 21 01:41:29 wait, you think they don't already? Jan 21 01:41:32 Napalm: it is - I have a weird use case where I am controlling lots of Android devices, and it would be neat if they could initiate the connection when I added them to the network. Jan 21 01:41:56 JesusFreke: tell me its not recent when you started android-dev in 2008/9 Jan 21 01:41:59 lol Jan 21 01:42:07 Napalm: um.. :) Jan 21 01:42:10 phones frickin' _scream_ that they're on network X, and their name is Y, and they're running OS version Z. Jan 21 01:42:13 anyway, I'm very new to Android Jan 21 01:42:14 Napalm: I released the first custom rom for the g1 :p Jan 21 01:43:10 groxx: yes i know.. but you get my point.. two wrongs dont make a right or something Jan 21 01:43:24 three wrongs do Jan 21 01:43:28 neilk_: well why not make them do that? Jan 21 01:43:35 its wouldnt be hard Jan 21 01:43:41 largely. but a debug tool is pretty much designed to be a huge security hole with an "are you sure?" popup as the gatekeeper. Jan 21 01:43:58 I don't really see how making it optionally bigger is a wrong Jan 21 01:45:53 unrelated! is there a way to detect when your app resumes from a launcher resuming your app, or from the recent app list? but specifically NOT when your process has died and is being restarted from the recents list - that one I know - or from e.g. locking the phone and turning it back on. Jan 21 01:46:26 (replace "launcher resuming" with "any app bringing your stack to foreground without intentionally modifying it" as is appropriate. launchers aren't really special, I know) Jan 21 01:47:09 groxx: Activity.isRoot might help Jan 21 01:47:40 groxx: check for the launcher category on the intent? Jan 21 01:48:10 A launcher will typically send the MAIN action, with the LAUNCHER category. Jan 21 01:48:13 JesusFreke: is that set when your stack is already running? I don't think I've noticed it (and you don't get onNewIntent either) Jan 21 01:48:20 i could be misremembering though Jan 21 01:49:21 does anyone know what platform does xiamoi use Jan 21 01:49:23 is it android base Jan 21 01:49:43 not sure about the recents, but that should work if the user actually touches your app icon in the launcher Jan 21 01:50:03 at least, afaik Jan 21 01:50:22 JesusFreke: but only when your process is started. if it's already running, your task-root-intent is unmodified (afaik) Jan 21 01:51:36 groxx: ActivityManager.getRunningTasks() with ActivityManager.RunningTaskInfo.id and Activity.getTaskId() Jan 21 01:52:00 won't that just tell you _that_ you're running, not _why_? Jan 21 01:52:04 groxx: that should tell you enough to know if the task your in is yours Jan 21 01:52:16 ah Jan 21 01:52:22 that's not what I'm looking for though Jan 21 01:53:09 basically, say you have a sequence like 'starts app -> navigates to X -> navigates to Y -> hits home -> taps your app icon again'. how do you tell "taps your app icon again"? Jan 21 01:53:26 vs e.g. "resumed from recent apps list", or "turned off screen and turned it back on", or others? Jan 21 01:53:53 groxx: dont quote me but I think you can call Activity.setIntent and thats the Intent you'll receive in onCreate if your Activity has been terminated or comes back from the background after being killed.. where-as the intent would be LAUNCHER cat if started from the home launcher Jan 21 01:54:49 setIntent "replaces" the intent you get from getIntent, but only while your process is running. if it dies, and they resume from recents, there's no record of it :\ Jan 21 01:55:09 groxx: you tried it then? Jan 21 01:55:15 also it won't be "restored" to a launcher intent if they tap your app icon again. Jan 21 01:55:34 I've used setIntent. it doesn't do much. can simplify some logic in some cases, but there's not much more use. Jan 21 01:55:56 groxx: well the launcher will also attempt to start a new task thats the point Jan 21 01:56:06 if your app has died, yes. Jan 21 01:56:13 if not, it just resumes your stack Jan 21 01:56:20 even if its not dead. Jan 21 01:56:30 that's definitely not what it does on my phone. Jan 21 01:56:39 its the ActivityManagerService which "resumes the stack" Jan 21 01:56:53 ah, gotcha Jan 21 01:57:07 groxx: http://developer.android.com/guide/components/tasks-and-back-stack.html Jan 21 01:57:14 it talks about it in that doc, somewhere, i forget Jan 21 01:57:48 fwiw "manager" is only in there talking about the notification manager. I suspect it's somewhere else. Jan 21 01:58:01 but you've got me googling for a new phrase at least, thanks :) Jan 21 01:58:56 groxx google is ur friend Jan 21 02:00:28 groxx: https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/am/ActivityManagerService.java Jan 21 02:00:40 yeah, though the task stack stuff findable in google is pretty shallow. e.g. very few even mentioned FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, though it's kinda important. Jan 21 02:11:13 what's the weapon of choice for inserting a view into the action bar? menu? Jan 21 02:11:34 I'm using a toolbar. Jan 21 02:12:47 Napalm: thanks. I've read some of that & related, but I just did so again. tl;dr: it appears there's nothing. you're "just" resumed, animations are played (maybe that could be detected), but it seems there's no change to your state beyond that. unless that's deeper in the code than I just read :| Jan 21 02:13:31 knapper_tech: its already a ViewGroup.. just add a view. Jan 21 02:14:20 groxx: its an interesting problem.. let me just verify i have this correct Jan 21 02:14:24 remote debugging stopped detecting my device. on my device, i have dev ops on and usb debugging checked. when i revoke usb authorizations, an rsa key fingerprint pops up. but nothing happens after i click allow. what else should i try? Jan 21 02:14:52 groxx: you want to detect how your Activity was launched.. from recents.. from launcher and what else was it? Jan 21 02:15:07 lizzin, you check the box to always allow that fingerprint? Jan 21 02:15:40 i don't always get prompts on all devices when different programs want to use the device. Jan 21 02:16:20 Napalm: I'm _most_ interested in if it was resumed from the launcher. other things are mostly academic (so I'd love to, but it's not all that important). Jan 21 02:16:21 i have in the past Jan 21 02:16:33 Do you folks use full-screen mode in AS/IntelliJ? Just curious. Jan 21 02:16:40 knapper_tech: i have in the past. but i've also tried not clicking it after revoking Jan 21 02:16:44 I keep going back and forth. Jan 21 02:17:05 Napalm: and importantly, this is when your app is already running, and you're going _back_ to it. if the process is dead, you'll usually get a brand new stack or launched_from_history. Jan 21 02:17:15 TacticalJoke, nope, but I have 3 monitors. I completely pull the adb section out and have it full screen Jan 21 02:17:27 (the logcat section) Jan 21 02:17:30 TacticalJoke, If you use virtual desktops and have shortcuts to get to other windows for things like web browsing and moving files, full-screen is a few extra lines Jan 21 02:17:45 TacticalJoke: OSX full-screen mode? or is there something else AS does? Jan 21 02:18:43 groxx: I see View > Enter Full Screen in AS. Jan 21 02:18:47 MikeWallaceDev: Nice! Jan 21 02:19:26 TacticalJoke: yeah, OSX full screen. I say ick. I can't stand OSX's full-screen (though at least it's not broken for multiple screens like it was in lion) Jan 21 02:19:32 yeah, it goes well, but it's not perfect. Sometimes I do not want the adb window to open when I launch, but I don't know how to disable that... Jan 21 02:19:54 I wish we could simply hide the main menu bar. Jan 21 02:20:05 And allow it to temporarily open with Alt (or whatever). Jan 21 02:20:42 you can hide it... but no alt function Jan 21 02:20:58 MikeWallaceDev: yeah, same here - it's mostly annoying that it always appears :( Jan 21 02:21:09 How can I hide it? Do you mean the Full Screen thing? Jan 21 02:21:27 In that case, I do get Alt operation (but full-screen mode is kinda intense). :) Jan 21 02:21:35 It's really annoying when I have 3-4 projects open in different windows. Jan 21 02:21:56 You can hide it in the View menu Jan 21 02:22:10 I don't see that option. Jan 21 02:22:10 Napalm: part of the interest is because we want to behave differently for the app I work on, in some cases, and we don't want to wait for the OS to decide that the stack is old. we have more context than the OS. Jan 21 02:22:26 groxx, the View menu is where you can go into full screen mode Jan 21 02:22:42 Napalm: but beside all that, "tapped app icon" seems like a slightly different intent than "tapped app in recents list", and it makes some sense to treat them differently if you care. Jan 21 02:23:07 MikeWallaceDev: does that change the adb window popping up? Jan 21 02:23:23 no no.. just the full screen view Jan 21 02:23:37 MikeWallaceDev: I know the full screen mode, but i avoid it like the plague. largely because OSX is buggy with full-screen + modal dialogs. always has been, probably always will be:( Jan 21 02:23:37 i wish I knew how to stop the adb windoww Jan 21 02:24:02 You're successful if users look at your icon and think "I'd tap that". Jan 21 02:24:19 groxx, I don't use it either. I put the features that I use on the screen and live with it Jan 21 02:26:03 don't suppose anyone knows how to get rid of AS's "breadcrumb" thing above the editor? that eats up way too much space for my purposes :\ Jan 21 02:26:19 View > Navigation Bar. Jan 21 02:28:20 D: Jan 21 02:29:15 I think I got lost in the "customize toolbars and menus" thing. wtf is going on there. Jan 21 02:29:22 thanks TacticalJoke, that's a lifesaver Jan 21 02:29:38 :) Jan 21 02:30:58 They have a shortcut collision in the View menu on Windows: T is for Tool Windows, Toolbar, and Tool Buttons. Jan 21 02:34:11 knapper_tech: what else should i try to get this remote debugging working wtih chrome? chrome just says 'Pending authentication: please accept debugging session on the device.' but ive already clicked 'allow' Jan 21 02:35:43 lizzin, what platform? Jan 21 02:36:18 knapper_tech: osx chrome canary Jan 21 02:36:29 knapper_tech: 4.4 on the phone Jan 21 02:36:48 4.4.4 Jan 21 02:37:03 lizzin, I'm on Linux. Probably can't help much. Jan 21 02:37:15 what would you try in linux? Jan 21 02:39:46 lizzin: I'm not familiar with chrome debugging like you're trying to do, but I assume it uses adb Jan 21 02:40:09 lizzin: in which case, you'll want to read http://developer.android.com/tools/device.html Jan 21 02:40:10 I'd be looking at my permissions from udev (handles new usb connection permissions) and then I'd try an emulator. Jan 21 02:42:37 JesusFreke: reading that link now Jan 21 02:42:52 just seems odd that it has been working for days and then just stopped Jan 21 02:43:19 lizzin: is your android device unlocked? as in, the screen is on and the lock screen is not showing? Jan 21 02:43:37 yes Jan 21 02:44:07 yeah, not sure. I would first check if adb is working, and if not, troubleshoot that. Jan 21 02:44:31 ok Jan 21 02:52:12 am I the only one who feels like there is too much code in my app for the little that it does? Jan 21 02:57:37 lizzin: I assume you've gone through https://developer.chrome.com/devtools/docs/remote-debugging ? Jan 21 02:59:12 hesperaux: all the time. especially since lately I've been working on a thing that manages to cross through most of our old, horrible, fragile code that we've built everything on top of. Jan 21 02:59:33 it scares me. lol Jan 21 02:59:37 feels like a mess **** ENDING LOGGING AT Wed Jan 21 02:59:58 2015