**** BEGIN LOGGING AT Sat Aug 24 02:59:58 2013 Aug 24 03:18:13 So with mediacodec, I have get an output buffer - but I'm trying to figure out how to decode it Aug 24 03:18:27 Is it a jpeg format byte array? Aug 24 03:37:45 pfn: Got builds working with your Android plugin. Good work. Aug 24 03:38:54 http://stackoverflow.com/questions/18414674/decoding-the-output-buffer-from-mediacodec Aug 24 03:41:32 Boy am I glad I can edit questions without waiting for approval. Aug 24 03:49:54 in my defense, I just woke up and can't think at 100% yet :D Aug 24 03:56:13 I just assume people make typos. Aug 24 03:56:45 Nilium, yeah, it's pretty easy Aug 24 03:56:48 Nilium, and fast Aug 24 03:56:53 Nilium, nothing else comes close, really Aug 24 03:56:57 Certainly faster than jberkel's Aug 24 03:57:06 it's almost as fast as running non-scala builds Aug 24 03:57:10 Or at least `compile` is, which is all I care about for most purposes. Aug 24 03:57:15 once you get a few cache items put together Aug 24 03:57:23 Nilium, it's faster than using intellij to build by far Aug 24 03:57:28 if you're doing a lot of package-cycles Aug 24 03:57:37 for development Aug 24 03:58:00 I mostly just have to be able to compile and then shove something onto a device relatively easily since testing OpenGL stuff anywhere else is pointless. Aug 24 03:58:16 right, you really should use it for generating packages to put on-device Aug 24 03:58:22 it eliminates the 30-45 seconds for proguard Aug 24 03:59:58 most of my delta debug builds only take about 10 seconds including device installation Aug 24 04:13:34 OpenGL ES Aug 24 05:00:25 Is there any way to add Today lambdas to Java? any precompiler? postcompiler? preprocessor? plugin or whatever so I can write lambdas in Java for Android? (I know I can use anonymous classes, but I want lambda functions sintaxis) Aug 24 05:00:51 can I use adb to run an app on my device without installing it? Aug 24 05:02:12 Is the app already installed? Aug 24 05:02:31 Yeah Aug 24 05:02:47 and actually have a question about that too. I installed a test app, but it's not showing up at all Aug 24 05:04:32 ah, nevermind on that last part, I found it Aug 24 05:05:34 Anyway, you can start an application or service using `adb shell` Aug 24 05:05:52 is that a shell on my device? Aug 24 05:05:53 I am getting Failure [INSTALL_FAILED_INVALID_APK] when i try to install the apk from android-studio Aug 24 05:06:01 it works fine in emulator though Aug 24 05:06:17 wildnux: had the same problem like 30 seconds ago. App is already on the device. Try uninstalling it Aug 24 05:08:30 no lambdas for me then? Aug 24 05:08:57 I would say no. Aug 24 05:09:27 sanitypassing: I dont have it installed in device Aug 24 05:09:33 i used to have it before, Aug 24 05:09:39 i just double checked it. Aug 24 05:09:43 check in the "All apps" section to make sure it's not there Aug 24 05:09:52 sanitypassing: just checked Aug 24 05:09:55 could be different for you, but like I siad, had the same problem Aug 24 05:12:03 Are there other things that i can look at to fix this? it only says Failure [INSTALL_FAILED_INVALID_APK] Aug 24 05:19:24 hmm, can anyone recommend a good Android book that doesn't teach using IDEs? Aug 24 05:19:29 looking to perhaps buy one Aug 24 06:00:10 sanitypassing: found the problem Aug 24 06:00:27 i tried installing it from /data/local/tmp/ Aug 24 06:00:32 but still did not work, Aug 24 06:00:41 it was due to permission error Aug 24 06:01:13 I changed the permission of the file and tried again from the phone itself, it installed now Aug 24 06:02:17 Does google provider something to replace nineoldandroid? Aug 24 06:06:32 Guys, check this: https://github.com/orfjackal/retrolambda and after you've managed to make it run on Android, please tell me how to use it xD Aug 24 06:10:22 gavilan2: look first.. https://github.com/orfjackal/retrolambda/blob/master/end-to-end-tests/src/test/java/net/orfjackal/retrolambda/test/LambdaTest.java Aug 24 06:11:24 gavilan2, today: scala Aug 24 06:11:39 lambda all day long Aug 24 06:11:47 Napalm: look at what? Aug 24 06:12:46 pfn: I'm working on an existing app which is made in JAva Aug 24 06:13:38 i posted a link that answers your question Aug 24 06:14:12 Napalm: By how to use it, I meant integrating it with eclipse so I write lambdas, I press ctrl + F11 and my program runs on my phone.... Aug 24 06:14:22 ah Aug 24 06:14:31 good luck with that :D Aug 24 06:14:49 I'd probably need a decompiler too to be able to debug it :$ Aug 24 06:15:21 cool, retrolambda probably looks nice with RxJava Aug 24 06:15:36 yeah, now that I think so, it's probably not the greatest idea ever Aug 24 06:15:39 debugging will sux :$ Aug 24 06:16:12 I hate Java :( Aug 24 06:16:14 gavilan2, so? scala interops with Java fine Aug 24 06:16:58 pfn: I don't think I'll be able to sell that to my manager xD Aug 24 06:17:40 you won't be able to sell fake lambda either Aug 24 06:17:51 :( Aug 24 06:17:56 damn you java! Aug 24 06:19:43 "May break if a future JDK 8 build stops generating a new class for each invokedynamic call." Aug 24 06:19:48 hm Aug 24 06:19:55 * g00s backs away Aug 24 06:21:04 i wish Intellij just let you use the syntax it shows inner classes as Aug 24 06:21:16 anonymous inner classes Aug 24 06:21:52 g00s: The worst thing, is that it's probably because of either legal or marketing reasons that they don't do it... Aug 24 06:25:57 gavilan2 also, another part of me wishes that now that google is working closely with Jetbrains, they would try something risky like using Kotlin on android Aug 24 06:27:38 g00s: I think I'll end up with mono, and be done with it :p Aug 24 06:28:00 the mono runtime is supposedly very fast Aug 24 06:28:12 hope it all works out Aug 24 06:28:25 g00s: yeah, the only issue is that the app is already on Java Aug 24 06:28:29 if not, I'd go mono xD Aug 24 06:30:43 or titanium... Aug 24 06:37:12 gavilan2 i might play with rust this weekend Aug 24 06:37:31 (not for android) Aug 24 06:37:51 i'd like to compare rust to go Aug 24 06:49:24 How does the ContactsContract.Contact.LOOKUP_KEY work? Why do we need it? Aug 24 06:58:03 Has anyone tried decoding videos in general here? (not android specific) Aug 24 07:09:04 anyone in here who could point me in the right direction for finding and backing up my baseband.img? Aug 24 07:42:06 any good tips to increase my android dev productivity? Aug 24 07:50:23 gavilan2 if you find out, let me know ;) Aug 24 07:51:53 I think by spend more time on studying app's requirement would help Aug 24 07:52:00 spending* Aug 24 07:59:53 Yay for running at higher resolutions than I can actually run at. Aug 24 07:59:59 * Nilium makes his editor huge. Aug 24 08:01:34 Why wasn't you running it in the first place? Aug 24 08:04:38 What now? Aug 24 08:05:35 ok… my sharedpreferences are suddenly not persisting. Aug 24 08:05:56 Well that's going to be fun to debug. Aug 24 08:05:58 code's copy-pasted out of 8 other apps of mine where it does work. Is there maybe some manifest stuff to include? i dont see anything. Aug 24 08:06:22 ive tried messing with contexts and pref names and it seems unrelated to any of that Aug 24 08:06:32 I don't know since I can't read your code via telepathy. Aug 24 08:06:41 ok Aug 24 08:06:47 Chances are you forgot something. Aug 24 08:06:57 actually, let me make sure it saves within session first. Aug 24 08:07:21 Even higher chance that you'll find it by going line by line and just looking at it. Aug 24 08:07:47 the copy-paste was hours ago Aug 24 08:07:57 ive gone through a few times by now of course. Aug 24 08:08:17 it's pretty typical, when you debug Aug 24 08:08:23 Did you try debugging it by explaining each line to a prinny? Aug 24 08:08:34 i dont own any prinnies Aug 24 08:08:50 i don't appreciate the explosions Aug 24 08:09:00 Some people use rubber duckies, but I find the threat of exploding murderous penguin death to work better. I suggest finding a prinny. Aug 24 08:09:35 I keep one on my desk because it boosts morale. Aug 24 08:11:00 g00s: I found a nice library the other day, to inject views into variables :p Aug 24 08:11:15 okay Aug 24 08:11:26 it doesnt save within session Aug 24 08:12:05 gavilan2 what was it ? Aug 24 08:14:23 editor.commit() returns true, too Aug 24 08:15:00 g00s: what? Aug 24 08:17:23 KEWL! i still have my old advanced engineering math book. it has about Nabla! awesome! Aug 24 08:19:18 How does the LOOKUP_KEY in ContactsContract work? Why do we need it? Aug 24 09:09:09 whyIsThisSo: The idea is that this key should survive syncing processes that may change the "row id" (whatever that is), so theoretically multiple row ids may have the same lookup key, but hopefully not at the same time. I have no idea whether this actually works or not, but if it does, tie the ids in your app to lookup key first and row id second (if lookup key does not exist / makes sense). Aug 24 09:16:05 In my app, I try to figure out and recognize the source_id from rawcontacts. Aug 24 09:51:15 mm, ndk 9 arrived with gcc 4.8. Everything fails to compile now. Looks like it might be for a good reason though. Aug 24 09:52:02 useful warnings have been enabled and some security problems like putting a non-const char * as format argument is now an error. Aug 24 09:52:23 sorry, as format. This is a common security problem, apparently. Aug 24 09:59:16 sooo, you guys know how IntelliJ and/or Eclipse are always just randomly deciding to spin up a bunch of CPU with no UI indicating whats happening? and it's completely maddening and impossible to figure out what the hell it's doing? Aug 24 09:59:24 https://github.com/jasta/jprocps -- well i got sick of that. Aug 24 09:59:28 :) Aug 24 10:01:52 never noticed Aug 24 10:08:06 I have so many weird hotkeys in IntelliJ now. :| Aug 24 10:09:39 alankila: Typically, the security problem comes from it not being a literal, not non-const. Aug 24 10:10:06 Mainly because the compiler can sort of guarantee the literal is null-terminated, but anything else might not be. Aug 24 10:11:00 Plus some compilers will now check your format strings to make sure they're not stupid, which is pretty handy. Aug 24 10:12:39 yeh yeh Aug 24 10:14:21 In any case the fix would be to make it "%s" or in this case I just rewrote it because someone had gone used vsprintf to generate data to stack-allocated buffer & then wrote that with android_log_printf Aug 24 10:15:46 Well, the fix wouldn't really be that, since the input string might not be null-terminated either. Aug 24 10:16:20 Whatever Aug 24 10:16:35 You should care more about this if you're using C or C++. >_> Aug 24 10:16:46 I don't Aug 24 10:16:52 Damn hipster web developers and their lack of care for security. Aug 24 10:17:47 make security easy and programs are secure. Aug 24 10:18:16 The security you're ignoring is easy. Aug 24 10:18:21 I can't fix it if the input to that function is not properly null-terminated so I can't care about that sort of thing Aug 24 10:18:39 I would have to validate every place using it instead Aug 24 10:19:43 You can specify a maximum length for the string using your format string. Aug 24 10:20:03 I'm using __android_log_vprintf. I assume it knows what it's doing. Aug 24 10:20:53 It assumes you know what you're doing. Aug 24 10:21:40 Again, I'm not doing anything. I'm just passing the arguments on. If someone calls it wrong, that's a problem at that callsite. Aug 24 10:21:46 Just use a format string like "%.*s" and pass the maximum length of the string before the string. Aug 24 10:22:33 Or hardcode it into the format string. That's an option too. Aug 24 10:26:34 This is anyway the function we have been talking about: https://github.com/lioncash/droidsound/blob/master/jni/SC68Plugin/SC68Plugin.cpp#L62 Aug 24 10:26:43 the previous version had two security issues. I think this one has none Aug 24 10:28:10 Well, it has none until someone calls it with a fmt string that oh why the hell am I bothering Aug 24 10:28:19 You are the problem! >_< Aug 24 10:28:29 I can't fix it at that level. Do you really suggest I should try to validate the format string in that function? Aug 24 10:28:46 I would suggest not using format strings period Aug 24 10:29:13 Eh. I am sure that invalidates about every program ever written in C, then. Aug 24 10:29:43 printf isn't the only thing you have for writing to stdout, y'know. Aug 24 10:30:11 I'm not writing to stdout either. If you want to log with android, you're going to use the functions provided by the android log header. Aug 24 10:30:25 That's nice, but you just said C. Aug 24 10:30:44 This discussion is pointless. I'm ending it now. Aug 24 10:30:57 It was over when you ignored security issues. Aug 24 10:31:45 From that point onward, it was just you chanting, "lala look at meeee I don't care about securi-teeeee" Aug 24 10:32:29 Okay. Suggest to me how SC68Plugin.cpp should be changed to be secure according to your definition while still writing to android log. May be impossible. Aug 24 10:33:28 Don't have people pass code through your wrapper around it. Aug 24 10:33:53 Job done. It's no longer a security issue for you. Aug 24 10:34:20 so ... your suggestion is to inline that function at every callsite? Aug 24 10:34:26 My suggestion is to remove it. Aug 24 10:34:50 If someone needs to log something, make sure it's on their head and they're explicit about the call to the Android function. Aug 24 10:35:13 If you don't want the responsibility of doing it, then don't do it. Aug 24 10:35:28 Simple, right? Aug 24 10:36:50 Well the function's existence faciliates updating the sc68 library when new version arrives. There's some 70 call sites in the library expecting to produce log. I guess I could just make the function do nothing and that would apparently be an improvement. Aug 24 10:37:02 It would be. Aug 24 10:38:47 well, log is useful, so I disagree & won't do it. Aug 24 10:39:53 The issue isn't that logging is bad, but that your wrapper around it may negate any chance the compiler has of validating the format string, meaning things could go very wrong very easily. Aug 24 10:39:58 personally I would appreciate if stdout and stderr would work on android though. Seeing that stuff in logcat output would be helpful. Aug 24 10:40:18 I could add some __attribute__ crap into it maybe Aug 24 10:41:33 Check the format attribute. Aug 24 10:43:27 Looks like it would need a patch into the library itself. Aug 24 10:44:28 Again, something that will be lost unless I get it to upstream... This library hasn't been updated for a few years, might check out if there's a new version first Aug 24 10:48:33 Looks like the copy is some 100+ revisions behind. Fascinating. Aug 24 10:48:49 damn I hate tutorials where they ignore xml files Aug 24 10:49:01 what am I supposed to do? make them up? Aug 24 10:52:24 Tadas: it's possible that you're expected to create some stuff yourself, yes Aug 24 10:52:27 And indeed, the new version has a __attribute__((format(printf,2,3))) Aug 24 10:52:37 so that problem has been solved. Just have to update code Aug 24 10:52:38 <_boto> hello Aug 24 10:53:03 I'm not that experienced to create my own xmls Aug 24 10:53:14 <_boto> i have an oom problem in an app which contains an https server Aug 24 10:53:28 where do all R.id.* are kept? Aug 24 10:53:34 <_boto> the more clients connect the more memory is used which is not gc'ed Aug 24 10:53:57 <_boto> also when the clients are gone, the memory does not get gc'ed Aug 24 10:54:21 <_boto> eventually (after a day or so) the app crashs due to oom or the device reboots Aug 24 10:54:26 Oh I got it Aug 24 10:54:51 <_boto> i have observed this problem on various devices and android versions (from version 2.2 up) Aug 24 10:55:10 <_boto> is there something special to consider when implementing a sslserver? Aug 24 10:55:38 <_boto> any hint is highly appreciated Aug 24 10:56:41 <_boto> is there someone with knowledge about sslserving on android? Aug 24 11:00:06 <_boto> btw: the same server can also configured as http server (no ssl). in this case the app has no problem with oom Aug 24 11:00:55 _boto: how is the https server implemented? Aug 24 11:01:38 ...goddamnthismiserableautotoolsshit... How can a build system be this slow Aug 24 11:01:56 <_boto> alankila: it sets up an sslserversocket as the documentation describes, the waits for clients (accept) Aug 24 11:02:39 <_boto> alankila: handling the response is just like in NanoHttpd (the server is an extended version of NanoHTTPD) Aug 24 11:02:58 native code? java code? Aug 24 11:03:08 <_boto> then after handling the resonse the socket is closed Aug 24 11:03:12 <_boto> it is pure java Aug 24 11:03:33 <_boto> i suspect that the symphonie ssl implementation leaks memory Aug 24 11:03:35 Hmh. Probably caches something somewhere then. Aug 24 11:03:59 <_boto> i have limited the ssl session cache to 1000, but it did not help Aug 24 11:04:09 or could be downright buggy, whoknows. Aug 24 11:04:09 what does heap dump show? Aug 24 11:04:31 <_boto> the curious thing is, if i use normal socket instead of sslsocket (i.e. no https, but http) then everything runs well, no oom Aug 24 11:04:54 I hope ListView is not depreciated. Aug 24 11:04:57 <_boto> the heapdump shows a lot of bytes[] allocated by ssl internals Aug 24 11:05:02 like Tabhost is. Aug 24 11:05:41 <_boto> Mavrik: but i absolutely don't know why the bytes[] are not gc'ed. i close every stream and the socket after handling the requests Aug 24 11:07:00 <_boto> i don't know if i have to manually kick in a kind of gc for the ssl implementation Aug 24 11:07:28 hmm Aug 24 11:07:31 <_boto> i have seen a lot of ssl client implementation examples, but there is few ssl server examples Aug 24 11:08:10 <_boto> and the served https pages have periodic polls (json query) every few seconds Aug 24 11:08:30 <_boto> so letting a client query a while causes a crash in the app because of oom Aug 24 11:09:05 <_boto> i have also checked if the response data causes any leaks Aug 24 11:09:28 <_boto> could not find any Aug 24 11:09:43 <_boto> some of the response data is dynamically created, it is Aug 24 11:10:04 <_boto> e.g. the camera images are served (the app is a kind of ip cam) Aug 24 11:12:14 What does "No grammar constraints (DTD or XML Schema) referenced in the document." mean? Aug 24 11:12:56 you deleted the xml schema definition from top level XML element Aug 24 11:13:04 <_boto> do you get it from compiling a gui xml file? Aug 24 11:13:40 <_boto> check if you did not get an *.out file created Aug 24 11:14:01 <_boto> my eclipse wrongly creates an out file with empty content sometimes Aug 24 11:15:10 hmm Aug 24 11:15:18 that's my xml file Aug 24 11:15:19 http://pastebin.com/7rPV0T5B Aug 24 11:16:25 And I also get: Unexpected text found in layout file: """ Aug 24 11:18:32 Tadas: what tutorial is this? Aug 24 11:18:52 I'm making up xml files Aug 24 11:19:08 http://www.javacodegeeks.com/2013/06/android-listview-tutorial-and-basic-example.html Aug 24 11:20:41 this is the xml for the dialog Aug 24 11:21:14 Am I doing anything right? Aug 24 11:23:30 Tadas: I've got to go get some dinner, but in short... not much, no :( Aug 24 11:23:41 :(( Aug 24 11:23:46 what does that posted xml have to do with the tutorial? Aug 24 11:24:07 have you run through the tutorial/training stuff on the actual Android site? Aug 24 11:24:17 I haven't Aug 24 11:24:18 :( Aug 24 11:24:43 I was trying to do that tutorial, but Aug 24 11:25:05 there were nothing about xml files on that tutorial so I was trying to create one Aug 24 11:27:48 Tadas: Post the XML along with your Java source, if possible, put the error message in the source as comment Aug 24 11:29:45 so, start with the actual official Android training materials, rather than some random tutorial somewhere Aug 24 11:31:29 yeah, start with the "Training" section. Aug 24 11:33:36 Ok, thanks for the advice Aug 24 11:33:55 But I got it working now :S Aug 24 11:34:15 At least the list menu appears Aug 24 11:47:13 Has anyone worked with androidstudio + renderscript? Aug 24 11:47:31 So I have a renderscript, which compiles properly - but I don't see the Script_... class being generated Aug 24 12:29:26 can someone explain shortly what the difference between the support libraries and the base classes are? Aug 24 12:29:53 other than older versions receiving more features with the support libraries, that is. Aug 24 13:02:38 Hi All Aug 24 13:03:18 I want to set an ImageView to show a bitmap in black and white but later have it fade back to colour Aug 24 13:03:26 is there and easy way to do that? Aug 24 13:29:36 hi folks, I have a question involving volley image handling Aug 24 13:30:55 my NetworkImageView keeps appending a slash in front of the URLs I enter and then gives a FileNotFound exception... why isn't it going to the network for the image? My app has permissions. Aug 24 13:31:29 I'm using an ImageLoader. Aug 24 13:43:44 Has anyone here used renderscript? Aug 24 13:43:50 (with android studio) Aug 24 13:53:12 hi Aug 24 14:04:50 discopig, hi Aug 24 14:05:00 what's up Aug 24 14:38:28 Hello, any one have "Galaxy S II (GT-I9100)"? Need help testing my app at google play please. Aug 24 14:40:03 t2mkn: I would suggest asking in regular #android. Aug 24 14:40:48 more people there hence more likely someone will be willing to help with said device. Aug 24 14:41:20 sigv: humm, ok. i thought, a developer can better help. thanks anyways :) Aug 24 14:41:46 t2mkn: depends on what help you are looking for. :) Aug 24 14:42:07 you can ask anyone to debug if they are willing and you can explain. Aug 24 14:42:46 sigv: i got a 1* rating from a user. review is in Hungarian. Aug 24 14:43:03 which i m unable to understand properly Aug 24 14:43:14 "S2 Nem mennek az animációk!" Aug 24 14:44:01 its something related to animation, but dont know whats the issue in their Aug 24 14:45:20 so wanted someone to test just the animation part if its really has a problem Aug 24 14:48:30 in that case I would say any user works Aug 24 14:54:58 sigv: not any user, only that user who has a "Galaxy S II (GT-I9100)" :D Aug 24 14:55:09 heh Aug 24 14:55:40 in latest devices having android 4.0 and above are perfectly fine Aug 24 15:14:27 so when ndk-gdb says "Couldn't extract package's data directory" and the app's manifest says android:debuggable="true" and it's been rebuilt ... what do I need to do? Aug 24 15:14:48 this thing is very uninformative about what's actually going wrong Aug 24 15:16:35 I see it's trying to do some run-as $PACKAGE_NAME /system/bin/sh -c pwd Aug 24 15:17:59 And the error is specifically that it doesn't seem to recognize the package despite such a package has been installed on device. Hmm Aug 24 15:19:11 Hmm, so now I have to work out why run-as doesn't work correctly or try to hack this ndk-gdb thing Aug 24 15:25:35 "./obj/local/armeabi-v7a/gdb.setup:4: Error in sourced command file:" Aug 24 15:25:47 Great... just great. Does anyone use this piece of crap Aug 24 15:27:00 Given that file doesn't even have 4 lines the error is a tad mystifying Aug 24 15:28:21 Well ... it ran on a phone that has 4.2, just didn't work on a phone with 4.3 for some reason Aug 24 15:31:41 I'm trying to compile a renderscript with androidstudio - but the 'gen' directory isn't being created Aug 24 15:31:46 Has anyone seen this issue? Aug 24 15:37:04 Damn was able to get the gdbserver to do its thing on another phone that runs 4.2 Aug 24 15:37:18 is there a way to clone an inflated view? Aug 24 15:37:23 was an integer division by zero. Aug 24 15:47:16 I'm using androidstudio and I consistently get a warning that it's unable to resolve R. Aug 24 15:47:31 What am I doing wrong here? Do I need to change the java build path or something? Aug 24 15:48:48 does _anyone_ here use androidstudio? O.o Aug 24 15:50:40 the early birds who want to catch all the bugs maybe Aug 24 15:50:48 no one that's serious about development, imo Aug 24 15:51:03 it isn't that bad Aug 24 15:51:18 but I haven't worked with eclipse to be able to compare Aug 24 15:51:42 that's not it Aug 24 15:51:50 this SC68 library is just awful. So much overengineering and seemingly pointless API churn and some of the APIs are pretty weird too, like you have a single method that both gets and sets the sampling rate, you simply call the set method with some magic constant to retrieve current rate Aug 24 15:51:58 what the fuck, who designs this kind of shit Aug 24 15:52:08 it's an android focused ide that throws everything else out the window Aug 24 15:52:43 pfn: well, it was made for that purpose so I think it's a good thing. Aug 24 15:52:52 pfn, that's like saying I won't use VisualStudio to make stuff for Windows, no? Aug 24 15:53:11 haven't really used it myself but I don't see what could be bad about it other than it still being in testing. Aug 24 15:53:40 liquidmetal: not sure about your issue. Aug 24 15:53:47 not when 95% of what you're working on is java and java-related bits Aug 24 15:54:06 you write in Java for Android so the IDE is for Java. Aug 24 15:54:14 pfn: what are you missing in the IDE? Aug 24 15:54:47 jvm languages, a multitude of plug-ins Aug 24 15:55:03 heh, eclipse plugins won't work for sure. Aug 24 15:55:07 and personally, I don't use java on Android Aug 24 15:55:07 sigv, the IDE seems pretty good to me. Lots of rough edges which Google would polish over the next months/year - but it's pretty useable! Aug 24 15:55:08 what do you mean with jvm languages? Aug 24 15:55:31 sigv, has nothing to do with eclipse plug-ins Aug 24 15:55:46 pfn, you work with the ndk, then? Aug 24 15:55:53 support for jvm languages besides java Aug 24 15:55:54 pfn: well, Java is the preferred programming language for apps. Aug 24 15:55:59 liquidmetal, no Aug 24 15:56:23 liquidmetal: I would expect rough edges for something that is tagged as in testing. :) Aug 24 15:58:19 pfn, what jvm languages do you use? Aug 24 15:58:21 liquidmetal, no, that's like saying using a specific ide for developing wp apps while visual studio will cover wp and Windows Aug 24 15:58:28 scala, primarily Aug 24 15:58:55 but I often embed crap like ruby and javascript Aug 24 15:59:16 may I ask what reasons do you have for doing so? Aug 24 15:59:41 why else do you embed script engines Aug 24 15:59:56 plug in apis extensibility Aug 24 16:00:03 pfn, hmm - that makes sense. Maybe they'll have support for that kind of stuff later on. Aug 24 16:00:14 okay then Aug 24 16:00:20 no Aug 24 16:00:31 because its Android studio Aug 24 16:00:53 it is an android focused version of intellij Aug 24 16:01:08 If there's enough people asking for ruby support on androidstudio, I guess they'd do it Aug 24 16:01:23 but they won't Aug 24 16:01:52 you need to realize, Android studio is just intellij with features removed Aug 24 16:02:30 would you use vanilla intellij instead of say, eclipse? Aug 24 16:05:07 of course Aug 24 16:05:27 there's one feature for me, that I miss Aug 24 16:05:53 stupid logcat filtering sucks in the current version of intellij Aug 24 16:09:17 yeah Aug 24 16:10:46 What's the best way to intercept click on a button inside an ListView element? Aug 24 16:26:16 I've to customize the adapter? Aug 24 16:27:37 the adapter provides entries. Aug 24 16:27:46 try google, my friend. http://stackoverflow.com/questions/2468100/android-listview-click-howto Aug 24 16:30:35 anybody know what differences the support libraries introduce? performance diff for devices that already have the features available? would there be a reason to opt for using the higher API version ones? Aug 24 16:31:00 sigv, i'm googling for hours Aug 24 16:31:40 I just did a quick https://www.google.com/search?q=click+listview+handle to check if I was right Aug 24 16:31:56 sigv, if you read my question i want to trap a click in button in a listview not listviewitem itself Aug 24 16:32:01 sigv, the problem is different Aug 24 16:34:12 why do you have a stray button? Aug 24 16:34:25 I am not sure I follow your app's flow. Aug 24 16:35:01 m8: ^ Aug 24 16:35:14 sigv, two botton in a listitem Aug 24 16:35:18 *buttons Aug 24 16:36:07 okay then. Aug 24 16:36:08 sigv, appflow -> ListView -> ListItem -> Two buttons, i want to intercept the click on every button Aug 24 16:36:33 I would implement a custom class for the ListItem that has the buttons. Aug 24 16:36:45 sigv, i've implemented a custom layout xml Aug 24 16:37:23 like this mListAdapter = new ArrayAdapter(this, R.layout.list_item_btn, R.id.textItemName, items); Aug 24 16:38:27 sigv, listitem is a linear layout with two buttons Aug 24 16:38:41 ah, okay... Aug 24 16:39:06 hold on. Aug 24 16:39:10 sigv, where i have to look? in the adapter? in the listitem class? in the activity? Aug 24 16:39:47 I suppose you could extend the adapter for this. Aug 24 16:40:13 but adapter is not for the data? Aug 24 16:40:30 on Google, "listview button click": About 6,720,000 results (0.44 seconds) Aug 24 16:40:47 also, http://www.youtube.com/watch?v=wDBM6wVEO70 Aug 24 16:41:01 fork adapter and on each listitem's creation add a handler for each button. Aug 24 16:41:50 sigv: do you mean "subclass adapter"? Aug 24 16:41:54 Leeds, thanks for google, but I'm googled... Aug 24 16:42:02 Leeds: extend adapter Aug 24 16:42:24 class FooAdapter extends ArrayAdapter Aug 24 16:42:46 Leeds, if adapter is for data, why i've customize the adapter for handle button click events? Aug 24 16:43:11 i've asked you a suggestion not the code! Aug 24 16:44:28 if the way is extend the adapter class i will do it! Aug 24 16:44:32 thanks Aug 24 16:55:25 you basically have to extend an Adapter of some sort for any non-trivial ListView Aug 24 16:57:19 hi, Aug 24 16:58:44 when i do adb push to push a file, it writes the file with root owner and rw only for root user Aug 24 16:58:52 my phone is rooted Aug 24 16:59:33 how can I change the behavior such that when it do adb push file, it writes the file with 755 permissions with shell user? Aug 24 17:03:50 can anyone in here help me find my basband? Aug 24 17:04:46 wildnux, don't run adb as root Aug 24 17:08:59 I know I need to check mount points, but from there i dont know what it should look like Aug 24 17:11:18 pfn: i default.prop has ro.secure=0 how do i change this to ro.secure=1 ? if I change and reboot, it just reverts back Aug 24 17:11:57 or i at least think i do Aug 24 17:12:12 pfn: i am using deTmobilized rom and used root acces from shell once, looks like when i run adb it runs as root always Aug 24 17:12:43 #android-root Aug 24 17:13:38 pfn: thank you i did not know about that channel Aug 24 17:20:58 man, latest AS still has crappy logcat Aug 24 17:21:11 i thought that would have been improved :/ Aug 24 17:56:25 does it, I thought it'd be fixed by now Aug 24 17:57:57 me too Aug 24 17:57:58 I am using httpmime from apache in my android app under Android Studio. The project compiles fine but gives me a class not found error in runtime, and the class is from the httpmime jar file. Aug 24 17:58:18 I was wondering how can I make Studio export the library to the apk Aug 24 17:58:35 although I have marked it as exported for runtime in the project structure Aug 24 17:58:43 it still gives the same exception Aug 24 17:58:48 any insight? Aug 24 18:09:11 hm, i want to use these stupid java primitive arrays for performance critical code, but there is no way to make them immutable. is there any way of at least using some kind of static analysis tool to make sure they are only changed in one spot (where they are initialized)? Aug 24 18:11:07 maybe annotate them as @EnforceImmutable and use an annotation processor Aug 24 18:13:26 hm, findbugs supports net.jcip.annotations.Immutable Aug 24 18:13:48 now does the gradle findbugs plugin work with android plugin :| Aug 24 18:20:03 hey guys, just wondering if hsqldb would work on an android application. Does anyone know if it works ok? Aug 24 18:23:45 FlowRiser technically, i think he says yes - but the author recommends using sqlite anyhow Aug 24 18:24:06 reason is, dvm sucks basically Aug 24 18:27:44 it works, but jdbc provides too much abstraction Aug 24 18:27:49 it won't give you the best performance Aug 24 18:27:57 if you want to use the abstractions, though, modern devices work fine Aug 24 18:28:18 I wonder if jna has been ported for android yet Aug 24 18:28:18 well, in perf testing the engine isn't JIT'd enough Aug 24 18:28:25 "enough" Aug 24 18:28:28 what's the definition of enough Aug 24 18:28:34 depends on what you're working with Aug 24 18:28:58 it all depends on how much latency you're willing to deal with, and how much latency different solutions provide Aug 24 18:29:02 enough, means better than sqlite since thats the default option Aug 24 18:29:12 h2 is awesome though Aug 24 18:29:15 you won't get better than sqlite in performance Aug 24 18:29:19 so Aug 24 18:29:27 what other quantifier for "enough" is there Aug 24 18:29:45 pfn no, you are wrong, in some tests H2 beats sqlite Aug 24 18:29:53 in /some/ tests Aug 24 18:30:00 sure, sqlite isn't optimized for concurrency Aug 24 18:30:08 so for any concurrent application, h2 will outperform sqlite by far Aug 24 18:30:23 on android, that is 99.9% not a concern Aug 24 18:31:19 well, like i said, the H2 author tested it, found performance lacking, and recommends using sqlite intead Aug 24 18:31:43 OTOH, i am using their storage engine , mvstore, which is awesome Aug 24 18:31:47 right, but lacking to one person may be suitable to another Aug 24 18:31:54 absolute terms are always useless Aug 24 18:32:20 neat, jna does work on android Aug 24 18:32:21 that's handy Aug 24 18:32:47 maybe its folklore, but google was going to use that on android initially, but decided not to because of performance Aug 24 18:32:53 (jna)\ Aug 24 18:33:04 jna performance isn't as good as pure jni, granted Aug 24 18:33:25 and it has many issues for which you need pure jni access anyway Aug 24 18:33:32 but for many use-cases, jna is perfectly valid Aug 24 18:33:54 not to mention, jni is much simpler to support since it's the de-facto standard for java anyway Aug 24 18:34:38 and since jna is implemented through jni, it doesn't make sense to not offer jni to begin with Aug 24 18:34:41 and let someone else port jna Aug 24 18:35:16 * pfn goes back to writing test cases for his android plugin Aug 24 18:39:39 https://android.googlesource.com/platform/frameworks/rs/+/master/java/tests/LivePreview/src/com/android/rs/livepreview/RsYuv.java Aug 24 18:39:57 This example has a method called 'setYuvFormat' - which doesn't seem to exist? Aug 24 18:40:02 How did that happen? Aug 24 18:42:47 g00s, thanks for your answer :) I will try a simple test to see how it goes. Aug 24 18:44:25 FlowRiser cool, i would be curious. did you find the google post my Thomas Mueller about android performance? one thing to consider, is whether you need to use content providers. that would be a show stopped Aug 24 18:45:00 also, there is some issue on android where opening the database for the first time (when the process starts) is pretty slow Aug 24 18:45:09 make sure thats off the main thread Aug 24 18:45:39 i wanted to use H2 because it lets you write native functions Aug 24 18:45:46 maybe i should look into it again Aug 24 18:46:33 FlowRiser OOOH, you were asking about hsqldb. i forgot, about hsqldb/h2. look at h2 first probably Aug 24 18:57:09 Hi has anyone here created a voip app? Aug 24 18:58:22 Hi has anyone here created a voip app? Aug 24 19:00:13 Please wait a reasonable amount of time before re-asking your question Aug 24 19:01:43 i actually just made one in the 1 minute between his asks Aug 24 19:01:56 funkbox you're awesome Aug 24 19:02:17 i wonder if ff mobile has webrtc, does that count ? Aug 24 19:02:42 hi guys Aug 24 19:02:57 how do i send info from an Activity to a Fragment Aug 24 19:03:13 without using an interface Aug 24 19:03:27 yourFragment.sendInfo(someInfo) Aug 24 19:07:20 so how can i get started with the voip? Aug 24 19:08:06 do i need servers?? Aug 24 19:08:10 SimonVT: PhoneListFragment phoneFrag = (PhoneListFragment)getFragmentManager().findFragmentById(R.id.myFragment); <--- gives me a casting error Aug 24 19:08:52 You're probably using the support library Aug 24 19:08:58 In which case you need to use the support methods Aug 24 19:09:24 when i try to use getFragmentSupportManager i get an error Aug 24 19:09:47 That's not the method name Aug 24 19:09:53 getSupportFragmentManager* Aug 24 19:10:47 SimonVT Do u know how i can get started with VoiP Apps? Aug 24 19:11:28 datandroiddude: i know how. Aug 24 19:11:48 datandroiddude: read this http://www.ietf.org/rfc/rfc3261.txt and then come back Aug 24 19:11:55 k Aug 24 19:11:57 If you're expecting help with your issue you need to provide some information Aug 24 19:12:57 SimonVT: me? Aug 24 19:13:19 funbox : but how does this explain android app dev? im new to this.. Aug 24 19:13:33 datandroiddude: you asked how to get started. that's how you get started. Aug 24 19:13:43 with the voip part Aug 24 19:14:07 oh awkay wait.. Aug 24 19:14:16 it's an RFC. Aug 24 19:14:24 they are specification on how something is expected to work. Aug 24 19:15:10 although i suppose the wikipedia article is jsut as good Aug 24 19:22:20 god, does this guy ever have any netiquette at all? Aug 24 19:22:53 pfn: nope. that's why i sent him to the RFC Aug 24 19:23:09 you're too kind Aug 24 19:23:20 wikipedia should not be considered a replacement for specs. Aug 24 19:23:41 it should be considered the ORIGINATER of specs! Aug 24 19:23:59 sure. Aug 24 19:24:08 wikitruth :) Aug 24 19:24:33 g00s: s/truth/leaks/ Aug 24 19:25:09 which reminds me, i need to see ward's latest video on gis federated wiki project Aug 24 19:25:14 i base all my programs on wikipedia/wikileaks specifications, wikileaks is especially useful for integrating PRISM support Aug 24 19:25:43 zinx you automatically get prism support when using google apis :) Aug 24 19:25:49 or fb apis Aug 24 19:25:56 maybe even dropbox :) Aug 24 19:25:58 g00s: or the internet in the US Aug 24 19:26:07 g00s: or new zealand Aug 24 19:26:08 yeah :( Aug 24 19:26:16 oh yeah, saw that last night Aug 24 19:27:11 or the internet in general. Aug 24 19:27:28 yeah they have all those fiber taps Aug 24 19:27:47 i just forward all my stuff to nsa. much easier Aug 24 19:28:17 a proxy through their servers. Aug 24 19:28:22 best backup service Aug 24 19:28:26 nsapao@nsa.gov Aug 24 19:28:34 guaranteed 5y retention if you use encryption! Aug 24 19:28:55 p_l: free of charge... Aug 24 19:29:14 that sounds like a good deal... Aug 24 19:29:21 they should offer packages like that. :) Aug 24 19:29:28 man, i was just reading that article by Julian Assange on Jared Cohen / Eric Schmidt Aug 24 19:29:40 you can't make this shit up Aug 24 19:29:50 pretty extraordinary Aug 24 19:29:58 assange/manning are very different from snowden Aug 24 19:30:30 manning's case is actually much, much closer to snowden's, assange is different by many points :) Aug 24 19:30:36 i guess Manning is going to have to stay a guy for a while longer Aug 24 19:31:14 till grave, probably Aug 24 19:31:28 p_l he'll probably be out in around 9 years Aug 24 19:31:42 g00s: somehow I doubt it Aug 24 19:31:59 :( Aug 24 19:32:03 p_l: eh, manning leaked confidential military data. snowden leaked massive violations of the constitution Aug 24 19:32:06 unless by "out" you mean "in body bag" Aug 24 19:32:19 funkbox: violations by military, by leaking military data Aug 24 19:32:57 snowden was a civilian contractor in military (yes, NSA is part of the military) Aug 24 19:33:56 both manning and snowden worked with materials under security clearance and leaked them outside Aug 24 19:34:26 fair enough Aug 24 19:34:37 from a moral standpoint or whatever Aug 24 19:35:38 funkbox: n.b. Manning's leaks included information about war crimes (at least how majority of the world interprets the term) Aug 24 19:36:07 yes, and a LOT of other stuff that was indiscriminately dumped Aug 24 19:37:42 You can't discriminatingly dump that volume of information. Aug 24 19:37:52 it takes a _large_ team to redact them properly. Aug 24 19:38:25 some of the data... well, it was quite enlightening in how USA is never your ally ;) Aug 24 19:41:58 hey guys, random hacking last night: https://github.com/jasta/jprocps -- if any of you are mystified as to what IntelliJ is doing, now you can find out :) Aug 24 19:43:31 jasta heh, you used curses :) Aug 24 19:43:58 indeed i did Aug 24 19:44:04 "Disclaimer: I have no idea what I'm doing when it comes to ncurses." Aug 24 19:44:05 lol Aug 24 19:44:15 i am actually thinking about maybe reversing that and just telling folks to run watch jtop -b Aug 24 19:44:37 it would simplify the tool a lot Aug 24 19:45:04 to be honest, i just wanted to futz around with it Aug 24 19:45:19 also, learn python. i really just dabble in python but its not my go-to, fluent scripting language and it really should be Aug 24 19:45:29 because right now, that fluent language is perl and that is not good :) Aug 24 19:45:42 hehe, time to rewrite proclogcat in python :D Aug 24 19:45:52 hehe, perhaps yes :) Aug 24 19:46:04 also, proclogcat needs some love. i need to make it able to understand all of logcat -v formats Aug 24 19:46:22 basically parse a little more fuzzily Aug 24 19:46:32 does it have timestamps? Aug 24 19:46:47 i added that to some script Aug 24 19:46:54 maybe it was jeffs Aug 24 19:47:00 proclogcat doesn't add anything it just filters. but its regexp's are dumb and get confused by -v threadtime and -v time Aug 24 19:47:08 colorlogcat (jeffs thing) is also confused by that. Aug 24 19:47:12 so they both need to be modernized Aug 24 19:47:24 in other news Aug 24 19:47:48 i'm considering releasing a quick little library i wrote that makes it really easy to integrate an app with dumpsys Aug 24 19:48:07 basically it's a command-line script and some Service voodoo that lets you interact with your app like its a command-line Java program Aug 24 19:49:26 cool. i was working on something similar, but you send commands via mqtt Aug 24 19:50:19 dumpsys was my first choice because its a secure channel Aug 24 19:50:25 explicitly secured by android Aug 24 19:51:11 but the basic idea is that this lib project handles all the magic and gets you set up for getopt-style argument parsing and all that Aug 24 19:51:15 using commons-cli Aug 24 19:51:33 so you basically register subcommands in your app and decorate the tool with functionality Aug 24 19:51:37 i remember you showed me the gist of the trick a few months ago, but i think i forgot Aug 24 19:51:47 i'll have to check out your code :) Aug 24 19:51:49 kind of like how git subcommands work. git-show, for example, is a separate program that git runs when you type "git show" Aug 24 19:52:20 i hope commons-cli doesn't import apache.* :D Aug 24 19:52:28 it doesn't, it's actually a stand-alone (dep-free) lib Aug 24 19:52:37 thats why i picked it Aug 24 19:53:15 it's pretty cool though. i added a quick little module that let's me dump stats about the various thread pools and whatever that are around a large app i work on Aug 24 19:53:24 so you can do ./dumpapp threads stats Aug 24 19:54:21 and to implement that, all i did was write a ThreadsSubcommand which takes an array of args (in this case, the array is just new String[] { "stats" }) and then looks at the executor module we have and asks it to dump a bunch of state Aug 24 19:54:37 very powerful debug tool Aug 24 19:55:05 cool Aug 24 19:55:50 ive also started using Fragment and Loader#dump quite a bit more. adb shell dumpsys activity top is really sweet Aug 24 19:55:59 however, im thinking about using my dumpapp tool to make it even better Aug 24 19:56:14 adb shell dumpsys activity top is noisy as all get-out, and formatted in such a way that's hard to get targetted information out of it. Aug 24 19:56:29 yeah it is Aug 24 19:56:41 so i'm thinking i'll using dumpapp to access specific client-state so you dont see all the view hierarchy dump and all that crap Aug 24 19:57:14 ./dumpapp fragment MyFragment Aug 24 19:57:20 and just go straight to MyFragment#dump Aug 24 19:58:23 FragmentManager also has dump Aug 24 20:00:46 yeah, thats the one that makes it so f'n noisy Aug 24 20:00:50 one of them, actually Aug 24 20:00:58 it dumps this big ass list of fragments that are active and a whole bunch of state about each Aug 24 20:01:10 which is great, and im glad to have the data, but its not easy to separate out custom dump data and generic dump data Aug 24 20:01:15 making the tool hard to parse for humans Aug 24 20:01:35 human interface tools that are hard for humans to parse is not so good :) Aug 24 20:08:35 would be cool if dvm had stuff like java 6 dynamic attach and java.lang.management Aug 24 20:09:56 jmx, etc Aug 24 20:15:35 MBeans Aug 24 20:15:49 i miss real java, in some ways :( Aug 24 20:16:41 looking at the java 8-10 roadmap, i'm pretty impressed with the language changes. Aug 24 20:16:58 i wonder if some of the languages like groovy / scala will become less necessary Aug 24 20:19:59 groovy is a scripting language Aug 24 20:20:03 scala is a functional language Aug 24 20:20:07 java will never have either of those Aug 24 20:20:12 so no, it won't become less necessary Aug 24 20:20:48 you can't even run java in a repl yet, after almost 2 decades in service... Aug 24 20:21:45 of course, of course … but most people are unhappy about lack of lambdas and first class functions in java, once it get those a lot of belly aching will go away Aug 24 20:22:08 people are unhappy about lambdas and first class functions because they want functional programming and don't realize it Aug 24 20:22:20 they want functional composition which isn't available without lambdas Aug 24 20:22:27 not easily Aug 24 20:22:46 callbacks are a minor convenience Aug 24 20:29:10 pfn: or you could say, that they want a real OO language :p Aug 24 20:37:42 gavilan2, lambdas are not a part of OO language Aug 24 20:38:00 pfn: let's agree to disagree... Aug 24 20:38:06 they aren't Aug 24 20:38:15 you can disagree Aug 24 20:38:16 but you're wrong Aug 24 20:38:22 pfn: do you know the "everything is an object" moto? Aug 24 20:39:24 weren't objects poor man's closures? :P Aug 24 20:39:50 http://c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent Aug 24 20:40:19 seems more Nays in that poll :D Aug 24 20:41:04 g00s: you can create a mapping, but writting it in the object form takes less space... Aug 24 20:41:54 gavilan2 are you using Scala ? Aug 24 20:42:02 g00s: nope, why? Aug 24 20:42:09 oh, just wondered Aug 24 20:42:16 wonder away... Aug 24 20:44:59 does anyone know how you can enter phone numbers on a current phone call? like to navigate a phone tree, or do an apartment buzzer Aug 24 21:02:46 i have some problems with the new Android Facebook SDK (v3.5) and was just wondering if anyone here has been using it successfully Aug 24 21:04:30 I'm getting a warning: "Key com.facebook.platform.protocol.PROTOCOL_VERSION expected String but value was a java.lang.Integer. The default value was returned." which crashes the app on login Aug 24 21:05:01 so fix it if you can :p Aug 24 21:05:08 don't provide it an int Aug 24 21:06:21 ok :D Aug 24 21:20:10 how do i get the design pane in android studio? i dont have the "Design | Text" tabs while editing the layouts Aug 24 21:21:01 http://imgur.com/qZfR1d1 Aug 24 21:22:35 y u no exist ByteBuffer#clone Aug 24 21:22:41 * Nilium curses it Aug 24 21:23:43 isn't it ByteBuffer.duplicate() ? Aug 24 21:24:11 oh shares content Aug 24 21:28:31 ByteBuffer cloned = ByteBuffer.wrap(Arrays.copyOf(inputByteBuffer.array(), inputByteBuffer.capacity())) Aug 24 21:29:01 g00s: is that really the simplist solution? Aug 24 21:29:14 You're assuming it's an array-backed buffer there. Aug 24 21:31:06 just throw in a few abstract factories, looks about right :/ Aug 24 21:31:35 Nilium are you using Sublime for your android dev :P Aug 24 21:31:45 No. Also not using Java. Aug 24 21:31:52 ah, k Aug 24 21:37:52 wildnux: in eclipse, you right click the xml file, open with android common xml editor Aug 24 21:40:24 Nilium, yeah, you said not using java, but what's your app in market? Aug 24 21:40:43 Nothing in market yet aside from an old live wallpaper I made years ago. Aug 24 21:40:59 oh, how not fun Aug 24 21:41:11 Nilium, anyway, try doing more builds with my plugin, it gets faster the more you do debug builds Aug 24 21:41:16 up until you clean... Aug 24 21:41:21 then you'll blow the cache away Aug 24 21:41:46 Don't really care as long as it works. Aug 24 21:42:38 not java but what you using instead ? Aug 24 21:42:42 Scala. Aug 24 21:44:16 ByteBuffer clonery method done. Happy days for something I didn't need. Aug 24 22:18:00 hello Aug 24 22:19:37 I am trying to correctly use android.media.AudioTrack to play a frequency for a specific duration (50-500 ms), but I cannot seem to get the parameters to work correctly. Anybody can help, please? Aug 24 22:20:51 bovv: audiotrack requires you to come up with audio data for some number of frames. So you have a difficulty synthesizing appropriate audio signal? Aug 24 22:22:39 I *think* that I synthesized the signal correctly. My problem is playback, I think. Aug 24 22:24:18 anybody have an idea on how you could dial numbers on an existing call? Aug 24 22:24:19 alankila: For example: I fill a buffer that is the min size possible with the PCM 16-bin sin of the freq I want, then I try to play only 50ms of that data. Aug 24 22:25:05 well, what you do is you start the track, write 0.05 * sampling_frequency frames of audio, then pause/stop the track Aug 24 22:25:22 you should hear a 50 ms bleep of those frames you just constructed. Aug 24 22:25:27 alankila: So I use a length of 50 in the "write" statement. Then I hear nothing. Same with 250. Aug 24 22:25:49 bovv: 50 is not correct Aug 24 22:25:51 Show some code. What does that mean? Aug 24 22:26:09 its it a byte length? Aug 24 22:27:19 well its the count of samples really Aug 24 22:27:55 it would be appropriate for a sampling frequency of 1000 Hz. And he should hear "something" even if he did the signal itself incorrectly. Aug 24 22:29:30 OK.... I'm going to modify my code. Aug 24 22:30:02 OK.... I'll show the code. Aug 24 22:30:56 incidentally it would be perfectly fine to use even a very low sampling frequency such as 1000 Hz on android because there's a fairly good resampling implementation in the audioflinger. Any sampling rate ought to do as long as it can represent the desired frequencies Aug 24 22:34:56 alankila: Source is at http://pastebin.com/VSd8wPTV Aug 24 22:36:47 track.write(buffer, 0, buffer.length) Aug 24 22:37:04 also I think you should call play before write and stop or pause or something aftewards. Don't remember Aug 24 22:38:01 notice that these methods return status codes Aug 24 22:38:11 chances are you get ERROR_INVALID_OPERATION Aug 24 22:39:54 yes, I think that's it. It may be that you can use write() if you use the STATIC mode but you use STREAM mode. I'm pretty sure in that case the order is strictly play, write, pause/stop Aug 24 22:40:12 gah shit, forgot you can't .hash() primitive arrays in java Aug 24 22:40:26 I've never tried the static operation myself Aug 24 22:40:30 fuck man, this has to be the most retarded type system Aug 24 22:40:58 Arrays.asList(foo).hashCode() ? ;-) actually no idea if that even means anything. Aug 24 22:41:17 I tried STATIC, but that puts out nothing even when buffer.length is used. It's dead quiet. Aug 24 22:41:37 So, I switched back to using STREAM. Aug 24 22:42:45 I have to admit. I did not use any stop() method anywhere in the application. I figured that it would stop when it reached the end of the buffer(). Aug 24 22:43:22 sure it will, but it's actually expecting more data to arrive. It's kind of usage error if you don't do the complete play/write/pause cycle. Aug 24 22:45:38 There are other finer points like avoiding audio underruns when you stream audio Aug 24 22:45:38 Do I have my cycles backwards?... should it be "write(); play();" instead of "play(); write();"? Aug 24 22:46:13 if you have a buffer of say 1024 frames, then you probably want to feed new data in chunks of size like 256 frames so that audiotrack would continuously have supply of 768 to 1024 frames or so, or at least never fall much below that Aug 24 22:47:02 it is logically an error for you to allocate a single buffer, try to calculate some audio to that, and then write it all at once. It works if your single sound is always shorter than the buffer you want, but when you want something that needs multiple buffers you have to start thinking how to keep the audiotrack fed with data Aug 24 22:47:49 My believe is that for streaming the sequence is play(), write(), stop()/pause(). Also notice that every method returns a status code. You're ignoring them and wondering why it doesn't work. Aug 24 22:48:26 Perhaps STREAM mode is better for me.... just in case. Even though 50-500ms data is good enough. Aug 24 22:48:47 OK Aug 24 22:49:06 so anyway my favorite solution is to allocate the minimum buffer because currently android buffers are huge anyway, so nobody wants anything else Aug 24 22:49:37 mine works Aug 24 22:49:39 then I divide it by 4 and that's the chunk size synthesizer, whatever it is, works with. It runs on separate thread and calculates audio and writes it to the track until the synthesizer says to stop, then it cleans up and quits Aug 24 22:49:48 just quicky made one with static Aug 24 22:51:02 so the idea is that as soon as there's 25 % free in the audiotrack's buffer, the newly synthesized data goes in. Then the synthesizer immediately goes back to calculating more and stalls on audiotrack.write until there's enough room again Aug 24 22:51:32 i'll gist the code Aug 24 22:51:35 and my convention is that when synthesizer returns 0 frames of audio, that means it reached the end Aug 24 22:52:07 alankila: And you do all of this using MODE_STATIC or MODE_STREAM? Aug 24 22:52:08 so the final frame can be partial, it's written like the rest and the loop quits and cleans up Aug 24 22:52:11 STREAM Aug 24 22:52:18 Wow. Aug 24 22:53:25 https://gist.github.com/slightfoot/6330866 Aug 24 22:53:27 tada Aug 24 22:53:34 if just looks like int len; while (0 != (len = synthesizer.synthesize(buffer)) { audioTrack.write(buffer, 0, len); } Aug 24 22:53:51 kind of like any I/O loop on java where you read from one inputstream and write to another Aug 24 22:54:00 bovv: * Aug 24 22:54:02 ^ Aug 24 22:54:12 also missed one ) there Aug 24 22:55:17 the buffer is generally not large, it must be smaller than the actual audiotrack buffer in every case or it will underrun. Aug 24 22:55:32 you could have 1 frame long buffer if you like, though it's probably inefficient. Aug 24 22:59:49 the class name says "organ". This suggests you will probably try to make a music application. You probably end up doing voices, envelopes, audio mixing, some kind of sample or algorithm based synthesis ... Aug 24 23:00:00 or the paste name, class name didn't say that Aug 24 23:00:19 so in any case I recommend going for the STREAM approach because I suspect you will end up doing STREAM in the end anyway Aug 24 23:00:56 hey alankila Aug 24 23:01:15 if he were doing that, hes going about it all wrong Aug 24 23:01:28 every app has humble beginnings? Aug 24 23:01:43 true Aug 24 23:11:48 hey is it possible to flash an android phone from a windows virtual machine (vmware fusion)? Aug 24 23:14:36 thanks.... I'm going to gve this a try. :) Aug 24 23:19:47 Archguy: as long as you can access USB devices directly I'd so yes Aug 24 23:19:56 *say Aug 24 23:20:04 * Nilium looks at what he just wrote and reels in horror. Aug 24 23:20:38 Archguy: but that question is more suited to android-root Aug 24 23:20:47 #android-root Aug 24 23:27:58 Nilium at least you can build your horror quickly with pfn's sbt plugin :) Aug 24 23:31:08 I have a listview where I should products/images, and it's slow to scroll sometimes... Is it a good idea to try to use some kind of gpu acceleration to make this faster? Aug 24 23:32:55 listviews being slow usually has to do with the adapter and how you fill the view for each item Aug 24 23:33:20 gavilan2: it shouldnt be slow, sounds like your images are way too large or your loading them on the UI thread.. check http://developer.android.com/training/displaying-bitmaps/index.html Aug 24 23:36:49 Napalm: I do all that that pages says, and the image are exactly the size that I'm showing them in... Aug 24 23:37:07 Napalm: But it's a long view, let's say 100 images... so if I try to scroll down fast, it "stutters"... Aug 24 23:37:14 pastbin your adapter Aug 24 23:37:19 Napalm: also each listview item, is a relativelayout, I don't know if that's an issue or not Aug 24 23:37:30 Napalm: Can't do that :$ company code.... Aug 24 23:37:45 well how do you want us to help you? Aug 24 23:37:59 if you cant supply any code and you have to be vague Aug 24 23:38:03 Napalm: My question was about if the gpu would make it faster ot not Aug 24 23:38:21 yes turning on hwAcceleration would help Aug 24 23:38:29 but thats not the "solution" Aug 24 23:38:29 like, trying to draw the thing myself, instead of using a listview Aug 24 23:38:35 hwAcceleration is already on Aug 24 23:38:43 lol Aug 24 23:38:49 then its defo something your doing Aug 24 23:38:56 what? Aug 24 23:38:58 are you crazy Aug 24 23:39:05 I was just asking :) Aug 24 23:39:06 heh Aug 24 23:39:12 im only joking around Aug 24 23:39:15 but i wouldnt recommend it Aug 24 23:39:19 k Aug 24 23:39:26 do you have 4.3 on a device? Aug 24 23:39:50 mmmm I don't remember the version Aug 24 23:39:58 I have a galaxy nexus that I use for example Aug 24 23:40:08 well go in the options and look Aug 24 23:40:24 I don't have it here Aug 24 23:40:25 it's at work Aug 24 23:40:31 :| Aug 24 23:40:41 what are you testing on? Aug 24 23:40:57 * Napalm waits for the answer, "emulator" :| Aug 24 23:41:18 Napalm: I'm not developing right now Aug 24 23:41:22 I develop during the week Aug 24 23:41:39 heh, and you come here now, asking these questions Aug 24 23:41:47 well there isnt anyone here can do for you Aug 24 23:42:03 if we cant work with you, you cant show code, or describe in too much detail your owkr Aug 24 23:42:04 work Aug 24 23:42:11 what are we suppose to do? wave a wand? Aug 24 23:42:13 :D Aug 24 23:42:20 My question was just about the GPU Aug 24 23:42:28 you've already told me that it's a bad idea Aug 24 23:42:32 so I got the info I needed :) Aug 24 23:42:40 not really Aug 24 23:42:46 what is in each list item Aug 24 23:42:58 the item, some description, the price Aug 24 23:43:04 it's a relative layout with some textviews Aug 24 23:43:07 and an image Aug 24 23:43:22 I think listview can at best have very limited gpu acceleration because the items do get recycled all the time Aug 24 23:43:30 k Aug 24 23:43:39 as soon as one flows out of view it can be recycled as the item that appears from the other end Aug 24 23:43:45 is there any good profiler to profile this thing? Aug 24 23:43:55 it's probably your adapter implementation that sucks, that's all Aug 24 23:43:57 yes, thats why i was asking about 4.3 Aug 24 23:44:11 Napalm: Does eclipse have this profiler thing? Aug 24 23:44:36 no idea, dont bother profiling my graphics, as I never have them slow Aug 24 23:44:44 ? Aug 24 23:45:28 gavilan2: this is what you want http://developer.android.com/tools/help/systrace.html Aug 24 23:45:51 are there any UI design programs that run outside of an IDE? Aug 24 23:47:02 Napalm: Thanks... Will that profile each method, or each lie? Aug 24 23:47:03 g00s: Well, building a Scala class/object/trait combo to help build relative layouts programmatically is the most useless thing I've done, but at least it builds quickly? Aug 24 23:47:03 line? Aug 24 23:47:20 I mean, hey, at least I can type `view alignLeftOf otherView` and it works. Aug 24 23:47:35 Now to just go hang myself. Aug 24 23:48:03 android devs don't hang themselves. they just fragment into pieces Aug 24 23:50:54 gavilan2: neither, read the description Aug 24 23:51:01 oh that looks interesting Aug 24 23:52:13 [deXter]: hey, ummh heimdall frontend 1.4 looks pretty different to what the tutorials show: http://cl.ly/image/0D2t1r2d1k2x Aug 24 23:52:16 [deXter] & miip: still there guys? Aug 24 23:52:47 #android-root for root questions Aug 25 00:06:40 when an app requests "Storage" permission, is it able to grab your gmail account/email accounts associated with the phone? Aug 25 00:07:00 And/or "System Tools"? Aug 25 00:10:04 ho hum Aug 25 00:10:09 therealGent, no, just /sdcard Aug 25 00:10:43 thanks pfn :) Aug 25 00:10:50 how do i send information from the activity to the fragment Aug 25 00:11:42 What is the system tools permission? Googling around isnt yielding good results Aug 25 00:12:16 nvm found a good resource Aug 25 00:12:18 thanks again pfn Aug 25 00:22:43 Doesnt ndk include libc6 Aug 25 00:23:23 I can't seem to find sys/ucontext.h Aug 25 00:27:28 it includes bionic Aug 25 00:29:29 rather, the libc on android is bionic, and no glibc or whatever Aug 25 00:31:02 pfn what repo was harmony again ? Aug 25 00:31:09 core/luni Aug 25 00:31:16 thanks Aug 25 00:33:23 pfn git repo Aug 25 00:33:38 system/core Aug 25 00:33:40 ? Aug 25 00:34:35 weird, I thought it's under core, but a locate just pointed at external/apache-harmony/luni Aug 25 00:34:58 libcore/luni as well Aug 25 00:35:03 yeah, i thought it was more obvious the last time i looked at the manifest Aug 25 00:35:17 ok, so libcore Aug 25 00:35:19 libcore/luni probably correctr one Aug 25 00:35:28 thx Aug 25 00:36:30 * pfn needs to repo sync it over to his pc onto ssd Aug 25 00:36:35 make repo grep and git grep stupid fast Aug 25 00:36:55 it's on a vm running on spinning disk :( Aug 25 00:41:47 Hi all, i've got a ImageView question, well im initializing a ImageView from code into a HorizontalScrollview inside a framelayout, and I can't seem to set it's width to strech to a certain (longer) width, I have been trying to do it with imageView.getLayoutParams().width but it just keeps the same size. Aug 25 00:42:22 Am I missing something Aug 25 00:43:05 pfn, does that mean no sys/ucontext Aug 25 01:03:59 hey guys OnAttach for my fragment is always called about 1 second too late for the initialization of my variable Aug 25 01:04:31 What does "too late" mean? Aug 25 01:05:02 i mean i have a "fragmentCommunicator" being initiliazed in my onAttach Aug 25 01:05:26 and it always end up coming after, the actual main activity code Aug 25 01:05:37 That seems about right, doesn't it? Aug 25 01:05:48 so my main code looks like if (fragmentCommunicator != null) { fragmentCommunicator.passDataToFragment(phoneList); } Aug 25 01:05:56 and its always null Aug 25 01:06:03 Couldn't you also block 'til the communicator is filled? Aug 25 01:06:19 how so Aug 25 01:06:29 Or set up an asynctask that blocks and then passes data, since you don't really want to block the main thread. Aug 25 01:06:53 an asynctask Aug 25 01:07:39 i just want a handler to an array in my fragment Aug 25 01:08:01 my fragment is a listfragment populated with the List array Aug 25 01:08:10 i need to manipulate it in my activity Aug 25 01:08:39 I think you're getting caught in tiny details. Aug 25 01:08:46 maybe Aug 25 01:08:59 could you help me out? Aug 25 01:09:32 I just basically told you what to do. I'm just operating on the assumption that you know what blocking means and what an asynctask is. Aug 25 01:09:57 Either that or have your fragment tell the thing it's ready, since it might all be on the same thread. Aug 25 01:10:09 im looking at the android page right now but not following Aug 25 01:10:14 for async task Aug 25 01:10:48 im assuming its an asynchronous thread that'll be able to launch after the fragmentCommunicator is set Aug 25 01:12:07 mniip, dunno, check bionic and see Aug 25 01:12:29 So here's the question you should probably ask: is your passData thing _really_ where it should be? Aug 25 01:13:43 Shouldn't your fragment be sending the activity a message saying "I'm ready" and then let it receive something? Aug 25 01:14:18 yes Aug 25 01:14:20 you're right Aug 25 01:14:32 a sort of handshake protocol Aug 25 01:14:45 but i do not know how to implement this Aug 25 01:15:30 essentially the app has a spinner and when an item is click the fragment will switch to the listfragment which then needs to populate the listr Aug 25 01:15:39 Then start studying, I guess? Aug 25 01:16:18 I have no plans to show you code for how to do anything, so it's probably in your best interest to start thinking about the tools you have to work with. Aug 25 01:16:35 any direction you can guide me in Aug 25 01:16:50 Pretty sure I already gave you one. Aug 25 01:20:38 refer to the reference docs, understand the lifecycles fully Aug 25 01:20:46 make use of callback mechanisms such as broadcast receivers Aug 25 01:20:56 that's all there is to it, really Aug 25 01:32:58 omg why is this so hard Aug 25 01:33:39 ive found the unicode font spec for it http://www.unicode.org/charts/PDF/U1D100.pdf .. but seriously there must be a font somewhere setup for this unicode set Aug 25 01:37:55 at last, found one Aug 25 02:01:28 could someone tell me please, how does the store work? What data is sent when you buy an app? Aug 25 02:03:00 Hello, I am using setCustomView to display something on ActionBar, but I would like to trigger onOptionsItemSelected when someone clicks a view inside the customview Aug 25 02:06:05 Nevermind Aug 25 02:15:37 compiling a renderscript generates the ScriptC_....class file in the build dir Aug 25 02:15:49 But I can't see anything in a 'gen' dir as mentioned at a lot of places Aug 25 02:34:35 when i kill an application from *window button* is onDestroy() called? Aug 25 02:38:56 Trying to setup the ADT bundle on windows 7 64 and it says that after you download and unpack you should be able to "Open the adt-bundle-/eclipse/ directory and launch eclipse." but I do not see an eclipse.exe Aug 25 02:44:12 ant is telling me it can't find View. Is there something I'm forgetting to import? Aug 25 02:50:43 Anyone know how the auto-generated R.java gets imported into a project? Aug 25 02:51:33 android build system's no joke... Aug 25 02:52:03 how does one build a specific subcomponent? Just want bionic and its linker as static-linked bins Aug 25 02:54:04 also get the sense i'm not setting up my env properly. it complains of not having libstc++ available, when i can see that the prebuilts have it. Building for x86 Aug 25 02:54:25 building aosp is a pain Aug 25 02:54:31 you can try make bionic from the top level Aug 25 02:54:58 basically, you look in Android.mk to get the name of the component Aug 25 02:55:00 then make that name Aug 25 02:55:21 basically, LOCAL_PACKAGE_NAME I think Aug 25 02:55:44 sanitypassing, android.view.View ? Aug 25 02:56:30 pfn: any idea if onDestroy() is called when i swipe the app from recent applications? Aug 25 02:56:39 vvu, typically, yes Aug 25 02:56:48 in my case it does not :( Aug 25 02:57:09 are you sure your app is still running at the time? Aug 25 02:57:21 your activity will usually have been destroyed long before Aug 25 02:57:25 pfn: thank you, will take stab at it Aug 25 02:57:55 and what is called when my activity is destroyed ? Aug 25 02:58:05 onDestroy Aug 25 02:58:13 my app is still running because when i enter it it calls onResume i think Aug 25 02:58:18 onDestroy is never called Aug 25 02:58:42 i have a good Log.d there and never prints Aug 25 02:58:54 need the basic bionic libs and an altered version of the linker as static bins. in an older version of bionic this was apparently possible, but this new build system is evil, and according to the linkers makefile does some magic to make it static after compile - so trying the build system instead of our makeshift makefile approach. **** ENDING LOGGING AT Sun Aug 25 02:59:58 2013