**** BEGIN LOGGING AT Wed Dec 16 02:59:59 2015 Dec 16 03:15:03 yes pfn Dec 16 03:55:05 <_genuser_> ugh, java key value pair list Dec 16 03:55:14 <_genuser_> where key is repeatable. any recommendations? Dec 16 03:55:19 huh Dec 16 03:55:21 <_genuser_> so no hashset or hashmap. Dec 16 03:55:24 you mean you want a multimap Dec 16 03:55:36 guava has one, commons collection has one as well Dec 16 03:55:42 <_genuser_> I just want a List>; Dec 16 03:55:48 and qicr looks good enough on gingerbread, I think I'll ship it Dec 16 03:55:59 <_genuser_> multimap!! Dec 16 03:56:06 <_genuser_> let me google it further, thanks. Dec 16 03:56:34 <_genuser_> hmm, it's a guava thing? Dec 16 03:56:45 you can implement it yourself if you want Dec 16 03:57:01 a multimap is basically just a Map> Dec 16 03:57:12 <_genuser_> true that. all it takes is public class KV { String K; String V; }; List; Dec 16 03:57:15 where it creates List for you automatically Dec 16 03:57:52 <_genuser_> just thought in case there's a better one, why invent it. Dec 16 03:59:38 multimap Dec 16 04:00:08 <_genuser_> but that requires guava. Dec 16 04:00:35 <_genuser_> I'm bloating my app too much adding lot of extra libs already Dec 16 04:00:46 then copy and do it yourself Dec 16 04:00:58 <_genuser_> yeah, that sounds better. Dec 16 04:01:22 * pfn shrugs Dec 16 04:01:24 <_genuser_> having run out of space on my device a lot recently, I'm starting to realize 14GB is just not "enough" for all the apps one might want. Dec 16 04:01:27 I wouldn't write java wouldn't using guava Dec 16 04:01:41 or a reasonable facsimile of what guava provides Dec 16 04:02:40 Do you guys/gals include the .idea in the .gitignore? Or do you just keep it there Dec 16 04:03:08 <_genuser_> well, I could eliminate repeatable key requirement for now and just use a hashmap. Dec 16 04:03:24 <_genuser_> and revisit the issue later when a repeatable key is actually needed. and determine how much guava adds to the final apk size. Dec 16 04:03:27 <_genuser_> and if it's needed. Dec 16 04:06:53 gopar, ignore .idea, .gradle, *.iml, and build Dec 16 04:09:37 <_genuser_> my .idea folder seemed small, so I didn't ignore it. Dec 16 04:09:59 <_genuser_> build/* is ignored. .jars etc are all ignored. unless it's an explicitly added jar and not gradle added. Dec 16 04:10:12 <_genuser_> man, my var and class names are all over. Dec 16 04:10:42 just finished code academy intro to Java, wish I could have more practice without having to pay. Any other websites you guys know of? Dec 16 04:10:44 <_genuser_> class names are all ProperCaseClassNames, some vars are camelCase, some vars are still mCamelCase and some are ALL_CAPS_VARS Dec 16 04:11:04 if not Im just gonna go back to reading Java a beginners guide Dec 16 04:11:29 <_genuser_> BenisBoy: pick an app and start writing it. in the process googel for what you need. you'll remember it much more. you'll learn a well rounded set of stuff that deals with multiple aspects of the apps. Dec 16 04:11:38 <_genuser_> if you just want to keep learning for loops, just google for java tutorials. Dec 16 04:12:01 thanks genuser, will do. Dec 16 04:12:31 <_genuser_> reading is pointless after a while because you understand it intellectually but without practice it either goes out or you never really quite place "how you will actually use it" Dec 16 04:13:03 <_genuser_> just to be clear, those are IMHO. Dec 16 04:27:39 CedricBeust i guess sourcetree is still alive; got an update (2.1) Dec 16 04:50:49 Hi all. This is kind of a dumb question, but what should I name my Espresso tests? Is there a "best practice" style of test naming? Dec 16 04:52:28 what to try if my android phone isn't listed when I do `adb devices`? Dec 16 04:53:20 does your computer recognize the phone as plugged in? If not try a different usb port or reset the driver Dec 16 04:54:19 liuwenhao: don't think the computer regonizes it. It's providing power to it though. Dec 16 04:54:35 I'm on osx Dec 16 04:55:00 Hmm. Might be a driver problem. I don't use mac though so I can't really help Dec 16 04:55:55 morenoh149 should just work on osx. maybe try another cable Dec 16 04:56:08 Depends on the phone too, at least on Windows. i.e. I have to use Samsung drivers for my GS5 on Windows because the regular Android drivers don't work with the phone Dec 16 04:56:09 try 'adb kill-server' Dec 16 04:56:28 luckily there are no drivers for osx Dec 16 04:56:36 Oh, I didn't know that Dec 16 04:56:52 g00s: I killed the server and had it restart. still no devices listed. Dec 16 04:57:04 and I'm 90% sure developer mode is enabled on the phone Dec 16 04:57:41 morenoh149 go into Settings app => Developer Mode -> USB Debugging=true Dec 16 04:58:00 adb get-state returns unknown lol Dec 16 04:58:17 I have `developer options` Dec 16 04:58:23 ya Dec 16 04:58:59 yeah usb debugging is true Dec 16 04:59:24 try another cable if you can Dec 16 05:00:36 quick question, gradle plugin 1.5 generates image drawables from vector drawables or no ? Dec 16 05:00:45 yes Dec 16 05:00:50 great Dec 16 05:00:53 thank you g00s Dec 16 05:01:19 works well, i replaced all my pngs with vector drawables from the material icon page Dec 16 05:01:54 <_genuser_> HashMap. new obj; map.put(key, obj); new obj again; map.put(key,obj); Dec 16 05:02:17 <_genuser_> would you expect the older instance to be GC'd after a while? Dec 16 05:02:22 ugh it was the wire Dec 16 05:02:43 <_genuser_> my understanding of java's GC is that if an obj doesn't have any other references, it should be GC or candidate for GC and go thru the process. Dec 16 05:03:06 <_genuser_> g00s: ugh material design. have you also moved to snackbar instead of toasts? Dec 16 05:03:15 sure Dec 16 05:03:26 * _genuser_ hits g00s a little bit. Dec 16 05:03:39 <_genuser_> g00s: don't snackbars just move you GUI up and down ? Dec 16 05:03:40 snacks can have actions, and they can stay until swiped to dismiss Dec 16 05:03:45 no reason to use toasts Dec 16 05:04:12 <_genuser_> do they always draw on the activity? or can they be like toasts independent of activity UI Dec 16 05:04:26 O.o they float up and then float down Dec 16 05:04:34 you anchor them to a view Dec 16 05:04:54 <_genuser_> ok, when I tried it with a "blank activity" in AS projects, if just moved the floating button up when it showed. and I was like oh does it fidget the GUI all over..? Dec 16 05:05:16 no, just moves FAB up if they are both in CoordinatorLayout Dec 16 05:05:26 <_genuser_> so it seems like they have more benefit to them. Dec 16 05:05:40 _genuser_, snackbars are legit Dec 16 05:05:41 i only used it once Dec 16 05:05:45 (FAB) Dec 16 05:05:52 <_genuser_> can you show them on TOP of existing UI and then have them disappear. Dec 16 05:06:06 of course, thats what they are supposed to do Dec 16 05:06:06 <_genuser_> or swiped to make them go away even faster? Dec 16 05:06:20 <_genuser_> ok, sounds like a plan. I'll try to look into moving my toasts to snackbars. Dec 16 05:06:29 <_genuser_> I see google has a sample implementation of snackbars now. Dec 16 05:06:41 <_genuser_> months ago, people were using third party libs to implement snackbars. Dec 16 05:08:33 Snackbar.make().show() _genuser_ Dec 16 05:09:00 <_genuser_> drose379: yeah, I see it in the skeleton code for a blank project. Dec 16 05:09:09 What's the best way to wait for data when doing Espresso tests? My tests are failing because the clicks are happening before my JSON data loads in my RecyclerView Dec 16 05:09:14 <_genuser_> months ago it wasn't there. and people are using third party libs and all taht just to have snackbars. Dec 16 05:09:26 Right, I was one of the people using the third party libs Dec 16 05:09:27 :) Dec 16 05:09:29 liuwenhao: you're doing it wrong Dec 16 05:09:38 <_genuser_> drose379: heh, so you remember it well. :) Dec 16 05:09:43 you should not use real service when testing data Dec 16 05:09:44 I know I'm doing it wrong, that's why I'm asking Dec 16 05:09:46 Later _genuser_ Dec 16 05:09:59 What should I do to mock the data? Dec 16 05:10:00 just have two DAO classes / repositories Dec 16 05:10:01 <_genuser_> drose379: this was my point from the beginning. Instead of having just a design doc. google shoudl have a base implementation for most UI elements. Dec 16 05:10:27 liuwenhao: https://www.youtube.com/watch?v=vdasFFfXKOY Dec 16 05:10:29 watch this Dec 16 05:10:33 and you will know Dec 16 05:10:38 Thank you, I will watch this now :) Dec 16 05:11:10 is it me, or there's like everyone discovered MVP, MVVM in android world *just now* Dec 16 05:13:19 gordon_ so funny, MVP is almost 20 years old Dec 16 05:13:30 <_genuser_> mvp? Dec 16 05:13:36 <_genuser_> model view presenter? Dec 16 05:13:42 almost older than me -.- Dec 16 05:20:20 <_genuser_> argh, I can't try my java code as just java. Dec 16 05:20:26 <_genuser_> instead of having to run the entire app. Dec 16 05:23:18 what frameworks ya'll use for testing? Dec 16 05:23:30 <_genuser_> they're called users. Dec 16 05:24:38 hm, is there an easy-ish way to hide a row in GridLayout? Dec 16 05:25:33 g00s: I know ;) Dec 16 05:25:59 gopar: espresso, junit Dec 16 05:26:08 junit for unit testing, espresso for functional testing Dec 16 05:37:11 man, I wish there were a way to inject viewserver without code changes Dec 16 05:38:37 google is very slowly getting towards better implementation details - or at least, making libraries to do some of the common implementations Dec 16 05:38:50 almost like they figured out giving a bunch of code nerds random design docs doesn't result in elegant apps :P Dec 16 05:41:42 cursor.query(...) executes the query? Dec 16 05:42:00 pfn: I wish that DI would be easier that dagger Dec 16 05:42:07 like... macwire in scala Dec 16 05:42:32 then use macwire Dec 16 05:42:40 it's java Dec 16 05:42:44 ... Dec 16 05:42:48 dagger is about as easy as it gets Dec 16 05:43:07 <_genuser_> DI? Dec 16 05:45:03 pfn: yes, but it has some boilerplate Dec 16 05:46:19 http://developer.android.com/reference/android/content/ContentResolver.html#query%28android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String%29 should this be wrapped in a try catch for safety? Dec 16 05:46:58 <_genuser_> who still runs eclipse? Dec 16 05:47:02 I just ran this on a device and got an `unable to open database file` code 14 Dec 16 05:47:31 gordon_, everything in java is boilerplate, you should know that... Dec 16 05:49:09 i remember that funny paper months back that claimed most java code doesn't do anything :P Dec 16 05:51:04 http://developers.slashdot.org/story/15/02/11/1744246/your-java-code-is-mostly-fluff-new-research-finds Dec 16 05:59:49 this line is causing me some issues https://github.com/rt2zz/react-native-contacts/blob/master/android/src/main/java/com/rt2zz/reactnativecontacts/ContactsManager.java#L124 Dec 16 06:00:06 I think it does immediately attempt to perform the query and that fails on my device Dec 16 06:01:16 morenoh149, do you have permission to read contact? Dec 16 06:01:20 contacts? Dec 16 06:01:37 <_genuser_> does anybody do all the hard lifting classes in java project alone instead of having to run it in an android app over and over again? Dec 16 06:02:05 what? Dec 16 06:02:36 alex_PP: I have requested read and write permissions Dec 16 06:02:56 _genuser_, you can run junit inside AS to exersise stuff like that Dec 16 06:02:59 android.permission.READ_CONTACTS Dec 16 06:04:07 alex_PP: unless photos are in a different region? google around for the error brings up a lot of sqlite conversations Dec 16 06:04:42 morenoh149 also, safe to say most here dont use react native Dec 16 06:05:15 right. but it's just android java development. I'm a noob on that. Dec 16 06:05:56 well, what's in the stack trace? Dec 16 06:08:28 https://dl2.pushbulletusercontent.com/oj0ZNXwifLzPWPJC1mVS3eYOzwkIqoNm/Screenshot_20151216-003447.png Dec 16 06:08:56 it's the contentresolver.query() line that blows up Dec 16 06:09:06 I could wrap it in a try catch Dec 16 06:13:48 maybe image reading is under the android.permission.READ_EXTERNAL_STORAGE permission Dec 16 06:16:25 <_genuser_> alex_PP: hmm, I'll have to research that. I want to code and just run data parser classes, and play on dynamic class creation. so I found it easy to just use eclipse and a java project. Dec 16 06:19:48 <_genuser_> so passing a classname as com.company.classname instead of "com.company.classname" Dec 16 06:20:35 <_genuser_> without the double quotes, what should I make my parameter type in the method signature? Dec 16 06:23:13 _genuser_ time to learn java Dec 16 06:23:56 #java can help you with that Dec 16 06:27:44 * anyhowput slaps anyhowput around a bit with a large fishbot Dec 16 06:28:20 anyhowput cool, slap CedricBeust Dec 16 06:28:39 why :p Dec 16 06:28:43 What did I do now? Dec 16 06:28:46 no bots allowed :D Dec 16 06:29:07 Who's a bot? Dec 16 06:30:16 <_genuser_> g00s: just needed to google. :) Dec 16 06:30:51 <_genuser_> g00s: too many programming languges. I'm forgetting intricacies of any of them. it's just a blur now. Dec 16 06:30:56 <_genuser_> g00s: not too good for the resume. Dec 16 06:30:57 got a log https://gist.github.com/morenoh149/0b5bf5d91e3b54eb566a Dec 16 06:32:00 <_genuser_> g00s: tbh, the entire dynamic creation was a pice of a crap idea. I needed to implement an interface anyway (or base class). and I need to create the object anyway. so now I just instantiate and pass the interface in. Dec 16 06:41:44 <_genuser_> ah, mr. joke, you're in the channel. Dec 16 06:42:23 looks like I'm not closing a cursor properly https://gist.github.com/morenoh149/0b5bf5d91e3b54eb566a#file-log-txt-L4847 Dec 16 06:42:59 Mr. Bond. I knew we'd meet again. Dec 16 06:43:45 <_genuser_> heh, need to code some boring stuff. Dec 16 06:53:42 what would you suggest for a new phone? Dec 16 06:53:59 I just got a sony z5 Dec 16 06:53:59 g00s: here? Dec 16 06:54:03 I liked my galaxy s4 and s5. s6 has no removable battery and I think thats a dealbreaker Dec 16 06:54:07 hey thepoosh Dec 16 06:54:17 nice enough, if you can avoid the sony stuff Dec 16 06:54:19 touchwiz and all the other samsung BS is not worth it Dec 16 06:54:25 you managed to ruin your s4 battery before purchasing an s5? Dec 16 06:55:15 nope Dec 16 06:55:23 but the s5 battery tanked in less than a year Dec 16 06:55:28 hello Dec 16 06:55:29 second one is doing well Dec 16 06:56:03 samsung galaxy usally has pretty beefy hardware, right? Dec 16 06:56:08 im having a weird problem with two buttons, i have them in a horizontal linear layout but when i press them the shadow get cut off but the bottom edge of the linear layout, how can i avoid that? Dec 16 06:56:30 I don't wanna deal with samsungs bloatware anymore haha Dec 16 06:56:43 dunkel2: clipChildren, or something similar Dec 16 06:56:58 I'm waiting for a cyanogenmod build for mine Dec 16 06:57:16 so I can give it a bloatarectomy Dec 16 06:58:01 clipchildren to false on that linear layout keeps getting the same result Dec 16 06:59:15 clipToPadding? Dec 16 07:01:58 g00s: sup? first day in work in a week Dec 16 07:02:22 been sick Dec 16 07:02:37 at least I got to see return of the jedi yesterday Dec 16 07:02:53 still haven't made progress on my RecyclerView project Dec 16 07:03:09 trying to understand the lack of onItemClickListener Dec 16 07:04:12 thepoosh man flu ? Dec 16 07:04:45 yeah RV is ... different :D Dec 16 07:05:17 thepoosh do you guys use nested fragments ? i'm giving it a shot, don't see any issues yet ... which seems surprising Dec 16 07:05:24 g00s: we do Dec 16 07:05:36 there might be lifecycle issues Dec 16 07:05:36 thepoosh any words of wisdom on that ? Dec 16 07:05:40 but all in all it's ok Dec 16 07:05:50 getCChildFragmentManager Dec 16 07:05:53 that's about it Dec 16 07:06:01 ani't no thing Dec 16 07:06:04 *aint Dec 16 07:06:27 thepoosh you dynamically create them -- instead of putting in XML right? Dec 16 07:06:33 true Dec 16 07:07:53 thepoosh see https://www.reddit.com/r/androiddev/comments/3wt0ml/set_a_click_listener_to_a_recyclerview_antonio/ Dec 16 07:07:57 comment hbrc Dec 16 07:11:42 alex_PP: it worked, i had to add both to all the linear layout parents Dec 16 07:11:44 thaks Dec 16 07:18:19 http://pastebin.com/cnpAvwGz I was wondering if anyone had a second to help me. I think I have something simple that I did wrong but just cant see it :\ Could use a fresh pair of eyes. I just started programming android/java/sqlite in general so I am not super knowledgable into some of the programming and learning as I go Dec 16 07:23:40 Akayllin: don't use rawQuery like that Dec 16 07:23:43 use bind args Dec 16 07:24:28 SELECT * FROM items WHERE item_backpack = ? AND item_category = ? Dec 16 07:25:03 rawQuery(sql, new String[]{String.valueOf(backpackID), category}); Dec 16 07:25:11 should I never use rawQuery? Dec 16 07:25:20 The guide video I watched used them :\ Dec 16 07:26:30 no, you can use rawQuery, but use the args parameter Dec 16 07:29:44 :DDDDDDD omg it runs Dec 16 07:29:50 it doesn't instacrash <3 Dec 16 07:31:46 I guess I need to go research sql query types and different query methods for the SQLiteDatabase class. Thanks alex_PP Dec 16 09:43:20 hey any robolectric dudes here? Dec 16 09:43:41 i'm trying to shadow the estimote sdk for teting Dec 16 09:43:56 just because it doesnt work as it is Dec 16 10:14:59 Hello guys, I created a simple app project in Android Studio. Since it uses standard Theme.AppCompat.Light.DarkActionBar, I want to change to a dark theme but I couldn't find a dark theme. So how to solve that without figuring out all the colours and add all kind of fields in styles.xml to get a correct theme? Dec 16 10:18:11 just dont use .Light Dec 16 10:18:48 Theme.AppCompat is the "dark" root and Theme.AppCompat.Light is the "light" root Dec 16 10:46:20 hi, I send a GCM notification from my server and get the 200 response. In my android app, onReceive() methods gets executed but the method onMessageReceived(String from, Bundle data) does not. I get this error: W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent {act=com.google.android.c2dm.intent.RECEIVE pkg=com.protos.tomas.miapp (has extras) } Dec 16 10:55:53 taspat, wrong permission definition? Dec 16 11:01:43 i followed this: https://github.com/googlesamples/google-services/blob/master/android/gcm/app/src/main/AndroidManifest.xml Dec 16 11:02:58 Follow the actual documentation. Dec 16 11:06:15 Mavrik: I did Dec 16 12:16:07 Ola gang Dec 16 12:54:53 Hey guys sorry for the stupid question (I've never made anything in android before). I have two relatively simple files: https://gist.github.com/Renari/df91d32fcf0d03064c13 I have android:onClick="installButtonClick" added to the relevant button and a method with that name in MainActivity.java however when I click the button the method is not being called. Does anyone know what I did incorrectly? Dec 16 13:06:56 how is it possible to use the animation for when a list view element is clicked down for a custom list view element layout Dec 16 13:07:03 the animation just disappears Dec 16 13:07:17 also I would like to know how to do this for a recycle view too, if possible Dec 16 13:15:46 Renari: within onCreate(), add the following: Button installButton = (Button)findViewById(R.id.Install); Dec 16 13:18:54 burmat, thanks I actually think it's something wrong with the emulator Dec 16 13:19:05 Since I tried in a 3rd party emulator and it works fine. Dec 16 13:21:38 regardless, you should declare your button in onCreate() - and consider using a button listener like the following: http://pastebin.com/RiA4PZZf Dec 16 13:21:49 Alright, thanks. Dec 16 13:24:05 enzlbtyn: yes Dec 16 13:33:17 I assume by yes you mean it's possible? How S: Dec 16 13:43:42 whats it called when you use a sledge hammer approach for a job that only required a little hammer? Like for instance... rebuilding, requiering a db, and creating a new adapter, when all you should call is notifyDataSetChanged? Dec 16 14:03:53 eghdk, its called ¨bad code¨: p\ Dec 16 14:03:57 :p Dec 16 14:14:52 danijoo: There has to be a phrase though right? Light, atomic bomb solution or something. I've heard of it, I just can't find the words. Dec 16 14:15:42 fubar'd Dec 16 14:24:30 Hey guys, so im querying the devices local db, and when I call getCount() on the Cursor, I get 1, but then when I loop over the cursor to get the value, it does it a ton of times Dec 16 14:24:32 Cant see why Dec 16 14:24:51 http://pastie.org/private/fdnxlvdi4xogv0e7jbu3qq Dec 16 14:25:32 Ohhh Dec 16 14:25:35 I think I see Dec 16 14:26:08 why are you going to position -1?? Dec 16 14:26:23 So moveToNext() gets my first value Dec 16 14:26:39 Otherwise, first value gets skipped Dec 16 14:26:47 drose379, replace results.moveToPosition(-1) with results.moveToFirst() Dec 16 14:27:12 No because then I do while moveToNext() and it skips my first item Dec 16 14:27:30 With -1, it starts at -1, then moveToNext brings the cursor to the first item Dec 16 14:27:33 not in a do/while Dec 16 14:27:50 This is just a while Dec 16 14:28:11 http://pastebin.com/zKMZ44UY Dec 16 14:28:28 im not sure if getCounts() is ok without moveTOFirst() Dec 16 14:28:33 never tried it Dec 16 14:28:49 Basically the same as what I'm doing Dec 16 14:30:15 drose379, no. Dec 16 14:30:24 It does the same job Dec 16 14:30:57 hm. you might be right Dec 16 14:31:32 Yes I've been doing it this way for a while Dec 16 14:31:38 moveToPosition( -1 ) Dec 16 14:31:50 Then while( moveToNext() ) <--- Moves to first value Dec 16 14:32:09 Where as moveToFirst() Dec 16 14:32:20 Then while ( moveToNext() ) <--- Moves to _second_ value Dec 16 14:34:14 doesnt look a nice imo but if it works.. Dec 16 14:34:24 :) Dec 16 14:34:33 Just what makes sense to me Dec 16 14:38:00 Wow, computer just froze and I lost my entire file I Was working on Dec 16 14:47:10 Guys um, when adding things like colorPrimary to my style, since my minSdk is 8, I'd have to add AppCompat's, should I only add AppCompat's or both AppCompat's and the one prefixed with android: ? Dec 16 14:48:59 OverCoder, only appcompat. the other one will have no effect if you are using classes from appcompat Dec 16 14:49:00 hi Dec 16 14:49:01 drose379, I think it only happens in Android Studio, if you use that anyways, because I had to force shutdown my laptop while I was using Android Studio.. and.. the next launch was like it wasn't launched anytime before Dec 16 14:49:07 danijoo, Ok, thanks Dec 16 14:49:10 but it also doesnt hurt to declare them :) Dec 16 14:49:15 I have an app who retrieves some links from a website Dec 16 14:49:28 right now i am fetching them and saving them on an array Dec 16 14:49:34 but it takes a few seconds Dec 16 14:49:46 yapme, How many seconds? Dec 16 14:49:50 7 Dec 16 14:49:59 Wow, that's too much, how do you convert the data? Dec 16 14:50:23 i.e. what kind of data is transmitted and how do you convert them to arrays Dec 16 14:50:24 it isn't too much because i'm fetching the link and then I am fetching another link from the first one Dec 16 14:50:47 the thing is I don't need to fetch them all at once, just the one the user clicks, who takes less then a second Dec 16 14:51:03 Ok and where's the problem now? Dec 16 14:51:14 these tasks are performed on an Asynctask Dec 16 14:51:50 so how do i fetch the first links and then comeback, when demanded, to fetch the one that the user wants? Dec 16 14:52:31 yapme, um, when a user demands for a link to be fetched? upon press of a button? Dec 16 14:52:34 is it a good idea to have another asynctask, or even possible? Dec 16 14:52:40 yes OverCoder Dec 16 14:53:16 Alright so, there we go, how many sublinks are there in a link? Dec 16 14:53:31 right now I fetch all the necessary information when the app starts and then i provide the list, so when the user clicks it it already has the info Dec 16 14:53:48 what i want to do is provide the initial links but only get the second one when the user choses the item from the list Dec 16 14:54:12 so they don't have to wait those 7 seconds, who will be more if I want to increase my data Dec 16 14:54:28 there are 2 levels of links Dec 16 14:54:37 IMHO, if you're like, using your own API or something, try to merge all the info into one file to be transmitted all at once, if it's small sized, otherwise, you'd have to make stuff downloaded on demand, it's easy but requires some thinking Dec 16 14:54:41 I store them on an array and then for each element of the array I will fetch another link Dec 16 14:55:39 anyone ever used the toolbar/actionbar for contextual help? e.g. display a help icon when a user selects an input field, if they click on the help icon they get a floating 'balloon' with some help text Dec 16 14:56:13 yapme, I think you'd have to use TreeMap or something similar, although I haven't personally used TreeMap Dec 16 14:56:56 Because your data is like a tree, a link contains array of links, each containing another array of links, right? because if like, each base link only contains one sublink, it'd be easier to implement Dec 16 14:57:38 I thought of using two asynctasks because these kinds of operations must be performed on an asynctask Dec 16 14:57:44 however I don't know if this is a good practice Dec 16 14:58:57 I don't think so, without any prior knowledge about that, but note that AsyncTasks run one per time, if you want them to run on different threads, you'd need to use .execute rather than .doInBackground Dec 16 14:59:08 I think there's some extra work for API >= 11 Dec 16 15:00:59 yapme, The first answer is what do you need, a Tree http://stackoverflow.com/questions/3522454/java-tree-data-structure/3522481#3522481 Dec 16 15:02:04 Oh wait I think it needs some more modification to fit exactly your needs Dec 16 15:02:15 brb Dec 16 15:15:33 Hi! My emulator in android studio is very slow, even though I have downloaded plugins to make it faster. Anyoen know how I can get it to be faster? Dec 16 15:16:15 The emulator chugs, might be hardware related Dec 16 15:16:24 use the x86 image Dec 16 15:16:32 it's always reasonably fast for me Dec 16 15:16:58 pfn: is that a plugin? Dec 16 15:18:29 Is there something I should know about reusing Notification IDs or something more in general? Here is my situation. I am using Gimbal and when I get to a certain position it should notify me. Problem now is I only seem to get 1 notification out of the 4 I need to see... Any idea why? I have an idea that it is something to do with the notification setup Dec 16 15:22:30 pfn: I don't find any x86 emulator accelerator(HAXM) here: http://puu.sh/lXJK2/f15b4211bd.png Dec 16 15:23:34 x86 images are.. images Dec 16 15:24:12 check emulator logs in AS to check if your haxm is working Dec 16 15:26:10 squirrel: i get this "E/Internal: device 'emulator-5554' not found" Dec 16 15:39:58 Zajt, use any of the atom. x86 images Dec 16 15:40:13 the arm images will not be fast Dec 16 15:41:02 Anybody here good at Headsup Notifications? Dec 16 15:42:17 can one be good or bad on that? Dec 16 15:47:01 squirrel: Well one can know it better then others Dec 16 15:48:06 correct me if i'm wrong but you make that kind of notification using a single flag and you can tweak nothing whatsoever about it Dec 16 15:48:33 If you use same ID for a new notification it'll overwrite the previous one. Dec 16 15:48:37 That's why there are IDs :) Dec 16 15:50:22 hi Dec 16 15:50:35 how i can simulate elevation in toolbar in pre lolipop devices? Dec 16 15:51:58 you don't Dec 16 15:54:58 you can layer the toolbar over an image view with a shadow image Dec 16 15:55:09 but that's shitty Dec 16 15:56:17 yes, i see Dec 16 15:56:36 i simulate with gradient and is not good Dec 16 15:58:49 Mavrik: Ok so I should not be worried about it being unable to fire because of some ID error ? Dec 16 16:03:57 s Dec 16 16:04:58 Mavrik: Or that if 1 ID is in use and busy being displayed... will it affect the next incoming Notification? Dec 16 16:10:36 Ugh this line keeps on Disconnecting and so I miss most of what people reply >.< Dec 16 16:12:09 man, toying with my old droid1, it's so cool, heh Dec 16 16:12:21 the old ass version of android is a pos, but otherwise it's cool, heh Dec 16 16:14:35 The keyboard is kind of neat still Dec 16 17:18:39 today I learned that robolectric's ShadowDateFormat only implements 3 out of like 20 methods Dec 16 17:19:13 and by default a "looseSignatures" option is enabled that makes it select a random method with the same argument types if the implementation is missing Dec 16 17:19:45 and that is why DateFormat.getBestDateTimePattern("M/d") returns "h:mm" in robolectric Dec 16 17:22:13 nice Dec 16 17:23:58 what is the root folder that getAssets looks in? Dec 16 17:24:09 assets Dec 16 17:24:18 is there a way to say android:layout_width="@dimen/width" , where width is a resource in dp or "match_parent" Dec 16 17:24:36 -1dp etc aren't reliable Dec 16 17:24:38 danijoo: Is that res/assets? Dec 16 17:24:45 noahmg123, yes Dec 16 17:24:51 danijoo: thank you. Dec 16 17:25:25 eh guess i'll have to make a style Dec 16 17:27:52 huh? Dec 16 17:28:00 -1px Dec 16 17:28:09 if you need to match the constant Dec 16 17:28:10 any robolectric fans? Dec 16 17:31:29 pfn is -1 for match_parent a reliable wau to do? would teh constant change? i dont see it documented anywhere Dec 16 17:31:39 ugh i messed that up Dec 16 17:33:16 i have a feeling, this will crash on some OEM's device, somewhere Dec 16 17:33:40 Nick-S, just haters :P Dec 16 17:33:54 its a sin to hate robolectric Dec 16 17:34:20 my scenario is so hard to reproduce on the phone/emulator Dec 16 17:34:38 hey guys, anyone tried out scoop from lyft? Dec 16 17:34:50 takes AGES, there is no substitute to hitting the run button and recreating it to get to those lines again Dec 16 17:35:06 the constant will not change Dec 16 17:35:51 it cannot change Dec 16 17:38:11 my question regarding scoop is how to keep instance of viewcontroller in backstack, so i make router.goTo(screen) and then i try router.goUp() or similar and it just recreates old one, so i have to wait for response from server .. does that mean that i need to cache everything, but that is not a problem, but if i have a recyclerview, how to return to old position? :) Dec 16 17:38:42 using bitch-x makes u feel mor3 lik3 a hAcker :) Dec 16 17:43:18 nice dan lew wrote about this http://blog.danlew.net/2015/01/06/handling-android-resources-with-non-standard-formats/ Dec 16 17:53:29 would be cool if the OS got this as a platform feature like f.lux http://officialandroid.blogspot.com/2015/12/silent-night-with-night-light.html Dec 16 17:54:05 hi guys, is there a way to write back an image decoded using BitmapRegionDecoder? i.e., back onto the same position? Dec 16 17:55:42 pfn aha, plaid does that too. nick butcher approves Dec 16 18:01:18 avinashrbhat, not if the src/dest is in your apk Dec 16 18:01:23 to sd card: yes Dec 16 18:01:39 yes the file is in the sdcard itself. Dec 16 18:01:46 g00s, everyone's been doing that for years Dec 16 18:01:54 danijoo, how? Dec 16 18:02:29 avinashrbhat, write the bitmap to an output strean Dec 16 18:02:31 stream Dec 16 18:03:30 danijoo, if i do that shouldn't it write as a new image? Dec 16 18:03:41 not if you override the old file Dec 16 18:04:30 but the image is not loaded completely, right? so shouldn't it write over the whole image? Dec 16 18:05:09 I dont get what you mean Dec 16 18:07:48 danijoo, what I want is to add a simple text to an image's bottom right corner, but as the image may be large file, I consider to decode only a part of the image, namely the lower right corner, I can read it using the BitmapRegionDecoder. but now after changing the bitmap I need to write the image back to the same position. This is the step that I cannot figure out. Dec 16 18:08:30 oh. hm no idea Dec 16 18:08:36 maybe just read/write the whole image Dec 16 18:09:09 danijoo, and get a OOME? no way :-) Dec 16 18:09:27 that idea went out of the window couple of hour ago Dec 16 18:10:21 I am even seriously considering NDK also, but still it feels like reinventing the wheel Dec 16 18:15:48 that’s a poor reason for using NDK Dec 16 18:15:56 Renderscript might be a better fit Dec 16 18:16:13 s73v3r, oh i didn't think of that. Dec 16 18:21:48 How do I change the adapter of a ViewPager? Dec 16 18:21:54 I get weird artifacts Dec 16 18:50:18 once again, android seems to find ways to make thigns that should be easy as all hell difficult... Dec 16 18:50:45 i changed the color of my navigation bar... but now the drawer menu is invisible (since i guess the default image for the drawer is white too) Dec 16 18:50:58 im trying to change it to a local resource and for the life of me i cant get it to work. Dec 16 18:55:27 jeremiedenoob: background color or text color? Dec 16 18:55:43 both Dec 16 18:55:59 the background color (primary) is white, and secondary (text) is green Dec 16 18:56:12 i tried changing accentcolor to green but it doesnt work. Dec 16 18:56:41 I know nothing about this Dec 16 18:56:52 but, I've found: Dec 16 18:56:57 http://stackoverflow.com/questions/18759798/navigation-drawer-change-color Dec 16 18:58:55 http://stackoverflow.com/questions/32042794/changing-text-color-of-menu-item-in-navigation-drawer Dec 16 18:58:59 yeah... ive found and tried (and failed) many similar links Dec 16 18:59:16 jeremiedenoob: have you looked at logcat? Dec 16 18:59:23 yes, nothing Dec 16 18:59:55 jeremiedenoob: you could put some strings in the code Dec 16 19:00:21 http://jgilfelt.github.io/android-actionbarstylegenerator/ Dec 16 19:00:24 this is nice though Dec 16 19:00:27 in order to print variables values in logcat Dec 16 19:00:27 maybe ill try that Dec 16 19:00:31 into Dec 16 19:00:50 jeremiedenoob: I'veva support question too Dec 16 19:00:55 if possible Dec 16 19:01:03 -v Dec 16 19:01:13 *i've got Dec 16 19:01:50 jeremiedenoob: I've removed a soft key from navbar Dec 16 19:02:29 by changing the navbar layout .xml file, in SystemUI.apk Dec 16 19:03:18 jeremiedenoob: but it's not enough , rebooting, systemUI crashes Dec 16 19:03:58 I must also edit related java .class code Dec 16 19:04:55 jeremiedenoob: I've tried dex2jar to extract .class files from classes.dex file, in .apk package Dec 16 19:05:34 now, I can get to these .class files, but I can't open with a text editor Dec 16 19:06:26 jeremiedenoob: I think I should decode them before opening them with a text editor Dec 16 19:06:40 lol Dec 16 19:06:52 im confused why you are doing this Dec 16 19:07:05 but I don't know how to make them readable by a text editor Dec 16 19:07:35 dex 2 jar doesnt always create something legible... Dec 16 19:07:38 is this your app? Dec 16 19:07:59 if proguard is enabled... Dec 16 19:08:03 jeremiedenoob: as described before, changing navbar layout .xml file is not enough, because systemUI crashes Dec 16 19:08:29 jeremiedenoob: no, I'm editing systemUI.apk Dec 16 19:08:33 https://software.intel.com/en-us/multi-os-engine Dec 16 19:08:40 interesting, another robovm/xamarin alternative Dec 16 19:08:53 it's located in /system/app Dec 16 19:09:08 jeremiedenoob: proguard? Dec 16 19:09:12 those never work properly... Dec 16 19:09:26 proguard, as in the scrambler so that you cant just decompile the APK. Dec 16 19:09:58 btw, I've to change also java .class code, to remove completely a softkey from the navbar Dec 16 19:10:10 jeremiedenoob: ok Dec 16 19:10:47 (screenshot soft key) Dec 16 19:12:21 see #android-root Dec 16 19:12:32 if you're editing systemUI.apk, out of the scope of this channel Dec 16 19:13:04 pfn: I thought #android-root guys send me to #android-dev Dec 16 19:13:08 and so on... Dec 16 19:13:19 well, #android-dev does not help with reverse-engineering apks Dec 16 19:13:36 which is what you're asking Dec 16 19:15:14 pfn: I thought #android-root guys tell me development questions are not related to #android-root and make me go into #android-dev Dec 16 19:15:26 it's a strange siituation Dec 16 19:15:31 -i Dec 16 19:16:23 reverse engineering systemUI.apk is not development Dec 16 19:16:28 ^ Dec 16 19:16:56 cristian_c, Coding is #android-dev, modifying existing Android framework is #android-root Dec 16 19:17:14 * cristian_c thinks guys will say him the opposite Dec 16 19:17:20 in an infinite loop Dec 16 19:17:24 try #android-purgatory Dec 16 19:17:31 OverCoder: ah, ok Dec 16 19:18:09 storkme: I don't know if this is a real channel, or simply a joke Dec 16 19:18:16 *that Dec 16 19:18:27 just a bad joke Dec 16 19:18:30 ok Dec 16 19:19:41 you should ask in ##java. Dec 16 19:19:58 cristian_c, break; at #android-root Dec 16 19:23:56 danijoo ##java people don't like #android-dev people :/ Dec 16 19:24:53 ##java = nice people Dec 16 19:24:56 Afzal, ##java dont like people at all Dec 16 19:24:59 squirrel, false Dec 16 19:25:05 danijoo++ Dec 16 19:25:11 correction, ##java likes squirrels Dec 16 19:25:27 s/squirrels/monkeys Dec 16 19:25:45 If you split your sentence into two messages you get kicked Dec 16 19:25:53 That's too much I guess Dec 16 19:26:35 Like, people might think of stuff, they write it, and then send it, and then something else comes to mind, which requires one more messages, it's stupid to force people to condense all their ideas into one messages, it doesn't even make sense Dec 16 19:27:26 l Dec 16 19:27:29 o Dec 16 19:27:29 l Dec 16 19:28:46 anybody use icepick here/ Dec 16 19:28:47 ? Dec 16 19:36:06 OverCoder: i don't get kicked Dec 16 19:36:54 in fact java is #4 on my list of helful channels of freenode Dec 16 19:45:59 squirrel, Neither am I, now. I also agree that it's such a helpful channel, but kinda.. suck chan Dec 16 19:46:22 sick* Dec 16 19:47:12 it largely depends on who’s there, but the general environment is a bit toxic Dec 16 19:49:56 I can safely assume that everyone here has gone to ##java at least once? Dec 16 19:50:24 at least most of us, I’d guess Dec 16 19:50:30 i havent Dec 16 19:50:36 lol Dec 16 19:50:43 i just knew java without ever learning it Dec 16 19:51:16 DrBenway, You'll never ever write good performant software, EVER Dec 16 19:51:29 (maybe 10+ years of C++ and a bit of C# helped...) Dec 16 19:51:41 yeah it will Dec 16 19:52:00 DrBenway, I guess then: You learned Java using your prior experience in C++ and C# Dec 16 19:52:03 That's another story Dec 16 19:52:13 point is... i never went to #java Dec 16 19:52:56 maybe one day if i'm lucky Dec 16 19:53:17 but nowaday we have stackoverflow... people aren't assholes over there Dec 16 19:53:18 If you want to get insulted there are better reasons :P Dec 16 19:53:35 maybe irc should develop a point system Dec 16 19:55:02 I think IRC should be upgraded to something like IRC2 or IRC+ or IRC++, or whatever, you just get the idea Dec 16 19:55:11 Adding necessary stuff for today Dec 16 19:55:38 basically Slack, but with the openness of IRC Dec 16 19:55:57 My English couldn't help me understand the word 'Slack' Dec 16 19:56:21 https://slack.com/ Dec 16 19:56:22 hi all-- I need a background drawable for a RecyclerView that will be a 1px-wide line with a small left margin. I'm currently trying to use a layer-list to do this, but I'm stumped on the shape's height. I need it to be as tall as the Recycler. Is there a "match_parent" equivalent here? Dec 16 19:56:42 Basically IRC had better add support for rich content, with a policy of tap to download, but I don't know if that feels any good for channels with 1000+ users Dec 16 19:56:53 I mean, tap to download exists Dec 16 19:57:27 basically you want Slack :p Dec 16 19:57:29 treelzebub, Why would you ever need 1px-wide RecyclerView? Dec 16 19:57:39 * OverCoder taps to see Slack Dec 16 19:58:02 I believe that people have discussed what you’re talking about, but it would be kinda like upgrading the email protocols at this point Dec 16 19:58:25 How Email can be related? in any way? Dec 16 19:58:28 OverCoder: Not the recycler, the line inside its background drawable. I want a line behind all views in the recycler. Dec 16 19:58:32 yeah, we have facebook and stuff to flirt with girls these days Dec 16 19:58:37 treelzebub: If you set it as a background drawable, then it should stretch Dec 16 19:58:41 no one hangs on #sex anymore Dec 16 19:58:46 so there's no traction Dec 16 19:58:59 OverCoder: I mean as a widely accepted protocol that really can’t be changed anymore because there’s no control over it Dec 16 19:59:12 DrBenway, I don't think I've mentioned #sex in anyway Dec 16 19:59:23 Porn sites exist, nobody wants to send sex stuff over IRC Dec 16 19:59:35 you must be young Dec 16 19:59:42 s73v3r, Why? because it's... very old? alright can't we make it backward compatible? Dec 16 19:59:57 DrBenway, How old are you? Dec 16 20:00:01 i remember the days where it all happened through irc... social, porn, warez, mp3, etc Dec 16 20:00:03 30 Dec 16 20:00:09 it gave traction to the network Dec 16 20:00:14 s73v3r: so set whatever height i want for the line, and it will give me a 1px-wide line that stretches vertically to fill the view? Dec 16 20:00:16 people were actually using it Dec 16 20:00:18 well, because it’s old, and there’s no central control over it, and there’s not really any way to ensure that anything is compatible Dec 16 20:00:19 now most channels are dead Dec 16 20:00:27 people have whats app Dec 16 20:00:30 DrBenway, It existed, but won't happen today, different stuff happened Dec 16 20:00:47 Also yeah, I'm young, 16 Dec 16 20:01:00 don̈́t watch porn Dec 16 20:01:27 i remember the days where you'd go on irc asking if anyone had mp3s... those weird files that contained downloadable music Dec 16 20:01:38 and you would swap a bunch of yours against a bunch of theirs Dec 16 20:01:40 at dial up speed Dec 16 20:01:46 god that time sucked... Dec 16 20:01:50 treelzebub: I don’t even think you’d have to set the height of the line. It should just stretch. Otherwise you could look at 9patch images Dec 16 20:02:02 DCC chat were a thing... Dec 16 20:02:02 Honestly, I am on a DSL with the speed of Dial-up, lol Dec 16 20:02:15 s73v3r: sounds reasonable. thanks! Dec 16 20:02:17 56 Kbps, just temporary until my ISP fixes it's crappy stuff Dec 16 20:06:52 Guys simple question, I'm making my own Android market for fun, say I want to release it, am I permitted to import people's apps without even taking a permission from them? Dec 16 20:07:23 Android download server down? Dec 16 20:07:27 OverCoder i'd assume no :) Dec 16 20:07:28 probably not Dec 16 20:07:31 OverCoder, not mine at least. Dec 16 20:07:32 I mean nobody wants to add their apps to a dead market, so I'd like to manually add apps like Facebook, WhatsApp, and so on, manually by me, would I run in licensing problems? Dec 16 20:07:50 probably Dec 16 20:08:04 Ooh, then how did 1Mobile, MoboGenie, and others make their markets get into the markets Dec 16 20:08:39 they are in the markets? Dec 16 20:08:42 they are all dead imo Dec 16 20:10:26 My SlidingPaneLayout works on small screens were i have each child as layout_width="match_parent". But on larger screen, i'd like to have left be 200dp wide and right take whatever is left - with no sliding behavior (because they can both fit) how do i do that ? Dec 16 20:10:56 When i try download android studio it download about 10 seconds and download speed slow to 0kbps Dec 16 20:10:58 danijoo, 1Mobile has 1.2 million apps, how they made their way Dec 16 20:11:05 Like, how did they start it out Dec 16 20:11:10 OverCoder: Abso-fucking-lutely not Dec 16 20:11:20 i dont want do make another container layout for master / detail because there is logic in the fragment dealing with slide listeners, etc Dec 16 20:12:08 s73v3r, say.. 0.1 million, how did they even Dec 16 20:12:48 either they did the shitty stuff you’re talking about doing, or they provided something that those companies wanted Dec 16 20:12:57 I mean like, if I made my market, with intuitive web interface for adding apps and stuff, and posted that on XDA, nobody would even tap on the thread to read it, so meh Dec 16 20:13:06 but you have absolutely no right to do that, and by doing so, I’d hope you’d get sued into oblivion Dec 16 20:13:07 Hm Dec 16 20:15:02 here’s the million dollar question you have to ask yourself: Why would any random app, let alone the big ones, want to take the time and effort to add themselves to your store? Dec 16 20:15:05 I guess they did it the same way the other 100 competitors try to do it Dec 16 20:15:21 im getting 20 mails a week of shops or adsellers asking me to add my app to them Dec 16 20:15:45 they just crawl the play store and send spams Dec 16 20:15:55 yeah, don’t do that Dec 16 20:16:16 I won't be Dec 16 20:16:28 I think I'll just, abandon the whole idea Dec 16 20:16:35 OverCoder time for another idea, move on Dec 16 20:16:36 I think I should be looking for something better Dec 16 20:16:58 g00s, Yeah that, but, I am out of ideas, I am even ready to work for free :| Dec 16 20:17:23 don’t work for free, either Dec 16 20:17:34 After I learned programming I can say the idea is such a very valuable thing Dec 16 20:17:56 we’re not trying to discourage you from the idea of making another store. but you have to be realistic about these things Dec 16 20:18:04 it’s not a “build it, and they will come” kinda thing Dec 16 20:18:40 do it if you do it for fun Dec 16 20:19:17 doing it for fun is quite a valid reason to do so. Assuming you don’t have to spend too much money :p Dec 16 20:19:40 danijoo, How can it be fun without letting anyone have a taste of it and see how it looks Dec 16 20:19:53 I don't even have money to spend lol Dec 16 20:20:04 we’re not saying not to release it if you do it for fun Dec 16 20:20:53 I have fun when I see friends loving it Dec 16 20:21:07 i do think Google Play sucks ass though, so many areas to improve. Would be nice if there were channels that anyone could create , like youtube Dec 16 20:21:38 the whole Store model seems to have stagnated. Mac App Store is another crap pile Dec 16 20:22:02 OverCoder: If you want a free store idea, make one that’s easier for developers to connect with their users Dec 16 20:22:09 it was just a race to see who got the most apps, after that - nobody though about suporting devs with interesting monitization ideas Dec 16 20:22:20 like paid updates, promo codes, etc Dec 16 20:22:29 the biggest problem right now, from a developer side, is that you can’t connect with your users Dec 16 20:22:49 yeah and that too, although i just put a link to my google+ page for the app Dec 16 20:22:56 paid updates are a huge thing. Right now, I either have to release updates for free for everyone, or i have to create a new app, and make my existing users pay the same as new ones Dec 16 20:22:59 best idea i could come up with Dec 16 20:23:47 and man, how are people so bad at installing updates Dec 16 20:23:54 I should add a kill switch to my apps to force users to update Dec 16 20:24:27 allow me to give a discount to existing users. Say I want to sell version 3 for $10, but give v2 users a break and only charge $5. And allow those who have bought in the last month to update free Dec 16 20:24:30 like 25% of my users are on a version that's >2 years old Dec 16 20:24:31 pfn there was a /r/androiddev article about adding a kill switch to the app :D Dec 16 20:24:41 g00s, at least google play store console seems to improve atm Dec 16 20:24:42 g00s, yes, I saw Dec 16 20:24:43 just a few days ago. probably easiest way is GTM Dec 16 20:24:49 they added a lot of features for reviews Dec 16 20:25:01 do we not like kill switches or something Dec 16 20:25:55 are they still on the old version cause they’re on an older version of Android that’s no longer supported by the app? Dec 16 20:26:26 I've had 21 releases since the last version they're on Dec 16 20:26:53 did you drop support for older Android versions in that time? Dec 16 20:27:26 cause that’s probably the only reasonable reason I could see for not updating Dec 16 20:27:30 nice https://www.jetbrains.com/datagrip/ Dec 16 20:28:08 huh, neat. Dec 16 20:29:11 i posted this a while back, nobody cared Dec 16 20:29:19 https://www.reddit.com/r/androiddev/comments/3t88ni/dbandroid_plugin_for_sqlitestudio_now_free_open/ Dec 16 20:29:32 you can use that, in place of stetho, to talk to your app Dec 16 20:29:58 that one ia free, Qt app, you just add the dll/so to the plugins dir Dec 16 20:30:37 g00s, thanks for that. awesome Dec 16 20:30:45 yw ;) Dec 16 20:32:32 * OverCoder feels very bad and low Dec 16 20:32:49 me again with the line-as-background-drawable question :D -- I can't seem to get a 1px-wide line with a particular left-padding as a background. All I can get is left-padding and then the rest of the space filled in with the line shape. What am I missing here? Dec 16 20:33:03 OverCoder https://www.youtube.com/watch?v=jG2KMkQLZmI Dec 16 20:33:14 I've been talking about the same thing we were talking about before, I just ended up with one thing: I spent my 2 years as well as my eyes learning to program for.. nothing. I will make nothing Dec 16 20:34:04 Hi can i access google play store in a country different of mine? Dec 16 20:34:21 okdamn, fake your location with VPN Dec 16 20:34:32 how? :P Dec 16 20:34:50 okdamn OverCoder --> #android Dec 16 20:34:51 for example i am in italy i would like to browse the brasilian store Dec 16 20:34:53 Install something like.. HidemanVPN, choose a country and go Dec 16 20:35:07 g00s, Why? Dec 16 20:35:24 Because this channel is for app dev Dec 16 20:36:01 Why, why do we dev? /me goes to #android Dec 16 20:36:45 That's all we wanted Dec 16 20:37:14 i installed hideman but looks like it never connect me Dec 16 20:37:17 wtf!? :D Dec 16 20:38:15 okdamn, wrong channel. Dec 16 20:39:03 the play_apk_expansion library seems to lack . does no one ever use it? Dec 16 20:39:59 It’s untranslated, it can’t be built with the current tools, and there aren’t pre-built versions in the sdk dir. Dec 16 20:40:56 / lack / suck / Dec 16 20:43:55 how do iaccess google play store brasil from italy? Dec 16 20:44:22 okdamn: Wrong channel, try #android Dec 16 21:03:29 is there any way to force an apk to install, even if signatures or other forms of verification fail? Dec 16 21:03:39 duboisj, I guess doing that manually is a smart idea :/ Dec 16 21:04:00 Mavrik: doing which manually. Dec 16 21:04:17 The download. Dec 16 21:04:21 Of the expansion for the APK Dec 16 21:04:45 you mean not using google’s libraries at all? I guess it seems like they still provide some value. Dec 16 21:05:17 what I wonder is whether I should be doing it at all, period. they seem unmaintained, and that makes me thing no one else uses them, so I just don’t need their functionality. But I don’t know. Dec 16 21:06:23 The Google docs I see ( http://developer.android.com/google/play/expansion-files.html ) say: Dec 16 21:06:30 Yes, the play expansion download library pretty much looks abandoned Dec 16 21:06:44 your expansion files will be downloaded automatically “on most devices” Dec 16 21:07:37 Not sure about your point. Dec 16 21:08:20 I’ve tested on a few devices and never seen a need for them, and the docs don’t have any detail about when they might actually be necessary. Dec 16 21:08:46 "They"? Dec 16 21:08:48 Between that and the other indicators that they’re abandoned, I’m tempted to just rip out the functionality entirely. Dec 16 21:09:06 “they” <— the functions provided by the apk expansion libraries. Dec 16 21:09:08 duboisj also the max apk size limit was bumped up recently Dec 16 21:09:13 ploopkazoo, you cant override it without losing settings Dec 16 21:09:20 yes. 100Mb is still just shy of enough for me. Dec 16 21:09:29 :O Dec 16 21:10:01 danijoo: losing settings? Dec 16 21:10:04 duboisj, I think you're mixing up the expansion files and the helper libraries Dec 16 21:10:09 I can understand how that’s rare, but games etc. surely run into much higher limits. Dec 16 21:10:15 You don't need to use the Google library to use expansion files. Dec 16 21:10:15 ploopkazoo, everything the app set as settings, cache etc Dec 16 21:10:31 basically it will be an uninstall + install Dec 16 21:10:32 You can fetch the URL and download the file yourself (and you should(. Dec 16 21:10:43 Mavrik: Yes, I realize that. I can build an upload them easily myself. Dec 16 21:11:04 Mavrik, duboisj im also sure there are good libraries for that on github Dec 16 21:11:10 danijoo: if an apk is distributed outside of any kind of store and is just installed manually, is it signed or checksummed or anything? Dec 16 21:11:19 What the expansion libraries seem to provide is some level of nicety in terms of downloading them, and the google docs about why I should use them if I need to download them myself seem convincing. Dec 16 21:11:29 I unzipped an apk, edited a few strings and images, rezipped, and now it won't install Dec 16 21:11:44 The problem seems to be that in every case I’ve seen, and in “most” cases according to the docs, the play store will download them for me automatically. Dec 16 21:11:48 ploopkazoo, no help with this stuff here Dec 16 21:11:51 duboisj, if you don't have to use them, then don't. Dec 16 21:11:54 go to #android-root Dec 16 21:12:03 duboisj, don't EVER rely on "most" cases as the ONLY cases when programming. Dec 16 21:12:05 Dude :) Dec 16 21:12:28 I mean, I can break that "most" case by just walking around the house while you're downloading your hugeass expansion file and my wifi drops for a moment :P Dec 16 21:12:37 Which will cause me to end up with a broken app. Dec 16 21:12:47 That’s exactly what I’m saying. The docs say I don’t need them in “most” cases, so I’m paranoid that there will be some case where I hit them and do need them. Dec 16 21:12:48 And you with a pissed of 1* review and a refund ;) Dec 16 21:12:57 What's "them"? Dec 16 21:13:20 The docs are just talking about the fact that you need to be able to download the files if they're missing. Dec 16 21:13:27 the downloader libraries. (obviously I can implement the same functionality myself, I know that also) Dec 16 21:13:58 whey I say ‘need them’ I mean “in some case I might need to worry about a case where the play store fails to download my expansion file automatically for me" Dec 16 21:14:14 Well you certanly MUST be able to download those files if you're using expansion files. Dec 16 21:14:17 I guess what I wonder is, in practice, do most other android developers ever really worry about that. Dec 16 21:14:25 If you use google library or your own implementation it's up to you. Dec 16 21:14:32 do you guys prefer snappy or nonsnappy scrollbehaviour on toolbar? (for AppBarLayout) Dec 16 21:14:32 I wouldn't use the google lib because it's unmaintained and crappy. Dec 16 21:15:44 Maybe. I don’t think it’s so crappy I wouldn’t use it as a starting point. It’s just that the level of crappiness I see makes me think that everyone else is ignoring the problem entirely and that the play store does the downloading automatically in essentially 100% of cases. Dec 16 21:15:56 But, of course, I have no way to actually tell. Dec 16 21:17:26 I guess I’ll go ahead and use it as a starting point. Dec 16 21:17:59 No it doesn't do the downloading in 100% of cases. Dec 16 21:18:03 It's probably not even 75%. Dec 16 21:18:20 And that's ignoring people that actually delete those files or the download fails while running. Dec 16 21:18:29 Mavrik: ah, you’ve seen it not download? That’s useful to know. Dec 16 21:18:48 My confidence that the docs were correct was low because the libs were so crappy. Dec 16 21:21:54 Those things fail regularly on my Nexus 5 and 5X even on stable device Dec 16 21:23:17 hi, does anyone have an idea of how to make sort of a matching cards activity in android, similar to this http://i.imgur.com/cO2KnjP.png Dec 16 21:23:54 Mavrik: thanks for your experience. I’ve already got code to use them, so I’ll keep it. Dec 16 21:24:18 (I’m changing my build system and continuing to use them is a bit of a pain, so it was an occasion to consider ripping that stuff out.) Dec 16 21:31:05 ploopkazoo: yes, there’s a signing step when a .apk is built. I guess the channel policy is not to help with rooting etc., but I’ve wondered that for just general development of my own app. I don’t know any way to edit the .apk without rebuilding. Dec 16 21:31:25 Moony22: probably can be done via Canvas Dec 16 21:31:45 (presumably there’s a tool invoked by the build system that you could invoke yourself, I guess it wouldn’t be that hard to find, maybe that’s what people are saying you need to go to #android-root to ask about) Dec 16 21:32:08 duboisj, well if you can get rid of expansion files alltogether it's the best outcome Dec 16 21:32:11 for users and for you. Dec 16 21:32:18 (except for people with really cheap phones) Dec 16 21:32:25 I’m sure I can’t do that. Dec 16 21:32:52 Moony22: you can draw the boxes when the Canvas instantiates, and then work your logic on MotionEvent.ACTION_UP and MotionEvent.ACTION_DOWN Dec 16 21:33:12 agaurav77: hm, I guess that's a good idea, thanks Dec 16 21:33:19 :) Dec 16 21:33:45 does anyone know a good article about how to prevent apps like llucky patcher to work on my apps? Dec 16 21:33:59 Moony22: I made something similar a year ago, it used Canvas Dec 16 21:34:19 oh alright, yeah it sounds reasonable Dec 16 21:34:23 Moony22: It wasnt exactly this, but could be similar Dec 16 21:34:43 https://github.com/agaurav77/solvemycircuit/blob/e0c8860eced838cfe49cb7786d739713d73a50b7/src/com/ho/solvemycircuit/DrawingArea2.java Dec 16 21:34:52 see this activity, could be helpful Dec 16 21:34:59 ignore bad coding style and all Dec 16 21:35:02 :D Dec 16 21:56:13 Is it really important to use Android studios VCS thing to save a project ? I never use it and feel horrible Dec 16 21:56:41 Uhh... Dec 16 21:56:43 i don’t either Dec 16 21:56:47 You certanly SHOULD use a VCS. Dec 16 21:56:47 however, I do use Git Dec 16 21:57:08 Or if I say it in another way - a developer who doesn't use VCS is unemployable. Dec 16 21:57:18 But the UI in AS isn't all that good so I don't use it and I don't think anyone I know does. Dec 16 21:57:41 A coworker of mine does. But that’s cause he doesn’t want to open another application Dec 16 21:59:19 Hey Dec 16 21:59:31 I have some weirdness happening with garbage collection in my application Dec 16 21:59:42 and some memory weirdness too Dec 16 22:00:05 garbage collection isn't destroying some of the images stored upon going to the next activity Dec 16 22:00:06 https://gyazo.com/99ef8d7eef20ff73256c92aa9f107570 Dec 16 22:00:13 ^^I will annotate this in a second Dec 16 22:00:21 Bitmaps are handled differently Dec 16 22:00:31 you have to expliclity call recycle() on the bitmap Dec 16 22:00:50 s73v3r: These are imagebuttons though, being viewed in this part Dec 16 22:00:58 s73v3r, that's not true. Dec 16 22:00:58 They're only kilobytes in size each, there are 9 of them Dec 16 22:01:03 Hasn't been true since 3.0 :) Dec 16 22:01:26 Humorousone, where are you storing the bitmaps? Dec 16 22:02:08 In terms of views? or on disk Dec 16 22:02:24 In terms of references in code :) Dec 16 22:02:40 they're assigned to imagebuttons in xml Dec 16 22:03:02 10Kb per .png Dec 16 22:03:14 they're scaled down onto the imagebutton Dec 16 22:03:22 is the activity being collected? Dec 16 22:03:24 I'm working on those annotations as we speak... Dec 16 22:03:31 garbage collecteD? Dec 16 22:03:46 Humorousone, if your activity is only covered by another one, then it'll stay in the memory in the background Dec 16 22:04:10 even if this.finish() is calleD? Dec 16 22:04:25 Well... depends. Dec 16 22:04:28 I understand it's redundant with startActivity() Dec 16 22:04:32 Humorousone, do a heap dump and check what's referencing them. Dec 16 22:04:40 sorry, I'll have to google how to do that Dec 16 22:04:44 newbie :P Dec 16 22:05:11 Humorousone, to the left of the memory graph there are icons Dec 16 22:05:24 when you have the max memory usage, click on the icon under the garbage truck Dec 16 22:05:32 java heap dump? Dec 16 22:05:34 do you assign any listeners/callbacks, and refer to this in any of them? Dec 16 22:05:35 with green arrow down ("Heap dump") Dec 16 22:05:44 It'll dump the contents of memory to the disk and load it as a graph Dec 16 22:05:53 So you can see what's in the memory and where it's referenced from. Dec 16 22:06:14 awesome Dec 16 22:06:21 Give me a sec to fill some memory Dec 16 22:06:48 hmm. seems like garbage collection is happening sporadically Dec 16 22:06:50 >.> Dec 16 22:07:00 That's normal. Dec 16 22:07:02 https://gyazo.com/f3dde854469f053af376c725067c3da4 Dec 16 22:07:17 This is not C++, Android tries to do GC as rare as possible. Dec 16 22:08:40 s73v3r: I haven't assigned any listeners/callbacks, as far as I know Dec 16 22:08:56 That graph just looks like business as usual. Dec 16 22:09:03 You got a delayed GC trigger, all is well :) Dec 16 22:09:18 it's just unusual for .png's to be filling up all of my memory Dec 16 22:09:25 this crashes the application after a while Dec 16 22:10:03 this is me after going back and fourth between an application: https://gyazo.com/5d3acdf5acd61f0d1a4f935b2ebcf558 Dec 16 22:10:07 Humorousone, what do you mean all your memory? Dec 16 22:10:09 *a few times Dec 16 22:10:13 do i need a custom row xml to edit the height of listview items? Dec 16 22:10:17 You're using 28MB >D Dec 16 22:10:29 If you have a higher resolution that's just about enough for framebuffers and a few bitmaps. Dec 16 22:10:38 It crashes with failed to assign memory... Dec 16 22:10:42 I'll see if I can get the whole message. Dec 16 22:12:47 This is my memory after loading into the first activity, going to the second, then the third Dec 16 22:12:51 https://gyazo.com/45544567a7632bd4e61bdbb6b33ae575 Dec 16 22:13:06 wait Dec 16 22:13:09 am I being stuppid... Dec 16 22:13:34 "java.lang.OutOfMemoryError: Failed to allocate a 2924556 byte allocation with 1104184 free bytes and 1078KB until OOM" Dec 16 22:14:11 Humorousone, are you using the AVD_ Dec 16 22:14:12 ? Dec 16 22:14:19 yep Dec 16 22:14:27 Which resolution? :) Dec 16 22:14:40 urrm 1 sec Dec 16 22:14:43 it's an odd resolution Dec 16 22:15:13 something like 1024x 7 something something Dec 16 22:15:33 Tablet? Dec 16 22:15:35 Do check Dec 16 22:15:45 1024x768 Dec 16 22:15:50 didn't realise it was 16:9 Dec 16 22:15:50 Because it seems that the issue isn't you, it's the fact that AVD sets dumbly small heap size Dec 16 22:16:09 Set ti to 128MB which is more common these days, not 48 that's default :) Dec 16 22:16:26 Can't really test an app if your view render bitmap takes your heap Dec 16 22:16:29 is it normal to fill up 30mb of data loading some low-res image? Dec 16 22:16:41 and I'll see if I can change that Mavrik Dec 16 22:17:04 it's at 32 by default Dec 16 22:17:39 Humorousone, that memory isn't taken just by your low-res image. Dec 16 22:17:52 It's also taken by a full 1024x768 image which represents your rendered app screen. Dec 16 22:18:01 And textures representing other views. Dec 16 22:18:08 Mavrik: I see. Dec 16 22:18:18 Mavrik: I didn't realise this was taken into account by the heap size Dec 16 22:18:26 It is, it's your app memory :) Dec 16 22:18:30 Mavrik: phew Dec 16 22:18:41 That's why I'm saying it's a problem that AVD sets such low heap size on such high res devices. Dec 16 22:18:48 Mavrik: I was afraid I was having timmy's first memory leak Dec 16 22:18:49 32MB of heap was used on 480x320 devices :P Dec 16 22:18:54 0_0 Dec 16 22:20:23 wow, thank you Dec 16 22:20:47 suggestions for heap size? Dec 16 22:20:51 for that size screen Dec 16 22:21:51 Humorousone, 128M Dec 16 22:23:53 Mavrik: <£ Dec 16 22:23:54 <3 Dec 16 22:23:57 Thank you Dec 16 22:26:01 In fullscreen mode, how do I intercept the click the event in my app? As it is, it takes two taps: 1 to show the status/nav bar, then 1 to touch the view. Dec 16 22:27:13 View.OnSystemUiVisibilityChangeListener? Dec 16 22:27:41 Mavrik: Just to double check... Is it fine to go from activity to activity with startActivity(someintent) Dec 16 22:27:52 It's the only way ;) Dec 16 22:27:58 Is there anything else I need to do, I mean :P Dec 16 22:28:06 Nop. Dec 16 22:28:09 Cool :) Dec 16 22:28:13 You don't have to finish the current one either Dec 16 22:28:20 Or it'll make back button behaviour funny. Dec 16 22:28:36 hey guys, newbie question: how would you notify a fragment of an event long after the event occurred? Dec 16 22:28:57 Mavrik: Well I don't want the back button working in this particular case, anyway Dec 16 22:29:10 Mavrik: @override Dec 16 22:29:11 back button should always work Dec 16 22:29:25 Humorousone, hrmf. Dec 16 22:29:31 rburgosnavas, can you explain more? Dec 16 22:29:39 sure Dec 16 22:30:08 danijoo: this app is specifically designed for special needs children, on a modified android platform Dec 16 22:30:42 MainActivity runs a thread, does work, blah blah blah, finishes. While that happens, Fragment A has not been created. Dec 16 22:31:28 later on the fragment A gets created and need to know that the work done by MainActivity was completed so that Fragment A can do additional work Dec 16 22:31:43 Well you need some kind of state store. Dec 16 22:31:46 danijoo: is it considered bad design disabling the back button? Dec 16 22:31:56 I'd abuse EventBus sticky event for that use-case. Dec 16 22:32:07 Humorousone, on a normal platform of course. Dec 16 22:32:09 yeah, I was thinking adding a flag inSharedPreferences but wasn't feeling it Dec 16 22:32:12 It breaks user expectations on how OS works. Dec 16 22:32:47 Mavrik: I guess you could consider my application more of a game, than a standard app, I guess. Dec 16 22:32:48 Humorousone, yes. Dec 16 22:32:54 very bad Dec 16 22:33:07 Humorousone, well if your aplication is a kiosk app that is meant to have special behaviour then it's fine. Dec 16 22:34:10 danijoo, Mavrik, Thank you for the knowledge though. I appreciate it Dec 16 22:34:20 You can guess, I'm new to UI too. Dec 16 22:34:22 :P Dec 16 22:34:42 @Mavrik, is that EnventBus by greenrobot? Dec 16 22:34:53 mhm Dec 16 22:39:33 rburgosnavas, theres also otto Dec 16 22:39:50 yeah, I saw that Dec 16 22:39:54 thnx! Dec 16 22:40:14 so is the built in android TextToSpeech API the thing thats usually used to narrate text in pro apps ? Dec 16 22:56:19 Ooo the TTS api is so easy Dec 16 22:56:21 and handy Dec 16 22:56:42 am i saying that right ? tts api ? or should i say tts framework Dec 16 23:02:55 either way is fine Dec 16 23:05:37 So I’m getting BadTokenException in several places in our app when we try to show dialogs Dec 16 23:05:51 the error says “token not valid; is your activity running? Dec 16 23:06:22 my current thought in trying to fix this is to surround the dialog.show() with a try/catch, and catch the exception Dec 16 23:07:35 in some places, i write a SharedPrefs key that I check in onResume() to see if the dialog tried to show, but couldn’t, due to this. in other places, I’m not quite sure if this is the right thing to do Dec 16 23:12:37 where do you open the dialogs? Dec 16 23:12:39 onCreate? Dec 16 23:14:28 as the result of a callback Dec 16 23:14:38 so it’s entirely possible the user has left Dec 16 23:14:44 the activity Dec 16 23:15:08 why dont you check that before showing the dialog? Dec 16 23:15:24 i could do that too Dec 16 23:15:49 i’m more wondering if it makes sense to try and alert the user or just give up Dec 16 23:18:34 if I’ve already long left the activity, what does isFinishing() return? Dec 16 23:24:50 s73v3r do you ever see that when the dialog is up, but rotate the phone ? Dec 16 23:25:16 I haven’t actually seen it; it’s an automated crash report Dec 16 23:25:26 however, our app is, or should be, locked in portrait Dec 16 23:41:07 anyone know why if you have 2 textviews in a relativelayout, and when you use layout_toEndOf for one of the text views, the one put at the end goes vertical? Dec 16 23:41:45 too little information Dec 16 23:41:54 probably because the width of the first one is wrong Dec 16 23:43:08 all of the views mentioned are using wrap_content Dec 16 23:43:31 hi everyone Dec 16 23:44:06 the "main" textview that is the anchor for the layout_toEndOf for the other textview is using centerInParent Dec 16 23:44:25 if I un-center it, the other view is accomadated as normal Dec 16 23:44:26 is possible getting source code of any page in WebView and stor it in a file ? ??? Dec 16 23:44:55 accommodated* Dec 16 23:47:05 * g00s hopes 2016 Nexus 7 rumor is true; 2013 unit battery is deteriorating Dec 16 23:52:41 http://www.androidpolice.com/2015/12/16/deal-alert-the-nexus-6p-is-on-sale-for-50-off-in-the-google-store/ Dec 16 23:57:01 is possible getting source code of any page in WebView and store it in a file ? ??? Dec 17 00:15:45 repeating will get your question answered Dec 17 00:15:56 orbyt_, need much more detail, screenshot and pastebin Dec 17 00:18:36 getAssests() cannot find my file Dec 17 00:19:41 try getAssets() :D Dec 17 00:20:06 Spelled it wrong there Dec 17 00:20:06 pfn: Basically what was happening was that if you put a textview and center it in a relativelayout, then throw another textview aligned to the right of the first text view, the second textviews width is ignored, and squeezed into whatever letfover space is left on the right side. Dec 17 00:20:08 Srry Dec 17 00:20:24 g00s: I was using the correct spelling. Dec 17 00:20:28 pfn: Found a diff workaround though Dec 17 00:21:00 orbyt_, well, that's kind of expected then, the first textview must be centered as that's what you requested, the only thing that can happen for the 2nd textview is to fill the remaining space if width > remaining Dec 17 00:21:56 pfn: Yes but the relativelayout encasing the two textviews was using wrap_content, so it should accomadate for the width of the second textview Dec 17 00:22:27 wrap_content on relativelayout behavior depends on android version Dec 17 00:22:35 I forget which versions it changed and if it matters anymore Dec 17 00:22:59 orbyt_, as for should or not, really depends Dec 17 00:23:19 pfn: what do you mean? Dec 17 00:29:31 getAssets() cannot find my file. Dec 17 00:32:00 why Dec 17 00:33:23 canvs2321: no idea. All it says is it cannot find the file. And this is just in the log. The app continues to run fine until I try and use the variable I saved the file contents to. Dec 17 00:35:19 where is the file? Dec 17 00:38:04 s73v3r: res/assets. I had to create the folder. Dec 17 00:38:22 and could you share the line you’re trying to read it into? Dec 17 00:38:51 there’s generally not an assets folder under /res. It’s usually it’s own folder Dec 17 00:40:06 hello Dec 17 00:40:11 s73v3r: hmm... I'll look. I am on my phone right now but I will bring up my laptop. Dec 17 00:40:25 how can I animate the floating button so when the user shows the tab it pops, like in this example Dec 17 00:40:35 http://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsRTUzS2ZHaVRQaDg/components-buttons-fab-behavior_04_xhdpi_009.mp4 Dec 17 00:40:39 sorry for the paste Dec 17 00:45:54 <_genuser_> heyo pplz! Dec 17 00:47:23 s73v3r: I cannot find the assets folder Dec 17 00:47:54 <_genuser_> 7 level deep package namespace.... too much? Dec 17 00:48:39 _genuser_: was that to me? Dec 17 00:49:02 <_genuser_> no, I have a package namespace that's 7 levels deep. and I'm just throwing the question out there. Dec 17 00:49:11 <_genuser_> if that's too much. or if people have package names that long. Dec 17 00:50:22 Why is it 7 levels? Dec 17 00:50:35 noahmg123: it’s also one you have to create Dec 17 00:50:42 _genuser_ why not just com._genuser_.derp Dec 17 00:51:04 i believe that getAssets() is going to look for indexed things like strings, layouts, etc in the Res directory Dec 17 00:51:20 no, wait, that’s getResources() Dec 17 00:51:44 s73v3r: so the assets folder is under app/? Dec 17 00:52:16 that’s where ours is Dec 17 00:52:26 wait, no. Dec 17 00:52:43 it’s under src/main, next to the /java and /res directories Dec 17 00:52:56 OK. Who is we BTW? Dec 17 00:53:03 the project I’m on Dec 17 00:53:12 Thought so. Cool. Dec 17 00:54:42 assets go into src/main/assets Dec 17 00:54:44 not src/main/res Dec 17 00:55:08 pfn: thx. Dec 17 00:55:19 <_genuser_> g00s: it's com._genuser_.app.file.parsers now. Dec 17 00:55:42 <_genuser_> g00s: it was even longer, but I removed a couple of levels. At the same time, it's a bit clunky when you have too many files in teh same folder and no organization. Dec 17 00:55:48 it's common to have like 3 or 4 levels for a package name, going 7 levels deep is a bit absurd Dec 17 00:56:13 tld.name.android.appname.stuff Dec 17 00:56:17 or just tld.name.appname.stuff Dec 17 00:56:33 maybe nest one level under stuff if you really want, but have 3-4 levels... meh Dec 17 00:57:09 What the largest single file I should load? Dec 17 00:57:29 My emulator crashed loading a 22MB file. Dec 17 00:57:30 Anyone know if there is a good way to explore a devices local DB contents? Dec 17 00:57:42 noahmg123, you can load as big as you want, just don't read it all into memory at once Dec 17 00:57:49 I want to make sure my INSERTS and UPDATES are working correctly Dec 17 00:58:05 it really depends on the device itself Dec 17 00:58:16 s73v3r, you talking to me? Dec 17 00:58:26 no, noahmg123. sorry Dec 17 00:58:26 adb runas cp /data/data/package-name/db/yourdatabase.whatever /sdcard Dec 17 00:58:27 pfn: how do I use its contents then? Dec 17 00:58:27 adb pull Dec 17 00:58:29 sqlite3 Dec 17 00:58:37 noahmg123, use the contents in a streaming fashion Dec 17 00:58:45 drose379 you could also install stetho and query it directly Dec 17 00:58:53 Whats stetho? Dec 17 00:58:57 noahmg123, there's no reason for the entire contents to stay in memory Dec 17 00:59:01 drose379, use the google Dec 17 00:59:18 pfn: pardon my ignorance, but how would I do that? Dec 17 00:59:23 A facebook thing?? Dec 17 00:59:38 from jasta Dec 17 00:59:39 noahmg123, that entirely depends on what you're doing Dec 17 00:59:46 random access files, etc. are an approach to that Dec 17 01:00:03 pfn: it is an extremely large JSON file Dec 17 01:00:32 you shouldn't be reading a 22mb json file on-device Dec 17 01:00:33 either break it up in to smaller files, or use a streaming or pull parser Dec 17 01:00:44 your app will suck no matter what if you do that Dec 17 01:00:50 Cant you do it on a background thread? Dec 17 01:01:01 gson already takes like 2 seconds to parse my medium size json files Dec 17 01:01:09 (that's several hundred kb) Dec 17 01:01:17 Hey an IntentService runs on a background thread automatically right? Dec 17 01:01:29 s73v3r: pfn I can break it up into smaller files. Dec 17 01:04:04 pfn: would breaking it up work? Dec 17 01:04:43 So stetho gives you a GUI to do all the debugging, is there a way to do it through the command line? Dec 17 01:06:23 drose379 look at 'run-as com.drose379 sqlite3 ' maybe. generally. Dec 17 01:07:01 Thanks goos Dec 17 01:07:05 kill your app first, sqlite3 isn't great multi-process Dec 17 01:07:52 <_genuser_> so android... 5.1 still uses dalvik? Dec 17 01:08:31 no Dec 17 01:08:31 okay, hello-charts is the best Dec 17 01:08:47 Afzal which ones have you tried so far? Dec 17 01:08:49 <_genuser_> g00s: android 5.1 uses the new jre, yeah? Dec 17 01:10:08 _genuser_: it uses ART Dec 17 01:10:13 g00s ALL of them. GraphView, AndroidMPChart, HelloCharts, WilliamChart, AChartEngine, HoloGraphLibrary Dec 17 01:10:26 <_genuser_> Leeds: thanks. Now to figure out if art supports java 8 or just 7. Dec 17 01:10:49 Afzal yo are thorough :D Dec 17 01:11:03 art just supports 6, with a couple spatterings of 7 Dec 17 01:11:15 no java 8 and beyond anytime soon Dec 17 01:11:16 <_genuser_> s73v3r: yeah, that's what I'm seeing all over stackoverflow. Dec 17 01:11:32 <_genuser_> s73v3r: so no static methods in interfaces for my app. :) Dec 17 01:11:53 drose379 oops caveta emptor, general builds of android are still missing sqlite3. i guess you could try something hokey like grabbing a version from arm emu, and copying some place and make it chmod +x - ugh Dec 17 01:12:01 *caveat Dec 17 01:12:30 g00s I've been trying to find a decent graphing library for more than a year lol. Even though it doesn't have built-in realtime, it's still the fastest in my experience when you want to "fake" realtime graphing. And it has a lot of chart types. Dec 17 01:13:13 every chart i look at that does realtime, is really inefficient on how it handles the data :( with lots of GC small object creation Dec 17 01:13:19 i dread writing my own though Dec 17 01:13:50 thanks Afzal i'll check it out again Dec 17 01:14:11 noahmg123: If it’s that big, you want to move beyond JSON. Look into binary files or shipping SQL files Dec 17 01:14:20 Afzal so what was the verdict on mpandroidchart Dec 17 01:14:33 g00s yuuuup, and eventually everything starts lagging. With this one, I'll probably try the viewport movement. Right now, I just decrement the X value in all existing points (remove the ones I don't need in the viewport) and add the new one. And it's still super fast Dec 17 01:15:32 s73v3r: The largest smaller file would be about 1MB (possibly a bit less). Still too big? Dec 17 01:15:47 How can i remvoe the app title from ActionBar from Support7. In styles I have android:displayOptions & displayOptions >showHome|useLogo< I also removed the activity label in manifest. Dec 17 01:15:55 Tho title still remains Dec 17 01:15:56 you might be ok, but I’d seriously look at something else Dec 17 01:16:08 <_genuser_> ok, so apparently it's a long debate on whether static methods shoudl be allowed on interfaces and people are religiously on either sides. Dec 17 01:16:39 s73v3r: how are binaries and SQL files better? Just wondering. Dec 17 01:16:49 g00s, stetho seems to work fine for local DB Dec 17 01:17:01 they’ll be smaller, as they won’t be human readable, and they’ll be faster to parse Dec 17 01:17:50 s73v3r: OK, I will look into it. Are JSoN files easily convertable into those types? Dec 17 01:18:15 JSON* Dec 17 01:18:25 depends, but i don’t think there’s an automatic converstion Dec 17 01:18:34 g00s it became slow I believe because it couldn't catch up with the rate of data. I don't remember anymore lol Dec 17 01:18:57 yeah like lol Dec 17 01:19:03 oops, minus 'yeah like' Dec 17 01:19:13 started writing something else Dec 17 01:19:15 (and this is why I write down tasks in asana and my thoughts on the tasks now) Dec 17 01:19:29 g00s, should I remove the stetho dependency from gradle when I release the production update? Dec 17 01:19:32 s73v3r: OK thank you. Dec 17 01:19:33 oh nice. i'm using taskwarrior Dec 17 01:19:48 drose379 no, you put it in your debug variant Dec 17 01:19:53 Ah I see Dec 17 01:20:11 So im in debug now, when I switch to release what happens? Dec 17 01:20:22 oh god, command line :/ nah. I'm okay with a website and an android app lol Dec 17 01:20:38 if you do it like jasta says, its not in release, so nothing Dec 17 01:20:43 drose379 you do if (BuildConfig.DEBUG) { // initialize stetho } Dec 17 01:20:54 Ohh ok Dec 17 01:20:54 so when you switch to release, that flag will be false Dec 17 01:20:59 Right Dec 17 01:21:04 nooo ... in your debug you extend Appliction Dec 17 01:21:11 ?? Dec 17 01:21:19 drose379 look at the docs man Dec 17 01:21:38 I just threw the dependency in and was able to view my local sql files thats all I needed it for Dec 17 01:21:41 hm? you can extend application in release too though, I'm probably missing the premise here Dec 17 01:21:42 lol Dec 17 01:23:15 "Write access to external sd card is no longer possible with adb" hm wut Dec 17 01:26:11 is there a method you can hook into every time a view interacted with? Sort of like an setOnClickListener or an addTextWatcher (but more like the second?) Dec 17 01:26:41 *addTextChangedListener Dec 17 01:26:52 plz halp Dec 17 01:34:11 requiring those kind of code changes suck, for installing stuff like stetho, though... it'd be nice if it were easier to do from a flavor Dec 17 01:37:20 it's nice not to have to ship unused code (although it's possible for proguard to remove it) Dec 17 01:46:44 How do you set the Bounds for a google map ? i know theres a latlngbounds.builder() but theres no .setBounds Dec 17 01:56:14 Dec 17 02:00:14 shouldnt this be really easy ? Dec 17 02:00:27 how would anyone build a map if they cant set the bounds Dec 17 02:00:43 ive been searching google forever and theres not a trace Dec 17 02:10:22 JimHawking, I have a Google map on the web, not Android Dec 17 02:10:36 I didn't set bounds...I set a map center and zoom level Dec 17 02:16:08 Ologn like a max zoom out level ? or just a starting zoom level Dec 17 02:16:34 pfn have you ever heard of adb exec-out? i didn't see it in command line help, or d.android.com Dec 17 02:16:45 JimHawking, I set a latitude/longitude center, then I zoom to what boundaries I want Dec 17 02:16:53 starting zoom Dec 17 02:17:24 I don't know about max zooms... Dec 17 02:19:01 g00s, never heard of it, seen where? Dec 17 02:19:14 pfn aha https://android.googlesource.com/platform/system/core/+/5d9d434efadf1c535c7fea634d5306e18c68ef1f Dec 17 02:19:53 so something like adb exec-out screencap -p > test.png Dec 17 02:20:15 indeed Dec 17 02:27:36 has any one had json problems with cell networks vs wifi? Dec 17 02:27:47 I can seem to run my code just fine over wifi, but not cell network Dec 17 02:30:01 no Dec 17 02:30:21 DammitJim i hear verizon changes [ ]s to { }s Dec 17 02:30:25 :D Dec 17 02:30:46 no, they change {} to $$$ Dec 17 02:32:35 DAMMIT! Dec 17 02:32:53 actually this is on T-Mobile Dec 17 02:33:18 lol Dec 17 02:35:20 anyone? Dec 17 02:36:08 is there an addOnStateChangedListener method or something similar for views? I haven't found anything, but I'm still optimistic. Dec 17 02:36:16 It would make the framework I'm working on much simpler. Dec 17 02:40:51 anarcode something like http://developer.android.com/reference/android/view/ViewTreeObserver.html ? Dec 17 02:41:05 warning, i hear its pretty buggy. use it if you must Dec 17 02:43:15 I don't know. I'm trying to create a sort of MVVC framework that serializes the view and turns it into a model. I have a PoC but it only uses TextWatcher Dec 17 02:49:48 oi oi Dec 17 02:49:55 what's new in android today? Dec 17 02:50:38 hello alex_PP Dec 17 02:52:00 hi dunkel2 Dec 17 02:52:10 any new idea yet? Dec 17 02:52:12 *ideas Dec 17 02:52:18 In layout infalter, why do we not want to attach this view to the parent? Dec 17 02:52:28 just dealing a lot with the material desing theming Dec 17 02:52:38 i feel like the docs are very vague Dec 17 02:52:46 :( Dec 17 02:52:48 no wait, that was drose379 Dec 17 02:53:00 Oh yeah that was me alex_PP Dec 17 02:53:06 Nah, working on some new features for my app Dec 17 02:53:13 do you know how can i get an id from R.array.somestuff Dec 17 02:53:15 drose379, do you mean inflate(R, container, false)? Dec 17 02:53:23 Yes, I dont know why its false Dec 17 02:53:30 i get a warning expected resource of type id Dec 17 02:53:37 if it's not false then inflate returns the container Dec 17 02:53:46 and attaches the inflated view to container Dec 17 02:53:56 not what you want in a fragment or listview Dec 17 02:54:10 Why not alex_PP Dec 17 02:54:19 Dont we want the new view attached to the container? Dec 17 02:54:25 because it brakes stuff Dec 17 02:54:37 listview/recyclerview handles the adding for you Dec 17 02:54:45 and adds and removes stuff as you scroll Dec 17 02:54:52 So with false we are just placing the view on top of the container? Dec 17 02:54:55 Or inside? Dec 17 02:55:07 hey alex_PP Dec 17 02:55:11 what is the difference between a listview and a recyclerview? Dec 17 02:55:19 no, with false it just inflates and returns a view not attached to anything Dec 17 02:55:27 for attaching later (by listview or the fragemnt manager) Dec 17 02:55:31 or whatever Dec 17 02:55:46 Ah I see alex_PP Dec 17 02:55:49 recyclerview replaces lsitview in a more easily extended way Dec 17 02:56:06 cool then ill use that one Dec 17 02:56:06 drose379 this is good writeup about that https://possiblemobile.com/2013/05/layout-inflation-as-intended/ Dec 17 02:56:14 Thanks g00s Dec 17 02:56:20 hi g00s Dec 17 02:56:29 hey hey Dec 17 02:56:52 I always thought layout inflater was upsidedown Dec 17 02:57:06 Why Dec 17 02:57:07 it should inflate by default and optionally add to the container as a shortcut Dec 17 02:57:29 fairly minor quibble Dec 17 02:58:02 for a recyclerview should i use match_parent? or wrap content on height? Dec 17 02:58:25 match_parent Dec 17 02:59:06 wrapping a potentially infinite list doesn't make sense Dec 17 02:59:31 hullo guypersson Dec 17 02:59:43 for trivial use-cases, listview is considerably easier Dec 17 02:59:47 if all you want to do is render a list **** ENDING LOGGING AT Thu Dec 17 02:59:58 2015