**** BEGIN LOGGING AT Sun Oct 05 03:00:01 2014 Oct 05 03:00:10 QubeZ: Really? Last time I used it (around six months ago), it was *painfully* slow. Oct 05 03:00:11 QubeZ its' come a long way Oct 05 03:00:16 I'm glad to hear it's getting better. Oct 05 03:00:34 they still haev much to improve upon Oct 05 03:00:40 buck is about 10x faster Oct 05 03:00:51 for large projects Oct 05 03:01:24 I look forward to switching once they implement the JVM-unit-test thing. Oct 05 03:02:10 ( https://code.google.com/p/android/issues/detail?id=65186 ) Oct 05 03:02:38 well aware of the issue, but as we've discussed before, i dont' think it's an issue Oct 05 03:02:56 because it takes no time at all to deploy to genymotion Oct 05 03:03:44 and you can use robolectric Oct 05 03:08:23 Ok, so... I can take a video and use the data gathered from the accelerometer as well as the camera to calculate a size Oct 05 03:08:31 TacticalJoke do you think people at the top dev shops are still using eclipse? Oct 05 03:08:53 TacticalJoke and do you think that since they use AS they must not have good test coverage? Oct 05 03:09:27 I guessed they'd hacked Gradle scripts somehow in order to allow JVM testing. Oct 05 03:09:52 it is an issue Oct 05 03:10:08 but not big enough to continue using eclipse Oct 05 03:10:15 emulators suck Oct 05 03:10:20 and you can't VM in a VM Oct 05 03:10:41 JakeWharton: Didn't your team do something weird with Gradle to make JVM testing work? Oct 05 03:11:06 sibling java module and steal the classpath from the app module Oct 05 03:11:24 works in CLI and AS, no custom crap or flaky behavior Oct 05 03:12:09 what do you mean 'can't vm in a vm' Oct 05 03:12:14 you can't run a vm in a vm Oct 05 03:12:18 but... you can? Oct 05 03:12:33 isn't genymotion proof of that? Oct 05 03:12:53 A vm doesn't know it's a vm Oct 05 03:13:05 how is genymotion proof? Oct 05 03:13:09 it's a vm Oct 05 03:13:15 and you run it on a computer Oct 05 03:13:17 the emulator itself is a vm as well Oct 05 03:13:31 of this i am aware Oct 05 03:13:43 so you run the android emulator in a virtualbox vm Oct 05 03:13:48 that's an emulator in an emulator, isn't it? Oct 05 03:13:50 er Oct 05 03:13:51 vm in a vm Oct 05 03:14:24 no, that would be a single vm Oct 05 03:14:41 genymotion runs in virtualbox, which runs the emulator Oct 05 03:14:46 are you talking semantics? Oct 05 03:14:49 no Oct 05 03:15:02 virtualbox is the host, the emulator is the vm Oct 05 03:15:18 virtualbox runs on your computer, the vm runs inside of the virtualbox host Oct 05 03:15:52 i was under the impression that genymotion was another layer Oct 05 03:15:56 it isn't Oct 05 03:15:59 ah Oct 05 03:16:08 it's just an ugly GUI wrapping virtualbox Oct 05 03:16:37 so theoretically Oct 05 03:16:41 why can't you run a vm in a vm? Oct 05 03:17:08 couldn't you install virtualbox on a virtualbox instance of windows, for example? Oct 05 03:17:14 you could Oct 05 03:17:20 and then you'd grow old waiting for it to boot Oct 05 03:17:36 because it can't take advantage of the hardware virtualization or something else? Oct 05 03:17:41 correct Oct 05 03:18:05 you say emulators suck Oct 05 03:18:22 but i've found they're pretty good at running tests Oct 05 03:18:26 compared to actual devices Oct 05 03:18:34 because install/run time is 2-3x faster Oct 05 03:18:42 the JVM is 1000x faster Oct 05 03:18:54 for unit tests yes but many tests are not just unit tets Oct 05 03:18:56 tests Oct 05 03:19:10 i never said there weren't multiple ways of testing Oct 05 03:19:24 ah i guess you saying emulators sucked implied that devices were better, but I guess I misread that Oct 05 03:19:42 Ever use AIDE? Oct 05 03:19:59 I've found it faster to build/run on the device itself Oct 05 03:20:02 yea i do all my dev on there Oct 05 03:20:29 JacobTabak: Seriously? Oct 05 03:20:33 lol of course not Oct 05 03:21:16 If my AsyncTask has a reference to my Activity, and my Activity has now been killed, what happens if I try to show a Toast with my killed Activity as the context? Oct 05 03:21:39 TacticalJoke you should try it by enabling 'dont keep activities' in settings Oct 05 03:21:40 I'm not bike-shedding; I promise. Oct 05 03:21:45 have your async test sleep for 20 sec Oct 05 03:21:45 True. Oct 05 03:21:54 task* Oct 05 03:22:05 SharedPreferencesEditor.apply() says "You don't need to worry about Android component lifecycles and their interaction with apply() writing to disk. The framework makes sure in-flight disk writes from apply() complete before switching states." ... but I don't see how they achieve this in SharedPreferencesImpl.java Oct 05 03:22:45 I'm trying to figure out how my worker could determine whether the Activity is dead. Something like "if (!activity.isGone()) { activity.callback(); }". Oct 05 03:22:54 Like, if it's been killed, forget about the toast. Oct 05 03:22:58 g00s looks like all sorts of stuff i can't be bothered to understand, so notb oethering Oct 05 03:23:00 if you are doing that, you are approaching the problem wrong Oct 05 03:23:07 you'll be littering that code all over Oct 05 03:23:45 It's a database write that has a "Write successful" Toast at the end. But if the Activity has been killed then I want to forget about the Toast (it's no big deal). Oct 05 03:23:56 I care mainly about whether the worker runs to completion, really. Oct 05 03:23:56 then why toast at all? Oct 05 03:24:05 if I want an nfc tag scanned to launch a specific activity, what type of record should I use - uri, external, mime, well known? Oct 05 03:24:12 It's nice for users to see "Changes saved." or something. Oct 05 03:24:17 ive been trying to tell him a fking db write takes 50-100 ms and he doesnt need to worry about hte activity dying but the guy is stubborn as a rock Oct 05 03:24:19 But it's not essential if they're gonna rotate on me. Oct 05 03:24:35 that is flawed reasoning Oct 05 03:24:38 I just wanna consider all cases. lol Oct 05 03:25:03 JakeWharton: I think the only alternative is to use a Fragment with setRetainInstance(true). Oct 05 03:25:06 But I'm not sure I wanna go with Fragments. Oct 05 03:25:23 JacobTabak: we appreciate you hanging around helping people with your experience and contributions :) Oct 05 03:25:53 and JakeWharton too of course :) Oct 05 03:26:36 TacticalJoke activites dont get "killed" on rotation the get destroyed Oct 05 03:26:44 Okay. Oct 05 03:26:50 kill = process dying Oct 05 03:27:05 you still can access the application context and toast Oct 05 03:27:20 I'm considering this case: My DB-write worker starts; the screen is rotated; the Activity is destroyed; my DB-write worker finishes (and now I want to show the toast). Oct 05 03:27:34 so do what i said before Oct 05 03:27:40 test it with dont keep activities Oct 05 03:27:42 dont take my word for it Oct 05 03:27:43 and stop asking Oct 05 03:28:04 do I need to import ABS are a module in Android Studio or is there a way through Gradle? Oct 05 03:28:27 JacobTabak: I thought your suggestion was to just not display the toast if there's a rotation? Did I misread. Oct 05 03:28:27 my build.gradle has compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' line but I get build errors trying to find the Theme Oct 05 03:28:34 you misread Oct 05 03:28:35 it used to be that, if you want to make sure something happened (and this thing was not on the UI thread) you did it in a service. that goes for networking and file i/o. Oct 05 03:28:56 so writing stuff to file, db - -> service Oct 05 03:29:14 maybe that changed. but i still see in aosp code, they do that Oct 05 03:29:25 they also have integers instead of enums Oct 05 03:29:28 so fuck them Oct 05 03:29:29 you don't need to bother with a service Oct 05 03:29:48 I wish there were some way of getting access to the new Activity without using a Fragment. Oct 05 03:30:06 The Activity is the one that should be showing the Toast, IMO. Oct 05 03:30:13 ?????????????? Oct 05 03:30:16 pull the state, rather than pushing it Oct 05 03:30:39 TacticalJoke you are such a troll and drunk me can't resist responding to you Oct 05 03:30:40 TacticalJoke: ... You know what the difference between a toast shown in Activity A and one shown in Activity B is, right? Oct 05 03:30:41 So, put a reference object on the ground, move the camera from the left to the right at bellybutton height. and determine the size of the object by measuring the relative movement of the reference object and the object to be measured taking in account accelerometa data. Oct 05 03:31:11 JacobTabak: I am not a troll. Jeez. Trying to grok multithreading in Android. This is so odd to me. I've never had to worry about stuff like Activity restarts before. Oct 05 03:31:21 can anyone think of a better system for determining size of an object? or how to improve/cheat this system? Oct 05 03:31:27 Syzygy__ that does not work in any accurate way at all Oct 05 03:31:29 I spent years doing multithreading stuff in Windows. This is so different. Oct 05 03:31:38 http://developer.android.com/guide/topics/ui/notifiers/toasts.html Oct 05 03:31:41 <--- 3D TD…that includes camera tracking Oct 05 03:31:53 Syzygy__ using a camera only? Oct 05 03:31:54 This method takes three parameters: the application Context, the text message, and the duration for the toast. Oct 05 03:31:58 JakeWharton: How do I pull, though? It's a blocking operation in a background thread that could go on for any amount of time. Oct 05 03:32:01 Right, JacobTabak. Oct 05 03:32:04 and in VFX single pint and movement != scene reality Oct 05 03:32:09 point* Oct 05 03:32:15 JakeWharton really? so did that change along the way? so lets say a write starts and the user presses home, the process gets killed - is android taking into account somehow that we're writing to disk ? Oct 05 03:32:23 rdnt, well, standard phone, don't really care what else is used Oct 05 03:32:25 And you're gonna call me stubborn again, but it should be my Activity class hosts the code that shows the Toast. Oct 05 03:32:29 g00s activities aren't destroyed when the user hits home Oct 05 03:32:36 StingRay_, why wouldn't it be accurate? Oct 05 03:32:48 it should be that* Oct 05 03:32:48 g00s process is not destroyed either Oct 05 03:32:51 JacobTabak i saud "process killed" Oct 05 03:32:58 process is not killed when the user hits home. Oct 05 03:32:59 of course it can be Oct 05 03:33:02 it's not though. Oct 05 03:33:10 Syzygy__ can you read focal length ? Oct 05 03:33:10 if the process dies, the service dies too Oct 05 03:33:21 doesn't matter where you are writing Oct 05 03:33:26 JakeWharton but processes with services run at higher priority Oct 05 03:33:34 yes, this is true. but the service marks the process as a higher priority Oct 05 03:33:37 that doesn't change my statement Oct 05 03:33:58 but it does mean that if you have a services its less likely to be killed. but what it doesnt change is that it doesnt matter 99% of hte time Oct 05 03:34:00 and you are not the 1% Oct 05 03:34:04 StingRay_, Camera.Parameters.getFocalLength() Oct 05 03:35:03 ok so now in tracking to work out a single length you would need survey data of points, not just a single one Oct 05 03:36:27 JacobTabak i dont think this is good though. if the process is killed, and your writing in a service, all you can hope for is atomic modification of file state because you did that part right - but hoping that 1% of time doesn't happen ... Oct 05 03:36:29 so in a scene you need to know a relative distance between 2 points….then maybe a fk tonne more track points on a subject object to work out any survey data…ewww I dont even want to talk about this no more… neways my point is it would not be at all accurate Oct 05 03:36:44 thats basically saying, this isn't provably correct Oct 05 03:37:12 ok i'm going to go back to saying - it's not a problem until its a problem Oct 05 03:37:16 StingRay_, there's a reference object, by checking the relative movement of both objects as the camera moves the distance should be fairly easy to calculate Oct 05 03:37:34 and it's so fast that it will never actually be a problem unless you're doing something stupid Oct 05 03:37:48 Syzygy__ what are the refs ? Oct 05 03:37:51 JacobTabak do you write your concurrency stuff without synchronization because 99% of the time, the non-reentrant code will appear to work ? Oct 05 03:38:01 and now we're sensationalizing Oct 05 03:38:08 g00s all i'm saying is when you write a real world app, all of your problems are going to be out of your control Oct 05 03:38:14 like 3rd party service login and shit Oct 05 03:38:15 StingRay_, soda can or printable QR type image Oct 05 03:38:18 its not going ot be these fking edge cases Oct 05 03:38:22 Syzygy__ in film VFX we also have to deal with camera lens distortion :) thats not nice Oct 05 03:38:35 if you have a problem that you've identified, you fix it Oct 05 03:38:45 but the vast majority of shit you are worrying about here is not a real issue Oct 05 03:38:53 Syzygy__ if you have a square for suvery data and focal length then you are sorted Oct 05 03:39:08 StingRay_, I assume film VFX rarely deals with phone cameras, their FoV is usually not wide enough to have issues with distortion Oct 05 03:39:18 JakeWharton: I'm curious of what you meant by "push rather than pull". Let's say that I have MainActivity and MyAsyncTask. MainActivity makes MyAsyncTask do some work and then the user rotates the screen. The activity is now gone. I would, in an ideal world, get the new Activity instance and push to that. Did you, by "push", mean "Show the Toast from MyAsyncTask"? Just checking out Oct 05 03:39:18 my options. Oct 05 03:39:23 JacobTabak i guess we disagree :( thas OK Oct 05 03:39:35 issues all the time, distortion on film lenses is not a uniform thing Oct 05 03:39:35 Sorry, "pull". Oct 05 03:39:43 StingRay_, yeah, so QR code thingy, and I can read the focal length from the camera Oct 05 03:40:10 Syzygy__ then yes, but you are faced then with scene tracking Oct 05 03:40:37 so key pixel points to track…and apply the scene data to … to work out wtf it is, where it is and how big Oct 05 03:40:52 StingRay_, kindof, but I only need relevant datapoints and can discard everything I don't need without considering it Oct 05 03:41:14 i remember when android dual core phone started coming out, and once this happened new types of race conditions were possible Oct 05 03:41:18 it should be enough to have 2 images Oct 05 03:41:41 before that time "it wasn't a problem" but it also wasn't provably correct Oct 05 03:41:46 g00s what i'm saying if you have a 1% potential issue you shouldn't spend 2 days planning and asking questions in IRC if you don't know how to solve it ahead of time Oct 05 03:42:00 with accelerometer (and the image itself) i should be able to determine a fairly accurate camera position Oct 05 03:42:09 and then I just need to use all datapoints Oct 05 03:42:21 Syzygy__ it rarely is, and the accel is not accurate enough I would assume Oct 05 03:42:54 and i'd say that the issue we're discussing (activity being killed while db write is in process) is more like 0.0001% Oct 05 03:43:20 guess I'll just have to try Oct 05 03:43:30 the probability of this happening correlated to memory pressure Oct 05 03:43:46 JacobTabak i'm glad you don't design traffic signals :D Oct 05 03:43:56 damn straight, we move fast and learn from mistakes Oct 05 03:44:03 '1% of the time, both side may have a green" Oct 05 03:44:08 I guess a factor is the app. If this were an important medical app, I guess I'd have to go with a Service. Oct 05 03:44:10 how about 0.0001% Oct 05 03:44:23 g00s i've waited at traffic lights for 10 minutes Oct 05 03:44:34 before just going Oct 05 03:45:34 TacticalJoke if we were discussing important medical apps, we wouldn't have noobs with next to no experience asking about it in IRC Oct 05 03:45:47 StingRay_, but if you have any better ides for calculating the size I'm happy to listen to you Oct 05 03:45:53 they'd have experienced team leads taht would know how to do it already Oct 05 03:46:35 Syzygy__ well, whenever I see film crews get lazy, the answer is lidar :) Oct 05 03:46:53 God, I hope so. lol Oct 05 03:47:02 I don't think that comes standard with most android phones Oct 05 03:47:08 It would suck if people writing life-saving software were asking about the basics on IRC. Oct 05 03:47:15 I think I've found a solution to my issue. Oct 05 03:47:16 Syzygy__ can you help me calculate my size Oct 05 03:47:26 Just a MyTask.setActivity method. Oct 05 03:47:32 Called when the new Activity is created. Oct 05 03:47:40 Syzygy__ na, but my point is my experience is in VFX 3D tracking + pftack etc… not really a mob phone version :) Oct 05 03:47:45 JacobTabak, if you happen to look like a penis, my app might help you with that Oct 05 03:48:14 Syzygy__ i'd think with the nature of the app you're planning on writing, you'd realize i wasn't talking about my height Oct 05 03:48:44 in that case, I personally am unwilling to help you, but my app might help you with that. Oct 05 03:48:49 Syzygy__ you need to do a networked version too Oct 05 03:48:54 Syzygy__ let me know if you need beta testers Oct 05 03:48:57 StingRay_, obviously Oct 05 03:49:05 * StingRay_ still needs two 10" tablets Oct 05 03:49:06 So, the AsyncTask starts working; then the user rotates; then a new Activity is created. It calls MyTask.setActivity, and then it still gets callbacks. Oct 05 03:49:08 i lost my tape measurer Oct 05 03:49:20 TacticalJoke how is the new activity going to have a reference to the asynctask Oct 05 03:49:27 hint: its not Oct 05 03:49:28 The only issue is if the task finishes before the new activity is created and after the old one is destroyed. Oct 05 03:49:46 Hmm, that's a point. Oct 05 03:49:48 TacticalJoke this is where onstop and on start come in handy Oct 05 03:49:52 TacticalJoke: JakeWharton told you to pull, not push Oct 05 03:50:01 hes a hopeless troll Oct 05 03:50:03 But what does that mean? Oct 05 03:50:03 only i can indulge him Oct 05 03:50:07 i insist you stop shmooz Oct 05 03:50:13 Uhh, I'm not trolling. Oct 05 03:50:17 it means make your activities stateless Oct 05 03:50:19 TacticalJoke you really are Oct 05 03:50:21 :) Oct 05 03:50:24 Jeez. If I were trolling, I'd be having a more-fun conversation than this. Oct 05 03:50:24 guess I'll have to write down what I thought out so far, time to go to sleep and i might forget once I sober up again Oct 05 03:50:33 I mean the topic. Oct 05 03:50:36 Abortions or something. Oct 05 03:51:02 TacticalJoke look at the fucking sample for worker fragments Oct 05 03:51:06 its there for a reason Oct 05 03:51:10 this is so basic Oct 05 03:51:41 That uses setRetainInstance. :/ Oct 05 03:51:44 so??? Oct 05 03:51:48 I'm trying to avoid Fragments. Oct 05 03:51:52 STOP Oct 05 03:51:57 TacticalJoke: so avoid them Oct 05 03:52:02 IN THE NAME OF LOVE Oct 05 03:52:02 shmooz: How? Oct 05 03:52:09 And what does 'pull' mean here? Oct 05 03:52:11 TacticalJoke there's a deprecated method in activity Oct 05 03:52:16 if you're into that shit Oct 05 03:52:18 by not looking at or writing anything with the word fragment Oct 05 03:52:44 so I really want to avoid using parcellable to pass a POJO between activities Oct 05 03:52:48 what are my options? Oct 05 03:52:50 http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance() Oct 05 03:52:59 TacticalJoke read the documentation Oct 05 03:53:05 This method was deprecated in API level 13. Oct 05 03:53:06 Use the new Fragment API setRetainInstance(boolean) instead; this is also available on older platforms through the Android compatibility package. Oct 05 03:53:08 shekibobo: Globals? Oct 05 03:53:15 Yeah, I've heard of that. Oct 05 03:53:16 ignore that deprecation Oct 05 03:53:20 so stupid Oct 05 03:53:34 You're saying it's okay to use onRetain...? Oct 05 03:53:35 it's the exact mechanism though which fragments retain instances Oct 05 03:53:41 Wow, okay. Oct 05 03:53:45 its fine until they remove it Oct 05 03:53:50 it will not be removed Oct 05 03:54:10 it was probably more like Dianne saying, we *wan* you guys to be doing this instead :) Oct 05 03:54:15 *want* Oct 05 03:54:21 yeah. incorrectly so Oct 05 03:54:47 in my heart i dont disagree with you JakeWharton Oct 05 03:54:58 but... Oct 05 03:55:29 shekibobo why dont you want to use parcelable? Oct 05 03:55:54 shekibobo: hold the object in something whose lifetime transcends the two activities Oct 05 03:55:55 you other option would be to hold the object in your application... or static variables Oct 05 03:56:03 Hmm, I can't find the code using onRetainNonConfigurationInstance on GrepCode. Oct 05 03:56:08 but i can't see why you wouldn't want to use parcelables Oct 05 03:57:20 in a relativelayout, it's easy to center a TextView Oct 05 03:57:22 there are some nice libs to automatically create parcelable implementations based on anotations @shekibobo Oct 05 03:57:28 but how can i say to have a top margin of 40 instead of 50 %? Oct 05 03:57:40 margin_top Oct 05 03:57:53 layout_marginTop or w/e Oct 05 03:59:20 smart_ptr if you want % based margins use linearlayouts with layout_weight Oct 05 03:59:34 ok Oct 05 03:59:45 smart_ptr well, few issues, 1. the top margin is not 50% … cause the margin is from the top of the textView…. 2. what you pr…..(insert what JacobTabak said here) Oct 05 04:00:35 smart_ptr or do it all at runtime with a frameLayout :) Oct 05 04:00:37 It's so frustrating that we have to deal with screen rotations and other Activity/process killers. It adds a whole level of complexity. Simple stuff becomes complex and potentially buggy. Oct 05 04:00:41 Drives me crazy. Oct 05 04:01:02 Is there a place I can confirm if my app would be considered sexual content? e.g. write a mail to customer support describing the app Oct 05 04:01:04 TacticalJoke I'm fine with it…and not even a ….. not much of a programmer Oct 05 04:01:07 TacticalJoke god forbid we have a platform that lets us provide alternate layouts for free based on orientation Oct 05 04:01:07 TacticalJoke: welcome to mobile Oct 05 04:01:18 and lets us seamlessly switch between langauges Oct 05 04:01:32 Yeah, but the OS could handle all this. Oct 05 04:01:37 So much code is required to retain instance state. Oct 05 04:01:42 It's all bloat and potential bugs. Oct 05 04:01:55 Code-bloat, I mean. Oct 05 04:01:58 lots of ways around that Oct 05 04:02:03 annotation processors, etc Oct 05 04:02:30 TacticalJoke: not really, I avoided fragments and did master detail , multi list stuff, you just save what little you need to save to retain it Oct 05 04:03:28 and you hide and show layouts/views based on the situation Oct 05 04:04:17 You still have to worry about saving state, right? Oct 05 04:04:50 what's so hard about saving anything ? Oct 05 04:05:06 Stuff like the code-bloat of Parcelable implementations. Oct 05 04:07:16 speaking of that... I wrote a class that statically wraps a hashmap to completely avoid the Parcelable/Extra problems :( Oct 05 04:07:22 not proud of myself for that Oct 05 04:07:29 lol Oct 05 04:07:48 You did that because you dislike Parcelable that much? Oct 05 04:08:22 Originally because I needed to transfer an image between activities and it was larger than 1mb Oct 05 04:08:22 TacticalJoke as i mentioned earlier, you can solve parcelable with one annotation Oct 05 04:08:32 Syzygy__ write it to disk?? Oct 05 04:08:46 You know what's really obnoxious about Parcelable? Your code won't actually run almost all of the time. Android just retains the very instance. Oct 05 04:08:49 or use static ? Oct 05 04:08:49 I shouldn't have to write it to disk for that. Oct 05 04:09:02 JacobTabak, I did put it in a static hashmap, so yeah Oct 05 04:09:33 So you can't really test whether your Parcelable code works. Oct 05 04:09:35 https://github.com/johncarl81/parceler Oct 05 04:09:38 dont write code Oct 05 04:10:10 i prefer autoparcel Oct 05 04:10:41 i dont like code that relis on generated code Oct 05 04:10:54 relies* Oct 05 04:10:55 so write a 4 line indirection Oct 05 04:11:09 what does that mean Oct 05 04:11:34 write a method that uses reflection to grab the generated class Oct 05 04:11:41 4 lines of code Oct 05 04:11:47 ah Oct 05 04:12:02 (plus try/catch garbage) Oct 05 04:12:04 TacticalJoke, parcelables are easily unit tested though Oct 05 04:12:08 it depends on APT? Oct 05 04:12:14 i want to remove apt Oct 05 04:12:18 from my deps Oct 05 04:12:31 parceler just uses 'provides' Oct 05 04:12:48 they're the same thing Oct 05 04:12:49 pfn: My problem is that I run all my unit tests on the JVM. Can't access any Android stuff. Oct 05 04:13:04 the former just configures the processor path Oct 05 04:13:05 JakeWharton i'm in dep hell right now Oct 05 04:13:21 removing the apt configuration won't solve that Oct 05 04:13:36 Why doesn't the Android API provide stuff like Parceler? Oct 05 04:13:59 because annotation processing wasn't build into javac when Android was written Oct 05 04:14:02 (among other things) Oct 05 04:14:53 JakeWharton i have this issue right now where the only compile error i get is dagger saying generated code was not found Oct 05 04:15:00 Do all the big devs use automatic Parcel stuff now? Oct 05 04:15:04 there are visible syntax errors in my code Oct 05 04:15:04 Rather than manually writing the boilerplate. Oct 05 04:15:09 but they don't show up in gradle output Oct 05 04:15:11 just because something can be done doesn't mean it should be in the SDK anyways Oct 05 04:15:13 and i blame PAT Oct 05 04:15:15 APT&* Oct 05 04:16:01 because i have too many dependencies on generated code Oct 05 04:16:53 Android programming is programmer-unfriendly in so many ways. It's hard to feel motivated about it sometimes. Oct 05 04:16:59 the apt configuration is exactly the same as provided except it configures AS to reference the output folder as a generated source root Oct 05 04:17:29 Look at my issue: all I want to do is write to a database in a background thread. I have to worry about my app being killed during, my activities being restarted, etc. It's crazy stuff that we shouldn't even think of. Oct 05 04:17:36 It's OS-level stuff imposed on app developers. Oct 05 04:17:51 the issue is androidannotations and dagger not working well together Oct 05 04:18:02 i'm stripping out androidannotations (which requires apt rather than provides) Oct 05 04:18:33 do you need to specify androidTestProvided like you do for androidTestApt? Oct 05 04:18:37 it doesn't require it, it's just not as developer friendly without it Oct 05 04:18:40 i'm thinking no, so thats less clutter Oct 05 04:19:02 TacticalJoke maybe you would like WP or iOS better. i just use android because i have to atm Oct 05 04:19:25 Yeah, WP might be cool. Especially C#. Oct 05 04:19:25 TacticalJoke as we've said repeatedly you do not need to worry about your app being killed during a databse write Oct 05 04:19:30 you just have a brick for a brain and won't listen Oct 05 04:19:34 <3 Oct 05 04:19:34 I listen. Oct 05 04:19:56 I trust that you two are right. I have googled you both, of course. Oct 05 04:20:17 It's just the activity-being-killed thing. Grr. Oct 05 04:20:22 TacticalJoke: the app developer needs to be responsible for when lets say a phone call comes in to decide which parts of the app to save so he can retain onResume for example Oct 05 04:20:25 TacticalJoke it's DESTROYED not KILLED Oct 05 04:20:27 * JacobTabak rages Oct 05 04:20:44 JacobTabak ignore him now…before you break Oct 05 04:20:44 * g00s hands JacobTabak bacon cookie Oct 05 04:21:04 StingRay_ i'm broken already Oct 05 04:21:08 this troll has the best of me Oct 05 04:21:21 What exactly have I done that suggests I'm a troll? Oct 05 04:21:26 ask questions like that Oct 05 04:21:27 I ask too much? Oct 05 04:22:28 you ask but you ignore the answers Oct 05 04:22:30 and ask over and over Oct 05 04:22:39 and bitch about problems that we've told you don't exist Oct 05 04:22:47 The Activity problem exists. Oct 05 04:22:49 JacobTabak i don't think TacticalJoke is trolling. i still think whether the activity is destroyed or the process is killed, the solution is the same Oct 05 04:23:06 I have to either use that deprecated method or use Fragments, it seems. Oct 05 04:23:15 use the deprecated method Oct 05 04:23:19 because its deprecation is stupid Oct 05 04:23:25 and it will never stop working Oct 05 04:23:41 Okay. I might end up doing that. Oct 05 04:23:46 JakeWharton can you please provide some links or other info Oct 05 04:23:53 backing up that opinion? Oct 05 04:23:56 because i'm honestly interested Oct 05 04:24:05 its deprecation is in favor of setRetainInstance on a fragment Oct 05 04:24:09 right? Oct 05 04:24:31 a) what was the motivation for the deprecation Oct 05 04:24:33 I'd be interested in the code showing that sRI uses that deprecated method. Just curiously. Oct 05 04:24:44 fragment manager uses the non-config instance method in order to support that functionality Oct 05 04:24:48 i mean, i just have to think if it was deprecated, the fragment solution must be superior for some reason? Oct 05 04:24:56 because you can do multiple Oct 05 04:25:20 not that it really makes it superior Oct 05 04:25:50 i always thought it was hand waving that SRI used Oct 05 04:25:56 TacticalJoke: look at FragmentManager and FragmentActivity Oct 05 04:26:27 take painkillers first Oct 05 04:26:50 at least for FragmentManager :) Oct 05 04:26:55 https://developer.android.com/reference/android/support/v4/app/FragmentActivity.html#onRetainCustomNonConfigurationInstance() Oct 05 04:27:06 they even provide the exact same functionality in FragmentActivity Oct 05 04:27:09 which isn't deprecated Oct 05 04:27:21 and, again, uses the normal method for its underlying functionality Oct 05 04:27:33 thus further validating that the real method's deprecation is bull shit Oct 05 04:27:36 hmm interesting, the just put the word 'custom' in there and not deprecate it? Oct 05 04:27:39 don't feed the troll with more stuff to whine about ;) Oct 05 04:28:00 (i'm leaving out a lot of letters tonight) Oct 05 04:28:16 JakeWharton in practice, what do you use that for? Oct 05 04:28:26 observables? Oct 05 04:28:26 i don't use it for anything Oct 05 04:28:39 interesting that you are so emphatic about it then Oct 05 04:28:46 (i dont' use it for anythign either) Oct 05 04:28:54 (or retained fragments) Oct 05 04:28:55 Do you use setRetainInstance? Oct 05 04:29:01 no, i don't use fragments Oct 05 04:29:20 What would you use in a case like mine? Services? Oct 05 04:29:28 do you support different orientations? Oct 05 04:29:52 i would use a singleton Oct 05 04:30:10 ...managed by a DI library, of course Oct 05 04:30:22 do you ever worry about having too many singletons? Oct 05 04:30:29 never Oct 05 04:30:44 they stick around for the whole app lifecycle? Oct 05 04:30:54 isn't it a real issue? Oct 05 04:31:04 no Oct 05 04:31:17 would love to hear some reasoning behind that if you don't mind Oct 05 04:31:17 it'd be irresponsible to be recreating them all the time Oct 05 04:31:41 so the act of recreating the objects is more expensive than holding the memory for them? Oct 05 04:31:49 at times Oct 05 04:32:01 so for example, i've copied a lot of your stuff from u2020 Oct 05 04:32:14 and in many cases i've made the injected StringPrefs, etc, not singletons Oct 05 04:32:37 because i may only use them in one part of the app Oct 05 04:32:42 and i felt like they should be gc'ed Oct 05 04:33:16 if you know something should be gced, would you opt to not have it be a singleton? Oct 05 04:34:10 i don't know what "should be GCed" means in concrete terms Oct 05 04:34:16 it's a spectrum, anyway Oct 05 04:34:21 not a binary choice Oct 05 04:34:36 but you've said you never worry about singletons lingering in memories Oct 05 04:34:40 memory* Oct 05 04:34:45 JakeWharton: So, for the database-write thing, you'd do something like this? MainActivity.onCreate() { FooWorker worker = FooWorker.getInstance(); if (worker.isRunning()) { worker.setActivity(this); }} Then FooWorker can call this Activity back. Oct 05 04:34:48 well i don't abuse them either Oct 05 04:35:10 but if i'm putting something in the object graph changes are i want it to be managed as a singleton Oct 05 04:35:11 so you use them when necessary, and if you use them only when necessary, you should have nothing to worry about- thats your philosphy? Oct 05 04:35:26 i see Oct 05 04:35:36 if something is local to an activity and not a singleton i'll just new it up Oct 05 04:35:53 no need to waste time with all the indirection and abstract of injection Oct 05 04:35:59 e.g., adapters Oct 05 04:36:06 do you have a separate class with consts for shared preferences keys? Oct 05 04:36:23 i hate distributing that stuff Oct 05 04:36:52 no, we do exactly like what's in u2020 Oct 05 04:37:11 @Inject @Some StringPreference Oct 05 04:37:21 so no prefs local to an activity? Oct 05 04:37:29 we only have one activity Oct 05 04:37:30 but no Oct 05 04:37:36 ah yea i can't get the hang of that Oct 05 04:37:42 I guess it's impossible for the following to happen: user rotates --> activity is destroyed --> SOMETHING HAPPENS HERE --> activity is created Oct 05 04:37:48 also i apologize because this is a google'able question but with dagger, can you you request an instance of an object from dagger, say, in a for loop? Oct 05 04:37:54 TacticalJoke: gcm push Oct 05 04:37:54 The creation must come immediately after the destruction, I think I read. Oct 05 04:38:14 JakeWharton: Sorry? Oct 05 04:38:21 TacticalJoke: a gcm push could come between Oct 05 04:38:28 TacticalJoke you should look at onStop and onStart Oct 05 04:38:31 Oh. Is that the only thing that can come between? Oct 05 04:38:39 JacobTabak: I read that onStop isn't always called. Oct 05 04:38:45 it is on rotation Oct 05 04:39:09 JacobTabak: you can use get Oct 05 04:39:29 oh i see Oct 05 04:39:31 or create objects on which you can call inject Oct 05 04:39:32 thats useful Oct 05 04:39:46 or inject a Provider and call .get() Oct 05 04:39:50 do that one Oct 05 04:39:53 that's the right answer Oct 05 04:39:59 brain hurts Oct 05 04:40:01 dont' understand Oct 05 04:40:06 @Inject Provider Oct 05 04:40:11 it just works? Oct 05 04:40:23 for (int i = 0; i < infinity+1; i++) { Foo foo = fooProvider.get(); } Oct 05 04:40:30 if it's not a @Singleton you'll get a new instance each time Oct 05 04:40:30 so it just works Oct 05 04:40:35 awesome, that's cool Oct 05 04:40:37 what's the trick to changing the color of the nav drawer button in the actionbar? Oct 05 04:40:48 shekibobo: it's a drawable Oct 05 04:40:51 shekibobo you specify it Oct 05 04:41:00 in your drawertoggle Oct 05 04:42:03 on dang this Provider is documented on the dagger home page, derp Oct 05 04:42:19 Hmm. Now that I think of it, I could even use onPause/onResume. The documentation guarantees that they'll be called. Oct 05 04:42:31 TacticalJoke i said stop/start for a reason Oct 05 04:43:29 stop of one activity happens AFTER start of another Oct 05 04:43:53 JacobTabak: You could always read the spec https://jcp.org/en/jsr/detail?id=330 Oct 05 04:44:11 Napalm thanks? Oct 05 04:44:29 hey Napalm Oct 05 04:44:34 hey g00000s Oct 05 04:45:29 Napalm i've been pondering something in the android docs, and looking through the code i don't see how they achieve it Oct 05 04:45:33 http://developer.android.com/reference/android/content/SharedPreferences.Editor.html#apply%28%29 Oct 05 04:45:45 "You don't need to worry about Android component lifecycles and their interaction with apply() writing to disk. The framework makes sure in-flight disk writes from apply() complete before switching states. " Oct 05 04:45:51 how the f$#$ do you think they do that ? Oct 05 04:45:54 Okay. So it sounds like using a "worker-thread global" is the best solution Oct 05 04:45:54 . Oct 05 04:46:18 No more worrying about Activity restarts; it's completely independent. Oct 05 04:46:26 Napalm nothing in SharedPreferencesImpl stands out Oct 05 04:47:04 "The framework makes sure" ... we do to. TacticalJoke does also Oct 05 04:47:09 :D Oct 05 04:48:03 Haha. Oct 05 04:48:38 so they are doing an async commit to disk, and somehow getting around the component lifecycle for guranteed goodness Oct 05 04:48:53 Did you see this, g00s? I'm guessing you did, but just to be sure. http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/app/SharedPreferencesImpl.java#SharedPreferencesImpl.EditorImpl.apply%28%29 Oct 05 04:49:04 TacticalJoke yeah i saw that Oct 05 04:49:05 K. Oct 05 04:49:11 * g00s smacks TacticalJoke with a large trout Oct 05 04:49:18 whoah time travel Oct 05 04:49:20 i just went back 10 years Oct 05 04:49:26 Y'all are something else. Oct 05 04:49:26 maybe 15 Oct 05 04:49:34 i wouldn't waste Napalm's time unless i already looked at the code :D Oct 05 04:49:35 * Napalm slaps JacobTabak around a bit with a large trout Oct 05 04:49:45 Napalm are you a hotshot Oct 05 04:49:49 g00s: one mo Oct 05 04:49:54 JacobTabak take me with you…..oh and leave me there on your return Oct 05 04:50:11 StingRay_ just go download Timehop and you'll be set! Oct 05 04:50:12 Just making sure we were looking at the same thing. lol Oct 05 04:51:03 g00s: found it Oct 05 04:51:13 i thought you would :) Oct 05 04:51:23 JacobTabak just downloaded, but dont have FB Oct 05 04:51:25 g00s: android.app.QueuedWork#waitToFinish Oct 05 04:51:38 StingRay_ hahaha, my life story Oct 05 04:51:51 JacobTabak so fk FB, fk u and your app lol Oct 05 04:51:53 StingRay_ been advocating for alternate logins forever Oct 05 04:51:55 Napalm thanks, i need to look at that Oct 05 04:52:11 these ios-based startups just dont care Oct 05 04:53:35 g00s: SharedPreferences.Editor#apply calls QueuedWork#add which, ActivityThread#handlePauseActivity and ActivityThread#handleStopActivity call QueuedWork#waitToFinish Oct 05 04:54:23 g00s: interestingly QueuedWork is used in quite a lot of places Oct 05 04:54:27 wow, maybe i'm in the wrong file. I was in the Impl Oct 05 04:54:36 * JacobTabak slaps Napalm around a bit with who are you why are you g00s role model Oct 05 04:55:04 Napalm knows his shit, he's friendly, and humble Oct 05 04:55:15 he just told me to read the injection spec thats not humble Oct 05 04:55:23 thats dick :D Oct 05 04:55:29 * Napalm whisper's to JacobTabak, "I am Napalm" Oct 05 04:56:01 hehe Oct 05 04:56:26 JacobTabak: waaa? you were saying you were reading dagger home page about it, I give you the originating source for more info.. you hate me for it. Oct 05 04:56:30 :( Oct 05 04:56:45 :'( Oct 05 04:58:14 i love you Oct 05 04:58:17 because g00s loves you Oct 05 04:58:21 and i love g00s and his dingleberries Oct 05 04:58:25 I'm getting an error in dagger like SomeClass required by OtherClass for AnotherClass, anyone know what the "for" part means? Oct 05 04:58:26 g00s: it might be interesting to try a few things with that QueuedWork Oct 05 04:58:26 :O Oct 05 04:59:15 * Napalm hails JakeWharton and his Object Graph theory Oct 05 05:00:57 pieces029: you might be getting a reference loop which dagger cannot meet. A requires B requires C requires A Oct 05 05:01:22 bah QueudWork is internal Oct 05 05:01:24 pieces029: check your dependencies Oct 05 05:01:28 pieces029: tell me what the other two are and I'll tell you what AnotherClass is for Oct 05 05:01:42 g00s: theres' always reflection ... *evil laugh* Oct 05 05:01:57 Error:(47, 10) error: @com.andrewreitz.onthisday.data.SeenNavDrawer()/com.inkapplications.preferences.BooleanPreference required by com.andrewreitz.onthisday.ui.MainActivity for com.andrewreitz.onthisday.ui.screen.PlayerScreen.Module Oct 05 05:02:00 Like that/ Oct 05 05:02:22 hm, reading the code for QueuedWork, not much there .. i am missing something Oct 05 05:02:28 Because the module doesn't and shouldn't care about the preference. Oct 05 05:02:42 pieces029: It's the module in which MainActivity is listed in injects= Oct 05 05:03:08 g00s: check where its used.. ref: ActivityThread, BackupAgent, SharedPreferencesBackupAgent, SharedPreferencesImpl, BroadcastReceiver Oct 05 05:03:18 yeah, thanks Oct 05 05:04:04 Napalm so basically, they are doing work on another thread, but in onPause blocking until its done Oct 05 05:04:25 oh and onHandleStopActivity Oct 05 05:04:26 pieces029: i'm really just guessing, it's been a year since i've been in the Dagger code so i forget exactly what it specifically means Oct 05 05:04:29 yes, its onStop for > APIv11 Oct 05 05:04:57 JakeWharton: ok, the MainActivity is beeing included in the injects on the MainScreen Oct 05 05:05:46 so it looks like some wierd / stupid thing I'm missing. I'm tired and probably sould try again tomorrow. Oct 05 05:07:02 yeah it basically means that when trying to resolve all of the dependencies for PlayerScreen.Module it encountered MainActivity (via injects= or includes= modules or addsTo= modules) and it requires that preference which wasn't in the graph Oct 05 05:07:33 Ok thanks! Oct 05 05:14:40 Standard case of forgetting complete = false Oct 05 05:15:04 lul was gonna suggest that but didnt wanna to be obvious Oct 05 05:15:39 I had complete there so I was like WTF, I just somehow managed to type, you know true... Oct 05 05:16:20 g00s: Did you come to a conclusion? I tried to follow your messages but I'm unsure. Oct 05 05:16:23 you should be trying to lean on addsTo= and includes= rather than complete=false Oct 05 05:16:36 Are they successfully stopping the process from being killed until the write has happened? Oct 05 05:16:42 oh yeah, but i guess you have to make the leafy modules still complete=false Oct 05 05:17:23 TacticalJoke yeah onStop() internally waits for queued work to finish - but its a special case just for them (Preferences). you would have to do it yourself Oct 05 05:17:44 Interesting. Oct 05 05:17:48 JakeWharton: So I have it setup similar to u2020, where you have the UiModule and DataModule those have the includes but, it seems like when I use plus those modules don't know about the Ui/Data modules. Oct 05 05:17:55 And that keeps the process from being killed since we still have an Activity, I guess. Oct 05 05:18:01 Does that make sense? Oct 05 05:18:53 Oh, just saw that last statment. Oct 05 05:19:07 Do they do that just to guarantee that the thread isn't killed? Because that would cast doubt on the whole "You don't have to worry about background threads being killed" thing. ;o Oct 05 05:20:41 * StingRay_ loves doubt casting :) eh JacobTabak Oct 05 05:21:08 im done Oct 05 05:21:51 i have to admit, i am confused. pre api11 they did it in onPause, after 11 onStop. if they did it in onPause i would assume its to protect against the write not happening in the rare case onPause was called, process killed, and your write to prefs didn't happen Oct 05 05:23:02 i used to see all kinds of wonky shit like this on froyo - for example, if i was in my app, pressed home, and loaded the web browser - that was enough memory pressure to cause my app to be killed right away Oct 05 05:23:16 I don't see why I'm getting a negative response in here. Oct 05 05:23:22 Like, I'm trying to write something that works without bugs. Oct 05 05:23:26 I'm investigating everything. Oct 05 05:23:41 Should I be another awful programmer who writes terrible code and doesn't give a damn whether it works? Oct 05 05:23:48 so what was happening when i didn't know wtf i was doing, was I was writing to a database, but it had 100k+ records and that write was taking a long time. the app could get killed before the write completed Oct 05 05:24:07 For every programmer who gives a damn about whether apps work, there are a thousand who couldn't care less. Oct 05 05:24:16 TacticalJoke well, you are kinda inciting 1 on 1 tutorials …. rather than investigating yourself Oct 05 05:24:19 I will never be one of the thousand. Oct 05 05:24:33 which I why I gave you kudos earlier Oct 05 05:24:45 even if it wasn't your intent… :) Oct 05 05:24:49 But this stuff is hard to investigate, and I've googled for hours on every topic. Oct 05 05:24:59 Some of this stuff just takes years of practice. Oct 05 05:25:00 yeah these corner cases are hard to investigate Oct 05 05:25:09 you basically have to look at AOSP code to see what they do Oct 05 05:25:20 and you will realize, right away ... writes are done in a service for all apps Oct 05 05:25:24 not on about apply()/prefs g00s Oct 05 05:25:40 StingRay_ yes, as we established the framework has a special hook for this case Oct 05 05:26:34 TacticalJoke: have i missed this entire conversation, what is it your investigating? Oct 05 05:26:54 unfortunately, google isn't really putting much effort into the AOSP apps any more :( Oct 05 05:27:11 so they seem kinda stuck in lala land Oct 05 05:27:21 'maintenance mode' Oct 05 05:27:42 TacticalJoke one app to check out is iosched 2014 Oct 05 05:27:44 Napalm: The question of whether it's okay to do something like a database write in an AsyncTask. Would the write ever not complete if the user closed the app, for example. The documentation seems to suggest using a Service, but some people in here have said that's not really necessary. Oct 05 05:27:59 Thanks; I'll take a look. Oct 05 05:29:51 oh nice SourceTree comes bundles with ready to use commandline git :) Oct 05 05:30:07 Mercurial is better. :D Oct 05 05:30:22 () Oct 05 05:30:30 TacticalJoke actually - i bet it is. i just use git because thats what everybody else uses Oct 05 05:30:38 i can't learn both Oct 05 05:30:43 * g00s not smart enough Oct 05 05:30:56 It does take a while to learn a VCS. Oct 05 05:31:09 I've been thinking of learning Git but I can't quite motivate myself Oct 05 05:31:09 . Oct 05 05:31:10 TacticalJoke it comes with hg too :D Oct 05 05:31:35 scott chacon is coming out with v2 of the git book very soon Oct 05 05:31:50 Oh, nice. Oct 05 05:31:52 its the only tool i had to read like 4 books before i was comfortable with Oct 05 05:32:11 * g00s still dreeads getting his repo in a state i need to call in the experts Oct 05 05:32:22 last time that happened, they told me to start a new repo Oct 05 05:32:26 As far as I understand it, Mercurial is basically Git with a nicer UI. Oct 05 05:33:15 TacticalJoke check out sourcetree its pretty nice. supports git / hg Oct 05 05:33:32 sorry, d/c Oct 05 05:33:34 I can do enough to get by with command line git, but I like SourceTree a lot Oct 05 05:33:46 Interesting. I've never really used a GUI for revision control. Oct 05 05:34:00 Napalm|afk: The question of whether it's okay to do something like a database write in an AsyncTask. Would the write ever not complete if the user closed the app, for example. The documentation seems to suggest using a Service, but some people in here have said that's not really necessary. Oct 05 05:34:02 Just FYI. :D Oct 05 05:34:02 TacticalJoke i just have it for visualization. i do everything command line too Oct 05 05:34:09 TacticalJoke Oct 05 05:34:17 TacticalJoke: the fact of the matter is the OS/Kernel are god to your application. If they really want to tare down your world they can. So in short yes, there is a chance your database query will not complete. its the same as saying what happens if a user pulls the battery out of the device. you have to mitigate an unexpected shutdown of your application against possible corruption of Oct 05 05:34:17 data. Oct 05 05:34:47 TacticalJoke: In the case of databases, wrap your database write in a sqlite transaction. This pretty much guarantees data integrity because its about the time it takes for sqlite to make the final commit that links the journaled entry into the database. Oct 05 05:35:51 TacticalJoke: which the actual idea of a transaction is to bring all the commits to the datastore into the smallest possible locked time frame. Oct 05 05:36:10 Napalm what we're splitting hairs over, whether db, file whatever, is whether its worth putting a file / db write in a service in what I still believe is a possible scenario - your write is executing after onPause() is called, and the process is killed. but the process might not have been killed if the service was running. Oct 05 05:37:36 hm, Jeff Sutherland wrote another scrum book Oct 05 05:37:37 g00s: TacticalJoke: using a service is about being a good Android Citizen. In pratice a process will always exist if Thread's are running. A service has a life-cycle, so you are notified when the OS wants to kill you. You can then shutdown gracefully. Oct 05 05:38:02 Do you mean "in practice a process will never exit if threads are running"? Oct 05 05:38:07 Or maybe I misread. Oct 05 05:38:23 that is exactly it. Oct 05 05:39:32 source for that ? obv its what ive been saying all night Oct 05 05:39:44 but in less specific, less disprovable terms Oct 05 05:39:57 Napalm hmmmmmm, i don't agree. if processes were alive because threads were running, we wouldn't need IntentService Oct 05 05:40:12 and things like that Oct 05 05:40:14 g00s: wait for it. im getting to that Oct 05 05:40:25 * g00s gets popcorn Oct 05 05:42:23 TacticalJoke: so the simplest explanation can be. If you use a Singleton and Threads and the OS wants to force kill your app, it will and your Thread's be damned. Processing of your Thread's code will cease and program is cleared from memory. If, however the user is exiting the application you get notification of events and you can shutdown your processing in a "nice" way. In pratice you Oct 05 05:42:23 always want to use a service, so you known when the OS wants you dead. Oct 05 05:44:39 Should we worry that the documentation says "[A]n activity that's uploading a picture to a web site should start a service to perform the upload so that the upload can continue in the background even if the user leaves the activity. Using a service guarantees that the operation will have at least "service process" priority, regardless of what happens to the activity."? Oct 05 05:44:50 http://developer.android.com/guide/components/processes-and-threads.html Oct 05 05:45:56 TacticalJoke: i am unsure what you are asking. Oct 05 05:46:09 TacticalJoke, just start coding then micro optimize Oct 05 05:46:11 * g00s throws his popcorn at Napalm Oct 05 05:46:24 * Napalm smiles Oct 05 05:46:43 The documentation is saying "Because a process running a service is ranked higher than a process with background activities, an activity that initiates a long-running operation might do well to start a service for that operation, rather than simply create a worker thread—particularly if the operation will likely outlast the activity". Oct 05 05:46:54 Haha. That's the best popcorn-throwing reaction ever. :D Oct 05 05:48:34 TacticalJoke they fuck up by saying "likely" Oct 05 05:48:59 They're so wishy-washy. "Might do well to...". Oct 05 05:49:05 Like, make up your mind! Oct 05 05:49:33 ugh, this receiver only has one usb output for. power, damnit Oct 05 05:49:33 I bet they're not even sure. lol Oct 05 05:50:28 Oh, gawd, I've thought up the best solution for this database thing. Oct 05 05:50:35 TacticalJoke: http://developer.android.com/training/articles/memory.html#Services Oct 05 05:51:38 Hmm, interesting. Oct 05 05:51:57 TacticalJoke: http://developer.android.com/guide/components/processes-and-threads.html#Lifecycle Oct 05 05:52:21 Yeah, I was reading that recently. Oct 05 05:53:10 are we still talking about database writes or actual use cases for services? Oct 05 05:53:41 Database writes. Oct 05 05:53:47 oic Oct 05 05:53:54 Napalm: So would you say we shouldn't worry about using a service for database writes? Oct 05 05:54:14 An AsyncTask might be okay. Oct 05 05:54:20 TacticalJoke: no Oct 05 05:55:23 TacticalJoke: If a process has no more components running in it, it will likley be killed. A service is a component as such will keep the process around until it has finished. Oct 05 05:55:39 are you serious? Oct 05 05:55:40 TacticalJoke: you can always do what most people do.. create a ContentProvider Oct 05 05:55:48 who are "most people?" Oct 05 05:56:21 ContentProvider's interface is that of a database. Oct 05 05:56:27 it is a component. Oct 05 05:56:52 this topic is like the vietnam of Android Oct 05 05:57:04 JacobTabak: its your choice. The easy way is to simply create a few Parcelable events and throw them at an IntentService Oct 05 05:57:04 who creats content providers for... anything? Oct 05 05:57:17 what.. no Oct 05 05:57:21 the easy way is to just do it from your activity Oct 05 05:57:35 your activity is not killed when you hit back, home, or start a different app Oct 05 05:57:44 yes it is Oct 05 05:57:48 and can, and does Oct 05 05:58:00 you can test it, go into dev tools and scroll to the bottom. Oct 05 05:58:06 Even if it were killed, that doesn't mean the AsyncTask is killed, surely. Oct 05 05:58:10 Like, immediately. Oct 05 05:58:11 yes Oct 05 05:58:14 god TacticalJoke Oct 05 05:58:19 you still don't know the difference between killed and destroyed Oct 05 05:58:23 after all this Oct 05 05:58:26 seriously? Oct 05 05:58:43 Sigh. I meant "Activity destroyed". Oct 05 05:58:49 I just used the same word for both. Oct 05 05:59:01 you honesetly have no right to participate in this conversation Oct 05 05:59:03 if you use thes ame word Oct 05 05:59:06 as i've said like 20 times Oct 05 05:59:06 lol Oct 05 05:59:33 g00s: I am about to give everyone the definitive answer. I'll dig it out of the code. Oct 05 05:59:42 I'll try to learn the correct terms. I had just considered them synonyms, really. Oct 05 05:59:48 Napalm: lol Oct 05 05:59:49 TacticalJoke that is your fking problem Oct 05 05:59:55 kill = PROCESS KILLED Oct 05 05:59:56 Omg, this topic. Oct 05 06:00:00 all static variables, all allocatinos GONE Oct 05 06:00:02 EVERYTHING Oct 05 06:00:03 I am literally laughing out loud. Oct 05 06:00:11 JacobTabak: Okay. Oct 05 06:00:16 destroy = ui destroyed Oct 05 06:00:23 instance still exists Oct 05 06:00:28 its not null Oct 05 06:00:41 all static vars still exist Oct 05 06:00:50 processes NEVER get destroyed Oct 05 06:00:53 applications get destroyed Oct 05 06:00:53 I'd just like to note that this is a common mistake: https://www.google.co.uk/search?q=android+killed+activity&oq=android+killed+activity Oct 05 06:00:56 activities get destroyed Oct 05 06:01:27 the dev setting on your phone let you destroy activities and set bg process limit Oct 05 06:01:33 so you can test this out Oct 05 06:01:36 Napalm: Are you an Android dev? Just wondering. Oct 05 06:01:41 You talked about some code to settle this dispute. Oct 05 06:01:46 g00s yes but that's not a real-life situation Oct 05 06:02:01 JacobTabak of course it can be, they put that there so you test it Oct 05 06:02:03 plan for the worst but dont expect it Oct 05 06:02:12 handle it gracefully Oct 05 06:02:16 no, hope for the best plan for the worst Oct 05 06:02:16 but dont expect it to be common Oct 05 06:02:22 Wouldn't planning for the worst and handling it gracefully be using a Service? Oct 05 06:02:35 the worst is your process killed Oct 05 06:02:37 so nothing u can do Oct 05 06:02:41 Okay. Oct 05 06:03:27 right. but what we're establishing is that the service will prevent the process from being killed; not because it makes it invincible to kill -9, but because the process PRIORITY has increased Oct 05 06:03:51 so kill -9 may not happen :) Oct 05 06:04:10 service wont prevent it from being killed lol Oct 05 06:04:17 as u just said Oct 05 06:04:25 you are confusing cause and effect ! Oct 05 06:04:37 * g00s throws out more popcorn Oct 05 06:05:57 g00s: http://developer.android.com/reference/android/app/ActivityManager.RunningAppProcessInfo.html Oct 05 06:06:14 TacticalJoke: how much *nix do you know ? Oct 05 06:06:25 Not much. Oct 05 06:07:24 nix and java experience helps Oct 05 06:07:30 found it Oct 05 06:08:45 i wish that google had an article on how to use "Background process limit" for debugging; you've got people in XDA of course, who were previously using gentoo, setting that to attempt speedup Oct 05 06:09:56 So I came up with an idea for this database thing. Oct 05 06:10:12 I have a MyDatabase class that handles all the "read", "write", etc. stuff. Oct 05 06:10:33 Maybe I have a MyAsyncDatabase subclass (or class using composition). Oct 05 06:10:43 hey g00s Oct 05 06:10:47 this might be handy https://github.com/android/platform_frameworks_base/blob/master/tests/MemoryUsage/src/com/android/tests/memoryusage/MemoryUsageTest.java Oct 05 06:10:48 hey Oct 05 06:10:53 And the Activity in question just registers/unregisters itself as a callback to this class. Oct 05 06:11:01 This class might queue stuff, like the last error message (not sure). Oct 05 06:11:05 s/queue/cache/ Oct 05 06:12:09 It probably has to keep track of its state, like "State.NORMAL, State.LOADING, State.WRITING, State.LOAD_FAILED, State.WRITE_FAILED", etc. Oct 05 06:12:22 Then MainActivity can figure out what's going on even after a restart. Oct 05 06:12:54 Does that seem like a good idea? Oct 05 06:14:51 MainActivity.onCreate --> if (database.getState() == MyDatabase.State.LOADING) { showLoadingThingy(); } Oct 05 06:14:53 That kinda thing. Oct 05 06:15:31 Then it's totally independent of Activitys. Oct 05 06:15:41 I could, in theory, use it from multiple Activitys. Oct 05 06:15:50 TacticalJoke: talk is cheap Oct 05 06:16:09 You have to plan, though. Oct 05 06:16:12 Can't just dive in blind. Oct 05 06:16:38 yes, but then have you written your hello world yet ? Oct 05 06:16:52 I've already written the app without background threads. Oct 05 06:16:59 Though it's not using a database yet: just files. Oct 05 06:17:04 Yes, I'm reading and writing on the UI thread. Oct 05 06:17:07 And it's never slow, BTW. Oct 05 06:17:25 what app was this again ? Oct 05 06:17:28 The idea is to move to a database, but to plan beforehand. I don't want a nightmare. Oct 05 06:17:34 facebook Oct 05 06:17:37 haha Oct 05 06:17:38 he made facebook Oct 05 06:17:41 lol Oct 05 06:17:46 I'm actually not a bad programmer. I'll have you know. Oct 05 06:17:50 You know why? Oct 05 06:18:05 Because I *thoroughly* investigate things before doing stuff. Oct 05 06:18:15 that is commendable :) Oct 05 06:18:27 disagree Oct 05 06:18:34 I'm also extremely neat regarding code. Oct 05 06:18:44 Few of my methods exceed three statements in length. Oct 05 06:19:01 you sound like a sociopath Oct 05 06:19:04 who talks and doesnt do anything Oct 05 06:19:09 just sayin Oct 05 06:19:09 TacticalJoke: are you coming from C# ? Oct 05 06:19:17 Yeah, shmooz. ;o Oct 05 06:19:24 JacobTabak: I don't see how that makes me sound like a sociophat. Oct 05 06:19:30 TacticalJoke: you might want to look into Xamarin Oct 05 06:19:30 sociopath* Oct 05 06:20:02 JacobTabak: Did you miss the "I've already written the app (but without an SQLite database)" thing, BTW? Oct 05 06:20:17 I don't like using a flat file. If something goes wrong, data loss is easy. Oct 05 06:23:15 It seems that the solution to so much Android hassle is just "Use globals". Oct 05 06:23:56 yeah thats smart Oct 05 06:24:03 what about if you have 2 instances of your activity Oct 05 06:24:28 Wouldn't they both want the same database anyway? Oct 05 06:24:51 same asynctask? Oct 05 06:25:01 how are you going to test it Oct 05 06:25:05 Then have a List globally. Oct 05 06:25:20 im honestly Oct 05 06:25:21 so Oct 05 06:25:22 ugh Oct 05 06:25:24 Why would you couple a database with an activity? Oct 05 06:25:55 Or even an AsyncTask with an activity. Oct 05 06:26:00 (Unless it was some minor, UI-related task.) Oct 05 06:26:19 stop saying asynctask around me or i'll vomit Oct 05 06:28:32 Honestly, I think this concept of an Activity/Fragment owning a worker thread is crazy. Oct 05 06:28:42 Outside of pure-UI work. Oct 05 06:29:12 If a database write happens in a background thread, that has *nothing* to do with the Activity. Oct 05 06:34:07 Also, the idea of using a hidden (non-UI) Fragment for background processing is insane. Oct 05 06:34:16 Why would the Android API people even suggest that. Oct 05 06:34:36 api? Oct 05 06:35:47 TacticalJoke: want to be able to test what happens? Oct 05 06:36:08 g00s Oct 05 06:36:09 Sure. Oct 05 06:36:18 # adb shell am Oct 05 06:36:22 Napalm i have no more popcorn :( Oct 05 06:36:29 am has options to test these conditions Oct 05 06:36:55 am kill-all Oct 05 06:37:02 will kill all background processes Oct 05 06:37:21 # am kill Oct 05 06:37:22 Will that happen with a Service? Oct 05 06:37:28 i think you can set bg process limit=1 Oct 05 06:37:46 oh nm Oct 05 06:38:28 # am force-stop Oct 05 06:38:37 to well, force-stop nicely the package Oct 05 06:39:59 Hmm. Why don't people use java.util.Observable in Android? Oct 05 06:40:08 They just use "listeners" instead. Oct 05 06:40:14 TacticalJoke it has one flaw Oct 05 06:40:43 a lot of times, when you want listeners, you want the fan-out to be on a different stack as the event Oct 05 06:40:47 commands link to these methods "am force-stop" ActivityManagerService#forceStopPackage, "am kill" ActivityManagerService#killBackgroundProcesses, "am kill-all" ActivityManagerService#killAllBackgroundProcesses all of which are here: https://github.com/android/platform_frameworks_base/blob/kitkat-mr2-release/services/java/com/android/server/am/ActivityManagerService.java Oct 05 06:42:34 Napalm: I hate the idea of having to create a whole Service for simple database writing. Oct 05 06:42:54 lolllll Oct 05 06:43:02 ahhhh hahaha Oct 05 06:43:25 then DONT DO IT Oct 05 06:44:06 TacticalJoke: nobody said you need to do it. just its best. Oct 05 06:44:45 one of you Oct 05 06:44:45 i dare you Oct 05 06:44:47 tell me one time Oct 05 06:44:50 you had a bug report Oct 05 06:44:57 because a db write didnt go through because the activity died Oct 05 06:44:59 DO IT Oct 05 06:45:00 you can't Oct 05 06:45:02 * Darklust watches JacobTabak's marbles roll away Oct 05 06:45:12 i just can't beleive the nonsense Oct 05 06:45:18 TacticalJoke: i dont know why your making a big deal of it all Oct 05 06:45:30 Napalm you encouraged him Oct 05 06:45:38 he's a 'perfectionist' Oct 05 06:45:53 can ANYONE name one time that a db write didnt go thru Oct 05 06:45:53 TacticalJoke: just create a Service, add an Executor.. hand it Runnables.. Oct 05 06:45:53 there is that 1 in a billion chance Oct 05 06:46:01 when performed from a different thread in an activity? Oct 05 06:46:06 TacticalJoke: when Activity dies Service carries on using Runnable's Oct 05 06:46:20 JacobTabak i had this happen on froyo Oct 05 06:46:30 ... a db write Oct 05 06:46:33 because the process was killed? Oct 05 06:46:38 TacticalJoke: when Service not linked to Activity anymore and queue empty. shut-down. Oct 05 06:46:46 yes, the table had over 100k records, the insert took relatively long Oct 05 06:46:58 alright i retract Oct 05 06:47:00 make a service Oct 05 06:47:09 TacticalJoke: If Sevice is requested to shutdown or low-mem warning. do clean up. finish service. Oct 05 06:47:11 done Oct 05 06:47:50 JacobTabak also, as a code archeologist, you have to ask why the android devs always do this in AOSP apps Oct 05 06:48:13 because they had unlimited resources Oct 05 06:48:17 and 20 man teams Oct 05 06:48:24 and had to plan for every edge case Oct 05 06:48:36 (yet google+ crashes right and left) Oct 05 06:49:00 whats google+ ? Oct 05 06:49:19 :) Oct 05 06:52:46 g00s: you know you wanted to know about the importance logic. Oct 05 06:52:59 g00s: when the OS will kill your app Oct 05 06:53:07 yes Oct 05 06:53:27 computeOomAdjLocked method here https://github.com/android/platform_frameworks_base/blob/kitkat-mr2-release/services/java/com/android/server/am/ActivityManagerService.java#L14249 Oct 05 06:53:36 read the comments Oct 05 06:53:52 i assumed that its an implementation detail that could even be changed by oems for tuning, so I assume the worst Oct 05 06:54:08 * g00s reading Oct 05 06:57:03 shmooz: I am a perfectionist. You're right. Oct 05 06:57:11 And you were right about me coming from C#. lol Oct 05 06:57:30 JacobTabak: Are you seriously retracting? Oct 05 06:57:36 sigh Oct 05 06:57:38 Dammit. I was hoping you were right. lol Oct 05 06:58:08 TacticalJoke: wb, see link above for information about how Android chooses how important your process is. Oct 05 06:58:17 Thanks. Looking. Oct 05 06:58:29 if you spend this long on just this aspect you will never finish the app Oct 05 06:58:29 holy shit Napalm thats complicated Oct 05 06:58:47 "This was the previous process that showed UI to the user. // We want to try to keep it around more aggressively, to give // a good experience around switching between two apps." Oct 05 06:58:47 That method is way too long. Oct 05 07:04:35 JakeWharton: I really like your globals idea. Oct 05 07:05:07 I feel like I've had an ephiphany tonight: activities/fragments can't be trusted. Domain stuff should stay away. Oct 05 07:05:57 =yet its all talk and no experience Oct 05 07:10:00 It makes sense, and it's backed by some experience. Oct 05 07:10:11 All the user has to do is rotate the handset and the Activity will die. Oct 05 07:10:17 How can we trust an Activity to hold onto anything? Oct 05 07:10:18 We can't. Oct 05 07:10:33 no experience Oct 05 07:10:38 it gets destroyed Oct 05 07:10:40 not die Oct 05 07:10:42 dummy Oct 05 07:10:48 You're hilariuos. Oct 05 07:10:49 hilarious* Oct 05 07:10:56 if i wake up tomorrow and you guys are still sparring ... Oct 05 07:11:03 I don't get what his problem is. lol Oct 05 07:11:08 I ask too many questions? Oct 05 07:11:08 u dont listen Oct 05 07:11:12 u dont know the diff between dying adn destroy Oct 05 07:12:28 So I'm not allowed to say "the Activity will die" now. Oct 05 07:12:52 a db write will not die Oct 05 07:12:54 if the fking acitivyt rotates Oct 05 07:13:57 do you understand that? Oct 05 07:14:18 or is that a point of contention? Oct 05 07:14:34 just write synchronusly Oct 05 07:14:40 Well, I'll accept that it won't "die" in the vast majority of cases. Oct 05 07:14:42 you have miles of hurdles before the app is even viable Oct 05 07:14:51 it wont EVER DIE Oct 05 07:14:54 if you rotate Oct 05 07:14:56 during a db write Oct 05 07:14:59 the write will NEVER Stop Oct 05 07:15:04 rakjldfkladsfasdjfk Oct 05 07:15:51 rotating the device will NEVER kill your process Oct 05 07:16:01 never ever ever Oct 05 07:16:04 and if anyone disputes that Oct 05 07:16:09 they're sociopaths just like you Oct 05 07:16:52 What if rotation changes causes the app to crash Oct 05 07:17:04 trolololol Oct 05 07:17:22 OK, so I'm pretty confused with android development, so far. http://developer.android.com/sdk/installing/adding-packages.html tells me to install a whole pile of packages, and doesn't tell me what any of them do. Oct 05 07:17:38 Is there a guide that actually explains the instructions it issues? Oct 05 07:18:08 if you want to know what something does ask Oct 05 07:18:10 or google it Oct 05 07:18:45 all of the packages it mentions Oct 05 07:19:03 All hope is lost, when tutorials need to be written on the topic of tutorials Oct 05 07:19:04 the android sdk, the platform tools, the build tools, the platform Oct 05 07:19:36 do you have a specific question about if one of them is needed or what it does? Oct 05 07:20:09 no, I just want a one-line description of each basically. The tutorial should have done that. Oct 05 07:20:14 google can do that Oct 05 07:20:18 you need them all Oct 05 07:21:01 Don't you see that's a huge waste of time, though, when the tutorial could have had a short description of each? Oct 05 07:21:11 well, here it goes. Starting with the sdk. Oct 05 07:21:17 jsut check them all Oct 05 07:21:19 and click download Oct 05 07:22:01 I suppose common sense dictates that the developer would know what an SDK is, what a platform is, what the term "build" refers to, etc. Oct 05 07:22:05 also, the platforms have versions, but they aren't the same as for example 4.3. How do the platform version map to android versions? Oct 05 07:22:28 https://source.android.com/source/build-numbers.html Oct 05 07:23:13 Was there a reason they didn't just use the same versioning system for both? Oct 05 07:23:31 because one is incremental (version code) and one represents major/minor releases Oct 05 07:23:56 well, yeah that describes them well, but why? Oct 05 07:24:08 one is a string the other is an integer Oct 05 07:24:08 Why not just one or the other? Oct 05 07:24:18 for example, L preview is called 'android-L' Oct 05 07:24:45 its nice to have a version name and a version integer Oct 05 07:24:52 no complexities when comparing version ints Oct 05 07:25:02 vs a version name which could be 4.0.0-dev Oct 05 07:25:05 so why have the version at all? Oct 05 07:25:11 why not just the version integers? Oct 05 07:25:21 because version names are user facing Oct 05 07:25:40 That really doesn't answer the question. Oct 05 07:25:43 whats easier to understand, "Windows 8" or Key Lime Pie ! Oct 05 07:25:45 One is for computers; the other, humans. Oct 05 07:25:47 How can you not see that? Oct 05 07:25:55 toombs: Are you trolling? lol Oct 05 07:26:11 I was about to say, JacobTabak is on the verge of an aneurysm as it is Oct 05 07:26:18 im over Oct 05 07:26:34 the line Oct 05 07:26:47 well, these aren't necessarily questions I demand an answer to, and from you. These are just questions I have. Oct 05 07:27:08 toombs: What is your programming experience like? Oct 05 07:27:12 "I have no idea" is a perfectly acceptable answer Oct 05 07:27:28 as for my programming experience, I've been around, we'll say. Oct 05 07:27:37 mostly on the open source circuit Oct 05 07:27:47 Surely you know, by now, the idea behind version numbering for computers and version numbering for humans. Oct 05 07:27:57 toombs: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels Oct 05 07:27:59 I'd never run into that until now Oct 05 07:28:13 all the software I'd ever used had one version. One. Oct 05 07:28:20 Usually a list of integers. Oct 05 07:28:34 ever used Oct 05 07:28:36 not developed Oct 05 07:28:44 and developed Oct 05 07:28:55 It's also probably false. So much software uses human-friendly version labels nowadays. Oct 05 07:29:04 API level changes when the API changes.. There's no API changes between 4.4.0 and 4.4.1, so the API level is the same Oct 05 07:29:10 toombs Oct 05 07:29:12 here is the real reason Oct 05 07:29:15 sometimes you need to do a software update Oct 05 07:29:17 thats ninja Oct 05 07:29:20 and u want to use the same version nae Oct 05 07:29:24 name Oct 05 07:29:33 so u just incrememnt the version code Oct 05 07:30:02 You can also do stuff like "if (versionNumber < x)". Oct 05 07:30:07 wait which versioning system does "version code" refer to? Oct 05 07:30:11 Can't do that with happy human labels. Oct 05 07:30:27 not general strings, no, but integer lists, yes Oct 05 07:30:30 and it's done all the time Oct 05 07:30:31 toombs: JacobTabak is talking about application version Oct 05 07:30:31 did u see the link Oct 05 07:30:31 i psated Oct 05 07:30:38 General strings are nice for humans to read. Oct 05 07:30:45 They solve a whole different problem. Oct 05 07:32:43 g00s: im off, cya Oct 05 07:32:50 take care Napalm ! Oct 05 07:33:02 * Napalm throws the popcorn back to g00s Oct 05 07:33:03 thanks for the links , still reading Oct 05 07:33:04 ;) Oct 05 07:33:13 oh man, you chewed it already ! Oct 05 07:33:18 gross Oct 05 07:33:21 * Napalm slaps g00s around a bit with a large trout Oct 05 07:34:03 * JacobTabak slaps g00s around a bit with and a large dingleberry Oct 05 07:34:07 damn Oct 05 07:34:09 irc skillz gone Oct 05 07:34:51 keep your dingleberries attached to your own code :) Oct 05 07:41:50 Okay, thanks for the help. I have to go. Oct 05 07:42:05 dieeeee Oct 05 08:15:19 wsup guys? Oct 05 08:15:29 how do i hide an entry in a navigation drawer? Oct 05 08:16:39 join #codeigniter Oct 05 08:18:45 how do i hide an entry in a navigation drawer? Oct 05 08:48:12 it's just a view Oct 05 08:48:21 setVisibility(View.GONE) Oct 05 08:48:32 or if it's backed by an adapter remove the item and call notifyDataSetChanged Oct 05 09:08:00 according to Android Studio's debugger, my startActivity(intent, load.class) isn't actually calling load Oct 05 09:08:16 *startActivity(intent) Oct 05 09:08:38 I added breakpoints to load.class and they are never hit Oct 05 09:08:48 so can I assume load.class isn't being run at all? Oct 05 09:09:00 *added breakpoints to load.java Oct 05 09:22:43 In my colours.xml should I name colour by their context or just their color? Oct 05 09:22:56 e.g Should I call it "actionbar_bg", or just "light_blue"? Oct 05 09:28:26 Any tips in general on how to organise colors.xml? Oct 05 09:28:36 I feel like it would get out of hand easily Oct 05 09:28:40 So many entries Oct 05 09:30:09 AKK9, the point of resources is that they allow you to easily tweak and customize stuff Oct 05 09:30:15 so using resources Oct 05 09:31:09 where you just replace "Color.LIGHT_BLUE" with "getColor(R.color.light_blue)" is totally silly Oct 05 09:31:09 use a meaningful and grouped names - "primary_highlight", "dark text", "title_text_color", "brand_color" etc. Oct 05 09:31:19 so when your brand color changes you just have a single place to replace it ;_) Oct 05 09:31:56 Ah great, thanks Oct 05 09:33:44 I have an idea, I might have just colours in the first half of my xml (e.g "light_blue"). Oct 05 09:33:52 And then further down int eh second half Oct 05 09:34:31 I can do, for example, @color/light_blue Oct 05 09:34:38 Then I get the best of both worlds Oct 05 09:34:48 and I can tweak 1 colour which affects multiple things Oct 05 09:34:56 Or I can tweak particular things Oct 05 09:35:02 in the second part of the file Oct 05 09:37:31 hi. I am making my own sqlite editor. and I listed all the table names, then I select a table to update one of its records. it's called "receipt". Then I send the table name and the rowid through Intent.setExtra(). Then when I update that record using "update or replace receipt" , I get no such table "main.receipt" although I did not use the word "main." at all!! so what's going on there!? Oct 05 09:39:34 couold be sqlite injection? Oct 05 09:40:35 Ashiren, from where??! it's my own work! Oct 05 09:41:29 you sabotage your own work!? Oct 05 09:41:38 maybe pastebin some code Oct 05 09:42:40 and to be exact it says this : "no such table `main.reciept` in update or replace receipt set id=1, timestamp=' whatever here' Oct 05 09:43:04 my table name is "receipt" and not "reciept"! Oct 05 09:43:57 from where did `main.reciept` come!?!? Oct 05 09:44:18 I can update any other table like a charm! Oct 05 09:50:28 how can I list table fields? Oct 05 09:50:36 how can I list table field names? Oct 05 09:52:06 Stop that hole is too tight Oct 05 09:56:26 If I set a new layout, do I need to set up a new seek bar listener if seekbar has the same id in the old and new layouts? Oct 05 10:11:19 hi, trying to update android studio on mac osx, getting file not found when running script `bin/update_studio.sh` Oct 05 10:11:38 *mean patch not found, file it is trying to download is "https://dl.google.com/android/studio/patches/AI-135.1404660-135.1446794-patch-mac.jar" Oct 05 10:20:00 hi! Oct 05 10:20:19 which version of java is supported by android 4.4? Oct 05 10:21:15 7 Oct 05 10:21:27 doh Oct 05 10:25:56 there should be a way to define the name of a method without it's signature in an interface Oct 05 10:26:26 I want every instance to have a function named foo, but they will implement it differently Oct 05 10:27:02 rdnt: That's stupid... You want to rely on the signature. Oct 05 10:27:51 I don't want to replace how it works, I want another option Oct 05 10:28:19 rdnt: Give me two examples of how you'd like the signatures to be. Oct 05 10:28:47 A restriction would be that you couldn't call the generic method on a concrete class Oct 05 10:29:22 You wouldn't know how to call a method if all you know is that it's a FooInterface Oct 05 10:29:24 It's just for API purposes, so I can tell devs what function to call Oct 05 10:30:10 rdnt: It's not just 'calling'. It's also 'passing arguments' and 'using return value'. Oct 05 10:30:46 And possibly 'seeing stuff is synchronized or strictfp' or 'seeing what type parameters the function has'. Oct 05 10:31:20 ok withdrawn Oct 05 10:31:47 I started typing a counter argument but then realized SimonVT was right Oct 05 10:32:29 trying to overautomate the automatic processes Oct 05 10:34:58 I am doing a project for my uni research on localization. I have an interface named Ranging (avoiding "Range") which could have a method `findDistance`. Except different implementations will use different signatures Oct 05 10:36:25 rdnt: Then your goal has to be to make them use the same signature. Still, what would could be two examples of different signatures? Oct 05 10:38:27 I can reduce it to primatives and primative arrays, perhaps into a few categories, but there are not that many implementations so I think it's unnecessary Oct 05 10:38:37 unneccessary*? Oct 05 10:38:49 It's really not that big a deal, I sometimes get caught up trying to be overly consistent. Oct 05 10:39:27 by "it" i mean the parameters Oct 05 10:40:00 thanks for the thoughts though Oct 05 10:42:02 just got a strange pm from Darklust Oct 05 10:42:35 alright, I'm getting a 400 error in a retrofit call, and I can't seem to figure out how to get a meaningful message out of tit Oct 05 10:42:53 error.getCause() .getStackTrace() getMessage() Oct 05 10:42:57 what's the trick? Oct 05 10:45:58 flan3002: float[] findDistance(float, long) _and_ double findDistance(double, double) are two examples Oct 05 10:46:48 unfortunately, one uses x,y,z component distances, while the other is linear. Oct 05 10:47:06 rdnt: Well, with Javas generics, you can't do that. Do you /really/ either need the precision of double or the memory savings of float? Oct 05 10:47:31 Otherwise, you'd have to have two methods or interfaces, one per precision. Oct 05 10:48:24 flan3002: I might do that, since I've already put this much effort into it :D Oct 05 10:49:13 rdnt: In any language with proper generics, you could be generic over all this, but... Java is not one of them. Oct 05 10:49:28 Are there any issues casting a `long` to `double` and back, or vice versa? I searched this earlier and it seemed fine Oct 05 10:49:49 Apart from lost precision? Oct 05 10:49:58 hi everyone Oct 05 10:50:30 well actually, just long to double and back to long Oct 05 10:51:00 i.e. use double in signatures and allow storing a timestamp as double Oct 05 10:51:04 how can I revert to a single file's previous git version in android studio? Oct 05 10:52:03 ashemark, is it on github (or online)? Oct 05 10:52:27 rdnt: Well, the value range is different. Decide for yourself if that's a problem. Oct 05 10:52:53 rdnt I have a complete project version controlled via git, just want to revert to a particular file's previous version Oct 05 10:53:11 it's both local as well as backed up to a remote repository on github Oct 05 10:53:36 ashemark: git checkout -- file.java? Oct 05 10:54:37 flan3002 i think checkout is used for branches! Oct 05 10:54:51 ashemark: Updates files in the working tree to match the version in the index or the specified tree. Oct 05 10:55:06 flan3002 ohh Oct 05 10:55:24 git checkout --help for more information. Oct 05 10:55:43 flan3002 my local repository is in sync with the remote one Oct 05 10:56:03 just want to move a single file to a previous commit Oct 05 10:56:22 and commit that again maybe Oct 05 10:56:34 Replace -- by the commit hash. Oct 05 10:57:12 how do i type this command in android-studio? Oct 05 10:57:54 You don't. Oct 05 10:58:39 But I think AS has that inbuilt terminal. Alt-F12 or something? Oct 05 10:58:48 should i navigate to my local directory via the terminal Oct 05 10:59:05 local project directory Oct 05 10:59:18 Yes. Oct 05 10:59:22 then type git checkout -- file.java Oct 05 10:59:24 great Oct 05 11:00:00 won't that mess up the AS's inbuilt git version control? Oct 05 11:00:12 like i don't do commits via the terminal Oct 05 11:00:28 I just press C-k and AS does that for me Oct 05 11:00:37 AS has no inbuilt git. Or at least I hope that. Oct 05 11:00:51 They'll only call the system git. Oct 05 11:01:10 ok Oct 05 11:01:13 If you must be sure, close AS before-hand. Oct 05 11:01:32 yeah, and i can use the system terminal Oct 05 11:04:49 flan3002 is there a quick undo if I mess up or something? Oct 05 11:05:07 In AS, you mean? I don't use AS, so... go ask someone else. Oct 05 11:05:26 no, in git! Oct 05 11:07:21 Quick undo? Undo of what? Oct 05 11:08:52 flan3002 nevermind Oct 05 11:08:54 thanks Oct 05 11:42:01 rxjava question if anyone is around Oct 05 11:42:44 I have an observable that turned out to need another observable to provide some data for it Oct 05 11:42:51 I figured I could compose them Oct 05 11:44:45 Observable> mappedRequest = service.firstRequest().map(s-> desiredResponse(s.location)) Oct 05 11:45:06 where desiredResponse(location) returns an Observable> Oct 05 11:45:37 however, AS is complaining that I have an incompatable data type in my lambda Oct 05 11:57:13 In a vanilla Android Studio project, placeholder Fragment class doesn't have an onCreate() method. Is onCreate() not needed for Fragment classes? Oct 05 12:04:23 donniezazen: there is onCreate(Bundle savedInstanceState) instead Oct 05 12:06:48 sq: PlaceholderFragment belongs to class MyActivity which has onCreate but not the PlaceholderFragment itself. Oct 05 12:09:06 oh, that Oct 05 12:09:16 http://stackoverflow.com/questions/23232672/placeholderfragment-in-android Oct 05 12:10:11 and i'm not sure any of the methods are *required* for Fragment subclasses Oct 05 12:13:25 sq: Thanks Oct 05 13:02:13 Hey anyone knows what can be done to overcome the prohibition of some countries when creating a merchant account? Oct 05 13:03:08 proxy, vpn? Oct 05 13:03:29 Coup d'état? Oct 05 13:03:55 No i mean when creating the Google Play store you enter your bank account and if it's located in a country that's not supported you can't sell your apps or make in-app billings Oct 05 13:05:04 Is there any way to use paypal here or perhaps someone else's bank account in a country that's supported? Oct 05 13:06:03 you can't use paypal on the play store... Oct 05 13:06:27 you could get someone else to publish for you, potentially, but that would be between you and them Oct 05 13:07:17 Does the bank account need to be registered in my name or could my friend register it in say the UK and I would use it? Oct 05 13:08:05 I couldn't find anything about this in google's faqs and licenses Oct 05 13:11:03 there are now updates on the ADT on eclipse. go update if you want. Oct 05 13:14:50 aaaaaahhhh i figured out how to erase test in app purchases finally Oct 05 13:17:30 err maybe not Oct 05 13:41:37 help Oct 05 13:42:04 I installed genymotion earlier.....Now I uninstalled it and the emulator is still showing in the device list.... removed it from virtualbox also Oct 05 13:42:11 but it still shows up in the device list Oct 05 13:44:15 Agamemnus: Restart adb? Oct 05 13:44:38 what is the command? Oct 05 13:45:03 i already tried adb kill-server Oct 05 13:45:06 and adb start-server Oct 05 13:45:15 there's nothing in .android/avd Oct 05 13:45:39 I'd sudo pkill adb. Oct 05 13:45:48 I'm on windows Oct 05 13:45:52 Oh... Oct 05 13:46:06 so not sure what that means :P Oct 05 13:46:20 I can't help you killing it then. Oct 05 13:46:27 i restarted my computer Oct 05 13:46:34 it didn't help Oct 05 13:46:47 Does it show up with adb devices? Oct 05 13:46:51 yes. Oct 05 13:46:58 is there anywhere else where i can look for the emulator? Oct 05 13:47:16 it isn't in virtualbox..... genymotion uninstalled... not in .android/avd Oct 05 13:47:22 could it be hiding somewhere else? Oct 05 13:47:39 It sure could. I don't know if it does and where it would though. Oct 05 13:47:53 just kill all adb processes Agamemnus Oct 05 13:48:34 adq: Restarting should do. Oct 05 13:48:36 adq: I restarted my computer Oct 05 13:48:39 .. Oct 05 13:48:40 It didn't help Oct 05 13:48:46 i'm using daily genymotion on windows Oct 05 13:48:57 I uninstalled genymotion.. Oct 05 13:48:58 there is no persistent stuff in adb which could do that Oct 05 13:49:15 you probably forgot to "show processes from all users" Oct 05 13:49:26 but i restarted the computer Oct 05 13:49:46 try #genymotion, but it's sunday nobody works Oct 05 13:50:15 how do I uninstall an emulator from genymotion? Oct 05 13:50:24 i am going to install it again and see if it shows up somewhere Oct 05 13:50:38 genymotion is not an emulator, it is using virtualbox under the hood + few subtilities Oct 05 13:51:02 shrugz Oct 05 13:51:12 but if it is still showing after a reboot Oct 05 13:51:17 it's very weird Oct 05 13:51:35 sometimes you can see vboxheadless when it fails to properly shutdown after closing a vm Oct 05 13:51:41 but that should not persist after a reboot lol Oct 05 13:52:25 is it safe to delete C:\Users\\.android\cache ? Oct 05 13:52:26 Agamemnus, are you sure it's a genymotion vm in adb devices? Oct 05 13:52:37 it's always with an ip like 192.168.***:5555 Oct 05 13:52:43 Hmm Oct 05 13:52:46 if it is not, it's maybe a device your forgot to unplugged ;) Oct 05 13:52:48 Really..... Oct 05 13:52:50 yes! Oct 05 13:52:56 It's saying Oct 05 13:52:58 emulator-5554 Oct 05 13:53:01 ahhh Oct 05 13:53:03 it's avd! Oct 05 13:53:07 it's not genymotion :) Oct 05 13:53:17 I never used avd Oct 05 13:53:23 But Oct 05 13:53:34 I tried this Oct 05 13:53:39 android delete avd -n emulator-5554 Oct 05 13:53:42 didn't work Oct 05 13:53:47 is that the wrong command? Oct 05 13:54:07 no clue, I don't launch adb via command-line Oct 05 13:54:12 err avd* Oct 05 13:54:18 but i'm pretty sure it's not genymotion Oct 05 13:54:22 it is Oct 05 13:54:33 i never used the avd command Oct 05 13:54:34 thus, go ask on #genymotion Oct 05 13:54:41 hey, if i create an app using facebooks api's.. and i commercialize it, would it violate any tos? Oct 05 13:54:43 but you say they are all dead Oct 05 13:54:50 genymotion must be launch via genymotion front-end or genymotion shell Oct 05 13:54:56 supay: consult your lawyer Oct 05 13:54:57 i don't see how it can be launch differently Oct 05 13:55:00 adq: hmm.. Oct 05 13:55:04 Agamemnus: can't really affordone Oct 05 13:55:08 afford one* Oct 05 13:55:08 you should trust me Agamemnus, you know me :) Oct 05 13:55:23 supay: then don't Oct 05 13:55:34 supay: the APIs are meant to be used Oct 05 13:55:35 i don't know more. Oct 05 13:55:41 But otherwise Oct 05 13:55:45 Read the fine print.... Oct 05 13:55:45 Agamemnus: even if i commercialise? Oct 05 13:56:08 ok.. Oct 05 13:56:11 I am sure if you read the terms of service... Oct 05 13:56:15 read the ToS/agreement supay Oct 05 13:56:16 you will know... Oct 05 13:56:24 adq: okay.. Oct 05 13:56:54 Hey guys, so I wanna try to make an app but i am stuck in some of its logic. I would like to have a group of people synced with their GPS locations for the apps purposes. However how should this be done efficiently? I don't think that having a database and constantly updating it for every person is efficient Oct 05 13:57:14 because GPS location should be updated for everyone anytime Oct 05 13:57:27 i'm going to go restart..... Oct 05 14:00:32 do you guys suggest ui kits? i dont really understand how to make those beautiful apps that we see nowadays.. Oct 05 14:00:43 or do i use the default android components Oct 05 14:02:03 is there an android related design channel by any chance? Oct 05 14:03:09 adq Oct 05 14:03:11 I figured it out Oct 05 14:03:21 I googled "emulator 5554" Oct 05 14:03:25 so? what was it? Oct 05 14:03:36 found someone with the same problem Oct 05 14:03:44 adb reboot bootloader Oct 05 14:03:55 Agamemnus: are you familiar with designing apps as well? Oct 05 14:04:17 Agamemnus, so are you convinced it has nothing to do with "gm"? :) Oct 05 14:04:19 What further would you recommend for an android developer who wants to be an architect for mobile? Oct 05 14:04:33 no Oct 05 14:04:38 it's genymption Oct 05 14:04:41 supay: UI kits? Like... which? Oct 05 14:04:41 genymotion Oct 05 14:04:45 oO Oct 05 14:05:02 i'm convinced it is genymotion :P Oct 05 14:05:10 supay: There are guidelines. Adhering to these will make your app 'fit in', which is mostly a very good thing. Oct 05 14:05:10 supay: well....yes Oct 05 14:05:11 flan3002: some like these - http://freebiesbug.com/psd-freebies/ui-kits-psd-freebies/ Oct 05 14:05:28 but so far i only made game Oct 05 14:05:37 Agamemnus: only? -." Oct 05 14:05:47 supay: I don't see any UI kits on the page your link refers to. Oct 05 14:05:52 flan3002: how about an app like zomato, or whatsapp? how do they make it look so good? Oct 05 14:05:52 i mean, not an app Oct 05 14:06:10 Agamemnus, can you show me the link please? i'm curious, and sorry if i was wrong, but as I told you, i'm using genymotion daily Oct 05 14:06:20 flan3002: seriously? they're all there? - http://freebiesbug.com/psd-freebies/clean-ui-kit-sketch/ Oct 05 14:06:25 (also speak to their dev daily too) Oct 05 14:06:33 http://forum.xda-developers.com/showthread.php?t=1301934 Oct 05 14:06:37 thank you Oct 05 14:06:39 supay: They use styling, but they still use the standard components, or subclasses of them. Oct 05 14:06:48 but it doesn't say anything about genymotion Oct 05 14:06:51 supay: Those are not what I think an 'UI kit' is. Oct 05 14:06:55 It was a tablet emulation option Oct 05 14:07:09 flan3002: oh, i see.. those are default components? wow.. Oct 05 14:07:10 I don't see anything in this thread pointing it's related to genymotion, are you playing with my nerves lol? Oct 05 14:07:22 This is the thread I found though Oct 05 14:07:23 cause i just wanted to help you. Oct 05 14:07:32 Relating to emulator 5554 Oct 05 14:07:32 good luck now Oct 05 14:07:42 Well Oct 05 14:07:47 If you want, you can try it yourself Oct 05 14:07:52 ... Oct 05 14:08:00 supay: If you desire, you can peek into any app, e.g. with the app 'Dexplorer'. It would have allowed you to see that WhatsApp just uses standard Views. Oct 05 14:08:02 It's the 10 inch tablet thing... Oct 05 14:08:04 you have to had an IP with vbox Oct 05 14:08:17 anyway. Oct 05 14:08:18 Man I dunno. Let me reinstall genymotion again Oct 05 14:08:31 you should understand what you do first Oct 05 14:08:33 flan3002: ah, a reverse engineering technique.. fair enough. i'll give it a shot! Oct 05 14:08:37 thanks flan3002 :) Oct 05 14:09:53 supay: You can take my word for it though. Also, you'll need more experience than you seem to have to conclude from what Dexplorer shows you to what technology the app uses. Oct 05 14:09:57 i think it was the 4.4.2 custom 10 inch tablet Oct 05 14:10:07 i am downloading the files again Oct 05 14:10:13 2560x....something Oct 05 14:10:20 resolution has nothing to do with your issue Oct 05 14:10:27 please don't mislead ppl, it's a developer channel. Oct 05 14:10:38 i am just saying what I see Oct 05 14:10:52 i never used avd in command line Oct 05 14:12:20 ugh Oct 05 14:12:21 ok Oct 05 14:12:26 so trying to prove to you Oct 05 14:12:26 but Oct 05 14:12:39 Unable to create virtual device: failed to import OVA Oct 05 14:12:42 and then it closes Oct 05 14:19:14 adq: pretty weird, what can I say Oct 05 14:20:04 idk, but I said what i have to said :) Oct 05 14:20:16 well, either that was some fluke, or something else installed the emulator.... but what? Oct 05 14:20:35 seems to be an IP like you said Oct 05 14:20:59 I told you many things to convince you it's not genymotion, and you point me to an unrelated page trying to prove it's genymotion, i'm done. Oct 05 14:21:22 rebooting is also not the best way to understand nor to fix an issue Oct 05 14:21:56 Sorry for confusing you, didn't mean to mislead or anything Oct 05 14:22:09 As I am confused myself. Perpetually.. Oct 05 14:22:14 it's ok :) Oct 05 14:22:23 For example, my ads crash my game on the S3 Oct 05 14:22:57 Trying to figure it out, but can't find an up-to-date rooting file yet... Oct 05 14:23:14 (my ads = admob) Oct 05 14:38:48 ok Oct 05 14:44:15 I have a bad question :/ How do I use a project fromk github in my own project? Oct 05 14:45:26 nvm Oct 05 14:45:44 i make a dependancy in gradle and it does it by itself apparently Oct 05 14:45:44 gradle build is giving me this error http://pastebin.com/55BUMhUr Oct 05 14:46:27 Tried this http://stackoverflow.com/questions/23790309/could-not-add-entry-to-cache-filesnapshots-bin . but still getting the error. Oct 05 14:50:03 nvm, just nuked the .gradle folder Oct 05 14:52:55 I added this to gradle but it doesn't work Oct 05 14:52:55 ndencies { Oct 05 14:52:56 compile fileTree(dir: 'libs', include: ['*.jar']) Oct 05 14:52:56 compile 'https://github.com/FaizMalkani/FloatingActionButton' Oct 05 14:53:04 Sorry just this line Oct 05 14:53:05 compile 'https://github.com/FaizMalkani/FloatingActionButton' Oct 05 15:29:43 Question Oct 05 15:30:07 Is there a way to build an APK with settings that tell Google Play not to install if a phone has under XYZ RAM? Oct 05 15:31:21 no Oct 05 15:31:33 the closest solution https://stackoverflow.com/questions/12234221/specifying-android-market-ram-in-the-manifest Oct 05 15:33:00 actually Oct 05 15:33:04 maybe it is video memory Oct 05 15:33:05 not sure Oct 05 15:33:08 S3 crash. Oct 05 15:33:29 Isolated it to this line: Oct 05 15:33:30 W/Adreno-GSL(22088): : ioctl fd 77 code 0xc01c0934 (IOCTL_KGSL_GPUMEM_ALLOC_ID) failed: errno 12 Out of memory Oct 05 15:33:56 Someone please, I want to put this in my project: https://github.com/FaizMalkani/FloatingActionButton Oct 05 15:34:14 I dont know how, I've googled so much and tried importing as module Oct 05 15:34:15 Agamemnus: maybe some memory leak? Oct 05 15:34:18 but it doesnt work Oct 05 15:35:03 please Oct 05 15:35:21 hi all, someone got a suggestion for a master thesis topic? something in combination with newer android libraries that are commonly used? Oct 05 15:35:43 Ashiren: no memory leak... Oct 05 15:36:33 AKK9: maybe ask the plugin creator Oct 05 15:36:41 https://github.com/FaizMalkani/FloatingActionButton/issues Oct 05 15:37:23 Agamemnus: so what kind of graphics you use in your project? D: Oct 05 15:37:27 okay Oct 05 15:37:46 AKK9: android studio? eclipse? Oct 05 15:38:13 Ashiren: here's someone with the same problem Oct 05 15:38:14 http://forum.thegamecreators.com/?m=forum_view&t=211805&b=41 Oct 05 15:38:15 Ashiren, android studio. I downloaded his project as zip, unzipped, imported as module but it doesnt regognise the classes Oct 05 15:38:21 I don't have a lot of graphics Oct 05 15:38:32 If it's rounding to powers of 2 that could be a problem Oct 05 15:41:22 no Oct 05 15:41:34 yeah i dunno Oct 05 15:43:07 Hey all, does anyone here use RxJava for their GUI models? Oct 05 15:43:17 Hey all. It seems Android does not have the Path class, or at least my CyanogenMod device doesn't. Is there an equivalent to Path.relativize(Path) in the File class? Oct 05 15:47:52 I/chromium(26742): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported Oct 05 15:47:56 noticed that Oct 05 16:11:37 hi! I want to make an app that streams music from Icecast radio server. I want the player to run in background (in Service) and it has to be run in a separate thread (network stuff not allowed in UI thread). I tried to use IntentService, but it gets killed (unless startForeground(...)) Oct 05 16:11:55 How do I run player in Service in separate thread? Oct 05 16:12:37 you dont…it runs on the UI thread Oct 05 16:12:46 you do tasks in a thread within the service Oct 05 16:12:54 new Thread().start(); Oct 05 16:13:20 or packaged in AsyncTask (shudders) Oct 05 16:13:35 that was for osmij_ Oct 05 16:14:40 : so the Service runs in UI thread. So can I create player in separate thread from Service? Oct 05 16:15:00 thats pretty much what I just said :) Oct 05 16:15:21 you should read up on services Oct 05 16:15:26 : and I controll player + exchange track titles through Interface?.. Oct 05 16:15:27 tells you all this Oct 05 16:15:40 binding to a service etc Oct 05 16:15:45 I did, http://developer.android.com/reference/android/app/Service.html#RemoteMessengerServiceSample Oct 05 16:16:17 well I was thinking the beginner guides and info http://developer.android.com/guide/components/services.html Oct 05 16:16:29 it already works (binds, exchanges track title and album art) in IntentService. The problem is that system kills Service randomly... Oct 05 16:16:49 read that link I posted Oct 05 16:16:54 k Oct 05 16:17:00 you need a service Oct 05 16:17:34 also intent service already uses a background thread in it's worker method Oct 05 16:17:51 but thats more for fire forget tasks or short ones Oct 05 16:17:56 but have a read Oct 05 16:17:58 :) Oct 05 16:21:29 I think now I understand words that I was told: "the sooner you start app, the sooner you will re-write it from scratch" :-) Oct 05 16:21:39 : thanks! Oct 05 16:22:29 moin - how to play audio with javascript on android reliable? Oct 05 16:23:40 "moin"? Oct 05 16:23:46 Is that like "man" Oct 05 16:23:47 or what Oct 05 16:24:08 Agamemnus, "morning", i think. Oct 05 16:24:44 http://kephra.de/mp3/ <- this works on desktop (firefox), but CM7 it only plays first song, and on nexus 7 it does not even start playing Oct 05 16:25:10 kephra: use Cordova-Crosswalk, then add a file in platforms/android/assets named "xwalk-command-line" with these contents: xwalk --disable-gesture-requirement-for-media-playback Oct 05 16:25:13 Agamemnus, https://en.wikipedia.org/wiki/Moin well, apparently more than that. Oct 05 16:25:30 Or, use the web audio API. Oct 05 16:25:58 Agamemnus, i'm trying to play audio from html5 from a webserver Oct 05 16:26:22 but it looks as if audio.play() does nothing, if it is not triggered by a user-click Oct 05 16:26:26 Unless you're in control of Chromium switches, you're SOL. Oct 05 16:26:39 Use web audio, that works most of the time Oct 05 16:26:49 so its not possible to play an web audio playlist with android? Oct 05 16:26:56 for long pieces of audio it won't work well though Oct 05 16:27:02 like i said, use web audio Oct 05 16:27:06 Agamemnus, I'm talking about web audio - take a look at the URL above Oct 05 16:27:08 No Oct 05 16:27:15 You're talking about HTML5 audio Oct 05 16:27:25 *oh* whats the difference? Oct 05 16:27:31 https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Oct 05 16:27:54 You can use a library like howler.js Oct 05 16:27:58 if you want Oct 05 16:28:09 is this portable? IE, Firefox? Oct 05 16:28:17 FF starting from 25 Oct 05 16:28:21 IE, no Oct 05 16:28:38 so both NO ;-( as Debian still ships 24 Oct 05 16:28:43 You can detect if the user is on mobile Oct 05 16:28:57 use chromium to test then Oct 05 16:30:21 there is a #Cordova you know Oct 05 16:30:45 he's not using cordova Oct 05 16:30:52 no I was looking for you Oct 05 16:30:59 ? Oct 05 16:30:59 StingRay_, I'm not writing an app - I just want that stupid Android browser to play audio and to switch songs with js Oct 05 16:31:00 didn't know there was a channel Oct 05 16:31:04 oh Oct 05 16:31:11 yeah no one comes there Oct 05 16:31:18 all the action is in #phonegap Oct 05 16:32:14 kephra.... so you basically need to update the browsers you use to test with Oct 05 16:33:07 http://caniuse.com/#feat=audio-api check the notes Oct 05 16:33:29 default android browser won't work either Oct 05 16:34:46 Agamemnus, it wont help, if I update my browser - Debian still ships 24, Android 2.3 (CM7) is still common, and I think the Android that shippped with Nexus 7 is also still common Oct 05 16:34:47 hello guys, I need a suggestion. So how should i use a layout for different cases? like for example I have a listview and when I click on any item I want it to go to an activity where I have EditTexts which I'll fill with the data from the database .... but I also want to use the same layout when I'm adding a new entry to my database... how can I make the activity know from where the intent it's comming? Oct 05 16:35:17 I also have to modify a button to do different things on that same layout Oct 05 16:35:38 android 2.3? Oct 05 16:35:48 about 96% of browsers are 4+ Oct 05 16:36:04 so anyway, you'll have to make an app, or forget about it Oct 05 16:36:05 luci1093 put something in the intent that tells you Oct 05 16:36:13 won't work on stock browser Oct 05 16:36:18 even 4.4.3 Oct 05 16:36:34 er devices Oct 05 16:36:37 not browsers Oct 05 16:37:02 Agamemnus kephra also think this conv. is questionably nothing to do with app dev as stated by kephra :) Oct 05 16:37:29 luci1093 you can putExtra() something in the intent, and getExtra() to take it out and do some condition Oct 05 16:37:37 read on intents/bundles Oct 05 16:42:06 Hey - for RxJava, is there a good way to associate all of your subscriptions with a view? Oct 05 16:42:24 So I don't need to call .unsubscribe in a flurry of boilerpate? Oct 05 16:43:03 StringRay_: I actually tought of that, tho I said I should still ask maybe there is a better way. And should I make it verify the extra in that activity's onCreate? Oct 05 16:53:10 luci1093 yes Oct 05 16:53:51 yes, I've alsmot done it. thank you Oct 05 16:54:49 Anyone else have issues with breakpoints being execute through without stopping when debugging on the emulator? Oct 05 17:09:14 RedWraith: I've been using a list to keep track of my subscriptions. Oct 05 17:14:08 Hi 397! Oct 05 17:14:56 Napalm, it seems the correct use of SurfaceView has removed my garbage collection problem. I had a huge amount of android.os.Message being allocated, is that something view.invalidate() does? Oct 05 17:16:57 troned: you should never call invalidate on a SurfaceView Oct 05 17:17:25 i dont but i did. just wondering if that could have been the problem with all the Messages. Oct 05 17:17:47 I still have some small hacks in my game but now it happens very seldom, most of the time it is supersmooth. Oct 05 17:18:15 So it could be synchronization, I still could optimize the GC a bit too. Oct 05 17:21:27 That's a great answer on how to send email ( http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-built-in-a ) but the user must enter email and passwd Oct 05 17:21:59 Is there a way to pick an existing (Gmail) account from the device ? Oct 05 17:22:27 no Oct 05 17:22:35 javamail sucks Oct 05 17:22:48 :( Oct 05 17:36:30 pieces029, I was thinking of doing that but it seems like there must be a better way. Oct 05 17:36:46 hmm Oct 05 17:37:46 Is it possible to declare the intent filter for an activity in the java class instead of in the manifest? Oct 05 17:52:33 evening everyone Oct 05 17:54:36 anyone around here that has a minute to help out a newbie? :) Oct 05 17:54:48 Yep! Oct 05 17:54:59 * X3n0X cheers Oct 05 17:55:14 i'm stuck on an Async class Oct 05 17:55:38 what's your issue? Oct 05 17:55:39 i've created it as it's own seperate class, not a nested one (hope i'm saying this right) Oct 05 17:55:50 and i want to call / use openFileOutPut Oct 05 17:56:14 but if i have it right this only works from the activity, or well, the class that controls / initiates the activity Oct 05 17:56:36 not exactly like that.. why do you think so? Oct 05 17:56:51 although to be honest I haven't created an async task in a separate class so far Oct 05 17:57:00 i've already moved it to the opPostExecute, from what i understand openFileOutput will not run in the doinbackground area Oct 05 17:57:17 you might be right, given that many of the method except doInBacground() run on UI thread Oct 05 17:57:25 nope, it won't Oct 05 17:57:34 xD Oct 05 17:57:36 since I haven't tried it, I can only assume this: Oct 05 17:58:06 Your onPostExecute will run on Main/UI Thread no matter which class it is in. Oct 05 17:58:30 How you manage to make the changes only to the activity which is on top is a different matter Oct 05 17:58:43 did you face any issues with your approach? any errors? Oct 05 17:59:10 been trial and error, first time i'm coding java/android Oct 05 17:59:17 but no errors so far Oct 05 17:59:20 :) Oct 05 17:59:22 great Oct 05 17:59:26 only that it cannot write to a file from the class Oct 05 17:59:40 trying to understand why it wont :D Oct 05 17:59:56 I am also assuming that when you create the object of the separate asynctask class from your activity, pass asynctask a reference to this activity itself Oct 05 17:59:59 or its context Oct 05 18:00:07 ^ Oct 05 18:00:15 and then in async class use this reference to do file operations Oct 05 18:00:29 i think that's what needed to eb done so i can reference to that in the openfileoutput Oct 05 18:00:40 I guess some methods such as opening a file stored in Assets or on the SD card, will need a context Oct 05 18:01:34 makes sense Oct 05 18:01:44 hello Oct 05 18:01:48 onto googling context ^ Oct 05 18:01:52 ^^ Oct 05 18:02:00 thanks for the brainstorm :) Oct 05 18:06:45 Napalm, what's your opinion on game loops? http://www.koonsolo.com/news/dewitters-gameloop/. Oct 05 18:07:15 I use the last option but I am thinking of just using "FPS dependent on Constant Game Speed. " Oct 05 18:07:34 60 FPS shouldnt be a problem for a simple game right? even on a small phone... Oct 05 18:08:18 on OpenGL it's not, but if you plan to draw on a canvas (even with surfaceview) lot of operations Oct 05 18:08:20 it might be Oct 05 18:08:46 otherwise, the gameloop is an important concept (and not only for game) Oct 05 18:09:02 (it can be applied to audio rendering too (DSP)) Oct 05 18:09:43 under the hood, it's more about consumer VS producer Oct 05 18:10:11 the producer must produce faster than the consumer will consume Oct 05 18:10:24 sheikhaman, Oct 05 18:10:33 got it to work, had to pass the context along with it ^^ Oct 05 18:11:01 i knew i only missed like 1 line of code but i just couldnt figure it out, ty for pointing me in the right direct ion :) Oct 05 18:11:48 adq: ty Oct 05 18:12:00 adq: producer being what here? Oct 05 18:12:26 troned, producer is the thread which render the graphics Oct 05 18:12:37 consumer is the one which displays them Oct 05 18:15:13 render != display? Oct 05 18:15:19 Hi, is it a good practice extend of PreferenceActivity to generate easily forms ? Oct 05 18:17:16 troned, maybe i confused you, semantics vary, producer is the thread which compute what will be displayed Oct 05 18:17:23 so for you i guess render == display Oct 05 18:17:59 computation should be separated from the display, so the display just has to draw Oct 05 18:18:16 it's generally good to separate ui from computation Oct 05 18:18:49 yes i have done that Oct 05 18:19:16 i have updateGame() and render(canvas) where canvas is a dirty rect on a surfaceview Oct 05 18:19:37 what is your problem/issue? Oct 05 18:20:24 dont have one :) Oct 05 18:20:27 ah :) Oct 05 18:20:39 just thinking if I should use a different game loop Oct 05 18:21:04 Maybe "FPS dependent on Constant Game Speed. " instead of "Constant Game Speed independent of Variable FPS" Oct 05 18:21:20 because my game speed is 60 updates per second anyway Oct 05 18:21:37 it's good Oct 05 18:21:42 drawing the view more than that is pointless anyway (user wont see a difference over 60Hz) Oct 05 18:23:09 there are many tutorials on game loop if you want to dig more, i recall gamedev and gamasutra website Oct 05 18:28:05 troned: read http://gafferongames.com/game-physics/integration-basics/ and then http://gafferongames.com/game-physics/fix-your-timestep/ Oct 05 18:46:43 Hey all, for RxJava, how do you guys handle your unsubscribes for views? I'd like to automatically kill them on the views but I'm not sure if there's any good way to do so. Oct 05 18:46:58 Hi, is it a good practice extend of PreferenceActivity to generate easily forms ? Oct 05 18:47:46 it's more for saving stuff with sharedpreferences Oct 05 18:47:58 but why not if it is suitable for you Oct 05 18:49:05 i would probably not do that eneasvva, but that's just me Oct 05 18:49:41 why JacobTabak ? Oct 05 18:49:59 because it's not flexible Oct 05 18:50:56 true that Oct 05 18:50:56 is it not ? Oct 05 18:51:20 Will gradle-wrapper.jar ever need to be updated? I'm confused whether gradlew + gradle/wrapper folder should be checked in to git Oct 05 18:51:56 achuinard yes it should be in git Oct 05 18:52:07 it allows for portability Oct 05 18:52:09 and yes it will be updated Oct 05 18:52:39 the idea is that multiple developers working on a project are always using the same build tools Oct 05 18:54:58 have you read this achuinard http://developer.android.com/sdk/installing/studio-build.html#gradleWrapper Oct 05 18:55:17 JacobTabak: Oct 05 18:55:22 JacobTabak: thank you Oct 05 18:59:29 i'll give someone a cookie if they tell me what this is about: http://pastebin.com/rjeUxiFj Oct 05 19:03:46 hello coders Oct 05 19:04:12 anyone here that could help with Android Studio? Oct 05 19:11:55 just ask a question Oct 05 19:19:05 should i be using io.reactivex:rxandroid or com.netflix.rxjava:rxjava-android ? Oct 05 19:19:22 im using netflix Oct 05 19:19:58 yeah, just wonderinf if they leaving that coordinate there for legacy reasons but moving to the new names ? Oct 05 19:20:07 not sure Oct 05 19:23:48 lemme know if you find anything Oct 05 19:24:52 the rxjava wiki https://github.com/ReactiveX/RxJava/wiki/Getting-Started mentions io.reactivex so i guess i should use that now Oct 05 19:25:09 ohh Oct 05 19:25:11 exciting Oct 05 19:25:29 there's a corresponding one for rxjava-android? Oct 05 19:25:39 i remember i tried the io.reactivex one but there was no android module Oct 05 19:25:43 artifact* Oct 05 19:26:23 rxandroid Oct 05 19:26:23 Which file system does Android use? ext4? This doesn't seem to be documented, as far as I can see. Oct 05 19:26:26 Does it support journaling? Oct 05 19:26:31 ext4, yes Oct 05 19:27:11 TacticalJoke you should journal yourself; atomic switcheroo at least Oct 05 19:28:14 What is "atomic switcheroo"? Oct 05 19:28:28 I'm asking because I'm curious of how 'safe' the file system is on Android, BTW. :) Oct 05 19:28:38 its safe Oct 05 19:28:39 With regard to power off and stuff. Oct 05 19:29:03 use sqlite if you want good robustness Oct 05 19:29:36 it's as robust as anything else. I imagine if you did a massive number of writes and changes and then nuked the power you'd regret it Oct 05 19:29:45 atomic switcheroo is writing changes to a new file and then moving that to the old file; the mv operation should be atomic Oct 05 19:29:55 but if you do a massive number of writes to the internal flash your user is going to regret it, too Oct 05 19:30:14 hey dragorn Oct 05 19:30:32 g00s: Ooh. That's a good idea. Then if something goes wrong the original file never got cleared. Oct 05 19:30:55 i wonder when brtfs will be ready Oct 05 19:31:23 What is an atomic move, though, in the context of Android programming? Oct 05 19:32:38 TacticalJoke see ./frameworks/base/core/java/com/android/internal/util/JournaledFile.java Oct 05 19:32:53 or just copy it into your project Oct 05 19:35:52 g00s: I think I'd rather wait out for ZFS to have low-mem mode Oct 05 19:36:05 k so Oct 05 19:36:19 (ZoL, to be specific. I ran solaris with less memory than my current replacement phone...) Oct 05 19:36:29 I have library project importen as a module into my Android Studio project. Oct 05 19:36:29 It's https://github.com/thiagolocatelli/android-stripe-connect Oct 05 19:36:29 Everything is working nice and then I also want to use Stripe library: https://github.com/stripe/stripe-android Oct 05 19:36:29 I add it to the build.gradle as suggested in their github Readme file: Oct 05 19:36:29 compile 'com.stripe:stripe-android:+' Oct 05 19:36:31 Now when I try to build project I have following error: Oct 05 19:36:33 http://pastebin.com/kV83SKeA Oct 05 19:36:35 I understand that there is a problem about stripe-java .jar that is again into this second library. Oct 05 19:36:37 But how to edit gradle file to make it working? Oct 05 19:37:43 who helps me will get invitation to world changing Slack group project :) Oct 05 19:38:47 and Im not kidding Oct 05 19:41:33 p_l do you really think we'll ever see zfs ? Oct 05 19:42:12 i was hoping apple would pick it up Oct 05 19:42:21 g00s: I use ZFS on Linux in production Oct 05 19:42:51 there are few things missing for full featureset and there are still things to be ironed out Oct 05 19:43:08 but for server use and bigger workstation uses it's already ok Oct 05 19:43:36 it's also very unlikely it'll ever be a first class citizen on Linux Oct 05 19:43:43 Apple prefers to keep to ancient hacky filesystem, their choice Oct 05 19:43:49 PabloAngello the errror is pretty straightforward Oct 05 19:43:57 Multiple dex files define Lcom/stripe/Stripe Oct 05 19:44:00 PabloAngello all you should have to do is edit your build.gradle file Oct 05 19:44:15 Mavrik: it's about on par in that with several other filesystems, including one that was default for android for years ;) Oct 05 19:44:25 um Oct 05 19:44:41 which other filesystems had a totally incompatible license? Oct 05 19:44:57 and which other filesystems clobbered the way block devices hiearchy is structured on Linux? Oct 05 19:45:00 Mavrik: the license is not "totally incompatible", it just means it has to be out of tree Oct 05 19:45:17 yes. Oct 05 19:45:20 JacobTabak, lasserix but how? I am new in Android Studio Oct 05 19:45:27 preventing it from being merged into the main tree Oct 05 19:45:29 also, the "clobbered hierarchy" is an example of not knowing how ZFS works at all Oct 05 19:45:41 hence my statement of never being a first class citizen. Oct 05 19:45:42 (the closest relation to ZFS would exofs) Oct 05 19:46:01 um. ok. Oct 05 19:46:10 or rather, the closest relation to *ZPL* part of ZFS would be exofs Oct 05 19:46:10 PabloAngello we would probably need to see your dependencies to help you Oct 05 19:46:22 there's some small driver that would be relation to ZVOL module Oct 05 19:46:26 dependencies { Oct 05 19:46:26 compile fileTree(dir: 'libs', include: ['*.jar']) Oct 05 19:46:26 // compile project('libraries:android-stripe-connect') Oct 05 19:46:26 compile project(':androidstripeconnect') Oct 05 19:46:26 compile 'com.stripe:stripe-android:+' Oct 05 19:46:27 } Oct 05 19:46:30 they look like that Oct 05 19:47:00 there's no relation to DMU at all, SPA technically fulfills similar role as MD and RAID and LVM drivers (let's see, that's three different drivers already?) Oct 05 19:47:07 p_l, yes. Oct 05 19:47:16 PabloAngello use pastebin next time Oct 05 19:47:21 p_l, and that's the reason why it's not being merged into mainline tree... ever Oct 05 19:47:22 JacobTabak, ok Oct 05 19:47:34 or getting any proper support from kernel maintainers Oct 05 19:47:36 Mavrik: Actually, neither ZoL nor kernel people want to merge, ever Oct 05 19:47:43 you probably have duplicated dependencies in the library project and the maven dependency PabloAngello Oct 05 19:47:44 it would be actually detrimental Oct 05 19:47:53 usually you only need one or the other Oct 05 19:47:54 PabloAngello: post your build.gradle Oct 05 19:48:01 for stripe Oct 05 19:48:06 not familiar with the lib tho Oct 05 19:48:07 ok one moment Oct 05 19:48:30 p_l, so how is that on par with several other filesystems including default android? :P Oct 05 19:48:33 Mavrik: YAFFS was never merged, afaik, either. Crap like RFS even less, and that was shipped on many devices Oct 05 19:48:34 hes having a dependency collision since the two libraries use a same library Oct 05 19:48:53 well, ok Oct 05 19:48:59 we'll see ZFS on Oracle phone then :) Oct 05 19:49:04 Mavrik: several big production-important filesystems are also out-of-tree for any practical use Oct 05 19:49:14 Mavrik: Oracle has no licensing for ZoL :) Oct 05 19:49:21 lasserix, JacobTabak http://pastebin.com/rkNSQHwA Oct 05 19:49:23 as in, they don't get a say Oct 05 19:49:39 here are build.gradle for the main app and library project Oct 05 19:49:51 I now they conflicts with same library but dont know what to do with this Oct 05 19:50:07 use either the jar or the maven dep for the stripe lib Oct 05 19:50:11 p_l, um Oct 05 19:50:13 hey, how can I debug HTTPClient.execute(httpPost) running into timeout? the service requested is not even getting the post Oct 05 19:50:14 ok :) Oct 05 19:50:19 Mavrik: part of what made CDDL incompatible with GPL is patent license obligations that prevent Oracle from attacking OpenZFS :) Oct 05 19:50:24 try to change the compile jar in the lib to compile 'com.stripe:stripe-android:+' Oct 05 19:50:25 if owning the main trademark for the project is "no say"... I guess you're right :P Oct 05 19:50:35 Mavrik: they don't have trademark on OpenZFS Oct 05 19:50:59 I don't agree with that statement. Oct 05 19:51:01 Nor on "ZFSonLinux" Oct 05 19:51:04 JacobTabak, there is jar stribe lib in project library directory Oct 05 19:51:13 dont care Oct 05 19:51:17 dont use it Oct 05 19:51:21 Mavrik: lawyered back'n'forth by companies with bigger stake, afaik Oct 05 19:51:31 but JacobTabak when I delete it then I cant compile project Oct 05 19:51:39 don't delete it... replace it with the dep Oct 05 19:51:41 from maven Oct 05 19:51:53 I'm trying to develop an app which takes some attributes like email and name etc from the user , on submission ( on button click ) I want the data to be stored online , I don't want to store it in a databaase , I just want to store in a file like a XML file or a create a JSON object and store it in a file online , I have no clue about the storing part , how would I do it in android , the uploading of data and also the web scrapin Oct 05 19:51:56 Mavrik: also, trademark laws only give you control over trademark, i.e. name. Not on anything technical :) Oct 05 19:52:06 PabloAngello: this might work: http://pastebin.com/6ccD9ZmZ Oct 05 19:52:09 also which cloud to use Oct 05 19:52:09 JacobTabak, how? Oct 05 19:52:16 neetz: Do you have an idea where to store it (instead of how)? Oct 05 19:52:16 look at what i said before Oct 05 19:52:31 lasserix, ty I will try Oct 05 19:52:39 p_l, that doesn't really change the fact that anyone trying to implement ZFS in anything remotely deloverable would be hard pressed to maintain that Oct 05 19:52:41 JacobTabak, ok Oct 05 19:52:48 flan3002: Well , Not really ! I'm guessing a file online like google docs :/ Oct 05 19:52:53 PabloAngello: you can look @ http://stackoverflow.com/questions/20989317/multiple-dex-files-define-landroid-support-v4-accessibilityservice-accessibility Oct 05 19:52:54 between Oracle, CDDL and Linux mainline kernel devs, ZFS is a bastard child Oct 05 19:53:05 basically you need to tell gradle not to include the redundant module Oct 05 19:53:26 shipping anything with that would be rather problematic for any company (which is significantly different than when you have an opensoruce project for some enthusiasts) Oct 05 19:53:34 I'm guessing it's what i did it that pastebin, but it could be somethign else,if you follow the gradle -q dependencies you should be able to figure out the name to include as excldued Oct 05 19:53:45 neetz: What are you requirements? Who needs what kind of access to the data and how much data are you planning to store? Oct 05 19:54:27 thank you lasserix I will test it in a moment Oct 05 19:55:32 Mavrik: umm... not really. ZFS maintenance is minimal compared to crap already needed to deal with embedded Oct 05 19:55:58 lasserix, you made a mistake , lacks of brackets ;p Oct 05 19:56:02 (and that's assuming embedded delivery, not server/workstation, where non-boot support on most distros is "install package") Oct 05 19:56:09 oh did it work tho? Oct 05 19:56:25 flan3002: well , every user who has an app will be regersiting , so essentially 4 attributes like name , email etc etc , rougly i would say 1000 records i .e 1000 users and , access is done by the user when he needs a particular data , the onclick button would scrape the required data from the file online Oct 05 19:57:12 lasserix, no... Oct 05 19:57:29 neetz: All data is available to all users? Including email? Sounds... Oct 05 19:57:49 why do you need the library project PabloAngello Oct 05 19:57:58 PabloAngello: try this: http://pastebin.com/XXYzqVBs Oct 05 19:58:07 JacobTabak, I cant import it different way Oct 05 19:58:12 now .jar avaliable Oct 05 19:58:25 I need those two I posted before Oct 05 19:58:26 PabloAngello: can you navigate into your project file in cmd line and run the gradle -q dependencies command? Oct 05 19:58:34 flan3002: well yeah Oct 05 19:58:35 that'll tell you the dependencies that are conflicting Oct 05 19:58:46 then you can add the redudent dependency to be excluded Oct 05 19:58:47 lasserix, in a moment Oct 05 19:58:58 Hello... I was wondering if someone can give me some guidence.. I want to write a native android app to work like my existing web app which is written using angular.js. I was thinking of hosting the original web app in a invisible webview.. will that work? Oct 05 19:58:59 Im restarting andstudio Oct 05 19:59:39 PabloAngello stripe-android dep uses stripe-java-1.15.1.jar, and android-stripe-connect uses stripe-java-1.10.0.jar Oct 05 19:59:47 u have 2 jars of different versions Oct 05 19:59:48 Hello... I was wondering if someone can give me some guidence.. I want to write a native android app to work like my existing web app which is written using angular.js. I was thinking of hosting the original web app in a invisible webview.. will that work? My native app can respond to state changes, and call the javascript code... so I want all the app logic to still be done in javascript, but the user interface will be all native Oct 05 19:59:49 Yes I know Oct 05 19:59:50 after_r: Please. Don't do that. Just wrapping the website in a Webview will work, but the user experience will not be much better than just using the actual website. Oct 05 19:59:54 lasserix: i mean on query , let's say i have "o+" blood , and when the user clicks on o+ blood , people who have registered and whose blood is o+ will be shown to the user Oct 05 20:00:03 JacobTabak, I already tried to make them same version Oct 05 20:00:06 but it didnt help Oct 05 20:00:09 flan3002: I want the UI to be native Oct 05 20:00:17 I don't want to UI to be in a webview Oct 05 20:00:29 so can I 'overlay' the webview with native controls? Oct 05 20:00:34 and call the javascript? Oct 05 20:00:40 from the native code? Oct 05 20:00:44 PabloAngello put 'provided' rather than 'compile' for the library dependency on the jar Oct 05 20:00:52 pablo you could clone the stripe-android modify the original code, then reexport it as a jar Oct 05 20:01:24 lasserix, might be a way Oct 05 20:01:25 like I want to have a "small" native layer which would just provide UI, but the main app logic will be in the angular.js app runnin in the webview.. will that work? Oct 05 20:01:33 it would be easiest way Oct 05 20:01:46 neetz what? Oct 05 20:02:05 ? Oct 05 20:02:13 lasserix: I'm trying to develop an app which takes some attributes like email and name etc from the user , on submission ( on button click ) I want the data to be stored online , I don't want to store it in a databaase , I just want to store in a file like a XML file or a create a JSON object and store it in a file online , I have no clue about the storing part , how would I do it in android , the uploading of data and also the w Oct 05 20:02:55 neetz that makes no sense, you have to store it somewhere-- if not on disk, then in memory. JSON is just a data structure that is in memory, you can write it to disk or push it to a server Oct 05 20:03:28 XML is a encoding... like json is an encoding Oct 05 20:03:59 at some point if you want to save it you're going to have to write it to disk, unless you know for a fact your computer network is never going down Oct 05 20:04:02 lasserix: I know JSON is a data structure ! I used in a wrong context , but my question is how would i store online in a file Oct 05 20:04:24 " would i store online in a file" Oct 05 20:04:35 i dont know what you mean Oct 05 20:04:45 youmean push it to a server and let if float around your server's memory? Oct 05 20:04:47 lasserix: I mean like storing in a file which is on the web Oct 05 20:04:57 do you have a server? Oct 05 20:04:58 lasserix: I don't want a database to be used Oct 05 20:05:07 lasserix: No , I guess I don't want Oct 05 20:05:10 lasserix: I want it Oct 05 20:05:15 lasserix: to use in a Oct 05 20:05:24 lasserix: docs like google docs Oct 05 20:05:53 lasserix: like creating a xml file online somewhere and storing there Oct 05 20:06:20 Pablo so what i would do is clone the stripe-android into eclipse, remove the stripe library then add in the stripe-connec tto that project and export it as a aar or whatever or just make it a library project and include it into your man project Oct 05 20:06:35 unless you can figure out what i was saying before, just by exluding the jar that is conflicting Oct 05 20:07:01 I excluded but it still not working Oct 05 20:07:11 why I should use eclipse when I use Android Studio? Oct 05 20:07:20 whats the point? Oct 05 20:07:45 because sometimes if they don't make it able to import into AS you have to import into Eclipse, then export it as a gradle project so you can import it into AS Oct 05 20:07:48 also, how would I go about have an "invisible" WebView control which can host my angular.js app? Oct 05 20:08:04 geeeeeeeeez Oct 05 20:08:16 PabloAngello: anyways, did you run the gradle -q dependencies command yet? Oct 05 20:08:39 lasserix, I tried from AS terminal but it is not wrooking Oct 05 20:08:42 lasserix: could you help me ? did you get my question ? Oct 05 20:08:49 neetz idk if you can push to google drive, but you could send yourself an email or something Oct 05 20:08:50 probably I am doing it wrong Oct 05 20:08:55 neetz not even you get your question Oct 05 20:09:01 can someone explain to me how in this: http://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc.html#foreground-dispatch there is nothing added to the manifest. I thought all intent filters are added into the manifest, but here it seems like it is defined in the java file. Oct 05 20:09:10 PabloAngello: you on windows? Oct 05 20:09:18 yep Oct 05 20:09:42 hmm i can't remember if you have to install gradle Oct 05 20:09:44 or it comes with it Oct 05 20:09:53 but you can navigate in command line to your project root Oct 05 20:09:53 I bet I have to install Oct 05 20:10:01 then type gradle -q depdencies Oct 05 20:10:01 lasserix, I did Oct 05 20:10:07 doesnt work Oct 05 20:10:12 lasserix: Ah nah , that doesn't serve my purpose I want to push the data into a drive like a file on the web instead of database Oct 05 20:10:23 then you might either a) have to add gradle to your path or b) install gradle and do a) Oct 05 20:10:27 StingRay_: Hey ! what part of the question didn't you understand ? Oct 05 20:10:55 bilb_ono thats page 2 of 1, but no, you can register receivers with a context … anywhere ! Oct 05 20:11:00 lasserix, Im just downloading Oct 05 20:11:09 will install in a minute or two Oct 05 20:11:19 PabloAngello: im going to go smoke for a bit, if you haven't figured out ill try and put both in a project and get it to work Oct 05 20:11:21 neetz I understand that you dont really understand much of it Oct 05 20:11:45 lasserix, have you seen I priv msged you? Oct 05 20:11:51 StingRay_: Lol Oct 05 20:12:46 StingRay_: I mean look , I want the user data to be stored on the web , i want it to be saved on a file instead of a database online Oct 05 20:13:14 then do that… you are stating things Oct 05 20:13:31 do you have any specific questions that are not easily google'd ? Oct 05 20:14:31 StingRay_, so that java activity will only execute if it matches that intent filter (nfc tag scanned)? This is confusing to me because in part 1: http://developer.android.com/guide/topics/connectivity/nfc/nfc.html all of the intent-filters are defined in the manifest Oct 05 20:14:35 StingRay_: which client do I use ? could I use google docs ? how do I go about it ? i just googled it but can't find anything like that Oct 05 20:15:05 google drive neetz search for that Oct 05 20:15:07 you could look at the google drive api neetz Oct 05 20:15:41 or use another third-party server (maybe yours) Oct 05 20:15:50 bilb_ono yes, i assume it continues … so page 1 is relevant to page 2 Oct 05 20:15:52 adq: StingRay_ thanks man :) Oct 05 20:16:13 note: it will not be implemented in 5 minutes Oct 05 20:16:27 bilb_ono my point was you can register/trigger reactions to intents either in manifest or runtime with a context Oct 05 20:18:00 StingRay_, in that example on page 2, they define the intent filter without reference to a context it seems. Unless the context is "this" in the PendingIntent Oct 05 20:20:11 well no the adapter is bound to a context Oct 05 20:20:19 and this is called http://developer.android.com/reference/android/nfc/NfcAdapter.html#enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], java.lang.String[][]) Oct 05 20:20:55 so that method along with the Activity is what is used to loop through and register Oct 05 20:21:14 you know the SRC is available for all this too…where you can go have a look what actually happens ? Oct 05 20:21:31 really? on github somewhere? Oct 05 20:22:07 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.4_r1/android/nfc/NfcAdapter.java#NfcAdapter Oct 05 20:23:37 * StingRay_ is almost impressed with his new ASUS DSL-AC68U Oct 05 20:25:12 hey guys, im having performance issues with displaying polylines on android... would it be because im displaying about 300 one by one in a loop? Oct 05 20:26:17 ... that sounds suspicious, yes Oct 05 20:26:59 So it's better to use android.util.AtomicFile than just use a FileOutputStream and perform a write and a flush, right? In other words, I'm guessing that the file system doesn't offer any guarantees like what AtomicFile offers, even if I'm doing a single write/flush. Oct 05 20:28:07 does anyone know where selinux specfiles are located? Oct 05 20:31:02 m4t is that relevant to an app developer ? Oct 05 20:31:12 to an android developer Oct 05 20:31:22 ah, wrong channel then Oct 05 20:31:25 :) Oct 05 20:31:26 oh? Oct 05 20:31:30 read topic Oct 05 20:31:48 yeah thankyou for being the topic police Oct 05 20:31:50 m4t: though look in /system something Oct 05 20:32:11 yeah i tried a bunch of searches Oct 05 20:32:28 it's gotta be defined somewhere :| Oct 05 20:35:38 StingRay_: I guess I don't want to use google docs , well that's because using google docs requires the user to be signed in to google and stuff like that , I just want a file online where i could write , any other sources like google docs where I don't need any authentication Oct 05 20:36:03 m4t soz, was only wanting to point out if you ask in the correct place you will probably get a quick and definitive answer Oct 05 20:36:34 neetz no Oct 05 20:36:46 StingRay_: :/ ? Oct 05 20:36:58 well your own if you set one up Oct 05 20:37:28 hehe am in the right lpace to ask about why the maps lags when i display a lot of polylines? Oct 05 20:37:35 never looked to see if these filesharing sites have android api's Oct 05 20:37:41 StingRay_: Ah come on , there should be some server like that ? like pastebin or something like that ? I'm asking coz I don't know much about the services Oct 05 20:37:56 neetz best things to do is search Oct 05 20:38:06 StingRay_: which neetz did :( Oct 05 20:38:11 lol Oct 05 20:38:17 sorry but really dont have time and cant be arsed to search for you :) Oct 05 20:38:34 based off your search then, I would say...nope Oct 05 20:38:36 :) Oct 05 20:38:55 StingRay_: you could have well searched instead of instead of typing :P lol , I'm a noob Oct 05 20:41:15 anyone have ideas on polyline performance issues? Oct 05 20:41:29 Has anyone here ever used bluetooth on android-x86 2.3 successfully? Oct 05 20:43:19 Peetz0r: here Oct 05 20:43:25 did it actually work? Oct 05 20:43:41 Peetz0r: Yeah Oct 05 20:44:06 Peetz0r: are you doubting my skills :/ duh Oct 05 20:44:15 I just tried it on two different laptops, on one bluetooth did turn on but did not discover my BT device Oct 05 20:44:30 on the other, it did discover the device, but refused to pair with it Oct 05 20:45:05 (and I am trying to test my Bluetooth-using app on older android versions for which I don't have actual hardware) Oct 05 20:45:16 no point in testing in the emulator Oct 05 20:45:25 Peetz0r: yeah no point Oct 05 20:45:31 Peetz0r: you need the actual hardwate Oct 05 20:45:39 and since I don't have a BT usb dongle, also no point in testing in virtualbox (because usb passtrough is jyst as useless) Oct 05 20:46:05 Peetz0r: so what's the question , stop stating Oct 05 20:46:23 the question: how do I test my app? Oct 05 20:46:40 Peetz0r: buy a hardware man Oct 05 20:47:05 My budget is basically €0,00 Oct 05 20:47:13 StingRay_, Im still reading about the nfc adapter and how it uses the context. because of this, does it mean that I should not have anything special for my activity in my manifest? no intent-filter tag there? Oct 05 20:47:25 Peetz0r: woah ! you're a billionaire :D Oct 05 20:47:30 (but I just realised that one of those older laptops may have bluetooth internally on usb, so virtualbox on that maight work) Oct 05 20:47:34 neetz: lol nope Oct 05 20:48:07 bilb_ono from reading all of 3 seconds of it and never having done NFC stuff, I would say … yes… thats where it registers it :) Oct 05 20:48:11 Peetz0r: nah it wont work ,you can't emulate like that Oct 05 20:49:38 bilb_ono in short yes, but dont trust what I say ;) Oct 05 20:51:25 neetz: sure? other people have done that with external bluetooth usb dongles Oct 05 20:51:32 lemme try Oct 05 20:51:42 StingRay_, I think I am getting confused by what you mean with "registers" the activity. I cannot find anything about this in the android doc manifest file. From what you are saying, it seems that "registering" the activity can be done in the manifest or in the class file itself. Is this correct? and where can I read more about registering Oct 05 20:52:05 Peetz0r: Try and get back Oct 05 20:52:26 bilb_ono you can register a broadcast receiver in the manifest, or tied to a context Oct 05 20:55:55 wow, I just found out why it did not want to connect at first Oct 05 20:56:10 you should not click the device in the list, you should long press Oct 05 20:56:35 (and now I know how far android has come in usability between 2.3 and 4.x) Oct 05 21:00:56 when i start a new activity i can see that you can go back to the main activity tapping the actionbar icon, but whenever i do this the main activity will be recreated. any way to emulate the back button behaviour Oct 05 21:01:55 does anyone know anything about IPolylineDelegate Oct 05 21:05:26 NVM Oct 05 21:05:29 ops caps Oct 05 21:05:33 found tje answer Oct 05 21:16:55 anyone knows if there is a manifest validator? Oct 05 21:17:19 Adib_, doesn't your IDE have one? Oct 05 21:17:43 no idea im using st to edit it, does vs have one? Oct 05 21:18:44 What are 'st' and 'vs'? Oct 05 21:19:07 sublime text and visual studio Oct 05 21:19:15 ah :) Oct 05 21:19:45 Most people here use Android Developer Tools (basically eclipse with plugins) or Android Studio (basically IntelliJ with plugins) Oct 05 21:20:10 those two have validators for basically all the android xml files Oct 05 21:20:20 ah, im using unity :P Oct 05 21:20:27 pls dont hate me Oct 05 21:20:36 Unity, and the Ubuntu desktop environment? Oct 05 21:20:49 no unity the game engine Oct 05 21:20:52 oh Oct 05 21:21:18 I just hate the guys who came up with using the same name for them, not their users ;) Oct 05 21:21:39 (and I don't know anything about game development or the IDE's you mentioned) Oct 05 21:21:50 which autogenerates a manifest for their own things but it doesnt for plugins, if there is a manifest with the plugin it combines them, however with this one there isnt one Oct 05 21:22:29 Sounds basically what ADT and AS do Oct 05 21:22:42 trough the bundled plugins mostly Oct 05 21:22:52 i imagine unity is calling the same stuff in the background to package it, but i have no experience with it Oct 05 21:22:58 anyone know anything about polylines? Oct 05 21:23:26 cool, basicly i need to add a few permissions and an activity whcih is simple, however it also need to add a meta data. should the meta data be its own node in the application node or should it be in a different node? Oct 05 21:26:10 any ideas? Oct 05 21:31:20 Adib_: depends i suppose on what sort of metadata. I know nothing about unity Oct 05 21:31:56 afaik the manifest file has nothing specific to unity Oct 05 21:31:57 https://tapfortap.com/doc/plugins/unity Oct 05 21:32:08 thats a link to what it wants me to do with the manifest Oct 05 21:35:13 Adib_ inside the Oct 05 21:37:16 StingRay_: not inside the application node? Oct 05 21:37:33 not the uses permissions Oct 05 21:37:55 the meta data, dunno, put in both or try it…. it's meta data Oct 05 21:38:16 I would assume the meta data is inside the app node Oct 05 21:38:37 but no harm in both I would think… but this is easy to try/figure anyways :) Oct 05 21:38:43 yeah i had the permissions outside, thanks! Oct 05 21:45:11 Is there a setting that will stop Android Studio from hiding code into what it thinks is neater? it is hiding this from me for example which I find really stupid: new Runnable is replaed by -> Oct 05 21:45:42 is there a android studio channel? Oct 05 21:47:55 They call it code folding.. Just Google that and intellij, then you'll probably find something Oct 05 21:51:02 or just type folding into preferences search Oct 05 21:51:16 even though why would you prefer full anonymous classes instead of lambda notation is beyond me Oct 05 21:53:29 troned: This is the most likely channel. Remember it's sunday for much of the world and people probably aren't paying a ton of attention to irc. Oct 05 21:53:38 troned: goto settings Oct 05 21:53:44 you can configure that all in settings Oct 05 21:53:46 so I'm starting an activity via an intent but the class that should be started doesn't appear to be running. I set breakpoints but they don't get hit when the intent is started. Any ideas? Oct 05 21:53:58 Has anyone here used AtomicFile? Oct 05 21:54:12 settings -> IDE Settings --> Editor --> code folding Oct 05 21:54:56 but code folding is when you can press "-" Oct 05 21:55:06 this is code that is replaced with something else... Oct 05 21:55:19 FreeNow impossible to say without you pasting some code... Oct 05 21:55:37 stingray_ coming right up Oct 05 21:55:42 troned: oh that's autocomplete Oct 05 21:55:51 just look around in ide settings it'll all be in there Oct 05 21:55:56 FreeNow pastebin or eq. obviously Oct 05 21:56:00 Thread thread = new Thread() Oct 05 21:56:00 { Oct 05 21:56:01 @Override Oct 05 21:56:01 public void run() Oct 05 21:56:01 { Oct 05 21:56:11 stingray_ ofc Oct 05 21:56:17 into "Thread thread = run() -> { Oct 05 21:56:25 tonred that's code folding Oct 05 21:56:48 its not replacing it Oct 05 21:57:02 it's just visually folding it since you don't really care about new Threa() { override blah blah Oct 05 21:57:05 http://confluence.jetbrains.com/display/IntelliJIDEA/Folding Oct 05 21:57:17 it's making it easier to see the parts that matter Oct 05 21:57:22 if you click on it it'll "unfold" Oct 05 21:57:51 stingray_ http://pastebin.com/b8Zsi538 Oct 05 21:57:57 stingray_ this is from within a listfragment Oct 05 21:59:20 how do you add a state to a state list drawable that looks for the absence of a state rather than the presence of one? Oct 05 21:59:43 WILDCARD Oct 05 21:59:54 wow Oct 05 21:59:56 Hello there Oct 05 22:00:17 I want to create a progressive video player and this is my code : http://pastebin.com/ytTJPfpm Oct 05 22:00:17 you'd expect that an APK would take a while to propagate Oct 05 22:00:21 but pricing? Oct 05 22:00:25 why isn't that instant? Oct 05 22:00:26 JacobTabak well, as long as you ahve the others covered that is Oct 05 22:00:32 have* Oct 05 22:00:36 i don't follow Oct 05 22:00:46 in xml, you can do state_checked="false" Oct 05 22:00:49 im trying to do this programmatically Oct 05 22:00:54 the problem is videview is not requesting content sequentially! Oct 05 22:01:12 JacobTabak then you simply dont include it Oct 05 22:01:15 PS, my game will soon be .99.... possibly for a limited time, who knows Oct 05 22:01:23 JacobTabak dont put it in the array Oct 05 22:01:29 I mean it hops from 298000 to 698000 Oct 05 22:01:37 why is that? can anyone help me? Oct 05 22:01:48 Some tutorials I'm reading are suggesting that we have to use fsync to make sure our data is really written to the hard disk. Oct 05 22:01:53 StingRay_ k maybe i have a different issue Oct 05 22:02:11 well I do all dynamic assembly of statelists though a theme engine Oct 05 22:02:19 stingray_ do you need the full class? Oct 05 22:02:34 FreeNow no, you need to confirm that is being run... Oct 05 22:02:43 as in inside the click Oct 05 22:03:21 stingray_ that onListItemClick() is being run or load.class? load.class may very well not be running and I have no idea why, that's the problem. Oct 05 22:03:45 onListItemClick is being run Oct 05 22:03:56 as in test that it is :) Oct 05 22:04:01 * StingRay_ goes for more coffee Oct 05 22:04:22 StingRay_: yes please Oct 05 22:04:48 this is my code for video buffering : http://pastebin.com/GKJDVcjc Oct 05 22:06:07 videoview reponse to my http server to get rest of data but not sequintially Oct 05 22:06:16 anyone can help me please? Oct 05 22:06:23 stingray_ it is being run Oct 05 22:06:31 stingray_ thanks for your help btw Oct 05 22:06:44 stingray_ but yes, i set a breakpoint within onlistitemclick and it is being run Oct 05 22:07:12 FreeNow ok now paste the class it's running …I take it you put a BP in onCreate ? Oct 05 22:07:15 anyone have some help on polylines on maps? Oct 05 22:07:37 stingray_ BP? Oct 05 22:07:38 ShapaTank: just ask your question ... Oct 05 22:08:39 bankai_au, right ;D forgot thats how irc works Oct 05 22:09:02 not always..... look at poor warvick2014 over there Oct 05 22:09:09 stingray_ oh wait, I don't have an onCreate in the class that's being run.... Oct 05 22:09:15 stingray_ just an oncreateview Oct 05 22:09:18 haha thanks Oct 05 22:09:25 FreeNow what type of class is it ? Oct 05 22:09:29 stingray_ but the breakpoint i set is before any of the methods Oct 05 22:09:32 somebody look at my code :) => http://pastebin.com/GKJDVcjc Oct 05 22:09:36 im having performance issues with polylines on map... im displaying about 300 of them. is it because of the amount or becuase im displaying them within a loop one by one... should i make a list of them and display all of them at once? Oct 05 22:10:04 do you need to generate that many all at once? Oct 05 22:10:09 stingray_ it's activity but i realize it should be listactivity Oct 05 22:11:43 yes bankai_au they outline each side of the street.. i decided to cut down on amount of polylines to help with performance, so i made a radius from location Oct 05 22:11:58 should i make it only show polylines in view? Oct 05 22:13:56 anyone familier with videoView and progressive streaming? Oct 05 22:14:23 warvick2014, its better to just ask your question Oct 05 22:14:23 ShapaTank: are you showing a route to a location ? Oct 05 22:14:39 I already asked Oct 05 22:14:42 ok agian :P Oct 05 22:15:00 bankai_au, no im showing information on each side of the street Oct 05 22:16:12 I want to stream and download a mp4 file using VideoView and as you may know its not possible to stream and download so I create a proxy to act as a server to VideoView so I could save the file from within the proxy Oct 05 22:16:26 you can see the code here : http://pastebin.com/GKJDVcjc Oct 05 22:17:20 problem is VideoView whenever asking for content-length it's not sequntially I mean VideoView hops from 256000 to 619800 without read between 256000-619800 Oct 05 22:17:32 I don't have any clue why is this happening Oct 05 22:17:34 how can I fix it? Oct 05 22:18:28 warvick2014, the other thing is patience and timing. if you dont get a response now wait for more chatter like i did and i got bankai_au attention Oct 05 22:19:27 ShapaTank: what i've done in the past, albeit with markets not polylines, is generate what's in the current view plus a given distance from teh centre of the map Oct 05 22:20:00 this means you're not doing needless computation, but it also means that swiping around the map will be a bit slower Oct 05 22:20:19 yeah thats the issue, i see Oct 05 22:20:35 stingray_ could it have something to do with the xml or manifest? Oct 05 22:21:00 FreeNow did you pastebin the class ? Oct 05 22:21:06 I didn't see a link Oct 05 22:21:24 stingray_ oh right sorry, i'd rather not post the whole thing but let me see Oct 05 22:21:54 on windows phone is why i realized i need to do a radius but it displays the reduced amount of polylines nicely. but looks like i have to cut down more for android. Oct 05 22:23:01 are you testing on crapping devices? Oct 05 22:23:05 but wouldnt there be more computation going back and forth with setting visible and invisible? i guess ill tyry it now and see how it goes Oct 05 22:23:13 im testing on xperia z1s Oct 05 22:23:15 is that creappy? Oct 05 22:29:42 Is it hard to learn OpenGL? I know linear algebra well. I just want to do 2D stuff. Draw some rects and some bitmaps. Oct 05 22:30:26 wow linear algebra is needed for opengl???? Oct 05 22:30:56 stingray_ any ideas? Oct 05 22:31:41 well old opengl wasnt too hard, but with shaders it has become more difficult Oct 05 22:32:02 but you can also now just copy paste shaders from all over the place if you like Oct 05 22:34:05 FreeNow it just doesn't start ? Oct 05 22:35:00 stingray_ well when i click one of the items from the listfragment it does open a new "window" visually speaking but all it has is the title with just a blank space below Oct 05 22:35:09 stingray_ but the breakpoints are never hit by the debugger Oct 05 22:35:22 what breakpoints ? Oct 05 22:35:37 stingray_ I put breakpoints into load.java Oct 05 22:35:42 yes Oct 05 22:35:42 stingray_ to see if it was being run Oct 05 22:35:46 where!!!! Oct 05 22:35:55 stingray_ declarations Oct 05 22:36:04 stingray_ public File dirName; Oct 05 22:36:30 Hi. I have put a ListView within a GridLayout. I wanted the ListView to take the available space (using layout_gravity="fill") but the ListView is expanded to its full size, no matter what I try. Is it possible to have a ListView within a GridLayout taking up the free space or should I revert back to LinearLayouts (of which I need a nested variant). http://pastebin.com/XLid0330 Oct 05 22:37:03 stingray_ should I put one on the import statements? Oct 05 22:37:08 stingray_ i really don't think it's running Oct 05 22:37:54 FreeNow you put them in methods Oct 05 22:38:16 so on something like setContentView() in onCreateView would be a good place ;) Oct 05 22:38:25 stingray_ i also have breakpoints in oncreateview Oct 05 22:38:31 stingray_ none of them are hit Oct 05 22:40:07 stingray_ could it be a manifest issue? Oct 05 22:40:16 well if you are getting no errors Oct 05 22:40:25 and you are getting a black screen …. probably not Oct 05 22:40:32 yep no errors Oct 05 22:40:34 just use an normal activity with a listView Oct 05 22:41:16 stingray_ and it's not a black screen, it appears as though it loads correctly actually. The logo, "back" button in the top left, title, and black bar at the top all appear, with whiteness below Oct 05 22:43:18 stingray_ if I change ListActivity to activity the same thing happens Oct 05 22:43:37 no i dont mean just change extends Oct 05 22:43:48 stingray_ oh Oct 05 22:44:09 stingray_ how would that help though because the class isn't being run at all? Oct 05 22:45:37 hey warvick2014 i took a quick look at ur code. im a noob a tthis stuff but whats constantlength for? i think maybe there is an issue with the logic there? Oct 05 22:46:12 constantLength is using to reading buffer until the last chunk Oct 05 22:46:37 if it's not last chunk then I will use constantLength else I will use the remaining part Oct 05 22:47:36 did you try debugging line by line to see what numbers your variables are, when it asks and compares maybe varibles arent reset? Oct 05 22:47:54 FreeNow http://pastebin.com/d8DMC2vs Oct 05 22:50:21 I am folling the google developer camera tutorial. when I run my app with android studio, I get the following output from logcat during the camera preview: https://bpaste.net/show/1a0ef7e1ae68 . What do these ratios mean? the numbers at the end? is it something to do with % of correctly rendered? Oct 05 22:50:28 stingray_ alright that worked, it made the background red Oct 05 22:50:59 stingray_ I guess I'll just start over with that Oct 05 22:51:18 there are stipulations with listActivity iirc Oct 05 22:51:30 warvick2014, so this part is the issue? response.addHeader("Content-Length","891064"); Oct 05 22:51:37 never used it but the layout needs id's that are exacted etc Oct 05 22:51:43 stingray_ ah ok Oct 05 22:51:49 I would always choose Activity WITH a listView Oct 05 22:52:15 that 891064 I just put it on purpose just didn't want to use file.length() Oct 05 22:52:28 stingray_ alright cool thanks Oct 05 22:52:34 bilb_ono thats the capable res right ? Oct 05 22:52:34 nothing incorrect according to syntax Oct 05 22:52:48 bilb_ono or preview size options ? Oct 05 22:53:02 problem is VideoView not my code it hops from one range to another without any sequence Oct 05 22:53:29 StingRay_, why does it give so many of them? is it like 1 per frame or something? Oct 05 22:53:45 yaya everythings looks good. i was just trying to pinpoint which line it was. oh so when playing the video, it starts to skip around? Oct 05 22:53:48 cause you are doing something that outputs that .. :) Oct 05 22:54:00 E is error right ? Oct 05 22:54:21 like E/CameraPreview the E means error? Oct 05 22:54:36 yeah Oct 05 22:54:48 bilb_ono also what color is that line :) Oct 05 22:55:04 if my game is 50 FPS at a Samsung S4 mini, then what could the bottom end phone achieve. my game basically has to run on 40-50 FPS+ Oct 05 22:55:05 cause red isn't a nice color to have :) Oct 05 22:55:13 red. its definitely an error. Oct 05 22:55:32 but 1280/720 for example the first one. what is 1280 and what is 720? Oct 05 22:57:50 troned: try a moto g, same cpu but higher res display Oct 05 22:58:10 ? Oct 05 22:58:21 so bankai_au is the sony xperia z1s crappy? Oct 05 23:04:09 how much speedup could I expect by using openGL compared to SurfaceView for simple 2D drawing (rect+bitmaps)? Oct 05 23:04:26 32.097% Oct 05 23:06:32 :) Oct 05 23:06:38 g00s: or 33.02% on exynos CPUs Oct 05 23:06:45 what emulator do you guys use? android x86/genymotion/? Oct 05 23:06:49 it better not be 32.098 Oct 05 23:06:58 sylon, haxm Oct 05 23:07:21 i tried haxm its faster than stock but still not as fast as geny Oct 05 23:07:33 indeed Oct 05 23:08:20 when i go from geny to haxm i always doubt if my setup is working right "this is supposed to be fast but.." Oct 05 23:09:45 how are things going Leeds Oct 05 23:10:06 Leeds are you in HK ? Oct 05 23:10:23 things are ok, apart from jetlag... got back to HK on Wednesday Oct 05 23:10:44 we are, as they say, living in interesting times Oct 05 23:10:46 i need to learn more about what the ruckus is over there Oct 05 23:11:11 you know, beside the ruckus here of a chinese company privatising our local water company Oct 05 23:11:34 now i'm reading http://www.salon.com/2014/10/05/water_is_the_new_oil_how_corporations_took_over_a_basic_human_right/ Oct 05 23:12:27 g00s o.o Oct 05 23:13:30 shortest summary: 1000s to 10s of 1000s of people (depending on time of day/week) out on the streets to protest in favour of HK people freely choosing HK leader, rather than being given a shortlist vetted by Beijing Oct 05 23:14:26 many many off-topic pages of context and detail could be added :) Oct 05 23:14:42 geopolitics :) Oct 05 23:15:14 (link to recent BRICS and that civilian insurection is not anymore spontaneous) Oct 05 23:15:21 (oops) Oct 05 23:15:43 let's talk about android dev :) Oct 05 23:16:43 our stupid fucking news is talking about phelps' DUI Oct 05 23:16:48 got our media sucks ass so bad Oct 05 23:17:32 yap nothn new g00s Oct 05 23:17:46 just worst, journalism is dead. Oct 05 23:17:59 democracynow.org Oct 05 23:18:07 that also concern android, when you see so many news Oct 05 23:18:07 \o/ Oct 05 23:18:13 which are not. Oct 05 23:18:49 FreeNow i'm looking forward to reading http://www.amazon.com/Political-Order-Decay-Industrial-Globalization/dp/0374227357 and http://www.amazon.com/gp/product/1594205396 Oct 05 23:19:24 the two closest things to on-topic are that there has apparently been *some* attempts at distributing malware pretending to be apps supporting the protests, both for Android and iOS... and the fact that we have entered a post-candle era - protesters holding up lit phones rather than candles to show a crowd in the night :) Oct 05 23:19:24 g00s how'd you pick those Oct 05 23:19:56 FreeNow carefully :D Oct 05 23:20:03 eheh Leeds Oct 05 23:20:08 lol Oct 05 23:20:17 i saw fukuyama's first book but didn't get a chance to read it. i should read vol 1 first Oct 05 23:21:14 *facepalm* my whole app was crashing because I was using arraylist.set() instead of .add() Oct 05 23:21:24 the 4th revolution, i saw while checking out http://www.amazon.com/gp/product/B0058Z4NR8 Oct 05 23:22:13 http://goo.gl/z5XsHP should anyone care Oct 05 23:22:46 this is my code for video buffering : http://pastebin.com/GKJDVcjc Oct 05 23:23:04 I have question about videoview and the way it behaves Oct 05 23:23:10 Leeds so you were at the protest ? Oct 05 23:23:10 anyone can help me? Oct 05 23:23:12 oh, and http://www.youtube.com/watch?v=WfoUtmrh3RU is a reasonably good explanation of some of the background... Oct 05 23:23:27 g00s: we popped in to show support and buy ice cream for volunteers, yes :) Oct 05 23:23:35 Leeds awesome Oct 05 23:24:13 hmm, my updateGame function takes 1-4ms and the rendering takes 15-17ms Oct 05 23:24:41 i use a dirty rect as well Oct 05 23:24:56 is it normal to take that long to draw to a SurfaceView? Oct 05 23:25:12 it is clearly the bottelneck, could OpenGL help? Oct 05 23:25:26 be careful with dirty rect, sometimes it can uses more cpu to compute the rect (depending on your code and other factors) than to benefits of the gain of not redrawing everything Oct 05 23:25:36 also i'm not sure if dirtyrect works without hardware accel Oct 05 23:25:50 or the contrary Oct 05 23:26:19 in the meantime, I'm waiting to hear from my boss if he's available to meet today - for the first time since June... last week he wanted to meet at his favourite coffee shop, which happens to be right in the middle of the protest zone, but had to cancel :) Oct 05 23:27:25 I am using Android Studio to build an app for 2.3 and up, and it works fine. I even managed to find an old 2.3 super-low-res low-density low-cpu device to test how it works on a bare minimum device, and it works surprisingly well Oct 05 23:27:36 Leeds do you think he will remember what you guys were workin on ? Oct 05 23:28:21 Peetz0r: Would that low-end device happen to be an LG Optimus Zone? Because that thing is like a calculator Oct 05 23:28:27 but I want to use Holo on >4 devices. so I created res/vales/styles.xml and res/values-v14/styles.xml, where the first one has android:Theme.Black and the second one has android:Theme.Holo Oct 05 23:28:32 g00s: I sure as hell don't... Oct 05 23:28:38 Darklust: HTC Wildfire ;) Oct 05 23:28:43 Leeds ha ! Oct 05 23:28:49 Peetz0r: *original* wildfire? Oct 05 23:28:55 yes, not the S Oct 05 23:29:00 whoa Oct 05 23:29:03 320x240, 528mhz, etc Oct 05 23:29:04 HTC wildfire sucked with bluetooth man, i thin i blacklisted that thing on Play Oct 05 23:29:27 hey, bluetooth is the thing I am developing right now, and it seems to work just as well as my Moto G Oct 05 23:29:42 maybe they fixed it Oct 05 23:30:03 it sucked in pretty much every way - I think it didn't have any accelerated graphics at all? Oct 05 23:30:13 did weird shit, like you had to cycle the bluetooth stack if the peripheral disconnected Oct 05 23:30:16 (yes, I have a 2.3 ldpi singlecore and 4.4 xhdpi quadcore side-by-side on my desk. it looks cute) Oct 05 23:30:51 Peetz0r: OS version or screen size? :) Oct 05 23:31:01 adq: yeah that was my input yesterday to Napalm but he said it would be quick Oct 05 23:31:10 eh, the screen sizes are quite close to the OS versions Oct 05 23:31:13 if values are hardcoded yes Oct 05 23:31:19 (and final static ;)) Oct 05 23:31:22 (as int) Oct 05 23:31:45 The 2.3 device has 3.2" and the 4.4 device has 4.5" :p Oct 05 23:31:54 adq: the size of the dirty rect does not seem to affect the drawing time at all. Oct 05 23:31:57 anyway, back to my issue Oct 05 23:32:26 so I created res/values-v14/styles.xml with