**** BEGIN LOGGING AT Sun May 24 02:59:59 2015 May 24 03:03:52 Sweet, fixed it May 24 03:04:17 If I now want to make this app so that it pulls data from a dB, where should I start? May 24 03:04:22 *I May 24 03:05:11 I want a db of quotes and just pull data from it on every click May 24 03:11:20 this was pretty good, i liked the taxonomy of event, command, query http://www.reddit.com/r/programming/comments/36r98r/messagedriven_systems_dos_and_donts/ May 24 03:11:48 when i started using eventbus years ago, i just sprayed them all over the app May 24 03:21:04 would reactive programming deal with being able to avoid events May 24 03:21:30 I can't think of any reason I've needed events recently where rxjava pub/sub hasn't been sufficient May 24 03:22:24 Is there an easy way to basically fork a project in Android Studio? I have a sample program I'd like to reuse May 24 03:22:57 yiati i went from eventbus to rxjava May 24 03:23:44 I still use an event bus May 24 03:23:48 it's prettier May 24 03:23:59 even in conjunction with rx May 24 03:24:24 I'm seeing this error on travis-ci: No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself. From what I can tell the emulator is up and running. Hangs on :app:connectedAndroidTestDebug. https://gist.github.com/shekibobo/db7faef2a0187939b72d May 24 03:25:00 Anyone have an idea how I might debug this or see if there's something obvious I'm doing wrong? May 24 03:27:51 event bus = event spaghetti :) May 24 03:28:28 i find it analogous to global variables, except now variables that change May 24 03:31:44 I don't like having to unregister from rx May 24 03:31:53 which is why I prefer my event buses May 24 03:32:10 I have all the plumbing in there to automatically unregister on gc May 24 03:32:40 Probably could do the same for rx, but I still like the look of my bus better May 24 03:32:41 quick question: is it safe to close an SQLiteDatabase before you are finished using a cursor which has query results from that database object? May 24 03:34:29 souse, no May 24 03:38:08 pfn, ah ok thanks. The api reference on d.android.com does not seem to say anything about this. Where would one go to read about this? May 24 03:38:50 the source, but generally, for anything with managed resources, it is idiomatic to close child resources anytime a parent resource is closed May 24 03:41:20 Hey, I'm trying to get a java.io.File from Uri using uri.getPath() but immediately after, I get the following exception: "java.io.FileNotFoundException: /external/images/media/9660: open failed: ENOENT (No such file or directory)" anyone know why? May 24 03:41:33 g00s, https://github.com/pfn/keepshare/blob/master/src/main/scala/com/hanhuy/android/keepshare/AuthorizedActivity.scala#L105 doesn't get much nicer looking than that... May 24 03:41:59 need to throw the toast onto the UI thread though... May 24 03:50:18 Hah, I've created an app that allows me to upload data to my server: http://supa.me/Ueyrjn.jpg May 24 03:50:39 Using recieve (share option) or whatever it's called May 24 03:51:10 SuperHam whats the screenshot May 24 03:51:43 That screenshot is an image version of a Memo, thanks to Samsung Galaxy S4 May 24 03:52:57 Oh so you can share from any app and upload to server? May 24 03:58:49 Guys im trying to slide out a view from my exsting activity layout and slide in my fragments view May 24 03:59:04 I know you can replace a fragment with a new one with FragmentTransaction.replace() May 24 03:59:21 But what if I want to replace a regular view with a fragment view May 24 03:59:37 I guess I need to make an animation on the fragment container May 24 04:12:02 Is there any way to wrap a callback into an Observable? May 24 04:14:41 yiati hm ? May 24 04:15:56 There's an interface that I have to depend on to get a result from asynchronously, with a typical onSuccess(String thingIWant) onFailure(Throwable) interface May 24 04:16:18 oh, yeah that should be easy May 24 04:16:48 The only ways I see to create an Observable are from arrays, iterables, and futures May 24 04:17:27 yiati check this out https://github.com/mcharmas/Android-ReactiveLocation May 24 04:17:45 a good example of wrapping arbitrary async api, in this case location, in rx May 24 04:18:23 nice, thanks I'll read up May 24 04:19:31 so I'm on a 2013 nexus 7, res listed at 1920x1200. I made a 1920x1200 image to use a background, but when I draw it to the screen it appears much bigger than the screen. The line of code is: canvas.drawBitmap(bgGraphic, 0, 0, null); May 24 04:20:56 g00s: Cool so it looks like I just want to implement my own Observable class? May 24 04:21:27 usually not - you would implement subscriber May 24 04:21:41 and use Observable.create( subscriber -> ... {} ) May 24 04:23:10 https://github.com/mcharmas/Android-ReactiveLocation/blob/master/android-reactive-location/src/main/java/pl/charmas/android/reactivelocation/observables/BaseObservable.java May 24 04:23:57 Hmm okay yeah that's the class I was looking at, guess I meant Observable.OnSubscribe not Observable May 24 04:24:38 To my knowledge Subscriber is the same thing as Observer in reactive terms, and they both Observe Observables? May 24 04:24:56 terminology gets me mixed up :P May 24 04:25:44 yiati here is a smaller example from my code http://pastebin.com/78DVvW9y May 24 04:27:28 Nice, I just want to make everything asynchronous rxjava :P May 24 04:28:02 Then everything just turns into pretty straight forward binding May 24 04:28:42 so what that does is begins an async operation, a ble scan, and onNexts the results. and then quits after 5 seconds May 24 04:31:31 yiati what that also demonstrates is when unsubscribed, unregistering the listener which is typical May 24 04:31:56 which is line 49 May 24 04:32:44 Hi all, I have a quick question. Have any of you taken an app that was all activities and switched it to a fragment design? I'm feeling limited by the way I set up my app in the beginning and now I'm wanting to update it and fragments seems to be the way to go May 24 04:33:38 Guys whats the differnece between FragmentTransaction.remove and .detach( May 24 04:33:40 ()* May 24 04:33:46 I see them doing the same thing on the surface May 24 04:33:52 I guess detach removes from UI? May 24 04:45:50 android:label="@string/app_name" <——— what ‘@‘ is? May 24 04:46:05 Refers to a resource directory May 24 04:46:08 @string May 24 04:46:10 @drawable May 24 04:46:12 @anim May 24 04:46:23 all those May 24 04:46:26 drose379: thanks ;) May 24 04:46:32 You got it May 24 04:46:42 yeah, i got it. 8) May 24 04:46:52 Good haha May 24 04:46:56 New to android? May 24 04:47:12 yes, i start android before 3 days May 24 04:47:28 Cool, good luck! May 24 04:47:37 8) May 24 04:49:43 android:name="RssfeedActivity" android:name=".DetailActivity" <——— when ‘.’ is used and ‘.’ is not used? May 24 04:50:23 . is used in the Name May 24 04:50:24 Not the Label May 24 04:50:48 both are name now May 24 04:50:54 drose379: May 24 04:51:02 Name does need the . May 24 04:51:23 . mean package May 24 04:51:43 looking for a google term, what's it called when you only show part of a bitmap? May 24 04:51:50 Not sure jackcom May 24 04:52:16 . is not used base activity? May 24 04:52:37 only use . in the manifest when specifying the name May 24 04:52:49 android:name="RssfeedActivity" <—— . is not used base activity? May 24 04:53:54 Not sure what you mean jackcom May 24 04:57:51 https://bpaste.net/show/2c31a3b0f161 May 24 04:57:53 drose379: May 24 04:58:25 Whats the question jackcom May 24 04:58:40 google is the answer May 24 04:58:55 :( May 24 04:59:20 or May 24 04:59:25 42 :) May 24 04:59:32 42? May 24 04:59:36 what is 42? May 24 04:59:48 If only we knew May 24 05:00:54 JesusFreke onDetach in a fragment should be called when I detach a fragment right? May 24 05:01:17 * JesusFreke doesn't do UI May 24 05:01:36 Whats the dif from remove() and detach() May 24 05:02:15 * g00s doesn't do UI either May 24 05:02:40 id rather write a content provider than do UI on android May 24 05:03:01 g00s you should do. css May 24 05:03:03 You mean you guys dont create layouts for your apps? May 24 05:03:04 drose379: http://stackoverflow.com/a/9156584/1048340 May 24 05:03:13 thanks surf2bl May 24 05:03:51 drose379 thats kinda why my app isn't done yet :) May 24 05:04:15 haha, are you gonna hire someone to do UI? May 24 05:04:33 no, i'm very picky. i so i'll have to do it. but i hate it May 24 05:04:39 Why? May 24 05:04:43 And what you making? May 24 05:04:56 i just find the UI stuff very obtuse May 24 05:05:39 obtuse May 24 05:05:43 i have more fun working on the networking stuff May 24 05:05:51 parsers, protocols, etc May 24 05:05:59 Yeah, I can understand that May 24 05:06:04 all the lower levels of the app. but not the ui :( May 24 05:06:05 Thats the best part :D May 24 05:06:08 g00s: what are you working on? May 24 05:06:29 its just an app that connects to bluetooth weather gadgets May 24 05:06:41 interesting May 24 05:06:46 streams them over mqtt to other people May 24 05:06:57 What Lib you using for bluetooth g00s? May 24 05:07:07 none, is there one ? :P May 24 05:07:13 my own :D May 24 05:07:25 So the SDK comes with bluetooth functionality May 24 05:07:29 ? May 24 05:07:30 now this damn thing is pretty battle hardened, so i should probably open source it May 24 05:07:43 drose379 sure May 24 05:07:43 bluetooth libs: http://android-arsenal.com/tag/134 May 24 05:07:51 cool May 24 05:08:12 I did something that feels kinda hacky May 24 05:08:25 Dont know how I feel about it May 24 05:08:27 drose379: confess.. May 24 05:08:58 So I was trying to animate the creation of a fragment view May 24 05:09:05 And nothing was working May 24 05:09:27 So I am using .setAnimation() on my activity current view container and .setAnimation on the fragment view container May 24 05:09:37 slide the current view out and slide the frag container in May 24 05:10:09 http://pastie.org/10204500 May 24 05:10:16 that does sound like a major sin. May the Android Gods have mercy on you May 24 05:10:29 Lol, well check out the code May 24 05:11:06 Its actually manageable so far May 24 05:12:17 looks like there are some answers here that might be better: http://stackoverflow.com/questions/4817900/android-fragments-and-animation May 24 05:12:46 See those are animations between two fragments May 24 05:12:54 Im going from activity view to fragment view May 24 05:12:59 So I had to mess w it May 24 05:13:05 ah, I see May 24 05:13:10 It does work May 24 05:13:17 Want to see a screen recording May 24 05:13:51 I would probably do it in onCreateView in the fragment. Could be wrong too May 24 05:14:03 sure May 24 05:15:06 Ok, one min May 24 05:17:19 surf2b1 May 24 05:17:20 https://vid.me/bezW May 24 05:17:55 looks good to me May 24 05:18:33 cool, thanks May 24 05:18:44 Now I wanna animate when it detaches though May 24 05:18:52 May have to hack that together too May 24 05:31:07 dcr226: just go crazy with animations: https://vid.me/e/wVHs May 24 05:33:36 hi, i'm using Otto. can i have different method subiscribed in Activity with same parametes? May 24 05:34:18 devuser: I use EventBus by Green Robot but I'm pretty sure you can. Just make sure your activity is registered May 24 05:34:20 i have used a listener interface to call different method from fragment to actvity May 24 05:35:43 doLogin("username") wrongPassword("failed").... 2 method 2 fragment 1 Activity.... bus.post("test") May 24 05:36:16 how can call different activity method with String parameters? May 24 05:37:00 pretty sure you can't post a string. It has to be a POJO May 24 05:37:32 then just use the annotation and register/unregister in onCreate/onDestroy or onStart/onPause May 24 05:38:18 surf2b1, ok but i have Activity to show different fragments. every fragment invoke, call different activity's method May 24 05:38:49 these methods have String as parameter May 24 05:40:08 I don't think I understand. You want to make a callback from a fragment to an activity? be more clear May 24 05:41:18 if you use Otto to do this you will need to change the method params and create a "Plain Old Java Object" and you can have your string in there. May 24 05:41:40 i write this example :) Acivity 3 fragments. Every fragment call different method May 24 05:42:09 surf2b1, i know.. my experiment is an example May 24 05:53:55 devuser: still not clear what you want. Fragments that call different methods in the Activity using otto? like this: http://pastebin.com/eYhZP0AY ? May 24 06:03:48 surf2b1, yes... May 24 06:06:21 http://pastebin.com/d3VXi7Bg May 24 06:06:54 i have identical paramater :) May 24 06:11:07 Hey all. My action bar icon and color are set programatically. I noticed whenever I hit the overview/recent apps button - the image of it has the old actionbar and icon May 24 06:11:10 Any idea how to update that? May 24 06:12:08 devuser: then do something like this: http://pastebin.com/2UFnEc4A May 24 06:15:01 ok i try this :) but i have to create 2 object for 2 string May 24 06:18:37 i don't know if Otto works fine with Fragment May 24 06:18:45 I used this approach http://pastebin.com/Y1DSjQ92 May 24 06:18:47 devuser: or post the string and add a scheme. Then split the string and check the value. http://pastebin.com/kkVMccgR May 24 06:18:54 activity, interface May 24 06:19:52 that works too. you could do it in a lot of ways May 24 06:20:12 surf2b1, You've answered my question :) Otto can post message only one method with same parameter May 24 06:20:38 to call different method i need create different parameter May 24 06:20:48 is it right? May 24 06:21:19 tjbiddle: I've noticed that too. Kind of annoying. :\ May 24 06:21:57 tjbiddle: seems to be a com.android.systemui thingy so I'm not sure if it's possible to change. May 24 06:23:06 devuser: yeah.. or make your POJO have some int value that you check in the method to see what to do w/ the object May 24 06:26:08 surf2b1: Hm =\ Well - guess I'll set defaults. Interesting May 24 06:40:38 first time trying to release an app for Android. I have my app in Android Studio, how do I get a release-ready file I can upload to my website then download on my tablet? May 24 06:47:49 eb May 24 06:47:56 whoops May 24 08:25:45 hi guys! how can i check if an intent received with the onReceive() callback is from a scheduled alarm? May 24 08:42:02 Set an extra on your intent that tells you it's from a scheduled alarm May 24 08:45:24 SimonVT: like I just did. :P thanks May 24 08:51:31 mornin android people :P May 24 08:54:34 >) May 24 08:57:53 how can i call ‘import class’? May 24 08:58:58 omi May 24 08:59:07 omi? May 24 08:59:10 what mean? May 24 08:59:11 42 May 24 08:59:23 :p May 24 08:59:55 what button call ‘import statement’? May 24 09:00:21 that's nit a valid question afaik May 24 09:01:16 jackcom: what on earth are you wibbling about? May 24 09:02:12 jackcom: I know you only started 3 days ago, but "google is your friend" May 24 09:02:13 here's an import example http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/gfx/LayerView.java?mark=15-15#1 May 24 09:02:30 like import android.view.View; there is key calling ‘import statement’? May 24 09:03:32 are you asking how to automatically generate imports in an IDE? May 24 09:03:37 if you're looking for a magic button to press in an ide? May 24 09:03:40 Leeds: yes May 24 09:03:41 right May 24 09:04:35 Leeds: what keys? May 24 09:05:46 :) "you must be this tall to go on this ride" May 24 09:05:48 I don't use an IDE May 24 09:06:16 hi, can I go from free app to in-app purchases? May 24 09:06:25 capella: you know that, but you don’t say it. :( May 24 09:06:42 also I'm going out in a thunderstorm to get some food, then I'm going to rewrite the core of my main app in python and move it to server-side... I think May 24 09:06:57 fun :D May 24 09:07:16 :| May 24 09:07:23 I've written one whole python patch in my life May 24 09:07:41 jackcom ... it'll depend on your IDE ... May 24 09:07:58 i use android studio May 24 09:08:03 capella: May 24 09:08:52 gang? May 24 09:09:10 I'm not going to teach you how to use your IDE ... it does a lot of that for you, and there's google ... also, I already showed you how to explicitly import a class May 24 09:17:22 hahaha capella i found keys. heh May 24 09:17:32 option + enter May 24 09:17:35 heh May 24 09:17:54 8) May 24 09:17:57 jackcom good for you :) ... I can't speak for everyone, but this channel isn't for android dev 101 ... you'll need to apply yourself a little more May 24 09:22:26 so guys... how do I press enter on my computer? May 24 09:27:16 capella, I know you know, you just won't say :( May 24 09:27:52 heh, snark, milk out nose May 24 09:29:03 :p May 24 09:29:56 hahaha capella I found it, enter is on my keyboard not on my computer May 24 09:30:31 * capella-s3 can't... breathe... May 24 09:38:23 I have a question regarding Android navigation, views and state etc May 24 09:38:25 I have the following LinearLayout containing two ImageViews. http://pastie.org/private/mhrtgs40ext9q4jyzbwopq How can I get the right ImageView to align with the border of the parent layout? I tried android:layout_gravity="right", but there is still a gap between the image and the frame of the screen. Basically I want to have both images take up the same width of the screen. May 24 09:41:23 barq, do you want to align it or stretch it? May 24 09:42:12 Hmm, I guess stretch/shrink such that it takes up the space between the center and the right frame. May 24 09:42:59 Mavrik: ^ May 24 09:43:19 I see no right frame in your layout. May 24 09:43:22 You have two images. May 24 09:43:44 What do you want to happen to them exactly in terms of position inside linearlayout and their size_ May 24 09:43:45 ? May 24 09:44:07 I want each image to take up half of the width of the LinearLayout and scale appropriately. May 24 09:44:37 By right frame I mean right edge of the screen. May 24 09:45:58 barq, set layout_weight="1" on both May 24 09:46:02 and layout_width="0" May 24 09:46:07 that will make them exactly half width May 24 09:47:32 OK, now the second image is above the first image, though. May 24 09:47:42 Can't be. May 24 09:47:49 You have a horizontal linearlayout. May 24 09:48:23 Yes, it makes no sense. May 24 09:49:35 Mavrik: This is what I have now: http://pastie.org/private/9vkwlxttxy602slzodyqua May 24 09:50:59 Doesn't look like that's all you have. May 24 09:51:04 Can you actually provide a screenshot? May 24 09:51:10 With view borders enabled? May 24 09:52:07 Mavrik: The images are taking up half of the space left to right, but one is still above the other at the same time. May 24 09:52:52 What does that mean?! May 24 09:52:55 Make a screenshot. May 24 09:53:09 x May 24 09:53:11 x May 24 09:53:20 That's what it looks like. May 24 09:53:35 How do I make view borders enabled? May 24 09:54:14 Well then it's not one above the other, it's not aligned. May 24 09:54:46 Yes, that's a better term to describe it. May 24 09:55:21 How can I align them properly? May 24 09:56:02 By sizing the bitmaps properly. May 24 09:56:31 The images are always centered inside the ImageView May 24 09:56:49 So that means you probably have bunch of transparent space around them. May 24 09:57:24 barq: developer options > Show layout bounds May 24 09:57:38 How can I see the transparent space? I don't see any when I open the png in Preview. May 24 10:03:36 The right image has a bunch of transparency around it left and right. Shouldn't that shrink, though? May 24 10:03:56 Why would it? May 24 10:04:07 weight = 1 May 24 10:04:40 The png including the transparency should take up just the right half then, shouldn't it? May 24 10:07:26 adjustViewBounds helps May 24 10:09:47 No more transparent space around it now. May 24 10:17:59 how can i study android app efficiently? May 24 10:18:42 jackcom: http://developer.android.com/training/best-performance.html May 24 10:19:26 http://www.vogella.com/tutorials/AndroidFragments/article.html <— this is not good? May 24 10:22:07 Hey guys. Does anyone know if it's possible to make Play Store's autotranslate feature to choose a different meaning of a word, or disable it for a specific review, or... any other way of not having the naughty translation of German's "geil" in the reviews of my app targetted at young children? hahaha May 24 10:23:21 hi, does anyone knows where is the sdk path if i install android studio in mac ? previous i download the sdk separately, i know where to add it to unity, but with android studio, where is the sdk path ? May 24 10:34:42 axilaris: inside android-studio folder May 24 10:35:04 donniezazen: i can only see contents May 24 10:35:19 don't you see sdk folder in there May 24 10:35:28 nope May 24 10:35:33 just Contents May 24 10:36:09 Applications Android Studio.app Contents May 24 10:36:29 so you want to choose your sdk's location in Android Studio. Is that correct? May 24 10:36:39 yes. im trying to configure unity3d May 24 10:36:40 what's in the Android folder? May 24 10:37:01 so for android i need to specify the android sdk path May 24 10:37:26 hi folks, i have a shared preference string value which i am comparing to set it checked or not May 24 10:37:33 trouble is May 24 10:37:38 previously i just download the sdk separately on another computer. this time round, trying out android studio on this new mac May 24 10:37:45 even when i do setChecked(true) May 24 10:37:57 axilaris: What's in the Android folder? May 24 10:38:04 it doesn't reflect May 24 10:38:11 well... i just manage to download the sdk... now updating it since it doesnt work selecting it yet May 24 10:38:21 Chamooze: you mean in Android Studio folder ? May 24 10:38:30 *set a Checkbox checked May 24 10:38:32 i dont have an Android folder. or have not idea where it is May 24 10:38:45 Oooh, sorry - thought it was "Android", "Studio.app" May 24 10:39:49 hmm, is there an Android folder in the filesystem root? Saw some mention of such a path when googling.. May 24 10:41:08 nope May 24 10:41:13 are you using mac ? May 24 10:41:24 Nah, threw out all Apple stuff a while ago. heh May 24 10:43:00 still, there should be some folder or file name that you can use for "find" - probably the easiest way, if Google-fu fails May 24 10:45:00 try this in a terminal: find / -type d -name "*android-sdk*" May 24 10:52:34 hi May 24 10:53:34 Hi, quick question, if an android TV supports NFC, does that mean i am able to use the android.nfc.tech more specifically the NfcV class in that TV? May 24 10:56:05 fixed it May 24 10:57:41 android TV + NFC would be a slightly odd combination, I think... May 24 10:57:57 hi May 24 10:58:08 I need help to complete a json request and publish an android app May 24 10:58:09 https://github.com/xpheres/AndroidAnalyticalTranslator/issues/2 May 24 11:00:04 its in /Users/yourname/Library/Android/sdk May 24 11:01:00 axilaris: lol - yeah, that totally makes sense. :D May 24 11:04:07 xpheres: Do you have a specific question that you need help with? May 24 11:04:12 Leeds, not when making a cheap kiosk where you read ISO15693 cards and display data from them May 24 11:04:14 :) May 24 11:04:33 TedX: and that's going to be running Android TV? May 24 11:04:50 it could if android TV supports it May 24 11:05:10 do you know what Android TV is? May 24 11:05:21 never tried it May 24 11:05:37 i just noticed that its an option in the android studio xP May 24 11:05:53 surely your able to lock yourself into an android tv application? ;o May 24 11:07:41 this is why i came in here, trying to figure out if the idea is worth pursuing or not May 24 11:07:59 otherwise im just gonna go with an AIO android pc which has nfc support May 24 11:09:11 ok, so... "Android TV" is the new version of Google's TV set-top-box platform, replacing the utterly failed "Google TV"... it was announced at I/O around a year ago, and has gone on to... do very little, so far May 24 11:09:35 but it's a term which refers to a specific platform, not random no-name TV boxes running Android May 24 11:10:37 yeah but i was looking at this: http://www.lg.com/us/experience-tvs/smart-tv/connect May 24 11:10:50 where android-tv apparently comes bundled with the TV? May 24 11:10:59 oh wait May 24 11:11:03 wrong one May 24 11:11:04 :D May 24 11:11:16 you mean the thing which says "WebOS" in big letters in the middle of the page? May 24 11:11:19 anyone knows something like bluestack android simulator for mac ? May 24 11:11:25 they dont support mac yet May 24 11:11:44 haha yeah, apparently the reason it came up was that the phone application is available on android May 24 11:11:47 fml, forget this then May 24 11:11:58 mac version almost there May 24 11:12:36 TedX: a bunch of manufacturers promised Android TV support, both built into TVs, and on set-top-boxes... that was a year ago, and the first non-Google STB is shipping approximately now May 24 11:14:42 apparently sony has a tv with android-tv + nfc May 24 11:15:06 W85 May 24 11:17:50 sup May 24 11:17:58 allthough, chances of me finding an android tv with touch support are i guess 0 May 24 11:19:20 yeah, android tv is all about the not-touch May 24 11:19:25 you're barking up the wrong tree May 24 11:23:35 why would you want to keep touching your tv [D[Danyway? lol May 24 11:27:40 I spend too much time reading android blogs, news, etc. - and it seems that pretty much nobody noticed that one of the third-party android tv boxes actually shipped, last week May 24 11:30:08 they weren't loud enough about it I guess May 24 11:30:13 hi May 24 11:31:02 i need full stackstrace on google analytics to solve some problems and app crashs May 24 11:31:27 but i can't find any code about it , in google analytics 4 May 24 11:31:30 any idea? May 24 11:41:36 hey folk May 24 11:54:00 Hello guys. What do you prefer while building navigation drawer, creating new fragments each time the item is selected or just reusing existing fragments? Thanks. May 24 12:41:00 I need help with this, I can't figure it out http://pastie.org/10204788 May 24 12:41:23 on deleting an item from a listview May 24 12:42:35 I think I have to save all of the deletion in an array of ID's and execute the deletion on activity's onPause May 24 12:43:29 and let every Delete/UNDO only deal with expanding or collapsing items but not really removing any items from DB May 24 12:44:43 hi all! How to list all available storages? May 24 12:46:09 chamooze May 24 12:46:32 or I can try to say that the UNDO shouldnt dismiss the snackbar May 24 12:46:39 the jquery does not work or the results is not properly passed to the variable that should show the results in the xml frontend May 24 12:47:18 i dont fucking know May 24 12:53:58 Odaym, that's why the DB deletion is almost always implemented with "deleted" flag May 24 12:54:11 boolean isDeleted = true; May 24 12:54:26 and do cleanup on application startup or something May 24 13:01:33 yea yea, got it some time ago May 24 13:01:36 thanks May 24 13:01:43 the issue is to let the undo not trigger the dismiss May 24 13:02:02 and that's offered by the lib May 24 13:09:23 you know what else is a problem, collapsing the items needs a notifyDataSetChanged call to fix the proper distance between the items May 24 13:09:33 and you cannot notifyDataSet if the dataset has not changed P May 24 13:09:34 :P* May 24 13:10:32 sso basically here what I can do is a query again, to get all the items except the one that to the user is "deleted" May 24 13:10:52 that will change the dataset, and if undo is pressed, I run the query that gets all the items including the one that was just undeleted May 24 13:13:35 Is there a way to join arraylists as we do in sql? :p May 24 13:14:20 arraylist1.addall(arraylist2) May 24 13:14:36 Thats combining them May 24 13:14:49 I want to use "relalations" May 24 13:15:03 Comparing two values then add to new list May 24 13:15:11 oh May 24 13:15:12 like where id = id May 24 13:15:30 that's not what your question sounded like May 24 13:15:56 Rather, I have two collections of different types of object. #1st is a log #2nd is a equipment list May 24 13:16:13 log contains equipment ID May 24 13:16:40 I want to display the log list in a listview, but instead of displaying ID of the equipment i want the name of the equipment May 24 13:24:19 haven't used this too much before, but um, why is it that you *can't* (which I presume means "are not allowed to") notify of dataset changes if there were no changes? who's to stop you? May 24 13:25:08 xelent, what you really need is a sqlite database May 24 13:25:16 and some fairly simple SQL May 24 13:25:28 I know, but I work with what im given May 24 13:25:32 Using a servlet api May 24 13:25:54 then you're stuck having to implement your own version of JOIN May 24 13:26:11 slow and inefficient, but eh May 24 13:32:57 man, choosing a name for a boolean flag can fuck up the whole algorithm May 24 13:33:13 well obviously May 24 13:33:24 the noobness May 24 13:33:28 it burns May 24 13:33:28 o.O May 24 13:34:08 Odaym, why is it not allowed to notify of data changes when there were no changes? May 24 13:34:22 it is allowed May 24 13:34:29 you can call it anytime May 24 13:34:35 hm ok May 24 13:34:54 what you said earlier didn't sound like that :p May 24 13:35:08 what I said is different May 24 13:35:44 I see May 24 13:36:26 and here I was contemplating if this is a good time to pull out the "don't listen to Odaym" rule :p May 24 13:36:54 it depends May 24 13:37:12 you measure the % of imaginary words in hte sentence, and accordingly you ignore May 24 13:37:43 wouldn't that require knowing which words are imaginary? May 24 13:38:07 like, I know "hte" doesn't exist, but for the rest I'm not sure May 24 13:38:31 like "override hasStableIds() in baseadapter to avoid problems with view recycling" May 24 13:38:45 this is obviously imaginary May 24 13:38:58 but the words are similar and all have something to do with 1 topic May 24 13:39:20 this is what is called castle built on sand May 24 13:39:39 *generally* you have no idea what you're talking about May 24 13:39:51 lol May 24 13:40:37 especially in programming you can have hours of conversation with no one really understanding the specifics of what they're saying May 24 13:40:40 and it would be fine May 24 13:42:10 like for example me saying "you can be totally lax with memort because GC always has your butt covered" May 24 13:42:16 and others agreeing May 24 13:42:18 yea yea shit like that May 24 13:42:30 its easy to see bullshit May 24 13:42:32 memory* May 24 13:42:37 the key is when the answer is general May 24 13:42:42 instabullshit May 24 13:42:54 so over time you dont trust that person with what they say May 24 13:42:59 and you advise others to ignore them May 24 13:43:23 Hi guys. What do you prefer while creating navigation drawer for your apps: creating new instance of corresponding fragment, or reusing the existing one? Thanks. May 24 13:43:35 I don't know if I should trust you in that, Odaym May 24 13:43:36 :p May 24 13:43:40 ;) May 24 13:43:43 on*, dammit May 24 13:44:02 that's where your bullshit meter should come into play, do I bullshit more than you do to the extent that you believe me? May 24 13:44:12 that is where you have to search your soul bro May 24 13:44:13 haha May 24 13:44:40 what is this soul I keep hearing about? May 24 13:44:43 Mav is not like that for example, he doesnt talk unless he is sure May 24 13:44:58 same with asshole Simon May 24 13:45:32 more talking = less value, bro May 24 13:46:19 said the loudest person in the channel :D May 24 13:46:42 ++ May 24 13:46:53 to know what's right is different than doing it May 24 13:47:04 who gives a fuck anyway :) May 24 13:48:44 Odaym, http://i299.photobucket.com/albums/mm296/macrosgalore/fucknotgiven.gif May 24 13:49:21 heh May 24 13:49:32 in the end bro, it's your output what matters May 24 13:49:35 HA! May 24 13:49:49 * wakelock is on the toilet btw >.> May 24 13:49:51 talk about output May 24 13:49:58 no.. May 24 13:50:03 /undo May 24 13:50:12 /mindbleach May 24 13:52:52 HI everyone, i'm struggling with an error when using the Youtube API (player), everyone seem to get the same error, but i don't when i try the app on my own phone, the error is: "An error occured while initializing the YouTube player". Anyone got an idea ? I'm desperate :( May 24 13:54:27 Question about watchfaces, I'm a bit confused, how do I get the window/content view ? Activity's have setContentView() what would be the equivalent of a {Canvas}WatchFaceService? May 24 13:58:42 trigen, this is not a regular View, it extends from WallpaperService May 24 13:59:42 ah May 24 14:00:02 https://developer.android.com/training/wearables/watch-faces/drawing.html#Drawing May 24 14:02:16 you were right Mavrik, I went into this whole 2 flags issue where I had undoPressed and itemPendingDeletetion and it got messed up May 24 14:02:34 awesome, as it turned out I wanted to use opengl, but I see there is even a Gles2WatchFaceService! May 24 14:02:42 the whole purpose was to see whether the item is waiting for someone to remove it or the decision to delete it was undone May 24 14:02:46 so just 1 flag May 24 14:04:32 yes trigen, with few boilerplates code too on it May 24 14:04:51 hi, how do i launch android simulator with android studio ? May 24 14:05:09 do i need create a new project ? May 24 14:05:19 or is there a way to launch avd May 24 14:06:02 axilaris, https://developer.android.com/tools/devices/index.html May 24 14:07:28 adq: thanks. cant find the Tools menu. probably have to create a project. maybe i'll just try from command line May 24 14:14:02 * wakelock flags Odaym as "pending deletion" May 24 14:14:13 wonder if anyone ever looks at these flags May 24 14:14:16 :p May 24 14:14:39 we are all pending deletion! May 24 14:15:28 must be why no one pays attention to my flags May 24 14:26:44 all those other things could be done with that same flag too May 24 14:26:49 mind.blow man May 24 14:31:33 * wakelock thinks a single flag is all anyone should ever need for any flagging needs May 24 14:42:52 is there a way to ask the listview to redraw itself just to get the item heights recalculated? May 24 14:43:15 because notifyDataSetChanged on a fake list of items is not going to work along with collapseItem, its very messed up I tried May 24 14:43:50 requestlayout + invalidate May 24 14:44:30 ah I was shooting for just requestlayout May 24 14:47:50 hmm, no it didn't fix itself May 24 14:48:19 the collapse animation of an item is like this http://pastie.org/10204920 May 24 14:48:30 and on animationEnd im calling requestLayout + invalidate May 24 14:49:13 only when the item is deleted from db and notifyDataSet is called does the gap between the items snap back together May 24 14:51:03 I think it's because I havent used removeItem anywhere May 24 15:00:01 strange behaviour of CustomAdapter which extends ArrayApapter. API 8-10, elements getting revorced. on other above APIs its in order. Any one understand or know the problem? May 24 15:04:06 hmm, why not extend baseadapter? May 24 15:04:20 I always thought ArrayAdapter is used for those 1-liners that dont have any custom adapters :P May 24 15:04:24 haha May 24 15:05:07 anyway the order is getting fucked up because of view recycling, implement the viewholder pattern and save your soul May 24 15:07:53 oooo May 24 15:09:02 then you can use position safely and know its not held up by someone else May 24 15:09:14 or being changed as items go off the screen May 24 15:09:49 <_genuser_> hey ppl. May 24 15:10:13 hey _genuser_ May 24 15:10:36 <_genuser_> argh, stupid rainstorms. May 24 15:11:59 So implementing BaseAdapter is better, and it should be done ? May 24 15:12:11 hi May 24 15:12:23 I've been told to pull depencencies from maven May 24 15:12:24 https://github.com/xpheres/AndroidAnalyticalTranslator/issues/4 May 24 15:12:40 should I just writhe the dependencies url in gradle? May 24 15:13:38 nice issue bro May 24 15:13:39 :P May 24 15:13:41 its empty May 24 15:14:03 <_genuser_> lol, I went to look too. May 24 15:14:11 gradle include is soo much easier May 24 15:14:19 how May 24 15:14:24 sometimes if I dont find gradle integration I forget the library :P May 24 15:15:49 <_genuser_> Odaym: lol, that's harsh. May 24 15:15:54 <_genuser_> the other libraries need love too May 24 15:16:02 lol, he's not gonna lose sleep over it May 24 15:16:18 if the lib is essential I do find another way sure May 24 15:20:58 hi guys, although I don’t change the layout, not even include menu, there appeared … on the navigation bar. just like this http://blogs.technicise.com/wp-content/uploads/wpid-Screenshot_2013-06-19-22-11-001.png May 24 15:25:06 why might this be? May 24 15:29:08 You using a RelativeLayout ? May 24 15:31:15 Anyone can help with that : http://stackoverflow.com/questions/30424977/expected-begin-array-but-was-begin-object-at-line-1-column-2-path May 24 15:32:08 I'm trying to extract first the Photos object but it gives me >> java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 2 column 16 path $.photos May 24 15:32:42 and the code i : Gson gson = new Gson();Photos photos = gson.fromJson(jsonString,new TypeToken() { }.getType()); May 24 15:33:40 please, my app needs to jar files that I inserted in the self project, but I'm requested to pull them from maven in order to be able to be published in f-droid May 24 15:33:44 drose379: no, tablelayout. May 24 15:33:51 could someone help me pull those files from maven? May 24 15:34:01 https://f-droid.org/forums/topic/analyticaltranslator/ May 24 15:34:06 Oh, not sure KuckukMubasir May 24 15:34:27 http://cdn.intertech.com/PostingImages/Android-Action-Bar-from-the-Options-Menu_E1C5/image_thumb_7.png May 24 15:34:37 I think it is version issue, I am about to resolve it. Thanks drose379 May 24 15:34:46 Good luck May 24 15:36:31 where should I declare repository maven central? May 24 15:37:09 or how do I declare that repository with gradle? May 24 15:37:36 yes, drose379 solved it. target-sdk wasn’t specified in manifest.xml. thanks again for your concern May 24 15:37:44 You got it May 24 15:41:32 please I need to add volley and okhttp to my graddle May 24 15:41:49 xpheres, this is very easy May 24 15:41:49 ugh, cursor didn't implement closeable in 4.0?? May 24 15:41:50 I'm in gradle module in the depencencies May 24 15:42:05 drose379 please let me know how can I do that May 24 15:42:07 Ok May 24 15:42:17 First, open up build.gradle (Module:App) May 24 15:42:21 I'm there May 24 15:42:31 See depencencies {} May 24 15:42:38 I'm there May 24 15:42:43 Ok, anything in there? May 24 15:42:45 yes May 24 15:42:51 compile fileTree(dir: 'libs', include: ['*.jar']) May 24 15:42:56 and May 24 15:42:56 compile 'com.android.support:appcompat-v7:22.0.0' May 24 15:43:03 Ok May 24 15:43:05 Now go here: May 24 15:43:10 https://github.com/square/okhttp May 24 15:43:26 I want to move a view within a particular layout based on wherever the user 'drags' the view with their finger. Should I use the startDrag() methods onClick or use a ViewDragHelper? May 24 15:43:29 Go down to where it says Download May 24 15:43:41 thanks May 24 15:43:44 yes I see May 24 15:43:47 i have to add compile 'com.squareup.okhttp:okhttp:2.3.0' May 24 15:43:48 done May 24 15:43:51 Very good May 24 15:43:52 :D May 24 15:43:53 now I have to add volley May 24 15:44:07 Should be the same deal, just gotta search for volley dependency May 24 15:44:29 Dont forget to do a gradle sync May 24 15:44:34 right May 24 15:44:35 The IDE should prompt you to do so May 24 15:46:02 ugh, cursor implements closeable since 4.1.1, fml May 24 15:48:07 what should I press to sync gradle? May 24 15:48:29 ah synchronize May 24 15:48:48 last question May 24 15:48:57 :) May 24 15:48:59 I added in build gradle project (allprojects May 24 15:49:02 mavenCentral() May 24 15:49:11 is that the right way to add mavenCentral repository? May 24 15:49:20 Why did you need that? May 24 15:49:39 Is it not necesary to tell gradle you want to add maven central? May 24 15:49:50 Ok, that's an interesting crash that lint doesn't catch May 24 15:49:51 Why do you need maven central? May 24 15:50:07 because I've been told to pull from there May 24 15:50:08 If you add those dependencies, that should be all you need May 24 15:50:12 ah ok May 24 15:50:12 xpheres, central is automatically included in gradle May 24 15:50:18 The compile ' ' is pulling from there May 24 15:50:21 your all set May 24 15:50:27 right May 24 15:50:52 now I have errors I didn't have before May 24 15:50:56 Error:(32, 42) error: reference to JsonObjectRequest is ambiguous, both constructor JsonObjectRequest(int,String,String,Listener,ErrorListener) in JsonObjectRequest and constructor JsonObjectRequest(int,String,JSONObject,Listener,ErrorListener) in JsonObjectRequest match May 24 15:51:40 I'm going to invalidate caches and restart May 24 15:52:47 pfn for an ImageView which type of LayoutParams should I have? May 24 15:52:58 Does it depend on which type of layout its a child of? May 24 15:53:47 Simple google search turned up the answer May 24 15:53:48 my bad May 24 15:53:50 :P May 24 15:57:26 great May 24 15:57:29 it does not work May 24 15:57:42 adding the volley library from gradle make the app crash May 24 15:58:38 puddy: this should help https://github.com/googlesamples/android-ElevationDrag May 24 15:59:27 That wouldnt make the app crash xpheres May 24 15:59:30 Something else is not right May 24 15:59:36 ok May 24 15:59:46 I deleted the files from the lib folder May 24 15:59:51 and added those lines to gradle May 24 16:00:08 now it says the reference to jsonobjectrequest is ambiguous May 24 16:00:08 Ok May 24 16:00:35 Do you have it imported twice, i really dont know May 24 16:01:27 I have in the mainactivity.java May 24 16:01:29 import com.android.volley.Request; May 24 16:01:32 Ok May 24 16:01:34 import com.android.volley.RequestQueue; and so on May 24 16:01:41 should I deleted ? May 24 16:01:47 delete them? May 24 16:02:38 Yeah, delete them and re-import May 24 16:02:52 Also did you add it to the dependencies more then once by accident? May 24 16:02:53 re-import? May 24 16:02:59 no May 24 16:03:00 xpheres how deep are you into this project? May 24 16:03:09 what do you mean? May 24 16:03:27 I want to reccomend that you drop everything and re-start May 24 16:03:31 now after deleting the import statements May 24 16:03:38 Error:(22, 9) error: cannot find symbol class RequestQueue May 24 16:03:40 and so on May 24 16:03:41 * Napalm|afk smiles May 24 16:03:44 so they are needed May 24 16:04:07 You need to have them imported yes May 24 16:04:28 Error:(32, 42) error: reference to JsonObjectRequest is ambiguous, both constructor JsonObjectRequest(int,String,String,Listener,ErrorListener) in JsonObjectRequest and constructor JsonObjectRequest(int,String,JSONObject,Listener,ErrorListener) in JsonObjectRequest match May 24 16:04:31 But I think you should just start a new project, since you know how to import libs now May 24 16:04:40 mm... May 24 16:04:45 Something is prob messed up along the way May 24 16:04:58 Sometimes its best to re-start once you learn something new that can change everything May 24 16:05:00 start everything again ... oh god May 24 16:05:18 I'm going to try if it works with local dependencies May 24 16:05:22 Well thats why I asked how far into this project you are May 24 16:05:40 xpheres: want to know the fix May 24 16:05:41 because if it works with local dependencies means the gradle is not pulling properly from outside repositories May 24 16:06:02 that error is because you need to cast one of your parameters as its matching both May 24 16:06:09 lol May 24 16:06:20 oops May 24 16:06:38 ok... May 24 16:06:51 drose379: i think you follow. You can take it from here :) May 24 16:07:06 Got it Napalm May 24 16:07:19 xpheres can you paste the method that is giving you this error May 24 16:07:26 into a pastie or something May 24 16:08:28 yes May 24 16:08:32 just a moment please May 24 16:10:08 I'm going to start from the point that works May 24 16:10:23 then I delete the local dependencies and add the two lines to gradle: May 24 16:10:27 compile 'com.squareup.okhttp:okhttp:2.3.0' May 24 16:10:32 compile 'com.mcxiaoke.volley:library:1.0.+' May 24 16:10:38 xpheres Napalm pointed out this is a very simple fix May 24 16:10:40 if it does not work I will copy the errors May 24 16:10:50 Ok May 24 16:12:01 Guys im setting an bitmap to an imageview programatically May 24 16:12:15 And it works, but I want to adjust the size of the imageview before I set the bitmap May 24 16:12:27 But whenever I mess with the LayoutParams, the bitmap is not settting May 24 16:12:30 Cant see why May 24 16:12:53 lets see the code May 24 16:13:18 Ok, only a few lines May 24 16:13:31 http://pastie.org/10205045 May 24 16:14:01 try invalidating it May 24 16:14:05 nooo May 24 16:14:06 or using adjustViewBounds() May 24 16:14:15 drose379: get the current layout params May 24 16:14:21 and adjust them and set them back May 24 16:14:21 also that May 24 16:14:22 ČD May 24 16:14:34 Ok after I adjust them I have to set them back? May 24 16:14:41 it'll be fine May 24 16:14:42 ok now I deleted the files and added the two lines May 24 16:14:47 I have the following errors May 24 16:15:08 Napalm, my ImageView is inside a LinearLayout May 24 16:15:18 So I need LinearLayout.LayoutParams, correct? May 24 16:16:04 drose379: ViewGroup.LayoutParams lp = defImage.getLayoutParams(); lp.width = 200; lp.height = 200; defImage.setLayoutParams(lp); May 24 16:16:14 Why viewgroup and not LinearLayout? May 24 16:16:22 http://pastebin.com/mn1fPrMv May 24 16:16:25 please have a look May 24 16:16:37 drose379: because its the base type May 24 16:16:52 Ok, I kinda thought it was whatever the View's parent was May 24 16:16:57 But I should just stick to ViewGroup? May 24 16:17:01 it still is May 24 16:17:14 I updated it with whole log May 24 16:17:16 drose379: the object does not change its type May 24 16:17:27 So LinearLayout is a viewgroup May 24 16:17:33 So I should just use ViewGroup May 24 16:17:35 why after adding to gradle the dependencies May 24 16:17:37 it does not work May 24 16:17:37 drose379: the idea here is that it'll be whatever extends the default layout params so it doesnt matter what the parent is May 24 16:17:43 Ok, cool May 24 16:17:47 Thanks Napalm May 24 16:18:46 drose379: try it and see May 24 16:18:48 xpheres the gradle dependencies you added are not the issue May 24 16:18:53 drose379: there might be another issue here May 24 16:19:08 but the issue happens only when I delete the local dependencies from the lib folder May 24 16:19:21 Actually, neither viewgroup or Linearlayout layoutParams work May 24 16:19:37 if I put them back It should work again May 24 16:19:44 so it is taking the dependencies locally May 24 16:19:47 Wanna see the updated code Napalm? May 24 16:19:53 why? May 24 16:20:01 xpheres Napalm told us the issue May 24 16:20:05 Look into that May 24 16:20:20 Read up on the error and what it means, itll lead you to the fix May 24 16:22:02 drose379: explain what visually happens.. because the code itself is fine. I suspect its a runtime issue. like the code itself is not being executed or the view is not actually attached to the layout. May 24 16:22:26 You know what May 24 16:22:42 An activity is re-built whenever the screen is rotated, isnt it... May 24 16:23:09 drose379: depends on your manifest declaration of your activity. May 24 16:23:35 Ok, for some reason whenever I have code in there to mess with the LayoutParams my camera rotates before going back to the activity May 24 16:23:43 Which would re-start the activity May 24 16:23:48 Which would make the bitmap not be set... May 24 16:24:02 Whats the declaration in the manifest that I can adjust? May 24 16:26:32 I set screenOrientation to portrait May 24 16:26:40 But will that effect the camera application from rotating? May 24 16:30:23 Napalm its not working at all now May 24 16:31:26 drose379: you shouldnt need to specify an orientation or configChanges May 24 16:31:52 Napalm so Im using a camera intent and then in onactivityresult im getting the bitmap May 24 16:32:11 But before it returns to my app, it rotates to landscape and my app shows up in landscape, then goes to portrait May 24 16:32:16 Which is the issue May 24 16:32:34 hello May 24 16:32:45 is it possible for an app to connect to adbd? May 24 16:33:06 paulo_: no May 24 16:33:25 paulo_: or I should say, not without root May 24 16:33:41 Napalm do you want me to make a screen recording? May be easier May 24 16:33:47 so there is no possible way to enable tcp adb without a cable? May 24 16:35:30 is there any way to set a String identifier for any type of View so it would be easy for a human being to identify it in Hierarchy Viewer ? May 24 16:36:43 for example I have an app that requires root, and accesses data of other apps. Is this allowed? May 24 16:36:55 drose379: ok May 24 16:37:07 like, the exact purpose of the app is to extract some data from another app. May 24 16:37:33 saapas: yes May 24 16:38:03 Napalm, .setTag(), or what? May 24 16:38:36 saapas: yes May 24 16:38:43 ok thanks May 24 16:38:57 saapas: you can use android:tag attribute and then findViewWithTag May 24 16:39:13 Napalm https://vid.me/WVgq May 24 16:39:23 Watch how the app is in landscape when it comes back from camera May 24 16:39:49 drose379: ah, i see May 24 16:40:02 Literally it was working like 20 mins ago May 24 16:40:02 Napalm, ok. I'm creating certain Views dynamically so I can't set id for them May 24 16:40:12 Then I tried to mess with layout params, now it stopped May 24 16:40:17 So idk May 24 16:40:18 saapas: yes you can May 24 16:40:31 saapas: View.generateViewId() May 24 16:40:34 oh. May 24 16:40:59 Napalm, buut.. that returns an int. May 24 16:41:08 An id is an int May 24 16:41:13 lol May 24 16:41:13 yes May 24 16:41:24 So your fine May 24 16:41:33 Napalm, you ever see this issue before? May 24 16:41:44 so first May 24 16:41:50 drose379, I'm not so sure. May 24 16:41:51 force your activity into landscape May 24 16:41:59 saapas: why not so sure? May 24 16:42:01 Ok, so start in landscape? May 24 16:42:06 record it May 24 16:42:11 and does it work? May 24 16:45:02 nope the tag, even if I set a String, is not visible in hierarchy viewer May 24 16:50:39 a generated id also doesn't really help because I don't know where in my code it is set for a certain View. May 24 17:00:53 does any of you use IntelliJ Idea of Android dev? May 24 17:01:19 Is just switched from Android Studio, and I can't find a way to have the "Android" view in the project list of views May 24 17:02:14 If it's not there, they simply haven't merged that in yet May 24 17:03:08 alright, thanks May 24 17:10:46 Is nexus 9 16gb would be good for tablet prgramming? May 24 17:11:02 i thought had to have more space for it. May 24 17:14:03 Sorry for the newbie question. May 24 17:19:58 perlsyntax: if you're only gonna use it for development (ie. not have a bunch of other apps installed), 16gb is plenty May 24 17:20:15 16GB is plenty even for more than that May 24 17:20:30 Chamooze,I was thinking of trade in my ipad aie 2 i got for the nexus 16gb. May 24 17:20:33 I still have about 6G free on my 16G device May 24 17:20:39 cool May 24 17:20:54 could easily have more if I needed to May 24 17:21:31 moto x 2014 has a personalized boot splash screen. When you order, they write your name on it. Anyone know if it's possible to back that up somehow? May 24 17:21:32 i thought my 64gb iad cost to much and it take for ever to change the battory i hope i spell it right. May 24 17:21:50 perlsyntax: android dev doesn't use any extra space on the device itself (apart from the app itself, of course) May 24 17:22:29 I think i understand now.I have to wait for monday to get it hope i can get the last one at bestbuy:) May 24 17:22:56 damccull, wrong channel May 24 17:22:59 Chamooze,I like my nexus 6 better then apple things for tablet. May 24 17:23:35 wakelock: oh ok. thanks. May 24 17:24:03 Oh i forgot nexus 9 has android 5.1 now.:) May 24 17:25:57 thanks for the help Chamooze:) May 24 17:27:58 nexus 9 too damn expensive for 18 months of support, screw that May 24 17:28:08 you can get an ipad and get 4 years of support May 24 17:28:30 he wants a dev device though May 24 17:29:42 hey g00s didn't see you there. May 24 17:29:46 :) May 24 17:29:50 hey perlsyntax :) May 24 17:30:04 g00s tends to be invisible sometimes May 24 17:30:09 i'll be like wakelock and use my 2013 n7 for years to come May 24 17:30:24 you guys will be like, "lol, you still have a n7 2013" lololol May 24 17:30:26 g00s, that is offensive, my phone is from 2011 :p May 24 17:30:59 g00s,I was thinking of doing android programming then getting into apple prgramming.:D May 24 17:31:19 perlsyntax hm, i think its hard to know both well, so much to know May 24 17:31:28 but its good to expose yourself to new stuff yeah ! May 24 17:31:44 yep that true but i do have android dev acc. May 24 17:31:50 nah you just need to know how to wrap your webapp into a webview May 24 17:31:52 :p May 24 17:32:09 if you do ios, you can make a desktop app and share lots of code between them, so you basically have 3 platforms: mobile, tablet, desktop May 24 17:32:33 same goes for windows 10 May 24 17:33:04 perlsyntax are you starting off with swift ? May 24 17:33:05 well android doesn't have a desktop os yet, or else... :p May 24 17:33:20 g00s,I want to try out android first to see if like it. first. May 24 17:33:31 ah k May 24 17:33:33 Most of my family has android. May 24 17:33:55 For some reason i like nexus hardware better. May 24 17:34:33 maybe because it's dev friendly? at leats supposedly May 24 17:34:38 g00s,I was thinking apple take more space on ipad tablet to prgram with i found out. May 24 17:34:51 wakelock,That true May 24 17:35:51 wakelock,You get better updates to:) May 24 17:40:07 wakelock,I think i read there android m could be a developer edition for android that be cool if it true. May 24 17:40:34 so um, pretty much just like it went with L May 24 17:41:25 perlsyntax you mean preview ? May 24 17:41:31 yes May 24 17:42:15 i really start to like android better for some reason maybe you don't have to pay every year:) May 24 17:42:41 or, you don't necessarily have to publish on google play May 24 17:42:47 there are many other stores out there May 24 17:49:00 that true. May 24 17:52:16 I need a skew layout so it is tilted on one side , is there a way to make a whole relative layout tilted (SKEWED) ? May 24 17:54:04 in gradle: how do i access the currently activated flavour(s)? May 24 17:54:19 chinu_, you mean rotating it? May 24 17:55:05 draw the whole thing on Canvas, rotate it, drop it on screen :p May 24 17:55:11 ^ this May 24 17:55:21 you could just override the layouts onDraw May 24 17:55:36 call canvas.rotate(...) and then super.onDraw(canvas) May 24 17:56:22 danijoo I mean skewing it like I have a relative layout and when i press the menu the whole relative layout should be tilted in a way that it should look like the layout is inside the screen.(3D like) May 24 17:56:46 I... don't understand May 24 17:57:11 thats a lot of work chinu_ May 24 17:57:24 you would have to draw the whole thing on your own May 24 17:57:34 "there's an app for everything" s/app/lib/ May 24 17:57:35 if it goes beyond simple rotation May 24 17:57:56 that's okay, he can always use GLES :p May 24 17:58:28 wakelock, I think he means some effect you would get when the left corners are on another z-axis level than the right one May 24 17:58:55 that's weird... May 24 17:59:01 yes it is ^^ May 24 18:00:03 'private abstract' illegal combination, hmm May 24 18:00:04 danijoo and wakelock I am uploading the sample layout in imgur please wait , let me show May 24 18:00:18 g00s, diesnt make much sense ^^ May 24 18:00:27 if its private, how can a subclass use/extend it? May 24 18:00:32 i preferred c++ visibility modifiers May 24 18:00:43 what is this for? class? member? May 24 18:00:45 chinu_, you should upload a sketch of what it should look like, too May 24 18:00:58 hey. I'm using Intent for text sharing from my game. Is it necessary to use a Handler there? All I want to happen is to show a list of applications like "Whatsapp" installed and then sharing happens through that. May 24 18:01:02 private abstract makes perfect sense if the outer class will later extend it May 24 18:01:04 danijoo wakelock : http://imgur.com/WAv7rCE May 24 18:01:11 danijoo so , how do i make a method which should only be visibly by a subclass ? i can't really; default or protected are more open May 24 18:01:30 chinu_, yeah that is very much nontrivial May 24 18:01:53 as of now, I'm not using a Handler object and it works fine. But I see a lot of places on the internet that make use of it. May 24 18:01:55 g00s, wrap it into a private abstract class ;) May 24 18:02:10 g00s, if its only visible for the subclass, why would you want it to be abstract? May 24 18:02:26 danijoo i'm using 'template method' May 24 18:02:28 isnt the reason for abstract methods that you can implement useage of it in super class? May 24 18:02:35 ah yeah.. May 24 18:02:36 g00s: ! May 24 18:02:40 wakelock : I was thinking like saving the bitmap of the layout drawen and on slider menu skewing the image rather then the whole layout May 24 18:02:41 hey thepoosh May 24 18:02:43 i'd just go with package private then. May 24 18:03:05 chinu_, that's still a crapload of work, AND it will probably end up looking crappy May 24 18:03:06 thepoosh so how did the week of feature effect things ? May 24 18:03:16 meh May 24 18:03:29 we found issues with a service provider we were using out of the US May 24 18:03:35 and some other bugs May 24 18:03:38 i think it already look crappy on the imgur.. May 24 18:03:47 danijoo : do you have any clue ? I believe everything is possible with good process :) May 24 18:03:58 thepoosh a service provider? carrier ? api ? May 24 18:04:02 chinu_, ofc. you can draw it on your own. or somehow modify the canvs May 24 18:04:05 canvas* May 24 18:04:11 g00s: Nexmo May 24 18:04:19 they send SMS for us May 24 18:04:24 for registration May 24 18:04:27 but its ugly, against material guidlines and a lot of work. so its 3:0 for not implementing it :pp May 24 18:04:38 thepoosh oh, never heard of it May 24 18:04:58 (forgot the imo) May 24 18:05:03 thepoosh so did they fix the problems ? May 24 18:05:04 https://www.nexmo.com/ May 24 18:05:20 i got my second app reinstantiated by google. what am i? god? May 24 18:05:26 dunno, we found other methods of authentication we'll try May 24 18:06:32 2 reinstantiations in 2 weeks. I think thats more than google usually have in a month :p May 24 18:06:48 danijoo congrats, now i know who to call :) May 24 18:07:07 well the second one was kinda luck I guess May 24 18:07:20 danijoo, making good connections there I see May 24 18:07:21 it just doesnt trigger the algorithms anymore. dont ask me why May 24 18:07:51 I just swaped screenshots against other screenshots, basically from the same thing lol May 24 18:07:52 sorry to persist. I read that a Handler is needed when a UI thread switch needs to happen. Is the text share Intent dialog such a switch? May 24 18:07:52 what needs to be done in the code to take advantage of multi core processors on mobile devices? May 24 18:08:02 do i just multithread and the OS handles the rest? May 24 18:08:22 pie__, for what? May 24 18:08:39 ui can only be drawn using one thread May 24 18:08:59 danijoo: in general (theoretically), i dont have any concrete ideas May 24 18:09:07 for everything else you could spawn 1 thread per core. But this only makes sense if they have enough work May 24 18:09:40 yeah there is no control over thread affinity. you could have 4 threads, 4 cores, and all on one core May 24 18:09:47 sure May 24 18:09:52 depends on SoC linux scheduler May 24 18:10:10 also multi core optimization is a huge topic May 24 18:10:19 you can read books about it and still not know enough May 24 18:10:30 I'm just wondering what's necessary to give the system the possibility of utilizing the available resources and not choking on one core if the load grows May 24 18:10:33 measure, always May 24 18:10:37 but for java you really dont have much control.. May 24 18:10:46 will creating about 100 BlurMaskFilter instances for different radiuses be a problem? May 24 18:10:52 pie__: Android takes care of it. All you can do is decide on how many threads to use. May 24 18:11:02 im actually contemplating writing a python app, but we'll see how that goes May 24 18:11:08 pie__, how to make use of a multicore device? try calculating the zillionth decimal of PI May 24 18:11:09 lol, gil May 24 18:11:15 oranjuice: I don't see why you'd need to use Handler, or even think about threads, for that. May 24 18:11:30 I dont feel like figuring out threading so im just going to go with asynchronous things for blocking web stuff May 24 18:11:33 pie__ also look at renderscript compute for certain classes of problems May 24 18:11:35 g00s: yep May 24 18:11:51 TacticalJoke: I thought about threads because the GUI that's presented isn't one of my game. May 24 18:11:56 pie__, so you don't feel like figuring it out but you want to use it. smooth May 24 18:12:01 renderscript exposes even less, you have no idea what is running and where May 24 18:12:23 wakelock: I dont want to blow my brains out dealing with deadlocks and sh** May 24 18:12:25 TacticalJoke: or does it run on my game's thread? May 24 18:12:45 you don't become a good dev before you blow a few brains May 24 18:12:50 out* May 24 18:12:55 I guess thats true May 24 18:13:18 anyways, gotta start somewhere, and I don't intend to start with threading yet :P abstract that stuff away for me May 24 18:13:42 dont ask yourself about multi core then May 24 18:13:42 *I don't need threads yet May 24 18:13:47 oranjuice: I'm not sure. I guess it's an Android implementation detail. In any case, you can just start the activity; there's nothing else for you to do. May 24 18:13:49 I was just curious May 24 18:13:54 pie__ you have to know about concurrency :) May 24 18:14:01 so you ask and dont want an answer? May 24 18:14:03 public abstract class PieThread extends Thread { } May 24 18:14:04 done May 24 18:14:07 I misunderstood my own question May 24 18:14:46 anyway, thanks. May 24 18:15:17 sooner or later youll have to deal with threads May 24 18:15:26 especially when making web client May 24 18:15:37 oranjuice: If you were to start a new thread, do stuff, and then come back to the main thread, it'd make sense to use Handler.post. But not with the "Share text" thing. May 24 18:15:42 not in context of multicore May 24 18:15:57 Ashiren: I'm going to try approaching it with futures May 24 18:16:05 I think a good introduction to concurrency is AsyncTask. It takes care of little details. May 24 18:16:09 AsyncTask and background services kind of make you not need threads May 24 18:16:24 TacticalJoke: true. This is essentially blocking in nature. May 24 18:16:25 they do use threads, but.. May 24 18:16:27 Ashiren, he'll just realize he's dealing with threads already. every app has several auto-threads going May 24 18:16:36 oranjuice: Activity.startActivity isn't blocking, FWIW. May 24 18:16:42 It's just "Start this activity at some point in the future". May 24 18:16:50 Android will take care of the details. May 24 18:17:06 Oh. so when it does start, it does block my main thread right? May 24 18:17:17 I wouldn't want the game to run while all this sharing happens. May 24 18:17:30 You'll get Activity.onPause. May 24 18:17:33 When it starts. May 24 18:17:43 You could stop the game loop or whatever there. May 24 18:18:47 oh great. thanks May 24 18:19:36 oranjuice: My app launches the YouTube app in some cases. When it does this, sometimes (on my old phone) it takes around five seconds for the YouTube app to appear, during which the user can still interact with my app. (However, right before it does appear, I get Activity.onPause.) May 24 18:20:23 that's perfect May 24 18:21:15 A nice (and documented) guarantee here is that the next activity will not show until your Activity.onPause returns. May 24 18:21:40 Activity.onPause is one of the rare cases in Android UI stuff where we can avoid race-condition madness. :D May 24 18:39:08 why aren't a standard set of screen sizes in pixels mentioned anywhere? May 24 18:39:17 is it that there is no such standard? May 24 18:40:06 oranjuice: a bunch is mentioned in AVD templates, but generally android prefers to go with actual densities... May 24 18:40:11 I understand the other units of measuring screen sizes, but I use a viewport in my code. I deal with virtual viewport coordinates. So I don't have to worry about screen densities or sizes. May 24 18:40:23 p_l: ah, I see May 24 18:41:19 I just need to be able to pick my sprites depending on the screen size in pixels. May 24 18:41:46 So I was looking for equivalence classes in screen sizes (or widths in particular) May 24 18:55:40 I am using parse and when the .save() method is called the main Thread is put to sleep. I would like to make a progressdialog appear in a seperate thread durring this opperation. Is there anyway to do this without putting the .save() in a separate thread? May 24 18:58:35 I've never used Parse before, but the documentation for ParseObject.save says "Typically, you should use ParseObject.saveInBackground() instead of this, unless you are managing your own threading". (Google FTW.) May 24 19:03:20 TacticalJoke: for my use case saveInBackground doesnt work for me May 24 19:03:27 i use both in my project May 24 19:03:45 for this one part of the app i need to use .save() with my own thread May 24 19:04:06 the app's entirely done at this point i just need this one loading animation :/ May 24 19:07:50 Not quite sure what you're asking. If you call ParseObject.save on the main thread, you'll get no loading animation because a blocked thread can't do anything. Why doesn't ParseObject.saveInBackground work? May 24 19:09:19 TacticalJoke: this one function in the program has a lot of nested .saves(), .fetchs(), and .calls(). Some are int he background some are not. May 24 19:09:21 Hi guys, had a quick basic question. I'm trying to create a SQLite database and i have my variables such as table and column names in a seperate java class than my class used to create my database. However, when i try to reference those variables it tells me that non-static fields cannot be referenced from a static context. Any dies? May 24 19:09:35 ideas* May 24 19:09:49 if i want to use saveInBackGround with all the nested functions the data will not be saved or fetched int ime May 24 19:10:36 if i wante dto rewrite the whole function and use .saveInBackground() with a done() implemented interface i prbably could but it would be onver complicated and i dont think i would do it May 24 19:11:29 for example in another part of I save a picture and use saveInBackground with a interface that tells me whens it's done. In this done() method I dismiss the progress dialog May 24 19:11:54 apoc52: its exactly as it says May 24 19:12:38 apoc52: make your variables static May 24 19:12:56 apoc52: assuming they are primitive types such as int or String May 24 19:15:14 Napalm: Thanks man - I was missing a static in my variable declaration May 24 19:15:17 and it was driving me crazy May 24 19:15:59 DadFoundMy: Can't you call ParseObject.saveInBackground(SaveCallback)? May 24 19:16:19 thats the interface i was refering to May 24 19:16:58 i can normally use it, but since in this one spedcific fucntion I have so many different parse calls i cant really use it in my code's current form May 24 19:17:25 a lot of the function is javascript cloud code that a friend wrote for the ios version of the app May 24 19:18:34 if i could start the progress dialog in a different thread i could start it at the top of the function and simply end it at the bottom May 24 19:25:25 Do your stuff in another thread, not the progress dialog May 24 20:07:31 https://gist.github.com/misterch0c/9ed650b78b60b678d119 this piece of code is called in a thread. I want to dosplay a different image everytime(chosenurl). Problem is the previous image always flash quickly before the new one appear. Any idea how to solve this? May 24 20:14:18 "g00ey" ? :p May 24 20:14:54 g00ey: Is your question "When I have a WebView load an image and become visible, why is the old image showing for a moment?"? May 24 20:15:04 If so, the answer is probably that WebView.loadUrl isn't instant. May 24 20:15:44 You can probably hack around this by making the WebView load a blank page before making it visible, but the ultimate issue here is using WebView to display images. May 24 20:17:06 yep that was the question x) May 24 20:17:09 thank you May 24 20:23:35 how do I get display metrics for edit mode? May 24 20:23:50 or is there some way to fake display metrics that make sense May 24 20:24:03 in correspondance to the edit mode screen May 24 21:07:58 Hi , Can we read the audio file playing in android from code ? May 24 21:08:53 Like there is a music file running in a app and I want to read the bytes from my app from audio manager , is it possible ? May 24 21:14:36 chinu, you want to read the audio file another app is playing? May 24 21:15:33 danijoo : yes , is it possible , as i can see we can check if the audio is playing in the device or not by AudioManager method May 24 21:15:53 so is there a way we can read the bytes playing in the device May 24 21:17:26 chinu, there is a trick, but it relies on few conditions and there are few constraints May 24 21:17:48 adq : any refrence material ? May 24 21:18:21 with the Visualizer class, you can hook on audio session id 0, but one of the constraints is you will get 8-bit PCM 8kHz May 24 21:18:43 but, if the app playing audio is not playing when not focused, you're screwed May 24 21:18:52 why do you want that in first place May 24 21:19:00 also audio session id 0 is deprecated May 24 21:19:19 chinu, http://developer.android.com/reference/android/media/audiofx/Visualizer.html May 24 21:19:22 hmm , well audio quality is not an issue May 24 21:20:19 as my app is like showing dancer on the screen when music is playing , and i want to make the dancers step as per the audio playing , and i want to process the dancer move in runtime May 24 21:21:56 it also provides FFT data May 24 21:22:07 so you might be interested in allowing certain move depending on the frequency May 24 21:22:18 yeah that would be great May 24 21:22:29 simply .getFft? May 24 21:23:00 ah ok yea I guess, sure May 24 21:23:10 it isnt the Fft that will get you an accurate frequency ;) May 24 21:23:47 by the way, the solution to refreshing listview's views is listview.invalidateViews() adq, not invalidate() + requestLayout May 24 21:23:55 Odaym , then how can i get the frequency ? and what about the deprication adq ? May 24 21:24:07 well you need to know DSP May 24 21:24:07 ah good to know Odaym May 24 21:24:43 chinu, http://developer.android.com/reference/android/media/audiofx/Visualizer.html#getFft(byte[]) May 24 21:25:09 if you don't know FFT, you better document yourself about it if you plan on udnerstanding audio signals May 24 21:26:29 no, invalidateviews is wrong too :\ May 24 21:33:00 well gn May 24 21:35:38 I'm so tempted to just go with Kotlin now. Some of my code is verbose and hard to change because of Java's lack of first-order functions. (I could fix this using closures, but I'd be allocating stuff all over the place.) May 24 21:36:10 Making use of inline functions and lambdas in Kotlin, the code would become way easier to maintain (and read) with no performance reduction. May 24 21:36:29 while you have your problems, I have mine lol: struggling on UI May 24 21:36:38 http://i.imgur.com/RRZ3J7G.png <- tempo area (top-left) sux May 24 21:37:15 What don't you like about the tempo thing? May 24 21:37:28 it sux May 24 21:37:38 i don't like it, visually May 24 21:37:50 but i cannot hide it in another screen May 24 21:38:52 I guess one option would be to have an entire bar on the top for "tempo" (perhaps with + and - buttons), though it would waste space. May 24 21:39:07 yeah originally it was like you describe lol May 24 21:39:40 How about putting tempo to the left of MASTER? It'd waste a little space, though. May 24 21:39:48 It might look weird too. lol May 24 21:40:01 will not be consistent/coherent May 24 21:40:24 i think i will sleep on it, and came back later, i'm losing too much precious time on UI May 24 21:41:20 I like the appearance, on the whole. Has a professional feel to it. May 24 21:41:21 it's either too much space on high dpi screen, risk of empty feeling. Or not enough space, have to divide in multiple screens increases the number of actions from the user May 24 21:41:28 and rarely, an optimal compromise May 24 21:41:35 thx TacticalJoke May 24 21:42:18 TacticalJoke, if you are curious: https://vid.me/1L6R made this vid a hour ago, i was planning on testing some stuff and forgot quickly i test :'] May 24 21:42:27 Hmm... May 24 21:42:33 Isn't "tempo" related to "play"? May 24 21:42:39 If so, you could put it near the 'play' button. May 24 21:43:17 it will leave an empty space under the record button, not sure it will "not sux" May 24 21:43:20 Then again, I guess those buttons are the top are a little different. May 24 21:44:28 That looks great. :) May 24 21:44:52 Who is your intended audience? May 24 21:50:11 TacticalJoke, edm producers who just wants to jam May 24 21:50:21 cause it's not serious as a real DAW and lack a lot of pro features May 24 21:56:38 is there a way to speed up builds? May 24 21:56:45 it wasnt like this in eclipse w/ ADT. May 24 21:57:12 Yeah. Eclipse didn't use Gradle. May 24 21:58:09 Some people upgraded Gradle to 2.4 and reported a speed increase: https://www.reddit.com/r/androiddev/comments/35b2hv/psa_update_your_gradle_version_to_24_it_can/ May 24 21:58:13 Not sure whether it's a good idea, though. May 24 21:58:46 does the Android Studio automatically notifiy for updates? May 24 21:58:53 not sure if i'm running the latest. May 24 22:11:28 Hey all. I'm doing RESTful API calls to a backend service in my application. Is it considered bad practice if I want to serialize and store these objects to disk after API calls so that the application has content to display in the event that it is ever run without network access? May 24 22:15:30 tjbiddle: you just described what most apps do May 24 22:15:45 tjbiddle: a mobile device is a device that is not always online. all the decent apps cache data offline. May 24 22:15:57 tjbiddle: some apps just use a http cache to make it simple May 24 22:20:49 Napalm: Ah - so HTTP caching would be the correct way to go about it? Looks like I can set caching on OkHTTP and set the client in Retrofit to accomplish that. May 24 22:21:10 tjbiddle: could be.. its completely up to you May 24 22:21:33 Napalm: What would be other alternatives? I haven't done something like this before May 24 22:21:52 just use sqlite locally May 24 22:22:04 or flat file with serialized objects May 24 22:22:10 what could cause this to return false although their is a valid wifi connection? May 24 22:22:17 https://gist.github.com/danijoo/efb21b188bce8110edcd May 24 22:22:29 Hi guys! Has anybody here ever tried to implement animated reordering of ListView items? It seems that it's not a trivial task in Android and there's no simple solution for that (which is kinda dissapointing) May 24 22:22:44 danijoo: what version of android? May 24 22:22:56 The most powerful lib I found for similar purposes is https://github.com/nhaarman/ListViewAnimations May 24 22:23:03 AlexBerdnikov: you should use RecyclerView to resolve it May 24 22:23:10 Napalm, seems not be related to a version May 24 22:23:19 daniel3: Do you have ACCESS_NETWORK_STATE permission? May 24 22:23:21 yeah, I'd say go straight to RecyclerView. listview animations are a massive pain. May 24 22:23:24 i get reports from time to time that data connection in my app is not working May 24 22:23:25 AlexBerdnikov: think of RecyclerView as ListView2 May 24 22:23:29 danijoo: * Sorry daniel3 May 24 22:23:30 but only from a few users May 24 22:23:39 Although while it allows to implemet drag-n-drop and similar stuff it can't move items programmatically May 24 22:23:43 tjbiddle, yeah its working for 99.99% of users :) May 24 22:23:48 theres just some who report this May 24 22:23:52 maybe one person a month May 24 22:23:56 Interesting May 24 22:23:59 yeah May 24 22:24:02 Napalm Thank you, I'll at it May 24 22:24:03 this really mocks me -_- May 24 22:24:08 im pretty sure its that method May 24 22:24:19 pebcak? :) May 24 22:24:21 *I'll ook at it May 24 22:24:24 danijoo: i only ask because v21 has the new requestNetwork to force to 3G even when on WiFi May 24 22:24:48 Napalm, no the bug in my app is older than 21 :) May 24 22:24:51 I think it more lightly that as tjbiddle says. its pebcak May 24 22:25:11 pebkac May 24 22:25:13 even May 24 22:25:58 i think it could be rooted devices with a permission manager May 24 22:26:08 that could be a reason.. May 24 22:26:26 is there a way to get android studio / gradle to tell me when maven dependencies have updates? it's a pain to check them all by hand periodically :| May 24 22:26:28 danijoo: it would fail with a SecurityException then May 24 22:27:28 danijoo: use https://developer.android.com/reference/android/app/AppOpsManager.html to check the permission May 24 22:28:12 I now have one of those guys on email. Im going to send him some test apks to see whats going on ^^ May 24 22:28:14 danijoo: or https://developer.android.com/reference/android/content/pm/PackageManager.html#checkPermission(java.lang.String, java.lang.String) May 24 22:28:23 Napalm, thanks Napalm. Ill check that May 24 22:28:39 if you do that last one you can then throw your own exception message May 24 22:28:44 but if this is the case, its not my problem but the users :p May 24 22:30:10 Napalm, I'm not really experienced in Android yet so if you don't mind I'll ask you why do you think it wasn't implemented with standard ListView? Why there are two similar UI components? Why do you think it's not, you know, unified? May 24 22:31:00 groxx, a plugin to check for updates is easy but it's not built in May 24 22:32:00 AlexBerdnikov: what wasnt implemented with standard ListView? What you mean ListView and RecyclerView? and whats not unified May 24 22:32:22 groxx, also wouldn't work if you happen to be pulling from an ivy repo May 24 22:33:27 pfn: happen to know if one exists? May 24 22:33:29 I still need to check out recycler view May 24 22:33:38 groxx, don't know, I don't use gradle or as May 24 22:33:48 there is one for abt May 24 22:33:51 sbt... May 24 22:34:17 Napalm, Well, you advised me to look at RecyclerView sinse it's lika an improved version of ListView which might by helpful in implementing what I was asking in the beginning May 24 22:34:47 correct, and? May 24 22:35:22 So I'm just wondering why there are two very similar UI componets? May 24 22:35:32 ones old, ones new May 24 22:35:33 lol May 24 22:35:38 Oh, ok :) May 24 22:35:52 Thx :) May 24 22:35:57 the reasons are many but simply to say RecyclerView is what developers should be using now May 24 22:41:38 hmmm https://code.google.com/p/android/issues/detail?id=11866 May 24 22:41:41 thats interessting May 24 22:44:52 2010 May 24 22:44:52 lol May 24 22:44:55 way old May 24 22:45:43 danijoo: the last comment however is interesting May 24 22:46:18 danijoo: it could be as simple as the wifi has switched itself off because of sleep.. and so.. active network is null May 24 22:46:21 Napalm, i found another issue from 2009 ^^' May 24 22:46:41 they say that getActiveConnection() could return null when the phone has some weird settings May 24 22:46:52 ie. if wifi is connected by wifi is not the default connection May 24 22:47:41 they suggest to explicitly check getNetworkInfo(ConnectivityManager.TYPE_MOBILE) and getNetworkInfo(ConnectivityManager.TYPE_WIFI) seperatly each time; May 24 23:16:48 hi again May 24 23:18:57 quick noobish question more related to OOP in general: I'm trying to have a well-designed application, so I seperate business logic and UI. But how should they communicate data? In my case, I have an enum in my model ; should the UI use the enum's model, ask for the enum name or the enum ordinal? May 24 23:19:23 ugh. when will google have _working_ testing documentation? I've wasted way too much time fixing their version conflicts / multiple dex file errors. May 24 23:19:43 Maybe I'm complicating things but I'd appreciate any help that would appease my confusion :p May 24 23:21:19 gpyh: Can you give an example of such an enum? May 24 23:23:03 A lot of this stuff will vary on with the specific details. May 24 23:23:13 -on May 24 23:23:57 gpyh, just because you should separate logic from interface doesn't mean the two can't share any code May 24 23:25:03 it kind of sounds like you're overcomplicating your app in efforts to have a "clean" architectural design May 24 23:26:18 TacticalJoke: In my case, I have "roles" in a game ; each game has multiple players and 2 players can have the same role ; the enum serves to enumerate the different possible roles (and is also a factory as it instantiates the subclasses). Android's UI side, a role is only identified by its name and description saved in string-arrays. To fetch them, should the model takes as inputs and give as output the May 24 23:26:20 enum or primitives? May 24 23:26:25 sorry, that was a novel ^^ May 24 23:27:33 wakeclock: I guess so, that's the path I took, but then I have a single enum that really does too much (instantiates the roles and calls some UI code to fetch name and description) May 24 23:30:10 hey, where should i store an access token returned from an API? May 24 23:34:07 gpyh: The Role enum has static factory methods for instantiating subclasses? What subclasses are we talking here? May 24 23:34:21 dcunit3d: in your apps internal folders. e.g. anywhere that's not something from getExternalDir or similar. May 24 23:35:14 role subclasses, because different roles have different behaviors, hence different methods May 24 23:35:16 thx groxx May 24 23:35:33 But Role is an enum, right? May 24 23:35:37 Enums can't be subclassed. May 24 23:36:10 I have a RoleDescriptor (the enum) that lists the Roles and instantiate them (sorry for the confusion) May 24 23:37:10 I'm implementing "the Werewolves of Miller's Hollow" as a school project May 24 23:37:34 it's a village where players can be werewolves, townsfolk, and numerous other things May 24 23:37:44 a "Role" is held by a single player May 24 23:37:55 whereas RoleDescriptor gathers the different singular roles May 24 23:38:47 in a minimal example, enum RoleDescriptor holds WEREWOLF and TOWNSFOLK, and I have two subclasses of Role names Werewolf and Townsfolk May 24 23:40:01 the game has numerous extensions and people invent their own roles, that's why I want a clean architecture May 24 23:40:15 so I can add any role with the least work possible May 24 23:42:14 So I guess you have an abstract class (or interface) called Role from which Werewolf and Townsfolk derive? May 24 23:42:21 it is this exactly May 24 23:43:36 and my problem is the following : UI side I need to identify those roles and describe them ; Good practice is putting my data in resource files. But how do I link my enum in the model with my data in the resources ? May 24 23:43:49 my first working implementation just passed around the RoleDescriptor May 24 23:44:52 I wonder if it's good practice, or if I should use strings/int May 24 23:45:55 If I use strings, it means I must "parse" them somehow ; they'be tags I would put in another string-array May 24 23:46:20 I'd use this string-array as a HashMap actually May 24 23:46:54 If I use integers, it means I must know what the integer means at each time ; enums and string arrays must be ordered the same way May 24 23:47:37 sup TacticalJoke May 24 23:47:45 TacticalJoke: using enums is like using int ; I just call RoleDescriptor.ordinal() or RoleDescriptor.values()[i] everytime May 24 23:47:59 Hey, drose379. May 24 23:48:14 Was it you who was saying fragments aernt worth the hassle sometimes? May 24 23:48:45 gpyh: When would you have to parse strings? I'm trying to understand the interplay between the UI and RoleDescriptor. May 24 23:48:58 drose379: Probably. May 24 23:48:58 parsing isn't the right term May 24 23:49:14 suppose I want to display a list of existing Roles May 24 23:49:28 I see. May 24 23:49:35 UI side, I can just do RoleDescriptor.values() May 24 23:51:24 then for each value call a getName() method that, given a context, will lookup the string-array listing the names May 24 23:51:32 but that's putting UI code in the Model May 24 23:51:52 or I could directly display the list of names of the string-array May 24 23:53:19 but if I want to instantiate a role, I need to do RoleDescriptor.values()[position].instantiateRole() and that's putting business logic into UI May 24 23:54:24 When I do a clean seperation, I need a "lingua franca". And that's what I'm struggling to ; as I lack experience, I don't know if I should keep passing an enum around or work with primitives. May 24 23:54:33 s/to/with May 24 23:56:06 any one knows of a good tutorial for drawing multiples polygon on map? May 25 00:14:49 gpyh: One idea is to have "presentable" classes, such as PresentableWerewolf, which has a Werewolf, a name, and a description. Something like this: `new PresentableWerewolf(new Werewolf()).getDescription()`. Its API could forward all method calls onto the inner (perhaps private) Werewolf. You'd lose XML support, but on the plus side you could probably drop the weird RoleDescriptor May 25 00:14:49 enum. May 25 00:15:34 One drawback of the lost XML support would be that supporting multiple languages would be less simple. May 25 00:18:03 TacticalJoke: thanks for the long answer May 25 00:18:28 I'll think about it and may come back with follow up questions May 25 00:29:28 ##java is quite good for such questions, so consider asking there too. However, do not mention Android, at any stage. Your question isn't really Android-specific, but nevertheless if you mention Android then they might refuse to help (I've seen that before). May 25 00:33:43 For creating a View with .createView() May 25 00:33:46 It asks for a string name May 25 00:33:53 Would that be layout_name May 25 00:33:57 or R.layout.layout_name May 25 00:40:17 drose379: I guess it's the fully qualified class name. Why are you using LayoutInflater.createView rather than LayoutInflater.inflate? May 25 00:40:36 Was just messing around w something May 25 00:40:39 nevermind May 25 00:42:29 From the looks of it, LayoutInflater.createView just uses reflection to effectively say `return new WhateverView(...);`. May 25 02:01:20 I am trying to update my gradle dependencie by running gradle --refresh-dependencies. Do I have to run this in a certain directory? or is the gradle a system wide tool? May 25 02:09:42 g00s: IOT http://motherboard.vice.com/read/the-internet-of-things-may-depend-on-liquid-metal-antennas May 25 02:11:53 capella-s3 yeah, saw that ... cool. i'm curious about the em harvesting devices May 25 02:18:39 in_deep_thought do it from your project dir, with build.gradle May 25 02:18:51 in_deep_thought but i think AS and CLI have different caches anyhow, so May 25 02:25:33 when I run gradle -version, and it gives me a #, is that my system wide version of gradle? is there a different version of gradle for every new app project? May 25 02:27:49 g00s, so in other words though, doing from my command line won't help right? May 25 02:31:09 in KeyEvent, is dpad_up the same as up arrow on a normal keyboard? May 25 02:37:20 Jonno_FTW: hm. good question. I'm going to guess "yes", because I don't see anything else that seems likely, but I don't know for sure. May 25 02:44:41 anyone know what the difference is between "LinearLayout" and "LinearLayoutCompat"? May 25 02:48:17 one is from the compat library May 25 02:49:06 heh. well, yeah, but LinearLayout goes back to APIv1. LinearLayoutCompat only to v7. And the docs don't mention any differences :| May 25 02:49:41 i wonder if layoutinflater factory does something behind the scene May 25 02:49:58 is it for public use? the newer LL has seperators May 25 02:50:44 ah, never noticed the dividers before. does look like that's it, yeah May 25 02:55:50 Yeah, the Compat one just brings dividers down to < 11. I think that's about it. May 25 02:56:04 It's hard to tell from the source since it's largely a copy-paste job. May 25 02:56:58 yeah, i was hoping someone would save me the trouble of diffing the files :| May 25 02:57:11 laziness success! w00t May 25 02:57:12 they should copy paste the rest of the java framework :) May 25 02:57:57 i wonder if we'll ever see some fundamental change in packaging like app containers May 25 02:58:19 app containers would be...? May 25 02:58:23 something like docker May 25 02:59:29 aside from shipping scripts to run on the device to e.g. pull in maven dependencies, how is that different than the fairly container-like .apks we have now? they're even automagically user-isolated May 25 02:59:34 the container would have whatever the app needed to run, like most of the OS **** ENDING LOGGING AT Mon May 25 02:59:59 2015