**** BEGIN LOGGING AT Tue Aug 19 02:59:59 2014 Aug 19 03:00:34 Why do I get an "Unknown" GoogleAuthException when calling GoogleAuthUtil.getToken(context, account, "oauth2:server:client_id:[MyClientKey]:api_scope:" + Scopes.PROFILE);? Without "server:client_id:[MyClientKey]:api_scope:", I get an actual token back, but I can't use it on my app server to call the oauth APIs. Aug 19 03:11:24 good day everyone Aug 19 03:20:07 bankai_au living the good life :) http://digg.com/video/its-been-a-long-day-you-deserve-to-be-as-relaxed-as-this-dog-getting-a-massage Aug 19 03:22:48 so... this is a thing now, is it ? Aug 19 03:23:06 dog massage, for a while. even accupuncture O.o Aug 19 03:23:16 bankai_au we're in the wrong profession Aug 19 03:23:36 i think that almost every day Aug 19 03:23:56 I can't decrease the size of a View using getLayoutParams() fuckery. increasing it works fine :( anyone know what's going on Aug 19 03:24:48 today, i finished my first application (alpha state) Aug 19 03:25:46 congrats detachYo Aug 19 03:26:12 now the nihilism sets in Aug 19 03:29:31 LMFAO Aug 19 03:29:36 it had set in from day 1 Aug 19 03:29:37 :D Aug 19 03:54:47 apparently there aren't enough tvm calculators in the market, I'm writing another. Aug 19 04:01:59 what layout do you use for a listview? Aug 19 04:02:08 When an in app purchase completes, which is called - onResume or onStart? Aug 19 04:02:13 I assume the former Aug 19 04:04:44 onMoney Aug 19 04:11:04 i think its time for another tip calculator Aug 19 04:15:15 hello dev, anyone suggest me how to convert non responsive web to android? Aug 19 04:16:49 to an app or to make it work in chrome on android ? Aug 19 04:31:35 hello anybody have work on PduPersister.class Aug 19 04:31:47 for sending MMS programamtically Aug 19 04:32:25 i need to send MMS programmatically in KITKAT Aug 19 04:34:21 who just shouted kitcat ? Aug 19 04:34:27 mints was that you ? Aug 19 04:36:29 wow, the bluetooth core spec is 2600 pages :O Aug 19 04:36:32 yeah Aug 19 04:36:55 finally into MMS source code Aug 19 04:36:59 :( Aug 19 04:54:35 my tip calculator will come with tips like 'look both ways when crossing the street' Aug 19 05:21:14 any hint for MMS forwarding for KITKAT version Aug 19 06:46:02 Is there any difference between these two loops? http://pastebin.com/iSqj3AQT Aug 19 06:46:28 Different as in speed? Aug 19 06:47:23 I would choose the first one, as far as I know you wouldn't have to create an int for the loop. Aug 19 06:47:41 which would take up space, but if that's your concern, then you're probably doing something wrong, somewhere. Aug 19 06:47:56 so, go ahead and use either one, you should be fine in both cases. Aug 19 06:51:52 detachYo: yes Aug 19 06:52:46 Is the first loop the same as function "one()" here: http://developer.android.com/training/articles/perf-tips.html#Loops (under Use Enhanced For Loop Syntax)? Aug 19 06:55:04 what do you mean same as? Aug 19 06:55:08 No they are not. Aug 19 06:55:14 Second one is closer to the syntax style. Aug 19 06:55:21 But both should work. What are you trying to do? Aug 19 06:56:33 I'm not trying to do anything. I just saw a for loop like the first and was curious if it compiled the same as what the performance tip suggested. Aug 19 06:57:43 probably didn't compile the same, but they will do the same thing essentially. Aug 19 07:13:21 Hi all Aug 19 07:13:30 Can someone have a look at http://pastebin.com/6Picmwnh Aug 19 07:21:12 sorry thanks got it Aug 19 08:52:49 Hello, World! Aug 19 08:57:27 hello friemnds Aug 19 08:57:30 friends.. Aug 19 08:58:34 how to get zipalign working on android studio Aug 19 08:59:19 it works by default Aug 19 08:59:59 imho Aug 19 09:00:09 don't know why is not working on my AS Aug 19 09:01:07 hackable: http://bit.ly/1tj7hYV Aug 19 09:01:35 hehe Aug 19 09:09:43 Thanks StingRay Aug 19 09:11:03 is working now... Aug 19 09:11:13 :)) Aug 19 09:27:48 I was getting NullpointerException so was running debug mode Aug 19 09:28:34 I am seeing while resuming the debug the it stops at performLaunchActivity and stops Aug 19 09:29:11 You should read the lines that say "Caused by..." Aug 19 09:32:17 hi there :) Aug 19 09:32:53 who knows, how to remove setuid restrictions from 4.3 source? Aug 19 09:33:59 v_for_vasiliev: I don't understand the question Aug 19 09:36:15 http://www.reddit.com/r/nexus4/comments/1jdvi5/ i need to modify kernel source to remove that restriction Aug 19 09:37:18 ah ok no idea Aug 19 09:37:30 are you sure this is the right channel though? Aug 19 09:37:39 #android-root might serve you better Aug 19 09:37:42 :( thanks anyway :) Aug 19 09:37:51 o Aug 19 09:37:54 right Aug 19 09:37:58 thank you :) Aug 19 09:40:56 Estel: Caused by: says Nullpointer exception on onCreate() Aug 19 09:41:06 but I dont see any issue there Aug 19 09:41:10 and then it tells you which line. Aug 19 09:41:54 74 Aug 19 09:42:52 JSONObject forms=new JSONObject(); forms=sService.getForms(); Aug 19 09:43:37 sService is null Aug 19 09:44:04 plus why do you assign form twice? Aug 19 09:44:12 *forms Aug 19 09:44:33 ouch Aug 19 09:45:49 thanks Estel and BoD Aug 19 09:46:02 my pleasure Aug 19 09:47:23 Since I exchanged a framework for a newer version I'm getting the "application may be doing to much work on its main thread" error. Is there a best practice to debug where this is coming from? This should be related to callbacks that might get called more often in the new framework version. It's not just that I'm too lazy writing logs everywhere, but I'm also curious if there are more sophisticated approaches to know what's going on on t Aug 19 09:47:23 he main thread. Aug 19 09:50:16 Traceview I guess? Aug 19 09:51:24 and/or Systrace Aug 19 09:55:05 Is there a way to emulate SD card unmount on genymotion? Aug 19 09:57:15 ask them Aug 19 09:57:45 I might, but checked here first :P Aug 19 10:08:11 No activity on Android is guaranteed to stay alive. Does this mean I should build every activity independent? I.e. save all values that are needed to "rebuild" the activity every time? Aug 19 10:09:42 yes Aug 19 10:09:55 well thats what onSaveInstanceState() is for phyzloc Aug 19 10:09:57 you need to save the state Aug 19 10:11:00 Say you have two activities A to select a category and B to view the content Aug 19 10:11:42 So B should save the category id permanently so that if B restarts I should be able to get the right data? Aug 19 10:12:00 perm ? no Aug 19 10:12:08 just in a bundle for restore Aug 19 10:12:48 The data is there even when the app is destroyed? Aug 19 10:12:53 no Aug 19 10:12:57 all gone Aug 19 10:13:20 are you saying this Aug 19 10:13:27 user chooses cat B Aug 19 10:13:34 in activity B they close Aug 19 10:13:50 4 days later they run your app agani and it needs to start in activity B cat B ? Aug 19 10:13:59 yes Aug 19 10:14:17 then have a read http://developer.android.com/guide/topics/data/data-storage.html Aug 19 10:14:42 wait I disagree it will work automatically Aug 19 10:14:50 I know the different kinds of storage but don't know how it's typically done Aug 19 10:15:28 BoD: so you say after 4 days, after application destroyed and phone reset, it will start at activity b ? Aug 19 10:15:29 BoD: What do you mean? Aug 19 10:15:30 really ? Aug 19 10:15:46 cause I think not :) Aug 19 10:16:05 StingRay_: after the phone is reset, not sure (probably not) but after 4 days, yes... The number of days does not matter :) Aug 19 10:16:10 If you take G+ app.. it will always start where you left off Aug 19 10:16:19 yup Aug 19 10:16:39 thats persistent save though, not taken from the stack Aug 19 10:16:52 the app is killed, the state is saved, it is restored when it is restarted Aug 19 10:17:13 StingRay_: that's handled by the system Aug 19 10:17:33 with the onSaveInstanceState api Aug 19 10:18:06 BoD: sorry but I think you are 100% wrong Aug 19 10:18:11 Hmm so if the app gets killed by lack of memory the data bundle is still stored Aug 19 10:18:23 phyzloc: yes Aug 19 10:18:31 StingRay_: prove it :) Aug 19 10:18:42 :) Aug 19 10:18:52 you want me to prove a negative ? Aug 19 10:19:18 well prove your different interpretation of how it works, which is a positive Aug 19 10:19:41 well, I could just test it Aug 19 10:19:48 phyzloc: do so Aug 19 10:19:58 never take anyones word for it till you confirm Aug 19 10:19:59 ;) Aug 19 10:20:10 if you save your state, and it is not saved... what's the point? Aug 19 10:20:16 Does anyone have an idea why my app's image resources are appearing in the Gallery of some devices? They're being saved to getExternalFilesDir(), so I thought the media scanner wouldn't pick them up? Aug 19 10:20:32 yes you can store a state for the restore, android doent do this automatic Aug 19 10:20:34 is that what you're saying happens StingRay_ ? The state is saved ... and then discarded? Aug 19 10:21:03 you store stuff in onSaveInstanceState like I said Aug 19 10:21:06 in a bundle Aug 19 10:21:15 this does not persist if the application is killed though Aug 19 10:21:26 only if it is restored Aug 19 10:21:34 killed > started Aug 19 10:21:39 paused > restored Aug 19 10:21:49 as is my basic none-programmery view on it Aug 19 10:21:51 :) Aug 19 10:23:40 well the javadoc of onSaveInstanceState says "This method is called before an activity may be killed so that when it comes back some time in the future it can restore its state. For example, if activity B is launched in front of activity A, and at some point activity A is killed to reclaim resources, activity A will have a chance to save the current state of its user interface via this method so that Aug 19 10:23:42 when the user returns to activity A, the state of the user interface can be restored via onCreate(Bundle) or onRestoreInstanceState(Bundle)." Aug 19 10:24:00 Acitity yes Aug 19 10:24:04 not application Aug 19 10:24:09 of course it depends on what they mean by "killed" Aug 19 10:24:09 activity* Aug 19 10:24:26 I think it means the process is killed Aug 19 10:27:18 it means activity like it says Aug 19 10:27:34 Ok, so it either holds the data or not. If not, then we should save it manually Aug 19 10:27:37 how can you kill an Activity :) Aug 19 10:28:03 asking the app class to pause Aug 19 10:28:21 well no kill, background/pause Aug 19 10:28:32 You can call finish() on it :) Aug 19 10:28:35 but if the app is removed there is no storage of the bundle Aug 19 10:28:43 for the activites Aug 19 10:28:49 yeah ... no :) I'm pretty sure killing means killing the *process* Aug 19 10:29:36 phyzloc: try it, save your state, then kill your app and see if you get it back Aug 19 10:29:57 Yeah I'll try it Aug 19 10:30:20 if you do I was right ;) if not StingRay_ was right ;( Aug 19 10:30:30 hehe Aug 19 10:31:25 easy way is just check if the bundle in onCreate is null… null == started and not restored Aug 19 10:31:51 exactly Aug 19 10:32:39 now look at how fragments "to be restored works" as in practive, you check if it's null, if it is then create, if not use fragmentManager to reattach etc Aug 19 10:33:06 practice* Aug 19 10:33:17 dam I need more coffee Aug 19 10:34:25 but that proves nothing :) the fragments states are just saved in the same way Aug 19 10:35:00 but by your logic, a fragment would stay in the fragmentManager from the second you lauch the app to the moment your phone powers down Aug 19 10:35:02 lol Aug 19 10:35:05 thats just not the case Aug 19 10:35:19 well the fragmentmanager's state is saved Aug 19 10:35:35 so yeah it's the case :) Aug 19 10:35:39 brb lunch Aug 19 10:35:40 not what I said, I said that bundle is an indication as to if they are in the fragmentManager Aug 19 10:35:56 as in if it is started or restored Aug 19 10:36:02 anyways try for yourself Aug 19 10:38:37 hello Aug 19 10:38:39 :} Aug 19 10:38:44 hi all, does anyone have much experience with accessibility? Aug 19 11:00:01 daentech, ask a more specific question about your problem Aug 19 11:04:20 phyzloc: did you do your little test ? Aug 19 11:37:54 Hello, I am using 'android:icon="@android:drawable/ic_menu_send"' in the menu item definition in the XML file, but the icon does not show up. Any idea what I am missing? Aug 19 11:38:53 StingRay_: It's hard to make android destroy an activity Aug 19 11:38:54 :) Aug 19 11:39:28 just kill your app with recent tasks / swipe Aug 19 11:39:31 or with ddms Aug 19 11:39:37 or adb shell kill -9 pid Aug 19 11:39:45 or real world run 20 or so apps after it :) Aug 19 11:40:00 or settings / apps Aug 19 11:40:11 if I swipe-kill it then savedInstanceState becomes null Aug 19 11:40:17 shocker Aug 19 11:40:38 If I kill the app from app manager it also becomes null Aug 19 11:41:34 again, shocker, enough jest now though, so your options are maybe sharedPrefs to store info so that you can read and restore position Aug 19 11:41:48 thats what I do Aug 19 11:42:05 yeah, some apps proactively store internal uris that point towards specific activities/states within them Aug 19 11:42:08 that works. Aug 19 11:42:23 yeah in some persistant storage Aug 19 11:42:46 I think I just stored activity path names that I wanted constructed again Aug 19 11:42:55 but since take that out of my app Aug 19 11:43:15 yeah, it has the benefit that it persists across reboots. I've done that as well but as a user sometimes it's annoying because you don't expect it Aug 19 11:44:27 BoD: tbh not sure how you have been writing apps that worked based on your assumption ? unless you never used that assumption Aug 19 11:45:37 ahah :) that's a bit harsh. You could totally write a functionning app even if you were wrong about its state being restored after processes are killed Aug 19 11:46:10 no I dont mean to be harsh, I mean if you thought you were correct you must have done something similar ? Aug 19 11:46:27 but I have no idea how it would have worked…maybe black magic :) Aug 19 11:47:35 Since I had trouble getting the activity killed by itself then maybe this situation doesn't occur very often in real life Aug 19 11:47:39 ah ok :) No it's just that I had the impression that after killing apps and restarting them you would not lose the state. And now I'm trying and indeed it does not work! I am suprised :) How did I not notice this before? Aug 19 11:47:59 phyzloc: it does Aug 19 11:48:03 lots, Aug 19 11:48:12 ^ Aug 19 11:48:14 user runs another silly app that uses all mem Aug 19 11:48:19 your app dies Aug 19 11:48:19 meet the low memory killer. Aug 19 11:48:22 :) Aug 19 11:48:53 like if he/she runs my app, yours is totally gone get killed Aug 19 11:48:54 :) Aug 19 11:49:45 When you look at the lifecycle diagram you'll see that only after onPause and onStop the flow goes through "Process is killed" box. Not after onDestroy Aug 19 11:50:18 onDestroy is not guaranteed Aug 19 11:50:41 mm Aug 19 11:51:09 just assume that in the background it can get lost Aug 19 11:51:25 like cant find way home, taken by a tribe, cooked and eaten type lost Aug 19 11:51:27 :) Aug 19 11:51:31 Yeah, the app should be built that way Aug 19 11:51:39 WAIT Aug 19 11:51:40 https://developers.google.com/+/quickstart/android if i create a client key from the certificate in my machine, for an app, will it work if my colleague compiles the same app in his machine? Aug 19 11:51:42 if that makes any sense Aug 19 11:52:29 erry: if you give him the same keystore Aug 19 11:52:52 I just tried with an app, Activity A -> Activity B -> typing something in one TextView -> Home -> Kill with ddms -> recent tasks, restart the app, I'm on activity B with my text Aug 19 11:53:17 Activity B did not die Aug 19 11:53:19 That's weird Aug 19 11:53:24 the whole process died Aug 19 11:53:33 so, including activity B Aug 19 11:54:23 depends on task lauch mode Aug 19 11:54:34 oh dam I need coffee again launch* Aug 19 11:54:40 waaaat :) Aug 19 11:54:57 http://developer.android.com/guide/topics/manifest/activity-element.html Aug 19 11:55:23 yeah no ok but... no :) Aug 19 11:55:57 just swipe it away and try Aug 19 11:56:02 ok Aug 19 11:56:15 and leave the horse dead Aug 19 11:56:20 :) Aug 19 11:56:31 does not work when I swipe Aug 19 11:56:33 StingRay_, aha Aug 19 11:56:42 works 100% by killing with ddms Aug 19 11:56:45 StingRay_, is the debug keystore always the same? Aug 19 11:57:06 erry well empty and not signing a release for debug is the norm Aug 19 11:57:18 BoD: well, just get users to do that then :) Aug 19 11:57:26 rathen than confining it to dev tools Aug 19 11:57:27 :) Aug 19 11:57:33 rather* Aug 19 11:57:44 StingRay_, i can't leave it empty when creating a client id? Aug 19 11:57:48 * StingRay_ goes for coffee, brain not owkring Aug 19 11:58:13 release, not debug Aug 19 11:58:51 StingRay_: there are probably different ways that an app can be killed, and one of these ways makes the state be restored, and another one doesn't Aug 19 11:58:52 BoD: at least we now know how you came to that conclusion :) Aug 19 11:59:05 now the question is Aug 19 11:59:11 and all User usecases are what I said Aug 19 11:59:15 if it is killed by the system to save resources Aug 19 11:59:17 and they are in the docs someplace too Aug 19 11:59:20 which one is it? ;) Aug 19 11:59:53 dead horse is what it is Aug 19 11:59:55 :) Aug 19 12:00:06 all use cases have to be user centric Aug 19 12:00:17 unless the app is not for release and some odd debug aid tool thingy Aug 19 12:01:09 well if the system kills the app to save resources, this is a normal and frequent and user centric case? Aug 19 12:01:27 yes but adb kill is not what the system calls Aug 19 12:02:02 there was an article somewhere explaining the different ways (and differences) a process can be kiled... Trying to find it again now Aug 19 12:02:43 not really interested tbh, sorry :) Aug 19 12:02:47 Maybe Android cleans everything (including bundle) if user delibretly kills the app but no if Android does it Aug 19 12:03:09 phyzloc: I think that's probably the case Aug 19 12:03:22 no Aug 19 12:03:24 ugh Aug 19 12:03:26 try it Aug 19 12:03:32 you can test these things Aug 19 12:03:35 what do you mean try it :) we just did Aug 19 12:03:42 not with dev commands Aug 19 12:03:42 :) Aug 19 12:03:54 swipe: state discarded kill -9 : state kept Aug 19 12:04:14 yes now prove that is the case if android decides to do it Aug 19 12:04:34 ok I'll try :) Aug 19 12:04:39 you will fail Aug 19 12:04:44 the horse is beyond dead now Aug 19 12:04:46 maybe Aug 19 12:04:48 it's in a grave :) Aug 19 12:04:55 and I have said goodbye :) Aug 19 12:05:01 but Science™ will have advanced Aug 19 12:05:03 :) Aug 19 12:05:09 I started several apps to consume resources (including ingress) but my test app never died :-/ Aug 19 12:05:23 phyzloc: I think there are apps or tools that can help for that Aug 19 12:05:37 takes lots of mem, image apps, chrome image search etc Aug 19 12:05:39 but first I want to find the article I remember Aug 19 12:05:41 easy to do though Aug 19 12:07:28 phyzloc: ask SimonVT or JakeWharton or someone like that for a def answer, or any pro, they will tell you about it Aug 19 12:11:40 does that make me a pro if I am correct? Aug 19 12:11:44 ;) Aug 19 12:13:35 BoD: point me to some apps you have done Aug 19 12:13:40 * StingRay_ is interested now Aug 19 12:13:43 does anyone have an example of comparing 2 audio files and getting the diff between them? Aug 19 12:13:50 backlog too long to figure out what the problem is Aug 19 12:13:57 StingRay_: later :) Aug 19 12:14:32 BoD: ? and out of interest do any of them have design and implementation based on your assumptions ? Aug 19 12:15:36 not really. The only assumption here is: you should save your activity state, because your activity will be recreated. Aug 19 12:16:25 what did you mean later ? Aug 19 12:16:56 I mean I'm googling right now :) trying to find this article Aug 19 12:17:10 no i mean point me to some apps you have done Aug 19 12:17:15 interested to see Aug 19 12:17:23 yes but can you wait? Aug 19 12:17:47 you can test your lifecycle stuff if you enable killing activities as they're put on background Aug 19 12:18:10 Zharf: oh yeah, forgot about that Aug 19 12:18:13 anyone manage to build mixpanel library with Android Studio? I've got some problems importing the project - gradle isn't setup correctly it seems Aug 19 12:18:15 in dev settings :) Aug 19 12:18:37 yep Aug 19 12:18:44 it's actually useful Aug 19 12:19:02 dam yes, but odly forgotten quite easy :) well by me Aug 19 12:19:04 managed to recreate a random/rare crash with it Aug 19 12:21:33 ooo, just saw a black&tan shiba... me want Aug 19 12:23:21 trying to pre-load some resources during my intro animation because server is sometimes a little slow. Unfortunately it doesnt appear that anything is being left in the cache Aug 19 12:24:00 are the resources needed ? Aug 19 12:24:07 for the app to work kinda thing Aug 19 12:24:26 cause that seems risky, specially with mobile Aug 19 12:26:00 BoD: dont search too hard, there maybe ways that it will auto restore based on x,y,z point is it's not a guarentee so cannot be accounted, so need to design around it Aug 19 12:26:07 if your still searching btw Aug 19 12:26:09 :) Aug 19 12:26:48 well at least I found the article I remembered :) => http://www.doubleencore.com/2014/06/effects-android-application-termination/ Aug 19 12:27:06 but it is irrelevent to this discussion :( Aug 19 12:27:10 so is what you say possible, maybe/yes. Should that come into consideration … totally not :) Aug 19 12:27:23 you can get dethTickes too Aug 19 12:27:55 dethTickes? Aug 19 12:28:07 deathTicket from binder to know that it has actually died Aug 19 12:28:26 hi Aug 19 12:28:27 oh, never heard of this Aug 19 12:28:35 can someone help me with this Aug 19 12:28:36 http://stackoverflow.com/questions/25383374/find-longest-straight-line-in-live-cameraafter-edge-detection-filter Aug 19 12:28:38 StingRay_ yes unfortunately. I've brought up the need for a native ui and they want a webview. insanity i know. Aug 19 12:29:34 molavy: thats qutie a task Aug 19 12:29:41 good luck Aug 19 12:29:54 happy learning :) Aug 19 12:30:07 why would I get: java.lang.NoSuchMethodError: com.di.stardm.ui.fragments.breathing.BreathingStrategyFragment.getChildFragmentManager on some devices and not others? Aug 19 12:30:45 StingRay_: give me some keyword about it Aug 19 12:30:56 for search and find sample codes Aug 19 12:31:09 \ Aug 19 12:31:41 http://potrace.sourceforge.net/ Aug 19 12:32:11 the path/vector/bez whatever is down to you to do all the calc on it and searches Aug 19 12:32:21 ignore the /, tablet hit the other keyboard Aug 19 12:33:28 StingRay_: thanks Aug 19 12:34:02 molavy: cause getting what you want is loads more than just he simple edge filter on a bitmap, gettings a nice trace with paths is down to many things, and more than often is a visual tweak thing, not an entire automated process Aug 19 12:34:20 If even the most basic stuff like include ':app' or buildscript is underlined in .gradle files in Android Studio "Cannot resolve symbol" - what is wrong? I mean it hasn't even gotten to the dependencies step that includes the gradle plugin? Aug 19 12:36:55 I'm getting the error "shared lib already loaded in same CL 0x425b1cb8". What does it mean? I'm using a framework that's doing native stuff, so it's kind of hard to pinpoint the line that may be responsible for this. Aug 19 12:38:49 StingRay_ and phyzloc I just reproduced this use case: start app on activity A, go to activity B, type something in TextView, home, start lots of other apps, notice that my app is killed, restart it with recent tasks: my text is here Aug 19 12:39:45 BoD: see my last sentence …or to recap, yes no maybe, it really does not matter as it cannot be taken as a constant… so irrelevant to the actual design Aug 19 12:39:55 I agree to that Aug 19 12:40:05 but ... I was right :) :) :) :) :) Aug 19 12:40:06 in addition pointless to discuss :) Aug 19 12:40:08 no Aug 19 12:40:18 yes, totally Aug 19 12:40:27 yes you can create a non-constant case for app termination Aug 19 12:40:45 no, that is irrellevant and not the way to do things :) Aug 19 12:40:50 so yes,no Aug 19 12:41:13 but with the added, ignore that case …added to the end Aug 19 12:41:25 but I was right when I replied YES to the question "is the state given in onSaveInstanceState" kept by the system Aug 19 12:41:33 " Aug 19 12:41:35 :) Aug 19 12:41:51 erm … ok yes your were correct in a way that happens or may not happen Aug 19 12:41:58 ahaha :) Aug 19 12:42:02 there are common cases where it is no Aug 19 12:42:11 and therefore silly to use or assume Aug 19 12:42:18 hence no, do not design apps that way Aug 19 12:42:20 :) Aug 19 12:42:45 but if it helps your ego, yes totally correct, now show me the apps you have done that way, cause 1 swipe away from death :) Aug 19 12:42:47 another random/possibly useful info, text fields retain their text if they have an id set Aug 19 12:43:14 yup Aug 19 12:43:23 I haven't followed this discussion at all Aug 19 12:43:57 StingRay_: here are some apps I made http://JRAF.org/android Aug 19 12:44:45 I don't think you'll find anything related to that question in any of them :) they are simple apps Aug 19 12:45:49 yes maybe not…. but anyway my ending point given you have 8x more experience than me is maybe dont give advice that maybe will cause some1 to design in a way that is quite wrong Aug 19 12:46:18 not meaning that in a bad way, and not condescending either since you are a programmer and I'm not Aug 19 12:46:23 just saying be careful :) Aug 19 12:46:42 well I was just trying to answer precisely to a question Aug 19 12:46:57 independently of design considerations Aug 19 12:47:32 is it safe to assume a bundle is always given on restore of an app ? Aug 19 12:47:34 no it is not Aug 19 12:47:36 lol Aug 19 12:47:50 look …say what you want :) I think I will bow out of this discussion Aug 19 12:48:04 it's ok :) Aug 19 12:48:09 no hard feelings Aug 19 12:49:41 no hard feelings at all, I've very new, I just though complex app knew that you cannot assume it's going to be there or restored based on many factors Aug 19 12:49:48 i'm* Aug 19 12:50:04 why do I not think you're new... Aug 19 12:50:22 well new is relative Aug 19 12:50:22 it feels like I've seen you around for years Aug 19 12:50:27 2 years maybe Aug 19 12:50:35 new compared to BoD Aug 19 12:50:47 I don't know BoD Aug 19 12:50:54 new as in java Aug 19 12:50:57 android etc Aug 19 12:51:04 I'm new on this chan :) Aug 19 12:51:56 BoD: 12+ years me 2-3 years if that with no formal teachings, me = new Aug 19 12:52:03 thats what I mean new Aug 19 12:52:17 yup Aug 19 12:52:20 formal teaching is useless in this field, imo Aug 19 12:53:13 Zharf: is it though Aug 19 12:53:28 I learnt all I know on my own Aug 19 12:53:30 I feel like I know android as a platform enough to do some pretty good and different apps Aug 19 12:53:45 but I dont feel like I know OOP and Java enought to call myself a real programmer Aug 19 12:53:57 enough* Aug 19 12:55:21 I've been a developer since before high school though Aug 19 12:57:04 I never graduated from univ because it was so boring and I felt that the courses didn't provide me anything new Aug 19 12:57:31 instead I spent the time writing software -.- Aug 19 12:58:24 i learnt a few useful things at university: writing compilers, data structures, AI techniques and algorithms Aug 19 12:58:47 useufl things I learned commercially are to do with project management, and design patterns Aug 19 12:59:06 mgreg: University's biggest useful thing for me was exposing me to things I wouldn't encounter otherwise :) Aug 19 13:00:04 we were taught java/C/c++ etc, but I didn't truly get to grips with C++ until I started writing my dissertation Aug 19 13:00:07 I'm contemplating on becoming a taxi driver like the rest of my family unless I find a non-mobile/web development job soon... I'm getting sick of this Aug 19 13:00:51 The degree gets your foot in the door Aug 19 13:01:13 meh Aug 19 13:01:34 So unless you've done a lot of networking it will be rather difficult to get past most HR departments without a degree Aug 19 13:01:45 degrees have nothing to do with actual knowledge... so many useless "programmers" graduate each year Aug 19 13:02:08 wow really taxi driving > android dev? Aug 19 13:02:11 bigger problem for me in finding a non-mobile/non-web job is that finland does nothing but those two Aug 19 13:02:13 and? So many useless programmers think that they don't need a degree also. It's hit or miss in both Aug 19 13:02:35 Zharf, intel do a lot of non-mobile stuff over there Aug 19 13:02:37 I get job offers all the time... Aug 19 13:02:40 Heh - there's no money in software :) That stuff's free! Aug 19 13:02:51 mgreg, also big corporations suck Aug 19 13:03:13 they also pay the bills... Aug 19 13:03:28 I don't care about the money, I just want interesting problems to solve Aug 19 13:03:34 sucker Aug 19 13:03:34 their open source department is based there Aug 19 13:04:19 I make about two thirds of what others demand and I can't figure out what to do with the money :p Aug 19 13:05:10 save it to retire early and do your own thing later? Aug 19 13:07:52 I hope I die before I retire, there's nothing else to do than work Aug 19 13:10:13 that's pretty grim Aug 19 13:10:19 travel the world,take up motorcycling and rally driving Aug 19 13:10:40 I don't see the point in any of that Aug 19 13:10:50 have you tried it? Aug 19 13:11:05 are you depressed Zharf? Aug 19 13:11:11 i never really like motorcycles until i got on one and had a lesson Aug 19 13:11:12 fossil fuels are used way too much in the world anyway Aug 19 13:11:55 does an android read hls h264/aac livestreams? Aug 19 13:12:07 not very well Aug 19 13:12:13 http://developer.android.com/guide/appendix/media-formats.html Aug 19 13:12:44 BoD, I wouldn't say that Aug 19 13:13:19 I like working on side projects. So if I could that's probably what I would do all the time. Aug 19 13:13:43 www.myflixfinder.com I worked on that after work probably pretty close to full time for 3-4 months Aug 19 13:14:14 Zharf: what is best to use for livestreaming Aug 19 13:14:17 what codecs protcols Aug 19 13:14:34 ocx, I've been looking into this for a bit. What is your major concern? Aug 19 13:14:40 also depending on your commitments you could move to another country for work Aug 19 13:14:45 Latency, quality, bandwidth? Aug 19 13:14:47 i wanna read a livestream on my android Aug 19 13:14:58 all Aug 19 13:15:01 mgreg, I could, but I melt at over 20 degrees celcius Aug 19 13:15:34 the UK and holland are fairly mild, we only get 5 dqays of warm weather a year Aug 19 13:15:36 Well the HTTP protocol is what netflix uses. It splits a video into X length time based segments. THen you buffer time segments Aug 19 13:15:48 so you typically have a several second (minimum) delay Aug 19 13:16:02 RTSP is closer to real time if I remember right Aug 19 13:16:17 are netflix ever going to ditch silverLight ? and how is that done on android and not on linux ? Aug 19 13:16:30 mgreg, I have considered it, we'll see what happens Aug 19 13:16:35 norway might be nice Aug 19 13:16:50 Zharf, if you don't like something, change it, what's the worst that could happen ;) Aug 19 13:17:03 StingRay_, the netflix mobile app does the decoding. Yes, they have already created an HTML5 video player for I believe chrome. (Released recently) Aug 19 13:17:13 I know a couple of people that got jobs in norway and ended up staying there Aug 19 13:17:50 http://techreport.com/news/26897/new-chrome-beta-enables-html5-netflix-on-linux Aug 19 13:17:51 mgreg, I'm lazy and afraid of flying :p Aug 19 13:17:51 StingRay_: Chromecast actually has a linux program for watching netflix... Aug 19 13:18:13 (it's just a) for ARM b) probably a PITA to get running outside of chromecast ;)) Aug 19 13:18:22 Zharf, fear of flying or fear of change? Aug 19 13:18:27 flying Aug 19 13:18:35 I love flying Aug 19 13:18:47 Is there a way I can define a default way a gridlayout is filled up? e.g. normal default is from left to right, top to bottom. but could I set the way it's filled from top to bottom left to right? Aug 19 13:18:49 * p_l has not flown enough in recent years :( Aug 19 13:18:49 well, heights really it is Aug 19 13:19:03 I didn't do it until I was 18, but it is awesome. Like a smooth bus (most of the time) Aug 19 13:19:23 OK - so Android Libraries cannot be stand alone projects but only exist as Modules in Android Studio / Gradle? What does library makers do when they build .aar files and want to upload them. Make a "dummu" Android projects that has the library as the only module or? Aug 19 13:19:25 I only do it 1-2 times a year Aug 19 13:19:28 i enjoy the turbulence and taking off :D Aug 19 13:19:31 Zharf: have you actually tried flying? I get a bit fearful of heights, don't give a damn while flying and generally doing dangerous things Aug 19 13:19:46 p_l, yes, I went to turkey and back in the late 90s Aug 19 13:19:48 so i have in build.gradle: compile 'com.google.android.gms:play-services:5.2.08' Aug 19 13:19:58 but i'm getting GooglePlayServicesUtil﹕ Google Play services out of date. Requires 5208000 but found 5089038 Aug 19 13:21:02 i have google play services rev 19 under extras Aug 19 13:21:13 I would love to learn to flyt Aug 19 13:21:15 fly* Aug 19 13:21:19 whrer are you getting that erry ? Aug 19 13:21:47 StingRay_, it's logged in logcat when i try to do the connect() on the google play client Aug 19 13:22:03 so the devices play services is not up to date ? Aug 19 13:22:15 build with older version I guess ? Aug 19 13:22:16 maybe Aug 19 13:22:49 Yeah build with a version you have on your phone Aug 19 13:23:11 play-services:5.0.89 Aug 19 13:23:16 ajhh Aug 19 13:23:21 :) Aug 19 13:24:18 that wokrs!! thanks <3 Aug 19 13:25:10 so guys Aug 19 13:25:16 https hls is good on android or not Aug 19 13:25:23 i am running 4.4.2 Aug 19 13:25:55 when I tried it, it "worked"... has some issues and not able to seek Aug 19 13:26:05 so I wrote my own hls player using mediacodec Aug 19 13:26:38 Zharf: did you try a livestream? Aug 19 13:26:44 why would you want to seek a livestream Aug 19 13:27:02 seek isn't universally supported. I don't know if it is part of the spec or not Aug 19 13:27:17 why not? also our requirements had playing old clips Aug 19 13:27:28 jonc, yeah, but it's fairly easy to implement Aug 19 13:27:31 i dont care about seeking Aug 19 13:27:34 its a livestream Aug 19 13:27:41 Oh then it's a good job I don't either ??? Aug 19 13:27:42 hls will introduce several seconds of delay Aug 19 13:27:54 indeed Aug 19 13:28:15 Seeking on iPlayer is incredibly useful, for example Aug 19 13:28:31 since it buffers 3 chunks. Each chunk will probably be a few seconds (you base it off of key frames if I remember right) Aug 19 13:28:51 I think Netflix uses something like 8 second chunks Aug 19 13:28:56 why do you wanna seek on a livestream!?!?!? Aug 19 13:29:24 you could implement seeking backward, but if it isn't part of your requirements, don't worry about it Aug 19 13:29:40 ocx: because I want to rewind thirty seconds and see what I missed when I suddenly had to get the door Aug 19 13:30:02 because I want to go back to the beginning of the program because I started watching it late Aug 19 13:30:07 jonc, yep Aug 19 13:31:10 the hls protocol isn't overly complicated even. It's mostly just queuing up chunks while asking for the next chunk Aug 19 13:31:41 decoding and playing the segments properly is more complicated Aug 19 13:32:00 even with (or because of? ;) mediacodec Aug 19 13:32:17 yeah, but you could just use the codecs already built in (I would hope) for that Aug 19 13:32:22 such a crap interface and implementation Aug 19 13:32:51 should the encoded data be in h264 baseline? Aug 19 13:33:06 doesn't matter Aug 19 13:33:12 android can decode main profile too Aug 19 13:33:18 just not encode Aug 19 13:33:33 h264 will give you some of the best quality for size Aug 19 13:36:41 What do I need to do when a GLSurfaceview is no longer being used Aug 19 13:36:58 in the onPause of it's parent view I delete the shader programs, and then delete the texture I was using Aug 19 13:37:56 but something weird happens if I go back from that page sometimes. All the colors in my app (for the theme) go away Aug 19 13:38:33 I seem to recall a similar problem with some application... Aug 19 13:43:13 I think I found some part of the issue: E/OpenGLRenderer? GL_INVALID_VALUE Aug 19 13:52:25 http://pastebin.com/Vb4eqr56 the last line prints the INVALID_OPERATION error code ofr glUniform1i Aug 19 13:52:41 hmmm Aug 19 13:54:04 the fragement lifecycle is onDestroyView always called when say an app is put in the background? Aug 19 13:59:51 damn it I am tired Aug 19 14:00:36 jonc: nobody knows Aug 19 14:00:58 it's one of the great unresolved mysteries of the universe Aug 19 14:01:39 haha Aug 19 14:01:45 :) Aug 19 14:01:58 I looked at the fragment life cycle, and at a first glance it wasn't obvious. I think I found my problem anyways Aug 19 14:02:09 ok Aug 19 14:03:57 from the pastebin that I posted a few minutes ago. I am getting an invalid operation from the GLES20.glUniform1(textureHandle, 0); Aug 19 14:05:14 but only after I close the app and reopen it Aug 19 14:13:02 hi all- when creating intent for new alarmmanager, should i rather use Intent.FLAG_UPDATE_CURRENT or Intent.FLAG_CANCEL_CURRENT? Aug 19 14:15:10 should the encoded data be in h264 baseline? Aug 19 14:15:48 lordgreg: I use UPDATE and it works well Aug 19 14:17:30 BoD: yea, i don't use any extras that would be wiped or anything; The problem I was having is that everytime i've reopened my app i've created new object alarm and within new UniqueID that was passed into sent into PendingIntent.getBroadcast as requestCode. You can imagine that i've had tons of same alarms for the same thing after few reopens -.- Aug 19 14:18:02 passing correct "objectID" as uniqueid should fix the thing Aug 19 14:30:13 BoD: bug found and fixed :) ty for info Aug 19 14:30:28 well de nada :) Aug 19 14:39:02 is there a way to get native code errors to show up in logcat? Aug 19 14:39:17 hello friends... trying to make use of viewpager and tab, i keep reciving backstack Error information Aug 19 14:39:29 Anyone have any idea what's happening? Aug 19 14:39:39 stack trace? Aug 19 14:39:55 yes r00s Aug 19 14:41:31 Hey there , i have a problem here in ADT .... i installed it from the known site but nothing actually changed ( the menus and the project creation wizzard ) ... and it didnt prompt me to select where the SDK is ... any help ? Aug 19 14:41:35 hello poooooo Aug 19 14:42:52 hackable: r00s meant to please post the stacktrace of your error. Aug 19 14:43:55 also known as "logs|gtfo" Aug 19 14:51:55 I figured out my opengl issue. I don't need to delete the programs onPause. It handles that all for me! Aug 19 14:52:05 ok Aug 19 14:52:15 thanks alexfu Aug 19 14:54:45 android.support.v4.app.BackStackRecord.doAddOp(BackStackRecord.java:394) Aug 19 14:54:51 soooooo ... about the ADT problem ... anyone knows how to fix it ? Aug 19 14:55:04 thats the error when using viewpager and tab together Aug 19 14:56:13 java.lang.NullPointerException Aug 19 14:56:17 hackable: http://bit.ly/1w4XNG9 Aug 19 14:56:59 and http://bit.ly/1w4XScR Aug 19 14:57:26 you really should stop comming back here with nullPointerExceptions … sorry to say it :) Aug 19 14:57:39 i always have to laugh when i click a lmgtfy link Aug 19 14:57:45 :) Aug 19 14:58:08 hackable: you probably have a pointer that is null, which produces an exception Aug 19 14:58:14 :) Aug 19 15:01:55 anybody write libraries in here that they create .aar files from and upload to a maven or jcenter? any good complete repos I could look at how it's done (mostly interested in .gradle files) Aug 19 15:02:43 don't know about jcenter but I found maven central's procedure to be a bit horrible Aug 19 15:02:56 hence I avoid it Aug 19 15:04:08 BoD: OK - I noticed jcenter is the new default repo in Android Studio projects Aug 19 15:04:12 have you thought of hosting it yourself (or on github for instance)? Aug 19 15:04:59 BoD: github at the moment I believe, it's a fork of an open source library - so just some small changes Aug 19 15:05:46 not sure I follow :) Aug 19 15:05:51 BoD: the library does not contain their complete deployment / build .gradle files btw - otherwise I'd just look at those Aug 19 15:06:11 oh ok Aug 19 15:08:42 I have a very simple example to deploy to a local directory Aug 19 15:09:03 BoD Aug 19 15:09:16 Yes... !!! Aug 19 15:09:29 here https://github.com/BoD/android-switch-backport/blob/master/library/build.gradle (the uploadArchives task) Aug 19 15:09:59 hackable: ? Aug 19 15:10:41 yes BoD Aug 19 15:10:46 yes what? Aug 19 15:10:49 BoD: thanks! Aug 19 15:10:58 BoD: that gives me some pointers at least Aug 19 15:11:06 :) you're welcome Aug 19 15:12:14 BoD: actually, I think I spoke to soon - they seem to have the needed stuff for uploading https://github.com/mixpanel/mixpanel-android/blob/master/build.gradle#L66 - I just didn't understand it immediately Aug 19 15:12:51 ah there you go :) Aug 19 15:13:06 I have an interesting one for anyone …. use immersive mode sticky then have a fragmentDialog come up and maintain immersive sticky but also with cancelableOnOutsideTouch set on the dialog ;) Aug 19 15:13:44 what does it do? Aug 19 15:13:53 Does anyone use intellij IDEA for an IDE? I see that ADT is specifically an eclipse plugin.. and intelli-I seems to offer android stuff but I'm not sure how useful it is Aug 19 15:13:53 not work is what it does Aug 19 15:14:00 ahah :) Aug 19 15:14:17 BoD: so it would be gradle build && gradle uploadArchive in order to get the .aar either locally or pushed to some mave repo? Aug 19 15:14:21 you can navigate the app in the background of the shaded dialog overlay Aug 19 15:14:26 so bit of a design flaw there Aug 19 15:14:28 :) Aug 19 15:14:39 py0: the official android studio is intellij... Aug 19 15:14:48 the official android studio hardly works Aug 19 15:14:56 doesn't work* Aug 19 15:14:58 why not? Aug 19 15:15:23 I've been having problems with it "out of the box" Aug 19 15:15:30 that I just can't seem to fix Aug 19 15:15:57 snowpong: that's right. Aug 19 15:16:15 StingRay_: ouch Aug 19 15:17:06 BoD: excellent, thanks Aug 19 15:17:16 Has move to external SD card been disabled for Android 4.0 onwards? Aug 19 15:17:18 yw Aug 19 15:18:32 platzhirsch: sometimes/mostly/depends-on-vendor Aug 19 16:01:46 is there a RGB <-> HSV for RenderScript? Aug 19 16:02:14 Hello, all Aug 19 16:03:07 I am getting this message when tryign to connect my bluetooth device.. Aug 19 16:03:08 D/BluetoothUtils(13329): isSocketAllowedBySecurityPolicy start : device null Aug 19 16:04:13 I read it was an ICS bug.. is this ficked in kitkat? Aug 19 16:14:26 hey guys… this function downloads a file asynchronously, but when the device has no connection, it still creates an empty file (or at least delete the old one). shouldn’t it catch the exception before? how can i prevent that?? http://paste.ofcode.org/95CiBu6H3NKhVjEpDbsCxW Aug 19 16:15:26 luist: just have it write to a temporary file and move it to the destination once you've confirmed that it is complete Aug 19 16:15:35 +1 Aug 19 16:16:05 oh well Aug 19 16:16:07 also consider the DownloadManager apis :) Aug 19 16:16:24 See also http://en.wikipedia.org/wiki/Atomicity_(database_systems) Aug 19 16:16:30 BoD: I’m using DownloadManager for other stuff but i need to write this config file directly to internal storage Aug 19 16:16:38 ok Aug 19 16:17:21 kroot: yeah i was thinking that if i couldnt prevent the new file from being created in this case it would fix, but i can still have problems because its not an atomic operation Aug 19 16:17:33 so ill do like you saidd Aug 19 16:17:48 luist: No, you'll still have problems if you only partially wrote the file. Aug 19 16:18:04 createRfcommSocket is buggy Aug 19 16:18:06 kroot: thats what i said :P Aug 19 16:18:12 throwing D/BluetoothUtils(13329): isSocketAllowedBySecurityPolicy start : device null Aug 19 16:18:16 luist: Yeah :) Aug 19 16:18:52 my development device's battery is dying. does wiping battery stats really serve for anything? Aug 19 16:19:05 lol no Aug 19 16:19:19 luist: Also have code that cleans up temporary files that match the pattern you pass to http://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File) Aug 19 16:19:55 bitkiller your degrading battery is a chemical change, not anything to do with the files that track your batterys preformance Aug 19 16:20:20 tricknology, that's what i always thought Aug 19 16:20:23 do i need something fancy to rename a file in MODE_PRIVATE? Aug 19 16:21:06 luist: no, it will keep its permissions Aug 19 16:26:45 hey Aug 19 16:27:31 I am new to android development where is the best place to start? Aug 19 16:27:40 d.android.com Aug 19 16:27:49 buy Reto Meier's book Aug 19 16:29:17 thanks, are there any other online resources I should look at also? Aug 19 16:30:25 hey Aug 19 16:31:01 cobeau: there's this: https://www.udacity.com/course/ud853 Aug 19 16:31:52 who can help to import this project to android studio? i can't add ActionBarSherlok to project https://github.com/kncgroup/bitcoin-wallet Aug 19 16:35:34 arruah: you will do better asking direct questions and giving info Aug 19 16:35:45 not many will respond to "I cant" Aug 19 16:37:38 arruah: that was not an invitation to private message me! Aug 19 16:38:32 arruah: I was not offereing to help either, just saying you have been asking the qestion for days, better to actually ask a question if you want an answer Aug 19 16:38:48 StingRay_, ok Aug 19 16:39:04 StingRay_, thank's anyway Aug 19 16:39:20 good luck in asking an actual question ;) Aug 19 16:39:27 or outlining a problem :) Aug 19 16:39:53 so it looks like if you have a searchview focused, then go to another screen, the keyboard still pops up. Aug 19 16:40:19 maybe I should hold a reference to the MenuItem and collapse it on pause? Aug 19 16:42:44 I thought arruah had claimed to get it to work the other day? Aug 19 16:43:46 rgr, I think for any question you will rebuke the bad design issue. Am I right? Aug 19 16:44:17 You havent asked any questions. Aug 19 16:44:48 You've continually said "help me import" showing now sign of what the problem might be or any understanding or demonstration of having read how AS works. Aug 19 16:45:31 Thats why no one is helping you. It might seem rough but the amount of people coming here with "I want to write an app how do I add two numbers together" is appalling :) Do some spade work and ask specific questions. Aug 19 16:46:18 (Im not sure what you mean about "bad design" but I guess someone has been slagging off the structure of that project?) Aug 19 16:47:02 rgr, ok. I want to open this project in Android Studio. But in this project, there is no documentation. If I open it in the Android Studio then I have a lot of errors. Aug 19 16:47:25 arruah: thats a statement at best Aug 19 16:47:33 rgr, bad design of my question :) Aug 19 16:47:39 arruah: example is my question : does anyone know how to allow cancellableOnOutsideTouch on a fragmentDialog that is maintining IMMERSIVE_STICKY ? It seems to be broke, anyone tried or got it working, how ? :) Aug 19 16:47:53 StingRay_, :) Aug 19 16:48:04 StingRay_, understood Aug 19 16:48:31 btw all that was a real question too if anyone has attempted it :) Aug 19 16:50:56 kroot: is this okay to rename the file that is stored in the MODE_PRIVATE? http://paste.ofcode.org/RxrWwYfFLWFHpcCNBQ3bSD Aug 19 16:56:36 kroot: btw how can i know if the download finished succesfully? Aug 19 16:58:31 omg how can i disable this soft keyboard for appearing in every single fragment? Aug 19 16:58:49 theres not even edittext or any kind of use for it Aug 19 17:00:13 luist: I'm pretty sure answers are a simple google search away for that one Aug 19 17:00:27 tis a very simple and common thing to want/do Aug 19 17:00:38 StingRay_: for which question ^^ Aug 19 17:01:13 actually both Aug 19 17:01:22 but I suspect the keyboard will have more hits Aug 19 17:01:36 download progress, maybe 60% of hits Aug 19 17:01:40 guessing Aug 19 17:03:46 StingRay_: i tried googling but the answer crashed my app: http://paste.ofcode.org/32UaRrnxqBzzxEcDGRK8Fay :) Aug 19 17:04:30 "crashed my app" ok Aug 19 17:06:37 StingRay_: oh nvm… i got it working Aug 19 17:09:59 arruah: so read the errors. Or use eclipse. But be prepared to read up on gradle etc. Building SW like this isnt a case of click and run. Aug 19 17:10:58 rgr, ok. errors about ActionBarSherlock. I am googling now Aug 19 17:13:02 arruah: how much android dev have you done? Aug 19 17:13:19 1 hour :) Aug 19 17:13:37 because if you dont understand java, eclipse and the AS/gradle you're stuck mate. Aug 19 17:14:04 go do the tutorials then come back when you understand the IDE and Java/Android infrastructure. Aug 19 17:15:59 rgr, this project with readme.md I opened and launched Android Studio without any problems. https://github.com/schildbach/bitcoin-wallet Aug 19 17:16:19 rgr, knc-wallet forked from bitcoin-wallet Aug 19 17:16:32 arruah: but now your wanting to modify it ? so now comes the learning :) Aug 19 17:16:48 rgr, So I thought that there should be just as easy. Aug 19 17:17:23 StingRay_, Yet, while I just want to see how it works. Aug 19 17:18:22 I've been having quite a few issues with android-studio (slackware) since I've set it up. Right now, I've created a file called Gilli.java under LearnJava1/app/src/main/[Gilli.java] Aug 19 17:18:22 then learn and understand and you will get it Aug 19 17:18:31 I can't edit this .java file at all for some reason Aug 19 17:19:21 hmmm Aug 19 17:19:26 py0|slacktop: should be src/main/java/my/package/name/Gilli.java Aug 19 17:19:32 so I have a maven module in my intellij project Aug 19 17:19:36 StingRay_, I'm trying to do it now. Sorry to bother you :) Aug 19 17:19:38 and the other module is Android-Gradle Aug 19 17:19:47 how do I get IntelliJ to ignore the maven module? Aug 19 17:20:15 It won't build the Android-Gradle module because it doesn't want to mix Gradle and non-Gradle modules Aug 19 17:20:15 frankdrey-pc: remove the module as a dependency in your build.gradle Aug 19 17:20:25 it's not a dependency is the issue Aug 19 17:20:50 birbeck, create new class? Aug 19 17:20:54 or manually go for .java Aug 19 17:21:00 (I located said directory) Aug 19 17:21:01 When using a custom inputfilter for an EditText field, is it possible to return a value that will delete a character? Aug 19 17:21:19 Using ascii for DEL doesn't seem to do it, and was trying to avoid using a text watcher Aug 19 17:21:24 py0|slacktop: create a package in your src/main/java folder and then create a new class in that package Aug 19 17:21:25 ah fuck it, i'll use two projects Aug 19 17:21:29 i'm starting to despise Gradle Aug 19 17:21:50 frankdrey-pc: if its not a project dependency, you can either ignore it, or delete it Aug 19 17:22:13 IntelliJ won't ignore it :/ Aug 19 17:22:25 "Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project." Aug 19 17:23:00 and it seems to keep saying that my android module is no longer backed by gradle Aug 19 17:23:55 Thanks birbeck Aug 19 17:23:59 o/ Aug 19 17:25:47 re-importing for the 3rd time Aug 19 17:26:03 Hey since I'm here, does android target a specific 3d library vendor Aug 19 17:26:35 like.. "opengl is best" or "unity does this and that bla bla" Aug 19 17:27:00 of course it also takes a few tries of importing the module before it actually appears Aug 19 17:27:02 i fucking hate gradle Aug 19 17:27:25 py0|slacktop, android uses opengl, unity is a whole engine on top of opengl, they're not really comparable Aug 19 17:27:33 ^ Aug 19 17:27:35 py0|slacktop: just opengl-es, third party 3d libraries are built atop it Aug 19 17:28:08 what is the difference between opengl and opengl-es Aug 19 17:28:30 es has a better shader language Aug 19 17:28:39 or, “enhanced" Aug 19 17:28:54 i'm not really the best to answer graphic library questions, i'm sure google is your friend here Aug 19 17:29:13 a few days ago I wrote my first pure opengles app... Aug 19 17:29:19 dcow, "es" = "enhanced shader" Aug 19 17:29:20 ? Aug 19 17:29:25 1. it didn't work 2. I had no idea what I was writing Aug 19 17:29:30 birbeck, embedded systems Aug 19 17:29:47 ok, i thought it was something closer to embedded :) Aug 19 17:29:50 es = embedded systems Aug 19 17:29:58 cool Aug 19 17:31:38 *removes WIP gradle configs*, git commit -a -m "Gradle can go die in a hole." Aug 19 17:32:01 btw, do you guys also get that weird aapt error from android-studio when you first start it? Aug 19 17:32:03 http://bpaste.net/show/vu1xKyXVtP1ZDEoNaV1U/ Aug 19 17:32:53 py0|slacktop: never seen it Aug 19 17:33:21 Well.. I know that it exists because I see it there.. I don't know what to do about it really Aug 19 17:33:58 I have this.. but it's for 2013 and an older gradle version https://code.google.com/p/android/issues/detail?id=56158 Aug 19 17:38:20 brand new to android development, how to I get my TextView to align to the left and right hand signs of the screen ? Aug 19 17:38:26 my top level layout is a LinearLayout Aug 19 17:38:54 wait is it fill_parent ? Aug 19 17:39:30 I'm looking for advice about an IAP. I have one to unlock everything. When I get the response from Google Play that it's been purchased, I unlock everything in the app and write a value to sharedprefs. I check sharedprefs on every start and show the unlocked content if the key is there Aug 19 17:40:27 but I'm wondering what to do in case that key in sharedPrefs gets deleted. I was thinking of querying google play on every start if I don't find the key to get a list of purchased IAP, so I can then write the key again if needed. Does that sound sensible? Aug 19 17:41:56 Good lord, I cannot do *anything* with android-studio because it refuses to acknowledge the stuff in platform-tools Aug 19 17:42:09 for some reason it believes nothing exists in there.. but there's everything there Aug 19 17:42:38 py0|slacktop, file permissions? Aug 19 17:42:50 .. Aug 19 17:42:55 please elaborate Aug 19 17:42:56 py0|slacktop: it is on your classpath? do you have ia32-libs? Aug 19 17:43:30 I'm not sure what ia32-libs are.. there was nothing mentioned about that in the developer page Aug 19 17:44:00 py0|slacktop: are you running a 64-bit kernel? Aug 19 17:44:04 I have $HOME/android-studio/bin in the path Aug 19 17:44:06 yes Aug 19 17:44:34 well you also need $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools Aug 19 17:44:47 if you are running 64-bit linux, you also need ia32-libs Aug 19 17:45:02 the developer tools are still using a 32-bit toolchain Aug 19 17:45:16 Google needs to get with the program here Aug 19 17:45:43 wow Aug 19 17:45:55 what a joke :| Aug 19 17:46:44 py0|slacktop, were you the one to struggle with adding stuff to your $PATH the other day? Aug 19 17:47:00 birbeck, google just gives me a bunch of stuff about problems regarding these ia32-libs.. I have no idea how to obtain them Aug 19 17:47:52 yeah, I was having a lame day I guess.. I've since solved those problems Aug 19 17:48:01 py0|slacktop, https://wiki.debian.org/Multiarch/HOWTO Aug 19 17:48:02 @ ravilov Aug 19 17:48:18 hate debian Aug 19 17:48:26 what distro are you on? Aug 19 17:48:47 also there's no need to hate on debian, it's only the best and most complete distro out there ;) Aug 19 17:49:01 py0|slacktop: we discussed this before and you were told exactly what to do. Your problem. Try listening instead of whining. Aug 19 17:49:25 I use debian with it and it works flawlessly. But then I bothered to read how to add a path to $PATH. Aug 19 17:49:40 I don't need any fucking help adding a path Aug 19 17:49:54 No, you need a lesson in courtesy and attention span. Aug 19 17:49:55 you do need to watch your manners though Aug 19 17:50:11 py0|slacktop, is it safe to assume you're on slackware? Aug 19 17:50:42 I find it absolutely ridiculous that I'm getting help for one thing (or trying to) and some other asshat is just spewing garbage out of their mouth saying that I'm whining Aug 19 17:50:59 yes ravilov Aug 19 17:51:36 as I've been told before... if you want help around these parts, you might need to grow quite a thick skin Aug 19 17:51:41 Sounds like whining to me. And your language does you no favours either. Aug 19 17:52:15 py0|slacktop, in that case you might be SOA since you're using quite an unpopular distro Aug 19 17:52:43 SOL* Aug 19 17:53:21 he needs the equivalent of multiarch IF hes running a 64 bit kernel. This was told by birbeck earlier. or thats what its called (and works so a child can installed it) in Debian. Aug 19 17:54:08 one quick google later: http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib Aug 19 17:54:16 anyone who can help make a template and setup android-python27 on Android studio? (its for creating android apps by using python code) Aug 19 17:54:32 Might be of help. Who knows. If you use some corner distro like slackware I thought you should probably know your stuff. Debian is 1337 enuff.... ;) Aug 19 17:55:09 i used to love slack Aug 19 17:55:13 patchie, highly doubt it Aug 19 17:55:17 troll harder rgr Aug 19 17:55:22 ravilov? why? Aug 19 17:55:42 there is a tutorial for eclipse, but i wanna use android studio Aug 19 17:55:52 py0|clasker - no trolling. I just gave you the multilib link. If you're too lazy to check it then GFY. Aug 19 17:56:00 have yet to see someone around here using a scripting language to write their apps, patchie Aug 19 17:56:14 there was one guy trying to do stuff in SL4A, but it was short lived Aug 19 17:56:33 ravilov: but that wasnt my question, i wonderd if someone wanted to use 5 min to help me set it up Aug 19 17:57:15 patchie: it should be much easier in AS than Eclipse Aug 19 17:57:27 the apps made in android-python27 works on my android, but i havent rooted my phone, so i wanna use android studio to debug Aug 19 17:57:46 but I do not bother with non-java android apps Aug 19 17:57:53 patchie, I figured they can't help you if they're not using it themselves, but I could be wrong. either way I'm not your guy so wait for someone else to respond, and good luck Aug 19 17:58:11 birbeck: well, i just dont understand the file locations and stuff, and how to setup AS without using the wizard.. Aug 19 17:59:23 well, its just the java part i am questioning about, since there is just a java program that is running the python code.. Aug 19 17:59:41 the python code is fine, and all, but my problem is the java part, how to make it work in AS Aug 19 18:00:01 it runs fine in "aide" on my phone Aug 19 18:00:27 but in AS i have to setup modules ..and some other settings i guess Aug 19 18:00:30 to make it work Aug 19 18:01:31 so in other words you dont know java, you dont know AS and you dont know some other things you guess? Hmmm. How do you expect to "debug" python on Android using AS which is strictly java and gradle? Aug 19 18:02:02 (python27 sounds interesting btw) Aug 19 18:03:52 well, i wanna go into terminal into the android emulator to run code, but i first need to set up the app Aug 19 18:04:51 rgr: wanna help? Aug 19 18:05:16 rgr: can give you teamviewer access if you wanna Aug 19 18:07:31 hey guys… im building a menu with 6 itens and i want it to fir the parent View height… atm i have fixed sizes, how can i set the width to 1/6 of the parent View? This creates 1 item of the menu with an icon and a title: http://paste.ofcode.org/5df22PXgGUWWDXHurYi4U Aug 19 18:07:33 i'm trying to code a SDL app with ndk, it works without using SDL_Mixer.so, but using it i get this error: E/dalvikvm( 2379): dlopen("/data/app-lib/org.foo.app-1/libmain.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libSDL2_mixer.so" needed by "libmain.so"; caused by load_library(linker.cpp:745): library "libSDL2_mixer.so" not found Aug 19 18:07:44 root@android:/ # ls -l /data/app-lib/org.foo.app-1/libSDL2_mixer.so Aug 19 18:07:48 -rwxr-xr-x system system 95372 2014-09-19 20:58 libSDL2_mixer.so Aug 19 18:07:50 its there Aug 19 18:08:03 any idea why its complaining? Aug 19 18:08:44 (i'm running android emulator with api 17) Aug 19 18:09:01 Bombo, are you using an x86 emulator image or an ARM emulator image? Aug 19 18:09:04 Bombo, perms/ownership issue maybe? Aug 19 18:09:14 ravilov, no, that looks right. Aug 19 18:09:16 indrora: arm Aug 19 18:09:29 Bombo, are you compiling for arm or x86? Aug 19 18:09:30 ravilov: -rwxr-xr-x Aug 19 18:09:52 or all of them? Aug 19 18:09:53 indrora: all Aug 19 18:09:55 Bombo, did you forget about all the parent dirs? Aug 19 18:10:59 Bombo, unzip your produced apk and look at what the structure looks like. Check that there's a native lib for x86 and ARM. Aug 19 18:11:19 anyone????? Aug 19 18:11:27 Hey, I'm trying to figure out if there's a way for devices without a menu key to still access a menu if the actionbar is hidden Aug 19 18:11:37 ravilov: all perms are ok, an in that dir lies libSDL2.so which alone works, i can draw stuff using it Aug 19 18:12:21 student01: my tablet with onscreen buttons just blurs/fades the icons if the actionbar is hidden. :P Aug 19 18:12:37 hmm Aug 19 18:12:45 So the options are still visible and accessible? Aug 19 18:12:49 student01, pretty sure there isn't, or the swipe-down gesture wouldn't be a requirement of the new immersive mode Aug 19 18:12:53 oh. wait. misinterpreting. Aug 19 18:12:54 luist, this may be useful to you: http://www.hrupin.com/2012/02/how-to-set-view-width-height-in-percentage-of-parent-view-in-android Aug 19 18:13:12 sorry. multitasking and totally misread. i'm irrelevant here. :) Aug 19 18:13:30 Bombo, I don't know then, could be anything Aug 19 18:13:33 luist, child weight = 1, total sum = 6 Aug 19 18:13:54 indrora: armeabi armeabi-v7a x86, every dir got all .so Aug 19 18:14:11 My situation is that I'd like users of phones with menu buttons (galaxy s#, etc) to have full screen mode enabled because they can just hit "menu." But Nexus users can't hit menu, so they need to see the actionbar Aug 19 18:14:17 Let me know if that isn't true ^^ Aug 19 18:14:50 student01, that would be correct Aug 19 18:15:07 but pretty sure you can detect somehow if the device has a hardware menu button, and then adapt accordingly Aug 19 18:15:07 student01, http://stackoverflow.com/questions/9044907/android-programatically-detect-if-device-has-hardware-menu-button Aug 19 18:15:10 ravilov, what about http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz Aug 19 18:15:23 thanks ravilov and indrora Aug 19 18:15:33 py0|slacktop, what about it? Aug 19 18:15:42 it's a 32/64 sdk Aug 19 18:15:53 still need multilib? Aug 19 18:16:02 py0|slacktop: that still wont work, yes you need multilib Aug 19 18:16:08 ravilov: where does it look for additional .so libs? maybe there is a setting wrong somewhere? Aug 19 18:16:17 py0|slacktop, certain (key) utilities are 32-bit no matter how you turn it Aug 19 18:16:23 are always* Aug 19 18:16:23 oh Aug 19 18:16:28 Bombo, have you tried doing a clean? Aug 19 18:16:35 Why are they always 32bit Aug 19 18:16:51 Bombo, as far as I know it only ever looks in /system/lib and in the app's private lib directory Aug 19 18:16:56 indrora: multiple times yes Aug 19 18:17:22 py0|slacktop: because that is how Google built them... they can probably ditch any 32-bit support for Linux and do everything in native 64-bit Aug 19 18:17:33 its going to be very interesting seeing the same phone : HTC One M8 with both Android / WP - side by side comparison on exactly the same spec HW Aug 19 18:17:36 i haven't known anyone to run 32-bit Linux in years Aug 19 18:17:42 Bombo, strange. Does it work on real hardware? (Or alternatively, on an x86 emulator image?) Aug 19 18:17:44 ravilov: can it be overridden? Aug 19 18:17:48 hot key to move to next hilited error in AS/Ij? (red bars in right hand margin). C-M-down/up doesnt crack it like it does with compile/build errors. Aug 19 18:17:55 g00s: will it? Aug 19 18:17:59 Bombo, no idea Aug 19 18:18:18 birbeck i think the first oem to release same HW phone with 2 platforms at same time Aug 19 18:18:39 indrora: nope doesn't work on my friends android phone, but on my desktop it works, so can't be the code i guess Aug 19 18:18:43 birbeck, no they can't - I'm still using an all 32-bit installation and have no intention on changing. I'm somewhat sure I'm not the only one Aug 19 18:18:59 bah. found it. Aug 19 18:19:01 ravilov: hmmkay Aug 19 18:19:08 ravilov: sometimes being the 1% sucks Aug 19 18:19:19 Bombo, does it work in an x86 emulator? Aug 19 18:19:40 why would you ever use 32-bit linux anyways... especially on a dev machine? Aug 19 18:19:57 birbeck, people who're poor Aug 19 18:19:59 there are or were many reasons a while ago : not least flash and driver issues. Aug 19 18:20:14 indrora: good question i'll try that Aug 19 18:20:20 indrora: ummm, 32-bit and 64-bit Linux are the same price,,,, free Aug 19 18:20:27 no matter what the fanboyz said debian certainly wasnt 64 nit friendly where multiedia/flash was concerned a year or more ago. Seems fine now. Aug 19 18:20:28 birbeck, hardware isn't. Aug 19 18:20:33 s/nit/bit Aug 19 18:20:42 indrora: okay i tried it but it’s still not working… http://paste.ofcode.org/P6kF5Lt47KXJhNqnbbU8Hb heres the parent View and the menu itens (child) Aug 19 18:20:43 indrora: and the last 32-bit CPU was when? Aug 19 18:20:53 and the performance games are dubious at best in many cases. Aug 19 18:20:54 birbeck, I know quite a few students who can't drop the $500 for a new computer, so they limp along with a box they got from a friend 4 years ago that was new 7 years ago Aug 19 18:20:59 ganes. Aug 19 18:21:14 birbeck, last x86 chip produced? there still *are* today. Aug 19 18:21:37 the Atom series chips have been, predominantly, 32bit up until recently Aug 19 18:21:48 indrora: almost any 7 yr old computer is still capable of running a 64-bit OS today Aug 19 18:22:14 were atoms used in anything but netbooks and mobile devices? Aug 19 18:22:28 Yeah, several full-sized laptops shipped with them Aug 19 18:22:52 with Windows I presume Aug 19 18:23:20 Some with linux, too Aug 19 18:23:30 and the 32-bit android sdk works just fine on 32-bit windows xp/7 Aug 19 18:24:07 and 32bit linux too Aug 19 18:24:30 when did the first 64-bit athlon xp come out? that was the last time i ever did 32-bit anything, except on a mythtv frontend once Aug 19 18:24:48 indrora: any ideas? Aug 19 18:25:22 luist, I'd fiddle around with seeing if setting the child height to match_parent would fix it Aug 19 18:25:23 indrora: yes, they will work on 32-bit linux, but i would bet 99%+ of Linux devs are capable of or are already using a 64-bit kernel Aug 19 18:25:36 and the sdk doesn't work oob on 64-bit linux Aug 19 18:26:08 birbeck, I know quite a few devs who still use x86 because they're too poor to upgrade their hardware. Aug 19 18:26:09 birbeck, maybe google knows better and I'm in fact *not* the 1% :p Aug 19 18:28:06 luist, worst case, use tables? Aug 19 18:28:40 indrora: 64 bit costs next to nowt now so I question that. A rea "dev" who earns an income can afford at least a second hand 64 bit machine : probably more a case of not being bothered. There really is no appreciative gain in a lot of cases looking back at older cores and clockspeeds. And many with Linux simply dont need faster fabby-dooper new HW as they dont play games on Linux. Aug 19 18:29:37 (that said my new i7 is nice... ;) But prior to that an 8 year old machine which was just fine) Aug 19 18:30:17 * ravilov has a brand new very decent and fully capable laptop, but still chooses to run a 32-bit distro, everything just works, don't see any benefit of switching to 64-bit Aug 19 18:30:24 rgr, Hi, i'm a student and I'm currently doing what a lot of self-paying students who are on financial aid in the US by going to someone who *can* afford a $600 box and basically being their slave for 50 hours *on top of* schoolwork in roder to have a moderately decent machine. Aug 19 18:30:35 rgr: many virtual installs are into 32-bit guests. Aug 19 18:31:21 lewellyn: and again, if you are really a dev, you dont put your primary dev environment in a vm Aug 19 18:31:30 who said anything about primary? Aug 19 18:32:06 i think it’s funny that people just assume 64bit is “faster" Aug 19 18:32:07 i added that part, but you can emulate a 64-bit os just as easily as a 32-bit one Aug 19 18:32:09 rgr, I also happen to have a collection of older machines (4-5 years old) that I fix up for new college students, high schoolers, etc, who need a computer but can't afford one so that they can do at least papers and such with them. those machines are running 32bit because they're old. A recent one (ca. 2009) didn't even have PAE officially, and required some magical kernel mangling. Aug 19 18:32:18 dcow: it has nothing to do with speed Aug 19 18:32:24 i know. Aug 19 18:32:41 birbeck: if your jenkins is on a 32-bit host, hope you don't plan on compiling any apks if the tools are only 64-bit... see how that works? :P Aug 19 18:32:44 dcow: but Apple can market it as such :) Aug 19 18:32:49 dcow, you *do* get a slight (about 4-8%) performance increase if you're doing emulation of other HW sometimes if you write it right. Aug 19 18:32:53 I think it's funny people just assume "everybody with any kind of sense is going to be on 64-bit because anything else makes no sense at all" Aug 19 18:32:58 emulation sure Aug 19 18:33:07 too closed off into their own world Aug 19 18:33:09 but bigger op codes take loger to process Aug 19 18:33:20 ravilov: you are just being ignorant Aug 19 18:33:23 dcow, Tell that to the 128bit mainframes of the day. Aug 19 18:33:34 birbeck, sure, why not Aug 19 18:33:38 "ravilov: too closed off into their own world" worst statement every Aug 19 18:33:44 ok Aug 19 18:34:04 indrora: well yeah you can pack more into an op though Aug 19 18:34:12 there’s a tradeoff Aug 19 18:34:37 and at this point I’m sure it will become a moot point imminently Aug 19 18:34:50 anyhow, i've got way better things to do that argue about cpu arch Aug 19 18:34:51 indrora: sure. they're old. And they work. Nothing to do necessarily wit not having the cash. Devs, by that I mean professional developers, generally would. I'm saying many students and part time or even full time devs dont upgrade because they dont need to. I saw next to no difference, a slow down in some cases due to larger memory usage, moveing from 32 bit debian to 64 bit on the same HW. Aug 19 18:34:56 dcow, not really. Instruction size has very little to do with your instruction processing time. (source: CS student who's studied this. ) Aug 19 18:35:43 indrora: not necessarily the opcodes BUT the memory usage is frequently much bigger with 64 bit. Aug 19 18:35:47 tbh, i know a number of companies who do their continuous integration builds in 32-bit virtual machines. the overhead of a 64-bit install is significant enough to impact build times, in many common scenarios. (however, in others, the increased number of registers can make a 64-bit guest faster. that's why sysadmins earn their money: they get to do the boring parts of making sure that they're deploying appropriately.) Aug 19 18:36:18 lewellyn, iirc, Travis-ci runs on a mixture of x86 and x64 Aug 19 18:36:33 many things do. Aug 19 18:38:27 indrora: same thing, library "libSDL2_mixer.so" not found on x86 atom Aug 19 18:39:10 should a INSTALL_REFERRER receiver be able to write to logs? Aug 19 18:39:43 when i fire the test broadcast thru adb im able to but im not seeing my logs when downloaded from play store so im wondering if its not firing or not logging Aug 19 18:41:21 logs show a PACKAGE_ADDED broadcast but not a INSTALL_REFERRER broadcast when i install Aug 19 18:42:11 indrora: btw, i assume this means you're actively devving? ;) Aug 19 18:42:25 i really need to get you some patches at some point soonish. Aug 19 18:42:40 indrora: I was talk about this: http://www.bcastell.com/tech-articles/how-does-word-length-affect-the-performance-and-operation-of-a-cpu/ c.f. the section on propogation delays for larger bit alu's Aug 19 18:44:57 i want all fields of a lot of my classes to be @Nullable. is there any easier way of doing this than marking each one individually? Aug 19 18:45:05 basically, you have to wait longer to perform general arithmatic on 64 bits vs 32. the difference is becomming better, but what I mean is that it takes nominally more time to execute a 32bit program compiled for 64bits IF the program does not take adgantage of any of the 64bit features. Aug 19 18:48:02 indrora: but if you’ve got research that disputes the claim I’d love to read up on it (= Aug 19 18:50:12 dcow, so, that's math in n-bit versus m-bit systems. Basically, math above shifts and add/sub is hard. multiplication as it turns out doesn't scale nicely, and division is really nasty in anything over like, 8 bit chunks. Aug 19 18:51:14 dcow, there's no real "papers" on it, mostly experience of building a simple 8 bit processor. Aug 19 18:51:31 sure. reading the article again, I guess the only assertion you can really make is that you could theoritically always clock a lower bit processor faster Aug 19 18:51:54 which isn’t not the performance bottleneck in most places. Aug 19 18:52:19 JakeWharton, any ideas? Aug 19 18:52:24 on? Aug 19 18:52:46 making all fields in a class or classes nullable without writing an individual annotation for each one Aug 19 18:53:02 for server responses, i want to be super defensive Aug 19 18:55:05 whomp: why does that make anything super defensive out of curiosity? Aug 19 18:55:23 JakeWharton, ^ Aug 19 18:55:48 rgr, super defensive about fields not coming back and stuff, since you get a warning any time you assume a field is not null Aug 19 18:55:58 my understanding (and Im realtively new to Java) is that its to stop the IDE warning you of null fields. Aug 19 18:56:10 rgr, that's @NotNull :) Aug 19 18:56:17 no. Aug 19 18:56:33 @Nullable says "it can be null" Aug 19 18:57:08 right, so the compiler will warn you when you assume that it's not null, i.e. de-reference without first doing a null check Aug 19 18:57:09 do you know how to implement a bar that hides on scroll up (like address bar in chrome)? Aug 19 18:57:56 exactly. But how does this make anything super defensive for server responses? This is then runtime. Aug 19 18:58:12 or do you mean to ensure youre prompted to handle the null case? Aug 19 18:58:20 rgr, the latter Aug 19 18:59:24 you can tell IntelliJ to assume everything's nullable Aug 19 19:03:24 JakeWharton, i found @ParametersAreNonNullByDefault. is that what you mean, or is there another way in intellij? Aug 19 19:03:36 i don't know. i just annotate things individually Aug 19 19:03:44 but yes, that sounds like what i was thinking of Aug 19 19:06:14 kk thanks :) Aug 19 19:10:56 hi Aug 19 19:11:41 I have released my first Android app a few weeks back, now users are having some problems. I can debug just fine on my own device using logcat (all logging is done there). Is there a way to acquire logs of my application from the end user device? Aug 19 19:12:13 I tried adding loads of error handling, but being able to view the logs would make my life much easier Aug 19 19:13:40 deam: ACRA? Aug 19 19:14:05 it seemed the simplest way to gather errors from the field some time ago... Aug 19 19:14:47 I will look that up, thanks Aug 19 19:17:36 deam: you can try to get them to click on the "report error" button when you crash, too Aug 19 19:17:39 many users won't/don't Aug 19 19:17:46 but if they do, you get the stack trace Aug 19 19:18:19 ah, that would be a great help Aug 19 19:18:47 I have actually pinpointed the function that goes wrong. But because there is a complex network protocol involved its really hard to debug (even with logcat at hand) Aug 19 19:19:36 i'm getting INSTALL_REFERRER to fire.. 7 times out of what should be a couple hundred by now Aug 19 19:19:46 is there a good way to make a textview not take up any height if it's empty? Aug 19 19:19:52 i'd like to avoid playing with visibility Aug 19 19:19:52 so its not failing all the time, just most of the time Aug 19 19:20:17 deam: crashalytics Aug 19 19:23:14 actually, nvm, I can use visibility Aug 19 19:23:20 any alternative to paint BlurMaskFilter with HW Accel ? Aug 19 19:32:02 Hi. Aug 19 19:33:24 Hi, my app crashes when I try to drawcircle in bitmap on imageview using a touchevent. Any idea why ? Aug 19 19:33:34 demons Aug 19 19:34:06 I have an Activity shown. And I have a Service running in the background. The Service want to "tell" the Activity something that it can e.g. immediately display in a Toast or toggle a View's visibility perhaps. I'm thinking some registered handler in the Activity that works in the Activity's context or something. Anyone know how to do this? Aug 19 19:34:10 Well m atheist Aug 19 19:37:04 Zta1, http://stackoverflow.com/questions/4787249/how-to-capture-the-new-intent-in-onnewintent <- you could try sending a new intent to it, but I'm not sure if that would work well for you. you could also register a broadcast receiver in the activity and send an intent to the broadcast receiver Aug 19 19:41:05 I think the latter might work, but I don't know anything about broadcasts yet. I just wanted to confirm that it's a likely doable road before takeing it =) Aug 19 19:44:36 onNewIntent... interesting Aug 19 19:46:10 I dunno if it's the best idea Aug 19 19:46:23 would the service ever make the intent when the activity isn't open? Aug 19 19:46:37 because that'll call oncreate instead of onnewintent Aug 19 19:47:23 broadcasting an intent from the service and registering a receiver for it within the activity seems like a better idea to me IMHO Aug 19 19:47:48 me too Aug 19 19:49:10 either that or binding to the service and passing callbacks back and forth, but that seems trickier and less safe Aug 19 19:50:57 yes, there is an issue with the first intent reaching onCreate Aug 19 19:51:00 I wouldn't want that. Aug 19 19:51:19 I'll try local broadcasting. Thanks =) Aug 19 19:55:16 anyone here who knows android-studio who can help me setup an existing project in android-studio without using the wizard? Aug 19 19:55:18 Just use an event bus Aug 19 20:27:03 anyone know how to blur anything (line, shape) on a canvas ? Aug 19 20:27:24 seems I need to disable hardware acceleration in my app to do it? Aug 19 20:27:29 doesnt it depend on the language or graphics platform? Aug 19 20:27:45 StingRay_: depends on how you want to do it Aug 19 20:27:58 really dont care, just need a fuzzy 2d blur Aug 19 20:27:58 oh I didnt realise in in android dev. lol Aug 19 20:28:17 you can use the intrinsic renderscript blur Aug 19 20:28:24 but the max radius for that is 25 px Aug 19 20:28:40 otherwise you have to do multiple passes or write a sw blur Aug 19 20:28:54 there are so fast linear motion blurs out there Aug 19 20:28:57 is there an example of using renderscript then ? Aug 19 20:28:59 s/so/some Aug 19 20:29:26 um there are documents on using renderscript on the dev site Aug 19 20:29:57 tbh simple box blur would do, but means I have to start playing with bitmap data, just thought that android should have this already Aug 19 20:30:09 so all fancy effects are renderscript now ? Aug 19 20:30:47 hi all, i have 1 main activity and 2 fragments. 1 fragment takes up the entire page and it switches to the other fragment if a button is pressed. There are also 2 dialog fragments, one for each fragment. Should i make it so that the activity holds all the information and directs the transition of the fragments, or should i do this within each of the fragments themselves Aug 19 20:31:10 StingRay_: I don’t think android ever had any of those fancy effects before renderscript Aug 19 20:31:33 dcow: BlurMaskFilter Aug 19 20:32:06 but SW only Aug 19 20:32:06 interesting Aug 19 20:32:16 oh so you want a hw blur? Aug 19 20:32:21 because before you said you didn’t care Aug 19 20:32:57 no i mean you cant have hardware acceleration enabled to use that sw mask filter on paint Aug 19 20:33:07 has to be disabled app wide Aug 19 20:33:27 ah. I thought you could disable hw rendering on a per view basis Aug 19 20:33:39 but I’ve never done that so i have no real idea Aug 19 20:33:51 fk maybe you can :) Oh wait, yeah some flag Aug 19 20:33:59 I seem to remember that...ish Aug 19 20:34:41 actually I’ve had to make webviews sw render before because transparent backgrounds were not working in the 4.0-4.3 webviews Aug 19 20:34:50 when hw rendered Aug 19 20:35:31 the renderscript blur is pretty easy to use. it’s about 5 lines of code Aug 19 20:36:09 you get a renderscript context. creat an allocation. apply the intrinsic blur to the allocation and create a new bitmap from the allocation after copying it back to your app Aug 19 20:42:51 anyone? Aug 19 20:43:47 HelplessJub: I bleieve fragments should not contain knowledge of other fragments. Aug 19 20:44:03 the activity is your controller and fragments are “views with logic” Aug 19 20:44:16 kindof a poor design pattern in the first place, though. Aug 19 20:44:54 dcow: how can i share a variable across the fragments and activity Aug 19 20:45:07 HelplessJub: you share an interface Aug 19 20:45:37 dcow: ok, just making sure theres no more efficient method Aug 19 20:45:39 thanks Aug 19 20:45:39 you write your fragment such that it must be attached to an activity that implements a common interface. you callback to the activity when you need to tell it something Aug 19 20:46:07 dcow: how about a dialogfragment for those two dialogs Aug 19 20:46:10 HelplessJub, you could use Application Aug 19 20:46:24 and since the activity has a hard reference to your fragment, it can just call methods on your fragment directly Aug 19 20:46:28 how should i proceed to pull the data from the dialogs, another interface? Aug 19 20:48:11 ideally all data should be passed by reference (uri) and obtained and modified individually by interested components in a transactional manner. Aug 19 20:48:31 in more simple cases you can use the intent extras explicitly Aug 19 20:50:01 just reference back the activity - let the view decide how to display the data but access the data from the activity store... :) Aug 19 20:50:09 why can I not find examples of renderscript blur on canvas drawn shapes Aug 19 20:50:21 do I have keywords missing ? Aug 19 20:50:26 StingRay_: because you have to blur the bitmap Aug 19 20:50:41 so how do I get a bitmap from a canvas Aug 19 20:50:44 you can’t apply renderscript to the canvas directly. it has to be applied to an allocation Aug 19 20:50:58 StingRay_: That is the hard question. Aug 19 20:52:37 StingRay_: I think you ahve to create a bitmap shader and use it as the source for your canvas Aug 19 20:53:07 (you can grab a view’s drawing cache, but I don’t think that’s preferred) Aug 19 20:53:09 well apparently you can enable cache for the canvas and get it via the draw cache Aug 19 20:53:23 on a view level Aug 19 20:53:29 so not all that bad Aug 19 20:53:35 ugh but all this should be easier Aug 19 20:53:37 :) Aug 19 20:53:40 yes, you can do that. I think it’s safer to just draw the canvas to the bitmap itself Aug 19 20:54:18 ah yeah, maybe indeed Aug 19 20:54:19 StingRay_: I think you can write your own shader if you want. but I’ve never tried that Aug 19 21:06:19 Hey guys. Yesterday I found out that I could use things like "top" and "ps" in adb shell. Is there a list of other commands I can run? I only know three linux programs "top" "ps" and "nano", but nano doesn't work. I just want to know what will work. Thanks Aug 19 21:07:45 dcow: Should the activity handle the different actionbars for the different fragments as well? Aug 19 21:08:28 eghdk: I believe any commands busybox uses. www.busybox.net/downloads/BusyBox.html Aug 19 21:09:16 eghdk: ls /system/bin Aug 19 21:09:26 and no android does not have busybox by default Aug 19 21:09:53 What is the easiest way to get all contacts that belong to a certain contact group? Aug 19 21:10:09 oh hmm it has something called toolbox Aug 19 21:10:14 may be a neutered busybox Aug 19 21:10:47 jjbrunton: query the contact provider Aug 19 21:10:58 or rather using the faster PhoneLookup Aug 19 21:11:01 I think Aug 19 21:11:02 :) Aug 19 21:11:11 I gathered that but it's not as simple as that to get all the contacts Aug 19 21:11:31 huh? Aug 19 21:11:34 if you know the group Aug 19 21:11:41 It looks as if you need to query each contact for their group membership Aug 19 21:12:37 eghdk: https://github.com/android/platform_system_core/tree/master/toolbox Aug 19 21:14:24 dcow: Should the activity handle the different actionbars for the different fragments as well? Aug 19 21:14:34 HelplessJub: fragments can add thigns to the action bar, yes. Aug 19 21:15:14 you have to flag that you have options menu Aug 19 21:21:29 hey guys… im compiling with minimum API 11 so i can’t use android.view.Display getSize(Point), only getWidth() which was deprecated in API 13, what should i do? Aug 19 21:23:15 change to 1 Aug 19 21:23:19 sorry 13 Aug 19 21:23:21 :) Aug 19 21:24:39 but then my app wont run on 3.x tablets right Aug 19 21:24:50 correct, all 4 of them Aug 19 21:24:55 what will you do Aug 19 21:24:56 :) Aug 19 21:25:01 that sucks :( Aug 19 21:25:07 other solution? Aug 19 21:25:09 those 4 users will live Aug 19 21:25:12 trust me Aug 19 21:25:29 they only use their tablets for door stops now Aug 19 21:26:10 my app will run on some public projects, not sure with what hardware/software, but the government here often buys crap for these projects Aug 19 21:26:22 dont wanna reduce that much compatibility just because of this function Aug 19 21:26:37 then dont attempt to use newer functions :) Aug 19 21:26:55 StingRay_: if i stick with getwidth it will work on every version? Aug 19 21:27:09 <0.1% of users are on honeycomb.. It's a dead platform.. Don't waste time supporting it Aug 19 21:27:16 Min sdk 15 Aug 19 21:27:29 meh okay Aug 19 21:27:32 Anyone using bamboo with genymotion for CI? Aug 19 21:31:11 trying to install android sdk tools 23, select it and ONLY it for intsall. click install, accept licence. it downloads and completes with "nothing was installed" Aug 19 21:31:17 no other error messages that i can see Aug 19 21:32:13 anyone knowledgeable in GLES? I'm trying to link a vertex and fragment shader. The link status ends up 0, but the logs say it linked successful Aug 19 21:32:43 frankdrey, ravilov: Thanks. LocalBroadcastManager works great. Btw, I used http://www.vogella.com/tutorials/AndroidBroadcastReceiver/article.html#ownreceiver_localbroadcastmanager Aug 19 21:32:48 gnite Aug 19 21:34:44 why i cant subtract a R. element?? setBehindOffsetRes(width - R.dimen.slidingmenu_offset); Aug 19 21:35:51 can anyone tell me why android SDK tools version 23 do not install? Aug 19 21:36:01 so how do I handle my app's database creation ? The tutorials just seem to create new entries on every startup. Can I package my database and distrubute it ? Or do I just check to see if theres data in there, if there is I don't create any ? Aug 19 21:36:22 I440r, what OS , IDE ? Aug 19 21:36:28 luist: cause thats a reference to a value Aug 19 21:36:33 not a value you want Aug 19 21:36:39 actually. i no longer have a tools directory Aug 19 21:36:58 StingRay_: oh and how do i subtract it then Aug 19 21:37:05 so for some reason the orde4r of operatioins was "delete the tools i currently have, install the new tools?" Aug 19 21:37:11 luist: getResources().getDImension() Aug 19 21:37:16 cant install the new tools :/ Aug 19 21:37:27 that would give you a value Aug 19 21:38:43 dcow: Thanks man! THat's awesome. So all of those are just .c programs? Aug 19 21:39:04 And... how the hell did you find that? I understand that it's open source... but this is sick! Aug 19 21:39:25 yea. that fixed it i think. just emerge android-sdk-update-manager to get my tools back, then run the update Aug 19 21:39:36 I'm gonna try the official tutorial. the one i was following is trying to do to much for a beginner's tutorial Aug 19 21:39:54 also, is it a bad idea to do "import static android.opengl.GLES20.*"?:P I'm lazy... Aug 19 21:40:00 StingRay_: something like this? setBehindOffsetRes(width - (int) getResources().getDimension(R.dimen.slidingmenu_offset)); Aug 19 21:40:09 eghdk: there are more than just what’s in the toolbox link. such as `am` and `pm`. to get the full list you can just look at system/bin Aug 19 21:40:22 luist: yes that will give you the value from the xml Aug 19 21:40:23 :) Aug 19 21:41:12 dcow: Ok. This might be funny to you. But this is so mind opening. Holy crap! Aug 19 21:41:38 dcow: Also... where do I find system/bin? Aug 19 21:41:44 StingRay_: still giving me Resources$NotFoundException Aug 19 21:41:45 on the device Aug 19 21:42:15 well make sure it's there Aug 19 21:42:19 eghdk: adb shell ls /system/bin Aug 19 21:42:31 eghdk: and it’s cool, we were all there once (; Aug 19 21:43:36 dcow: Haha. I appreciate it. I'm just learning linux now. And I'm typing these things on my ubuntu machine, but then running something like ps on adb shell is awesome. I can see everything! Aug 19 21:44:06 Also dcow is there anyway to see system/bin not in adb shell? Like on github basically? or the aosp repo or something? Aug 19 21:45:03 eghdk: good question. I’m not actually sure in which location during the build the system/bin is populated. If you find out, be sure to share. Aug 19 21:46:18 I'll look for it now. I'm mostly just interested because I see stuff like vi and monkey in adb shell /system/bin Aug 19 21:47:33 Interesting: Aug 19 21:47:37 if(!strcmp(argv[0],"logcat") || !strcmp(argv[0],"lolcat") || !strcmp(argv[0],"longcat")) { return logcat(ttype, serial, argc, argv); } Aug 19 21:48:11 eghdk: it should also be noted that system/bin is not the only place binaries live Aug 19 21:48:40 with a service, if i'm doing something just very quick and simple, can i do "performWork(); stopSelf(startId); return START_STICKY;" in onStartCommand and expect that the service will terminate immediately upon onStartCommand's completion? Aug 19 21:48:54 or does stopSelf(int) need to be called after onStartCommand returns? Aug 19 21:50:13 dcow: Whaaa? You're blowing my mind here. Aug 19 21:50:39 sarbs: sounds like you should be using intentService Aug 19 21:51:06 StingRay_ there are other things this service does, i'm just trying to isolate behaviors in order to understand them better before i try to put em together Aug 19 21:52:39 dcow: Just for my sake because I'm just learning c/linux. Binaries means programs? Aug 19 21:52:50 "A devices sensor readings contribute noise data due to high sensitivity of its hardware to various factors. For gaming purposes, these highly sensitive values are a boon, but for application hat need smooth readings, these hopping values are a mess." Aug 19 21:52:50 yes Aug 19 21:52:59 what does boon mean? Aug 19 21:53:10 ok so im trying to launch an avd. i go into the adv manager. click start. i get a progress bar that goes to 100%, that window disappears... NO adv Aug 19 21:53:11 smitzer: buff Aug 19 21:53:14 wtf over? Aug 19 21:53:16 i assume buff? Aug 19 21:53:21 doesnt matter? why not? Aug 19 21:53:46 StingRay_: oh i fixed it… thanks :) Aug 19 21:54:04 erm maybe its use host gpu is making it silently fail Aug 19 21:54:15 luist: yw Aug 19 21:54:18 no. turned that off and still no avd launches Aug 19 21:55:16 i cant launch my avd L/ Aug 19 21:55:16 :/ even Aug 19 21:55:31 i think the emulator is starting but im getting no avd Aug 19 21:56:25 dcow: Okay so yeah vi isn't in system/bin but I will figure it out! vi has to be an open source program in the AOSP right? Aug 19 21:57:19 probably not eghdk Aug 19 21:57:36 i don't think there are any shell text editors easily available for android Aug 19 21:57:42 eghdk: echo $PATH Aug 19 21:57:43 you'll be better off pulling, editing, pushing Aug 19 21:57:56 => /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin Aug 19 21:58:01 sarbs: vi is available though? Aug 19 21:58:19 sure, vi is available and open-source, but you'll likely have to figure out how to compile it for ARM and the android distro Aug 19 21:58:34 im getting a RANDR error. tell me randr is NOT a required item for avd launch Aug 19 21:58:45 sarbs: No. thats not what I mean. Its available on android through adb shell Aug 19 21:58:45 im running through a freeking vnc session FUCK randr Aug 19 21:58:59 dcow: What? Aug 19 21:59:08 eghdk no, it's not - not on AOSP, at least Aug 19 21:59:19 CM has it, apparently. didn't realize that Aug 19 21:59:26 Really? Aug 19 21:59:30 eghdk: those are all the places where standard executables live. Aug 19 21:59:41 sarbs: I bet CM bundles busybox instead of toolbox Aug 19 21:59:48 dcow they do Aug 19 22:00:01 can someone please tell me why my avd refuses to launch? Aug 19 22:00:05 oh. is that the whole path thing where I added adb to my Linux path? Aug 19 22:00:19 can I run echo $PATH in linux? Aug 19 22:00:22 eghdk yeah, $PATH is where the system looks to find the commands you type Aug 19 22:00:31 and oh snap. I am running CM! Aug 19 22:00:42 So what's this whole toolbox vs busybox thing? Aug 19 22:01:04 busybox is a (single) program that emulates a ton of the "standard" linux programs Aug 19 22:01:23 it doesnt emulaate them Aug 19 22:01:49 s/emulate/acts like/, whatevs Aug 19 22:01:54 it has a cut down version of each of them within itself. you create symlinks to that ONE executable and argc[0] tells you which one to run Aug 19 22:01:57 it's one program that has the functionality of a ton of others Aug 19 22:02:14 This has turned into a great conversation. Thanks all. Have a lot to learn/research. Aug 19 22:02:24 yeah cm puts busybox in xbin Aug 19 22:02:24 can someone help me get my avd launched please Aug 19 22:02:54 dcow: So can you explain echo $PATH before I have to go. Itgave me a long line of text. But I can't seem to deciper it. Aug 19 22:02:56 alongside toolbox in bin Aug 19 22:03:01 i doubt bb has vi. vi requires termcap or terminfo Aug 19 22:03:15 dcow: You said /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin Aug 19 22:03:16 in fact it was the author of vi that created the termcap database Aug 19 22:03:23 your path is where `sh` searches for executables when you type a command Aug 19 22:03:44 it’s a colon seperated list Aug 19 22:03:51 okay. colon seperated Aug 19 22:04:02 yeah, in CM vi is its own executable. /system/xbin/vi Aug 19 22:04:07 that actually makes it readable. hahah Aug 19 22:04:25 then in cm you also have /usr/share/terminfo ? Aug 19 22:04:42 or maybe (like brainded debian distros) a /lib/terminfo ? Aug 19 22:05:07 hello everyone Aug 19 22:05:31 how do i report a bug against android Aug 19 22:05:34 So CM has busybox AND toolbox? Aug 19 22:05:38 I440r /system/etc/terminfo looks like Aug 19 22:06:00 http://code.google.com/p/android/issues/list Aug 19 22:06:05 sarbs well ill be... lol.. i never expected a terminfo to exist in android :) Aug 19 22:06:10 I440r: http://code.google.com/p/android/issues/list? Aug 19 22:06:34 sarbs: What's terminfo? Aug 19 22:06:39 erm stupid hexchat is opening links Aug 19 22:06:41 I440r for your avd, more details. what os, toolchain, cmd are you using? Aug 19 22:07:14 sarbs gentoo linux. let me get the toolchain ver Aug 19 22:07:18 eghdk it's a library that i presume has a database of terminal capabilities - what terminals can do color, bold/italic, dimensions, etc. stuff vi needs to properly render itself on a screen, basically. Aug 19 22:07:37 first emerge -C links whih i keep havintg to do blargh Aug 19 22:07:37 Oh. Aug 19 22:08:00 sarbs: Can I find terminfo through adb shell? Aug 19 22:08:11 And open it to change colors or something? Aug 19 22:08:13 probably. it's not a command you run though. Aug 19 22:08:26 It's a file though... right? Aug 19 22:08:34 I'm just curious to see it now. hahah Aug 19 22:08:47 it's a set of binary files Aug 19 22:08:52 eghdk, in linux when you do cursor control to draw things in the terminal you have to write strings that describe the cursor action. they are called escape sequences. every terminal uses its own escape sequences, termcap and terminfo are a way of describing those strings plus a crap load of other info about the terminal Aug 19 22:09:02 not much you can do with them. programs use them Aug 19 22:09:39 gotcha. Good to know though. I'm still learning linux/console now so it's very new but interesting. I appreciate the help. Aug 19 22:09:40 eghdk, to change colors means writing a color change escape sequence Aug 19 22:09:53 dont try learn terminfo, jut know its there Aug 19 22:10:15 sarbs. i have android sdk 23.0.2 installed Aug 19 22:10:29 the avd is 4.03 Aug 19 22:10:31 Exactly. It's too much to learn, I just wanted to know its there, and WHAT its there for. Again, I appreciate the expalnation. I have to be on my way but thank you. Aug 19 22:10:36 do you know what command the emulator is being started with? Aug 19 22:11:41 dcow: How can I edit the path? echo $PATH just prints. Aug 19 22:11:58 sarbs i launch the avd manager and click the "start" button Aug 19 22:12:52 bankai_au rxjava 0.20.0 final Aug 19 22:13:52 Is there seriously no way to get reasonable function call tracing without recompiling your kernel? Aug 19 22:14:02 eghdk: now you’re getting into framework modifications. even with root your default sh is read only Aug 19 22:14:14 sh? Aug 19 22:14:21 shell? Aug 19 22:14:33 on desktop linus you can set your path with something like PATH = “$PATH:/my/extra/path" Aug 19 22:15:12 dcow: Yeah I'm trying to remember how I added adb to my path, but can;t remember Aug 19 22:15:16 eghdk: sh is the default shell binary, yes Aug 19 22:15:44 preobably sh is a symbolic link to your shells executable (thats a guess, i never looked lol) Aug 19 22:16:40 ugh the opengles tutorials are very incomplete Aug 19 22:17:11 g00s: w00t w00t Aug 19 22:17:37 dcow: Okay I found it on my osx machine. It's in .bash_profile? Aug 19 22:17:49 for bash, yes Aug 19 22:17:58 but that’s only your terminal shells Aug 19 22:18:04 you need to look in launchd.conf Aug 19 22:18:11 for osx, specificall Aug 19 22:18:16 because darwin is a bit weird Aug 19 22:18:39 wait? whats the difference between bash then? Why is that "only your terminal shells" Aug 19 22:19:11 You mean if I ssh into my computer, something like adb shell wouldn't work because I'm not running a "terminal" technically? Aug 19 22:19:33 no in osx all shells are login shells i believe Aug 19 22:19:37 that still works Aug 19 22:19:46 I’m talking about for system applications Aug 19 22:20:07 for all intents and purposes you seem concerned with, .bash_profile will suffice (if you’re using bash of course) Aug 19 22:20:19 you should check out zsh (; Aug 19 22:20:28 eghdk, I ssh into boxes that have android devices and adb to them all the time. You're free to even over SSH port-forward the android debugger port (8700 I think it was) over SSH and talk to it that way Aug 19 22:20:33 I've done it a few times. Aug 19 22:21:25 indrora: Yeah, but dcow said that my adb is added to bash_profile which only handles it for the terminal. Aug 19 22:21:43 when did I say that? Aug 19 22:22:01 for bash, yes [18:17] but that’s only your terminal shells Aug 19 22:22:11 yes, but I said nothing about adb Aug 19 22:22:26 Consider me confused. =/ Aug 19 22:22:28 oh I guess you were talking about putting adb on your path in osx Aug 19 22:22:35 Yeah! Aug 19 22:22:51 In osx in in ~.bash_profile Aug 19 22:23:04 at least thats where I put it, according to some tutorial online Aug 19 22:23:09 yes, that path is only available to shells which you get one of when you ssh Aug 19 22:23:36 So why'd you recomend launcd.conf Aug 19 22:23:37 ? Aug 19 22:24:20 you seem interested in information, so I was saying that’s how the underlying system handles setting up your environment Aug 19 22:24:38 i then said for all intents and purposes you seem concerned with, bash profile will suffice (= Aug 19 22:25:35 Okay. Aug 19 22:25:51 I thought maybe for ssh it might be different if I try to ssh as a different user and THEN adb Aug 19 22:26:14 because .bash_profile is in MY home Aug 19 22:26:17 home folder Aug 19 22:26:50 :\ I have this hunk of code that takes exponentially more time and I can't figure out why. Aug 19 22:27:33 eghdk: that is correct Aug 19 22:27:46 Okay. So I was kinda right. Aug 19 22:27:58 Those path changes are only for my user. Aug 19 22:28:20 But that kinda makes sense, because different users might have a diff version of adb in a different dir? Aug 19 22:28:21 if you want adb on your system path, then you need launchd I think. unless you want to modify /etc/bashrc Aug 19 22:28:40 eghdk yes you want to scope things to different users Aug 19 22:28:41 whats /etc/bashrc? Aug 19 22:28:51 it’s the sytem bashrc used for interactive bash shells Aug 19 22:28:53 there's a channel for OS X support ... Aug 19 22:29:13 Hahah. Sorry. Just making sure adb is in the right spot bankai_au Aug 19 22:31:36 indrora, is the chunk recursive? Aug 19 22:32:23 ravilov, no, it's linear in design. I suspect it's caused by doing a lot of string operations. I'm generating about 2000 SpannableStrings Aug 19 22:32:39 if I have an activity with a listview and a header layout in the listview, will findViewById on the activity find views inside the header? Aug 19 22:36:23 My ListFragment always shows the list is empty, even after i add to the array Aug 19 22:36:35 how can i fix this Aug 19 22:37:08 by doing it properly ? Aug 19 22:37:09 ravilov, Found it. Making sure that certain strings were properly interned has fixed it. Aug 19 22:39:08 Here's my XML http://pastebin.com/a0PyUbxc and my Fragment http://pastebin.com/hmsU75sm Aug 19 22:39:26 StingRay_: whats the proper method Aug 19 22:41:11 HelplessJub: well where do you tell the adapter that the data has changed ? Aug 19 22:41:36 the adapter handles it Aug 19 22:41:41 does it ? Aug 19 22:41:43 on ActivityCreated Aug 19 22:41:43 how so ? Aug 19 22:42:13 notifyDataSetChanged Aug 19 22:44:23 oh wow, Tilda Swinton in a vampire movie; this has to be good Aug 19 22:48:49 StingRay_: Thanks, that's what i am missing Aug 19 22:49:29 since this is a custom adapter do you suggest i declare the adapter as a private variable of the fragment or try and access it using getListadapter Aug 19 22:50:21 in a LP-filter, how do you choose alpha based on sampling rate? Aug 19 22:59:41 I'm trying to test out some IAP code that buys stuff from Google Play. Am I right in thinking that I have to upload every new version of the APK to google play and download it again onto my device in order to test every change to the code? Aug 19 23:02:16 d0de: no Aug 19 23:02:37 HelplessJub: its up to you either wy Aug 19 23:02:38 there are docs in fake purchases on d.android.com Aug 19 23:02:51 desmin88: thanks :) Aug 19 23:03:10 but doing getlistadapter is just messy imo Aug 19 23:03:13 or, if you want to test properly, just make sure you are not on the dev account, that the app is same version live on play and signed Aug 19 23:04:26 StingRay_ , I'm following https://developer.android.com/google/play/billing/billing_testing.html but unless I'm not seeing it, it only covers testing IAP by uploading app to google play alpha or beta Aug 19 23:04:51 which means waiting a couple of hours for new APK to propagate after making every change?? Aug 19 23:05:48 what it means is same version num and signed Aug 19 23:06:13 so basically you can change crap, do a signed build and install it local and it should be fine Aug 19 23:06:20 version and signed is what it needs Aug 19 23:06:27 iirc Aug 19 23:06:51 StingRay_, will try, thanks vm Aug 19 23:07:18 np off to bed mpw, gl Aug 19 23:13:35 When I set a geofence with a pending intent, then I want to cancel it. Do i cancel both pending intent and the geofence? Aug 19 23:16:26 detachYo: wouldnt cancelling the pending intent cancel the associated geofence(s)? Aug 19 23:17:06 Hello everyone, has anyone tried to use the latest google api for requesting location updates through GoogleApiClient, LocationServices, FusedLocationProviderApi and LocationRequest? Aug 19 23:17:56 detachYo: I've just done LocationClient.removeGeofences with the PendingIntent and it's worked fine Aug 19 23:18:47 jjnye can you make an example in pastebin? If not, is this how it works: create pending intent, and then removeGeofences(pendingintet)? Aug 19 23:19:05 desmin88: I don't know if it would. I thought so too, just decided to ask to make sure. Aug 19 23:19:36 detachYo: yes, you're already correct. as long as the PendingIntent matches, it should work fine Aug 19 23:20:48 jjnye: thanks for that info. Aug 19 23:20:55 desmin88: you are correct :) Aug 19 23:21:09 er... or not. I am not sure what this translates too. Aug 19 23:22:27 honestly im confused here too Aug 19 23:24:02 http://developer.android.com/training/location/geofencing.html#StopGeofenceMonitoring Aug 19 23:24:04 just look here Aug 19 23:25:20 http://stackoverflow.com/questions/8275669/how-do-i-use-listview-addheaderview Aug 19 23:25:25 I'm having this exact same problem Aug 19 23:25:38 and passing a null container won't make a difference Aug 19 23:25:55 jjnye: correct me if I am wrong. But creating a pendingintent with a unique id, then passing it to remove the geofence will take care of. also creating a geofence with lat, lng and rad and then removing that geofence will also do it? Aug 19 23:26:02 Then wouldn't we have a pending intent hanging there? Aug 19 23:26:16 Do I have to have a custom implementation of FusedLocationProviderApi or is this object provided through LocationServices.FusedLocationApi? Aug 19 23:29:13 if i don't call setAdapter, it seems to partially set up the view, but it looks very very odd Aug 19 23:29:18 *the header view Aug 19 23:32:26 frankdrey just add a view on top of it Aug 19 23:32:33 that is your header since it is fixed Aug 19 23:32:42 i need it to scroll with the list Aug 19 23:32:59 oh sticky header Aug 19 23:33:40 hmmm, think I found a fix Aug 19 23:33:45 http://stackoverflow.com/questions/4393775/android-classcastexception-when-adding-a-header-view-to-expandablelistview Aug 19 23:33:58 testing... Aug 19 23:36:06 same thing Aug 19 23:36:11 i wonder if i'm missing something somewhere Aug 19 23:38:27 ahhhhh Aug 19 23:39:04 I was returning the header in onCreateView, let's see if that was why Aug 19 23:39:20 leftover from when the header was the main content of the page :p Aug 19 23:40:03 is a header supposed to be sticky be default? Aug 19 23:40:49 seems to be the default behavior Aug 19 23:40:50 working now :) Aug 19 23:41:39 hey guys, what's the best way of saving an arraylist of an object so that you can load it the next time the app is oppened Aug 19 23:42:53 HelplessJub, what kind of object is it? Aug 19 23:43:46 frankdrey-pc: custom object with strings ints and another arraylist of another object with strings and ints and dates Aug 19 23:44:29 Personally, I'd save a JSON file Aug 19 23:44:48 frankdrey-pc: how can i do this Aug 19 23:45:38 any recommendations for a good database library? Aug 19 23:47:11 i want an easier way of getting to my data... perhaps an orm, as long as its performant Aug 19 23:50:18 frankdrey-pc: thats a pretty good approach Aug 19 23:50:54 http://android.wanderinghorse.net/2012/06/17/serialization-101-with-json-in-android/ Aug 19 23:51:30 basically you'll have to make methods to convert object <-> jsonobject Aug 19 23:51:38 personal android studio is confident production use? Aug 19 23:54:48 omg don't use JSONObject Aug 19 23:54:53 hatoon: yes Aug 19 23:54:59 JakeWharton: what's wrong with JSONObject? Aug 19 23:55:13 um, it's the worst API ever written Aug 19 23:55:35 OK, but why? Aug 19 23:55:41 I have never had problems with it Aug 19 23:55:50 version 0.8.6 beta JakeWharton Aug 19 23:56:11 how about the fact that it throws checked exception for every API Aug 19 23:56:34 that alone makes it unusable Aug 19 23:56:47 JakeWharton, alternative? Aug 19 23:56:51 Gson Aug 19 23:56:56 and real Java objects Aug 19 23:58:20 JakeWharton, optStuff() does not use checked exceptions Aug 19 23:58:20 JakeWharton, why is a checked exception bad? Aug 19 23:58:38 aka, use optString(key) instead of getString(key) Aug 19 23:58:46 *optString(key, "default") Aug 19 23:58:53 that's stpuid Aug 19 23:59:00 ...why? Aug 19 23:59:34 fight! fight! fight! Aug 19 23:59:37 lol Aug 19 23:59:39 there is no fight Aug 19 23:59:46 it's a fact Aug 19 23:59:52 Gson is the greatest thing ever guys Aug 19 23:59:54 get used to it Aug 19 23:59:55 mhm Aug 20 00:00:21 why even having putString if optString exists? Aug 20 00:00:23 I take raw wordpress json data and in 1 line i have all my objects made for it Aug 20 00:00:27 desmin88: not sure if you're being sarcastic Aug 20 00:00:37 im not being sarcastic at all Aug 20 00:00:40 i fucking love gson Aug 20 00:00:59 detachYo: sounds sarcastic to me Aug 20 00:01:04 it makes everything so easy Aug 20 00:02:26 JakeWharton, would you be happier if they were renamed optString->getString and getString->forceGetString?:P Aug 20 00:02:37 no Aug 20 00:02:46 there shouldn't be two Aug 20 00:02:55 there need not be a choice Aug 20 00:03:18 that only scratches the surface of the awful interaction org.json.* imposes anyway Aug 20 00:03:29 anyway Aug 20 00:03:42 how does a header view affect listview's scrolllistener? Aug 20 00:03:48 does it count as a "visible item"? Aug 20 00:04:42 HelplessJub: so are you going to use gson Aug 20 00:04:46 because you should use gson Aug 20 00:05:10 desmin88: it's ok. let them write their tens to hundreds of lines of code to manually create and parse JSON Aug 20 00:05:34 deam: im going to use Json because i'm more familiar and hear great things Aug 20 00:05:44 woops desmin88 ** Aug 20 00:05:57 those great things you hear are the sounds of your brain cells dying Aug 20 00:06:08 JakeWharton dont take this the wrong way Aug 20 00:06:13 but i kind of love you Aug 20 00:06:16 (no homo) Aug 20 00:06:25 aw how cute Aug 20 00:06:30 relationships over IRC <3 Aug 20 00:06:32 JakeWharton: that was actually pretty funny Aug 20 00:06:46 i didn't expect humor on this IRC Aug 20 00:07:03 humor is what IRC is for. Aug 20 00:07:03 HelplessJub: why would you dick around with manally create and parse your json Aug 20 00:07:07 let gson do it for you Aug 20 00:07:12 and use actual java model objects Aug 20 00:08:13 I vote for bson Aug 20 00:08:44 you sick fuck Aug 20 00:08:46 I have a confession to make Aug 20 00:08:46 jk Aug 20 00:08:55 my objects were already at one point json Aug 20 00:09:01 google cloud endpoints Aug 20 00:09:10 and i couldn't figure out how the fuck to get them back into json Aug 20 00:09:23 and i couldn't modify the object definition Aug 20 00:09:31 so i went with jsonobject Aug 20 00:09:47 http://bsonspec.org/ Aug 20 00:09:49 mmm... bson Aug 20 00:10:13 im looking into gson now, and it looks easier to implement Aug 20 00:10:18 Does anyone know how long it should take for an IAP cancelled in the google wallet merchant control panel to register as cancelled on google play? Aug 20 00:10:30 Thank you Gson for taking this mess: http://gyazo.com/dd89ddd2acf1b9e34f4ef0751f15bfc6 and providing me with usable objects Aug 20 00:10:40 I'm trying to cancel a test purchase so I can try to buy the IAP again Aug 20 00:12:01 and it did it all in 1 line Aug 20 00:12:06 (save for some annotations) Aug 20 00:13:18 (who puts dashes in json "post-thumbnail", seriously man) Aug 20 00:14:13 lol Aug 20 00:14:14 wait Aug 20 00:14:26 i think i found how to easily json-ize these objects Aug 20 00:16:30 what objects Aug 20 00:16:59 cloud endpoints data Aug 20 00:17:20 why couldnt you jsonize them before Aug 20 00:17:28 because I had no idea how :P Aug 20 00:17:35 so if it extends GenericJson... Aug 20 00:17:47 Why weren't they json to begin with? Aug 20 00:18:11 Hi guys. I'm kinda stuck. Maybe because it's late, but I can't seem to figure out an elegant solution for my problem. Aug 20 00:18:48 setuid, the cloud endpoints client library converts them into an object, you never get to actually see the json Aug 20 00:20:41 I have this static class (mapFragment), and I need to get a ref of the GoogleMap object in my main activity. Without having a handler or something loop over and over to check if the var googleMap != null, and without turning half my activity class to static, How would I get to know when I can get a ref to the googleMap object in my main activity? Aug 20 00:21:28 you could do something like Aug 20 00:21:57 in your mainactivity have a method onGoogleMapReady(googlemap map) Aug 20 00:22:00 and have the fragment call that method Aug 20 00:22:31 but that will result in half my activity's method's having to become stati Aug 20 00:22:31 c Aug 20 00:22:37 so basically a listener method Aug 20 00:22:47 why is your fragment static Aug 20 00:23:08 does google.api.client.json.JsonObjectParser return a null object if it fails to parse it? Aug 20 00:23:16 * setuid whispers {{{callbacks}}} Aug 20 00:23:17 good question desmin88 Aug 20 00:23:52 setuid: i need the mapobject reference to set the callback listener :) Aug 20 00:24:00 ThomQ: make it not static, no reason to do so Aug 20 00:24:04 then make a listener method Aug 20 00:24:25 or use an event bus Aug 20 00:24:29 http://square.github.io/otto/ Aug 20 00:25:12 Bus is the smart way Aug 20 00:25:23 message queue and bus Aug 20 00:25:28 if you have 1 or more listener methods Aug 20 00:25:30 use an event bus Aug 20 00:25:32 teehee Aug 20 00:25:56 I looked into that last week Aug 20 00:26:04 and i got adviced against it Aug 20 00:26:34 who advised you away from using an event bus Aug 20 00:27:17 cant remember Who it was, but the reason was because I could just as easily use a couple of bool checks. Aug 20 00:27:29 I'm looking into why my fragments are all static Aug 20 00:27:40 boolean checks for what Aug 20 00:27:55 fragments have to be static because they have to be recreatable by the system, without a reference to the enclosing activity Aug 20 00:28:09 however a static class is a very different thing than a static instance Aug 20 00:28:12 my fragments arent static Aug 20 00:28:36 desmin88 are they inner classes of an activity? Aug 20 00:28:54 no Aug 20 00:28:57 what madman would do that Aug 20 00:28:59 ;) Aug 20 00:29:05 ThomQ using the onMapReady paradigm, none of your activity methods should need to become static Aug 20 00:29:48 event bus Aug 20 00:31:55 yeah come on guys, use public transportation Aug 20 00:32:03 My fragments were static vars, because I can't access any methods in my main activity from the custom fragment activities otherwise Aug 20 00:32:38 holy shit Aug 20 00:32:50 this is 10000x faster than doing the jsonobject crap Aug 20 00:33:00 what? i didn't follow that. can you gist anything? Aug 20 00:33:19 frankdrey what is? Aug 20 00:33:31 ThomQ https://gist.github.com/tophyr/4237c58e55674b5938df Aug 20 00:34:02 ew Aug 20 00:34:40 sarbs, using a jsonfactory on the cloud endpoints objects rather than manually put'ing each field to a jsonobject :P Aug 20 00:34:56 oh, i think i just got what you meant. you have multiple activities, and you're using static variables/methods to implement communication between those activities? *huge* no-no. Aug 20 00:35:06 sarbs: I can't use a mapactivity for a map fragment, but thanks Aug 20 00:35:35 sarbs: how should I do it then? Aug 20 00:35:38 eh, my names were the first thing that came to my head, have nothing to do with GMS's actual MapActivity/MapFragment Aug 20 00:36:01 lol sarbs Aug 20 00:36:15 * sarbs super creative Aug 20 00:36:23 if i'm in a MapFragment class, and I want to use a method in the UI thread, I shoulnd't be accessing it by using Main.ThatMethod(); ? Aug 20 00:36:53 no Aug 20 00:37:19 mm.. i dont' think you fully understand what the ui thread is Aug 20 00:37:57 well probably not Aug 20 00:38:10 Why shouldn't I do it that way, and how should I do it? Aug 20 00:38:43 i guess, my first question is: what are you trying to accomplish? in general, one activity shouldn't really need to run another activity's methods Aug 20 00:38:45 paste us some of your code Aug 20 00:39:59 ow man, the code is way too much to paste at this point. Basicly what I do is I have the UI thread attaching the mapfragment, and attaching other fragments at other times, using the activity class as a 'hub' to connect the fragments. Aug 20 00:40:18 ok, well let's clear up "UI thread" first Aug 20 00:40:43 a thread is simply a set of statements that get executed serially Aug 20 00:40:54 it has no concept of class, object, etc Aug 20 00:41:50 you can think of threads as workers. a worker can do only one thing at a time. you can have multiple workers, and then can tell each other to do things Aug 20 00:42:18 however threads don't attach to classes, or have their own variables, or anything Aug 20 00:43:16 what i think you mean by "UI thread" is a central activity. yes? Aug 20 00:43:57 Yes, basicly the bank that handles the different references to most objects, and handles the interactivity between them Aug 20 00:44:19 although, thats a part of that activity, it also handles the actionbar, listeners, etc Aug 20 00:44:25 ok. that's most often called a "controller" concept Aug 20 00:44:52 https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Aug 20 00:45:22 as opposed to https://en.wikipedia.org/wiki/Thread_(computing) Aug 20 00:47:05 now, with your controller, static variables aren't the worst thing in the world you could do, but there are definitely better ways of doing things. ignoring that for now, however, so we can understand what you're after.. the controller needs to give the MapFragment its GoogleMap object? where does the GoogleMap come from? Aug 20 00:47:56 from the MapFragment class I use to create / attach the fragment with Aug 20 00:48:32 so, basicly, I should use another class as Controller, not the activity Aug 20 00:48:34 ? Aug 20 00:49:05 ehh.. maybe, but i'm not 100% clear on what you're doing Aug 20 00:49:19 hehehe, sjit :D Aug 20 00:49:27 it's pretty common to have a parent activity with lots of child fragments. is that all you're doing? or do you have multiple *activities* involved here? Aug 20 00:49:37 no just 1 activty Aug 20 00:50:17 ok. you shouldn't need static methods at all, then. all of your fragments in your activity already have links to the activity, and your activity already has methods to access all of your fragments Aug 20 00:50:42 so lets say i start the activity by attaching fragment A. Then later on I attach fragment B. both fragment's classes need to talk to each other and to the some methods in the activity Aug 20 00:51:10 ok. now we're getting somewhere Aug 20 00:51:27 event bus Aug 20 00:51:40 lulz desmin88 ;) event bus is one option Aug 20 00:51:40 yeah. eventbus or similar implemented in the activity Aug 20 00:51:48 a and b need to ask the activity to communicate between them Aug 20 00:52:15 alright. so i have a listview with a very long header. I want to trigger an event for when they scroll past the header and are on the list itself Aug 20 00:52:18 the way i've done this previously is to have each fragment talk back and forth to the activity, and it tells the other fragments relevant things Aug 20 00:52:26 well yeah, from my activity to my fragments is no problem. The problem lies in the fragments talking to the activity. As it is now, everything I try to use from the main class in the fragments have to be static. Aug 20 00:52:51 ThomQ hold on, i may actually have some code that you can see that may solve this for you Aug 20 00:52:56 doing any of the get*VisibilePosition() is useless because if the listview is empty, they will always return 0, even at the top Aug 20 00:53:05 getScrollY() constantly returns 0 Aug 20 00:53:19 what i've done in my projects is require that each Fragment define an interface that its parent must implement Aug 20 00:53:47 hmm, no, i don't have any open-source code i can share. lemme whip up an example. Aug 20 00:53:56 but, the fragments themselves are not static, but still my IDE says I can't acces any non static variables or methods Aug 20 00:54:18 ThomQ how experienced are you with java in general Aug 20 00:54:55 this is my first project in java Aug 20 00:55:02 ok Aug 20 00:55:34 ThomQ: you can get your activity from the fragment & cast it and then call methods on your instance. No need to do statics. Aug 20 00:55:58 MyActivity activity = (MyActivity) getActivity(); activity.some_pub_function(); Aug 20 00:56:19 Ahh k. But how though? I've been using Main.RunThatMethod(); Aug 20 00:57:18 https://gist.github.com/tophyr/ed0ec9ff0fc5bb246670 Aug 20 00:57:54 https://developer.android.com/reference/android/support/v4/app/Fragment.html#getActivity() Aug 20 00:57:58 that looks ugly Aug 20 00:58:09 just use an event bus Aug 20 00:58:21 desmin88 it's a helluva lot nicer with some intermediate fragments that wrap all the functionality and enforce the interfaces Aug 20 00:59:03 it's similar to iOS's delegate paradigm. the child doesn't care what actual type its parent is, as long as its parent conforms to the interface the child exposes Aug 20 00:59:23 so Aug 20 00:59:25 an interface Aug 20 00:59:42 Ahh k thanks sarbs, I think I kinda get the concept what you're trying to show me. By implementing FooFragment class in the activity, I can override all the methods that are in the FooFragment's class Aug 20 00:59:57 ThomQ not FooFragment's class, IFooFragment *interface* Aug 20 01:00:35 FooFragment doesn't care that it's attached to a MainActivity, or a FooActivity, or a MapActivity, or anything. as long as whatever its parent is, is also an IFooFragment, FooFragment is happy Aug 20 01:00:53 thats how interfaces work Aug 20 01:01:21 if you're only ever going to use your FooFragment with MainActivity, you can skip the interface stuff and just cast the return value of getActivity() to MainActivity or whatever Aug 20 01:01:30 but using the interfaces makes your code a lot more reusable and modular Aug 20 01:01:50 I think I might do something ugly Aug 20 01:01:53 or use an event bus Aug 20 01:02:01 :D desmin Aug 20 01:02:08 lol Aug 20 01:02:17 header view height + status bar + action bar height Aug 20 01:02:24 check getY of header view Aug 20 01:02:30 Thanks. I'm gonna fiddle around a bit, read up a bit. I'll let yall know the results :P Aug 20 01:02:31 wait, no that won't work :P Aug 20 01:05:20 https://today.java.net/article/2009/11/04/using-service-delegate-avoid-mvc-controller-bloat (not android, but concepts of delegation apply) and https://stackoverflow.com/questions/14742501/when-to-use-an-event-bus Aug 20 01:05:26 ^ ThomQ Aug 20 01:05:38 frankdrey: You want to figure out if they scroll past the headerview to start loading in list items? Aug 20 01:07:39 desmin88, i have a persistent view at the bottom that should only be there when the actual list is visible Aug 20 01:08:09 frankdrey: in what cases is the listview empty? Aug 20 01:08:32 desmin88, the default case :P it's a "chat" Aug 20 01:08:38 ahh Aug 20 01:08:41 the view that appears is the message box Aug 20 01:09:02 ok how about overriding getView Aug 20 01:09:29 have the box be part of the adapter? Aug 20 01:09:49 well i want it to be a persistent box on *top* of the list Aug 20 01:10:02 you want to know when the user scrolls past the large header view Aug 20 01:10:06 and can see the listview contents Aug 20 01:10:06 yes? Aug 20 01:10:10 yup Aug 20 01:10:23 or if there are none, at least when it's at the bottom of the headerview Aug 20 01:10:42 if getScrollY worked, I could check when scrollY > headerHeight Aug 20 01:11:07 what about just adding a footerview Aug 20 01:12:13 wow sharp manages to come up with a unique looking smartphone ... http://www.engadget.com/2014/08/19/sharps-aquos-crystal-is-all-screen/ Aug 20 01:12:15 header & footer views aren't on top of the list Aug 20 01:12:30 they're basically an extra view at the top and the bottom of the list, and scroll with it Aug 20 01:13:15 hmm, i guess i could settle for it always being visible :/ Aug 20 01:14:19 Sarbs: Thanks, got the interface up and running, it works perfectly Aug 20 01:14:29 awesome, Learned something big today :D Aug 20 01:14:38 cool, good :) Aug 20 01:15:34 the event bus is another good option but it's not one i often go for; event buses (in my experience) tend to grow and become hard to manage as everything is very flat Aug 20 01:15:55 i have the opposite experience Aug 20 01:16:09 Last thing though, I don't completely understand this line ((IFooFragment)getActivity()).onMapReady(myMap); Why does it need to use getActivity? Aug 20 01:16:13 interfaces liek you just did are applicable to way more than just activities/fragments.. anytime you have two conceptually separate things that need to talk to each other in specific ways, an interface can often make it easier Aug 20 01:16:33 ThomQ getActivity() doesn't always return the same object Aug 20 01:16:46 yeah exactly. I've never used interfaces before, but now i'll prob use them Alot. Aug 20 01:17:13 if your parent activity gets killed by the system, it will later get recreated and the fragment you have will be attached to the new one. you use getActivity() because it will give you what the current activity is Aug 20 01:17:35 if you kept around a variable storing a reference to an activity, it might not be the right one anymore - then, crash Aug 20 01:17:45 Ahhh k. Yeah no exaclty, i get it Aug 20 01:19:17 desmin88 you're probably more disciplined with your EB use than i am, then :) i'll use them occasionally, LocalBroadcastManager, real Broadcasts etc, but i try to avoid them if i know there'll always be a direct chain of links to where the msg needs to go Aug 20 01:19:39 That's more for communication between activities, right? Aug 20 01:19:40 frankdrey: See how http://developer.android.com/reference/android/widget/AdapterView.html#getFirstVisiblePosition() works with empty lists Aug 20 01:19:41 What's with google constantly changing the Analytics sdk and all the class names... my god Aug 20 01:20:23 Winslow: I agree, I liked that last SDK better then the new one Aug 20 01:20:41 desmin88, it's always 0 Aug 20 01:21:39 ThomQ broadcasts can be used for any manner of communication, but yeah that'd be an appropriate way to comm between activities Aug 20 01:21:48 since activities don't have parents that can orchestrate communication for them Aug 20 01:21:58 application class Aug 20 01:22:04 but thats gross Aug 20 01:22:12 +1 desmin88 Aug 20 01:22:33 sarbs: Very last thing. I did use a static reference to the activity, which I set in OnCreate. So, I should either go throught the code and use getActivy rather then a using that var, or fill that var in OnStart, in case the activity gets destroyed, correct? Aug 20 01:22:41 i should have said, don't have parents Aug 20 01:22:57 definitely use getActivity instead of keeping a reference to the activity Aug 20 01:23:14 keeping a reference to an activity is almost always unnecessary Aug 20 01:23:21 and in many cases an outright bad idea Aug 20 01:23:33 Cool, i'll do that right now Aug 20 01:23:44 Does C# use interfaces as well btw? Probably, I guess Aug 20 01:24:11 frankdrey: Override getView() Aug 20 01:24:13 when that gets called Aug 20 01:24:14 I remember getting flak early this summer for doing the same thing in C#, setting everything to static, just for the communication :D Aug 20 01:24:16 yeah, c# has interfaces as well Aug 20 01:24:25 youll know the listview is attempted to draw up a view for position 0 Aug 20 01:24:38 ThomQ: any idea what the Application class is that google analytics now refers too? Aug 20 01:24:39 is attempting* Aug 20 01:24:45 :o Aug 20 01:24:56 since its empty youll have no view to give it Aug 20 01:25:00 but youll know it just tried Aug 20 01:25:05 What is a typical use case for scalaz.\&/ ? Aug 20 01:25:06 desmin88, but if getCount is empty, will it try? Aug 20 01:25:34 gonna find that out right now Aug 20 01:25:35 hold on Aug 20 01:25:46 i'd race, but you'd probably beat me :P Aug 20 01:25:52 sorry, wrong channel Aug 20 01:27:31 desmin88, the answer is no Aug 20 01:27:34 yeah Aug 20 01:27:42 wait... Aug 20 01:27:48 im looking atm Aug 20 01:28:01 oh right Aug 20 01:28:15 you know Aug 20 01:28:40 i could have an "empty" view Aug 20 01:28:42 in the adapter Aug 20 01:28:57 that way, there will always be something Aug 20 01:29:26 on that note, there's still the problem of getFirstVisiblePosition() giving 0 :P Aug 20 01:29:38 If only it gave -1 when nothing was visible Aug 20 01:31:40 or Aug 20 01:31:46 set an empty view on the listview Aug 20 01:31:50 and check if its visible? Aug 20 01:31:51 idk Aug 20 01:31:52 blegh Aug 20 01:31:56 is there a GetActivity equivalent for non fragment classes? Aug 20 01:32:15 I seem to have found the reason i was using a static var for it in the first place :D Aug 20 01:33:27 or should I just send the context to the constructor of said classes? Aug 20 01:33:40 no Aug 20 01:33:58 when you say non fragment classes Aug 20 01:34:01 do you mean activities Aug 20 01:34:02 or what Aug 20 01:34:15 no not in activities either Aug 20 01:34:28 In customArrayAdapters for example Aug 20 01:34:33 oh Aug 20 01:34:34 then Aug 20 01:34:36 yes Aug 20 01:34:40 or totally custom classes Aug 20 01:34:44 ow, lol Aug 20 01:34:44 :D Aug 20 01:34:56 totally custom classes is different Aug 20 01:35:22 Yeah, I should prob make those child classes to the activity to begin with, right? Aug 20 01:35:31 depends Aug 20 01:35:35 what do these classes do Aug 20 01:37:32 ok, the classes where I'd need a ref to the activity are: an AsyncTask, arrayadapters, and a tut child class, but I'll prob can just use this there Aug 20 01:37:42 yeah this works in the child class Aug 20 01:37:46 sounds good Aug 20 01:39:30 I always feel so bad when I made a Total mess of a project :D Not that it's like Undecypharable bad, riddles with bugs. It preforms quite well actually, hell, it's even already available. It's more my own OCD and sense of perfectionism Aug 20 01:39:50 whats the app? Aug 20 01:40:31 https://play.google.com/store/apps/details?id=com.qstudios.whatsopennow Aug 20 01:40:50 we launched it a week or so, very low key, just to get a couple of users in to test it Aug 20 01:41:10 so the 10-50 installs is intentional, don't laugh :D Aug 20 01:41:15 thats actually neat Aug 20 01:41:42 thanks! Aug 20 01:41:54 yeah, that actually looks really good Aug 20 01:42:32 installing :P Aug 20 01:42:45 thanks man. I've worked hard on it. Aug 20 01:43:02 *opening CrashLytics* heheh Aug 20 01:43:40 xD Aug 20 01:44:20 what does switching the color do? Aug 20 01:44:32 gives you a different set of categories Aug 20 01:44:38 day / nighttime Aug 20 01:44:40 aha Aug 20 01:44:54 the custom child class i was talking about earlier is a tutorial :D Aug 20 01:46:01 desmin88, i can't even get the view at the bottom to stay on persistently xD Aug 20 01:46:32 hold the radar icon to drag it around, and then you can search from that new position. That's somehting a lot of people didn't notice as well Aug 20 01:46:32 higher up in RelativeLayout = lower z-order right? Aug 20 01:47:14 ooh Aug 20 01:47:27 i suggest maybe some sort of gesture for that or something Aug 20 01:47:52 because it's a little difficult to drag it somewhere all the way from your house...but that said...if you're going far way, it'll be a different time :P Aug 20 01:48:03 so it's probably outside the scope of the app Aug 20 01:49:12 yeah shitty googlemaps api. Push and hold appears to be the only way to acclompish that. And true, there is travel time :D Once we got a nice amount of users and an accurate read on how many requests we are using a day, we'd like to implement a text search feature as well, either for a business or adress or city, etc Aug 20 01:50:11 I’m trying to get the key hash using getPackageManager() inside an onCreate() using a try/catch block. It’s always catching with a $NameNotFound$ exception. Anyone have similar issues? (this is for interfacing with the facebook API by the way). Aug 20 01:51:33 I wonder if the Places Autocomplete API requires a map Aug 20 01:51:41 I use the autocomplete but have no map Aug 20 01:51:51 yeah it doesn't have to go together Aug 20 01:52:02 i mean, i don't have a map anywhere :p Aug 20 01:53:02 anyway, i give up on programming for today :P Aug 20 01:53:06 brb on my phone Aug 20 01:54:51 frankdrey: most if not all bar-finder like apps work without a map, they just show the searched for places in text lists, not to mention that they only cater to 1 type of place. But yeah Google Places is seperate from GoogleMaps. When you do use a map to show a Place Search result, you do have to do it on a google map though, according to the Terms. Aug 20 01:55:04 Aha ok Aug 20 01:56:11 I'm done for today too. it's already 04:00 am here Aug 20 01:56:18 Thanks for the help guys, much appreciated! Aug 20 01:56:30 Oh dang :p Aug 20 01:56:34 Only 7 pm here Aug 20 01:56:55 I enjoy the night hours to code, no-one bothering me :D Aug 20 01:57:22 Cya guys, I'll be back with some more n00b questions in the future Aug 20 02:03:08 Okay. I'm really really stuck and I've come to IRC as a last cause. Is there ANY way for an Android Wear device to be able to interact with the network (http?). Or any way I can setup a listener device on an android phone in order to execute the http calls from the android wear and dump it back? Aug 20 02:05:35 http://developer.android.com/training/wearables/data-layer/messages.html Aug 20 02:05:46 You could probably do it through that Aug 20 02:07:06 I'm pretty sure that Android Wear devices at the moment only have a bluetooth connection to a phone... so unless the phone is going to route HTTP over that connection, it ain't gonna happen directly Aug 20 02:07:30 Yes, I've gone through that. But my problem is that I need to somehow make is a background listener on the phone so you don't have to open the app each time you want your android wear to make an http call Aug 20 02:07:52 services take care of that Aug 20 02:07:58 Yeah, I'm trying to work my way around that unfortunatley :(. sucks how google glass can access gps and network, but not android wear Aug 20 02:08:38 because, well, Glass *has* GPS and wifi. all present Wear devices... don't Aug 20 02:08:57 Using WearableListenerService? Would that somehow work between all of this? Aug 20 02:09:11 (on the mobile of course) Aug 20 02:10:08 none of the wear bits that I recall required Activity... Aug 20 02:19:22 So I just got around to upgrading Android Studio to 0.8.6, and it tried to do a gradle sync, but it failed with this message: Error:org.gradle.tooling.model.GradleProject.getBuildDirectory()Ljava/io/File; Aug 20 02:19:25 Any ideas? Aug 20 02:24:18 i want to evaulate a user-inputted equation, like "((3 + 4) * 7)" that uses basic arithmetic operators. what would be the easiest way of doing this? Aug 20 02:25:28 parse it into an expression tree Aug 20 02:25:34 i used to use this as an interview question Aug 20 02:25:57 i'm sure there's some library that will do it for you Aug 20 02:26:10 but it's not that hard to do yourself and i'd encourage you to try it sometime Aug 20 02:26:21 Interview question?D: Aug 20 02:26:28 Fuck, I'd fail that interview Aug 20 02:26:32 actually a neat way to do it all in java Aug 20 02:26:48 instantiate a javascript engine Aug 20 02:26:49 and eval Aug 20 02:27:03 i don't know if i'd call that neat Aug 20 02:27:22 :( Aug 20 02:27:26 if you pull shit like that on an interview you're in for some pain when i ask follow-up questions Aug 20 02:27:38 lol Aug 20 02:27:39 but it's worth mentioning at the very least Aug 20 02:28:38 frankdrey: the question starts without parenthesis and without order of operations Aug 20 02:29:26 given "1 + 2 - 3 + 4 - 5 + 6" produce the value of 5 Aug 20 02:29:46 Aha Aug 20 02:29:59 don't support negatives, force there to always be spaces separating numbers and operators Aug 20 02:30:03 start simple, then add complexity Aug 20 02:30:08 Well, I mean, I now see clearly how once you mentioned a tree.. Aug 20 02:30:22 But if I saw that, I'd just think "oh crap" :P Aug 20 02:30:29 you can also use two stacks Aug 20 02:30:37 one for numbers, one for operators Aug 20 02:32:17 Hmm Aug 20 02:35:28 I'll try doing this in a few minutes Aug 20 02:49:43 You could create Value objects that could actually be an expression Aug 20 02:49:57 Or an actual value if they've been resolved Aug 20 02:50:35 I wrote a blog post that contains a script for connecting ADB over Wi-Fi for multiple devices. Am I allowed to post the link here? Aug 20 02:50:44 And the expressions could contain more Values Aug 20 02:51:25 I_Artist: absolutely Aug 20 02:52:01 Thanks Leeds, didn't want to break any rules Aug 20 02:52:08 http://androiddevcorner.blogspot.ca/2014/08/automating-adb-over-wi-fi-for-multiple.html Aug 20 02:52:46 And I really have to fix my default nick! :-D Aug 20 02:54:14 Ha, I think I know how this can be done Aug 20 02:54:16 I_Artist: I wonder how many devices you could connect to during an I/O event with that script Aug 20 02:55:36 they'd all have to do the key approval now, wouldn't they? Aug 20 02:55:50 Great question jabza :) Aug 20 02:56:23 Leeds, yeah, but it's still funny to think about it ;) Aug 20 02:56:28 Leeds: yeah, they'd have to approve your PC's fingerprint, assuming they're on up-to-date builds Aug 20 02:56:38 Which I would hope they would be at a developer conference Aug 20 02:57:01 indeed... but flashing up the approval dialog on hundreds of devices would still be pretty amusing :) Aug 20 02:57:29 Wait, I/O is a developer conference?? I thought it was just for bloggers and leaches! Aug 20 02:57:41 Haha it would hopefully give those people a reminder to keep their security in mind at conferences! Aug 20 02:58:08 Wouldn't they all have to be plugged into your computer? Aug 20 02:58:16 Yeah most people think that. Even more people tend to think it's an enthusiast conference. Those people who pay all that money to get a ticket are going to be pretty disappointed Aug 20 02:58:31 frankdroid: nah, you can use ADB over WiFi. I do it all the time on my home network Aug 20 02:58:55 FrankDroid, yes. You have to be plugged in with USB first Aug 20 02:59:00 I mean to set it up Aug 20 02:59:39 Do you? It comes built into CM, and I'm pretty sure you can verify the fingerprint over wifi Aug 20 02:59:58 CM, but not AOSP **** ENDING LOGGING AT Wed Aug 20 02:59:59 2014