**** BEGIN LOGGING AT Mon Jun 29 02:59:58 2015 Jun 29 03:00:13 i dont see the similarity Jun 29 03:02:04 This is really weird, log statements in retrofits error handler aren't showing, nor in my doOnError() Jun 29 03:54:20 Anyone else experience this? My retrofit calls w/ rxjava fail during airplane mode (obviously) but it causes my app to hardcrash w/o a stacktrace. A custom error handler fixes the crashing, but I can't see any log statements in the error handler nor handle it during the doOnError Jun 29 04:15:24 Jake was going to change the way Retrofit handles errors (no longer calling onError() IIRC) Jun 29 04:15:37 done for months Jun 29 04:15:41 try it out on 2.0.0-SNAPSHOT Jun 29 04:16:42 https://github.com/square/retrofit/blob/b549160942450e235fe0bc4fdd56eff182acc542/retrofit-adapters/rxjava/src/test/java/retrofit/ObservableCallAdapterFactoryTest.java#L141-L148 Jun 29 04:18:44 what would be the best way to connect to my java websocket server on android? Jun 29 04:19:21 slightly biased towards OkHttp's WebSocket implementation: https://github.com/square/okhttp/tree/master/okhttp-ws Jun 29 04:20:14 Hahaha I bet Jun 29 04:22:33 TheKarlBrown: Tried a bunch of libraries, ended up writing our own layer because all the existing libraries have problems when pushed a bit hard (including OkHttp) Jun 29 04:22:43 lies Jun 29 04:22:48 truth Jun 29 04:23:10 you didn't file bugs therefore i reject your criticism Jun 29 04:23:17 Your denial is well noted Jun 29 04:23:57 what version did you try? i fixed all the bugs Jun 29 04:24:05 passes all the autobahn tests (that matter) Jun 29 04:24:14 I hear Square are going to close down all their Android stuff in favour of the platform of the future - Tizen! Jun 29 04:24:16 The latest I could find but since WS is still internal, didn't really expect miracles Jun 29 04:24:26 it's not internal anymore Jun 29 04:24:41 the old one was bad. my fault. Jun 29 04:25:01 Found occasional frames for protobufs being dropped on the floor, didn't have time to spend to diagnose the error on an internal package, moved on Jun 29 04:25:34 sounds about right. found that in autobahn testing as well. Jun 29 04:25:43 So maybe it wasn't lies after all? Jun 29 04:26:02 i have upgraded you to outdated truths Jun 29 04:26:23 Taking note of your continuing denial Jun 29 04:27:02 not only did i not deny, i took responsibility Jun 29 04:27:26 but you admitted to using an old version Jun 29 04:29:13 Is there anyone who can't get the app to install on their device? When I run "gradlew installDebug" it says it installed it succesfully in my device, but when I got looking for it, its not there. Also I downloaded it manually to my device to install and when it said it was finished installing, the option to start the app was greyed out. Weird. Its getting really annoying Jun 29 04:35:04 cool robot to test UI lag https://plus.google.com/u/0/+FrancoisBeaufort/posts/EpRgWK4XCz6 Jun 29 04:38:26 Yeah, whats happening with "Tizen"? Jun 29 04:38:49 Sounds like a terrible tasting fizzy drink over here in the UK. Jun 29 04:45:02 i haven't hears tizen in the news for a while Jun 29 04:45:07 *heard Jun 29 04:46:58 tizen will be dead pretty fast Jun 29 04:48:05 most of these in house platforms are just there to provide leverage negociations when licensing from the big OS makers like google and MS Jun 29 04:49:12 there where over 10 in house smartphone OSes before Android took over the market. samething will soon happen with smartphones Jun 29 04:49:22 smartwatches, I mean Jun 29 04:50:58 i think samsung wants to be like apple. they can't do that without having their own OS Jun 29 04:51:55 google and samsung haven't always been on the same page; sammy removed things from their flavor of android at google'e behest Jun 29 04:55:04 i completely disagree, the only thing in common about samsung and apple is that they compete in the flagship smartphone market, and that's it Jun 29 04:55:37 there's probably 10 companies with a much similar business model to samsung than apple Jun 29 04:55:57 and the same way a lot of companies that compete more direclty with apple than samsung Jun 29 04:56:55 but of course, if all you do is read phone blogs who review fancy phones over and over you might end up thinking those very different companies have something in common Jun 29 04:58:23 JFlash i think you are clueless. samsung doesnt have a business model. they are 20% of south korea's GDP Jun 29 04:58:56 "a" as in one Jun 29 04:59:33 they can compete with apple making everything that goes into a home beside computers, like appliances Jun 29 05:00:20 and samsung itself is about 80 different companies Jun 29 05:01:02 anyone got a sec to look at https://github.com/bynarie/android_init.d/tree/master and see if they can spot any reason why this receiver is not being run Jun 29 05:01:13 well they may have a few divisions, but they are definitely not a platform company. just because they invested a few million on some SDK, some samsung store etc, says nothing to me. a few millions for them is just spare money Jun 29 05:01:41 which brings me back to my point about how these are just assets to leverage negociations Jun 29 05:02:06 compare that to the huge platform investments of smaller companies such as amazon, for instance Jun 29 05:02:21 which completely locked google out from their devices Jun 29 05:02:38 gonna go watch obama & attenborough's interview Jun 29 05:03:18 hi, I am working on android nfc, But not the built in api, it's external nfc reader/writer and I need to send apdu commands. I want to know what kind of apdu commands I need to send to change to 0x1xx currently the reading and writing can only be done in 0x0xx section Jun 29 05:04:49 JFlash: I think you’re dramatically underestimating the amount Samsung has invested into Tizen. Jun 29 05:06:04 jfpoole, ping me in 3 years about tizen Jun 29 05:06:28 jfpoole, if you remember by then that it ever existed :) Jun 29 05:06:51 It will take less than that for Tizen to be completely forgotten (probably already is) Jun 29 05:07:54 JFlash: I’m not commenting on whether Tizen will succeed or not. Jun 29 05:08:07 I’m commeting on what Samsung has invested into it. It’s far more than “a few million”. Jun 29 05:08:34 I’ve seen companies throw away 20-40 million on much smaller projects with much less visibility. Jun 29 05:10:59 Does CoordinatorLayout anchor respect margin/padding? It seems to not. Although I'm giving the two children of my coordinator layout a margin of 16dp, they are stacked onto each other Jun 29 05:11:17 jfpoole, sure, I stand corrected than on the value. I just mean to say that they can afford that kind of investiment, wathever it is, just for the leverage power Jun 29 05:17:04 http://i.imgur.com/ldCgnte.png Jun 29 05:43:29 hi, can someone guide me what kind of apdu command to send for sector selection? I have tried ff 88 ... ff 86... they both fail. ff 82 .. is used for loading keys only that one succeeds/ Jun 29 05:44:37 given that you're sending raw APDU, I'd assume you need to look into manual of whatever chip you're interacting with Jun 29 05:46:07 hi! i'm new to android development. i want to add library to android project. how can i do it? gradle doesn't work with that repositore. so i have only library name and 4 sources files. Jun 29 05:50:50 p_l did you see this on HN http://ccl.cse.nd.edu/software/chirp/ Jun 29 05:51:05 I have an activity that's getting resumed whenever a service gets selected to handle an intent. Jun 29 05:52:18 g00s: no, but it doesn't exactly fit my goals - I can't run FUSE on Android xD and the goal is *synchronizing* files around Jun 29 05:52:43 git-annex is good idea AFAIK, but it needs a helluve better client on Android, and I wanted also to have some level of "networked" intents for some time now Jun 29 05:53:13 compile rsync ;) Jun 29 05:54:16 I'm launching a service using a stub activity to recieve an intent. When I do, another activity from the same application is resumed. Not sure if stub related. When an activity finishes, will android potentially re-arrange the recent activity list to favor ones from the App? Jun 29 05:56:29 knapper_tech: you could also have the activity be removed from the recent app lsit Jun 29 05:57:34 can a boot receiver be registered dynamically, or can it ONLY be reg'd in the manifest file? Jun 29 05:57:50 desmin88, the existing paused activity I don't want to remove Jun 29 05:58:02 Im not sure if it's related Jun 29 05:58:02 Hey guys! I need a small help. I am getting response from the server which is a JSON. However, I am not able to access the values from the object. This is how the object looks like. https://cldup.com/_fkZjWSgzE-3000x3000.png Jun 29 05:58:39 * capella not it Jun 29 05:58:47 But I have a suspicion that the finish() call in my stub operates within the application's activity stack (somehow) instead of on the recent app stack. Jun 29 05:59:23 knapper_tech: you could make the stub activity be hidden so the resumed activity is palced in recents Jun 29 06:00:13 desmin88, the stub is launched from 3rd party applications' intents' Jun 29 06:00:30 I have a totally separate activity for other parts of my UI. Jun 29 06:00:36 is the stub activity your own activity? Jun 29 06:00:44 capella-da-star: use gson and parse it to object Jun 29 06:01:03 stub and (potentially running but paused) other activity both are my app Jun 29 06:01:10 then just hide it from recents Jun 29 06:01:17 intents to the stub cause the paused one to get brought to the front Jun 29 06:01:48 but i'm not sure why.. I think some framework code is mistakenly configured regarding what to do when finish is called Jun 29 06:02:29 Can anyone help me figure out where this extra spacing between fabs is coming from? http://i.imgur.com/1m3sVAm.png http://pastie.org/10263860 Jun 29 06:23:54 Well it works correctly on 21+ but <21 not so much. Jun 29 06:29:00 desmin88: "it"? Jun 29 06:29:10 the spacing between the fabs Jun 29 06:29:13 hey thepoosh Jun 29 06:29:18 hi hi Jun 29 06:29:25 you have more than one FAB? Jun 29 06:29:35 yes Jun 29 06:30:31 @_@ Jun 29 06:30:37 fear not Jun 29 06:30:39 FAB stands for F'ing Absolutely Bullocks Jun 29 06:30:49 once i figure out why the fuck they aren't spaced correctly Jun 29 06:30:52 g00s: when did you become a brit? Jun 29 06:31:03 thepoosh learning from Leeds :D Jun 29 06:31:05 desmin88: why not FAB menu like Inbox? Jun 29 06:31:10 lol Jun 29 06:31:11 thats what im trying to do Jun 29 06:31:15 but i have to get them spaced first Jun 29 06:31:20 hmmm Jun 29 06:31:28 that's rather decent of you, old chap Jun 29 06:31:35 :D Jun 29 06:31:37 desmin88: just so you know, Google won't like it if it's in the main layout Jun 29 06:31:39 speaking the Queen's, and all that Jun 29 06:31:53 thepoosh: ? Jun 29 06:32:10 they told us it will get us off the featured list Jun 29 06:32:20 the fuck Jun 29 06:32:22 we were like: "defaq?! inbox does it!" Jun 29 06:32:25 either way, its not Jun 29 06:32:32 they said: "they will never be featured" Jun 29 06:32:45 google is a mess Jun 29 06:32:53 yeah Jun 29 06:32:58 it was a dick move Jun 29 06:33:41 g00s: reading now the responses to the reddit article about square's fragment article Jun 29 06:34:41 thepoosh heh; generally ... i just use what the android framework gives me Jun 29 06:34:49 agreed Jun 29 06:35:03 even though custom views give an edge Jun 29 06:35:50 i do wish they would get rid of the back stack Jun 29 06:35:56 i hate that damn thing Jun 29 06:36:06 it's the attempt to do things for you Jun 29 06:36:19 that results in IllegalStateException every single time Jun 29 06:37:56 desmin88 instead of a FAB, have you considered a bottom sheet ? Jun 29 06:38:04 there's even a library for it Jun 29 06:38:18 where is this library Jun 29 06:38:21 i need it Jun 29 06:39:37 desmin88 https://github.com/Flipboard/bottomsheet Jun 29 06:40:56 g00s: http://www.reddit.com/r/androiddev/comments/3bbw9c/how_square_could_have_responded_to_our_critique/cskro55 Jun 29 06:41:02 sheesh this is harsh Jun 29 06:41:35 hehe Jun 29 06:46:04 bitbucket has been painting my terminal in rainbow colors Jun 29 06:46:27 thepoosh you know why right? Jun 29 06:47:05 yeah Jun 29 06:47:08 http://prntscr.com/7mlp6t Jun 29 06:47:18 hey guys quick question, is it possible to change actionbar item icon? in the image below i want to change icon #4 http://developer.android.com/design/media/action_bar_basics.png Jun 29 06:47:25 my fb feed is as gay as George Takey Jun 29 06:47:33 or how would I add icons like #3 Jun 29 06:47:58 jareddlc: you sent that in the menu.xml for the actionbar Jun 29 06:48:12 right and its not changing for me Jun 29 06:48:31 and then Jun 29 06:48:34 did you set an icon? Jun 29 06:48:47 but item get the default 3 dot icon with drop down, and i dont want that behavior Jun 29 06:48:59 paste your xml Jun 29 06:49:00 android:icon="@android:drawable/ic_input_add" Jun 29 06:49:28 https://gist.github.com/jareddlc/acd2d38709c67248f5a8 Jun 29 06:50:18 desmin88, I found a bunch of xml settings to control relationship between activities and tasks. Jun 29 06:50:34 Punching in the dark, but there's only a handful of relevant settings it seems. Jun 29 06:52:25 anything thepoosh Jun 29 06:52:58 jareddlc: add app:showAsAction="always|collapseActionView" Jun 29 06:53:39 thepoosh: where in menu or item? Jun 29 06:53:45 item Jun 29 06:53:59 also you need to set the actionViewClass Jun 29 06:54:38 aweome thepoosh that worked! Jun 29 06:54:44 cool Jun 29 06:55:03 could i set on Onclick to open a dialog or centext menu Jun 29 06:58:13 dont use the xml onclick Jun 29 06:58:51 desmin88: im currently following the tuts, and i have onOptionsItemSelected whichs seems to execute when i click the button Jun 29 07:16:57 hi guys :) Jun 29 07:21:57 can anyone know how to avoid to call each time onMeasure on a EditText text change? Jun 29 07:31:51 can anyone know how to avoid to call each time onMeasure on a EditText text change? Jun 29 07:32:29 icemanbp: you can override the method to do nothing, but really you don't want to touch it at all Jun 29 07:33:18 but I change text many time, and it freeze my view Jun 29 07:33:36 then don't do that.. what good is it for the user? Jun 29 07:33:48 is a view for settings Jun 29 07:34:03 I need to change the text of text view when I modify the level Jun 29 07:34:08 user need it Jun 29 07:35:45 so that is changed once Jun 29 07:35:49 and I find out that the problem is when I call editText.setText() Jun 29 07:35:52 why are you worrying about it Jun 29 07:36:22 becouse everything is damn slow Jun 29 07:37:00 the problem is not in onMeasure of EditText Jun 29 07:37:09 its most likely your layout Jun 29 07:38:55 but if you have to change text in the editText many many times? Jun 29 07:39:11 then the problem is 'changing the text many many times' Jun 29 07:39:12 paste your entire layout xml Jun 29 07:39:23 who is going to read all that text? Jun 29 07:39:56 user, is a settings view Jun 29 07:39:57 If I get a cursor from a managedQuery, how can I check the number of rows returned? cursor.getCount? I have unique entries in my table and when I do the query the where clause should only return one result, but I get several, when running the query a few times. Jun 29 07:40:30 paste the entire layout xml Jun 29 07:40:56 how do i get width and height of a wraped content view after i added some other views inside ... Jun 29 07:43:30 the site for paste the code? Jun 29 07:43:55 ffs Jun 29 07:44:28 ffs? Jun 29 07:44:29 for example i have a relativelayout that have some framelayout inside, and the relative layout is wraped_content on height parameter, i want to get its height after i added some content inside framelayout and the relative layout is wraped around that content Jun 29 07:45:22 use a paste service Jun 29 07:45:35 on that momment of wraped content i want the get the height of the relative layout ... Jun 29 07:46:11 what is wrong with getheight/getwidth Jun 29 07:46:41 http://pastie.org/10263964 Jun 29 07:46:43 i get the actual layout height before the content added Jun 29 07:46:50 make a viewtreeobserver Jun 29 07:46:56 get the height after the measuring Jun 29 07:47:59 can you elaborate about the viewtreeobserver solution ? Jun 29 07:48:08 g00s: what is the visiual indicator that a bottom sheet exists? Jun 29 07:48:20 that is the layout code, and that edittext is modify many times Jun 29 07:50:29 the material spec for bottom sheets kind of sucks Jun 29 07:52:14 desmin88, could be the problem a deep layout tree? Jun 29 07:52:19 yes Jun 29 07:52:30 editext calling onmeasure is okay Jun 29 07:52:43 but not if your parent view tree is expensiveto measure also Jun 29 07:53:38 I've got root, then some linear, inside that some linear, inside that some relative, and then the edittext Jun 29 07:54:03 any weighted layouts? Jun 29 07:54:45 all width of layouts are or match parent, or weighted, or defined by dp measure Jun 29 07:55:02 then its probably your view tree Jun 29 07:55:06 especially with weighted views Jun 29 07:55:19 what is the suggested solution? Jun 29 07:55:28 flatten your view tree Jun 29 07:55:54 to eliminate some tree level? Jun 29 07:55:59 yes Jun 29 07:56:37 really hard to do Jun 29 07:56:49 well you have to Jun 29 07:56:57 and use most of the time match_parent Jun 29 07:57:22 I've to avoid wrap_content Jun 29 07:57:25 and weight? Jun 29 07:57:35 if the layout tree is deep Jun 29 07:58:15 yes Jun 29 07:58:25 and minimize nested weights Jun 29 07:58:46 oh, now I understand why AndroidStudio tell this Jun 29 07:58:57 I tried to check if I get results from my managedQuery using if ((cursor != null) && (cursor.getCount == 0)), but the count is still sometimes more than 1, even though there is only one entry in the database for the query. Jun 29 08:02:43 thanks desmin88 :) Jun 29 08:02:49 np Jun 29 08:10:17 Woohoo I got this damned thing working after two weeks Jun 29 08:27:40 desmin88, the layout is 19 level deep Jun 29 08:27:48 thats not good Jun 29 08:28:18 what is the suggested max deep? Jun 29 08:28:19 10? Jun 29 08:28:27 that's... deep, man Jun 29 08:28:57 I'd be worried with anything much more than 4 or 5, in most cases Jun 29 08:29:43 ok, but if you start tu use include and fragments deep grow fast Jun 29 08:31:01 seriously, 19 sounds way too deep to me Jun 29 08:31:56 can you post the layout again? Jun 29 08:36:49 difficult to post Jun 29 08:37:09 becouse is made by fragment and some include of custom views... :( Jun 29 08:37:23 ok :( Jun 29 08:37:28 but on a different version of android it goes well Jun 29 08:37:43 cant help then. Came too late Jun 29 08:37:47 it have performance problem on the 4.2.2 version Jun 29 08:38:10 it goes well on 4.4.2 Jun 29 08:38:20 maybe the made some optimizations Jun 29 08:39:07 maybe because of view hierarchy depth Jun 29 08:41:11 but guys, if you have to divide a view in 60% and 40%, what do you use? becouse I use weigth to get the goal... but is not performing... Jun 29 08:42:04 you can use the new percent support lib Jun 29 08:42:34 icemanbp, weight is fine, unless you nest it Jun 29 08:42:44 a weight in a weight is bad Jun 29 08:43:20 ok, and if then I've to use divide the sub view in 30% and 70%? Jun 29 08:43:32 how can you get it, without using nested weight? Jun 29 08:43:47 use percentrelativelayout Jun 29 08:43:56 ?? Jun 29 08:44:55 depends on the use case. you could make it into one layout thats devided in 4 parts instead of nesting Jun 29 08:45:34 eheh, and how you divide in 4 parts? Jun 29 08:45:44 I'm using weight everywhere Jun 29 08:47:06 Nested weights are slow. Jun 29 08:48:34 ye, I find out it this morning... :D Jun 29 08:48:57 maybe just change your design Jun 29 08:49:14 i cant imagine a case where you would need a lot of weights Jun 29 08:49:47 I try to explain my case if you want Jun 29 08:52:35 try ;) Jun 29 08:53:36 so, I've a base view Jun 29 08:53:43 where I inflate a Fragment Jun 29 08:54:17 inside it a tab view Jun 29 08:54:34 and inside one of this tab I've the setting view Jun 29 08:55:06 each group of setting is a layout (for have a background color, looks like a panel) Jun 29 08:55:14 each of the settings is an include Jun 29 08:55:17 :D Jun 29 08:55:21 cant see where to use weights until now Jun 29 08:55:32 danijoo: How do you solve scenarios where you need things like splitting a view 1/3, 2/3 dynamically on different screen sizes. I would use weights 1 and 2. How would you tackle that without weights? Jun 29 08:55:50 barq, id use weights Jun 29 08:56:10 id use the percent support lib Jun 29 08:56:49 cant see a difference vs weights and percent.. Jun 29 08:56:51 ok, maybe not nested weights problem, but deep three.... Jun 29 08:57:18 if you want each panel 30% percent width of its parent Jun 29 08:57:35 inside it, each single settings 10% height of the parent panel Jun 29 08:58:10 maybe stop using weights for everything and reinvent your ui in dp Jun 29 08:59:01 yep Jun 29 08:59:10 could be the solution Jun 29 08:59:33 but hard to understand, and not always get the result that you want on different screen size Jun 29 09:00:45 You can adjust for differnt screens using dp only? Jun 29 09:00:47 Yeah, using weights should be avoided like plague. Jun 29 09:02:17 many thanks guys :) Jun 29 09:02:28 barq, of course Jun 29 09:02:44 scaling item sizes to a different screen rarely makes sense anyway Jun 29 09:03:12 just like scaling desktop UI items as you go from 13" to 24" desktop monitor doesn't either Jun 29 09:03:19 you want more space not larger letters and buttons Jun 29 09:04:23 Say I have two images that should take up half the screen width each. How would you solve that for different screen sizes? I had big trouble with too small and overlapping images when not using weight. Jun 29 09:04:36 yup. if you use weights for everything and go from an old phone to tablet, your ui will look like its made for 3 yrs old Jun 29 09:06:31 I thought if you want to make your app available for tablets you need a special layout for them? Or at least set supported screen-sizes in the manifest? Jun 29 09:06:49 At least my app cannot be downloaded from tablets right now. Jun 29 09:06:58 I tried it on one, it looked horrific. Jun 29 09:07:07 Unless you force portraid mode. Jun 29 09:07:13 portrait Jun 29 09:07:15 even in portrait mode Jun 29 09:08:37 you can define different layout for different screen size Jun 29 09:09:10 is there a simple way to add a view to my recyclerview which isn't part of the items? like a title Jun 29 09:11:40 onDestroy for a Fragment is ok to save there my shared prefs ? Jun 29 09:11:46 So I would define layout-large for tablets then. Jun 29 09:11:54 csst0111, no Jun 29 09:12:04 csst0111: No. You never no when onDestroy will happen or whether it will happen. Jun 29 09:12:19 ok Jun 29 09:12:36 exactly barq, or you can tell also the min pixel size Jun 29 09:13:16 csst0111: Use onStop or onSavedInstanceState Jun 29 09:13:30 barq, thanks Jun 29 09:51:21 Hey guys! I am trying to post a json to the server. But on the server I am getting it inside another key "nameValuePairs". I don't want that. Can somebody help me out? Jun 29 09:51:35 Here is the code. https://dpaste.de/n0Zu Jun 29 09:53:12 capella-da-star, how does the resulting json look like Jun 29 09:53:27 {u'nameValuePairs': {u'broadcasts_on_mobile': True, u'likes_on_own_posts_mobile': False, u'likes_on_own_comments_mobile': True}} Jun 29 09:53:40 Here. This is what I receive on server. Jun 29 09:55:12 danijoo: Any idea what I did wrong here? Jun 29 09:56:56 is this gson or the other one? Jun 29 09:57:04 try this: https://dpaste.de/vZgY#L6 Jun 29 10:00:11 where is the code that parse the objects to json? Jun 29 10:01:53 i think it adds this nameValuePairs as root autmatically if you dont pass it an object like i did in my paste Jun 29 10:02:47 Still the same result Jun 29 10:02:58 could it be problem with retrofit? Jun 29 10:03:39 I am using that to send API calls. Jun 29 10:04:10 no idea. There are plenty of results for that on google though Jun 29 10:04:16 you are not the only one with this prob Jun 29 10:04:28 maybe read some stackoverflow questions for an answer Jun 29 10:04:33 This is the interface https://dpaste.de/sqCR Jun 29 10:04:45 I tried finding solution. Couldn't so asked here. Jun 29 10:05:36 have you tried passing a hash to retrofit instead of the jsonobject? Jun 29 10:05:46 i think retrofit parses the json on its own Jun 29 10:07:09 I think this is the problem I am facing. http://stackoverflow.com/questions/26022133/how-can-i-delete-the-namevaluepairs-key-from-the-jsonobject Jun 29 10:08:01 capella-da-star, try changing your interface to saveNotificationSetting(@Body HashMap userSettings) and see whats happending Jun 29 10:08:13 or create a SettingsObject that is parseable using gson Jun 29 10:08:25 dont try to do retrofits job ;) Jun 29 10:14:50 danijoo: Thanks for your help. It is working now :) I am very new to Android/Java, to asking these naive questions. Jun 29 10:14:59 *so Jun 29 10:15:00 yw :) Jun 29 10:18:22 I've got a Uri of a provider, is there a way to get list of available tables? Jun 29 10:23:01 shouldnt you know what tables you want to query when you write the code? Jun 29 10:25:22 danijoo: LG changed the table :/ Jun 29 10:27:12 of what? Jun 29 10:28:42 danijoo: the table of the select apps to be shown on its Quick Circle launcher Jun 29 10:30:26 I have the URI and even the class name, is there a way to access it? (Apktool is also option) Jun 29 10:36:17 how can i get the width and height of activity? in the onCreate method? Jun 29 10:37:38 joroci http://stackoverflow.com/questions/8885650/getting-the-width-height-of-a-layout-in-android Jun 29 10:38:01 the first answer Jun 29 10:39:29 what actually happens when my app crashes.. sometimes it shows dialog OK (or close) sometimes no Jun 29 10:39:44 and when my service crashes, it still partly works while the dialog is shown Jun 29 10:40:26 ctrlshftn what size it will give for phones like nexus 5 with the bottom bar Jun 29 10:40:28 ? Jun 29 10:44:44 joroci try it out on your phone and check whether it matches the resolution or something Jun 29 10:44:54 I dont have a clear idea Jun 29 10:46:33 Ashiren, i think its just the apps process that stop Jun 29 10:46:42 if you have a service in a seperate process, it will keep running Jun 29 10:47:00 same for service crash. App will keep running Jun 29 10:48:05 service its the same process Jun 29 10:48:34 just make it not crash :p Jun 29 10:49:32 well this is android Jun 29 10:50:18 yes. and even on android your app should not crash :p Jun 29 10:50:36 ^ Jun 29 10:50:37 well google play shouldnt crash neither Jun 29 10:51:27 what kind of reasoning is this... ^^' Jun 29 10:51:59 im just a bit frustrated at this point Jun 29 10:52:40 whats your actual issue? Jun 29 10:53:27 broadcast receiving when bluetooth is off Jun 29 10:54:05 on some devices stopLeScan makes crash but just before in logs i get some h/w error which is low level bluetooth LE error Jun 29 10:54:23 and the workaround is, well, try catch all exception Jun 29 10:55:35 hello Jun 29 10:55:58 good afternoon Jun 29 10:56:32 hello Jun 29 10:57:07 hello, how can i send push notification to android device from my own sftp server? Jun 29 10:57:22 i searched the internet but didn't found anything helping Jun 29 10:58:12 Ashiren, yeah I heard BT sucks much on android :/ Jun 29 10:58:17 cant help there unfortunatly Jun 29 10:58:28 linuxholic, you cant send push from ftp server Jun 29 10:58:36 why? Jun 29 10:58:42 because ftp is for file storage Jun 29 10:58:46 you need a real server Jun 29 10:59:04 danijoo: Can I have that one question now? :p Jun 29 10:59:05 danijoo, thanks Jun 29 10:59:29 tx, is this the question you want to ask? :p Jun 29 10:59:40 yes Jun 29 10:59:42 danijoo, can i built a server on my raspberry pi? Jun 29 10:59:48 linuxholic: probably. Jun 29 10:59:52 the answer to your only question is "yes" then. Jun 29 11:00:09 thanks everyone Jun 29 11:00:09 Oh you trickster. Jun 29 11:00:13 linuxholic, sure. will it be enough? is the question you should ask yourself :) Jun 29 11:00:37 no :D Jun 29 11:00:39 tx, just ask your questions in here. dont ask to ask Jun 29 11:01:23 Alright, I have a gridview with some views on the grid that are animating forever. If I go to clear the gridview, they stick around (the animating ones) Jun 29 11:01:47 and there's no way to get rid of them, they seem to detach from the gridview and get stuck on the screen forever. Jun 29 11:01:51 guys where can i find system icons other than the ones provided by google ? Jun 29 11:02:27 alexi5, http://www.flaticon.com/ Jun 29 11:02:31 https://github.com/JoanZapata/android-iconify Jun 29 11:02:37 If you're looking for a library of sorts. :p Jun 29 11:02:51 contains all of the font-awesome icons. Jun 29 11:03:01 But note, they are "font icons", not images. Jun 29 11:03:29 Can still be used as drawables though Jun 29 11:03:38 danijoo, how can i setup my own local server? Jun 29 11:03:49 linuxholic, beyond the scope of this channel Jun 29 11:03:58 any link to the proper guide? Jun 29 11:03:58 this is app development not "how to linux" Jun 29 11:04:12 ;D Jun 29 11:04:13 #raspberrypi Jun 29 11:04:36 or #debian Jun 29 11:04:38 Oh, cya. Jun 29 11:04:55 thanks Jun 29 11:21:37 I added the bonus back according to the instructions, but I'm unsure on where to add the dependancy clause. I now have 3 gradle files. Project, app and osmbonuspack... Jun 29 11:21:47 https://github.com/MKergall/osmbonuspack/wiki/HowToInclude Jun 29 11:31:15 gavit, the one in your app folder Jun 29 11:32:27 danijoo: that's what I suspected, but I get an error. Failed to resolve osmbonuspack_5.2: Jun 29 11:32:33 Open File Jun 29 11:32:49 show your gradle file Jun 29 11:32:51 I already renamed the file to the correct caps etc Jun 29 11:34:43 danijoo: https://gist.github.com/anonymous/ed03aac2e066820baee0 Jun 29 11:35:28 Hi all, I have a viewpager with 3 pages, 2 of these are recyclerviews... I've just changed all my old FABs to the new FAB with the design library. I'm now using a CoordinatorLayout and am having to use one FAB for both fragments and change the icon/click listener on page change... Jun 29 11:35:51 danijoo: file: $projectdir/libs/osmbonuspack_v5.2.aar Jun 29 11:36:12 I can't get the FAB to not display on the first page, even when it is set to visibility="gone" as default, it still shows. Any ideas? Jun 29 11:36:46 Memery: I prolly can't help, but what's a FAB? Jun 29 11:36:55 FloatingActionButton Jun 29 11:37:22 I thought that visibility only worked with viewstubs Jun 29 11:37:49 gavit, the flatDir part should go to the apps gradle as well. not the apllication wide Jun 29 11:38:43 So how would I hide it on the first page? Jun 29 11:39:37 my toobar is not scrolling with recyclerView. Why? http://pastebin.com/0fyuLN5q Jun 29 11:39:40 I would prefer to have the button in the fragment layout but that doesn't work as it cuts it off (known issue) Jun 29 11:40:12 You don't need this android.support.design.widget.CollapsingToolbarLayout Jun 29 11:40:28 https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29/ Jun 29 11:47:01 danijoo: thanks Jun 29 11:48:34 I hate these stupid FABs Jun 29 11:49:20 danijoo: https://gist.github.com/anonymous/13b3bdcb36b059e575c6 <- still same error Jun 29 11:49:37 Memery, maybe coordinatorlayout overrides your setting at some point Jun 29 11:50:14 gavit, in what folder do you have the aar Jun 29 11:50:57 Possibly, I'll look into that Jun 29 11:51:17 danijoo: file: $projectdir/libs/osmbonuspack_v5.2.aar Jun 29 11:51:23 To me it seems stupid to use on button for multiple actions across different fragments... Jun 29 11:51:40 constantly changing the click listener and colour/icon Jun 29 11:51:46 danijoo: should it be in $projectdir/app/libs? Jun 29 11:51:47 one* Jun 29 11:51:53 gavit, I think so Jun 29 11:52:02 Memery, you dont have to Jun 29 11:52:08 just put one button in every fragment Jun 29 11:52:17 They don't work properly in the fragments Jun 29 11:52:22 They get cut off by the scrolling Jun 29 11:52:29 danijoo: thanks Jun 29 11:52:31 works Jun 29 11:52:34 finally Jun 29 11:52:35 Memery, they do for me Jun 29 11:52:36 It may be a bug that they're planning on fixing Jun 29 11:52:51 ah well. i dont scroll them Jun 29 11:52:54 Are you using a viewpager with a toolbar the disappears on scroll? Jun 29 11:53:14 What is wrong with my typing today... Jun 29 11:53:34 Brain turned to mush... must be the heat. Jun 29 11:53:38 * gavit is gonna play with FAB's later :P Jun 29 11:53:47 for now I'm gonna play with my new map bonus :P Jun 29 11:56:30 map bonus? Jun 29 12:01:04 Memery: https://github.com/MKergall/osmbonuspack Jun 29 12:03:03 Oh cool Jun 29 12:04:12 Doesn't look as pretty as the standard MapView or whatever it is, but functionality is all there Jun 29 12:06:57 Memery: It actually subclassesMapView. the tiles are on par: http://www.haakseth.com/wp-content/uploads/2012/02/MobAtCreator2.png Jun 29 12:07:29 wow, are those froyo screenshots Jun 29 12:07:36 in osmbonuspack Jun 29 12:09:18 Oh it looks different to what I use Jun 29 12:09:59 hi, i have a menu with icon @drawable/ic_action_search , can i change the color of this default icon ? Jun 29 12:10:03 Zharf, yup ^^ Jun 29 12:10:26 t0th_-_, yes, if you open it in gimp and edit it :) Jun 29 12:10:30 blast from the past Jun 29 12:10:47 ok Jun 29 12:11:00 thanks Jun 29 12:11:02 Not sure if anybody is interested but I found the answer to my question Jun 29 12:11:14 CoordinatorLayout doesn't let you use visibility unless the anchor id is null Jun 29 12:11:38 ah. Jun 29 12:11:40 kinda makes sense Jun 29 12:12:46 yeh kinda... Jun 29 12:14:23 Anyway, back to work... Zzz Jun 29 12:15:20 I wish my job was sleeping Jun 29 12:20:51 Zharf: I saw a job ad for homer simpsons job the other day Jun 29 12:25:59 experimenting with recyclerview because bored... is there any way to trigger the span count change animation of gridlayoutmanager without calling one of the adapter.notifyItem* methods Jun 29 12:26:44 seems like notifyItemChanged(0) will trigger the animation but I noticed that it also does some highlight animation on the item too Jun 29 12:26:45 apple trainees earn 80k $ per year. Damn, i've chosen the wrong job.. Jun 29 12:27:08 danijoo, pft, money Jun 29 12:27:21 ok, fixed my problem with infinitely animating cells in gridviews Jun 29 12:27:30 I basically iterate over the gridview (getchildcount and getchildat) Jun 29 12:27:34 and clear any animations Jun 29 12:27:40 http://mashable.com/2015/06/28/apple-interns-pay/ Jun 29 12:27:43 seems like a hacky way around it but it works. Jun 29 12:28:37 danijoo, they're paying them to be willing to subject to brainwashing Jun 29 12:28:41 tx, i think thats the only way to go Jun 29 12:28:59 Zharf, arent they already? :P Jun 29 12:31:32 wonder if it's intentional or not Jun 29 12:31:34 or a bug. Jun 29 12:32:42 tx, are you using ItemAnimator? Jun 29 12:33:58 ah nvm. ItemAnimator is only for Recylerview Jun 29 12:34:01 yeah Jun 29 12:34:46 RecyclerView is a fairly recent thing. Jun 29 12:34:48 no? Jun 29 12:34:50 yup Jun 29 12:34:52 "This class defines the animations that take place on items as changes are made to the adapter. " Jun 29 12:34:57 I have not yet used one. ;) Jun 29 12:35:13 I've been experimenting with it recently and it seems really quite good Jun 29 12:35:19 So I have heard. Jun 29 12:35:19 you might want to switch to it for animations Jun 29 12:35:33 danijoo: I don't actually have an issue with animations in general Jun 29 12:35:35 because of the built in itemanimator Jun 29 12:35:41 just switching between different data lists Jun 29 12:35:44 and infinite animations :P Jun 29 12:35:47 but I can't figure out how to trigger span change or orientation change animations without triggering highlight on an item Jun 29 12:43:22 Is it bad practice to call finish from doInBackground? Jun 29 12:49:35 I have a question can anyone help me Jun 29 12:53:08 probably not unless you actually ask the question as well Jun 29 12:54:05 i'm trying to connect my android to a c++ program any idea how to do that Jun 29 13:00:16 Do we have to use the ndk for that? or is there a wrapper? Jun 29 13:02:16 Hey all! I have a DialogFragment which is opened by another fragment. However, in the dialog fragment's onclick handler, getParentFragment() returns null. Any idea why this could happen? Jun 29 13:03:38 george3, connect how Jun 29 13:04:09 data transfer Jun 29 13:04:20 robolectric's api makes me cry Jun 29 13:04:47 george3, need more info on what you're trying to do Jun 29 13:05:47 how do I receive data in my c++ program that is being sent from an android device via USB Jun 29 13:08:59 so your application on the android device sends data over USB to a PC? your application on the PC is very much dependent on the OS. Jun 29 13:09:50 windows Jun 29 13:09:56 do you have a question about the android application side? I think you're unlikely to find help for the PC part from here Jun 29 13:10:15 Is it possible to manipulate ui elements such as TextView from doInBackground? I know it is bad practice, but is it possible without runOnUiThread? Jun 29 13:10:26 george3: #android Jun 29 13:10:33 yea how do I send the data from android to the c++ program Jun 29 13:10:45 via USB Jun 29 13:11:55 http://stackoverflow.com/a/24290009/857853 possibly Jun 29 13:12:01 george3: http://stackoverflow.com/questions/21808223/send-data-through-usb-from-android-app-to-pc Jun 29 13:12:03 mabe Jun 29 13:12:13 same page ;) Jun 29 13:12:34 I've never actually used the USB APIs Jun 29 13:12:51 https://developer.android.com/guide/topics/connectivity/usb/index.html Jun 29 13:12:57 Hello folks! Jun 29 13:13:44 I read those posts the problem is all these send the data to a terminal on the pc, I want to send it directly to my c++ program to use it Jun 29 13:14:03 I just upgrade from 1.7 to 1.8 the SDK at my computer. I wonder if I can use it with Android Studio or it uses a specific android-sdk? Jun 29 13:20:34 the thing with USB is that you can't have two hosts talk to each other easily... one of them would need to be in device mode and I'm not sure if you can do that with android APIs and also no clue how it would be done in a PC Jun 29 13:20:58 Hi, I did uncheck my docked option from my preview on android studio, now I Jun 29 13:21:14 now I'm not been able to set it docked again. Jun 29 13:21:32 **sorry, hit return by mistake** Jun 29 13:21:54 apparently https://developer.android.com/reference/android/hardware/usb/UsbAccessory.html is supposed to be used for talking to USB hosts Jun 29 13:27:38 what is the best way to insert tons of data into sqlite database? Jun 29 13:27:59 transaction and insert statements? :) Jun 29 13:29:41 carefully Jun 29 13:31:18 is it possible to define a style for a linearlayout and have another style for textviews inside a linearlayout with that specific style, without setting the style manually on the textview? Jun 29 13:31:38 i do this in such way: http://privatepaste.com/ee80dedaf5 Jun 29 13:31:53 such that the textview 'sees' what style the layout is, and then knows it should use the substyle Jun 29 13:32:42 xorgate, have you tried to define a textViewStyle item in the linear layouts style? Jun 29 13:33:23 danijoo: no, but i guess it's the answer :) Jun 29 13:35:44 ahah Jun 29 13:36:03 calling notifyItemChanged with -1 triggers the orientation and span animations Jun 29 13:36:17 without highlighting any items Jun 29 13:36:32 people what about bulkInsert into sqlite? http://privatepaste.com/ee80dedaf5 Jun 29 13:37:19 no need to repaste... anyway... it looks like what I just said Jun 29 13:37:43 is it fastet way of bulk insert? Jun 29 13:37:51 *fastest Jun 29 13:38:31 I'm not a DB expert but since it's inside a transaction it should be pretty fast Jun 29 13:39:27 (I recently worked on some legacy code that didn't use transactions and it was butt slow, was easy to fix that by just putting stuff inside transactions) Jun 29 13:41:58 well i've being adviced to use raw sql like this: insert into table(f1, f2, ...) values(v1, v2, ..)(v11, v22, ...)... Jun 29 13:42:21 butt i don't know will it be faster than code above Jun 29 13:49:04 ondroed, quick googling makes me think that there isn't much difference in the two... but you could do benchmarks of your own of course Jun 29 13:51:19 http://blog.quibb.org/2010/08/fast-bulk-inserts-into-sqlite/ Jun 29 13:54:05 thanks! Jun 29 13:54:25 apparently Richard Hipp has said Jun 29 13:54:27 "The new multi-valued insert is merely syntactic suger (sic) for the compound insert. Jun 29 13:54:30 There is no performance advantage one way or the other." Jun 29 14:06:25 why when i set a bitmap i created to an imageview(using screen size width and height, it doesn't fit to the imageview? Jun 29 14:06:27 width Jun 29 14:06:53 joroci: it's probably a dpi conversion issue Jun 29 14:07:09 more details needed though Jun 29 14:09:46 http://pastebin.com/JdXEaq8U Jun 29 14:10:05 the xml is just an imageview with matchparent height and width Jun 29 14:12:51 any clue? Jun 29 14:14:50 your radius is only 75 Jun 29 14:15:05 what are you expecting? Jun 29 14:15:20 i'm expecting the bitmap to fit the view , but it's like i have padding on the sidse Jun 29 14:15:33 sides Jun 29 14:15:51 draw a different colour background on that canvas to see what you're doing Jun 29 14:16:09 if the problem really is what you think it is Jun 29 14:16:31 if i'm setting the src of the imageview to some color it does fit Jun 29 14:17:14 that's not even close to what I just said Jun 29 14:17:28 i know i was just typing i'm testing what you said now , sec Jun 29 14:17:33 ok :) Jun 29 14:19:21 yea, just doesn't fit Jun 29 14:20:37 "public void setLayout (int width, int height)" Jun 29 14:20:44 what on earth are the units for "width" and "height" Jun 29 14:21:37 tx, if not stated otherwise, its always pixels Jun 29 14:23:11 joroci, doublecheck the size you give the bitmap and make sure it has the same density as the screen Jun 29 14:23:32 it's in pixels the width is correct 1080 Jun 29 14:23:45 then set the right density Jun 29 14:23:59 (although it should default to the right one, but doublecheck it anyway) Jun 29 14:24:05 not sure where do i set it? Jun 29 14:24:12 on the bitmap after creating it Jun 29 14:24:16 before drawing on it Jun 29 14:25:19 danijoo: alrighty Jun 29 14:27:06 checking Jun 29 14:28:19 no go Jun 29 14:29:20 think i need to change the scaleType to fitXY Jun 29 14:29:39 joroci, yep Jun 29 14:29:46 shouldn't need to if the bitmap is the right sice Jun 29 14:29:54 size Jun 29 14:29:58 weird typo Jun 29 14:30:16 i know but the pixels and density are correct Jun 29 14:30:38 answer is simple: you have a screen-sized canvas/bitmap, but you're only drawing with radius 75px Jun 29 14:30:52 clearly, you should end up with a full screen image, and a 150px wide circle Jun 29 14:32:08 it's the same size with or without the circle Jun 29 14:32:28 can you provide compilable code Jun 29 14:33:19 not sure if i should put more effort into this since fitXY is working Jun 29 14:35:09 I would be concerned about rendering quality in that case :) Jun 29 14:35:23 i was too, but it looks the same Jun 29 14:35:40 the circle Jun 29 14:45:28 hii everyone !!! i have a problem tht the notification is not starting intended activity Jun 29 14:45:31 https://gist.github.com/rohit5roy/152d72f13d6086dc3898 Jun 29 14:45:40 this the snippet Jun 29 14:46:21 is there some sort of online editor that my designer can use to make animated drawables? LIke for example hamburger icon morphing into arrow icon? (to save myself the trouble) Jun 29 14:47:00 rohit7roy, what is it starting then Jun 29 14:49:44 apocalypse Jun 29 14:59:59 Zharf: what do u mean by what is the starting ? Jun 29 15:00:26 if it's not starting the intended activity, what is it starting? Jun 29 15:00:27 Zharf: sorry didnt read it properly Jun 29 15:00:36 its not doing anything Jun 29 15:02:12 what does logcat say when it's trying to start Jun 29 15:04:18 nothing Jun 29 15:04:20 maybe you need to set content before the intent to it Jun 29 15:04:26 (just a guess) Jun 29 15:04:53 I'm about to fall asleep... I guess I should get off work and sleep on the bus again -> Jun 29 15:05:43 I miss sleeping on the bus... guess I'm too old now :< Jun 29 15:06:14 hsousa, how old must one be to not be allowed to sit in busses? :P Jun 29 15:06:16 I frequently wake up at the end of line Jun 29 15:07:02 danijoo, its not an issue of not been allowed to go on busses, it's a matter of cannot fall asleep on them anymore :p Jun 29 15:07:12 without sleeping 2/3 hours per night, at least Jun 29 15:07:18 hehe Jun 29 15:07:57 how old are you then? what prevents you from falling asleep in a bus? :) Jun 29 15:08:47 ^^ Jun 29 15:10:54 I hate databases... especially big ones >.< Jun 29 15:12:05 Zharf, i really dunno, when i was younger i remeber falling asleeping everywhere, even on the middle of the road :P Jun 29 15:12:59 http://www.theregister.co.uk/2015/06/28/lgs_sixsided_battery_to_take_smart_watches_into_new_timezones/ << why does this deserve an extra artice? Jun 29 15:13:44 hsousa, do you remember anything else from those days? :) Jun 29 15:14:05 "Hey guys, I have an awesome idea! lets make the battery fit the shape and we can put more in" - "wooahh" Jun 29 15:14:10 mind == blown Jun 29 15:14:10 ahah good question... it were the 90«s u know :) Jun 29 15:14:13 well I'm 31 and I don't sleep much at night Jun 29 15:15:59 anyone ever deal with android studio looking like this on a 4k screen? http://imgur.com/WX0Jk2x Jun 29 15:18:14 powersurge, whats the issue in that screenshot? Jun 29 15:18:22 the tiny font? Jun 29 15:20:52 Other than it not getting some of the icons quite right, it looks ok to me Jun 29 15:21:00 i've seen far far worse behavior from linux on high res screens Jun 29 15:21:20 I had to set up AS to use 24 point fonts for all my stuff Jun 29 15:23:54 I have a question Jun 29 15:24:10 powersurge, did you try the is.hdpi flag? Jun 29 15:24:35 I wanted to send data from my android device to a c++ program on my pc Jun 29 15:26:23 george3, I was traveling so didn't reply to your email. Your simplest option is to implement a bluetooth connection using rfcomm / SPP, your laptop can talk to it just fine Jun 29 15:26:30 it's squished up danijoo Mavrik Jun 29 15:26:35 note the 1px font in the bottom bar Jun 29 15:26:44 then you just get a com port on windows or a tty on linux and read from it like any other terminal/com port device Jun 29 15:26:47 & Mavrik that flag has been replaced with hidpi=true Jun 29 15:26:54 which I am running Jun 29 15:27:07 otherwise you have to deal with the usb accessory api, which is well documented by google but probably a big hassle for you to get working on the host side Jun 29 15:27:22 it mostly solves my problems but icons are still small and there's a lot of cut off in the new project dialog Jun 29 15:27:33 I can't pick an activity, for example, because the labels are all unreadable Jun 29 15:27:47 Yeah, I think Google never really tested that Jun 29 15:27:53 I'm on a diff computer atm, so unfortunately I don't have a screenshot for that Jun 29 15:28:01 powersurge, seems like AS is not yet updated for 4K Jun 29 15:28:07 yea, I'm thinking it's something I may just have to tough out until 4k screens get a little more widespread Jun 29 15:28:21 just wanted to ask in case someone had some magic 4k pixie dust that I was unaware of Jun 29 15:28:24 isnt there something like a compability mode for programs? Jun 29 15:28:31 powersurge, you'll have to play with your font settings. I don't recall it being unusable, but i was able to improve it by changing the fonts in the preferences. The menus were pretty crap to begin with. Jun 29 15:28:32 not as far as I'm aware Jun 29 15:28:49 powersurge, you can always drop your native res and boost all the fonts you can find Jun 29 15:28:54 and then go back and see if it's any better Jun 29 15:29:15 once I start a project I haven't really experienced any warts, it's just that initial 'new project' wizard that seems to have all the bugs Jun 29 15:29:27 i'm still weeding out disagreements in font size crap, looks like you're using ubuntu from the window borders. For a while 15.04 figured out screen res properly, then forgot how to do it Jun 29 15:29:47 yea, unity has a different set of workarounds, ha ha Jun 29 15:29:59 powersurge, i don't use unity, either, which makes it even worse :P Jun 29 15:30:00 I can set the scale but it doesn't detect it on boot Jun 29 15:30:19 powersurge, how do you set the scale? Jun 29 15:30:27 hmm, in ndk/jni, how do I pass an opaque blob of memory from jni to java to hang onto? Jun 29 15:30:31 e.g. like a context handle Jun 29 15:30:32 yea, I was using gnome ubuntu for a while ait worked really great but I had a bug with my mouse that caused all touches to register as clicks/drags Jun 29 15:30:35 which made it unusable Jun 29 15:30:42 it's in appearance settings, iirc Jun 29 15:30:45 dragorn: ^ Jun 29 15:30:51 I don't have that computer in front of me, I'm afraid Jun 29 15:31:10 it fixed almost all of the issues with a 4k screen in unity, except it's user settings so lightdm doesn't pick it up Jun 29 15:31:17 I suppose I could just make it a byte[] and store it that way... Jun 29 15:31:25 in addition to that, until you manually restart unity your cursor is just a grain of salt, heh Jun 29 15:31:42 powersurge, ah, ok. Yeah, there's a bunch of weird quirks. I never solved the cursor thing. :P Jun 29 15:32:26 yea, if you hit alt+f2 and run unity it'll reboot the DE and the cursor will be scaled Jun 29 15:32:58 powersurge, interesting. Definitely got a ways to go for supporting high res screens Jun 29 15:33:01 I'm running the xps 13 and tbh, I'm disappointed all the crap I've had to deal with with ubuntu. but I'm beginning to get off topic Jun 29 15:33:22 powersurge, yeah, we're straying a bit off android stuff. Let me see if that screen in AS is still stupid in mine. Jun 29 15:33:56 much appreciated :> Jun 29 15:34:24 powersurge, it's less broken on mine, but that bottom text is still broken. Jun 29 15:35:20 powersurge, I'm not quite 4k so it's probably marginally ebtter Jun 29 15:37:02 https://rkennke.wordpress.com/2007/07/30/efficient-jni-programming-iv-wrapping-native-data-objects/ Jun 29 15:37:04 ah, handy Jun 29 15:37:06 that'll do what I want Jun 29 15:38:22 dragorn what i've done so far is check for available USB devices, get vendor id, and establish endpoints for bulktransfer, the bulktransfer didn't work for me, and from what I have read it outputs to a PC terminal so its of no use to me because I won't be able to use the data Jun 29 15:39:34 thanks for validating that dragorn Jun 29 15:40:07 it's not impossible to work around, I'll just have to be patient while they get up to speed with 4k monitors, I suppose Jun 29 15:40:27 powersurge, I believe the java ui stuff has no concept Jun 29 15:47:54 hello Jun 29 15:49:52 hi guys it posible to package an android application with an existing database (sqlite) and if not is it possible to package the raw data (eg in a CV file) and create a database from this data and discard the raw data ? Jun 29 15:51:00 Hello. I have developed an app that used to work fine but now refuses to start (on a new device) with the following error log: http://codepad.org/bCtvDiiB Jun 29 15:51:07 If anybody could take a quick look I’d appreciate it very much Jun 29 15:54:41 call looper.poopare() Jun 29 15:55:18 kenalex, as I recall it's a bad plan to ship w/ the db precreated, but you could certainly create it from csv, sure Jun 29 15:56:48 poopare sounds like a Latin verb... Jun 29 15:57:49 dragorn: once the database is create from a csv file how can I delete the packaged csv file ? Jun 29 16:04:46 kenalex: I want the same thing Jun 29 16:04:48 Does anybody knows a free tool for Android mockup projects? Jun 29 16:05:17 Or, at least, a good one? Jun 29 16:13:15 Android studio :P Jun 29 16:14:12 https://proto.io/ Jun 29 16:14:14 is okay. Jun 29 16:14:26 tx: I was expecting something more "artistic". Jun 29 16:14:54 ircfox: Hey, I gave you my real answer after. :p Jun 29 16:15:30 tx: mm, cool, let me check. I was visiting balsamiq.com but it uses iOS interface mostly. Jun 29 16:15:30 ircfox, only if you want to pay for it Jun 29 16:15:44 theres also http://www.invisionapp.com/ Jun 29 16:16:04 tx: o/ :D Jun 29 16:16:04 ooh yes Jun 29 16:16:08 invision is very nice Jun 29 16:16:19 danijoo: is it free? :P Jun 29 16:16:33 yes Jun 29 16:16:38 on the page is literally said Jun 29 16:16:41 "free forever" Jun 29 16:16:56 tx: I think it means free registration forever. Jun 29 16:17:10 tx: sign up free. Jun 29 16:17:15 :\ Jun 29 16:17:31 txbut not sure, I will test it as well. Jun 29 16:17:31 (was not intentional) Jun 29 16:18:08 Thank you a lot guys! You rock! ;) Jun 29 16:19:15 maybe free for private usage Jun 29 16:19:37 danijoo: and what does it means? Jun 29 16:20:05 no professional usage Jun 29 16:20:07 danijoo: that if I use it for non-comercial propose I won't have to pay? Jun 29 16:20:19 danijoo: oh, alright then. Jun 29 16:20:47 ircfox, usually the free version of products say only for private use. meaning you cant use it for business Jun 29 16:21:09 danijoo: yes, correct. Jun 29 16:34:50 can removing items from maps while iterating over keyset cause ConcurrentModificationException? Jun 29 16:35:13 Yes. Jun 29 16:35:17 ok thanks Jun 29 16:35:39 altcp: You can use ConcurrentMap Jun 29 16:36:03 which is not the same as synchronisedMap I assume? Jun 29 16:37:35 (it's alright, looked it up) Jun 29 17:03:44 ircfox, try http://marvelapp.com Jun 29 17:04:07 ? Jun 29 17:05:51 In Android Studio whenever I hover over a variable or method the documentation pops up straight away. How can I get this to go away? Jun 29 17:06:48 barq: that is not normal behavior. if docs pop up with just a mouseover (no modifier keys held), sounds like a bug. Jun 29 17:07:05 I have onhover for docs set to 500ms, but this is more like 10ms Jun 29 17:08:49 And it doesn't disappear when you move the mouse as they usually do. Jun 29 17:09:39 I clicked restore popup in the popup, now it is back to normal. Jun 29 17:12:18 barq: i love your root beer Jun 29 17:13:20 Thanks Jun 29 17:23:51 Was the Google Speech API moved to Android ? Jun 29 17:24:54 https://www.google.com/speech-api/ no long found Jun 29 17:33:20 Is it possible to detect if a share intent was completed or not? Jun 29 17:33:44 getPackageManager().getActivityIcon What will be the easiest way to resize it? Jun 29 17:34:10 You could do startActivityForResult, but that only works if the share activity can actually return a result Jun 29 17:43:44 is it possible to create routes in Android post-5.0 (since ConnectivityManager.requestRouteToHost is deprecated)? Jun 29 17:45:14 Yes. Jun 29 17:46:25 yoavst, http://developer.android.com/reference/android/graphics/drawable/ScaleDrawable.html Jun 29 17:46:55 danijoo: I have a laggy recyclerView, will it fix it? Jun 29 17:47:05 yoavst, it will make it worse Jun 29 17:47:21 ha ha ha ha Jun 29 17:47:23 :/ Jun 29 17:47:55 yoavst, and i dont think the lag is because of getApplicationIcon because im using this method in an app im currently writing Jun 29 17:48:01 my listview does not lag Jun 29 17:48:09 danijoo: I have something like 18 icons in recyclerview in dialog Jun 29 17:48:14 with drag and drop Jun 29 17:48:52 I'll remove the drag&drop to see if it is the problem Jun 29 17:48:55 could be anything from bad code to cosmic rays if you dont show your source :) Jun 29 17:49:42 it is not because of drag and drop Jun 29 17:49:54 barq, was that to me? Jun 29 17:50:01 danijoo: the problem with my source that it is written in kotlin :P Jun 29 17:50:06 yoavst, how should I know if you dont show code Jun 29 17:50:21 Yes. Jun 29 17:50:23 http://pastebin.com/A4TDxMXG Jun 29 17:50:33 yoavst, I write apps in kotlin exclusivly since M10 :) Jun 29 17:50:42 danijoo: Great to know :) Jun 29 17:51:03 Hi Everyone! T-Mobile recently pushed out 5.1.1 for my Samsung S5. Has anyone else been experiencing random reboots and their device suddenly being extremely slow? Jun 29 17:51:05 never used drag/drop though Jun 29 17:51:16 danijoo: I removed it, it was even more laggy ;) Jun 29 17:51:35 thebishop: http://developer.android.com/reference/android/net/ConnectivityManager.html#requestRouteToHost%28int,%20int%29 Jun 29 17:51:49 danijoo: I have an old code that wasn't laggy last time I've check it - https://github.com/yoavst/quickapps/blob/kotlin/app/src/main/java/com/yoavst/quickapps/desktop/modules/LauncherFragment.kt Jun 29 17:52:09 barq, right, this is deprecate though. I don't see equivalent functionality in the new network api Jun 29 17:52:17 *deprecated Jun 29 17:53:03 "Deprecated in favor of the requestNetwork(NetworkRequest, PendingIntent), setProcessDefaultNetwork(Network) and getSocketFactory() api." Jun 29 17:53:09 thebishop: Have you check it? Jun 29 17:53:14 show your adapter toast Jun 29 17:53:18 yoavst, * Jun 29 17:53:42 is the new style editor stuff in the AS previews yet? Jun 29 17:53:51 s73v3r, nope Jun 29 17:53:58 http://pastebin.com/jHkPY6yJ Jun 29 17:54:04 at least not in the first preview of 1.3 Jun 29 17:54:05 Hello guys, I'm stucked and confused with this listview of checkboxes. https://gist.github.com/raul782/ea1e9981c14aedd88b4e Jun 29 17:54:15 it works the second time Jun 29 17:54:22 danijoo: It is only in my PC, or the kotlin plugin is a lot slower than the java one? Jun 29 17:54:23 but not the first time Jun 29 17:54:38 dunno. i never compared it Jun 29 17:54:45 i dont mix java/kotlin projects Jun 29 17:54:54 yoavst, yes, setProcessDefaultNetwork is problematic because i want some data going over mobile and some going over wifi. I'm still evaluating getSocketFactory, but I think it will give me problems on networking in native C/C++ code Jun 29 17:55:18 danijoo: the code completion in java is much much faster Jun 29 17:55:20 yoavst, https://gist.github.com/raul782/ea1e9981c14aedd88b4e << this is not your recyclerview adapter, is it? Jun 29 17:55:24 in kotlin I have to wait a few seconds Jun 29 17:55:25 I know someone asked this a week ago, but how do you apply a style to a widget in code? Jun 29 17:55:29 to auto import suggestion Jun 29 17:55:30 yoavst, ah yes. I noticed that too. Jun 29 17:55:40 at least on my laptop which bad specs Jun 29 17:55:46 raul782: Why are you using an array here? That goes against the design of ListView. Jun 29 17:55:46 I've got i7-4770 Jun 29 17:55:48 on my desktop i cant see a diff Jun 29 17:56:01 the cpu may not be the problem in this case Jun 29 17:56:13 no idea whats it Jun 29 17:56:22 but it mocks me too.. Jun 29 17:56:24 Also kotlin plugin doesn't understand I always want to import my R class Jun 29 17:56:30 ALWAYS Jun 29 17:56:40 why would you always want that? Jun 29 17:56:42 thats basd Jun 29 17:56:43 bad Jun 29 17:56:50 I have nothing to do with *insert random library name here* R Jun 29 17:57:05 some people have ;) Jun 29 17:57:15 and sometimes you want android.R Jun 29 17:57:20 so I write android.R Jun 29 17:57:20 or at least I want Jun 29 17:57:27 TacticalJoke: The logic here is that there are multiple payments, and if I select one one month in advance Jun 29 17:57:36 but when I write R, I 99% of the time mean to my R Jun 29 17:57:40 TacticalJoke: I need to select the older ones Jun 29 17:57:56 danijoo: my adapter is normal Jun 29 17:58:10 how could I do that, if I don't track all the checkboxes Jun 29 17:58:11 yoavst, you use a BaseAdapter on RecyclerView Jun 29 17:58:12 >? Jun 29 17:58:26 hmm, http://www.reddit.com/r/Android/comments/3bifir/supreme_court_denies_google_appeal_on_oracle_suit/ Jun 29 17:58:47 RecyclerView.Adapter Jun 29 17:58:57 too many people are claiming that means things that it doesn't Jun 29 17:59:15 idk why, but in my old code it works fast - https://github.com/yoavst/quickapps/blob/b72df5eec6c7005e58b3586d7217eb042a8fcd78/app/src/main/java/com/yoavst/quickapps/desktop/modules/LauncherFragment.kt Jun 29 17:59:18 yoavst, thats where your performance issue is. somewhere in that class. but you didnt show it yet :) Jun 29 17:59:25 raul782: The typical pattern is to set something as "checked" in the model and then call BaseAdapter.notifyDataSetChanged. Jun 29 17:59:31 and I've copied the code from the old one :P Jun 29 17:59:44 danijoo: http://pastebin.com/jHkPY6yJ Jun 29 18:00:34 yoavst, 1) for method params like onCreateViewHolder, you can simplky remove the ? at stuff like parent: ViewGroup? Jun 29 18:00:40 raul782_: What is the problem? "It doesn't work" isn't precise enough. Jun 29 18:00:44 that will save you some parent!! :) Jun 29 18:01:04 TacticalJoke: I c, understood, now how could I select a checkbox Jun 29 18:01:17 raul782_: The typical pattern is to set something as "checked" in the model and then call BaseAdapter.notifyDataSetChanged. Jun 29 18:01:19 kotlin just adds a ? to everything that comes from java, but if you know its never null, you can remove it and thread it like its null-save Jun 29 18:01:20 or a group of older payments based on the click on one checkbox Jun 29 18:01:30 Then `getView` is called and you return a checked View. Jun 29 18:02:04 danijoo: I do it when I cares about the adapter Jun 29 18:02:15 doesnt look like it could lack though Jun 29 18:02:18 in fragment I remove it from View? Jun 29 18:02:27 maybe its just getApplicationIcon thats laggy :/ Jun 29 18:02:35 danijoo: But I run it once Jun 29 18:02:39 and i dont see it because my phone is a good one Jun 29 18:02:55 the adapter is what laggy. Maybe it is LG with SUPER-HIGH-RES-QHD-ICON? Jun 29 18:03:36 I'll try removing their icons and use only mine, mine are 260x260px on drawable folder. (that their rules) Jun 29 18:03:36 dunno Jun 29 18:04:36 danijoo: I think I'll fill bug report on that slowness in the plugin Jun 29 18:04:41 raul782_: One problem with your current design (though it might not matter in your case) is that if your ListView holds 1,000 items then you keep 1,000 Views in memory at once, which is excessive. ListView is designed to create as few Views as possible. Jun 29 18:04:56 Another problem is that you're going against the design of ListView, which sounds like a bad idea regardless. Jun 29 18:05:00 yoavst, you will run into memory issues on low end devices Jun 29 18:05:07 OutOfMemoryError incoming. Jun 29 18:05:10 danijoo: It runs only on LG Devices Jun 29 18:05:13 from 2014 Jun 29 18:05:20 so the lowest memory possible is 1GB Jun 29 18:05:24 still bad style ;) Jun 29 18:05:32 danijoo: so what do you suggest? Jun 29 18:05:48 not fetching all images in your view initialization (line 00) Jun 29 18:05:50 100 Jun 29 18:06:06 danijoo: it doesn't the reason why the adapter lags. Jun 29 18:06:10 you are using a large amount of Heap for storing images that are not shown yet Jun 29 18:06:13 yes Jun 29 18:06:17 but it sucks Jun 29 18:06:19 >:p Jun 29 18:06:27 no idea whats wrong with your adapter :/ Jun 29 18:06:39 have you checked logs for GC or sth like that? Jun 29 18:06:59 danijoo: Well I put it there temporary till I'll fix the adapter problem Jun 29 18:07:20 danijoo: kind of a problem, LG likes to spam my logcat Jun 29 18:07:21 have you checked for GC? Jun 29 18:07:31 logcat has filters.. Jun 29 18:07:37 yeah. step one, follow best practices and use listview as it's indended w/ dynamic content loading, then figure out what might be going wrong. You're already putting the system in a weird state and then wondering why it's being weird. Jun 29 18:08:17 No LG, I don't need to know on every tap in my logcat Jun 29 18:08:40 if you do some analysis in ddms and watch logcat for GC notifications, you might see where your lag comes from Jun 29 18:08:52 in most cases its because ui thread is paused for garbage collection Jun 29 18:09:01 s/most/nearly all Jun 29 18:09:01 danijoo: no GC Jun 29 18:09:07 not even a single one Jun 29 18:09:17 Actually, my first point above is wrong: it wouldn't lead to 1,000 Views. It'd still be only as many as needed. But, yeah, it's probably buggy simply because he's doing weird things with an array. Jun 29 18:09:25 My app just uses 130mb of ram :E Jun 29 18:09:37 what? O.o Jun 29 18:09:59 I've got G4, so LG never GC my app Jun 29 18:10:05 thats huge Jun 29 18:10:13 you shoudlnt use that many ram Jun 29 18:10:14 never Jun 29 18:10:18 you don't know how many reviews I've got of high ram usage Jun 29 18:10:29 cuz there is not even a single GC :/ Jun 29 18:10:32 i can imagine Jun 29 18:10:36 no thats not the reason Jun 29 18:11:08 danijoo: the part with the getAppIcon is not widely used Jun 29 18:11:13 so it is not the problem Jun 29 18:11:24 hello Jun 29 18:11:37 if your app shows with 130 mb ram usage, you might have a huge leak Jun 29 18:11:46 since I've got 3GB ram, the os prefer to increase my ram rather then GC Jun 29 18:12:16 oh you talk about system reported ram> Jun 29 18:12:24 I thought we talk about actual used ram... Jun 29 18:12:28 use ddms man Jun 29 18:12:38 danijoo: 130mb from AS view Jun 29 18:12:39 or do a gc before measuring ram Jun 29 18:12:52 I think the 130mb is because of the pics Jun 29 18:13:04 cuz I've just run the pics and then check Jun 29 18:14:04 danijoo: http://i.imgur.com/gtAYF4J.png Jun 29 18:14:11 the increase is the icons Jun 29 18:14:15 so what can I do? Jun 29 18:14:51 manage your icons properly Jun 29 18:16:22 danijoo: So load one by one, resize them and recycle the original? Jun 29 18:16:40 I notice application like whatsapp have a separate group of contacts. what type of functionality in the android API allows applications to do this ? Jun 29 18:16:55 load them asynchronous while the listitem is already displayed Jun 29 18:17:24 kenalex, they just store them in a seperate databases which belongs to the app, not the OS Jun 29 18:17:27 sqlite Jun 29 18:17:56 danijoo: yea, but what to do with them after I finish; what's about resize them? Jun 29 18:18:15 (it.icon as BitmapDrawable).getBitmap().recycle() Jun 29 18:18:23 What about Glide ? Jun 29 18:18:25 the memory usage stays the same Jun 29 18:18:38 bitmap recycling is not needed anymore. just dont store a reference Jun 29 18:18:43 recycle() is android 2.x Jun 29 18:19:02 hsousa, cant use glide in that case Jun 29 18:19:18 danijoo: i notice in the contacts application there is a sseparate accounts for gmail and whatsapp Jun 29 18:19:39 danijoo: what's do you mean? (I'm talking about the getApplicationIcon()) Jun 29 18:19:47 kenalex, thats not for storing contacts Jun 29 18:19:56 yoavst, me too Jun 29 18:20:07 danijoo: so I didn't get you. Jun 29 18:21:11 yoavst, you should do the getting and scaling of the drawable in another thread Jun 29 18:21:24 daijoo: i am interested in creating a directory application which maintains contact numbers and email address for employees and would not want these contacts to be permanently merged with their personal contacts on their phone but they can have the ability to view these contacts in the contacts app Jun 29 18:21:25 while the list item is showed without the image Jun 29 18:21:31 danijoo: How will it decrease my memory usage, and you are right. Jun 29 18:21:35 then you set that drawable Jun 29 18:22:13 because it will only need the icons in memory thats shown RIGHT NOW. if your list shows 10 items, you dont need to load all 200 icons ie Jun 29 18:22:19 danijoo: Ok, that for loading, but what's about memory? Jun 29 18:22:37 less icons in memory -> less memory used. Jun 29 18:23:06 you load icons only when needed. If they are not needed, system will take care of gc'ing them/ Jun 29 18:23:07 But what If I do need them all / my screen is big enough to show all of the items Jun 29 18:23:08 thats all Jun 29 18:23:29 its not your job to decide that. thats why we use adapters Jun 29 18:23:40 kenalex, if you want them to show up in the default contacts app, I believe they're subject to being merged. The term you want to search for is likely "contacts provider", however once you provide system contacts, I don't think anything keeps the user from merging them. Otherwise you need to maintain your own contacts management activities. Jun 29 18:24:29 much thanks dragorn :) Jun 29 18:24:32 just create a seperate sqlite database and store your contacts there kenalex Jun 29 18:24:49 but be aware they will get deleted when app is uninstalled Jun 29 18:25:04 unless you store them on SD card Jun 29 18:25:30 ok Jun 29 18:29:52 danijoo: Is there a URI alternative to getApplicationIcon() to supply to image loading app? Jun 29 18:30:49 idk Jun 29 18:31:00 check the source what it does internally Jun 29 18:31:38 Everything is abstract :/ Jun 29 18:32:43 danijoo: So let's say there is no URI, how do you suggest to implement it Jun 29 18:33:30 already told yu Jun 29 18:33:42 get the drawable async, scale it, and then add it to the view Jun 29 18:33:54 all at runtime in the adapter Jun 29 18:34:11 no easy way using image loader in this case. Jun 29 18:34:13 pretty much like you would do it for every image in a listview Jun 29 18:34:26 yeah. you have to do it on your own Jun 29 18:36:39 TacticalJoke: Sorry was in a meeting, my main issue that I have is that when I click on a checkbox and there are older due payments, I start programatically checking those checkboxes, but the first time I do that it doesn't work Jun 29 18:37:14 hey guys i have and array of LatLng points to draw a polygon out of how to draw without criss crossing lines? Jun 29 18:37:45 is there a way to apply styles, including margins, programatically? Jun 29 18:40:06 danijoo: How do I clean the original getActivityIcon from memory? Jun 29 18:40:26 yoavst, system does that when needed Jun 29 18:40:31 just be sure to not leak references Jun 29 18:40:39 my memory doesn't agree with you ;) Jun 29 18:41:02 ofc it will only get gc'ed when needed Jun 29 18:41:08 not immidiatly Jun 29 18:41:46 TacticalJoke, I've implemented the listener onCheckedChanged for each checkbox, and when you click on a future payment, it checks the older payments, however, I noticed this is like a recursive call Jun 29 18:42:11 danijoo: so If I've got 3GB ram, needed = never Jun 29 18:42:14 and somehow, the first time the older checkboxes don't get selected. Jun 29 18:42:15 JakeWharton: Jun 29 18:42:20 mikedg: Jun 29 18:42:30 like you said, something wrong with having an array Jun 29 18:42:31 yoavst, not true. the whole ram is not available for your app Jun 29 18:42:44 HEAP != full memory Jun 29 18:42:57 you might have 256mb or so Jun 29 18:43:02 maybe I should only have an array of booleans, because I need to track each view what payment it's holding Jun 29 18:43:09 32mb on old devices Jun 29 18:43:11 ram == just more app in the background before some got killed Jun 29 18:43:18 heap is extremly little, and fragmented Jun 29 18:43:26 ram == horny sheep Jun 29 18:43:31 :D Jun 29 18:43:34 :D Jun 29 18:43:37 its 32mb + X. X depends on device. you never know how much you get Jun 29 18:43:55 yeah, and you can request largeHeap in manifest, but if you can avoid it's better (be a nice citizen for other apps) Jun 29 18:44:14 adq, and sometimes the device does not care about your request :p Jun 29 18:44:19 that too Jun 29 18:47:06 danijoo: Is there a way to copy layout? Inflate it once and use it more (No ListView ;)) Jun 29 18:47:18 other than that, you can bypass with the ndk Jun 29 18:47:50 adq, like fresco does? Jun 29 18:48:12 yoavst, a view cant be attached to more than one parent at a time. so - no Jun 29 18:48:27 i don't know what they do, or were they the ones which did an article recently about bitmap in ndk Jun 29 18:48:29 to avoid more alloc Jun 29 18:48:29 So recyclerView inflate it more then once? Jun 29 18:48:31 ? Jun 29 18:48:52 adq, yes they use something like that. putting images in the ashmem. im still sceptical about that.. Jun 29 18:48:58 yoavst, ofc. Jun 29 18:49:07 k Jun 29 18:49:20 if you have 10 times your view visible, it will get inflated maybe 11 or 12 times Jun 29 18:49:30 while scrolling those will get recycled then Jun 29 18:50:06 danijoo: The memory problem is not for the icons Jun 29 18:50:10 but from something else Jun 29 18:50:23 I hate debugging memory (may not be) leaks Jun 29 18:50:46 (if gradle was faster...) Jun 29 18:50:47 i <3 profiling Jun 29 18:51:15 far more entertaining than coding a recyclerview.. Jun 29 18:52:40 yoavst, you already said its not a memory problem Jun 29 18:52:45 since there is no gc Jun 29 18:52:55 something might block your ui thread then Jun 29 18:52:56 danijoo: So I've found another memory problem that is the cuz of 30-90mb Jun 29 18:53:01 30 -> 90 Jun 29 18:53:01 adq: sounds like your recycler views need more boobs jpgs Jun 29 18:53:19 * adq put mikedg picture with his google glass in all the rows :> Jun 29 18:53:35 dafuq did i just read Jun 29 18:53:36 raul782_: Yes, having only an array of booleans would make sense. Jun 29 18:54:09 Just set the boolean in question and then call BaseAdapter.notifyDataSetChanged (which calls your Adapter.getView thingmibob whereupon you return a checked View). Jun 29 18:54:20 yoavst, if you're in xxxhdpi, a big picture will take a huge amount Jun 29 18:54:28 you should at least where your alloc comes from Jun 29 18:54:31 A checked whatjamacallit. Jun 29 18:54:32 at least know* Jun 29 18:54:55 adq: 260px on 260px Jun 29 18:55:09 track down the allocation Jun 29 18:55:15 it's your code after all Jun 29 18:55:33 cause we cannot really know without more info Jun 29 18:55:49 adq: Yea I'm adding back view view to found the cuz Jun 29 18:56:18 https://developer.android.com/tools/debugging/debugging-memory.html < yoavst Jun 29 18:56:31 despite being old, the old DDMS tools are still better than the one in AS Jun 29 18:56:47 (no worry, you can access them from AS if you don't use eclipse anymore) Jun 29 18:57:06 Within Material Design, should the EditText's floating hint/underline be the primary or accent colour? Jun 29 18:57:13 getalloc, filter on your packagename, sort by size, done Jun 29 18:57:45 adq: My bet, byte[][] Jun 29 18:57:49 it is always byte[][]! Jun 29 18:58:09 you have a column on the right saying where it is allocated Jun 29 18:58:31 you will not track down by the type of array except on rare cases Jun 29 18:59:07 then you have a stack below showing you where it can come from, hence the filter is useful to narrow down Jun 29 18:59:31 otherwise you end up with lot of noise since you cannot do much about what any default app allocate (as the launcher icon) Jun 29 19:00:29 http://i.imgur.com/UbBbu4C.png Jun 29 19:00:51 use the old tools i told you Jun 29 19:01:08 or good luck with that until it's polished Jun 29 19:01:43 also read about what columns means, you have to understand what you read Jun 29 19:01:53 (no pun intended sorry) Jun 29 19:02:21 cya guys Jun 29 19:02:44 ii'm adding point to an array and drawing a polygon out of it but lines criss-crossed over 3 points i try sorting the points before drawing but didn't change http://pastebin.com/r2Fg9KD0 Jun 29 19:02:52 adq: can I run both monitor and AS at same time? Jun 29 19:02:57 yes Jun 29 19:03:10 the only issue is the logcat window, which will be on a side or the other Jun 29 19:03:54 I found the problematic method without ddms :D Jun 29 19:03:56 and you will not be able to click-click to jump directly to the culprit function Jun 29 19:04:01 like it was possible on eclipse Jun 29 19:04:09 but it's not a big deal Jun 29 19:04:30 good, now fix yoavst :) Jun 29 19:04:31 http://pastebin.com/BfKPHrgs Jun 29 19:04:48 Why do I load icon Jun 29 19:04:54 I hate copy old code :/ Jun 29 19:05:16 dont do it then Jun 29 19:05:17 :p Jun 29 19:05:20 dont you use something like git? Jun 29 19:05:24 copy old code or load icon? Jun 29 19:05:37 both :p Jun 29 19:05:40 danijoo: I do, I've just copied the method Jun 29 19:06:32 danijoo, if you're interested, to get the visibility to work on the CoordinatorLayout I had to remove the behaviour + anchor id for the item Jun 29 19:06:37 I just hate images :/ Jun 29 19:06:38 then set it visible, and vice versa Jun 29 19:06:55 Memery, ah Jun 29 19:07:00 makes sense Jun 29 19:09:45 danijoo: it fixes the laggy problem (async loading and resizing) Jun 29 19:09:48 but not the memory Jun 29 19:09:54 Within Material Design, should the EditText's floating hint/underline be the primary or accent colour? Jun 29 19:10:05 http://i.imgur.com/EhdN79W.png Jun 29 19:11:08 danijoo: http://pastebin.com/6s4s8Wt5 Jun 29 19:12:35 ugh, I really wish junit supported log messages Jun 29 19:25:03 danijoo: I think I'll cache to file the other's icon so i will be able to use it with image loader library Jun 29 19:29:43 Is it bad to use the same keystore for different apps? Jun 29 19:29:57 Or should they be unique? Jun 29 19:30:20 Hi everyone Jun 29 19:31:21 Just passing through with a quick question : how can I test activity recognition on a device? Jun 29 19:32:06 hm? Jun 29 19:32:12 onUserInteraction? Jun 29 19:32:33 I mean to send activities Jun 29 19:33:11 I want to detect running, but I don't want to have to start running in my apt :-D Jun 29 19:35:25 samB__, keystore or key\ Jun 29 19:35:56 MikeWallaceDev: I've tried to do it a few months ago without much success. I tried playing back sensor captures on the emulator but it didn't seem to pick that up. I ended up just setting up a service to emulate those broadcasts and triggering it by sending broadcasts from adb Jun 29 19:37:20 Damian, yeah, with the lack of responses here, I'm already setting up a test app that will just randomly broadcast some activity... Jun 29 19:40:23 What would cause my shaders not compile but also not give any errors? http://paste.debian.net/266652/ Jun 29 19:41:37 how do i get margin values from a style programatically? Jun 29 19:43:12 Basically, I have a style defined for a TextView that includes things like textSize, color, and margins. I need to apply that to a TextView created in code. How do I do that? Jun 29 19:47:02 s73v3r: You can't. Jun 29 19:47:10 i have to Jun 29 19:47:59 s73v3r: Set the style in xml. http://stackoverflow.com/questions/3142067/android-set-style-in-code Jun 29 19:48:18 That does not seem maintainable in the least Jun 29 19:48:34 Why do you need to set style programatically? Jun 29 19:48:50 because I’m being dictated the layout from the server Jun 29 19:49:15 Layout or style? Jun 29 19:49:22 layout Jun 29 19:49:46 however, I’m trying to make a somewhat reusable thing, so I’d prefer to just apply styles Jun 29 19:51:02 You'll need to find some workaround. Jun 29 19:51:20 hence why I’m asking in here Jun 29 19:51:41 Then please describe what you are actually trying to achieve. Jun 29 19:51:49 not much does rich text in a simple text widget. you may have to consider something like a webview. Jun 29 19:51:58 applying a style to a dynamically created view Jun 29 19:52:31 Can you not set the attributes programatically? Jun 29 19:52:41 i don’t want to hard-code them Jun 29 19:53:06 Then read them from somewhere. Jun 29 19:53:07 I have an entire style already defined. Jun 29 19:53:19 that’s what I asked: How do I read the attributes from the style? Jun 29 19:53:50 Persist them in some other way, such that you can retrieve them and apply to your Views. Jun 29 19:53:53 Not positive you can; they're not something you're intended to interact with Jun 29 19:53:56 s73v3r, if your style is not part of the stuff you get from the server, just store them seperatly Jun 29 19:54:01 as R.dimen.xx Jun 29 19:54:39 I really do not wish to duplicate them, as there are places this style is used where the layout isn’t being dictated from the server Jun 29 19:54:49 no need to duplicate Jun 29 19:54:55 populate your style from the xml Jun 29 19:55:20 i mean. you can reference the R.dimen from your style instead of writing the value 2 times Jun 29 19:55:30 but then I’m defining in code which dimensions I’m using. It might not be the same for every instance of this dynamic view Jun 29 19:55:48 I already am referencing the R.dimen values in my style Jun 29 19:56:00 you can use obtainStyledAttributes(), but thats really ugly code Jun 29 19:56:11 http://stackoverflow.com/questions/13719103/how-to-retrieve-style-attributes-programatically-from-styles-xml Jun 29 19:56:18 the entire system of getting layout from the server is already ugly Jun 29 19:56:23 true that :) Jun 29 19:57:15 found this lib recently that handles what you're talking about really well, using annotation processing: https://github.com/hzsweers/barber Jun 29 19:57:23 Why is getting Layout from server ugly? [ Jun 29 19:57:39 barq, because you have to parse it manually Jun 29 19:57:44 with xml parser Jun 29 19:58:00 I should say that he’s not sending layout in XML Jun 29 19:58:01 What if you have a fixed menu and import the contents dynamically? Jun 29 19:58:22 As in some List and then send a hierarchy of navigation options from the server. Jun 29 19:58:30 He’s not sending what we would consider Android layout Jun 29 19:58:37 That way the app can be configured remotely and both for iOS and Android at the same time. Jun 29 19:58:46 barq: that’s not what I’m talking about Jun 29 19:58:52 danijoo: xml parser would be involved anyhow, because layous is well xml Jun 29 19:58:57 and that’s more getting data from the server Jun 29 19:58:57 s73v3r: I know. This is my own question. Jun 29 19:59:37 barq: in that situation, you’d just send down a list of options. you wouldn’t be putting anything layout related in that payload Jun 29 20:00:13 and one of the things about this system is that it means I have to reinvent a lot of the Android layout stuff, like applying styles Jun 29 20:00:19 True. But you still need to hardcode whatever should be done when actually selecting one of the transmitted options, so not really useful. Jun 29 20:00:54 hence why sending layout and navigation from the server is a poor idea at best Jun 29 20:01:11 s73v3r, is it your decision to pull layouts from server or do you have to do that? Jun 29 20:04:30 Does anyone know the width/height specs for a bottom sheet on a tablet screen? Jun 29 20:04:57 on lollipop it doesn't expand to take up the whole screen but no where on the md spec site does it mention tablets for bottom sheets Jun 29 20:07:33 danijoo: Believe me, i’ve fought this every step of the way Jun 29 20:07:44 I’ve just had no support, so I lost horribly Jun 29 20:08:03 s73v3r, you're excused then :p Jun 29 20:08:07 poor guy Jun 29 20:09:02 it’s all json objects, too. Jun 29 20:09:25 so you parse json to xml and inflate that afterwards? Jun 29 20:09:31 no Jun 29 20:09:47 i parse json to get the data models for the objects, and then instantiate them Jun 29 20:09:58 I don’t use Android’s layout inflater Jun 29 20:10:05 ah Jun 29 20:11:01 he’s also trying to send the same stuff for a spinner as he would for a Radio button group, with the justification that it’s all treated the same on the server Jun 29 20:11:53 lol Jun 29 20:12:00 what should you do. randomly select one? ^^ Jun 29 20:12:38 he’s going to send a flag Jun 29 20:12:49 I'm doing something similar, i.e. the navigation is specified by the server, but the actual code that runs when that navigation happens is hard-coded. Jun 29 20:13:08 Don't really understand the point of that approach, other than that you can change some labels without updating the app. Jun 29 20:13:34 it’s always a very poor idea. you throw away all the stuff both platforms give you in terms of layout, and waste a bunch of time re-implementing it, poorly. Jun 29 20:13:56 and the actual capability is quite limited Jun 29 20:14:59 And I’d be surprised if the capability is ever used more than a handful of times. I’d be extremely shocked if the amount of time saved is anywhere close to the amount of engineering time wasted implementing it Jun 29 20:15:23 I don't disagree. Jun 29 20:16:29 but, in my case, this is led by a guy on the client’s side, who’s also writing the server. He admits he has absolutely no mobile experience, and tends to throw a fit when we point out how his solution is unworkable Jun 29 20:16:38 Does anyone have a good resource on using a CursorLoader without using a content provider? Jun 29 20:18:05 There is none, because CursorLoader is explicitly for querying a ContentProvider Jun 29 20:19:55 Some users reported my app fails to install when an SD-card is inserted into their device. How can I attempt to reproduce this problem on an N5/emulator? Jun 29 20:20:10 you can’t do it on the emulator Jun 29 20:20:33 do you have any stack traces or crash logs? Jun 29 20:20:46 Nothing, not even the device Jun 29 20:21:04 they didn’t even tell you what device they were using? Jun 29 20:21:08 no Jun 29 20:21:23 Only the info after detaching the sd card it worked. Jun 29 20:21:30 ask them what device Jun 29 20:21:53 the only thing that comes to mind is that it might have something to do with enterprise MDM stuff, but even that seems weird Jun 29 20:22:04 Enterprise MDM? Jun 29 20:22:33 mobile device managment. basically the stuff that allows companies to provision devices they own, and do stuff like remote wipe Jun 29 20:22:42 ah Jun 29 20:22:50 OK, will ask about the device. Jun 29 20:22:59 Error seems very odd to me. Jun 29 20:23:16 Unlikely anything you have control over Jun 29 20:23:26 agreed. Jun 29 20:23:36 Thanks. Jun 29 20:24:07 i don’t suppose they’re nearby, so that you could actually watch this happen, possibly with logcat connected Jun 29 20:26:21 This was reported a while ago, was low priority. Will try to find out more. Jun 29 20:46:46 barq, if you ever write to external storage, android 4 changed how that works, so if your storage location detection picks up the sd card and not the internal storage, it might kill you for not obeying the weirdo rules for writing to sd Jun 29 20:47:00 barq, if you never write to storage, i have no clue Jun 29 20:47:40 dragorn: What would need to be done to fix that? Jun 29 20:47:59 barq, either figure out why your "find storage" functions sometimes finds the external sd card Jun 29 20:48:15 barq, or read up on the new mandatory requirements for writing to sd - basically you can only write to specific directories Jun 29 20:48:31 And this could fail during install? Jun 29 20:48:48 barq, so if you don't care what directory you write to so long as it's on storage, you can change your paths to be something compliant with the new sd rules Jun 29 20:49:04 on install? probably not, not unless you have some sort of broadcast receiver. Jun 29 20:49:34 install has basically nothing to do with your app Jun 29 20:50:38 It fails during install Jun 29 20:51:32 dragorn: I have a BroadcastReceiver Jun 29 20:52:25 BroadcastREceiver wouldn’t be active during install. It’s literally just copying files Jun 29 20:53:31 The BroadCastReceiver filters for mounted media Jun 29 20:55:37 correct, but a bcastrx would trigger after install on the right conditions, I believe Jun 29 20:55:50 OK Jun 29 20:55:58 so "during install" might not really mean "during install"; if the users are already incapable of providing error logs, I don't trust 'em. :P Jun 29 20:56:02 stack trace or gtfo :P Jun 29 20:56:05 Well, will find out more. Thanks for the pointer though Jun 29 20:56:33 that's all that comes to mind anyhow. if you write to storage, and try to write to external, and dont' follow the rules for the new path structure, it's going to kill you. Jun 29 20:56:41 if the error prevents the app from actually getting installed that's a bug in the os Jun 29 21:05:14 Great, thanks for your help! Jun 29 21:17:40 Anyone have experience working with websockets on android? I can connect to the webserver they are hosted on via the browser on my android but using various libraries I fail each time to do it via my app Jun 29 21:18:18 Well Jun 29 21:18:30 you could start by telling us which libraries you have tried Jun 29 21:18:34 and why they have failed Jun 29 21:20:35 I am currently using TooTallNate's Java-WebSocket Jun 29 21:21:18 I get the error org.java_websocket.exceptions.WebsocketNotConnectedException but I can connect via browsers on multiple devices on my network Jun 29 21:23:25 g00s: So I tried the bottom sheet library, but one of my actions inside the sheet is a share button. However on 21+ this opens another bottom sheet which is awkward Jun 29 21:29:26 hey anyone know what I am doing wrong exactly here with the frame layout... the fragment is not inflating the new layout... Not sure if I did not play the frame layout correctly ... http://pastebin.com/u7KyCMN0 Jun 29 21:33:10 How can I unpublish the latest apk and go back to the previous one in developer console? Jun 29 21:39:44 Is there any way to do this without rebuilding? Jun 29 21:47:56 Is there a way in Android studio to actually have the res package show all files? Jun 29 21:48:03 it doesn't show my *.vs.glsl files atm Jun 29 21:49:59 barq: I'm mostly sure that you have to make a new build. there's no way to downgrade people who have the current version already, that's the only way to have a consistent end result. Jun 29 21:50:42 Yes, seems like it Jun 29 21:51:52 So even if I roll back everyone will get the update, even though nothing has changed. Jun 29 21:51:56 Binero: dunno. I just made a file with that extension, and it appears for me Jun 29 21:52:05 doesn't for me Jun 29 21:52:15 and custom directories I create don't show in in it either (gl) Jun 29 21:52:18 Binero: where exactly is it? it won't work in /res/file.vs.glsl Jun 29 21:52:35 That's where it first was, but it doesn't work in /res/gl/file.vs.glsl either Jun 29 21:52:41 ah. you'll have to put that in raw/ if you want it to be in res/. res/ isn't an anything-goes folder. Jun 29 21:52:56 that's dumb because that's exactly what res is used for Jun 29 21:52:59 nope Jun 29 21:53:18 res is intended for things you want R.whatev.name, and you want to be able to change it when configuration changes Jun 29 21:53:27 if you just want files, put them in assets/ Jun 29 21:53:36 Can I control assets per-version? Jun 29 21:53:48 version = ? Jun 29 21:53:52 of android Jun 29 21:54:40 not "for free", afaik. but you can pretty easily recreate it with assets/v123/etc/ folders. Jun 29 21:55:56 you can do res/raw/file.vs.glsl and res/raw-v21/file.vs.glsl if that's what you want Jun 29 21:56:23 groxx raw isn't showing up for me either Jun 29 21:56:37 Is there a way to remove rights on Developer Console to publish to production, i.e. only be able to publish alpha/beta? Jun 29 21:57:00 it may not exist yet. right click res, new -> android resource directory Jun 29 21:57:44 barq: ¯\_(ツ)_/¯ Jun 29 21:58:39 groxx that's what I did Jun 29 21:58:41 doesn't show up Jun 29 21:58:51 not even after syncing it Jun 29 21:59:29 then make src/main/res/raw/ and `touch some.file` inside it ¯\_(ツ)_/¯ Jun 29 21:59:53 groxx Already tried to touch the file Jun 29 21:59:57 Still doesn't show up Jun 29 22:00:40 and it is in "res/raw/filename.vs.glsl" and not "res/filename.vs.glsl"? Jun 29 22:02:46 groxx yes Jun 29 22:02:53 tried again just to be sure Jun 29 22:06:43 Binero: odd. restart android studio? Jun 29 22:07:36 ah, also: what's the dropdown above the project files set to? the "perspective" or whatever they call it Jun 29 22:09:20 groxx "Android" Jun 29 22:10:34 my android studio is imploding at the moment... can't try things out :| I did try to add a random file to a new resource folder though, and it didn't appear either. I'm on the 1.3 preview though. Jun 29 22:12:07 I'm in 1.2.2 Jun 29 22:13:16 it does show up for me in 1.2.2 after a restart (though I didn't see what it did before the restart) Jun 29 22:15:29 If my app has permission CALL_PHONE, can tablets download the app if they can't talk? I read that you can specify in order to make CALL_PHONE optional. Is this correct? Jun 29 22:16:28 hi Jun 29 22:16:46 I am trying to start developing android apps Jun 29 22:16:52 http://stackoverflow.com/questions/9712605/emulator-error-this-avds-configuration-is-missing-a-kernel-file Jun 29 22:17:07 I cannot seem to start my sample app generated from the wizard Jun 29 22:24:05 ToAruShiroiNeko: Have you installed the system image? Jun 29 22:24:37 I think so. There are several of them Jun 29 22:24:57 ARM EABI v7a System Image Jun 29 22:25:02 ToAruShiroiNeko: What API is running on your AVD? Jun 29 22:25:39 emulator.exe" -avd Nexus_5_API_21_x86 -netspeed full -netdelay none Jun 29 22:25:42 that? Jun 29 22:26:00 ToAruShiroiNeko: Have you downloaded system image vor api 21? Jun 29 22:26:23 ah! Jun 29 22:26:37 ToAruShiroiNeko, do yourself a favour and use genymotion instead of the official emulator Jun 29 22:26:40 ToAruShiroiNeko: Also, why are you not using Android Studio? Jun 29 22:26:51 I am Jun 29 22:27:05 danijoo: Have you got Google APIs to work with Genymotion? Jun 29 22:27:13 barq, sure Jun 29 22:27:20 oh god, simple mistake and I was debugging this jni problem the whole day Jun 29 22:27:21 I had problems with that Jun 29 22:27:25 I forgot to GetByteArrayElements... Jun 29 22:28:57 danijoo: How did you install the G APIs? Jun 29 22:29:15 barq, drag/drop arm translation, drag/drop gapps Jun 29 22:29:35 so I'm watching some tutorials and I see new View.onClickListener() {} appears to take an object body. what is a google-able term for this construct so that I can read more on it? Jun 29 22:29:38 Where do you get those from? Jun 29 22:29:52 powersurge, "anonymous class" Jun 29 22:29:56 barq, internet :o Jun 29 22:29:56 thanks Mavrik Jun 29 22:30:12 hi everyone. Im working on a android project and stuff go well. but I want to make navigation drawer and menus more attractive. any tips/hints? Jun 29 22:30:14 mmmm I can probably intuit what's happening then Jun 29 22:30:29 is it just creating an anonymous class that's a subclass of w/e object you are creating? Jun 29 22:31:56 danijoo: This arm translation? http://forum.xda-developers.com/showthread.php?t=2528952 Jun 29 22:32:13 Why does this line require the KitKat API? Jun 29 22:32:14 try (Reader r = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { Jun 29 22:32:18 It's all standard Java Jun 29 22:32:19 it creates an object that's a subclass of a class in "new Class" yes Jun 29 22:32:56 yep Jun 29 22:33:25 can any old object act as a parent for an anonymous class or do they have to be marked/planned in some way? (final question, I promise :>) Jun 29 22:33:26 Binero, where does it say that this needs KitKat API? Jun 29 22:33:46 danijoo Inside the Android Studio DE. Jun 29 22:34:03 DE? Jun 29 22:34:10 powersurge, any extendable (e.g. non-final) class can be there, same as classical inheritance Jun 29 22:34:16 awesome Jun 29 22:34:20 danijoo Development Environment Jun 29 22:34:22 thanks for the insight Mavrik very helpful Jun 29 22:34:43 powersurge, just remember that it holds reference to the object you create it in... so if you pass it outside it might leak memory :) Jun 29 22:34:46 compiling too says it requires API 19 at least Jun 29 22:34:53 Binero, picks or it didnt happen ;) Jun 29 22:35:20 interesting Jun 29 22:35:47 so I should be careful to use anonymous classes in objects that are subject to GC or else I can make objects that exist outside of gc? Jun 29 22:35:50 Binero, StandardCharsets is API19 Jun 29 22:36:14 Mavrik How about try (InputStream is = BrainGraphRenderer.class.getResourceAsStream("vs.glsl")) {? Jun 29 22:36:18 Does the same there Jun 29 22:36:43 Binero, try with resources is API 19+ as well. Jun 29 22:36:48 sigh Jun 29 22:37:00 Seems like there is really no way to easily read a file into a string in Java Jun 29 22:37:26 My code trying to get the file is going to be longer than the actual use of the file Jun 29 22:37:31 powersurge, hmm, just be careful when passing anonymous classes somewhere else that might hold on to them for longer than the containing class could exist Jun 29 22:37:50 powersurge, e.g. you have a static class that might live longer than Activity Jun 29 22:38:13 and you give it an anonymous object Jun 29 22:38:32 Binero, look at the docs maybe ;) Jun 29 22:39:01 danijoo Which seem to know about the horrors and just spit all that C code into the java source files Jun 29 22:39:24 Binero, what? Jun 29 22:39:37 danijoo That's what the docs do Jun 29 22:39:45 cool. Jun 29 22:39:46 i said docs, not source Jun 29 22:39:57 thanks for the gotcha :> Jun 29 22:40:02 Is there anyone to get some information from butterknife when it fails to bind? setDebug(true) offers nothing additional Jun 29 22:40:38 Well what does it print? Jun 29 22:41:01 "Unable to bind views for [classname]" Jun 29 22:41:13 It prints more than that Jun 29 22:41:13 Its my error but I can't find what is wrong Jun 29 22:41:40 http://pastie.org/10265132 Jun 29 22:42:28 What about the debug messages? Jun 29 22:43:38 1 sec please Jun 29 22:44:09 danijoo That is what the docs do... Jun 29 22:44:16 danijoo what source do you even mean? Jun 29 22:44:17 http://pastie.org/10265135 Jun 29 22:45:07 Binero, https://developer.android.com/reference/java/nio/charset/StandardCharsets.html Jun 29 22:45:16 what C code in the docs are you talking about Oo Jun 29 22:45:22 Looks like the cause isn't being printed because your call stack is so large Jun 29 22:45:33 i see Jun 29 22:45:39 danijoo I was talking about the docs trying to achieve what I try to achieve Jun 29 22:45:54 that was just filtered by 'butterknife' in AS Jun 29 22:45:55 You could catch the exception and log or throw getCause() Jun 29 22:45:57 Not the docs on a class I can't use... Jun 29 22:46:28 Binero, how should I now what random guide you mean Jun 29 22:46:42 danijoo How should I know what random guide you mean? Jun 29 22:46:42 The struct Android uses to send log messages to the kernel is only 4096 bytes so the max log length is 4025, if I remember correctly. Jun 29 22:47:24 If you use something like Timber for logging it'll take care of automatically splitting on this boundry Jun 29 22:47:59 haha Jun 29 22:48:25 let me catch the exception Jun 29 22:49:39 "Attempt to invoke virtual method 'rx.Observable ObservableScrollView.getDirectionObservable()' on a null object reference" Jun 29 22:49:54 wait Jun 29 22:49:57 im dumb nvm Jun 29 22:51:13 Figured it out, reverted from local history but forgot to change my scrollview type to my observable rx version Jun 29 22:52:31 * tx .getDirectionObservable(); Jun 29 22:52:46 tx: ? Jun 29 22:52:54 JakeWharton: thanks for the help! Jun 29 22:53:08 tx, still on highlight with rx ? ^^' Jun 29 22:53:49 of course Jun 29 22:53:51 Glad you got it working 👍 Jun 29 22:53:55 anybody know what is wrong with my code here? http://pastebin.com/JrdGvwMR Jun 29 22:54:21 question: I was wondering if there was codota for other languages? like annotated code but for python, js Jun 29 22:54:33 talking about this: https://chrome.google.com/webstore/detail/codota/cnpdaoipdfbkpdbdpmceeejdaabiebcb?hl=en Jun 29 22:57:07 Peyam, maybe describe what the error is . Jun 29 22:57:18 http://imgur.com/jacoj Jun 29 22:58:07 2 rxjava books out, but from packt :( http://www.amazon.com/RxJava-Essentials-Ivan-Morgillo/dp/1784399108 and http://www.amazon.com/Learning-Reactive-Programming-Java-8/dp/1785288725 Jun 29 22:58:14 i'll wait for some more reviews :) Jun 29 22:58:46 g00s, whats wrong with Learning Reactive Programming With Java 8? Jun 29 22:58:53 kindle edition more expensive than paperback? wtf Jun 29 22:59:37 i dont know if anything is wrong with it, but i'll wait for some reviews before buying. i think i learned what i can from the docs ... i'm curious what else i can learn from a good presentation Jun 29 22:59:58 waiting for your personal review then :p Jun 29 22:59:59 pakt though -- is only one step above self publishing so ymmv Jun 29 23:00:19 danijoo you can get the epubs much cheaper from oreilly.com. Jun 29 23:00:41 there is almost always a 50% coupon somewhere Jun 29 23:00:46 im just wondering why the ebook is more expensive than the real book Jun 29 23:00:48 thats weird Jun 29 23:01:34 no idea Jun 29 23:03:33 danijoo, no error. its not just working Jun 29 23:04:08 danijoo, taxes or additional discounts :) Jun 29 23:04:31 danijoo, im trying to change the color of actionbar Jun 29 23:04:46 danijoo, lilipop Jun 29 23:05:24 on german amazon the kinde is 16 Euro vs 26 for the paper Jun 29 23:05:34 kindle* Jun 29 23:06:18 Pricelist not broken in EU :P Jun 29 23:06:59 danijoo, any advice? Jun 29 23:07:29 Peyam, try removing android: Jun 29 23:07:35 support lib is in your apps namespace Jun 29 23:07:41 and good night ;) Jun 29 23:08:05 can you inflate a layout on the activity and have it replace everything from the activity Jun 29 23:08:12 it is not currently doing that when I inflate it Jun 29 23:08:22 http://stackoverflow.com/questions/31125962/how-to-add-a-frame-layout-for-fragment-in-an-activity-layout-android?noredirect=1#comment50264717_31125962 Jun 29 23:08:32 just set the content view Jun 29 23:08:56 in the fragment I inflate it Jun 29 23:16:27 anyone can help me changing the color of the actionbar. i do this: http://pastebin.com/RU8RnKA9 Jun 29 23:16:31 Is there any documentation on how to properly crash an app? Jun 29 23:17:19 What does "properly crash an app" mean? Jun 29 23:17:54 TacticalJoke What do I do when everything is wrong and the app must crash? Jun 29 23:18:14 bankai_ https://i.imgur.com/oqpADX7.gifv Jun 29 23:18:26 assuming just doing `throw new Exception("tolololol");` is not the way to do it Jun 29 23:18:38 love the dogs expression when the furniture is moving Jun 29 23:18:41 Why must you crash? Jun 29 23:19:09 TacticalJoke Because an error occured that causes my app to not be able to continue Jun 29 23:19:44 A common solution is `throw new AssertionError("Foo encountered");` or something, but it really does depend on the exact details. Jun 29 23:19:58 Well an unsafe API didn't do what it was expected to do Jun 29 23:20:22 g00s: labs too big for this? Jun 29 23:20:44 bankai_ i think it could work for your labs :D Jun 29 23:20:54 Binero: What was the expected behaviour and what was the actual behaviour (in this hypothetical scenario)? Jun 29 23:21:14 TacticalJoke The expected behaviour was to create an object, and the issue was the API reporting it failed Jun 29 23:21:40 Also in Android Studio when it puts a red line under something, how to figure out the error? Jun 29 23:21:48 The quickfix isn't telling me much Jun 29 23:21:57 Hovering the mouse is probably the easiest way. It's not great, though. Jun 29 23:22:24 TacticalJoke Didn't tell me anything Jun 29 23:22:41 Seems like it doesn't handle syntax errors Jun 29 23:22:42 Or hovering over the red line on the right margin or the editor window (or placing the editing caret on the red line and looking at the status bar). Jun 29 23:23:09 TacticalJoke I figure the best practise would be to create an own exception type and throw that Jun 29 23:23:11 Try just typing "sdfsdfsdf" and hovering the mouse over it. It should work. Jun 29 23:23:16 Can you assure me? Jun 29 23:23:35 TacticalJoke Doesn't do anything, only shows fixes Jun 29 23:23:45 let me restart Jun 29 23:23:51 this is written in Java after all Jun 29 23:24:02 Jun 29 23:24:05 :) Jun 29 23:24:57 that did it Jun 29 23:25:01 I knew it used to do that Jun 29 23:26:43 Binero: If the exceptional scenario is "This should never happen, but somehow it has", AssertionError is probably the best thing to throw. If not, are you sure that crashing is the best solution? Sometimes it's better to instead show an error message to the user and disallow them from doing stuff. Jun 29 23:27:20 TacticalJoke It is the first. Jun 29 23:29:54 thanks btw ~ Jun 29 23:31:10 Do I need to replace fragments with one another is it impossible to replace an activity, and it must only hold a frame layout aka container only? Jun 29 23:37:44 Lonesoldier728: Wait, what. Jun 29 23:38:02 TacticalJoke http://stackoverflow.com/questions/31125962/how-to-add-a-frame-layout-for-fragment-in-an-activity-layout-android?noredirect=1#comment50264717_31125962 Jun 29 23:39:16 That is my code the issue I am having is I have buttons on the activity layout but when I click the button the fragment should inflate the new layout so nothing can be seen from the activity layout unfortunately that is not the case Jun 29 23:40:30 I figured if the frame layout has match parent width and height then it should fit the whole screen Jun 29 23:40:56 Thats because your framelayout is on top of the other children and spans the the whole width/height Jun 29 23:40:58 Z order! Jun 29 23:42:36 Is onSurfaceChanged called in the same thread as onSurfaceCreated inside a GlSurfaceView.Renderer? Jun 29 23:42:55 And if so, is the ~Created guaranteed to be called before the ~Changed? Jun 29 23:43:21 so desmin88 if I put it first then it should do something else... I dont see where the z order plays a part in this if I want it to fill the whole screen...? Jun 29 23:43:51 oh i see what you mean Jun 29 23:43:53 TacticalJoke does kotlin have some idea of only being able to assign a variable once? for example, i can't make this final because it needs to be initialized in onCreate, but from there on i want 'logical final-ness' Jun 29 23:44:36 g00s: Not really but if you really want that, you can probably write a delegate yourself (if it’s not already available in the std lib) Jun 29 23:44:39 in java i would have to initialize the final in the ctor Jun 29 23:44:48 jaana ah, ok thanks Jun 29 23:45:14 Lonesoldier728: Are you sure that the fragment stuff isn't transparent? Maybe try giving the ListView a background. Jun 29 23:45:36 g00s: var p: String by MyOneAssignmentDelegate() Jun 29 23:45:54 thanks Jun 29 23:46:03 g00s: http://kotlinlang.org/docs/reference/delegated-properties.html Jun 29 23:46:10 jaana: But isn't the best we could do to make the second assignment ineffective? Jun 29 23:46:16 I don’t see such a thing in standard but probably trivial to write Jun 29 23:46:18 I thought g00s was talking about compile-time stuff. Jun 29 23:46:28 TacticalJoke: yeah you won’t get compile time assurance there Jun 29 23:46:32 Or maybe I jumped to conclusions. Jun 29 23:48:56 if networking cannot be done on the main thread, what would be the best way to do something like a websocket that is continually connected? just create it in an asynctask? Jun 29 23:49:22 Tactical you are right... so I guess I just have to add a background then... however the buttons are staying... that is weird Jun 29 23:49:45 Lonesoldier728: Why not just use two Fragments? Jun 29 23:49:46 hello guys, how is the methods the View call after calling postInvalidate? Jun 29 23:50:00 TheKarlBrown: use a websocket library Jun 29 23:50:00 Then you can use FragmentTransaction.replace and get what you want for free. Jun 29 23:50:04 I am thinking of doing that... it seems like the better choice at the end Jun 29 23:50:52 I think you basically have two fragments, conceptually. Jun 29 23:51:55 desmin88 I am trying to use one but it complains that I am networking on the main thread Jun 29 23:52:02 which one Jun 29 23:52:09 Anyone ever integrated google sign in into their application? Jun 29 23:53:04 thanks tacticaljoke Jun 29 23:53:08 compile 'com.neovisionaries:nv-websocket-client:1.6'. I couldn't get "org.java-websocket:Java-WebSocket:1.3.0" to work Jun 29 23:53:28 have you tried okhttp-ws Jun 29 23:53:41 I wasn't sure how to implement it Jun 29 23:54:02 https://github.com/square/okhttp/tree/master/okhttp-ws Jun 29 23:54:03 read Jun 29 23:56:04 guys anyone know why my EditTexts are the color of my old ColorPrimary? And didnt change when I changed the primary color Jun 29 23:58:04 ffs, why does a LinkMovementMethod to make textview links clickable cause the entire textview to render text invisible? Jun 30 00:05:12 drose379: because edittext color is not ruled by the primary color or soemthing? Jun 30 00:05:29 Why would it be stuck as my last primary color then abara Jun 30 00:06:33 good question, i was stuck at that logic too a long time a go, i gave up on this. sometimes i can't understand the god's plan from google engineers Jun 30 00:06:34 what does this mean? http://paste.ubuntu.com/11796305/ Jun 30 00:06:48 haha Jun 30 00:06:50 TheKarlBrown okhttp has websocket support too Jun 30 00:07:03 oh desmin88 got it Jun 30 00:07:49 So it seems LinkMovementMethod inside a scrollview causes the textview to have invisible text for some reason Jun 30 00:07:52 any idea why there's a red cross on the android wear icon? http://i.imgur.com/EL71l1r.png Jun 30 00:07:56 elisa87: It found a Git repository that's not linked to Android Studio. Jun 30 00:08:15 yeah, I added it myself to git using Mac GitHub Jun 30 00:08:27 but how should I link it using Android Studio? TacticalJoke Jun 30 00:08:50 HAX is working and emulator runs in fast virt mode Jun 30 00:08:56 will these okhttp instances need to be run through an asynctask? Jun 30 00:11:16 not sure what's happening from the last time I am running the app (I didn't change it) http://i.imgur.com/xnI4Nk0.png http://i.imgur.com/t2yJs73.png any idea? Jun 30 00:11:50 Click apply ? Jun 30 00:12:07 Sorry, continue anyway Jun 30 00:12:21 Also, show the message not this dialog Jun 30 00:13:40 so when I select that virtual device for emulation it becomes red http://i.imgur.com/KhxPKru.png gordon_ Jun 30 00:14:13 What is the message? Jun 30 00:14:31 Is api version set properly ? Jun 30 00:14:55 well, it is running but I am not sure why I was receiving that error!? Jun 30 00:15:19 this was the message after clicking apply http://i.imgur.com/xnI4Nk0.png Jun 30 00:15:56 ok, main problem is, like last week, I can't find my app in the watch! Any clue how I can find it? Jun 30 00:16:08 And nothing in low run window ? Jun 30 00:16:22 what is "low run window"? Jun 30 00:16:32 my hello world app ran but not this one Jun 30 00:16:58 here's the app https://github.com/lamiastella/AndroidWearApp Jun 30 00:17:17 I just see the time written in numbers and agenda! that's all! Jun 30 00:17:24 I don't see a watch face Jun 30 00:17:25 There's intellij window called run on the bottom Jun 30 00:17:55 can you send me a photo? I am using Android Studio Jun 30 00:18:04 I'm on phone Jun 30 00:18:17 Android studio is the same as intellij Jun 30 00:19:36 /Users/mona/Library/Android/sdk/tools/emulator -avd Android_Wear_Square_API_22_2 -netspeed full -netdelay none Jun 30 00:19:36 HAX is working and emulator runs in fast virt mode Jun 30 00:19:37 this is what I am seeing in the run Jun 30 00:20:10 TacticalJoke https://play.google.com/store/apps/details?id=com.deeptrouble.yaarreddit Jun 30 00:20:34 'Dev is not dead after all' Jun 30 00:20:55 elisa87: if emulator runs by itself, is not emulator's fault Jun 30 00:21:46 Is there a way to have a global rxjava error handler rather than implement a bunch Jun 30 00:22:54 I used that once, years ago. Haven't tried it lately. Jun 30 00:25:02 no Jun 30 00:28:29 can you please help me to figure if there is inconsistency in AndroidManifest.xml and my solution tree? http://i.imgur.com/wqhJDqT.png sounds like watchface has a problem as it has a green line under it . thanks Jun 30 00:30:52 desmin88 see plugins.rxjavaErrorHandler Jun 30 00:31:15 never tried it myself, good luck ! you could theoretically use this to log stuff to timber or whatever Jun 30 00:32:18 cool http://www.androidpolice.com/2015/06/29/video-power-down-using-your-phone-while-it-charges-may-cause-it-to-throttle-your-charging-speed-a-lot/ Jun 30 00:32:25 i want that ampmeter :D Jun 30 00:33:26 sweet http://www.amazon.com/DROK-Current-Voltage-Detector-Multimeter/dp/B00S2HJAUE Jun 30 00:35:59 I get "emulator: ERROR: x86 emulation currently requires hardware acceleration!" "Please ensure Intel HAXM is properly installed and usable." "CPU acceleration status: HAX kernel module is not installed!" Jun 30 00:36:09 I believe it is because hypervisor is running Jun 30 00:36:20 I imagine I need to disable that Jun 30 00:36:31 I am curious if I can instead run the emulator without doing that Jun 30 00:36:55 desmin88 btw, hope you have the rxjava sources on your machine, they are good to look through Jun 30 00:37:26 g00s: I figured it out, logcat was not showing the massive stack tree, but i forgot to implement on error handling in my subscriber Jun 30 00:37:40 a failed retrofit call due to airplane mode would give me an onerrornotimplementedexception Jun 30 00:37:47 wow, google earth on desktop isn't dead Jun 30 00:41:15 how can I fix this line? android:name="com.google.android.wearable.watchface.preview" Jun 30 00:47:23 I am following this but the watchface is not recognized in manifest https://developer.android.com/training/wearables/watch-faces/service.html Jun 30 00:48:41 Woop woop! about to publish my app Jun 30 00:58:57 does anyone have good examples of a nice looking landing page for an app (android only)? Jun 30 00:59:23 surf2b1 do you mean splash or on-boarding Jun 30 00:59:35 g00s: a website Jun 30 00:59:41 ah :) Jun 30 01:01:12 don't want to use some crappy wordpress theme. Thinking of just making a simple bootstrap3 landing page for an app I'm working on. Looking for some inspiration. Jun 30 01:03:56 can you please take a look at here? http://stackoverflow.com/questions/31127926/androidname-com-google-android-wearable-watchface-preview-watchface-isnt-rec Jun 30 01:04:21 hey guys can i sort an array of LatLng so i can draw a polygon without criss crossing lines Jun 30 01:04:28 http://pastebin.com/3hLJMVbh Jun 30 01:06:57 What does it mean to "leak" a ServiceConnection? Jun 30 01:09:10 maybe you didn't unbind from the service ? Jun 30 01:09:25 but there was an old bug where android would leak them anyhow :P Jun 30 01:10:07 hert hull culling Jun 30 01:10:11 https://code.google.com/p/android/issues/detail?id=6426 Jun 30 01:10:17 hmm Jun 30 01:10:21 why would I want to unbind Jun 30 01:10:33 because your holding a reference to something you shouldn't Jun 30 01:10:33 maybe I am binding twice I see Jun 30 01:10:33 * g00s guesses Binero messed up :D Jun 30 01:10:55 Is there a way I can only have logcat show stuff relevant to my app? Jun 30 01:11:12 Every time the exception is there it gets spammed away and I can't go up as it keeps pushing me down Jun 30 01:11:33 best way is to make a static wrapper class to Log.* calls, like Cat.* where you do if(isDebug) Log.d(Cat.LOG_PREFIX.concat(TAG), msg) Jun 30 01:11:37 How are you all creating UIs? Jun 30 01:11:43 lasserix hull culling? Jun 30 01:11:54 yeah ummm sorry kinda drunk minimum hull culling? Jun 30 01:12:02 I know of the XML way, straight Java way, and the Eclipse way. Jun 30 01:12:03 that's not the term though, its used in gaming Jun 30 01:12:09 minimum hull convex? Jun 30 01:12:20 you draw a polygon out of a set points that minimizes the area Jun 30 01:12:25 The XML/Java way seems very similar to HTML and Javascript? Jun 30 01:12:25 lasserix I am not manually messaging to logcat... Jun 30 01:12:35 lasserix I want to get the exception Jun 30 01:12:38 Binero: then chose Error Jun 30 01:12:40 over 3 points polygon line start to criss cross while drawing Jun 30 01:12:48 choose error? Jun 30 01:12:50 Log level Jun 30 01:12:57 top rightish of the log screen Jun 30 01:13:00 oh Jun 30 01:13:10 still spammed away Jun 30 01:13:20 hert, i think you want to find the minimum hull convex Jun 30 01:13:21 never realised android is so unstable Jun 30 01:13:45 or something like that--basically an algorithm that defines the smallest bounding polygon for a set of points, which IFF canot criss cross Jun 30 01:14:52 Binero: You can limit LogCat to messages from your app. Jun 30 01:16:02 TacticalJoke It says "Show only selected applications" Jun 30 01:16:19 time to get home! Jun 30 01:16:37 man these errors Jun 30 01:18:30 o Jun 30 01:19:07 Isn't any device API higher than 8 with "" in the manifest required to support GLES2.0? Jun 30 01:19:16 As I am getting errors GLES isn't implemented Jun 30 01:22:53 Oh Jun 30 01:23:03 I have to manually set it so it gives me GLES instead of GL Jun 30 01:24:30 does someone knows if making a little table to store coordinates from google is a terms violation. its use would be exclusive with google maps Jun 30 01:31:22 cliffreich Everything's legal until you're busted :) Jun 30 01:32:13 Binero i'd use it only with google :P Jun 30 01:32:17 ahh the joys of google in app billing Jun 30 01:32:19 such a PITA Jun 30 01:32:43 there is no way to know when a purchase was canceled so im left periodically updating purchases Jun 30 01:39:43 ehh Jun 30 01:39:59 Android claims GLSL #version 100 isn't supported Jun 30 01:40:03 on GLES20 Jun 30 01:45:58 do yall name a List foos, or fooList? Jun 30 01:48:16 mattblang Do something crazy: listOfFoos Jun 30 01:48:28 Binero, LOL Jun 30 01:48:42 Binero, L1st0fFoos Jun 30 01:48:52 Even better Jun 30 01:48:59 Binero, https://thc.org/root/phun/unmaintain.html Jun 30 01:49:37 mattblang I think I pretty much master that skill, but let's see if there's even more to learn :) Jun 30 01:49:39 I am curious though what most people do :P On one hand, I usually don't like appending a type name to a variable. On the other hand, foo : foos could be more difficult to distinguish. Jun 30 01:49:49 "foos" is shorter, and it's often irrelevant that it's a List: we just have more than one "foo". Jun 30 01:50:13 If it were an array, would you call it "fooArray"? Jun 30 01:50:18 TacticalJoke, Yeah, that is how I feel. The only thing is the enhanced for loop being harder to distinguish. Jun 30 01:51:14 I've never found it hard to distinguish, personally. Jun 30 02:03:04 This guy represents Google: https://plus.google.com/+SkyOrtiz/posts/C96meRbivQA That selfie looks so unprofessional to me. Am I getting old or something? Jun 30 02:05:38 yes, yes you are :p Jun 30 02:05:50 TacticalJoke: I can't even tell what that selfie shows Jun 30 02:06:21 so, vzw moto x update rolling out Jun 30 02:06:30 hope it includes advanced calling Jun 30 02:06:52 so. bs that the phone has been out for almost a year and still can't call and have mobile data Jun 30 02:08:50 and the changelog makes no mention of advanced calling... Jun 30 02:10:51 g4 seems to support it. wonder if it's worth turning it on Jun 30 02:11:37 worth it for simultaneous voice and data Jun 30 02:14:22 verizon is trash when it comes to updating phones Jun 30 02:18:38 fingers crossed everyone, just published my app. Jun 30 02:22:47 pfn, this implies I talk to people ;P Jun 30 02:23:59 dragorn, yeah, I don't do it much either, but when I do, it pisses me off Jun 30 02:25:00 ehh Jun 30 02:25:08 doesn't GLES3 compile GLES2 GLSL? Jun 30 02:51:00 Can't figure this out Jun 30 02:51:12 I finally got it to compile by removing #version altogether and now it doesn't link Jun 30 02:51:24 Why is GLES development so much more of a pain in the ass? Jun 30 02:53:03 yay, my app is officially on the app store. Jun 30 02:56:48 do we have any replace of this library for an android https://github.com/mariohahn/MHVideoPhotoGallery Jun 30 02:57:29 desmin88: which app is it? Jun 30 02:58:24 am i allowed to link to the play store Jun 30 02:59:03 sure you are Jun 30 02:59:10 https://play.google.com/store/apps/details?id=com.ucatholic.android Jun 30 02:59:17 dont be too harsh pls. Jun 30 02:59:35 not my best work but im tired of saying 'tomorrow i will publish' **** ENDING LOGGING AT Tue Jun 30 02:59:58 2015