**** BEGIN LOGGING AT Tue Sep 23 03:00:00 2014 Sep 23 03:09:12 Don't you think mine makes more sense than the compiler's bros? Sep 23 03:09:14 ;D Sep 23 03:10:29 Oh, you may notice that the instruction 00197aa8 strb r4, [r0, r1] appears multiple times. Sep 23 03:10:47 hit enter a few more times Sep 23 03:11:27 The compiler made it a single instance as an optimization method since it ran out of instance variables. Sep 23 03:11:48 Or rather registers. Sep 23 03:15:13 FennyFatal: I told you I want it write? Sep 23 03:15:17 the psuedo code Sep 23 03:16:18 bros, eh? Sep 23 03:23:45 has google released any more information about L to help prepare / design ... i remember during I/O some information, but since then - unless i missed something - its been pretty quiet Sep 23 03:28:59 "bland pastels ... use them" Sep 23 03:30:25 L was a lot more saturated Sep 23 03:31:55 capella how does e10 impact fennec ? Sep 23 03:34:11 Saw something about that and completely forgot .... lemme quick-dig around Sep 23 03:34:23 ah, only if its easy Sep 23 03:34:41 this is interesting if true http://www.reddit.com/r/androiddev/comments/2h5lt6/disagree_with_googles_new_publiclyavailable/ckpydyb Sep 23 03:34:53 "I'm not sure why they each choose the model they did, Apple's model seems to be the better overall to me though..." Sep 23 03:34:59 * g00s want to know why too Sep 23 03:36:02 bros, the pseudocode that was generated was not using the IT EQ instrucrion right. Sep 23 03:38:58 Will the system call newInstance() if I have the default constructor made private in fragments? Sep 23 03:40:50 napster don't do that Sep 23 03:41:07 :) Is it not a good design? Sep 23 03:41:30 napster: according to java language spec, you can't make an override less public Sep 23 03:42:20 the system initialises my fragment without params, and which is not desired in my case. Sep 23 03:44:14 napster the system may swap in/out your fragment, so it needs a way to re-construct it and you should attend to lifecycle events in case there is a state persistence Sep 23 03:44:39 g00s: not sure where I lost mention of e10s / Fennec status ... e10s in general is very very rough, we're dogfooding on nightly behind a pref, and working through obvious fails Sep 23 03:44:59 capella ok cool, thanks Sep 23 03:47:12 shipit, g00s I tried an alternative pattern such as in here : http://paste.ubuntu.com/8408008/ Sep 23 03:47:57 napster that's not the way, those arguments should be passed in as a Bundle Sep 23 03:48:44 shipit Agreed, but what to do when the system initialises them without params or bundle? Sep 23 03:49:32 * napster is confused a bit around this fragment initialisation thing. O_O Sep 23 03:49:38 napster you should follow the newInstance() pattern - http://www.androiddesignpatterns.com/2012/05/using-newinstance-to-instantiate.html Sep 23 03:50:09 when there is a Fragment.setArguments(), the FragmentManager will construct and restore the fragment properly Sep 23 03:50:12 straight from the fragment usage guide :) Sep 23 03:50:29 ok Sep 23 03:51:02 thanks for the pointers. shipit & g00s :) Sep 23 03:51:53 napster basically, first it figures out class dependencies, then it seeds it with instance data, and then it tells where in lifecycle it is Sep 23 03:52:07 I hate my explanation Sep 23 03:52:15 :) Sep 23 03:52:17 ok Sep 23 03:52:53 we need something better than this Activity/Fragment nonsense Sep 23 03:54:36 thats right ^^ :) Sep 23 03:59:23 we need something better than this java framework :D Sep 23 04:00:09 .NET ! Sep 23 04:00:10 at the minimum Java 8 - all this boilerplate! Sep 23 04:01:05 i wonder - if you have lots of boilerplate, maybe the language is just wrong Sep 23 04:01:26 kinda like when Peter Norvig said something like, if you are using lotsof patterns, maybe the language is wrong :) Sep 23 04:01:40 (or poor choice of language) Sep 23 04:01:57 patterns != boilerplate Sep 23 04:02:38 Objective-C is good :) Sep 23 04:02:47 yeah, but they are probably both the result of missing language features(patterns) or missing framework features (boilerplate) Sep 23 04:02:56 napster obj-c has it's own mess Sep 23 04:03:43 to clarify, both come from missing features at some level of abstraction Sep 23 04:04:20 I'm liking rx-java a lot for the same reason Sep 23 04:04:34 so boilerplate is PlatformSmell Sep 23 04:04:51 and retrofit did a kick ass job of eliminating boilerplate Sep 23 04:04:55 people try to solve that with dingleberries, but those smell too Sep 23 04:07:09 did someone say R-E-T-R-O-F-I-T?!? (>'-')> <('-'<) ^(' - ')^ <('-'<) (>'-')> Sep 23 04:07:40 dude! Retrofit is da shit!! Sep 23 04:07:53 i told some guy that i'd ship 2.0 by the new year Sep 23 04:08:24 made w love and retrofit - https://play.google.com/store/apps/details?id=com.shipit.nextgig Sep 23 04:08:39 and rx-java, picasso, ok-http : Sep 23 04:08:40 :) Sep 23 04:08:41 * DallasG looks around Sep 23 04:09:04 I'm excited for 2.0 Sep 23 04:10:16 i'm exceited for rxjava 1.0 :) Sep 23 04:10:45 shipit put in the description "made with love" Sep 23 04:10:46 1.0 is really just the finalization, right? Are there major API changes coming? Sep 23 04:11:02 g00s hehe that's a nice idea! :) Sep 23 04:11:13 bloody hope not, every time i use rx it changes Sep 23 04:11:19 no, there aren't Sep 23 04:11:38 DallasG i'm not following the dev of rx too closely, i think they may just have to finish some backpressure related items Sep 23 04:11:46 1.0 is mostly just a psychological release and commitment to the API Sep 23 04:11:51 m'yeah Sep 23 04:12:12 maybe I'm thinking about it wrong — but the whole subscribe+subscribeOn confuse me a lot Sep 23 04:13:15 I get caught on that quite a bit — I just have to remember to reverse what I think it should be Sep 23 04:13:39 yep. same. Sep 23 04:13:40 I'm working on a contract for an ad-network, I'm wondering if I should make Retrofit a requirement :/ Sep 23 04:13:46 the perspective is almost wrong Sep 23 04:13:58 you have to think about it from the Observable not the thing subscribing Sep 23 04:14:19 I don't want to enforce it as part of their SDK on their customers Sep 23 04:14:33 although - my life will be exponentially easier if I did Sep 23 04:15:46 JakeWharton I haven't been able to remove cascading callbacks using rx Sep 23 04:15:49 You could certainly do it — but if you do make sure everything is re-namespaced Sep 23 04:16:04 flatMap! Sep 23 04:16:19 I wanted to mix two sources of data - remote & local to filter final result Sep 23 04:17:11 I approached it with two Observables, remote and local, with local applying .filter() at some stage -- couldn't figure out that one Sep 23 04:17:45 there's a bunch of combining aproaches Sep 23 04:17:55 zip, combine latest, flat map Sep 23 04:18:19 https://github.com/ReactiveX/RxJava/wiki/Combining-Observables Sep 23 04:18:20 yes Sep 23 04:19:10 hmmm, I'll take another stab end/week - thx! Sep 23 04:28:27 Starting a Bluetooth scan completely borks Wifi on at least one of our test devices. Sep 23 04:28:37 What in the world am I supposed to do about this? Sep 23 04:29:07 drewbug hm, interesting. at the physical layer there is some frequence overlap Sep 23 04:29:25 i wonder if the wifi radio is getting hosed by the channel hopping of the BT radio Sep 23 04:29:34 no idea :| Sep 23 04:30:09 Gahh. This is really bad. Sep 23 04:30:32 BLE channels 37, 38, 39 are placed to avoid wifi interference though Sep 23 04:30:52 Android doesn't give you any control over that, though. Sep 23 04:30:57 which are the channels for connection broadcasting Sep 23 04:31:04 no, thats BLE spec Sep 23 04:31:07 It happens even if I hide in a room away from all Bluetooth devices Sep 23 04:32:21 drewbug but what happens to wifi? does the connection drop ? Sep 23 04:32:30 i don't have any problems on my n7 Sep 23 04:32:53 If I wasn't connected before, I can't connect to any networks Sep 23 04:33:08 If I was connected, I get a bunch of "no route to host" errors. Sep 23 04:34:07 drewbug which test device ? Sep 23 04:35:04 A Moto X Sep 23 04:35:08 We're going to test on a Nexus 7 soon. Sep 23 04:35:52 let me know if you see that on a n7, if so i'm going to have to try to reproduce it Sep 23 04:36:09 Will do. Sep 23 04:38:31 bros: Sep 23 04:38:32 https://ideone.com/qhjlXk Sep 23 04:38:39 soon I have a project w BLE, should not have said yes, should not have said yes Sep 23 04:38:40 All cleaned up. :P Sep 23 04:41:20 So, they are being tricky... Sep 23 04:41:21 lol Sep 23 04:42:28 That should give you a string that is hexadecimal and depending on how the input string is formatted it may just put random hex characters in a string. Sep 23 04:44:59 shipit: But, think about all the time you'll waste! It'll be great! Sep 23 04:45:27 drewbug that's not the encouragement I was looking for :) Sep 23 04:45:54 shipit i would encourage you to do your BLE project on iOS :) Sep 23 04:46:37 in my infinite wisdom I challenged their entire iOS crew to a mano-a-mano BLE build-off Sep 23 04:47:05 I hear their snickers, I do Sep 23 04:51:15 shipit drewbug from this morning http://testdroid.com/testdroid/7621/app-stability-android-vs-ios-before-ios8 Sep 23 04:53:00 these are not failed tests, these are features! Sep 23 04:53:27 Fun. Sep 23 05:11:43 g00s: Can reproduce on Nexus 7 Sep 23 05:11:48 cry cry cry sad sad sad Sep 23 05:16:40 drewbug regular scan or ble scan ? Sep 23 05:17:02 BLE Sep 23 05:17:05 Only BLE. Sep 23 05:19:14 so startLeScan Sep 23 05:19:30 heh, i use the regular scan which also picks up LE, i'll have to try this Sep 23 05:19:59 Nexus 7 2012 Sep 23 05:20:02 WiFi only Sep 23 05:20:05 What about you? Sep 23 05:22:19 ny 2013 Sep 23 05:22:23 n7 Sep 23 05:22:34 Same chipset as the Moto X. Sep 23 05:22:39 The plot thickens. Sep 23 05:22:44 is it 4.3 or 4.4 ? Sep 23 05:23:23 see it would be good if we could excude devices based on chipsets :D Sep 23 05:23:47 Agreed. Sep 23 05:23:56 The Moto X is 4.4 Sep 23 05:24:01 the Nexus 7 is 4.3 Sep 23 05:24:07 the GS3 is 4.3 Sep 23 05:24:12 Only the GS3 works. Sep 23 05:25:49 Connect to Wifi, connect to adb shell via usb, type "ping google.com" Sep 23 05:26:15 Then, start a BLE scan. Sep 23 05:28:34 i'll give it a shot in the morning, time to head off to sleep Sep 23 05:28:43 Okay :/ Sep 23 05:28:46 'Night. Sep 23 05:28:51 ttyl Sep 23 05:40:23 Would people here be willing to run a quick test for me? Sep 23 05:41:05 depends Sep 23 05:41:20 I'm trying to figure out which devices break when a Bluetooth scan starts. Sep 23 05:41:25 you may have to give some details … Sep 23 05:41:58 not something you can test ? Sep 23 05:42:26 what devices are you missing ? Sep 23 05:42:31 Could you download the "nRF Master Control Panel" app Sep 23 05:42:53 Then run "adb shell ping google.com" on your device and see if starting a scan in that app breaks the pinging. Sep 23 05:43:04 I've only got three devices here, but two out of three fail. Sep 23 05:43:09 It's really disappointing. Sep 23 05:46:07 nexus 5 fine Sep 23 05:46:21 Are you connected to Wifi or cellular? Sep 23 05:46:28 though if it is feq dep. I operate mid range wifi Sep 23 05:46:35 wifi Sep 23 05:47:06 mid-range meaning 5ghz? Sep 23 05:47:22 oh dam may have changed 1 sec Sep 23 05:49:24 yeah was on 5ghz Sep 23 05:50:13 Hmm. Sep 23 05:50:25 I can't test 5Ghz. Interesting. Sep 23 05:50:27 Thank you! Sep 23 05:50:27 2437 +-45 Long Preamble to be exact Sep 23 05:51:32 not sure why I have 45mhz bands , oh wait, thats me testing something from ages ago Sep 23 05:51:40 should be 40 obviously Sep 23 05:51:52 Okay, cool. Sep 23 05:57:25 how many here have used/tried https://play.google.com/store/apps/details?id=com.reddit.iama Sep 23 05:58:27 from playstore screenshots Sep 23 05:58:36 I think this is a bulky app Sep 23 05:58:42 I've used it Sep 23 05:58:55 could have been made simpler/lighter Sep 23 05:59:04 what say you my noble sire Sep 23 06:02:23 upon initial review (on the day of launch) it didn't strike me as being the best UX Sep 23 06:02:35 things felt a bit clunky Sep 23 06:02:41 image loading was pretty poor Sep 23 06:02:53 didn't even seem to keep a cache (at least not a fast one) Sep 23 06:03:00 haven't used it much since then, though Sep 23 06:03:56 yes, finally an avenue worth exploring Sep 23 06:04:13 I saw that this app supports 4.x only Sep 23 06:04:28 pretty typical nowadays Sep 23 06:04:31 I was thinking to include 2.3.7 support as well Sep 23 06:04:37 my apps all only support 4.x Sep 23 06:04:49 yeah, only 12-ish % users are pre 4.x Sep 23 06:05:38 <5% were pre-4.0 for us when we cut support Sep 23 06:06:05 doesn't make sense for us to support those users, with their growing compatibility and performance issues Sep 23 06:06:08 FennyFatal: what's arg0? Sep 23 06:06:18 now it is https://developer.android.com/about/dashboards/index.html Sep 23 06:06:41 DallasG: but if I am making a simple lightweight app Sep 23 06:06:54 and I can support 'em then why not Sep 23 06:07:09 I generally would agree with that sentiment Sep 23 06:07:23 but in this case ? ? Sep 23 06:07:37 s/would// Sep 23 06:08:22 ok Sep 23 06:12:16 bros: it a pointer to a char[] Sep 23 06:14:32 333062312665636363636163262c623726613862393537383037353562246338 Sep 23 06:15:45 bros you still attempting to hack instagram app ? Sep 23 06:15:51 StingRay_: I did it. :P Sep 23 06:15:59 for what purpose ? Sep 23 06:17:09 as of now? proving i can calculate the hash in this tab on my browser with an hmac sha-256 calculator haha Sep 23 06:17:19 i highly doubt i could spam the app and ruin it?... Sep 23 06:17:22 Hi, I want to change the up navigation button of actionbar for API level 9+ for 11+ i used android:homeAsUpIndicator in my custom theme but its not working for version below 11 Sep 23 06:26:37 FennyFatal: I don't think it's working properly Sep 23 06:26:51 What isn't happening? Sep 23 06:27:40 You will need to snag whatever string buffer is in memory at that offset, bros. Sep 23 06:27:59 FennyFatal: I have no idea how I would. :/ Sep 23 06:28:11 I think I need to jailbreak an iOS device and hope ASLR/other obfuscation methods don't exist Sep 23 06:28:25 from the binary file it should be at... sec let me look at offsets. Sep 23 06:29:53 0x3d357b - whatever the debugger loaded the library at. Sep 23 06:30:38 could probably just jump to that in the debugger. Sep 23 06:30:46 let me see if i can load it in xcode Sep 23 06:30:48 i doubt it lol Sep 23 06:31:07 what did you use to make the dump of thumb code? Sep 23 06:33:21 http://i.snag.gy/mxjWK.jpg Sep 23 06:33:28 Hello, Sep 23 06:33:31 It has the ref there. Sep 23 06:33:31 I'm using google Location API. My application work just fine until I'm trying to get location (locationClient.getLastLocation()). Then my app crashed and this error is showen in logcat http://paste.ubuntu.com/8408588/ Sep 23 06:34:35 slani you have still not learned about errors that relate to your code Sep 23 06:34:46 init that as a cstring and pass the pointer to the string in place of 0x3d357b Sep 23 06:35:15 slani and that is a few random lines, not a full error Sep 23 06:36:33 oh also "for (; r1 != 20; r1 = r1 + 1 )" should be "for (; r1 != 0x20; r1 = r1 + 1 )" Sep 23 06:37:23 bros ^^ Sep 23 06:38:09 i got that much :P Sep 23 06:38:42 FennyFatal bros is there not a better channel to use for hacking android apps ? cause this is a bit / way off topic of this channel Sep 23 06:38:59 I hate people with that perspective. what about you FennyFatal? Sep 23 06:39:34 I am pretty sure reverse engineering is a perfectly valid form of programming/development. Sep 23 06:41:22 StingRay_: I only get this error when I call getLastLocation method. so this error must be related with my app. Sep 23 06:41:38 slani but I said that is a few random lines Sep 23 06:41:49 not a full crash/trace/exception Sep 23 06:42:29 StingRay_: I get only this line Sep 23 06:42:33 FennyFatal sure, but also pretty sure that tearing at most apps violates usage agreements Sep 23 06:42:46 and pretty sure that it's not a topic discussed in this channel Sep 23 06:42:51 "development" Sep 23 06:43:06 but yeah, not saying it's not a valid choice/path in programming Sep 23 06:43:08 I guess just so long as you don't use the app, you aren't violating any agreements. :D Sep 23 06:43:17 Problem solved. :D Sep 23 06:43:32 FennyFatal not really, read further at the Agreement Sep 23 06:43:34 :) Sep 23 06:45:05 do we have smaller screens than 320x480 Sep 23 06:45:07 If I never run the app, there is no agreement to read. Sep 23 06:45:12 There will be times when you simply don't have the source. Sep 23 06:46:06 I contend that making a better version of a product is admirable. When you turn around and sell it, that is the point you are just profiting on someone else's work. Sep 23 06:47:10 so it's fine to take someone else's work and rip it apart and distribute it ? as long as you dont charge ? Sep 23 06:47:31 It is not okay to break licensing and distribute that. Sep 23 06:47:54 I would argue that it is okay to make a compatible technology by learning from theirs though. Sep 23 06:48:06 ok so whats the reason you are hacking another app ? Sep 23 06:48:26 still not sure it belongs in this channel btw, but interested to know the true purpose Sep 23 06:48:29 I am doing it because bros asked for help with a protocol. Sep 23 06:48:43 I have no idea what it is even for. :D Sep 23 06:50:35 I learned some neat tricks today from taking apart the snippets he posted. Sep 23 06:50:44 and I like having a second set of eyes. Sep 23 06:51:18 One of them is a special sort of authenticity checking algorythm by hiding it inside of what appears to be a GUID. Sep 23 06:51:27 i had the source of some app i liked but didnt copy anything, was curious thou Sep 23 06:51:38 I don't see how that could have been effectively used. Sep 23 06:51:44 I will probably use this method at some point. Sep 23 06:51:51 How would you use it? Sep 23 06:52:02 It appears to be a GUID to the packet sniffer. Sep 23 06:52:22 I could use it to ensure that my application is the one "generating" the guid. Sep 23 06:52:31 not really? Sep 23 06:52:52 Well, no not if I am on the other side figuring it out I suppose. :P Sep 23 06:54:17 But it is a nice way to get a "random" appearing seed value, and still have it be verifiable. Sep 23 06:55:00 Without seeing the source code, maybe 1 in 100 of REAL GUIDs would pass muster. Sep 23 06:55:11 Would drive the rouge developer mad. Sep 23 06:55:35 man im getting some delays using okhttp+otto+retrofit, using 2 tabs, all the activity in one tab happens quick, but then if i switch there is a loong delay. well a delay if you switch between apps. any help about Sep 23 06:56:38 Hmm, so it loads, then you switch, and it is slow, then you switch back and it is still slow, right cliffreich? Sep 23 06:56:55 Sounds like assets are being GC'd while they are off screen. Sep 23 06:57:41 well i have actions in each tab, all the actions requiring okhttp are quick inside each tab, but if you switch, delay, then the content of the other tab is quick too Sep 23 06:58:21 Hmm, have you tried logging times for when everything is done loading in the background, cliffreich? Sep 23 06:59:25 I would kick some start and finish logs into logcat and see where the processing is really slow. Sep 23 07:00:52 not yet, but now i will Sep 23 07:16:53 what is the policy of Google/Android using their default sdk bot for application icon Sep 23 07:18:40 Looney 100's of test apps and amateur apps and malware do it :) Or I think they do Sep 23 07:18:48 why not be part of that elite list :) Sep 23 07:19:04 hehehe Sep 23 07:19:06 Looney but joking aside, wtf ? why would you want to ? Sep 23 07:19:23 I do not want to open image editor and make one :'( Sep 23 07:19:44 but given your response, I will have to tough it up Sep 23 07:19:47 good, cause that would probably be a bad choice Sep 23 07:19:57 it's not really imagery :) Sep 23 07:20:15 iconography more like Sep 23 07:20:50 yeah, more sophisticated Sep 23 07:21:29 whats the app ? Sep 23 07:29:07 when starting a new app in eclipse+adt, the wizard lets me do basic "design" of my icon - box, rounded corners, shadow... it's still the same android logo but - different :) Sep 23 07:29:10 so there is that Sep 23 07:30:08 ravilov you have a very interesting definition of the word "design" ;) Sep 23 07:30:21 I cannot see the application package icon in my eclipse project; you know what I mean? when you just create a new project and browse its folders, there's a package com.example.foo . I don't see it. how can I fix it? Sep 23 07:31:11 its a youtube blockage circumnavigation app Sep 23 07:31:21 nothing much fancy/sophisticated Sep 23 07:31:30 zipalign [-f] [-v] infile.apk outfile.apk Sep 23 07:31:36 but what alignment do i need to use? Sep 23 07:31:38 4? Sep 23 07:31:42 yes Sep 23 07:32:02 StingRay_, hey, it's deciding on visual details, so it's totally design :p Sep 23 07:32:15 ravilov if you say so lol Sep 23 07:32:17 ok. I found it Sep 23 07:32:31 Looney well thats quite nice to do a logo for, many options there Sep 23 07:32:41 it was a put off view.. from the window->show view -> java package. Sep 23 07:32:54 in eclipse that it Sep 23 07:33:17 yeah, but only if my mind was not problem solver but an artist Sep 23 07:34:00 Looney hmmm, ok want the simple process of icon design from an app dev/design pov ? Sep 23 07:34:38 Looney, just get the default youtube icon, overlay the "no entry" icon on top, then overlay the "stop" icon on top of that :p Sep 23 07:34:45 * ravilov hides Sep 23 07:35:14 great, this is solution to my problem ravilov, not an artist's work Sep 23 07:35:25 perhaps, I will ask for favour Sep 23 07:35:28 from someone Sep 23 07:35:43 like a designer Sep 23 07:35:51 hmmm if only there was one in here Sep 23 07:35:54 :p Sep 23 07:37:01 well, somewhere else Sep 23 07:37:28 * Looney *cough* will ask around for free work most of likely *cough* Sep 23 07:38:46 Looney I would go with something really simple Sep 23 07:39:17 by the way, I will also be making (read try to make) a lightweight Reddit AMA app as well Sep 23 07:39:25 obviously you have no brand to influence the design/msg so it's more just function, and the function is quite easy in your case Sep 23 07:39:39 yup Sep 23 07:40:23 well, the site is not accesible Sep 23 07:40:35 anyone can tell me about their policy Sep 23 07:40:39 of logo usage Sep 23 07:41:01 I do not want to be kicked from the store, the very moment I enter Sep 23 07:42:08 Looney you will be kicked as soon as anyone from google notices your app, period - that's guaranteed, with the premise of a "youtube blockage circumnavigation app" Sep 23 07:42:28 upload failed, but no reason why Sep 23 07:42:45 the copyright owners choose where content is blocked, so by circumventing it you are essentially pirating.. your app will be removed immediately Sep 23 07:42:49 but there are apps Sep 23 07:43:06 nope, youtube is not accessible Sep 23 07:43:08 doesn Sep 23 07:43:13 doesn't work Sep 23 07:43:19 they haven't been found yet then, is all i can say about that Sep 23 07:44:45 how about I say that my app is a YouTube client Sep 23 07:45:04 you may live longer, then :) Sep 23 07:45:07 Hello! I am changing some view elements in code but they are not changed on screen. When I press the back button however, I can see them for a split second. Sep 23 07:45:37 live longer implies that I will get kicked Sep 23 07:45:47 i think geo-based blocking is retarded as all hell and when i lived in ireland it was the bane of my existence, but, google takes copyright protection very seriously - as soon as someone figures out what your app is doing, it will be kicked, guaranteed Sep 23 07:46:22 the real question is, why is youtube itself not accessible and doesn't work Sep 23 07:46:28 ie. why is there a need for this kind of app Sep 23 07:46:31 so, basically it is not for copyright thing but more of censorship circumnavigation Sep 23 07:46:40 marrrk you may have to invalidate your views Sep 23 07:46:55 I even tried that Sep 23 07:47:05 I will try to invalidate their container Sep 23 07:47:15 Looney, well still, someone (probably bigger and stronger than you) wants this limitation (blockage/censorship/whatever) in place, so they surely won't like you or your app Sep 23 07:47:16 https://play.google.com/store/apps/details?id=com.xellentapps.videotube Sep 23 07:47:28 hmm, true Sep 23 07:47:51 Looney call it whatever you want, you're ultimately doing something with content that the copyright holder of said content has not given you permission to do; thus no matter how you spin it you'll get booted Sep 23 07:48:26 you certainly can do things that'll delay it but it will happen Sep 23 07:48:28 you can always distribute your app through shady mediafire and similar downloads :p Sep 23 07:48:29 nope, I am not helping people violate copyright Sep 23 07:48:36 hehehe Sep 23 07:48:44 marketing would be a hassle Sep 23 07:48:45 marrrk what values are you changing? Sep 23 07:49:03 marrrk paste some code Sep 23 07:49:04 visibility for two items and text for a label Sep 23 07:49:06 people use hostspot etc. for accessing YouTube all the times Sep 23 07:49:40 hmm. those items already invalidate the views on their own. is there anything funky in the hierarchy? custom layout, fragment, etc? Sep 23 07:50:24 Looney, if the app is good, word-of-mouth will do it for you ;) Sep 23 07:50:45 Looney yeah, totally.. and i frankly would use your app, because i think geo restrictions are the most retarded thing in the world, but, i would be violating copyrights in doing so Sep 23 07:50:50 sarbs: https://gist.github.com/i-am-the-slime/3cda9114771aa9048718 Sep 23 07:50:56 I think it is about the visibility Sep 23 07:51:26 funky, never actually seen scala before Sep 23 07:51:32 sarbs: I think that you are mistaking that my app allows to view only some videos Sep 23 07:51:46 it is for accessing the youtube in all Sep 23 07:51:51 Hmm maybe not Sep 23 07:52:17 marrrk unless the scala is doing something funky, that should work perfectly Sep 23 07:52:19 but why is youtube inaccessible for you? Sep 23 07:52:27 ok, gotta see what people at Vitamio have done in newer version Sep 23 07:52:31 they didn't support https Sep 23 07:53:08 Looney are you somewhere that youtube is blocked overall? Sep 23 07:53:23 mazbe Sep 23 07:53:32 maybe it is running on a non ui thread Sep 23 07:53:42 becasue that’s in the callback of some animation Sep 23 07:53:44 yup, I am Sep 23 07:53:55 but google is accessible Sep 23 07:53:57 marrrk it would (should) throw an exception when you set the visibility if that were the case Sep 23 07:54:39 yeah and it shouldn’t be there on clicking the back butotn Sep 23 07:55:20 Looney interesting... well in that case fuckit, i say go forward and disguise it. google may end up dragging its feet on the removal, or just "missing" it Sep 23 07:55:27 yeah... you might survive on the play store but have issues with the government then :p Sep 23 07:55:43 i wouldn't bet very heavily on that.. but they don't take very easily to censorship Sep 23 07:55:57 +1 ravilov, google would not be my biggest concern lol Sep 23 07:56:07 but they won't block my account sarbs Sep 23 07:56:18 mm, i don't know, tbh Sep 23 07:56:31 I can live with fact that my app is taken down Sep 23 07:56:39 i've never dealt with their disciplinary actions and i'm in absolutely zero position to give you any advice on it Sep 23 07:56:47 but I do not want to have my account take/blacklisted Sep 23 07:56:54 ok Sep 23 07:56:59 Looney ask yourself if it is worth the risk Sep 23 07:57:01 if i were worried about that, i'd just upload it with a throwaway account Sep 23 07:57:11 well no, pretty sure they won't block an account for the first offense Sep 23 07:57:38 ok Sep 23 07:57:40 there are chinese clone firms that illegally pump out reversed copies of apps all the time, they get removed and shut down regularly but they pop right back up Sep 23 07:57:44 it's like a game of whack-a-mole Sep 23 07:58:01 hehe, so they have other fishes to worry about Sep 23 07:58:12 * StingRay_ used to play whack-a-mole in arcades ! Sep 23 07:58:42 yeah, again i certainly don't want to give you dangerous advice but i can't imagine you'd register too high on their radar Sep 23 07:58:59 When I press the back button only the text in the Label is set. The visibility still doesn’t change Sep 23 07:59:29 marrrk have you tried running that code in an emulator or on a rooted device, and using hierarchyviewer to inspect the views before/after? Sep 23 07:59:38 * Looney hopes StingRay_ didn't play it with Google Sep 23 07:59:57 I’m running in it in Genymotion Sep 23 08:00:06 But my device is rooted Sep 23 08:00:17 Can’t I also just put a breakpoint? Sep 23 08:00:26 genymotion should work i think.. try starting up hierarchyviewer and inspecting the views Sep 23 08:00:29 how about you try it with officialy recommended software before complaining, marrrk? :p Sep 23 08:00:34 genymotion is not official Sep 23 08:00:41 oh yeah Sep 23 08:00:46 because all the official stuff works perfectly Sep 23 08:00:52 does for me Sep 23 08:01:09 you can, and that'd tell you if the value is set, but hierarchyviewer will tell you what the WindowManager thinks the value is Sep 23 08:02:01 ravilov: How’s the speed you’re getting out of the emulator then? Sep 23 08:02:27 blazing, most likely Sep 23 08:02:36 qemu + haxm + gpu accel = 0_0 Sep 23 08:02:54 marrrk, perfectly acceptable, not getting any lags or anything Sep 23 08:03:02 although I know you won't believe me Sep 23 08:03:08 Have you set it to emulate an x86 processor? Sep 23 08:03:14 no Sep 23 08:03:33 oh I also don't work with 4.0+ images :p Sep 23 08:03:54 marrrk that's all genymotion is doing.. their images are x86 virtualized just like haxm Sep 23 08:04:15 ravilov you must have a supercomputer then.. i got a pretty powerful dev box but the ARM emulators suck no matter what you throw at them Sep 23 08:04:15 I’m serious, I’m okay with using the official emulator if that’s a possibility. Sep 23 08:04:25 I tried it out the other day again but I must have done something wrong, then. Sep 23 08:04:40 marrrk what host OS? Sep 23 08:04:50 OS X Sep 23 08:05:53 sarbs, linux usually does that, it turns an ordinary box into a supercomputer ;) Sep 23 08:05:54 you'll be golden. go into android sdk thing, download an x86 image and the Intel HAXM kernel extension at the bottom, install the haxm stuff (have to run the installer manually, it downloads to your sdk dir in extras/intel/) and then start up an emulator using the x86 image Sep 23 08:05:55 I think ravilov just tolerates more pain in terms of what he finds an acceptable speed Sep 23 08:06:13 I think marrrk has no idea what he's talking about Sep 23 08:06:19 * ravilov does not tolerate pain too well Sep 23 08:07:00 So, sarbs I don’t see that, I only see intel x86 Atom System Image Sep 23 08:07:10 ravilov my dev box at work is a dual-xeon (12 cores) 24gb ram ubuntu 14.04 box with a 256gb SSD.. i dunno how powerful yours is, but even that thing is a dog emulating ARM Sep 23 08:07:29 Ah, found it Sep 23 08:07:31 marrrk that's the one you want.. you don't see Intel HAXM? Sep 23 08:07:35 It was well hidden Sep 23 08:07:36 ah cool Sep 23 08:07:37 sarbs, maybe your box is overpowered :p Sep 23 08:07:38 Last thing in the list Sep 23 08:08:00 No, he’s just right. Sep 23 08:08:16 gets confused about which of those cores to use... spends too much time deciding... :p Sep 23 08:09:53 it would be neat if there was some way to assign multiple host cores to emulate one guest core.. not sure how that'd really work overall, maybe each time there's a branch that needs predicting it forks and executes both, or something Sep 23 08:10:16 that'd get outta hand pretty quick, but would be neat.. aside from the constant required core-hopping or cache flushing Sep 23 08:10:45 sarbs: Do I have to create a new emulator image? Sep 23 08:11:10 marrrk_ a new emulator, yeah, but not a new emulator image Sep 23 08:11:13 the image is the base system Sep 23 08:11:22 okay Sep 23 08:11:30 create a new AVD, is the technical term Sep 23 08:11:45 ultimately that's just a set of config parameters and a /data partition Sep 23 08:11:56 i create + blow away avds all the tiem Sep 23 08:12:38 So as long as CPU/ABI is Intel Atom (x86) that should be good, right? Sep 23 08:12:49 yeah, that's the critical part Sep 23 08:12:53 Oh so I do create a new AVD then? Sep 23 08:13:14 avd yes, image no Sep 23 08:13:19 that, and when you start up the emulator, it should say something along the lines of "Intel HAXM works and running in fast virt mode" Sep 23 08:13:28 (not sure how you'd create an emulator image anyway) Sep 23 08:13:35 hey all, I am trying to publish my new app but getting this problem http://stackoverflow.com/questions/25978809/uploaded-apk-to-play-store-got-0-supported-devices-but-no-error Sep 23 08:13:40 ravilov requires building the ROM Sep 23 08:13:55 and use host gpu, right? Sep 23 08:14:02 yup, host gpu for all the sweet hotness Sep 23 08:14:23 it'll be just as fast but it'll look janky w/o gpu virtualization Sep 23 08:14:44 Will it drop frames?+ Sep 23 08:14:53 fewer than your actual device Sep 23 08:15:33 Yeah, I thought about that. I like animation and I have to be careful not to make one that only works nicely on the Emulator Sep 23 08:15:39 QEMU doesn't cpu/gpu-throttle the AVDs unless you specifically tell it to, so the run very, very smoothly Sep 23 08:15:51 yeah that's the danger. you end up writing stuff that looks like shit on a real device lol Sep 23 08:16:10 Okay, so it takes ages to start already… Sep 23 08:16:17 there are options to throttle just about every part of the system, however. cpu, gpu, network, all of it individually. Sep 23 08:16:32 * ravilov hates it when devs overdo with animations... which sadly happens more often than you'd think Sep 23 08:16:40 it's booting the system for the first time, it's probably formatting /data Sep 23 08:17:06 did it say the HAXM running bit? Sep 23 08:17:08 animations are supposed to be short, unobtrusive and meaningful, they are not meant to be a substitute for design or lack of substance... but often devs forget that Sep 23 08:17:39 no Sep 23 08:17:45 often devs forget about animation altogether Sep 23 08:17:49 specifically "fast virt mode"? there's a very significant speed difference with HAXM on and off, even if it's an x86 image Sep 23 08:17:51 and then you get apps which look like android apps Sep 23 08:18:06 what it is telling me is Unfortunately, the process android.process.acore has stopped. Sep 23 08:18:19 But it runs fine. Sep 23 08:18:25 oh how terrible... an android app that looks like an android app Sep 23 08:18:28 just horrific :p Sep 23 08:18:36 Isn’t it? Sep 23 08:18:39 no Sep 23 08:18:42 Amen ravilov Sep 23 08:18:48 I should be fair and say: Like your average android app. Sep 23 08:18:58 ravilov i think that was a sarcastic commentary on the state of typical android visual design ;) Sep 23 08:19:05 Are you killing an intent by sending a response when it is the sort that has no response to be made? Sep 23 08:19:13 I still see nothing wrong with average android apps, I would rather it have more functionality than more eyecandy Sep 23 08:19:37 FennyFatal your question doesn't make very much sense.. intents aren't things to be killed Sep 23 08:19:41 The progress bar animation is quite bad on this emulator. Maybe the gpu acceleration doesn’t work Sep 23 08:19:56 maybe the system is just that busy Sep 23 08:20:19 Oh and unfortunately of course the bug was not due to me using Genymotion. Sep 23 08:20:26 marrrk make sure you go thru https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-mac-os-x Sep 23 08:20:35 maybe you're in the wrong field, marrrk - maybe you should be doing animations for a living :p Sep 23 08:21:19 ravilov you're talkin shit but dude do you have any idea how much good UX designers make? Sep 23 08:21:35 well, I would love to be UX Sep 23 08:21:53 If you start an intent that is not an intent for result, if you try to send a result it will kill the android os intent handler, sarbs. Sep 23 08:22:02 * ravilov agrees visual design (which includes any animations) is necessary to have your app look polished and professional but is miles away from the most important thing ever when creating an app Sep 23 08:22:44 ravilov sorry but that depends, as almost all programmers do, you miss out the process of what visual design is Sep 23 08:22:46 Actually that might just be broadcast receivers. Sep 23 08:23:00 FennyFatal no. you may want to read more on what intents are and how they work, i sense some misunderstanding. when you start an *activity* using a particular intent, whether or not you use startActivityForResult, the activity you start can set a result Sep 23 08:23:32 I think that is what it was. If you mark a broadcast as handled when the broadcast can't be marked that way. Sep 23 08:23:34 StingRay_, well I mean, anything with a UI will obviously have to have *some* visual design, but that's not what I'm talking about Sep 23 08:23:37 the only difference between starting it for result and not for result, is if you startActivityForResult then onActivityResult will be called when the other activity finishes - otherwise, it won't Sep 23 08:23:51 Alright, I hadn’t installed haxm, I have to restart the my AVD now, I guess Sep 23 08:23:54 Read what I ammended even before you answered, sarbs. Sep 23 08:24:18 FennyFatal that *does* matter, yeah.. BroadcastReceivers can in certain situations mark it as handled and prevent other receivers from running, yes Sep 23 08:24:49 Oh about that onActivityResult, I tried testing that, but I couldn’t make it work. Sep 23 08:25:09 If the broadcast doesn't support being handled and you try to handle it anyway it crashes part of the OS, or it did the last time I did it. Sep 23 08:25:18 is possible to subscribe and produce in the same class using otto? im having some errors with that Sep 23 08:25:43 marrrk well either way, Genymotion or Qemu, the emulator's likely not the problem. i'd look at things in hierarchyviewer before starting to look at the platform Sep 23 08:26:03 FennyFatal mmm... it shouldn't Sep 23 08:26:09 certainly not "part of the OS", heh :) Sep 23 08:26:29 I can find the commit on dsub if you like. Sep 23 08:26:33 Hi, any idea how I can get a drawable where part of the name is a variable? Sep 23 08:26:35 sarbs: so yeah, I have a rooted phone Sep 23 08:26:42 How do I run hierarchyviewer? Sep 23 08:26:47 nvm Sep 23 08:27:17 [sarbs] ~$ hierarchyviewer Sep 23 08:27:21 ;) Sep 23 08:27:31 on the device? Sep 23 08:27:38 no, it's one of the tools in the sdk Sep 23 08:27:40 * StingRay_ decided what with all the talk of genymotion to have a look, having used it when it was androVM back before it was popular :) and it's erm… ok I guess…. easy to use adb over tcp with it ? Sep 23 08:27:47 if the sdk's not in your path you might have to go find it Sep 23 08:27:52 but it's just a tool you run Sep 23 08:28:21 oh okay Sep 23 08:28:29 Interesting that the device has to be rooted Sep 23 08:28:53 sarbs: https://github.com/FennyFatal/Subsonic/commit/9235964fe5267ccbfbf2149b902e7c619fec491b Sep 23 08:29:03 HV has to have root permissions in order to access the windows of other applications Sep 23 08:29:13 I gave up on genymotion as soon as I realized I have to have an account to use it Sep 23 08:29:19 serious security risk otherwise Sep 23 08:29:25 not to mention my AVDs work perfectly fine for me so no reason to change anyway Sep 23 08:29:32 That’s exception handling the way I like it. Sep 23 08:29:43 is it okay to have static boolean fields in the SyncAdapter class? Sep 23 08:29:59 catch (Exception ex) { /* stfu ex */ } Sep 23 08:30:02 the system broadcast service was crashing and restarting every time a broadcast was aborted. Sep 23 08:30:04 ravilov I know, I liked it back in the day when the emulator was not so great, dont see the point now, but wanted to try just to say done it :) Sep 23 08:30:16 damn right! Sep 23 08:30:40 because we use exceptions to control program flow in THIS house! Sep 23 08:31:06 razzledazzle a lot of people will tell you "static fields are the devil's work", me included, but it's not like there's a rule against them or anything Sep 23 08:31:16 they're just a "code smell".. a sign that you're doing something wrong Sep 23 08:31:26 Don’t use anything static.+ Sep 23 08:31:28 s/wrong/not in the smartest way/ Sep 23 08:31:40 And don’t put a plus sign after half your full stops. Sep 23 08:31:59 hmm.. I just wanted to check if a part of the sync has completed sarbs Sep 23 08:32:16 >_> Sep 23 08:32:23 boolean isGreater(int a, int b) { try { if (a > b) throw new Exception(); return false; } catch (Exception ex) { return true; } } Sep 23 08:32:39 * sarbs blinks Sep 23 08:32:42 haha Sep 23 08:33:04 Static makes sense in a few instances, for instance a mutex in a windows application should probably be a static part of the application class if you want to have multiple application instances but not multiple process instances. Sep 23 08:33:13 talk about flow control using exceptions, the EXTREME way Sep 23 08:33:27 razzledazzle with a static field for that usage, that means you'd only ever be able to reliably track progress on one sync in progress at a time Sep 23 08:33:30 So Sep 23 08:33:42 I see something in the hierarchy view now. Sep 23 08:33:59 Oh! I can load hierarchy and see an ugly graph. Sep 23 08:34:16 sarbs, that's true, but the sync has parts with thread of their own Sep 23 08:34:26 it is perfectly acceptable to use statics so long as you know what they actually mean and do Sep 23 08:34:34 and all the consequences thereafter Sep 23 08:34:35 and one component depends upon the other, so I wanted a boolean to query if the other component is ready Sep 23 08:34:52 aha Sep 23 08:34:58 what you want is a CountDownLatch Sep 23 08:35:01 look it up Sep 23 08:35:07 razzledazzle, statics are a horrible and unreliable way to handle thread intercommunication Sep 23 08:35:28 and then go read http://docs.oracle.com/javase/tutorial/essential/concurrency/ Sep 23 08:35:43 ah thanks sarbs Sep 23 08:35:59 ravilov, I didn't feel it to be right either, so I came here to ask Sep 23 08:36:07 good thing you did Sep 23 08:36:12 So is „mSystemUiVisibility“ the thing I need? Sep 23 08:36:13 also look into wait/notify Sep 23 08:36:38 okay ravilov Sep 23 08:36:42 Or is it enough if I can see the view in the hierarchy? Sep 23 08:36:51 for what it's worth, threading actually doesn't ahve *anything* to do with static fields.. there's no real reason you'd have needed a static field to create as buggy code as you were about to ;) Sep 23 08:37:18 marrrk so what i'd do is find the offending view in the hierarchy and then use the properties inspector to look at the values you're setting Sep 23 08:37:24 he probably just thought a static field would have been thread-safe Sep 23 08:37:27 which it wouldn't Sep 23 08:37:29 making sure that HV is reporting what you think should be set Sep 23 08:37:45 I’m not sure what setVisibility sets my best guess was mSystemUiVisibility Sep 23 08:37:51 if it is, then we're probably done with HV Sep 23 08:37:57 ummmmmmmmmmm Sep 23 08:38:00 * sarbs boots up HV Sep 23 08:38:06 * sarbs plugs in a device first Sep 23 08:38:18 Ah no found it. Sep 23 08:38:42 Well the hierarchy viewer is congruent with what I see on the screen. Sep 23 08:38:45 it sets a flag in the view Sep 23 08:39:24 getVisibility() says VISIBLE for the one that should be hidden and vice versa. Sep 23 08:40:09 bazinga Sep 23 08:40:30 Yeah, it’s this: Sep 23 08:40:40 Only the original thread that created a view hierarchy can touch its views. Sep 23 08:40:50 oh it is throwing that?? Sep 23 08:40:50 I think I had a weird filter set on logcat before. Sep 23 08:40:55 ahh Sep 23 08:41:22 So runOnUIThread? Sep 23 08:41:30 And somehow I thought it would crash. Sep 23 08:41:32 usually that crashes the app tho. maybe that's a side effect of scala, well-intentionedly swallowing the exception Sep 23 08:41:46 yeah just wrap it in runOnUiThread Sep 23 08:42:37 that seems as "well-intended" as mysql silently destroying your data Sep 23 08:42:38 lol Sep 23 08:42:52 lol Sep 23 08:43:07 pretty much. Sep 23 08:43:11 Well that crashes it. Sep 23 08:43:31 wait.. wut. runOnUiThread crashes it? Sep 23 08:43:50 Yeah, give me a second. Sep 23 08:44:15 I’m suspecting the proguard cache to do its evil doings. Sep 23 08:44:35 damnit MYSQL did that to me. :( Sep 23 08:44:53 I just switched to postgresql and I am not looking back. Sep 23 08:44:59 you sure seem to have a very strange concoction of weird components going on there, marrrk Sep 23 08:45:09 scala, proguard, genymotion... Sep 23 08:45:19 are you sure you want to do android stuff? :p Sep 23 08:45:22 Yup that was it. Sep 23 08:45:46 ravilov: I’m sure I don’t want to do Java stuff. Sep 23 08:46:06 And that to me is a much weirder component than any of the above. Sep 23 08:46:22 So you’re not using proguard? Sep 23 08:46:26 and yet it's the only one supported and recommended when it comes to android Sep 23 08:46:34 no, never had a need for proguard as of yet Sep 23 08:46:59 Interesting Sep 23 08:47:31 especially in the dev stage I see no point of using it Sep 23 08:48:02 FennyFatal: are you there? Sep 23 08:48:06 Okay! Sep 23 08:48:07 FennyFatal: I have the app open in a debugger. :p Sep 23 08:48:23 get that string, bros. Sep 23 08:48:28 FennyFatal: are you familiar with lldb or gdb? Sep 23 08:48:48 http://i.snag.gy/mxjWK.jpg Sep 23 08:48:53 It is right there! Sep 23 08:48:58 get it! Sep 23 08:49:02 that's not the one! that's the static one haha Sep 23 08:49:09 yes, it is Sep 23 08:49:16 i have that one... Sep 23 08:49:18 you pass in an empty buffer. Sep 23 08:49:23 i have that one silly Sep 23 08:49:25 for it to put a result. Sep 23 08:49:34 are you sure? Sep 23 08:49:40 yes. Sep 23 08:49:57 make a new char[] of size 33 Sep 23 08:49:59 I have the feeling I should probably separate the stuff that is run on the UI thread into a separate view class. Sep 23 08:50:13 pass the pointer into the method Sep 23 08:50:20 FennyFatal: https://ideone.com/wC9qY5 Sep 23 08:50:38 NO!!! Sep 23 08:50:39 what's interesting is the string that generates is the same string found in the python file Sep 23 08:50:41 yes! Sep 23 08:50:42 it works! Sep 23 08:50:45 better than yours! Sep 23 08:51:21 Whats going on D: Sep 23 08:51:21 goto is evil. Sep 23 08:51:30 FennyFatal: do you know gdb/lldb? Sep 23 08:51:34 what on earth are you guys working on.. i saw that earlier, buncha Cocoa disassembly Sep 23 08:52:25 Anyway: r10 = *(uint8_t *)(theString + r1); Sep 23 08:52:25 *(uint8_t *)(retval + r1) = r10; Sep 23 08:52:50 you should have two buffers. Sep 23 08:52:58 One that contains the secret string Sep 23 08:53:03 one to recieve your data Sep 23 08:53:12 FennyFatal: did you read the part where I already decoded it? Sep 23 08:53:18 into something that is just a big puzzle? Sep 23 08:53:50 perhaps not Sep 23 08:54:03 it is hex chars, right? Sep 23 08:54:59 because this should be void sub_1979a8(char *secret), really Sep 23 08:55:10 a c-string Sep 23 08:55:34 FennyFatal bros you guys are aware you can have private chat right ? :) Sep 23 08:55:38 Anyone know off the top of their head if broadcast intents are delivered on a delay? Sep 23 08:55:51 drewbug there's no intentional delay, no Sep 23 08:56:04 There is a queue, but sarbs has the right of it. Sep 23 08:56:07 sarbs: Thanks. Sep 23 08:56:08 it's not the fastest mechanism in the world on the other hand, either Sep 23 08:56:11 FennyFatal: look at line 120. Sep 23 08:56:22 That's extracted from the app. It's constant. Sep 23 08:56:24 Yes, I see, bros Sep 23 08:56:42 it should not be the argument to the function. Sep 23 08:56:50 i am freakin fascinated what are you guys doing Sep 23 08:57:28 specifically, what key from what iphone app, i guess is what i'm asking Sep 23 08:57:31 *(uint8_t *)(secret + r1) = 0x34; is overwriting the value. with the int value of a char for a number. Sep 23 08:57:56 Instagram, right? Sep 23 08:58:01 drewbug: How do you know? Sep 23 08:58:13 It was mentioned way earlier. Sep 23 08:58:15 I thought... Sep 23 08:58:29 Yeah he was pulling it apart yesterday Sep 23 08:58:34 there you go. Sep 23 08:58:36 insta Sep 23 08:58:39 FennyFatal: there you go? Sep 23 08:59:02 Sorry, that was supposed to be a search of my IRC history. Don't mind me :P Sep 23 08:59:10 Now that I have the cstring... one moment. Sep 23 08:59:21 FennyFatal: you had it all along silly :P Sep 23 08:59:32 I thought we weren't sure that it was passed in an empty buffer Sep 23 08:59:45 look at my code, lol Sep 23 08:59:49 what's there to crack in it.. do they run their api calls through an obviously pointless encryption scheme first? Sep 23 08:59:59 it is pretty obvious that there are two buffers. Sep 23 09:00:16 Someone should totally do the Megabus app for me. Sep 23 09:00:29 I spent a day on it but didn't get anywhere. Sep 23 09:02:12 FennyFatal: did you see the Python I linked? Sep 23 09:02:25 how do I print a few instructions near an address in gdb/lldb? Sep 23 09:04:13 FennyFatal: How do I calculate where the image is loaded again? Sep 23 09:04:17 are we doing app hacking here now? Sep 23 09:04:26 why is this such a sensitive subject? Sep 23 09:04:37 nope, not sensitive Sep 23 09:04:44 just seems like the wrong place for it Sep 23 09:05:05 it really is the wrong place Sep 23 09:05:07 :) Sep 23 09:05:14 or, it could be sensitive - most people here make their own apps, pretty sure they wouldn't like them pulled apart by random others Sep 23 09:06:05 especially if it's to pull out either an API key or OAuth token Sep 23 09:06:34 my interest is piqued because i like shit like that, but, it'd certainly tick me off if someone was doing it to me Sep 23 09:06:46 sooo yeah, you should probably take this elsewhere. seems like FennyFatal is the only one helping you out on this so might as well take it to PM Sep 23 09:08:21 Yeah! we don't take kindly to your type 'round 'ere! Sep 23 09:08:47 just tried ContentObserver, not the right choice, I still wonder where I should stick the sync state too, do you guys recommend a singleton for this? Sep 23 09:08:53 *to Sep 23 09:08:57 FennyFatal: anything? Sep 23 09:09:09 I am building with gcc, sec. Sep 23 09:10:42 razzledazzle http://jcip.net.s3-website-us-east-1.amazonaws.com/ and http://docs.oracle.com/javase/tutorial/essential/concurrency/ Sep 23 09:15:09 how would you check if this file is really an SQLite database? Sep 23 09:15:24 where from? Sep 23 09:15:43 ravilov, from java. Sep 23 09:16:14 hi guys Sep 23 09:16:32 superlinux-hp, hmm not sure, I know how to do it from shell :) Sep 23 09:16:47 so I have to it in shell anyway? Sep 23 09:16:52 no Sep 23 09:16:52 h4k1m, hi Sep 23 09:16:57 sarbs, okay mate, will read on more *_* Sep 23 09:16:57 how can add android drawables? adt cannot find @android:drawable/arrow_up_float Sep 23 09:17:05 it's just that *I* know how to do it that way Sep 23 09:17:08 superlinux-hp: do I need to download something? Sep 23 09:17:17 but you prefer it using the command `file`? Sep 23 09:17:19 superlinux-hp just try and open it ? Sep 23 09:17:35 I have encountered this issue with icons before (drawable not found) Sep 23 09:17:36 read the exception if there is one Sep 23 09:17:41 h4k1m, you need to be working with the appropriate API level Sep 23 09:17:57 well.. could be so.. but `file` is more accurate. isn't? Sep 23 09:18:05 no Sep 23 09:18:09 ravilov: how do I know if I'm working with the correct api? Sep 23 09:18:25 superlinux-hp, my specific case asked for a shell solution, also I'm not using 'file' ;) Sep 23 09:18:36 FennyFatal: nothing? Sep 23 09:18:58 bros, FennyFatal, you guys really need to take this elsewhere, PM is a good alternative Sep 23 09:19:05 sssshhhh Sep 23 09:19:30 chat room. people chat. others join in. conversation grows. Sep 23 09:19:38 don't be a jerk Sep 23 09:19:46 you first Sep 23 09:19:54 agreed, don't be a jerk ravilov Sep 23 09:20:00 ... Sep 23 09:20:17 you were already told this is the wrong place to have this conversation, who's being a jerk now? Sep 23 09:20:51 bros FennyFatal seriously , wrong place to talk about it, also in a 2 way conversation, there are better options for you both :) pm ;) Sep 23 09:21:03 you guys are more than welcome to join in Sep 23 09:21:04 lol Sep 23 09:21:30 so ravilov what do I need to do to have these drawable accessible inside my project? Sep 23 09:21:48 h4k1m, the API level that has them in? :) Sep 23 09:22:34 ravilov: I'm using api 19 (android 4.4.2) Sep 23 09:22:42 hmm that should have them in Sep 23 09:23:01 I've opened android sdk manager, anything I should install there? Sep 23 09:23:50 nope, as far as I can tell 'arrow_up_float' was available since very early on; I'm guessing you must be doing something wrong, you should post some code Sep 23 09:24:53 ravilov: on pastebin? Sep 23 09:24:58 sure Sep 23 09:25:29 superlinux-hp, my shell solution that was appropriate for my case was: if (sqlite3 $db '.tables' >/dev/null 2>&1); then ... ; fi Sep 23 09:26:23 ravilov: http://pastebin.com/YbnBS89R here is my button widget Sep 23 09:26:36 ravilov, would it happen that `sqlite3` command does not exist on device? Sep 23 09:26:43 bros: 30b12eccccac24b72a8b95780755bdc8 Sep 23 09:27:00 FennyFatal: you saw the python file, right? Sep 23 09:27:01 lol Sep 23 09:27:04 line 73 Sep 23 09:27:07 clear as day Sep 23 09:27:28 do you know about lldb/gdb? Sep 23 09:27:50 a bit yea, only thing I have really done with gdb was hook IDA to it. Sep 23 09:28:16 superlinux-hp, sqlite3 is indeed not guaranteed to exist on every single device out there but I found it on all devices I happened to come across; however if you're looking for a portable/safe solution then I would advise using pure java, probably just open with try/catch Sep 23 09:28:56 ravilov, ok fine. Sep 23 09:29:11 h4k1m, why does your drawabletop not have an uppercase T? Sep 23 09:29:20 FennyFatal: (lldb) target modules list Ä 0Å guid 0x00004000 foo (0x0000000000004000) Sep 23 09:29:25 i disabled ASLR Sep 23 09:29:34 memory addresses match up, but not instructions Sep 23 09:29:42 bros FennyFatal seriously is there are reason you are not using PM ? Sep 23 09:30:03 StingRay_, yes, because they are inconsiderate jerks who don't care about anyone but themselves Sep 23 09:30:09 ravilov: thanks a lot that's what was causing the issue (the msg error isnt explicit at all) Sep 23 09:30:10 you sound like my ex-girlfriend Sep 23 09:30:22 bros, your ex girlfriend was probably right and you weren't Sep 23 09:30:31 now you REALLY sound like my ex-girlfriend Sep 23 09:30:40 I'll take it as a compliment Sep 23 09:31:06 Wow... I have never gotten this much guff from people for talking about development in a development channel. Sep 23 09:31:06 good thing she's your ex, looks like that was probably the smartest thing she ever did Sep 23 09:31:17 FennyFatal, this is not development Sep 23 09:31:24 How is it not? Sep 23 09:31:27 bros honest though, multiple people have asked you to stop, most have said it doesn't fit with this channel Sep 23 09:31:34 hacking != development Sep 23 09:31:41 google the difference if you're not sure Sep 23 09:31:52 I am hacking nothing. Sep 23 09:32:09 you were still told multiple times by multiple people this does not belong here Sep 23 09:32:18 guys, please, come on. FennyFatal and I are trying to talk Sep 23 09:32:19 but you still keep pushing your selfish way Sep 23 09:32:22 By multiple people, you mean you and StingRay_. Sep 23 09:32:24 bros, shut up Sep 23 09:32:24 FennyFatal: you can hook GDB into IDA? Sep 23 09:32:31 ravilov: how old are you? Sep 23 09:32:32 it shows. Sep 23 09:32:49 Sure can: https://www.hex-rays.com/products/ida/support/idadoc/1335.shtml Sep 23 09:32:54 * ravilov summons SimonVT Sep 23 09:32:58 if he's around Sep 23 09:33:20 FennyFatal, how many more people do you need so you'd actually take this elsewhere? Sep 23 09:33:35 lol are you running to a mod? Sep 23 09:33:40 in a development channel Sep 23 09:34:15 FennyFatal: I don't know how it will work since the CPU is ARM? Sep 23 09:34:28 I did it with android. Sep 23 09:34:39 bros where you not scared of being banned yesterday ? well, you said you were Sep 23 09:34:52 with ports forwarded from adb. Sep 23 09:34:56 so can't be all that legit or can be a good fit with the channel Sep 23 09:35:36 I contend that this is development. Sep 23 09:35:49 fine, just not android and not fitting with this channel Sep 23 09:35:50 you can do that all you want, doesn't mean anyone else agrees Sep 23 09:35:52 hi, any tips on best practices for communication with an external (web)-api? Sep 23 09:35:55 either way better done in PM Sep 23 09:36:17 Oh, come on, android has an NDK. Sep 23 09:36:19 I see tutorials using HttpClient and saw one promoting OkHttp...no much more so far Sep 23 09:36:25 you can do that all you want, doesn't mean anyone else agrees Sep 23 09:36:28 You must lead a very fulfilling life. Sep 23 09:36:29 hi! I am curious, is there a limit on the maximum amount of RAM an activity can use? Sep 23 09:36:33 FennyFatal: I fired up IDA. ???s everywhere -_- Sep 23 09:36:52 You still need to load the actual binary into ida. Sep 23 09:36:56 bros, my life is perfectly fine, thank you very much, I actually have future to look forward to Sep 23 09:37:24 FennyFatal: oh? load the binary, then debug? Sep 23 09:37:30 Right Sep 23 09:37:42 FennyFatal, bros, you were told several times this is bothering people and you should take it elsewhere but you still keep pusing - how is that not selfish and jerkish? Sep 23 09:37:45 ravilov: So... you are going to kill bros, or? I don't think threatening to remove his future is productive. Sep 23 09:38:01 FennyFatal, well now you're just being an idiot Sep 23 09:38:11 No, I am being deliberately obtuse. Sep 23 09:38:14 I have nothing to do with his future and there was no threat in there Sep 23 09:38:15 ravilov: How old are you? Sep 23 09:38:20 But turnabout is fair play I suppose. Sep 23 09:38:23 Link me your Facebook. I bet you're a juggalo. Sep 23 09:39:11 FennyFatal you seem like a good guy, so please, do you really think that what you are discussing is of any benefit or interest to the channel #android-dev ? ripping/hacking instragram ? Sep 23 09:39:32 bros: Please keep it on topic Sep 23 09:39:51 I don't think that hacking instagram is a good thing, but I do believe that learning from the code is. Sep 23 09:40:00 You're two are actually clogging the channel with crap that's not helping anyone but yourselves, people come here to ask for advice or help and those questions are being spammed away by the stuff you two are discussing, so the sensible thing to do is for you two to do as you're asked and take it to PM Sep 23 09:40:16 FennyFatal so them please stop and just PM Sep 23 09:40:24 That spam is mostly an argument now. Sep 23 09:40:27 come back and share some of the interesting benefits Sep 23 09:40:29 I am going to stop arguing. Sep 23 09:40:34 FennyFatal, yes, thanks to you Sep 23 09:40:48 FennyFatal, nobody else is interested in your so-called "learning" so why force it in here? Sep 23 09:40:53 Enough, ravilov. I am not going to rise to that. Sep 23 09:41:02 I am done arguing. Sep 23 09:41:11 really? you are going to tell me when it's enough? lol Sep 23 09:41:25 if you're done arguing then do as you're told and take it elsewhere Sep 23 09:41:48 Are you trying to be deliberately inflamatory, ravilov? Sep 23 09:42:00 to push you away from here? absolutely Sep 23 09:42:36 if you don't respond well to polite asking, I am not beyond being more rough Sep 23 09:42:41 can you guys just /ignore each other and stop bitching arround please? :) Thats by far more annoying then their not android-dev related stuff. Sep 23 09:43:10 You are absolutely right danijoo. Sep 23 09:43:17 danijoo, letting in to this kind of selfishness is the wrong thing to do Sep 23 09:44:12 i think i should just act on my own advice Sep 23 09:44:58 it's like someone busting into your house and refusing to leave, and you pretend they're not there Sep 23 09:45:32 (this channel is obviously not *mine* but they did a forceful entry and are refusing to leave when asked politely) Sep 23 09:46:38 is it possible to draw on top of the Back/home buttons? Sep 23 09:46:55 probably not Sep 23 09:47:06 that would be a serious security issue if you could do that Sep 23 09:47:19 check3r: You could hide them by going full screen. Sep 23 09:47:30 Then put your own bar there. Sep 23 09:47:48 But if you want to do it elsewhere it would require modifications to the system framework. Sep 23 09:48:04 ok :/ Sep 23 09:48:21 FennyFatal: where do you connect IDA to the remote debugger? I had it in 6.1 and I just switched to 6.5 and it's missing lol Sep 23 09:48:23 check3r there is maybe a better "design" way to do it Sep 23 09:48:38 I wanted to create a mouse "driver" Sep 23 09:48:40 depends on what you are actually wanting to do, I can't actually think….so interested Sep 23 09:48:50 but I cant draw the mouse on top of the back/home buttons Sep 23 09:49:02 check3r: I think quite a few devices still have physical back buttons, no? Sep 23 09:49:08 FennyFatal: oh shit. it detects the debugger lol Sep 23 09:49:10 does android native not come with basic HID mouse interface ? Sep 23 09:49:28 marrrk: thats true too... Sep 23 09:49:38 Wow, I didn't know it did that, bros. Sep 23 09:51:42 I'm still trying to convince them to get me a license for new upgrades. They just gave me Jeb, and are like, what, you need another one? Sep 23 10:00:35 How do you chain animations? Sep 23 10:02:45 check3r: I looked into it a bit for you. There is no such thing as a usermode driver in android (or linux for that matter), the only thing that seemed possible would be to get the kernel source for the device you were working on and build a module. Sadly the problem would be that you would not be able to load the module without root access on the device. Basicly without vendor support it would not be easy to make a commercial Sep 23 10:02:45 app that does what you want. Sep 23 10:03:14 You can have a look here: http://sourceforge.net/projects/usb-vhci/ Sep 23 10:04:10 marrrk: Do you just want them to run back to back? Sep 23 10:04:17 Yes Sep 23 10:04:32 I am using a Listener now Sep 23 10:04:43 onAnimationEnd Sep 23 10:04:48 and run a lambda in that one. Sep 23 10:05:00 okay, what happens? Sep 23 10:05:08 is it just not smooth enough? Sep 23 10:05:26 FennyFatal: ok thx Sep 23 10:05:43 I don’t find the programming very elegant. Sep 23 10:06:09 Ahh, well with java you are sort of stuck with interfaces. Sep 23 10:06:57 I’m not stuck with java, but I thought there might be some other official way. Also apparently you can make animations in xml, I was doing them in code so far. Sep 23 10:07:07 So I thought maybe there’s a more idiomatic way like that. Sep 23 10:07:57 marrrk depending on the anim you maybe able to merge them Sep 23 10:08:44 well, ok merge not a good work, combine not into a list but with segments that have different offsets as one anim Sep 23 10:08:51 word* Sep 23 10:09:47 marrrk: try looking at AnimatorSet Sep 23 10:10:09 It lets you define the order of animations Sep 23 10:10:11 I thought those were in parallel the AnimatorSet ones but I’ll give it another look. Sep 23 10:10:31 You could probably extend the Animation class and add a method to start another one by internally implementing an animation listener interface in your new class. Sep 23 10:10:32 AnimatorSet.Builder has an example Sep 23 10:10:43 Ah playSequentially and playTogether Sep 23 10:10:59 ohh, interesting. Sep 23 10:11:17 FennyFatal: That’s what I am doing now but the AnimationSet that Simon proposed looks more like the real deal. Sep 23 10:11:19 FennyFatal: how can I tell where the memory regions run so I can dump them Sep 23 10:12:01 Look at the first address in the debugger, bros. That is the offset, otherwise if you are using IDA you can look at the hex view. Sep 23 10:12:23 After migrating from eclipse to AS, my apk is bigger than before, specifically the classes.dex file grew in size. Any idea why? I've imported the previous proguard file. Sep 23 10:12:25 marrrk: Yeah I hadn't seen that before. Sep 23 10:12:46 SimonVT, could you please deal with bros and FennyFatal? I can provide logs if necessary Sep 23 10:12:54 You're a woman. Sep 23 10:13:04 marrrk This is the superclass for classes which provide basic support for animations which can be started, ended, and have AnimatorListeners added to them. Sep 23 10:13:10 That class sounds just right Sep 23 10:13:19 They have already done what you wanted to. Sep 23 10:13:21 Depends what the issue is Sep 23 10:13:32 SimonVT: we were discussing reverse engineering Sep 23 10:13:42 he caught an attitude, saying that despite it being development Sep 23 10:13:45 Yeah, please don't do that here Sep 23 10:13:53 Ok. Sep 23 10:14:09 they were also offensive and attacking Sep 23 10:14:19 would not respond well to polite asking Sep 23 10:14:22 We were also offensive and attacking. Sep 23 10:14:23 ravilov: Please don't start another fight. Sep 23 10:14:27 Hi, I'm trying to build an app using the cardslib library. I want to use the staggered library but I'm overwhelmed by the documentation and I would really appreciate if someone could help me understand that Sep 23 10:14:32 FennyFatal, please quit telling me what to do Sep 23 10:14:45 They're gonna stop now, so all is good :) Sep 23 10:14:52 SimonVT: are you dutch? Sep 23 10:14:57 Agreed. :D Sep 23 10:15:25 I'm danish :) Sep 23 10:15:59 SimonVT: I was of the opinion that RE was fine so long as it was for the purpose of understanding the code, but now that it is made clear, I'll be sure to refrain. Sep 23 10:16:07 * StingRay_ takes bros and FennyFatal off ignore :) Sep 23 10:16:22 too early I think, but your call :p Sep 23 10:16:39 I am dutch. :D Sep 23 10:16:44 well, half dutch. Sep 23 10:16:52 FennyFatal: me too! haha Sep 23 10:16:56 Half dutch half droid. Sep 23 10:16:59 That's what the instant connection was. Sep 23 10:17:27 Vikings at heart I suppose. Sep 23 10:17:29 :P Sep 23 10:17:31 great, so now I'm starting to build up a dutch stereotype and it doesn't look good at all Sep 23 10:17:35 must be all that weed over there Sep 23 10:17:39 ... Sep 23 10:17:41 On topic pleae ravilov Sep 23 10:17:44 Extremely inappropriate Sep 23 10:17:47 Wow... that is just offensive. Sep 23 10:17:48 This is an Android Development channel. Sep 23 10:18:07 I have suffered many marijuana related losses. Sep 23 10:18:08 how so, FennyFatal? Sep 23 10:18:13 SimonVT: that is unacceptable Sep 23 10:18:21 * StingRay_ puts everyone on ignore …. oh wait… easier way Sep 23 10:19:52 Do I really need to spell it out for you? Sep 23 10:20:30 FennyFatal: you could probably argue for some cases, but generally it's not really appropriate for an official android app dev channel Sep 23 10:20:38 I wonder if I can pimp the AnimatorSet class to have a + operator for sequential animations and a * for parallel ones. Sep 23 10:21:36 ravilov: please stop addressing bros and FennyFatal, you're just adding to the drama Sep 23 10:21:53 ok Sep 23 10:22:07 marrrk, err, you can't overload operators in java. I don't know about scala though, that's entirely foreign to me Sep 23 10:24:18 Sometimes I wish android supported ruby as a native language rather than java. But then again I don't think I would want to have all of my applications run on rails. :P Sep 23 10:24:33 Doesn’t have to be + could be | Sep 23 10:24:39 |+| I mean Sep 23 10:25:41 You might be able to do something with your compiler as a preprocessor, but Java is a bit inflexable that way. Sep 23 10:26:42 FennyFatal: I lied! You can attach whatever you want. Sep 23 10:27:41 I don't believe java allows creating your own operators.. Sometimes it's easier to just wrap the android api in your own class tho.. Can be quite verbose Sep 23 10:28:13 AnimatorSet is final Sep 23 10:28:15 hmm Sep 23 10:28:29 I can pimp it, though. Sep 23 10:28:55 You could still just wrap it, marrrk. Sep 23 10:29:23 Just define an interface that implements all the same functions, and have them call an internal animator object. Sep 23 10:29:48 That’s what I meant but with an implicit conversion from AnimatorSet to that new class. Sep 23 10:30:04 Exactly. :D Sep 23 10:34:17 Is there a more robost pattern/solution than startActivityForResult/onActivityResult that works well with nested fragments as well? Sep 23 10:34:35 localbroadcastmanager? Sep 23 10:54:46 Android L has this nice effect of buttons filling up from where you press them. Is there some way to get these buttons into earlier versions? Sep 23 10:59:36 Can always do a custom view but the code to these buttons probably sits somewhere already. Sep 23 11:01:18 I would keep an eye on Jake Wharton, marrrk Sep 23 11:01:34 it seems if a scrollview is scrolled from its parent, and its alpha isn’t set to 1, it automatically switches to 1… how do i prevent that? Sep 23 11:10:54 hi everybody. Can anybody tell me how I can get the URIs of all images in a specific gallery album? I want to display the thumbnails of one album using the Android Universal Image Loader, but don't know how to get the URIs that I want to load from... Sep 23 11:18:17 where would I find available algorithms for use with KeyPairGenerator? Sep 23 11:18:18 evident, loop through the file dir and look for files that end with specific file types? Sep 23 11:18:26 docu is a bit short about that aspect Sep 23 11:24:43 VnM: well I thought there is a more conventient solution... e.g. just query the mediastore somehow... Sep 23 11:25:05 trying to animate 2 views. On both i do viewX.animate() but on the second i also do .setStartDelay(). The delay is applied to both animations. What's going on? Sep 23 11:26:48 VnM: I found a way that queries the mediastore and gives me a cursor with all file names... unfortunately, I only get them as absolute paths, not as their URIs... "content://media/external/..." Sep 23 11:27:12 evident, is that listFiles() you're talking about? Sep 23 11:28:13 Shouldn't you be able to reproduce the URI you need with these data? Sep 23 11:29:50 osxorgate: Are you giving the same animation reference to the views? Sep 23 11:30:13 marrrk: no, i found a workaround to also do setStartDelay(0) on the other guy Sep 23 11:31:27 yeah that's what I am trying right now... and now i'm not using listFiles() with that approach... the images can be accessed using a Content Provider... where you need to call the query() method on MediaStore.Images.Media.EXTERNAL_CONTENT_URI and add the selection criteria you want (just images form a specific folder or album eg) Sep 23 11:33:28 Is there a mirror of theandroid L source on github? Sep 23 11:34:45 evident: MediaStore is faster than manually parsing the filesystem Sep 23 11:35:40 got it working now... :) To get the Uri, I had to use Uri.fromFile(new File(cursor.getString(dataColumn))).toString(); and add that to the list of files... Sep 23 11:36:03 then in the GridView I can have the Android Universal Media loader load the image from these Uris... :) Sep 23 11:36:09 marrrk: https://android.googlesource.com/device/lge/mako/+/l-preview Sep 23 11:36:31 fucking google code, but better than nothing, I guess, thanks danijoo Sep 23 11:37:22 fucking google code? o.O Sep 23 11:38:57 ahh fuck no... this approach will make the files as "file:///..." instead of "content://media/..." ... it works, but the second approach should be faster Sep 23 11:39:48 Bah Sep 23 11:40:14 Strip the first bit and put content:// in front lol Sep 23 11:40:48 danijoo: I am used to github and frankly think that it is much more user friendly than google code Sep 23 11:41:24 that wont help ;) since hte rest is different... "file:///emulated/0/DCIM/..." vs "content://media/external/images/..." Sep 23 11:44:47 evident: A database cursor is not working for you? Sep 23 11:46:16 of which database? Sep 23 11:46:37 Alright I finally installed the preview and it’s much less exciting than I thought they simply draw out a circle from wherever you tap. I thought it would fill up the container taking into account the collision of the circle with the border etc. Sep 23 11:54:02 finally Sep 23 11:54:19 finally mikedg is here Sep 23 11:57:04 Have you tried querying MediaStore.Images.Media for the _ID field, marrrk? Sep 23 11:57:23 What? Sep 23 11:57:30 FennyFatal: What for? Sep 23 11:57:46 Isn't that the value used at the end of the URI? Sep 23 11:58:04 What URI? Sep 23 11:58:15 the content:// URI Sep 23 11:58:31 I think I meant evident :P Sep 23 11:58:38 sorry marrrk Sep 23 12:00:03 Yeah, I’ve been going back to see what happened before. Sep 23 12:08:47 evident: Not sure if you have left, but Something like: query("content://media/external/images/", {"'_id", "_data"} ) ought to return a cursor to iterate over a collection of ids and data streams. Sep 23 12:14:10 FennyFatal: aahhh that looks great! Sep 23 12:14:28 I'll have to play with the gueries a bit omre i guess :) Sep 23 12:14:54 One thing worth noting is the bucket id. Sep 23 12:15:32 Bucket id is secretly the HashCode of the directory that contains it to lower case. Sep 23 12:16:06 ahh ok :) Sep 23 12:16:12 So you COULD work backwards. Sep 23 12:16:28 By finding directory names generating bucket ids Sep 23 12:16:57 then you can query where bucket_id in (id2, id3) etc... Sep 23 12:17:17 mind you that some implementations of bucket_id are arbitrary. Sep 23 12:17:25 I.E. they just put in "camera" Sep 23 12:18:36 you can also query for a list of bucket_ids from the db itself Sep 23 12:18:53 but it does not tell you the path that way. Sep 23 12:33:01 How do I put some hohoho into a localised string? Sep 23 12:51:53 Hey i need a simple and clickable view with a background color (set in xml ) what can i use for that? Sep 23 12:52:18 ktwo Sep 23 12:52:19 View Sep 23 12:53:18 Sep 23 12:53:45 Oh background="@color/someBackgroundColour" Sep 23 12:54:07 And of course put the annoying "android:" in front of everything to be completely DRY Sep 23 12:54:17 thanks Sep 23 13:06:33 Is it impossible to hide the soft keyboard? Sep 23 13:08:02 ktwo: Did it work? Sep 23 13:08:18 "android hide keyboard" Sep 23 13:08:19 first result Sep 23 13:08:27 Okay Sep 23 13:08:48 Exactly what I was looking at Sep 23 13:09:36 Impossible is not the right word. It's more like cryptography: computationally impossible to guess the correct answer. Sep 23 13:09:45 Well, okay the first answer works. Sep 23 13:09:48 Depending on what you want to do marrrk , I think you can hide it in your manifest with android:windowSoftInputMode for specific activities Sep 23 13:09:49 Haha Sep 23 13:10:22 I shouldn't have read all the other answers. It's a bad habit like only reading the one star reviews on amazon. Sep 23 13:10:31 Thanks VnM, I figured it out. Sep 23 13:11:19 In an xml file, can I include in another xml file? Sep 23 13:11:25 Yes Sep 23 13:11:27 With Sometimes the answer is right there in front of you Sep 23 13:13:57 However the business of clickable links in labels, I still haven't figured out. Sep 23 13:14:32 you need to set a LinkMovingMethod or whatever Sep 23 13:14:44 https://developer.android.com/reference/android/text/method/LinkMovementMethod.html Sep 23 13:14:52 forgotLabel.setMovementMethod(LinkMovementMethod.getInstance()) Sep 23 13:14:55 that's what I'm doing Sep 23 13:15:29 Ah maybe that's not enough and I have to provide it with what to do upon a click? Sep 23 13:16:21 Hi Sep 23 13:16:22 You'll have to set the text programatically too setText(Html.fromtHtml("")) Sep 23 13:16:31 Shit, I made the method for it but I didn't call it. Now that I am it is crashing. Sep 23 13:16:32 I'm getting a null in the column _id in a FTS virtual table, is it normal? Sep 23 13:17:06 I hate null Sep 23 13:17:28 But that probably does not help you. Sep 23 13:17:59 wahou, it works now, thanks JakeWharton and VnM (by the way VnM it works without setting the link programmatically) Sep 23 13:18:30 Oh does it, didn't know that! Sep 23 13:19:03 And you don't even have to CDATA the link in the strings file or anything. Sep 23 13:19:04 weird, it seems like FTS tables doesn't autoincrement the id column Sep 23 13:19:17 s/doesn't/don't/ Sep 23 13:22:11 How can I bind the done button on the keyboard to some button? Sep 23 13:22:23 Or the same action Sep 23 13:22:39 Am i the only one the faces a cropped toasts on kitkat? Sep 23 13:22:51 set an ime action listener and call the button click listener Sep 23 13:22:57 or have both listeners call the same shared method Sep 23 13:25:25 JakeWharton: You gonna backport any of the new UI elements? Sep 23 13:25:31 nope Sep 23 13:25:43 Cool. Sep 23 13:25:44 well, maybe Sep 23 13:25:54 nothing like the Toolbar or anything for sure Sep 23 13:25:58 Hehe, I am sure not until it releases though. Sep 23 13:25:59 ok next question: i want a view with all colors (where i can get the position of finger) to choose a color. what would be the easiest way to do that? Sep 23 13:26:06 marrrk, you just want to change focus? Then change focus :p Sep 23 13:26:26 ktwo: gridview Sep 23 13:26:49 Can I change focus to a button? Sep 23 13:27:04 ktwo: ALL colours? Sep 23 13:27:09 That's a lot Sep 23 13:27:58 mh well not all, but the usual color picking stuff Sep 23 13:28:05 Yeah mark, if the Button is set to be focusable you can requestFocus() Sep 23 13:28:06 but i dont want to use a lib Sep 23 13:28:16 marrrk: button.requestFocus(); Sep 23 13:28:26 i guess i have to use a Canvas Sep 23 13:28:43 ktwo: you could do a gridview where each color gets a colordrawable Sep 23 13:28:47 If it's just down the road in a LinearLayout will it automatically go into the chain? Sep 23 13:29:04 ktwo: Just make your own view. Sep 23 13:29:54 ktwo: you want a color chooser dialog? Sep 23 13:30:01 yea Sep 23 13:30:13 thanks, it just works with focusable=true Sep 23 13:30:32 not sure why you dont want a picker-library . Sep 23 13:30:40 id rather make it myself though dont want to use third party things Sep 23 13:30:41 whats wrong with that Sep 23 13:30:45 ktwo: You make a canvas you draw your colours on it and then you retrieve the colour in an onClick Sep 23 13:30:58 I've created a color picker for myself Sep 23 13:31:00 sec I'll upload Sep 23 13:31:00 1.) i have to bundle licencing things and 2.) want to learn how to do myself Sep 23 13:31:03 a pic Sep 23 13:31:22 ah one of those wheel-reinventer :p Sep 23 13:32:26 ktwo: http://i.imgur.com/MaOQzzt.png Sep 23 13:32:28 like that u want? Sep 23 13:32:30 * StingRay_ would like to reinvent the wheel like these guys http://milksono.typepad.com/.a/6a00d83451fc1869e201053703fc50970c-pi Sep 23 13:32:43 reinvention is not always bad Sep 23 13:32:54 yoavst, it looks nice - but i need a full rgb chart Sep 23 13:33:10 oh, so use an available library Sep 23 13:33:18 it is the easiest way :) Sep 23 13:33:32 then i have to write down the copyright of some other guy xD Sep 23 13:33:35 when I call startService() twice, onStartCommand() is called twice, but onDestroy() is not called. Is this right or am I missing something? Sep 23 13:33:40 sure i could just not do it , but i feel bad then Sep 23 13:34:07 ktwo: why? you use support v4, don't you feel bad? Sep 23 13:34:40 https://code.google.com/p/android-color-picker/ https://code.google.com/p/color-picker-view/ https://github.com/LarsWerkman/HoloColorPicker Sep 23 13:34:46 here are 3 options to use Sep 23 13:34:56 Wow hebrew looks nice Sep 23 13:35:16 Ill maybe check them out and copy only the parts i need - i guess one doesnt have to include copyright then? :P Sep 23 13:35:17 And the picker, too yoavst Sep 23 13:35:19 marrrk: not if you use min api 10 Sep 23 13:35:54 Then how does it look? Sep 23 13:36:14 Maybe because I don't know the glyphs I can't see Roboto's ugliness in them :) Sep 23 13:36:36 marrrk: In some cases I use 3 textviews for "something in herbew" + date + "something in hebrew" Sep 23 13:36:49 Being left handed I'm a bit jealous of right to left scripts. Sep 23 13:37:12 yoavst: I hope you don't have to localise your app :S Sep 23 13:37:32 marrrk: it should be the official app for my school, so not :) Sep 23 13:38:15 I'm really not jealous of the people who do, though. Sep 23 13:38:48 yoavst: Couldn't you have left out one colour so that you get a nicer grid? Sep 23 13:39:00 hi all :) Sep 23 13:39:07 Or add three more. Sep 23 13:39:12 hi mithrop Sep 23 13:39:12 marrrk: oh, I developed it when I had smaller device :P Sep 23 13:39:23 yoavst: I was suspecting something like that. Sep 23 13:39:32 marrrk: http://tinypic.com/player.php?v=w7bn9c%3E&s=8#.VCF3gfl_vk1 wh Sep 23 13:39:48 The default indefinite progess bar is a bitmap, right? So not resizable? Sep 23 13:39:52 what do you think on the confeti (will be visible when the user timetable for tmorrow changed) Sep 23 13:40:34 I am looking for a library to easily manage SQLite connections. I looked over the web and found ORMLite, SugarORM, GreenDAO, etc... it's a little bit hard to know which is "better". Any thoughts ? Sep 23 13:40:47 Before I had read your question, honestly, I thought looks very nice but the confetti is over the top. What does it mean? When do you see it? Sep 23 13:41:24 yoavst: But it looks quite "materially" how did you achieve that? Sep 23 13:41:28 marrrk: you see it when your timetable for the next day changed (E.G: lesson canceled) Sep 23 13:41:50 Yeah Hebrew and Farsi as well, proper annoying to do for the lower Android versions, especially if you have texts with numbers in them Sep 23 13:42:09 yoavst: Can you make it faster? Sep 23 13:42:13 marrrk: just try to follow the guidelines, nothing new Sep 23 13:42:17 marrrk: sure Sep 23 13:42:24 VnM: Well don't forget about arabic, japanese maybe too Sep 23 13:42:24 https://github.com/plattysoft/Leonids Sep 23 13:42:35 pretty new library, saw it yesterday Sep 23 13:43:00 It is quite stuttery Sep 23 13:43:04 ok, maybe not new ;) Sep 23 13:43:13 yoavst you get the problem with that particle stuff from a design point of view right ? Sep 23 13:43:39 as in it neither works or fits in use or style Sep 23 13:43:45 Yeah Farsi is Arabic, Arabic is difficult because the 'letters' attach to eachother, don't think Japanse does that Sep 23 13:43:46 ok as a test I suppose Sep 23 13:43:48 StingRay_: sry, didn't understand Sep 23 13:43:49 yoavst: I think it is a good idea to clearly indicate when there is a change, though Sep 23 13:44:12 marrrk: if there is no change it show the meme of "Y U NO" and buttons that open the timetable Sep 23 13:44:13 VnM: I thought Farsi was missing some letters from Arabic or vice versa Sep 23 13:44:28 so users know where there is change without that Sep 23 13:44:31 but it looks nice Sep 23 13:44:35 I would lose the Y U NO guy actually Sep 23 13:44:42 yoavst I mean if a design walked in and showed me that I would fire him…. or hit him with a baseball bat or something :) Sep 23 13:44:47 It fucks up your otherwise nice looking app Sep 23 13:44:51 designer* Sep 23 13:45:04 StingRay_: why? Sep 23 13:45:17 Do you also need the grid in the background? Does it provide anything? Sep 23 13:45:22 cause making a decision like that would not be beneficial to me or clients Sep 23 13:45:36 show a lack of design vision Sep 23 13:45:49 btw not meaning to be horrible, just an opinion :) Sep 23 13:46:20 marrrk: I think it looks nice since it is app that is only for students, and it looks like notebook Sep 23 13:46:33 StingRay_: Which bit you mean looks horrible? Sep 23 13:46:41 particle thing Sep 23 13:46:49 Yeah, I'm not sure about that one either Sep 23 13:47:04 StingRay_: you talk about the confetti? Sep 23 13:47:07 But Sep 23 13:47:09 yes Sep 23 13:47:27 If you can skip the first hour and come later, you should get a clear visual clue about that Sep 23 13:47:41 StingRay_: well, I've added it before 5 min, don't sure about that Sep 23 13:47:45 And the confetti effect is very in your face. Sep 23 13:48:05 yoavst: Are there any yiddish classes at your school? Sep 23 13:48:13 marrrk: god no :P Sep 23 13:48:22 Disappointing Sep 23 13:48:28 there is chinese lesson if you want ;) Sep 23 13:49:11 well Sep 23 13:49:16 So you think that I should remove the background grid & confetti? Sep 23 13:49:18 that's one language you can be sure won't die out any time soon Sep 23 13:49:21 http://google.github.io/liquidfun/ Sep 23 13:49:26 Have you seen this yoavst ? Sep 23 13:49:50 Maybe with some tweaks you can get it to make a nicer confetti effect, altough it is geared towards liquids Sep 23 13:50:08 The Sparky demo looks more like the real deal to me Sep 23 13:50:19 marrrk: the confetti isn't the key part of the app :/ Sep 23 13:50:33 * StingRay_ now realises why google publishes design guidelines :) Sep 23 13:50:35 I thought you wanted input on the confetti Sep 23 13:50:51 hello friends... please i need your help, i've been having problem pushing my project to github from eclipse.. i kept reciving error. kindly asist with any information at your disposal Sep 23 13:51:02 I've asked if you think I should use confetti in this case Sep 23 13:51:43 marrrk: I can make it faster Sep 23 13:51:45 should I? Sep 23 13:51:50 Brb adding confetti to all my apps Sep 23 13:52:00 lol Sep 23 13:52:14 the acceleration is 0.00005f Sep 23 13:52:26 StingRay_: I've always thought that Google releasing design guidelines is like a cat giving swimming lessons Sep 23 13:52:36 yoavst: I think you can use it if it looks nice Sep 23 13:52:45 marrrk to a designer yes, to a programmer no…no it should not be Sep 23 13:52:56 marrrk, false. A cat can swim. Google can't follow it's own guidelines. Sep 23 13:53:05 LOL MikeWallaceDev Sep 23 13:53:05 hello friends... please i need your help, i've been having problem pushing my project to github from eclipse.. i kept reciving error. kindly asist with any information at your disposal Sep 23 13:53:18 hackable please dont spam, and thats not really android dev Sep 23 13:53:19 Well MikeWallaceDev then again why would it? Sep 23 13:53:20 hackable: what is the error, and use command line ;) Sep 23 13:53:39 Has anyone used Flow and Mortar libs in there app? If so what are your thoughs? What benifits did it provide you. Sep 23 13:54:07 yoavst: use commad line to upload the project Sep 23 13:54:08 ? Sep 23 13:54:20 hackable: yea, that what I did when I had a linux Sep 23 13:54:29 hackable: Are you from India? Sep 23 13:54:44 now I'm a windows user and I fall in love with UI ;) Sep 23 13:55:03 hackable http://bit.ly/1Dwckfe Sep 23 13:55:10 Nope, I'm not from india.. any prob? Sep 23 13:55:18 Thanks StringRay. Sep 23 13:55:18 yoavst: But seriously I think the Spark demo here looks like a nice fireworks: http://google.github.io/liquidfun/ Sep 23 13:55:21 God, I just threw up in my mouth. "winddows and love" Sep 23 13:55:48 hackable: No, that's not a problem, I just thought your polite way of speaking had revealed your origin but my skills seem to be quite shit. Sep 23 13:56:17 anyone want to donate a few bucks so i can buy an iphone 6 plus Sep 23 13:56:18 marrrk: I made it twice faster and it looks nicer Sep 23 13:56:30 yoavst: Is there an easy way of showing this? Sep 23 13:56:31 also "i kept reciving error" is something noone can help you with Sep 23 13:56:38 I guess uploading to that website is quite tiresome. Sep 23 13:56:51 Sure mikedg_ , are we gonna microwave it? Sep 23 13:57:02 marrrk: I can send you the mp4 :/ Sep 23 13:57:04 yeah, isn't that how you charge it? Sep 23 13:57:08 :D Sep 23 13:57:27 * StingRay_ wants to do a WaveCharge app for android :) Sep 23 13:57:31 yoavst: I'm happy with anything but it seems like it's a lot of work for you. Sep 23 13:57:31 hackable: native git or jgit? What kind of error and is it working if you do it from commandline Sep 23 13:57:39 That microwaving thing is such a nice idea! Sep 23 13:57:44 StingRay_: better do it before your address is public Sep 23 13:57:50 right!!! Sep 23 13:57:55 marrrk: do you think it also work with android? Sep 23 13:58:11 or I need a special adapter? Sep 23 13:58:38 I am not sure, the old version only ran with c++ but now they say it runs on Java Sep 23 13:58:47 yoavst: But it's probably overkill Sep 23 13:59:19 How do I load iconv? Sep 23 13:59:19 yoavst: It's by Google so it's probably very hard to get to work. Sep 23 13:59:24 marrrk yoavst sorry, but what you are talking about at best looks like a second rate "congrats/score" presentation for a really 2nd rate game Sep 23 13:59:55 changed my mind, 3rd rate Sep 23 13:59:58 yea, marrrk , the people who uses this app probably have a samsung phone with stock rom. they doesn't care about design :P Sep 23 14:00:05 StingRay_: I think a fireworks effect is at least as sexy as the good old blink tag! Sep 23 14:00:21 I thought they like the iPhone design, yoavst. Sep 23 14:00:29 I think between all 3 of use only 1 has 20 years design experience Sep 23 14:00:32 WB, StingRay_. Sep 23 14:00:35 yoavst: What's the age range of the people using your app? Sep 23 14:00:41 marrrk: 15-18 Sep 23 14:00:57 Oh I thought also younger. Then it might be a bit childish indeed. Hmm. Sep 23 14:01:21 FennyFatal thanks, we all done discussing hacking now ? Sep 23 14:01:22 :) Sep 23 14:01:29 fireworks Sep 23 14:01:31 StingRay_: bros is not online. Sep 23 14:01:45 So, I would assume so. Sep 23 14:01:57 I didn't think you'd use IDA to look at android stuff Sep 23 14:01:57 I was only helping him after all. :D Sep 23 14:02:05 You can. Sep 23 14:02:12 Native libs and dex both. Sep 23 14:02:14 well, yeah, and refusing to stop chatting about it in channel Sep 23 14:02:23 I use them to debug dexguard all the time. Sep 23 14:03:28 https://github.com/futuresimple/android-floating-action-button Sep 23 14:03:41 StingRay_: Yeah, I understand your point. I just tend to think that all knowlege is good. But when wassis name chimed in, I was not about to give into the sort of tactics he was using. Sep 23 14:03:47 It became a matter of pride. Sep 23 14:03:49 the FloatingActionsMenu looks nice Sep 23 14:03:58 yoavst: I Sep 23 14:04:02 I'm not sure about that one, actually. Sep 23 14:04:08 FennyFatal either way, I asked nice, but yeah, took a mod to stop you.. Sep 23 14:04:32 Changing the affordance of a button seems uncalled for. Sep 23 14:04:40 StingRay_: You did, but I though I had convinced you at least for the time being. Sep 23 14:05:37 not close, he wanted to do not good things Sep 23 14:05:46 so no, not at all Sep 23 14:05:54 I guess I missed that part. Sep 23 14:06:03 past though now, you were both told :) shame it wasted 20 min of the channels time Sep 23 14:06:13 True. Sep 23 14:06:41 I've both sent them an invoice for my time Sep 23 14:07:01 sent them both* Sep 23 14:09:33 Is there a good library for transparent action bars? Sep 23 14:09:34 I'm told you should just ignore those until they are a court summons. Sep 23 14:11:08 See now I am just harmless ol' Fenny. Sep 23 14:13:48 Where do you keep your RequestCodes? Sep 23 14:14:01 In the calling activity? In some static class? Sep 23 14:14:35 I'm guessing you mean when starting for result ? Sep 23 14:14:37 marrrk, you don't need a library, just style it Sep 23 14:14:49 Yes, you guessed right. Sep 23 14:15:01 in that case anywhere relevant Sep 23 14:15:30 thats really a design choice where you decide based on the entire scope of whats going on Sep 23 14:15:44 asking others is a bit ….well….dare I say pointless Sep 23 14:15:53 MikeWallaceDev: I think then I need to put the action bar height as a margin in all the underlying views. Also Calligraphy doesn't seem to put the proper font on the action bar. Sep 23 14:16:04 Okay, so I'll do what makes sense instead of some Google rule. Sep 23 14:16:18 Google dont have rules Sep 23 14:16:22 they have suggestions Sep 23 14:16:32 kinda like traffic lights Sep 23 14:16:33 :) Sep 23 14:17:21 marrrk, not sure what all that has to do with transparency ? Sep 23 14:17:58 MikeWallaceDev: Is that a question? Sep 23 14:17:58 * StingRay_ is happy with his 400,000 message test, just needs JakeWharton to do a scroll listener like uil used to have Sep 23 14:18:07 MikeWallaceDev: It does not have anything to do with transparency. Sep 23 14:18:09 already done Sep 23 14:18:12 marrrk, it's me being lost :D Sep 23 14:18:20 JakeWharton released ? Sep 23 14:18:21 MikeWallaceDev: Well the first bit about the margin is. Sep 23 14:18:24 no Sep 23 14:18:27 releases are for chumps Sep 23 14:18:37 available then ? :) Sep 23 14:22:02 Chumpbait. Sep 23 14:22:17 (Sorry, I've been watching "Boss" recently) Sep 23 14:22:51 MikeWallaceDev kelsey grammer? Sep 23 14:23:18 Yeah. I love it. But when I posted it yesterday, He was getting hate, and I don't know why. Sep 23 14:23:38 just on s5 of frasier :) Sep 23 14:26:12 oook ! so nobody uses ORM or persistence here ? :) Sep 23 14:26:20 anyone here uses ActiveAndroid? Sep 23 14:27:26 I'm having a problem. when I run a query like "new Select().from(Car.class)", all cars have a null id, even .getId() returns null! Sep 23 14:27:36 any idea? I don't know what could be wrong Sep 23 14:30:52 Is anyone using hockey and can tell me how I can identify some of the devices, KFTT seems to be a type of Kindle Fire, but I can't even start googling FP1 Sep 23 14:31:04 Who are these people writing functions that return null_ Sep 23 14:31:04 Mattx: You are calling execute(), right? Sep 23 14:31:21 I am, in fact all columns have content except the id Sep 23 14:31:24 https://github.com/pardom/ActiveAndroid/blob/master/src/com/activeandroid/Model.java Sep 23 14:31:40 it's weird because the id is only set when you call .save() if I'm not wrong! Sep 23 14:32:20 Does your schema have the id as a key? Sep 23 14:32:25 is it _id? Sep 23 14:32:27 or id Sep 23 14:32:30 marrrk, with database records, it can have so meaning, no ? Sep 23 14:32:51 @Table(name = "cars", id = BaseColumns._ID) Sep 23 14:32:58 BaseColumns._ID == "_id" Sep 23 14:33:03 That's the problem: It has some meaning. Null doesn't. Sep 23 14:33:37 And how could someone even get my App that's only available on the play store onto a kindle fire? Sep 23 14:33:42 Fenny, check the code in Model.java, it is only doin mId = ... in .save(), isn't it weird? Sep 23 14:34:12 Syzygy_: installing the apk? Sep 23 14:34:46 Mrdarknezz, like, taking it from another device and sending it over? Sep 23 14:34:50 Syzygy_: http://apps.evozi.com/apk-downloader/ Sep 23 14:34:52 yes Sep 23 14:34:58 ah ok Sep 23 14:35:04 Hmm, mId is a Long, so I wonder it it is supposed to be pass by ref Sep 23 14:35:21 I'm still wondering what the FP1 is :( Sep 23 14:36:02 Syzygy_: FP1 is Fairphone Sep 23 14:37:00 You using the one from the repo, Mattx? Sep 23 14:37:07 alright, thanks. Sep 23 14:37:19 not really, but it's 99% from that repo, yes, Fenny Sep 23 14:37:51 Fenny, I forked it and added support for FTS Sep 23 14:38:53 I wonder if you should be using modelinfo instead of model Sep 23 14:39:03 private Map, TableInfo> mTableInfos = new HashMap, TableInfo>(); Sep 23 14:39:15 Or TableInfo? Sep 23 14:40:03 marrrk, if your id is a string and you just put anything in your field, putting an empty string is not a perfect reflection of what you have in your DB Sep 23 14:40:25 Empty string is not the solution either Sep 23 14:40:45 mithrop: http://www.haskell.org/haskellwiki/Maybe Sep 23 14:40:51 hello, if i call the camera (activityforresult) and the activity that calls it gets closed becuase of lack of memory ... how can i detect this on resume so i can get the activity back into the correct state? Sep 23 14:42:01 jaspertheghost I think if that happened the camera activity would die too Sep 23 14:42:05 not sure, but think so Sep 23 14:42:24 marrrk, unfortunately, we are using Java here... Sep 23 14:42:31 i can confirm thats not the case Sep 23 14:42:40 So, you are extending Model, right, Mattx? Sep 23 14:42:44 what happens is the activity gets opened back up ... (resumes) Sep 23 14:42:46 yes, of course Sep 23 14:42:53 and calls the acitivtyresult function Sep 23 14:43:02 It looks like you must populate that field yourself. Sep 23 14:43:15 jaspertheghost no thats not through lack of memory thought right ? Sep 23 14:43:17 Fenny, there's no doubt there is something wrong somewhere else. I just run "SELECT * FROM cars" and the cursor itself has _id == null Sep 23 14:43:29 jaspertheghost: i thing you have to save the instance state and onActivityResult will be called as usual after recreation Sep 23 14:43:31 Your schema Sep 23 14:43:33 it's as if the id is not being selected, ActiveAndroid has nothing to do with this I suppose Sep 23 14:43:36 jaspertheghost thats just normal Sep 23 14:43:53 Where is your table create declaration? Sep 23 14:44:00 yes saveinstance state will work... but will it stil hold all my global vars values i had before? Sep 23 14:44:14 it's created automatically Fenny, ActiveAndroid creates it the first time you run the app Sep 23 14:44:19 there are no global values in java.. Sep 23 14:44:36 let me find that part of the code Sep 23 14:44:40 Okay, let's find it in their code then. :D Sep 23 14:44:49 public static vars Sep 23 14:44:59 thats what i mean by global Sep 23 14:45:14 Fenny, https://github.com/mparodi/ActiveAndroid/blob/master/src/com/activeandroid/util/SQLiteUtils.java#L251 Sep 23 14:45:32 (this is my fork with FTS support) Sep 23 14:45:43 jaspertheghost, a public static vars will still the same anytime ... it's juste the definition of a static var Sep 23 14:45:48 Okay, what is your definition? Sep 23 14:45:50 Fragment gets added to activity, I change to another app (destroy activities immediately is active), I change back. The fragment is invisible, but added and with .show(this) it does not become visible again Sep 23 14:45:54 what is the right approach here? Sep 23 14:46:23 it is running the part with the "CREATE VIRTUAL TABLE..." Sep 23 14:46:43 mithrop: i think your thinking of final not static Sep 23 14:46:54 *you're Sep 23 14:47:07 and no. I am thinking of static field Sep 23 14:47:21 TextUtils.join(", ", definitions)); Sep 23 14:47:38 It sounds like your id is not a key. Sep 23 14:47:49 ok so my question again is if i set the value before the camera loads, denoting that we are in a particulat state will this value stay when the acitivity is resumed Sep 23 14:48:23 Fenny, it's not in the definition of my model, but it should be added automatically --I suppose Sep 23 14:48:26 You should look at your tableinfo that you are passing to it. Sep 23 14:48:28 jaspertheghost, if you do not modify the value YOURSELF during the period of time, yes Sep 23 14:49:14 in fact "_id" is part of the schema in the DB, it's just empty Sep 23 14:49:19 what period of time could it be modified while the activity is not running? Sep 23 14:49:35 Mattx: It needs to be a key Sep 23 14:49:45 https://github.com/pardom/ActiveAndroid/wiki/Creating-your-database-model Sep 23 14:49:57 check this, it doesn't say you MUST define the ID yourself ^ Sep 23 14:50:19 "One important thing to note is that ActiveAndroid creates an id field for your tables. This field is an auto-incrementing primary key." Sep 23 14:51:05 hello, I am trying and have literally searched everywhere for a solution, to fit-to-height an image in a webview without stopping the zoom from working. If I use the tag the zoom stops working, and if I use where device_height is the height of the android device (as taken by the metrics of the display) it still doesn't fit exactly. Any ideas? Sep 23 14:51:16 Hmm, is it called _id or id Sep 23 14:51:35 Documentation says it should be autoincrementing. Sep 23 14:52:09 jaspertheghost : a static field is a var that will be available during all the runtime without the need to instanciate the class. if your field is public, any classes will be able to access it, like any other field. the value of the field is ALWAYS THE SAME FOR ALL CLASS in your program. if you changes it, it changes it for all other objects. is it clear for you ? it's a really important concept Sep 23 14:52:50 Fenny, I don't think the problem is in the schema either. because if I create instances and save them through .save(), the id is fine, it is autoincremented Sep 23 14:53:00 Interesting: if (name.equals(tableInfo.getIdName())) { Sep 23 14:53:00 definition.append(" PRIMARY KEY AUTOINCREMENT"); Sep 23 14:53:34 Hmm, Mattx it is an sqlite db? Sep 23 14:53:38 yep Sep 23 14:53:49 can you pull it and look at it with sqlite3? Sep 23 14:53:52 mithrop, your completely avoiding my question by going completely left field... if the damn acitivity is paused/closed (whatever android likes to do sometimes that cause oncreate to be called again when returning from the camera via activityforresult) ... will be variables be restored if i save acitivitystate via onpause Sep 23 14:54:00 simple question ... not getting a simple answer Sep 23 14:54:25 If I have a tcp connection that is only needed when the application is opened and in the forground, what is the best way to handle that. A service, and then start and stop on every onResume onStop of the activity lifecycle, or is there a better way? Sep 23 14:54:37 Fenny, isn't it sqlite3 already? Sep 23 14:54:57 what's the default version then? Sep 23 14:56:03 Yes, it should be Sep 23 14:56:46 oh, I know what to do! Sep 23 14:56:53 public static final String DEFAULT_ID_NAME = "Id" Sep 23 14:56:59 not _id Sep 23 14:57:04 I'll check the schema through adb, wait a sec :) Sep 23 14:57:08 jaspertheghost, you asked for static variables, I answered you for them, trying to give you some knowledge of OOP. Sep 23 14:57:14 that is what I was suggesting. Sep 23 14:57:22 I think _id does not exist. Sep 23 14:58:01 thanks mithrop ... i already knew that stuff Sep 23 14:58:19 jaspertheghost, so you already know the answer at your question, isn't it ? :) Sep 23 14:58:52 no becuase, i still dont know the exact functionality of android save state functions Sep 23 14:59:05 man you are a fucking troll Sep 23 14:59:21 jaspertheghost: Calm down lol Sep 23 15:00:00 jaspertheghost, actually no. I hate troll. I just tried to give you an answer to "static" fields ;) we just don't understand each other. I can tell you are a "fucking noob" but I am not. so, please keep cool guy ;) Sep 23 15:00:14 Fenny, CREATE VIRTUAL TABLE cars USING FTS4(_id INTEGER PRIMARY KEY AUTOINCREMENT, source TEXT, image TEXT); Sep 23 15:00:21 from sqlite3 ^ Sep 23 15:00:40 Am I correct in this thought process? If I am using a Callback in Retrofit that does anything with my activity / fragment, I should probably go ahead and implement Otto as well. It seems that the Callback is open to NPE if the user navigates away at the right time. Sep 23 15:00:57 jaspertheghost: static vars behave in andorid as in normal java.. android is just a framework built on top of it. Sep 23 15:00:58 do a select & from the db Sep 23 15:01:09 your code is open to NPE if you do the wrong thing in the Callback Sep 23 15:01:17 select * from cars; Sep 23 15:01:52 mattblang: there are other options as well, you could use a WeakReference to your activity Sep 23 15:01:56 does everything have an Id, Mattx? Sep 23 15:02:28 alright, the _id is empty for all rows! Sep 23 15:02:31 no doubt now Sep 23 15:02:44 Yeah, something is going weird... Sep 23 15:02:55 weird, because .save() does create an id Sep 23 15:03:10 I mean, c = new Car(); c.save(); c.getId() is fine Sep 23 15:03:42 even c = new Car(); d = new Car(); c.save(); d.save(); c.getId() == d.getId()-1 Sep 23 15:03:51 JakeWharton I am displaying Toasts depending on the outcome of the network call. I am using getActivity() as Context, which I think may be problematic if the user leaves the Activity while the network call is still going. Sep 23 15:04:10 right Sep 23 15:04:28 try "insert into cars values = ('dirty', 'lies');" Sep 23 15:04:34 from sqlite Sep 23 15:04:40 see if it generates an id Sep 23 15:05:18 oops but with out the '=' Sep 23 15:06:40 Mattx: I think your code might be specifying a null for id when those rows are being created Sep 23 15:07:05 or maybe the version of sqlite in the app is just broken ;P Sep 23 15:07:33 ok, here is the thing Sep 23 15:07:45 if I insert into.. with an integer id, it is saved just fine Sep 23 15:07:58 if I do insert into cars values (null, "foo"... Sep 23 15:08:02 it is kept null Sep 23 15:08:37 does it work with the: insert into cars values ('dirty', 'lies'); Sep 23 15:08:46 if I do insert into cars (source) vaues ('foo') Sep 23 15:08:51 the id is null, it's not filled Sep 23 15:08:52 ommit the first one completely Sep 23 15:09:18 It should find the next one and use it. Sep 23 15:09:26 yeah, but it's not doing so :( Sep 23 15:09:39 with: insert into cars values ('dirty', 'lies'); Sep 23 15:09:40 ? Sep 23 15:10:21 what!? Sep 23 15:10:23 it is saved Sep 23 15:10:27 with a string in _id Sep 23 15:10:29 O__O Sep 23 15:10:37 how is id a string? Sep 23 15:10:46 don't know, it's not even of the correct type Sep 23 15:10:46 lol Sep 23 15:11:04 are you specifying the id name in your setup? Sep 23 15:11:42 I'm sorry, I got disconnected Sep 23 15:11:50 I sad: how is id a string? \n don't know, it's not even of the correct type Sep 23 15:12:01 okay, try: insert into cars (source, image) values ('dirty', 'lies'); Sep 23 15:12:26 _id=null, source=dirty, image=lies Sep 23 15:12:37 okay something is wrong for sure. Sep 23 15:12:58 It is either sqlite on your phone, or the db Sep 23 15:13:09 wipe the database? Sep 23 15:13:56 I'm checking if virtual tables handle types, they probably ignore the types Sep 23 15:14:34 hey guys im looking to implement my location callbacks in their own class anyone point me int the correct direction Sep 23 15:14:49 http://www.sqlite.org/fts3.html Sep 23 15:14:51 there it is! Sep 23 15:15:17 "Data-types specified as part of the "CREATE VIRTUAL TABLE" statement used to create an FTS table are ignored completely." Sep 23 15:15:50 "all values are converted into TEXT before being stored" Sep 23 15:16:44 Interesting... Sep 23 15:17:22 Do you need full text search? Sep 23 15:17:35 If so you will have to manage keys manually. Sep 23 15:17:41 I do yes Sep 23 15:17:56 it's weird though that .save() was working Sep 23 15:18:19 I think save must do it manually. Sep 23 15:18:24 it seems the id is kept updated somewhere but not stored in the table Sep 23 15:18:30 right. Sep 23 15:19:02 AH HA! Sep 23 15:19:03 INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL Sep 23 15:19:08 You need NOT NULL Sep 23 15:19:23 it'll be ignored! Sep 23 15:19:30 primary key implies not null Sep 23 15:19:34 No, it will not accept a null value Sep 23 15:19:36 and unique Sep 23 15:20:06 it is currently adding null, then converting it to text Sep 23 15:20:19 so it will accept anothe value of null which != "null" Sep 23 15:20:29 add NOT NULL. :D Sep 23 15:20:44 let's me see -- I don't think it's going to work :P Sep 23 15:21:01 You will have to drop the table. Sep 23 15:21:15 yep, one sec Sep 23 15:24:58 One other thing that might make a difference... Sep 23 15:26:08 Fenny, doesn't work, the constraint is not checked Sep 23 15:26:12 from the manual itself: Sep 23 15:26:16 "Unless the column is an INTEGER PRIMARY KEY or the table is a WITHOUT ROWID table or the column is declared NOT NULL, SQLite allows NULL values in a PRIMARY KEY column" Sep 23 15:26:34 that is, integer primary key implies not null, it's just ignored in FTS Sep 23 15:26:38 Mhh Sep 23 15:26:58 only other think I can think of is autocommit isn't happening. Sep 23 15:27:13 It might just be FTS then. Sep 23 15:27:48 connect sqlite3 to the table, and try something? Sep 23 15:28:12 aha! found it! Sep 23 15:28:24 Autocommit off? Sep 23 15:28:25 yeah! :D Sep 23 15:28:29 hehe Sep 23 15:28:36 Was the last thing I was thinking Sep 23 15:28:42 no no Sep 23 15:28:48 it's not autocommit haha Sep 23 15:28:55 transactions? Sep 23 15:29:03 in all tables there's a hidden column called "rowid" which is integer autoincrement Sep 23 15:29:10 ahaha Sep 23 15:29:11 in FTS if you need an id, you must use that column Sep 23 15:29:18 select rowid, * from cars Sep 23 15:29:22 It was in the config Sep 23 15:29:25 returns what I expected Sep 23 15:29:35 you speficied an _id? Sep 23 15:30:04 Ahh, nvm I am not reading. Sep 23 15:30:05 it returns the rowid (756, 757, ...), _id always null and the rest of the columns just fine Sep 23 15:30:08 That makes sense. Sep 23 15:30:18 :) Sep 23 15:30:29 so, now you can set mId. :D Sep 23 15:30:43 I think you should specify the idname in your config Sep 23 15:30:59 instead of letting it use default Sep 23 15:31:09 no more dupped rows that way. Sep 23 15:32:07 I think you need to set that on the TableInfo object. Sep 23 15:32:08 I think I can safely ignore that column Sep 23 15:32:20 remove it altogether or whatever Sep 23 15:32:32 (don't know if I can remove the id, I think I can't) Sep 23 15:32:43 You can change the value Sep 23 15:32:55 yeah, probably with the id of the servers' db Sep 23 15:32:58 that would make sense Sep 23 15:33:01 right. Sep 23 15:33:20 Thanks for this Mattx I am glad to have learned something about FTS. :D Sep 23 15:33:46 do you use AA or you were just being curious? Sep 23 15:34:06 I work with sqlite all the time. Sep 23 15:34:26 ok, I hope you'll save some hours in the future if you have to deal with FTS :P Sep 23 15:34:32 I have just never needed FTS. Sep 23 15:34:37 yeah lol Sep 23 15:34:57 Crazy that it wasn't in the schema. Sep 23 15:35:22 do you connect to the db directly? Sep 23 15:35:39 I do. I wrote a whole wrapper for it. Sep 23 15:35:59 whoo, you should try an orm maybe :P Sep 23 15:36:41 Hmm, I totally don't have that class on github, lemme gist it Sep 23 15:38:52 Mattx: https://gist.github.com/FennyFatal/e8fca479a8e058b979f2 Sep 23 15:40:42 that should be efficient! Sep 23 15:41:03 Yep. :D Sep 23 15:41:06 Fenny, from what app is it? Sep 23 15:41:07 Nice and simple Sep 23 15:41:27 It is a simple music player, and client for various streaming services. Sep 23 15:41:46 It is in extreme alpha Sep 23 15:42:19 Fenny, I like your onUpgrade Sep 23 15:42:22 check AA examples, you would be much happier in life haha Sep 23 15:43:02 jab416171: Yeah, I may add actual migration if I ever go past version 1. Sep 23 15:43:25 Fenny, haven't you had problems with listviews or the like? Sep 23 15:43:36 I thought you needed an "_id" in order to use cursors Sep 23 15:43:58 cursors will just iterate over all the returned rows. Sep 23 15:44:00 there was a restriciton like that, probably not in cursors but somewhere else Sep 23 15:44:29 Doesn't matter though because I have A key. Sep 23 15:44:35 http://developer.android.com/reference/android/widget/CursorAdapter.html Sep 23 15:44:49 "The Cursor must include a column named "_id" or this class will not work" Sep 23 15:44:50 there it is Sep 23 15:45:10 I suppose you don't use CursorAdapter, yet Sep 23 15:45:12 As for listviews, I wrote a custom view adapter. Sep 23 15:47:36 Fenny, can you gist the adapter? I few days ago I had to add the _id column for this very same reason Sep 23 15:48:00 I mean, the default name in AA is "Id", I had to change it Sep 23 15:48:48 haha, My adapter code is sort of a shit show, but lml Sep 23 15:53:48 Oh, man this is in serious need of refactoring... Sep 23 15:54:03 You sure you want to see it, Mattx? Sep 23 15:54:52 don't worry, I only want to read how it works Sep 23 15:55:23 paste it as it is now, private message if you feel more comfortable :P Sep 23 15:55:43 trying to make an http post request, got NetworkOnMainThreadException so moved that to an AsyncTask, but I still get that Exception? http://pastebin.com/PrJMqF0g Sep 23 15:55:47 where am I wrong? Sep 23 15:57:09 You're calling doInBackground from the main thread Sep 23 15:57:51 ^^^ Sep 23 15:58:09 ^^^ (what PinkSpecs said) Sep 23 15:58:19 DDIRequest ddir = new DDIRequest(_ Sep 23 15:58:24 okay then I don't get how to call it NOT in there ^^ Sep 23 15:58:26 ddir.execute() Sep 23 15:58:33 ^^^ Sep 23 15:58:41 instead of doInBackground? Sep 23 15:58:46 Yeah it's bad, lol Sep 23 15:58:58 DarsVaeda: yiss instead of that Sep 23 15:59:04 DarsVaeda: https://developer.android.com/reference/android/os/AsyncTask.html Sep 23 15:59:06 look at usage Sep 23 15:59:07 okay I'll try this thanks :) Sep 23 15:59:25 Seriously DarsVaeda , what SimonVT said Sep 23 15:59:35 hey everyone Sep 23 15:59:38 oooooookay ;) Sep 23 15:59:50 so I want to change the image of an animation programatically Sep 23 15:59:50 hey tricknology Sep 23 16:00:17 Mattx: At the very least I need to abstract the view types so that I can check by type rather than by id. Sep 23 16:00:19 i have android:src:“@drawable/drawablexml” Sep 23 16:00:30 i want to change that to drawablexml2 Sep 23 16:12:37 <|Blaze|> I'm trying to use setFixedSize to adjust a GLSurfaceView to use a smaller backbuffer. When I use setContentView(mSurface) everything is fine, but when I add mSurface to a RelativeLayout, and setContentView(mLayout), it seems to stop using the hardware scaler. Anyone have any thoughts as to how I can work around this? Sep 23 16:16:42 every device I have has major input lag Sep 23 16:16:52 what's up google? Sep 23 16:17:14 my app on iphone is snappy in comparison Sep 23 16:18:01 do we look like Google? Sep 23 16:18:07 ravilov: you never answered my question how you'd port your app to a non-java system, but I'll let it go Sep 23 16:18:46 there's got to be some googldroids here Sep 23 16:19:24 michaelmath, try #google Sep 23 16:20:08 hi Sep 23 16:20:54 I would like to use started service across multiple activities, how can I check or how should I start this service to prevent calling startService multiple times? Sep 23 16:22:56 can I make an activity that does not stretch the entire screen? Sep 23 16:23:04 developing on android does really suck Sep 23 16:23:30 not all devices can handle my shaders. input lag is terrible. ui is a mess Sep 23 16:24:26 michaelmath: you will just have to live with that Sep 23 16:27:11 I probably should be using fragments for that Sep 23 16:27:17 michaelmath, so when you say "not all devices can handle", you mean "hundreds of devices can handle"? Sep 23 16:27:56 why am I feeding the trolls? Sep 23 16:28:38 yacek19: I think that startService does not restart an already running service Sep 23 16:28:48 yacek19: You might have to set some flag for that though Sep 23 16:29:29 marrrk: no, it doesn't. however I would like to make it clean and not to start service on every opened activity Sep 23 16:29:38 MikeWallaceDev: not trolling, just truth unfortunately Sep 23 16:31:55 yacek19: I'm not sure how to do this, then. Sep 23 16:32:39 marrrk: maybe just my delusions :) Sep 23 16:32:41 btw, is there a specific android version required to support gl es 2.0 (1.4) Sep 23 16:33:43 Googling not your strong suit? http://developer.android.com/training/graphics/opengl/index.html Sep 23 16:34:43 marrrk: "which is the recommended API version to use with current Android devices" Sep 23 16:34:46 great Sep 23 16:34:48 I know that Sep 23 16:35:09 michaelmath: http://developer.android.com/guide/topics/graphics/opengl.html Sep 23 16:35:15 api-level 8 Sep 23 16:36:03 Okay, sorry, then I don't understand the question. Sep 23 16:37:31 lol google made their own java interface to gl Sep 23 16:37:37 great even more unportability Sep 23 16:37:52 I'll stick with c++ thanks google Sep 23 16:39:46 Is there something like startFragmentForResult? Sep 23 16:41:12 Ah okay, no, I have to keep track of the current fragment and most probably use mutable state again. Sep 23 16:46:03 For a ball in maze, control with accelerometer and compass, what kind of game engine do you recommend? Simple top down 2 d graphics. Sep 23 16:47:16 troned: You can try libgdx. I like it better than AndEngine but those are the only two that I've tried. Well there's also Unity but that seems a bit overkill. Sep 23 16:47:37 I was not clear enough. Sep 23 16:47:44 I did not mean game engine Sep 23 16:47:48 i meant gameloop Sep 23 16:47:56 i am going to write it myself Sep 23 16:51:19 So if I do a try catch finally, will the finally always be run (aside from program termination), i.e. will it run after an error is caught? The specific use case is pull to refresh. I am doing a network call, interacting with the database, so I have a bunch of catches for errors. I don't want to put setRefreshing(false) on all the exit points. It would be great if I could just do a finally Sep 23 16:51:35 with unity you can code it in about 1 hour ;D Sep 23 16:52:28 mattblang, that's pretty much the overwhelmingly most common case for using finally Sep 23 16:53:09 you could say that's what finally was invented for ;) Sep 23 16:53:15 mattblang: http://docs.oracle.com/javase/tutorial/essential/exceptions/finally.html Sep 23 16:53:55 SimonVT yeah, I read that. but the first line "The finally block always executes when the try block exits" says nothing about if the catch block is iht Sep 23 16:53:59 *hit Sep 23 16:54:31 ravilov cool, I think ill replace all these lines with a finally then Sep 23 16:54:38 When an exception is thrown, the try block exist Sep 23 16:54:42 yes it also gets executed if an error occures. wouldnt make sense to have a finally if not Sep 23 16:55:02 And the catch block is entered.. if you're catching that exception Sep 23 16:55:15 danijoo, SimonVT, ravilov ahhh okay. I see now. So the flow is try block exits, finally run, catch block runs? Sep 23 16:55:19 mattblang, think about it, what would be the point of a finally block if it was skipped in case of an exception? Sep 23 16:55:24 the first line is very clear "always executes if the try block exists" Sep 23 16:55:43 danijoo, SimonVT, ravilov, lmgtfy__sigh_ yeah, makes total sense now. sorry, was thinking about it the wrong way Sep 23 16:55:44 is there anyway to print httpost with its parameters before executing ? Sep 23 16:55:50 or even after Sep 23 16:55:53 ? Sep 23 16:55:56 finally is executed last Sep 23 16:56:17 its always try -> catch -> finally Sep 23 16:56:40 also, in case you have a try/finally (no catch), if there's an exception first the finally is executed and then the exception is thrown Sep 23 16:57:35 ravilov, danijoo, SimonVT thanks a lot yall! Sep 23 16:58:09 mattblang, oh we had no idea either, we just googled it real quick, took about 2 seconds :p Sep 23 16:58:46 ravilov yeah, I did to. just didn't feel 100 percent about that line I referenced earlier, for whatever reason Sep 23 17:01:50 mattblang: You can also try to avoid exceptions altogether and work with the good old if else but I guess you have to use some exception flinging method. Sep 23 17:03:29 everytime i restart intellij, my android gradle project loses all the maven repo dependencies i add, why does it keep doing this? / how can i fix it? Sep 23 17:04:10 It's in the dependencies node in the module's build.gradle file Sep 23 17:06:43 Can I override the text colour for an entire layout? Sep 23 17:08:32 Also it keeps adding support library back in Sep 23 17:09:23 how exact is System.nanoTime? Sep 23 17:09:38 platform dependent but guaranteed to be monotonic Sep 23 17:09:50 troned: as exact as nano is Sep 23 17:12:04 troned: good read on it: http://stas-blogspot.blogspot.de/2012/02/what-is-behind-systemnanotime.html Sep 23 17:16:41 Is it normal that commenting out inside a tag doesn't work in xml? Sep 23 17:16:54 http://www.koonsolo.com/news/dewitters-gameloop/ Sep 23 17:17:00 why is making a simple http request to a self signed server so hard -.- Sep 23 17:17:06 interpolation seems like it could be troublesome Sep 23 17:17:36 nah it is easy Sep 23 17:17:50 DarsVaeda: The answer to that question is Java. Sep 23 17:18:00 i can post my implementation for you later today (~ 8 hours from now) when i get home Sep 23 17:18:29 I feel like I have tried every example implementation on stack an none works Sep 23 17:19:04 DarsVaeda: Are you sure you have the right permissions? Sep 23 17:19:29 it never said anything about permissions Sep 23 17:19:43 the only thing I get it "no certificate" Sep 23 17:19:55 marrrk: yes thats normal Sep 23 17:20:21 danijoo: Very good. What's not to like about that format? Sep 23 17:20:38 thats the real question ^^' Sep 23 17:21:03 yep marrrk that sucks... I usually copy paste the code outside of the tag and comment it there... Sep 23 17:23:24 marrrk, yes Sep 23 17:23:24 I usually don't comment anything out Sep 23 17:24:36 I'm commenting out stuff as I write this.... Sep 23 17:24:41 (no, really) Sep 23 17:25:35 so my .iml file keep sgetting overwritten, anyone know why this woul dbe? Sep 23 17:26:20 aapt's doing maybe? Sep 23 17:26:27 using intellij Sep 23 17:26:58 .iml files are constantly overwritten... Sep 23 17:27:13 so which thing is doing this so i can edit it ? Sep 23 17:27:23 lasserix, please do Sep 23 17:27:32 Hmm lasserix this may sound stupid but, do you need to close IntelliJ that often? Sep 23 17:27:35 basically everytime i restart intellij it dumps whatever changes i've made and goes back to the initial dependencies Sep 23 17:27:41 but if I interpolate I need to do collision handling again Sep 23 17:27:54 lasserix, is your .iml file write protected? Sep 23 17:27:56 marrk: yeah that is stupid, because i have to at least once a day ;p Sep 23 17:28:22 no Sep 23 17:28:49 <-- what a stupid fucking question, you just said that it's overwritten Sep 23 17:29:14 my thought was that you were losing the changes... Sep 23 17:29:25 But it's actually writting incorrect changes Sep 23 17:29:31 weird Sep 23 17:30:05 and you perform a Gradle sync, right? Sep 23 17:31:30 yeah Sep 23 17:31:57 well it gets weirder because i added a aar via a maven repo we set up here, (not on maven central) and it remembers that one Sep 23 17:32:09 but each time i restart it dumps anything from maven central, and re-adds the support library Sep 23 17:34:30 *marrrk thanks tho ;p Sep 23 17:35:14 I'm using the sbt plugin that pfn put together all by himself in his garage (I like to think) and that doesn't do weird stuff like that :) Sep 23 17:39:42 lasserix, one thing I don't get with interpolation is, if the updateGame code is running and thats where I do collisionhandling and stuff, then if I interpolate I need to do collisionhandling again... Sep 23 17:40:38 troned Sep 23 17:40:45 intepolation has nothing to do with collision handling Sep 23 17:40:54 interpolation is only used when you render Sep 23 17:41:07 you do collision before you ever calculate the interpolation Sep 23 17:41:46 so I have to calculate everything that will happen between frame X and X+1? Sep 23 17:41:53 interno Sep 23 17:41:56 err no Sep 23 17:42:10 you are interpolation between last and current frame Sep 23 17:42:23 because in his example he interpolates the position, but what if there is somethingat that position? Sep 23 17:42:23 not current and next, that would extrapolation Sep 23 17:42:28 http://www.koonsolo.com/news/dewitters-gameloop/ Sep 23 17:42:40 it doesn't matter Sep 23 17:42:46 you're collision should catch it Sep 23 17:42:53 then you handle it Sep 23 17:42:58 pass off the new current position Sep 23 17:43:16 and the interpolation is between last position (no collision) and new position (no collision, after handling the collision) Sep 23 17:43:26 let me repeat: it's between last and current NOT current and next Sep 23 17:43:40 That's how you can glitch through walls. Sep 23 17:43:44 you are always rendering "one step behind" is another way to think about it Sep 23 17:44:08 but since you're doing it at ~60 hertz it doesn't matter Sep 23 17:44:23 marrk: no again interpolation is purely for rendering Sep 23 17:46:02 ok Sep 23 17:46:36 lasserix, do you recommend the last way for my game? Sep 23 17:46:47 its one way to do things Sep 23 17:46:48 ball in maze, control with accelerometer+compass Sep 23 17:46:56 25 fps is fast enough? Sep 23 17:47:06 troned: tbh it's a little more than you need, probably Sep 23 17:47:12 seems a lot of people are happy using delta frame time Sep 23 17:47:23 but the big problem with that, is your simulation is not deterministic Sep 23 17:47:24 meaning? Sep 23 17:47:32 so you can't do things like rewind and its harder to do networked games Sep 23 17:47:49 hey all just heard about this channel. Hame some questions about android OS and i figure some in here may know the answers Sep 23 17:47:52 meaning you can't replay it unless you keep track of each update delta Sep 23 17:48:04 deterministic --> does the same thing each time Sep 23 17:48:23 or, the same set of inputs produces the same output, every time Sep 23 17:48:41 plus there are lots of other reasons, like the integration is more likely to be accurate Sep 23 17:50:37 troned: i believe a lot of people use Game Speed dependent on Variable FPS (i think even the libgdx uses this by default) Sep 23 17:50:43 which is much simpler Sep 23 17:50:55 which may be sufficient Sep 23 17:51:25 basically you could just implement that, if it doesn't work for you, swap out the game loop since the rest of the game shouldn't care what kind of loop you are using, just that its a loop Sep 23 17:56:33 If a view is nested inside a layout which visiblity is set to GONE Sep 23 17:56:38 Can some one help getting ProjectName and versionNameSuffix for MyProject_1.1.0.apk http://pastebin.com/8f1kAtNW Sep 23 17:56:40 can it then still be found with findViewById? Sep 23 17:56:44 or will that return null? Sep 23 17:56:47 Anyone care to help address a very unusual issue where the touchscreen on a tablet quits responding after a couple hours of use, but only after an OTA update has been applied ? (I can roll back and the issue no longer exist, so it honestly shouldn't be the hardware itself) Sep 23 17:56:57 Hi ColdSnowden1987 just ask away Sep 23 17:57:15 platzhirsch: no its still there Sep 23 17:57:24 lasserix: weird, alright — thans Sep 23 17:57:25 thanks Sep 23 17:57:48 the reference still exists but its gone from the view hierarchy Sep 23 17:58:13 Oh, forgot to mention, the tablet can be setting idle and the touchscreen will fail to respond after a couple hours still, and a restart cures it (through adb or hard power) Sep 23 17:59:18 sponix this channel's about app development, not really OS issues. is it stock ROM? the only rom-specific channel i know of is #cyanogenmod, otherwise if it's rooted in general then #android-root might be of use Sep 23 17:59:37 if it's stock, then you've likely just got a buggy OEM stack Sep 23 18:00:26 platzhirsch findViewById will find it Sep 23 18:00:34 sarbs: Well, I root it periodically for the better logging support, but outside of that the device is completely stock (No Modifications) Sep 23 18:01:02 View.GONE just means it's not accounted for during any rendering, but the view still definitely exists in the hierarchy Sep 23 18:01:05 sponix this channel's about app development, not really OS issues Sep 23 18:01:53 sponix cust support for the device then is the best advice i can give. even if you find the problem you won't likely be able to fix it Sep 23 18:02:01 i'd just keep it rolled back Sep 23 18:02:33 sarbs MikeWallaceDev : Ok, thanks for spelling out that this is more about apps than android itself. If I can narrow it down and it is a specific application causing the issue (slim chances), I will try to investigate further here about such application :) Sep 23 18:02:58 Good luck mate :) Sep 23 18:03:44 sarbs: Yeah, I feel lucky that they got a temp TWRP method for the device just prior to this OTA so I was able to do a full backup, and I have been just running it rolled back Sep 23 18:04:20 sarbs: Device is new, and not very common, so there is no Custom ROM support for it, and I haven't heard anything back from the company yet either. Sep 23 18:05:13 Odd part, Only xda dev working with it has taken this OTA, and he has some 3-5 sec burst lag on his device now, but none of this touchscreen becoming completely unresponsive until restart madness Sep 23 18:06:03 Is there any other debugging information I should be attempting to collect besides a verbose logcat ? Sep 23 18:06:40 lasserix, GetTickCount(), I dont get it Sep 23 18:06:47 getTickCount() > nextGameTick Sep 23 18:06:53 nextGameTick += SKIP_TICKS; Sep 23 18:07:05 wont that always be true ? Sep 23 18:07:23 MikeWallaceDev: Yeah, wish my kid wouldn't have already broken 2 tablets so he would be running the Nexus 7 instead of this Nabi DreamTab HD 8 Monstrosity Sep 23 18:07:36 GetTickCount could be System.nanoTime()? Sep 23 18:09:36 FUCK WHY IS THIS SHIT SO COMPLICATED Sep 23 18:09:44 ok, now I feel a little better Sep 23 18:10:38 first of all i have a few questions stemming from the fact that i think running your phone rooted is equivalent to running a linux distro as root, which is generally regarded as a bad idea Sep 23 18:12:28 is there an android rooting method that allows for a standard login for everyday use and a password protected access to the root account Sep 23 18:12:37 ColdSnowden1987: Well, it's not the same. Definitely not. Sep 23 18:13:10 ColdSnowden1987: Usually, you'll install (or get installed) an app that asks you for each root access. Sep 23 18:13:23 Thats the issue that is driving me crazy, what is the difference? Sep 23 18:13:34 ColdSnowden1987: You'll be able to tell it to remember this for a specific time, and accept or deny it. Sep 23 18:13:47 troned heh that confused me fora while getTickCount = SystemClock.upTimeMillis or nanoTime Sep 23 18:13:48 like super su? i have heard of that one Sep 23 18:14:13 getTickCount because ultimatly you want to to do your own game clock that handles roll over Sep 23 18:14:15 lasserix, the loop does not make sense to me Sep 23 18:14:39 sponix that's about all you can do. logcat has two other buffers that aren't normally paid attention to, 'events' and 'radio', but events is kernel-level debug info that's unintelligible w/o code knowledge and radio won't have anything to do with the display Sep 23 18:14:58 ColdSnowden1987 #android-root Sep 23 18:14:59 implement it, then make a update function that takes al ong time, see how it behaves, then make your render take a long time, see how it behaves and it'll make more sense Sep 23 18:14:59 ColdSnowden1987: So, when logged in as root, you can do all sorts of bs, without being asked again. You can do that on Android too, but you'd have to specifically use a terminal emulator to change to root. Otherwise, Super SU or comparable will ask you for each 'root request'. Sep 23 18:15:10 + i have a tiltsensor that fires all the time but I guess I will just update the acceleration/speed with it, not calculate collisions every time it fires Sep 23 18:15:27 ok got that, but what is to stop an application from being able to click "accept" on your behalf? is there something like windows secure desktop that stops processes running in the background? Sep 23 18:15:28 troned: you only do collision inthe update() call from your loop Sep 23 18:15:28 lasserix: or just use a 64 bit type and don't care about rollover Sep 23 18:15:49 Waynes1: yeah yeah Sep 23 18:16:08 sarbs: That kernel level debugging might shed some light if the right person looks at it, how hard is that to capture ? Sep 23 18:16:19 adb logcat -b events Sep 23 18:16:34 but it's more just a dump of message passing Sep 23 18:16:54 not very useful unless you're sitting there reproducing a bug and watching it step by step Sep 23 18:18:49 Has anyone used Flow and Mortar libs in there app? If so what are your thoughs? What benifits did it provide you. Sep 23 18:21:11 sarbs: adb logcat -v long > logName.txt is what I normally use to log to a file. I'll check and see if I can simply add that -b events in there. I really need it to continue to log to a file because I have to show it to others when possible :) Sep 23 18:21:22 sarbs: Thanks for the heads up ! Sep 23 18:21:39 trying to make an httpPost to an self signed server (just local testing) but always get the same error whatever I try, http://pastebin.com/cPfwR5sn can someone help how I further debug this and I still not get where ie. in this code it tells the app not to care about certification Sep 23 18:27:33 do I have to specify versionCode and versionName in AndroidManifest.xml if its specified in build.gradle as applicationIdSuffix and versionNameSuffix ? Sep 23 18:27:55 Can I change the color of a drawable shape when applying it in xml? Sep 23 18:27:56 t2mkn: gradle will override manifest Sep 23 18:29:59 danijoo: got it. how can i get the versionNameSuffix as a variable inside applicationVariants.all { variant -> ...... } ? Sep 23 18:50:06 hi guys Sep 23 18:50:30 i want a help if someone can, please can someone do me a web view project in eclypse? Sep 23 18:50:46 i allready have one but not opening in eclypse Sep 23 18:50:50 flan3002: is there some kind of mechanism that keeps a malicious piece of software from clicking accept on my behalf? is control of clicking on the screen buried where apps cant get at it? Sep 23 18:52:02 ColdSnowden1987: I don't think you have to worry about that. It never happened to me, and you could easily revert it if you noticed it. I don't know if they added it, but I know that it's possible and given the high quality of Super SU or the CM SU, I believe they did the right thing, whatever it is. Sep 23 18:52:57 flan3002: feeling lan? ;) Sep 23 18:53:21 Feeling what? Sep 23 18:53:35 flan3002: just joking, mean "F Lan" :P Sep 23 18:53:51 * flan3002 facepalms. Sep 23 18:53:58 lol Sep 23 18:54:09 * DelphiWorld inspect flan3002 keyboard & steal his code ;) Sep 23 18:54:42 * flan3002 doesn't worry because he does backups and source control. Sep 23 18:55:11 * DelphiWorld get flan3002 source control access so & git clone his repo:P Sep 23 18:55:35 flan3002: fun talk ball ;) Sep 23 18:55:38 DelphiWorld: You say you already have the code, but can't compile it? Sep 23 18:56:01 flan3002: yes eclypse making mad with accessibility Sep 23 18:56:06 * DelphiWorld is blind, flan3002 Sep 23 18:57:17 Oh... Yeah. Eclipse is a pos, so... Sep 23 18:57:32 flan3002: dont know what to do ;( Sep 23 18:58:19 wanna help flan3002 ? Sep 23 19:02:51 DelphiWorld: Is your code online? Sep 23 19:03:09 flan3002: it's a example i got on github Sep 23 19:03:15 Link? Sep 23 19:03:25 flan3002: hold on;) Sep 23 19:05:21 flan3002: https://dl.dropboxusercontent.com/u/97608608/android-webview-sample-app-master.zip Sep 23 19:06:12 flan3002: pm ? Sep 23 19:06:50 if I .restartLoader, should the onLoaderReset callback run? Sep 23 19:12:56 Cause I can't see to make onLoaderReset be called Sep 23 19:13:00 Hi :) Sep 23 19:13:30 When I start eclipse sdk i get Parsing Data for android-L failed Unsupported major.minor version 51.0 Sep 23 19:13:42 What i miss ? Sep 23 19:15:55 ok never mind, I found why :> Sep 23 19:25:38 Q: how can I center FrameLayout (camera preview) in ImageView that is in another FrameLayout ? Sep 23 19:35:38 is there a way to show current location on maps api v2 (the blue dot) without the current location button? Sep 23 19:36:17 gradle plugin 0.13.1 Sep 23 19:36:25 I know setMyLocationEnabled(boolean) shows the dot, but it also enables the button Sep 23 19:36:43 guys would someone be able to help me with eclypse and customising a project Sep 23 19:36:50 i have a sight issue Sep 23 19:36:53 accessibility Sep 23 19:37:17 If Eclipse can't be read by your tts, what can we do? Sep 23 19:37:54 flan3002: just changing the namespace and the url, and i can write code Sep 23 19:38:45 meh found my own answer: mMap.getUiSettings().setMyLocationButtonEnabled(false); Sep 23 19:45:31 can I use \n in android layout xml? Sep 23 19:45:45 or strings.xml for that matter? Sep 23 19:52:39 Soooo now that I've tried a number of libraries for this, does anyone know how to load gifs using Picasso? Sep 23 19:52:46 can't Sep 23 19:52:47 you can't Sep 23 19:53:33 flan3002: it is just strange to me that linux and windows put so much emphasis on the security of passwords and yet android is secure without them (not sure if my last message sent) Sep 23 19:54:38 Hey Afzal Sep 23 19:54:49 But but ... ImageViewEx page says deprecated for Picasso! :( Sep 23 19:54:51 if you want a “gif” you will have to deconstruct the image into a set of pngs Sep 23 19:54:53 hey tricknology Sep 23 19:55:10 Afzal: send us a reasonable PR and add it Sep 23 19:55:35 JakeWharton, will love it. Later this week then :) Sep 23 19:55:42 will love to** Sep 23 19:55:56 https://github.com/koush/ion supports gif Sep 23 19:56:01 then use animation-list Sep 23 19:56:49 maybe override a method in picasso to inflate that view as a “gif" Sep 23 19:57:57 http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html Sep 23 19:58:36 tricknology, I used animation drawable before but now I need to fetch the animation from the server. I'll check what ion does. thanks Sep 23 19:59:11 ah, np :) Sep 23 20:00:05 Are the L sources out anywhere? Sep 23 20:01:12 in the SDK manager Sep 23 20:01:34 Hey guys whats up Sep 23 20:02:21 API 20 “L preview" Sep 23 20:02:24 hey Sep 23 20:02:30 So I am attempting to read some data from a bluetooth serial module but I am not having any luck on android Sep 23 20:02:47 I get one of two values returned, either 128 or 248... Sep 23 20:03:25 tricknology: That's the source? Not just the binaries? Sep 23 20:03:48 sorry, i read that wrong, thought you meant docs Sep 23 20:04:24 tricknology: Oh, okay. Thanks anyway :) Sep 23 20:04:28 Would anyone be able to help me out possibly? I have been messing with this for the past few days and I cannot seem to figure out what is wrong with my code Sep 23 20:04:56 maybeh Sep 23 20:05:09 I am using .read() on an InputStream which should return an int value from 0 to 255 Sep 23 20:05:19 drewbug: it looks like there is an l-preview branch in AOSP Sep 23 20:06:02 It should just read a single byte at a time but I have no idea.. lol Sep 23 20:06:19 drewbug: oh, nevermind. that looks like it's only the gpl stuff, not the full source Sep 23 20:07:05 JesusFreke: I really just want to see the code for "BluetoothLeScanner.java" Sep 23 20:07:41 * DelphiWorld think no one wanna help ;( Sep 23 20:07:45 hi there, I have a custom ArrayAdapter that populate a list of product within a ListView on a fragment Sep 23 20:08:15 which row contains a button that when I clic/touch on it, it will show a new fragment Sep 23 20:08:49 but I don't know how to do it :(, I have already set OnClickListener of each button Sep 23 20:08:53 any tips Sep 23 20:08:54 ? Sep 23 20:09:16 drewbug: Do you have any experience with bluetooth serial communications? Sep 23 20:09:21 each* :P Sep 23 20:09:52 mcpackin: Not on Android, but why? Sep 23 20:09:59 Anyone using Android Studio who knows why Gradle does basically a full rebuild every time I debug my app? I.e. even if there are 0 changes, it rebuilds the entire project every time. Sep 23 20:11:03 drewbug: I am attempting to write an android app that will monitor the serial output from my ecu so I can see real time data on my phone, My laptop can already to datalogging and such I would just like to add the functionality to my phone aswell Sep 23 20:11:13 Hi, does anyone have an invite to http://oneplus.net/ ? Sep 23 20:12:14 mcpackin: Does it just use SPP? Sep 23 20:13:59 drewbug: Yeah it just uses SPP, at this point I am just trying to recieve data on android that isnt the value 128 or 248 lol, I can connect with my mac or windows pc and see that data is being transmitted correctly but on android I only recieve 128 or 248 Sep 23 20:14:35 Very weird! Sep 23 20:14:49 I know right Sep 23 20:15:18 mcpackin: Using http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createRfcommSocketToServiceRecord%28java.util.UUID%29? Sep 23 20:15:28 How do I get the nbr of pixels/inch? Sep 23 20:15:37 Sorry, createRfcommSocketToServiceRecord()? Sep 23 20:16:23 Yeah I am using this source https://github.com/janosgyerik/bluetoothviewer Sep 23 20:17:08 With a modifed InputStream read Sep 23 20:17:27 Does it work on any other apps? Sep 23 20:17:32 Here is the current read snippet I am using - https://forums.adafruit.com/viewtopic.php?f=53&t=60495&p=306251#p306251 Sep 23 20:17:50 With your Mac and Windows PCs, are you doing anything different? Sep 23 20:17:58 No every single app I have downloaded that can view bluetooth data in hex shows F8 or 80 Sep 23 20:20:06 Have you tried other Android devices? Sep 23 20:20:19 Bluetooth is finicky at best… Sep 23 20:20:21 .... Wow.. I didn't even think of that Sep 23 20:20:34 No I have not tried other android devices Sep 23 20:20:39 I am using a Nexus 5 to test Sep 23 20:20:42 Or, at least, Android's implementation is ;) Sep 23 20:20:59 Maybe give that a shot. Sep 23 20:21:34 Yeah I will definitely do that! I get off work here in 40 minutes so I should be able to test it out then Sep 23 20:21:42 Are you sure you're using SPP (RFCOMM) on the PCs and not L2CAP? Sep 23 20:22:05 Yeah I am using the SPP over bluetooth I believe? Sep 23 20:22:23 This module I am using is the https://www.adafruit.com/products/1588 Sep 23 20:22:57 I have also tried the HC-06 bluetooth module from amazon with the same results Sep 23 20:23:35 is restartLoader supposed to call the onLoaderReset callback? Sep 23 20:23:59 mcpackin: Huh. I don't know. Sep 23 20:24:06 if you run a runnable from a thread.. you’re probably wasting your time right? Sep 23 20:24:17 if the sole purpose of that thread is to run the runnable Sep 23 20:24:41 probably resetLoader()? Sep 23 20:25:15 it would make sense if retartLoader calledback onLoaderStart() onLoaderPause() Sep 23 20:25:24 err resume() Sep 23 20:25:29 drewbug: Yeah I am completely baffled by the outputs of 128 and 248... I was thinking it was because a byte can go from -128 to 127 and the value I am recieving is 0-255 but the InputStream.read() solves that with an int Sep 23 20:25:46 tricknology it would, but neither restartLoader nor resetLoader will make onLoaderReset run Sep 23 20:26:03 tricknology I did find this, https://code.google.com/p/android/issues/detail?id=68896, but I thought that it would have more attention if this was the case Sep 23 20:27:20 drewbug: Think it could be caused by using the art runtime instead of dalvik? Sep 23 20:28:03 mcpackin: I wouldn't expect so, but it's possible. You can swap it, right? Sep 23 20:28:47 Yeah I am going to swap back to dalvik and see if I notice any differences Sep 23 20:29:40 drewbug: I guess I am using dalvik, must have switched back during an update because I had it on art Sep 23 20:30:09 Darn. Sep 23 20:31:52 I am really curious to see if It could be just my phone... I have a few 2.3 android phones at home maybe the older os will work better? Lol Sep 23 20:32:34 For configuration changes in fragments, setRetainInstance(true) works for all of my fragments except the first one Sep 23 20:32:47 The first fragment crashes on orientation change Sep 23 20:33:56 Has anyone had that problem before? Sep 23 20:35:13 Hi Sep 23 20:35:13 within a class that extends an ArrayAdapter<>, I have to call this getSupportFragmentManager().beginTransaction(); Sep 23 20:35:37 my goal is to show a new fragment Sep 23 20:35:45 but there is an error in compilation Sep 23 20:35:55 getSupportFragmentManager not found Sep 23 20:36:21 any tips ? Sep 23 20:39:21 Anyone know if there's any way to do a long-running classic scan that doesn't murder battery life? Sep 23 20:39:31 Classic Bluetooth, that is. Sep 23 20:42:48 drewbug: Wish I could help :/ Sep 23 20:43:14 I really just want to do an LE scan, but LE scans literally completely break WiFi on a ton of devices. Sep 23 20:43:44 Really makes you appreciate the quality assurance team over at Google... Sep 23 20:44:12 hey guys, when I build an APK (in eclipse) does BuildConfig.DEBUG get set to false automatically or do I have to do that somewhere? Sep 23 20:44:19 noob questionyou have been warned! i got a preferences menu and added a button. how to make the app change back to the main view and refresh this when pressing the button? i do have the listener for the button i just dont know how to recreate the main view thingy Sep 23 20:45:00 finish() Sep 23 20:45:14 swedish() Sep 23 20:45:17 will this make the main thing be recreated? Sep 23 20:45:28 or startActivity(new Intent(context, yourActivity.class)) Sep 23 20:45:33 lasserix, maybe I am stupid but I don't get the gameloop code: while( ( getTickCount() > nextGameTick ) && ( loops < MAX_FRAMESKIP ) ) { gameEngine.updateGame(); nextGameTick += SKIP_TICKS; loops++; } Sep 23 20:45:33 zoraj: the getSupportFragmentManager() comes from the android.support.v4 library, make sure you're importing that one Sep 23 20:45:45 how does that give a constant gamespeed? Sep 23 20:45:50 no it will dismiss yourr current activity and bring up the last one that was main Sep 23 20:46:08 if you had something else before it, like another activity, not the main one it will display that one Sep 23 20:46:08 i need that main one to be redrawn/recreated/refreshed Sep 23 20:46:16 here Sep 23 20:46:19 JesusFreke: Lol. Sep 23 20:46:35 because i display some data based on a list and the choices in the preferences menu influence the filters on that list Sep 23 20:46:38 you need this in your life http://developer.android.com/reference/android/app/Activity.html Sep 23 20:46:56 and troned you need pastebin in your life Sep 23 20:47:35 Zylum, my problem is that I use it within a class that extends ArrayAdapter, not within an activity nor Fragment class Sep 23 20:47:49 FreshDumbledore, you either need to call finish() or startActivity(..), depending on where you are in your app Sep 23 20:48:31 tricknology: the 'workflow' is like this -> main to preferences -> change stuff -> submit changes by button -> preferences go away, main thing restart please Sep 23 20:48:57 so finish is fine but i think it wont recalculate what to display on main, will it? Sep 23 20:50:34 can i just destroy the main view on the preferences load and restart it when pressing the button? Sep 23 20:51:28 egh i wouldnt do that Sep 23 20:51:32 look into bundles and intents Sep 23 20:51:37 and startActivity() Sep 23 20:52:08 or just intent.getIntent().putExtras(b) Sep 23 20:52:20 Bundle b = new Bundle() Sep 23 20:52:33 b.putString(“string”) Sep 23 20:52:35 etc Sep 23 20:52:45 then in your main activity Sep 23 20:53:16 zoraj: I'm not sure why you would want a fragment manager inside your adapter, other than an onclick listener that performs transactions, which can be done but it's not really practical Sep 23 20:53:16 Bundle b = getIntent().getExtras(); Sep 23 20:53:34 b.getString(“key”,”whattoreturnifitsnotthere”) Sep 23 20:53:40 if i call startActivity(getIntent()); after finish() will it get the main activity? Sep 23 20:53:55 sure Sep 23 20:54:16 because i tried some intent = getIntent; finish; startActivity(intent) before and that recreated the preferences screen xD Sep 23 20:54:33 so does it now :< Sep 23 20:54:44 getIntent returns the prefrences screen Sep 23 20:54:47 thats because the intent you got was the one to create the preferences screen Sep 23 20:55:01 and you started that activity Sep 23 20:55:11 maybe i should just get rid of that save button and do it as a refresh button in the main activity Sep 23 20:55:13 make a new intent with the main class Sep 23 20:55:27 nah do this ^ Sep 23 20:55:35 i need a refresh button anyways Sep 23 20:55:36 :D Sep 23 20:55:47 so maybe the idea of a save button is just wrong Sep 23 20:56:11 hi boys, could I Unit test that an Activity loads if I click a button? .. So far I'm thinking about like.. clicking the button.. doing a 'wait 5 sec' and then check name of current activity .. but maybe there is a smarter way Sep 23 20:58:53 refresh buttons are the devil's work Sep 23 20:59:13 i've got an activity and a fragment, both bind to service in onStart(). but even though activity's onStart() is called first, fragment is the first to connect to service. how can i avoid this? Sep 23 21:01:17 oakkitten aside from waiting to bind until the activity is connected, you can't Sep 23 21:01:31 bindService -> onServiceConnected is asynchronous and makes *no* guarantees of timing Sep 23 21:02:11 why android why. Sep 23 21:04:04 why does it matter who binds first? Sep 23 21:04:31 seems like that's an app-specific dependency.. so in this case, why oakkitten why. ;) Sep 23 21:08:19 Zylum, here is my code, http://pastebin.com/JNzphXMA Sep 23 21:08:19 the problem is in line 44 Sep 23 21:08:22 my fragment does stuff when it's fully visible. but i want to open navigation drawer on certain intent, after connecting to service. and because of this, fragment can't reliably tell if it should do stuff or not Sep 23 21:08:30 as you can see, it extends an ArrayAdapter Sep 23 21:08:39 my solution was - split the code into two methods, run the first method, show a ProgressDialog and initiate binding to service, which then calls the second part when connection is established Sep 23 21:08:50 oakkitten, ^ Sep 23 21:09:01 I use this ArrayAdapter to populate date within a listView which is elsewhere in a Fragment Sep 23 21:09:08 data* Sep 23 21:10:26 ravilov: my problem is that binding to service is performed out of order Sep 23 21:11:16 oakkitten java offers tons of concurrency options to enforce ordering Sep 23 21:12:10 oakkitten, sadly you'll have to deal with that any way you can, since yeah, there is absolutely no guarantee on order of binding Sep 23 21:12:17 async calls are like that Sep 23 21:12:21 it's made even easier by the guarantee that onServiceConnected is always run on the main thread, even, so you don't actually even have to use concurrency classes.. just keep a flag in each for whether it's connected (which it needs to anyway, if you're gonna handle disconnects intelligently) Sep 23 21:13:23 an alternative to the ProgressDialog is having all relevant UI elements disabled and enable them when the connection is established Sep 23 21:13:38 for me ProgressDialog worked just fine ;) Sep 23 21:13:46 troned: what you are doing is doing as many updates as max updates, while the renderer is working Sep 23 21:14:03 so if the rendering takes along time, you do more updates, and if the updates take a long time you do more renders Sep 23 21:14:08 'just keep a flag'... what i'll have to do is make a MyActivity.bind() that mantains a list of buffers that want to bind to service and calls onServiceConnected() manually. i guess Sep 23 21:14:39 err. wut? Sep 23 21:14:51 shouldn't ever call onServiceConnected manually Sep 23 21:15:23 oakkitten, can't you delay opening the drawer (or any other visual action) until onServiceConnected is called? Sep 23 21:15:37 also yeah, don't call framework callbackas directly/manually Sep 23 21:16:44 ravilov: : stuff my fragment performs is instanteous. it will finish before the activity gets connected to service Sep 23 21:17:03 well, not framework callback, but a similar method Sep 23 21:17:11 from my experience, even though I put the effort of showing a ProgressDialog until the connection is established, in reality I never actually see it - while connections are async and disordered, in reality they are almost immediate Sep 23 21:18:09 can I ask a structural Unit testing question ... I can extend different classes... AndroidInstrumentationTest2 .. ActivityUnitTestCase .. would you do a class for each of these? I suppose I have to, so each code class would end up with 2-3 testing classes ? Sep 23 21:18:11 seriously, I literally never see the ProgressDialog, at one point I deliberately put a delay in onServiceConnected to make sure it actually works, lol Sep 23 21:18:20 so make it wait until activity is connected as well. or, what i'd do, is simplify the flow and just make activity's onServiceConnected trigger the fragment to bind Sep 23 21:18:45 sarbs, uh, that destroys the concurrency Sep 23 21:19:01 hmm there is a lot of GC going on in my code although I thought i eliminated it Sep 23 21:19:10 can I log somehow what is being gc:ed? Sep 23 21:19:18 I'd just have maybe two flags, activityConnected and fragmentConnected, and delay any actions until both are true Sep 23 21:19:21 my fragment is in the viewpager, not sure if there's an easy way to tell which fragments should the call Sep 23 21:19:31 P3nnyw1se unit test classes are usually component-specific, so you'd have a MyActivityTestCase extends ActivityInstrumentationTestCase2, a MyServiceTestCase extends ServiceTestCase, etc Sep 23 21:19:39 you don't have to have an implementation of each if you don't need them Sep 23 21:19:44 FreshDumbledore you could save things to a prefs file if you are saving preferences. or a database file if you are saving a lot of prefs Sep 23 21:19:58 besides, it's impossible to tell what's the life cycle of these fragments... Sep 23 21:19:59 lasserix, while the renderer is working!? Sep 23 21:19:59 ravilov well, putting ordering to the code by definition destroys concurrency ;) Sep 23 21:20:05 tricknology: i did read something about android and storing preferences yesterday, it sounded like its pretty easy to do Sep 23 21:20:10 if you just pass the data to the main without committing to a file you will lose those changes Sep 23 21:20:13 i mean i do updates until time to render...not in parallell Sep 23 21:20:16 it is Sep 23 21:20:25 sarbs let me get that ABC.. you saying.. 1 test case = 1 Class ? Sep 23 21:20:26 it’s just not great when you get a lot of preferences Sep 23 21:20:34 tricknology: it was about some sharedPreferences default file i think Sep 23 21:20:39 it’s quick and dirty Sep 23 21:20:42 yes that’s it Sep 23 21:20:42 troned: its up to you do the updating on a seperate loop, but i believe this loop is doing them on the same thread Sep 23 21:20:50 it’s just a a glorified text file Sep 23 21:20:55 with a key and value Sep 23 21:21:03 sarbs, yeah but while you have to wait for both connections in order to proceed, at least the connections could run in parallel Sep 23 21:21:05 Zylum, I have the same problem with this guy http://stackoverflow.com/questions/18689727/getfragmentmanager-from-arrayadapter Sep 23 21:21:09 P3nnyw1se yeah, then each conceptual test case has a series of tests. ie, i have several activities and each has its own TestCase class. then in those classes i write tests specific to that activity Sep 23 21:21:10 tricknology: basicly i just want some checkboxes to be ticked/unticked and this values stored as bools somewhere. and my main activitiy displays values based on this bools Sep 23 21:21:24 yeah sure do it in sharedPrefs Sep 23 21:21:45 sarbs: ordering should really be observed. i take it android api takes special measures to break it. i mean, how on earth bindService that gets called later gets the result first? because it's not a lifo queue Sep 23 21:21:48 oh Sep 23 21:21:53 thats a lot of work! Sep 23 21:21:59 ravilov like you said, that's not really a delay. once a Service is started, further bind calls just trigger another onBind call, not another onCreate Sep 23 21:22:05 lasserix, so the posted code does no make sense unless the rendering is on another thread? I run it as abackground thread then I run the rendering on the UiThread Sep 23 21:22:08 anybody knows how to resolve this http://stackoverflow.com/questions/18689727/getfragmentmanager-from-arrayadapter Sep 23 21:22:12 pls Sep 23 21:22:15 and most onBind implementations return effectively a constant Sep 23 21:22:16 ? Sep 23 21:22:29 sarbs, true but still, at least the /illusion/ of concurrency :p Sep 23 21:22:33 troned: you can just let the thread be the surfaceview thread Sep 23 21:22:43 troned: for now don't worry about running update in a seperate thread Sep 23 21:23:06 also, onBind gets called only once Sep 23 21:23:12 zoraj seems like the question is already answered Sep 23 21:23:16 sarbs, technically he probably doesn't even have to bind twice, he could just bind in the activity and the fragment could reuse the connection Sep 23 21:23:23 oakkitten android doesn't break anything.. the underlying mechanism is a kernel driver called Binder and a *whole lot* of threads Sep 23 21:23:31 further bind calls don't call onBind Sep 23 21:23:31 well it is somewhat working, seems my collision check might be to slow because it starts hacking a bit there Sep 23 21:23:35 troned: but make sure you pass a deep copy of your state to the render function, since you don't want update to write to the state that is being drawn Sep 23 21:23:55 sarbs: just explain then, how it's executed out of order Sep 23 21:23:58 oakkitten they will if they come from actually different connections.. i believe but am not sure that fragments binding to services use the activity as the originating context Sep 23 21:23:59 tricknology: whew, it works to create my whole main view with finish() and startActivity. how would i recreate it a way it doesnt look like reopening? xD Sep 23 21:24:14 oakkitten different threads.. Sep 23 21:24:21 troned: there's a lot of optomizations you can do for collision detection Sep 23 21:24:30 lasserix, I lock for now. Sep 23 21:24:31 sarbs: activities, fragments and services all run on main thread actually Sep 23 21:24:44 besides, queues Sep 23 21:24:54 in your case there may be something like fragment connections get processed before the parent activity's connections, or something, but they come from the same context Sep 23 21:25:15 yeah, well, how? Sep 23 21:25:16 oakkitten, activities and fragments maybe, but the service is a whole another task with its own "main thread" Sep 23 21:25:17 oakkitten mm.. callbacks run on the main thread. once you get into IBinder, stuff gets weird Sep 23 21:25:17 troned: what is a good idea, i believe, is to have a class that represents something that is drawn, then ulimtatly your state/world gets updated, generates a list of these drawables which the rendering call uses Sep 23 21:25:19 lasserix, my collision is just create a list of all points between (currentX,currentY) to (currentX+speedX,currentY+speedY) then move along those points until collision Sep 23 21:25:39 ravilov: service is run on main thread, unless it's IntentService Sep 23 21:25:39 troned heh yeah that's probably not what you want to stick with Sep 23 21:25:48 no Sep 23 21:25:50 oakkitten, but it is a different "main thread" Sep 23 21:25:55 but it should be fast shouldn't it? Sep 23 21:25:57 oakkitten dunno, that's a FragmentManager implementation detail. maybe it was easier to implement it so children got called first, who knows Sep 23 21:26:10 ravilov actually not true, if the activity and the service are in the same process Sep 23 21:26:17 troned: depends on how many points you have, can be very, very big since you have to test each point against each other point Sep 23 21:26:22 a service can block ui Sep 23 21:26:28 hey guys, anyone integrated MoPub? Sep 23 21:26:29 hmmm Sep 23 21:26:42 n log n if you remvoe points that are already tests (don't test B A if you test A B) Sep 23 21:26:43 sarbs: maybe.. i'd just love to see that in the docs :| Sep 23 21:27:02 however that's only for callbacks - methods accessed thru Binder are run on any of up to 15 threads, none of which are main thread Sep 23 21:27:28 troned: but ultimatly you probably want to implement a quad tree or something like that so basically you divide the area up into portions and only test objects in the same portion Sep 23 21:27:29 oakkitten it's not documented because the docs explicitly say it's asynchronous and thus make a guarantee of no guarantees about timing Sep 23 21:27:48 asynchronous =/= unordered Sep 23 21:28:04 what you're seeing about the fragment connecting before the activity might change on a different device or api level Sep 23 21:28:30 and this is a huge problem Sep 23 21:28:41 this can potentially hide a lot of problems Sep 23 21:28:59 well i'm not going to argue about what docs should say, but you can believe me about this ;) bindService <-> onServiceConnection is guaranteed unordered Sep 23 21:29:00 lasserix, I just have 1 moving object (the ball) and everything is squares so I dont need to check so much. Just check the corners if they are a goal/obstacle/hole Sep 23 21:29:14 tricknology: may i annoy you in private a bit? <3 Sep 23 21:29:31 P3nnyw1se, but it doesnt work Sep 23 21:29:31 in your main activity look into using StartActivityForResult() Sep 23 21:29:38 startAcrivityForResult() Sep 23 21:29:47 nah, its better here in case anyone has any qs about it Sep 23 21:30:12 in your preferences activity dont call startActivity Sep 23 21:30:16 instead call only finish Sep 23 21:30:25 and setResult(RESULT_OK) Sep 23 21:30:29 i changed it to a general refresh button right in the main activity now and did finish and startactivity there Sep 23 21:30:35 but that makes the app look like closing and reopening Sep 23 21:30:44 then in your main activity you need an onActivityResult() method Sep 23 21:30:56 so i tried with the thing the source does when the app launches, thats calling a function to add the list items on display Sep 23 21:31:02 but when i do this the app closes :-D Sep 23 21:31:18 that will be called when your preferences activity calls destroy() (after finish(), it happens automatically, you would see that by looking at the Activity link i sent you) Sep 23 21:31:45 forget about preferences Sep 23 21:31:49 its all in the main view now :D Sep 23 21:31:49 from what i see, it's pretty much 'ordered', except in a wrong way. fragments ALWAYS get service before activity, besides, in perfect fifo manner Sep 23 21:32:00 i made it a button in the actionbar Sep 23 21:32:11 oakkitten i understand, but that's subject to change at any time Sep 23 21:32:20 then you’re done... Sep 23 21:32:25 its labeled 'refresh' and i want the main view to be recreated like when the app starts Sep 23 21:32:38 ok but you want the bixes ticked? Sep 23 21:32:38 but without making it look like it closes down and reopens (: what it does now Sep 23 21:32:52 nono i will care about my preferences menu and storing this values tomorrow Sep 23 21:33:04 sarbs: just saying, there's probably a lot of code that implicitly relies on this behavior Sep 23 21:33:04 i just want to fix that it looks like closing and reopening right now :D please Sep 23 21:33:10 im confused.. Sep 23 21:33:15 anyways, back to inventing a bicycle Sep 23 21:33:25 so you started the activity.. ticked some boxes and hit refresh… you want the boxes to untick? Sep 23 21:33:43 when you hit the refresh button? Sep 23 21:33:53 finish and start a new activity Sep 23 21:33:55 what happens if you register two fragments with otto, they both subscribe to the same type, then you post to the bus with that type Sep 23 21:34:03 guess they will both run? Sep 23 21:34:12 tricknology: hmm no, really, forgot all about boxes and preferences. when the app launches it downloads a rss feed and displays data. i want this to be done again when i click the refresh button. if i do it with finish and startactivity it does that but it visually looks like the app closes down and reopens Sep 23 21:34:28 mattblang: yes. Bus is 1:many Sep 23 21:34:31 oh Sep 23 21:34:52 can you post the activity? there are a lot of ways to do that and i want to see which would be easiest Sep 23 21:34:55 in a nut shell Sep 23 21:34:58 tricknology: (i will make it consider the preferences when using refresh tomorrow, so that solves this problems too) Sep 23 21:35:03 Does anyone know how to add SwipeRefreshLayouts to both the ListView and empty view of the standard list_content? Sep 23 21:35:15 JakeWharton I was trying to get away with just sending the Callback response (or Retrofit error) straight to the bus, but I should probably go ahead and wrap it I guess. In case we optimize for tablets and show multiple fragments in landscape Sep 23 21:35:20 in you need to just get the data from the feed and textbox.setText(feedData) Sep 23 21:35:36 it will refresh automatically Sep 23 21:36:24 onClick(){ String feed = getRSSFeed(); textbox.setText(feed); } Sep 23 21:36:25 dont Sep 23 21:36:27 done* Sep 23 21:36:45 tricknology: hmm. its a bit complicated. and also its an open source rss reader i use as a base, he does it all a bit confusing. but i will try to point the workflow out.. sec Sep 23 21:37:01 well how do you get the RSS feed to string? Sep 23 21:37:10 just call that and call setText on your text box Sep 23 21:37:24 u dont need to post code if thats all you’re doing Sep 23 21:37:56 oakkitten possibly, but there's bad code everywhere.. can't start adopting new contracts for APIs because people are using them incorrectly Sep 23 21:38:27 FreshDumbledore: maybe they are using a Loader? In that case, you would restart the Loader in the onClick(), and everything would be handled automatically. Sep 23 21:38:29 i don't actually think it's too common to have two clients of a service have an implicit timing dependency on each other, however Sep 23 21:38:42 tricknology: well he does if (savedInstanceState == null) { addRssFragment(); } in the MainActivity class and addRssFragment does a lot of FragmentManager stuff and creates a new new RssFragment() which is in the RssFragment.java class .. and there ... Sep 23 21:40:10 tricknology: in there is a View onCreateView() thing .. and this .. checks for if view == null or "if we return from a configuration change" and then it would parent.removeView(view) .. Sep 23 21:40:15 thats not getting anywhere, is it? :-D Sep 23 21:40:19 should i just start my own code? xD Sep 23 21:41:51 tricknology: str4d as i saw that he basicly does addRssFragment(); when the app launches i tried that for my refresh button too but when i do this the app will close down (i think some overflow thingy) Sep 23 21:43:27 stackoverflow? Sep 23 21:43:53 past code i guess.. Sep 23 21:43:59 tricknology: thats the reader im using as a start .. http://androidresearch.wordpress.com/2013/06/01/creating-a-simple-rss-application-in-android-v2/ Sep 23 21:44:15 (thats the tutorial page, the whole thing is linked on it) Sep 23 21:46:02 lol I promise you I've been on the net searching this Sep 23 21:46:08 but I might have a mental breakdown Sep 23 21:46:11 i dont know why it closes, console and errorlog dont show anything and logcat also doesnt show an error Sep 23 21:46:24 how do I reach, class variables in a test class? Sep 23 21:46:44 with a get function inside your test class returning the values? Sep 23 21:47:26 nah i need your main activity Sep 23 21:47:36 wherever this is called Sep 23 21:47:45 but, so I need to do get methods, on all variables I wanna use in a Test Class.. that already associates with the class ? Sep 23 21:47:48 that seems crazy Sep 23 21:47:57 tricknology: thats after the line '4. Here’s how MainActivity.java looks like:' in that link but i can also give you some pastes Sep 23 21:48:24 oh you’re using fragments.. Sep 23 21:48:32 he is Sep 23 21:48:33 :P Sep 23 21:48:35 so yes i am Sep 23 21:48:47 (i guess :b) Sep 23 21:49:02 P3nnyw1se you probably don't actually want to do that. why are you trying to inspect the innards of your class under test? Sep 23 21:49:28 thanks for spending time helping me tricknology Sep 23 21:49:29 dont use startActivity for fragments Sep 23 21:49:59 well in this case, I have a MediaPlayer mp; ... and In a test Class I'm trying to assertTrue that the mp, isPlaying(); .. when I run the application Sep 23 21:50:26 In terms of latency, how realistic is it to make a tetris-like game for two users to play each other on their individual android phones? Sep 23 21:50:29 call this from the fragment to have it “finish()” Sep 23 21:50:31 getActivity().getFragmentManager().beginTransaction().remove(this).commit(); Sep 23 21:51:07 and jsut call addRssFragment() onclick Sep 23 21:51:38 look into Handler and Message to pass data between fragment and main activity Sep 23 21:51:57 tricknology: right now i do have onOptionsItemSelected(MenuItem item) in my MainActivity, checking for the ID of the menu item to get the activitybar buttonclick Sep 23 21:52:20 i can not call getActivity().getFragmentManager().beginTransaction().remove(this).commit(); from there because MainActivity doesnt know about that Sep 23 21:52:38 where would i do that and how to make it happen onClick there? Sep 23 21:52:39 lasserix, ty for all your help, I defineately seem to be on the right track now. Might be doing some stuff wrong but movement is smoother and I got rid of a problem where ball seemed to get extra speed Sep 23 21:52:49 right on Sep 23 21:52:51 np Sep 23 21:52:58 i will post some of game engine code that uses all that Sep 23 21:53:20 tricknology: and addRssFragment() without the remove..commit thing is what i tried now, that makes the app overflow/close :D Sep 23 21:53:40 remove it then add Sep 23 21:53:52 i want to. but i can not do that in MainActivity, can i? Sep 23 21:54:00 make RssFragment fragment a global variable Sep 23 21:54:08 error is The method getActivity() is undefined for the type MainActivity Sep 23 21:54:46 then onClick().. manager.beginTransaction().remove(fragment).commit(); Sep 23 21:54:56 course sorry, your class extends Fragment Manager Sep 23 21:55:29 the FragmentManager manager; and RssFragment fragment; in the global scope Sep 23 21:55:37 then you can access them onClick Sep 23 21:55:39 if i move the onOptionsItemSelected(MenuItem item) over the the RssFragment.java the getActivity is fine but the addRssFragment can of course not be found :D Sep 23 21:55:54 using manager.beginTransaction().remove(this).commit(); Sep 23 21:55:56 err Sep 23 21:56:09 manager.beginTransaction().remove(fragment).commit(); Sep 23 21:56:32 is it recommended to implement a custom view into the viewpager or should i use die actionbar in navigation mode for this? Sep 23 21:56:57 the* Sep 23 21:58:15 lasserix, can I pm my email to you? i will be logging off now Sep 23 21:58:17 tricknology: testing Sep 23 21:58:46 sure Sep 23 21:59:19 did you get it? Sep 23 21:59:21 sarbs so I can't reach variables from test classes? Sep 23 21:59:26 tricknology: looks like it works! awesome! Sep 23 21:59:53 yay :) Sep 23 21:59:54 Can I log what stuff is being GC:ed? I am doing massive garbage collection and I thought I removed most of it. Sep 23 21:59:57 P3nnyw1se for that i would write a package-private getter method Sep 23 21:59:59 tricknology: i feel like a blindfolded pony being guided through a minefield :-D Sep 23 22:00:04 now go read up on activity and fragment activity lifecycles Sep 23 22:00:04 and then put the test class in the same package Sep 23 22:00:14 and Message and Handler class Sep 23 22:00:20 will probably help you a lot Sep 23 22:00:22 tricknology: but you made me get through it xD Sep 23 22:00:40 yeah, I hate when ppl just point to docs and tell me to read.. Sep 23 22:00:53 now that it works, you could figure out why Sep 23 22:01:02 or just copy paste modify that code forever Sep 23 22:01:03 P3nnyw1se ideally, object encapsulation is a higher priority than testing - it makes code really ugly to have a bunch of spy methods. however in practice, you have to find a balance Sep 23 22:01:05 i like this way to learn best. i get some vague ideas of what is going on and can read further on them if i care or not if i dont Sep 23 22:01:10 you’ll get it some time Sep 23 22:01:18 haha that’s how I work too. Sep 23 22:01:35 i know there is some fragment stuff now, whatever it is. not sure if i would ever use it myself. so maybe i want to find out what it is xD Sep 23 22:01:37 I have been in this forum for 3-4 years Sep 23 22:01:41 doing just that Sep 23 22:01:57 it;s handy, you better learn it Sep 23 22:02:04 but maybe i will just finish my app first and then when its done create another one with the stuff i found usefull Sep 23 22:02:12 especially if you want different things to happen on a tablet or a phone for instance Sep 23 22:02:26 side loading menu or new page Sep 23 22:02:31 hi, anyone used the ndk for sensor reading? i try to set the event rate via "ASensorEventQueue_setEventRate", but it doesnt apply. if i turn the device off (standby) it changes to the appropriate event rate.. bug? Sep 23 22:02:44 lots of sweet UI stuff comes with fragments that you cant get with activities Sep 23 22:02:45 i do want a side slider and i read today that there is something .. drawer stuff .. to do it :D Sep 23 22:02:55 yep Sep 23 22:03:18 once that drawer is out, you can change its content by clicking items in the sidebar Sep 23 22:03:24 much like you just did Sep 23 22:03:32 makes the UI smoother Sep 23 22:03:53 yeah this remove and add commands will come in handy Sep 23 22:04:26 should i be able to assign an AlphaAnimation to a child view and start it? Sep 23 22:04:46 lol you should check if that’s the proper way to do it though Sep 23 22:04:58 i dont mess with fragments often but i have a project coming up that will require them Sep 23 22:05:03 so I will learn more then Sep 23 22:05:03 same code works fine if i use startAnimation(animation), but doesn’t do anything if i do child.startAnimation(animation) Sep 23 22:05:08 brummel444, it sounds like you need to restart the sensor Sep 23 22:05:28 Mavrik: restart the sensor? disable / enable? Sep 23 22:05:41 oh.. use replace() FreshDumbledor Sep 23 22:05:46 let me knwo if that works.. Sep 23 22:05:47 well my app is just gonna be for me and a few other people playing a browser game (: Sep 23 22:05:47 cool the iphone 6 is bendable too! Sep 23 22:05:56 microwaveable as well Sep 23 22:06:01 charges fast Sep 23 22:06:06 haha no they are not Sep 23 22:06:09 we have 2 here Sep 23 22:06:17 how would the replace syntax be? Sep 23 22:06:27 i guess there’s an ad floating around that says it is and people are falling for it Sep 23 22:06:35 transaction.replace(newFragment) Sep 23 22:06:38 .commit() Sep 23 22:06:51 idk, look it up Sep 23 22:07:08 http://www.ctvnews.ca/sci-tech/iphone-users-target-of-wave-microwave-charging-hoax-1.2020158 Sep 23 22:07:18 maybe this article itself is a hoax, or clickbait Sep 23 22:07:57 I was wondering the same Sep 23 22:08:06 I must be missing something here sarbs, cause I can't seem to access the methods of the class Sep 23 22:08:07 “Wave” haha Sep 23 22:08:07 sacrifice an old iphone 5 and profit Sep 23 22:08:12 they gave it an apple-like name Sep 23 22:08:21 you should have seen the one for iOS 7 Sep 23 22:08:27 Does someone know if the recommended padding for content views is available somewhere? Sep 23 22:08:30 the waterproof one? Sep 23 22:08:49 http://cheezburger.com/110341 Sep 23 22:08:51 lol ya Sep 23 22:09:02 if you ask me, the graphic was much more convincing Sep 23 22:09:10 i’m coming to the end of a 13 year career as a cable technician… i can tell you without doubt there are plenty of people stupid enough to do this Sep 23 22:09:18 basically, these things : @dimen/activity_vertical_margin (I only have the variable name, not the values) Sep 23 22:09:25 need help here, pastebin is self explanatory Sep 23 22:09:26 http://pastebin.com/6Z74bW9W Sep 23 22:09:29 i’ve had service calls for non-working remotes because they put the batteries in backwards Sep 23 22:10:00 FreshDumbledore: it’s transaction.replace(R.id.yourfragmentcontainer, newFragment).commit() Sep 23 22:10:17 probably 1 or 2 operations less than remove and replace Sep 23 22:10:25 = better performance Sep 23 22:10:28 P3nnyw1se, is that method public? Sep 23 22:10:44 there are several public methods in the class Sep 23 22:10:49 I can't reach any of them Sep 23 22:11:07 seems like you are calling them staticly though Sep 23 22:11:15 that ad is pretty official looking Sep 23 22:11:34 P3nnyw1se https://developer.android.com/tools/testing/activity_test.html Sep 23 22:11:41 you should have an instance of HomeActivity, not the class name Sep 23 22:11:48 there is too much wrong with that test case to coach you through it, i'm sorry :( Sep 23 22:12:09 or at least, i don't have enough time to. didn't mean to make you sound hopeless lol Sep 23 22:12:33 but you do need to re-up on some of the fundamentals, especially if you haven't yet Sep 23 22:12:42 awesome.. the Activity testing tutorial.. seen that a few times by now :) Sep 23 22:13:19 haha. well, the advice i'll give you - ActivityUnitTestCase is probably *not* what you want, i would imagine that you want ActivityInstrumentationTestCase2 Sep 23 22:13:30 Well, you should have read it more often... mActivity = getActivity(); Sep 23 22:13:34 it will start up your activity for you, and let you access it as a live object Sep 23 22:13:49 p3nnyw1se, try instantiating HomeActivity.class Sep 23 22:13:50 tricknology: i did it now like this => http://pastie.org/9589188 it does work Sep 23 22:13:58 how to one-line it? :-D Sep 23 22:14:05 tricknology that wouldn't work either Sep 23 22:14:15 you have some context issues? Sep 23 22:14:21 nice Fresh! Sep 23 22:14:21 I have ActivityInstrumentationTestCase2 running.. but was advice.. by that guide to ONLY use it if I was doing layout or graphical tests Sep 23 22:14:38 thats why I made this instead.. as the guide tells me to use this one for logic testing Sep 23 22:14:52 isPlaying i would say is a graphical test, no? Sep 23 22:15:20 tricknology: can i do that on one line? the part where i have to create a new RssFragment made me do it on multiple lines Sep 23 22:16:02 lol ya but debugging would be a bitch Sep 23 22:16:08 ActivityInstrumentationTestCase2 creates your activity, attaches it to a base context, and runs it through the lifecycle, exactly as if it were started by the system. ActivityUnitTestCase does *not*, which is the critical difference. anything your activity does that accesses the framework, thus, will not work in an ActivityUnitTestCase Sep 23 22:16:40 which is why I start it .. in the setup() method Sep 23 22:16:44 as adviced by the guide you pasted me Sep 23 22:17:03 FragmentT ft = manager.beginTransaction().replace(R.id.fragment_container, new RssFragment).commit() Sep 23 22:17:22 the "logic" testing it's saying is things like testThatFunctionAddFiveToTenReturnsFifteen() Sep 23 22:17:42 not "logic" as in "is my activity running correctly".. that requires instrumentation Sep 23 22:17:47 tricknology: you mean => manager.beginTransaction().replace(R.id.fragment_container, new RssFragment()).commit(); Sep 23 22:17:48 :D Sep 23 22:17:49 ^ Sep 23 22:17:56 arguably I can move it to the other test .. but what I dont understand is the problem with the code I pasted to you eitherway Sep 23 22:17:59 yeah yeah Sep 23 22:18:00 you say 'so much is wrong with it' Sep 23 22:18:07 thats the guide right there Sep 23 22:18:09 ok i will keep it like that <3 :D Sep 23 22:18:16 your call Sep 23 22:18:43 you are right that AndroidTestUnitCase does not start the acitvity so the guide tells me to do it in the setUp(); like I did Sep 23 22:18:46 now i just need to learn how to save preferences - tomorrow - and customize my preferences menu Sep 23 22:18:50 then this app is done lol (: Sep 23 22:20:02 now that we are at it and before I get a mental break down, can you guys recommend some form of third party software to performance test applications ? Sep 23 22:20:15 thanks again tricknology. i call it a day now :) gn Sep 23 22:20:24 gg gn Sep 23 22:20:30 P3nnyw1se .. where? that guide mentions ActivityUnitTestCase exactly once Sep 23 22:20:47 fwiw, i've literally never written an ActivityUnitTestCase.. all of my activity testing is instrumentation testing Sep 23 22:21:39 http://developer.android.com/training/activity-testing/activity-unit-testing.html Sep 23 22:23:35 P3nnyw1se you may want to re-read article a bit more carefully. it explicitly states multiple times that the Intent it creates and "starts", never actually makes it to the system Sep 23 22:24:04 and that the test it demonstrates is to verify that the intent is correctly formed, filled out, and startActivity is called with it Sep 23 22:25:20 oh, ok i'll eat my foot a little bit here, it's a mix of that and what i think you're after Sep 23 22:25:21 what hapens when you execute a thread from inside a runnable? Sep 23 22:25:31 is that thread separate from the UI or not? Sep 23 22:25:32 correct, but all guides involving AndroidTestUnitCase Sep 23 22:25:40 starts with the setup() to run the Activity Sep 23 22:25:43 then reaches it afterwards Sep 23 22:25:50 its not the first one I read Sep 23 22:26:03 right, that actually *is* starting an activity Sep 23 22:26:09 but it's still not connecting it to anything in the system Sep 23 22:26:22 so your MediaPlayer, which depends on many things in the system, isn't going to work Sep 23 22:26:31 context being one of them Sep 23 22:26:39 I just had this problem yesterday Sep 23 22:26:53 like i said, i've *never* written an ActivityUnitTestCase Sep 23 22:26:56 either use the instrumenation like the docs say or just instantiate your class inside your test Sep 23 22:27:00 and i've written ..lots.. of test cases Sep 23 22:27:13 provided something inside that class doesnt require context Sep 23 22:27:26 or just put a setTestContext(context) in there Sep 23 22:27:31 to satisfy your context needs Sep 23 22:27:37 hacky but it works Sep 23 22:28:08 I think you can evern setTestActivity(activity) Sep 23 22:28:38 I see your point sarbs, of how I wouldn't be able to hit the right reference, but I still don't understand why I'm not able to access any of the methods Sep 23 22:28:41 it should duplicate the class Sep 23 22:29:14 anyways I'm just gonna avoid the ActivityUnitTestCase Sep 23 22:29:27 setTestContext(this.getContext().createPackageContext("com.your.package”, 2)); Sep 23 22:29:28 well, so, that's the other thing i'm not sure you're fully understanding. the test case is just "drives" the class under test Sep 23 22:29:29 is now I did it Sep 23 22:29:33 how* Sep 23 22:29:39 anything the CUT doesn't expose, the test case doesn't have access to Sep 23 22:30:37 i make my test cases live in the same package as the CUT, and then if i need to break encapsulation i can write a package-private method to expose it Sep 23 22:30:55 so that it's still not accessible publicly or to children Sep 23 22:31:08 but even that i try to avoid. Sep 23 22:31:57 I made static references to check sarbs Sep 23 22:32:09 maybe Im just missing the way its done in Android Studio Sep 23 22:33:06 http://goo.gl/XOwRe1 Sep 23 22:33:48 statics are the devil's work, even for testing :) Sep 23 22:36:36 Statics are like guns.. you know its wrong but sometimes you just had enough and need a quick fix Sep 23 22:56:50 can i trouble anyone to explain this piece of code to me? i feel really dumb Sep 23 22:56:50 http://pastebin.com/YgJk3ZVS Sep 23 23:00:05 LighterFluid: that is an adapter getview Sep 23 23:00:30 for each position in the list or whatever, you need to inflate a view, if the view has already been inflated, it could be convertview Sep 23 23:00:42 once you have a view that will be the row, you set the values and onclick whatevers Sep 23 23:00:54 the viewholder is used inconjuction with the convertview Sep 23 23:01:19 what does it mean to inflate a view? i understand its common knowlege, but im rather new at this Sep 23 23:01:24 since we are reusing a view, might as well reuse the findViewById (the viewholder), which can be linked to the convertview (via the tag) Sep 23 23:01:28 it seems to be android specific Sep 23 23:01:52 construct the set of things that need to exist in the UI view hiearchy Sep 23 23:02:04 to display whatever that view represents Sep 23 23:02:16 No this is not happening...!!! Sep 23 23:02:21 dun dun dun Sep 23 23:02:37 thanks a lot man, i really appreciate it Sep 23 23:02:51 I missclicked in Android Studio, now it just displays 'Obtaining Screenshot from device..' .. and has done so for 10 minutes Sep 23 23:03:03 I can't seem to do anything if I hard close I lose the past 20 minutes work... !! arghh Sep 23 23:03:37 P3nnyw1se: can you go to the files and open them with notepad or whatever and copy out the code Sep 23 23:03:51 hmmm good idea will look Sep 23 23:05:31 It saved it... thank god. Android Studio must bug so much they know they need to keep autosaving Sep 23 23:07:06 that's an IDEA feature Sep 23 23:07:10 anytime a window loses focus, it saves Sep 23 23:07:54 you should have tried killing adb Sep 23 23:08:01 P3nnyw1se, ^^^ Sep 23 23:08:08 if i have an activity that has a webview in it that has been created, if the user then goes to the homescreen, and then reopens the app using recent apps… does the webview always have to reload? Sep 23 23:08:41 is it possible to just reopen the app, and have it be at the exact spot the app was minimized at, without reloading anything? Sep 23 23:11:29 aaairc saveState/restoreState Sep 23 23:12:37 will that reload the page at the last url, or will it just be at exactly the same spot? Sep 23 23:12:44 no reloading at all? Sep 23 23:13:01 basically i don’t want to have to reload the page at all, if the person has already started to fill out a form for example Sep 23 23:13:09 sarbs: ^ Sep 23 23:13:21 should keep it loaded Sep 23 23:13:27 although it's been a while since i used it tbh Sep 23 23:22:38 aaairc, you can look here : http://lmgtfy.com/?q=android+webview+save+state+example Sep 23 23:33:59 Hey I was wondering if getting a flood of CG_FOR_ALLOC is a big deal. I'm using oop wrappers for object that I allocate a lot of very quickly, and I think I do it pretty memory efficiently. Should I switch to a non-oop, more difficult implementation of what I'm doing or just ignore the CG_FOR_ALLOC I mean I still keep 96% free Sep 23 23:36:26 zymaster it's only a big deal if that section is very performance-dependent Sep 23 23:36:54 gc_for_alloc pauses execution, but if it's a non-critical section then meh Sep 23 23:37:25 sarbs: well its happening in my render loop would that be an issue? Sep 23 23:37:33 mm Sep 23 23:37:35 probably Sep 23 23:37:47 you want to avoid allocations during rendering Sep 23 23:38:47 sarbs: so basically I have my logic loop merged into my render loop and I have a lot of object that move around the screen and often leave and I use oop wrappers for them, I know I didn't really describe it in full but how could that be avoided? Sep 23 23:39:21 separate your logic loop from your render loop Sep 23 23:39:42 Does anyone know how to add SwipeRefreshLayouts to both the ListView and empty view of the standard list_content? Sep 23 23:40:30 sarbs: hmm makes sense but multithreading might be hard to get right. I'll keep it the way it is now but if I see significant performance drops I'll redo it. Thanks for the help Sep 23 23:42:07 tl;dr - I want to use the SwipeRefreshLayout progress bar to indicate email checking, but want the indeterminate progress indicator (backed by the standard list_content) to work and indicate the email list being loaded from disk. Sep 23 23:42:41 Shouldn't tl;dr be shorter than the original post? :D Sep 23 23:42:49 :P Sep 23 23:42:55 haha Sep 23 23:43:02 It's the shortened version of explaining my whole app and what I want to do with it. Sep 23 23:43:33 Cool. what I do is put my whole question and code in pastebin... Sep 23 23:43:40 I was using ActionBarPullToRefresh before, discovered SwipeRefreshLayout a few days ago. Sep 23 23:44:11 That doesn't work for me, PB blocks Tor Sep 23 23:44:42 oh. That sucks. Bastards! Sep 23 23:44:57 Damn censorship kitteh. Sep 23 23:47:18 Anyway, I've been trying to programmatically alter the view hierarchy to insert two SwipeRefreshLayouts (which seems to be how to handle it, because AdapterView marks the listView GONE which disables the SRL around it, so a separate one is needed for empty view). Sep 23 23:47:21 The first one is easy, because I wrap the view returned by ListFragment.onCreateView() in a SwipeRefreshLayout (like Google's sample - https://developer.android.com/samples/SwipeRefreshListFragment/src/com.example.android.swiperefreshlistfragment/SwipeRefreshListFragment.html ). Sep 23 23:48:08 But for the second, I need to take the default empty view, wrap it in a SRL { ScrollView { emptyView }} and then set that as the emptyView Sep 23 23:48:37 Just released my app http://forum.xda-developers.com/android/apps-games/app-chrome-apk-packager-generates-t2885958 Sep 23 23:48:46 Genereates Chrome Android Runtime Packages from apks or apps installed on your phone Sep 23 23:48:48 Tried that, I get NPE in ViewGroup.addViewInner*( Sep 23 23:49:05 Bpear++ Sep 23 23:50:16 :) Sep 23 23:54:18 hey Sep 23 23:54:38 I have one activity that is launching another activity Sep 23 23:54:52 in this second activity I update -sometimes- a row in the db Sep 23 23:55:20 when I come back to the parent activy onResume I do adapter.notifyDataSetChanged() Sep 23 23:56:01 and so the list is redrawn. but the data is the same, it seems the adapter has an old copy of the cursor Sep 23 23:56:15 any idea? Sep 24 00:01:00 To list all the APKS in my app I am generating radio buttons in a radio group programmatically. Like this http://pastebin.com/tveaj1xz . Is there anyway to sort the radio group alphabetically after? Sep 24 00:04:40 Bpear if you're adding them to a linearlayout, it goes purely by add order Sep 24 00:05:11 you could write a custom layout if you need to sort them often, otherwise i'd just pre-sort the data then generate the views Sep 24 00:05:20 yeah I am. What should I use to sort it alphabetically? Sep 24 00:05:39 Okay thank you. Ill look into that Sep 24 00:12:06 question : I want to display a notification which makes the phone vibrate three times. In one circumstance this works perfectly. The other circumstance is that I was to display the notification and immediately lock the phone. In this case the phone only vibrates once. I originally had the notification in the Acitivity, and I just tried it in an IntentService. Nada. Sep 24 00:16:51 No errors in the logcat either Sep 24 00:29:50 Damn, I think I broke the channel. Sep 24 00:30:29 sarbs: I got it working with a TreeMap :D http://stackoverflow.com/questions/11118581/sort-buttons-in-alphabetical-order Sep 24 00:42:09 Bpear i would have just put the strings into an array, sorted that array via Array.sort(), then looped thru the array and built buttons Sep 24 00:52:08 hmm, i had my .dex file change from like 7.3 to 6.3 MB with a minor code change in my apk Sep 24 00:52:22 it made my apk file different enough to make me think something was wrong Sep 24 00:52:57 it sounds like the .dex is basically the compiled bytecode of an app or something... is there enough metadata in there that might reasonably change that much with a minor change? Sep 24 01:34:35 hey guys i have the following regex in an input filter "(^[1-9]\\d{0,7}$)|(^[1-9]\\d{0,7}\\.\\d{0,2}$)" It works fine except i need 0 to make decimals like 0.13 or 0.25. How can i do this Sep 24 01:35:22 I have tried to do ...|(^0\\.\\d{0,2}$) Sep 24 01:35:26 but that doesn't work Sep 24 01:42:59 AnalAvenger, it would probably help to know what you're trying to achieve. Sep 24 01:43:55 heh Sep 24 01:56:40 I'm not sure if that's the best IRC handle I've seen in here or the worst... Sep 24 01:56:58 Bitkiller? Sep 24 01:57:20 Also, do you guys have any suggestions as for what I should program first in android? Sep 24 01:57:39 Well, besides the application made with the android developers starting out tutorial. Sep 24 02:30:04 i can't believe there was a sub-plot love story in the Godzilla remake :| Sep 24 02:30:06 whyyyy Sep 24 02:45:33 Android L didn't even fix the Bluetooth shit. Sep 24 02:45:38 AKSJFAKLD Sep 24 02:45:46 Disappointment washes over me. Sep 24 02:46:03 drewbug do you have to do android? maybe enter the market with iOS first Sep 24 02:46:18 Nope, we need Android. Sep 24 02:46:26 Kill me now. **** ENDING LOGGING AT Wed Sep 24 03:00:00 2014