**** BEGIN LOGGING AT Thu Aug 08 02:59:59 2013 Aug 08 03:00:00 Yes sir Aug 08 03:00:05 [05:57] (benlieb) How can a background thread modify the UI even after the Activity is left and reloaded? Aug 08 03:00:12 runOnUiThread Aug 08 03:02:50 mniip: That...won't really work Aug 08 03:03:43 I just realized that .-. Aug 08 03:03:57 Brb Aug 08 03:04:21 do u rlly need java to program for android or is there any other languages that u could use ? (non Object oriented ?) Aug 08 03:04:46 you can do c++ via NDK Aug 08 03:04:55 unsecur3d: you really need Java. The one exception is when you're making a game or something and you're using entirely custom UI components. Aug 08 03:05:11 and generally (always?) openGL Aug 08 03:05:27 cocos2d-x is an example, and what I use Aug 08 03:05:34 even then you need a small amount of java. Aug 08 03:05:40 yep for sure Aug 08 03:05:40 unsecur3d, there's scala, but it's OO too Aug 08 03:05:44 and Aug 08 03:05:50 all modern programming is OO Aug 08 03:05:51 ok i rather learn java then Aug 08 03:06:10 i got started on it, but its confusing so i know it will take me a few months due to the time constraints, but w.e. better late than never Aug 08 03:06:11 unsecur3d, beleive me, i know what it feels like Aug 08 03:06:36 there is a project out there called py4a that attempts to run python on android but ive not managed to have a play with it yet Aug 08 03:06:41 if you're not making a game definitely learn java Aug 08 03:06:52 I mean...technically, you can use anything that compiles to Java bytecode and can call Java methods and extend java classes. But I don't think you'll get away without OO. Aug 08 03:06:54 yea i wanna develop my own apps for my tablet / phone, i know some oop (vb.net) but java is quite some language Aug 08 03:07:15 java programmers get paid too, lol i might as well Aug 08 03:07:18 :P Aug 08 03:07:25 ima chill here to learn a thing or two :) Aug 08 03:07:30 good developers get paid well Aug 08 03:07:34 whatever the language Aug 08 03:07:54 the documentation for android dev is unreal. it is very well documented Aug 08 03:08:13 java intro or that's once u got the basics ? Aug 08 03:09:59 at uni we jumped straight into android dev without learning java. programming is all concepts is just the implementation that differs language to language. Aug 08 03:10:00 unsecur3d: you should also join #java - they're better at teaching Java than we are :-) Aug 08 03:10:40 m3uk: I'd argue if you don't have any experience with C++-style OO you might want to learn Java first. Aug 08 03:11:09 (just to nail down the concepts) Aug 08 03:11:39 at uni we jumped straight into android dev without learning java. programming is all concepts is just the implementation that differs language to language. Aug 08 03:11:41 but Aug 08 03:11:42 java Aug 08 03:11:42 is Aug 08 03:12:04 it's the most OO-ed language Aug 08 03:12:09 everything is a class Aug 08 03:12:16 that becomes annoying as fuck Aug 08 03:12:26 eh. you get used to it. Aug 08 03:12:28 except the bits that aren't Aug 08 03:12:50 RyanM, of course if that's your first language Aug 08 03:12:55 but i know many others, Aug 08 03:12:56 It's much less bad on Android because you don't have main functions, which are really the biggest violation of sanity anyway. Aug 08 03:13:05 mniip: It wasn't :-) Aug 08 03:13:07 and java is always a synonym for shit, to me Aug 08 03:13:14 yh i can see that. we learned a bit of C#, C++, ASM then Android dev so a nice grounding has been given. Aug 08 03:13:23 ehm Aug 08 03:13:40 Is intelliJ a good IDE for android dev? I was using eclipse, but IntelliJ looks nice Aug 08 03:13:42 i started with pascal and c Aug 08 03:13:46 Yeah if you have C# experience Java should be a cakewalk. Aug 08 03:13:49 anything better? Aug 08 03:14:02 aztecmew: Ask 3 people and you'll get 4 answers :-) Aug 08 03:14:08 a lot of people in here like IDEA Aug 08 03:14:14 everyone has their preference Aug 08 03:14:24 RyanM, heh Aug 08 03:14:33 i still ise eclipse as I can't get used to the IDEA way of waking (and relearing all hte shortcuts) Aug 08 03:14:40 I hate Eclipse and want to hurl it out a window, but still use it exclusively... Aug 08 03:14:44 (ca't type today) Aug 08 03:14:46 what do you each of you guys use? Aug 08 03:14:52 neither can i Aug 08 03:14:53 lol Aug 08 03:14:57 RyanM, same boat for me Aug 08 03:15:02 I can't wait for Android Studio Aug 08 03:15:16 i use eclipse because it works Aug 08 03:15:22 mainly because Eclipse makes it bloody impossible to customize the build. Aug 08 03:15:31 i'm not sure how complex is it to set up android compiling on other IDEs Aug 08 03:15:34 I use eclipse i found the ADT bundle good however the virtual device is crap i much prefer sending it straight to a device Aug 08 03:16:04 m3uk: It's GREATLY improved if you use host GPU and the x86 images. Aug 08 03:16:09 m3uk, i doubt anyone who has a physical device would use AVD Aug 08 03:16:14 of course, those don't always work... Aug 08 03:16:14 i build with mvn, that works much better and has jenkins / hudson suppot Aug 08 03:16:33 mniip: It's still useful for testing on configurations you don't have. Aug 08 03:16:40 AVDs make sense to specifically test a physical configuration you don't have. but devices are better for general testing Aug 08 03:16:47 alex_PP: If only it worked well with eclipse... Aug 08 03:16:48 and VERY usefull for design/art Aug 08 03:17:13 almost does, only and roid library projects are broken for me Aug 08 03:17:13 RyanM, like what Aug 08 03:17:34 i mean, i have a 2.3.3 device xD Aug 08 03:18:03 mniip: You still want to test on 4.x devices, right? :-) Aug 08 03:18:17 RyanM, why Aug 08 03:18:33 i thought backward compat is more or less guaranteed Aug 08 03:22:54 more or less Aug 08 03:23:18 different screens is another thing you should be looking at Aug 08 03:23:27 and the bloody HTC cha cha Aug 08 03:23:39 but i think that's sage to ignore now Aug 08 03:23:41 *safe Aug 08 03:24:03 there are libraries that do alter behavior on different versions Aug 08 03:24:13 an example would be ActionBarSherlock Aug 08 03:40:06 So I halfassedly released an app that I totally forgot I made on the market awhile back... Now it has 100-500 installs and 4 star rating... Aug 08 03:55:46 damnit, why do my checkboxes ignore my colorstatelist and drawablestatelist in compoundDrawables and textColor Aug 08 04:03:08 oooo Aug 08 04:03:13 g00s: https://www.google.com/about/jobs/search/#!t=jo&jid=3274001& Aug 08 04:03:19 pfn: alarm bells ring with me there Aug 08 04:03:28 bug, look at bugs Aug 08 04:03:52 Leeds did you apply ? Aug 08 04:04:50 g00s: nah - firstly, I'm not an ops guy... and secondly, last time I applied for a Google job in HK, their first question, although it wasn't mentioned on the job description, was about languages, specifically Mandarin Aug 08 04:48:57 g00s, IO app's out Aug 08 04:49:08 alex_PP yeah, saw that! thank1 Aug 08 04:49:27 also, action bar compat. anyone tried it? Aug 08 04:49:40 pfn has been using it Aug 08 04:50:05 i get the impression it works ok Aug 08 04:50:37 Which action bar compat? Aug 08 04:50:47 Sherlock? Aug 08 04:51:39 google Aug 08 04:51:44 I missed that. URL? Aug 08 04:51:51 http://android-developers.blogspot.com/2013/08/actionbarcompat-and-io-2013-app-source.html Aug 08 04:52:56 Huh! Aug 08 04:54:37 I'm almost kind of sorry that we dropped 2.x support so I won't get a chance to try that out. Aug 08 04:59:23 jfpoole did you also drop GB ? Aug 08 04:59:48 g00s: Yeah. 4.0 only. Aug 08 05:06:41 thats great; the gradle test/check targets are optimistic and assume everything is fine from the get go. maybe it should consider it failed until passed :| Aug 08 05:07:03 or at least - not run Aug 08 05:09:59 I had the opposite problem with calabash. It would assume failure even in the face of success. Aug 08 05:12:59 jfpoole ah. i set my minSdk=14 by mistake with only my froyo device connected. when i did 'gradle connectedCheck' it would tell me all the tests passed, but it never ran any of them :| Aug 08 05:17:27 Oi. Aug 08 05:50:30 is there a way in gradle to do something like this: productFlavors { f1 { res.srcDirs = ['res', 'some/path/${currentBuildType}'] } }? Aug 08 06:13:28 maybe a better question is, can i structure my code like this: src/flavor1/debug/ src/flavor1/release/ src/flavor1/? Aug 08 06:30:47 smoak: theoretically yes, but don't ask me how (right now) Aug 08 06:38:18 p_l: i ended up creating a stackoverflow question about it: http://stackoverflow.com/questions/18119342/how-can-i-specify-per-flavor-buildtype-sourcesets Aug 08 06:38:44 feel free to answer when you get time ;) Aug 08 06:43:22 smoak: I don't really do groovy, so I can only give you vague idea - put a task that copies data from chosen file-sets (or simply "includes" them) into compile task and packaging tasks, iirc Aug 08 06:46:41 p_l so now, if you use gradle, a typical android project needs (n) developer(s) (n) designer(s) and one build master :P there is too much complexity Aug 08 06:47:12 g00s: nah Aug 08 06:47:37 g00s: a typical android project probably could do with standard build script with little tweaking Aug 08 06:48:03 the main problem with the gradle stuff, is that its not based on the java plugin so hardly anything works with it Aug 08 06:48:10 in my case the code I did wasn't exactly structured normally or followed certain normal ideas, so my tries at gradle slinging fail Aug 08 06:49:10 g00s: well, they push gradle for Android Studio... and IntelliJ is quite nice together with Gradle, once you grasp how the build configurations are managed Aug 08 06:49:23 personally, I could never grasp how Eclipse built stuff Aug 08 06:50:37 p_l do you have an idea, using plain idea, what the module setup would be like for a library project with instrumentTest setup in the conventional gradle structure? Aug 08 06:50:53 would you use one module for the project Aug 08 06:51:08 or two modules, one for main, the other for instrumentTest ? Aug 08 06:51:35 building and running from the command line Aug 08 06:51:41 but editing in intellij Aug 08 06:52:00 i had 2 modules before but it was complicated Aug 08 06:52:09 now, when i installed sdk 18, i removed sdk 17 Aug 08 06:52:22 and idea got totally fucked up; i had to delete the project Aug 08 06:52:29 so i thought i would try something else Aug 08 06:54:17 g00s: I haven't played much (yet) with how the android plugin for gradle works, but on pure IDEA approach, I'd probably go with multiple modules, and build from inside idea but with gradle Aug 08 06:54:43 g00s: you should have changed SDK parameters instead of deleting the project :) Aug 08 06:54:54 oh, i tried that Aug 08 06:55:07 believe me - it wouldn't pick up 18. i deleted idea's chaches Aug 08 06:55:17 everything. 17 was stuck there and greyed out Aug 08 06:55:45 i tried module / project / global Aug 08 06:55:45 g00s: then add a new SDK definition with API 18, remove the old one from project, add new one Aug 08 07:03:21 I think I got a message popup style that somebody had filed a bug report. I had to use the phone right then, so I navigated away from it. Now I can't find it again. Any idea where those reports are stored? I've checked the Play Store and Developer Console, but haven't found any. Aug 08 07:03:35 A bug report for my app that is... Aug 08 07:04:44 i wish there was something like i3wm for mac Aug 08 08:21:26 I am really tired of using a VM running Android to test my projects BUT my Nexus 7 has never been visible in my 64bit windows8 machine. it can charge obviously but can't see it as a storage device let alone an ADB device Aug 08 08:25:56 ?? Aug 08 08:35:05 I'm getting 'incompatible operand types' from this: entry.getValue() == 0 Aug 08 08:35:33 I don't understand the error. Aug 08 08:35:56 getValue() does not return an int type? Aug 08 08:37:14 kjeldahl: Incompatible operand types capture#4-of ? and int Aug 08 08:38:08 kjeldahl: https://gist.github.com/pixelterra/6182784 Aug 08 08:39:30 public abstract V getValue () Aug 08 08:40:15 benlieb, you need to cast value to an Integer Aug 08 08:40:32 alex_PP: how do I do that. Not so experienced w java Aug 08 08:42:04 alex_PP: Cannot cast from capture#4-of ? to int Aug 08 08:42:09 https://gist.github.com/alex-richards/6182805 Aug 08 08:42:16 if ((int) entry.getValue() == 0) Aug 08 08:42:40 you have to cast to Integer, int isn't a class type Aug 08 08:42:47 then pull the int from it Aug 08 08:42:55 see my gist Aug 08 08:43:45 alex_PP: Type mismatch: cannot convert from capture#4-of ? to Integer Aug 08 08:43:47 There is no need for "i.intValue()" in the gist "i == 0" works perfectly (auto-unboxing) Aug 08 08:44:07 i don't like auto unboxing Aug 08 08:44:49 alex_PP: Well you can write what the compiler does for you :) It's up to you Aug 08 08:45:05 i like to turn on the warning and be explicit Aug 08 08:45:21 no really strong reason, just looks wrong to me Aug 08 08:45:43 and in C, that's a pretty bad idea Aug 08 08:45:50 alex_PP: your code worked, but I really don't understand it. Aug 08 08:46:11 you first have to store it as an object type? Aug 08 08:46:16 is there a #define for gcc which indicates that i'm compiling in android? like __linux__ and __ANDROID__ or something? Aug 08 08:46:31 http://docs.oracle.com/javase/tutorial/java/generics/ Aug 08 08:46:35 http://docs.oracle.com/javase/tutorial/java/data/autoboxing.html Aug 08 08:46:43 those should help explain Aug 08 08:47:31 benlieb, you don't have to, just nicer to call getValue once Aug 08 08:48:00 and as the type of the map is declared as String, ? we don't know what value should be until we test Aug 08 08:48:02 rendar: It's probably easier to specify with -DPLATFORM_ANDROID or somesuch on the command line. Aug 08 08:48:04 I ended up calling like this; Aug 08 08:48:05 Object tmp = entry.getValue(); Aug 08 08:48:08 Integer percent = (Integer) tmp; Aug 08 08:48:15 why do I have to do that? Aug 08 08:48:22 Casting it in one go didn't work Aug 08 08:48:25 NDK might include macros that will let you autodetect the platform? Aug 08 08:48:36 Integer percent = entry.getValue(); Aug 08 08:48:43 you could do Integer i = (Integer) entry.getvalue(); Aug 08 08:48:52 jfpoole: hmmm, i see, i just wondered if NDK defined some macros, so i can detect it automatically Aug 08 08:48:52 the compuler should warn against that though Aug 08 08:49:08 ah yes Aug 08 08:49:18 don't do that though Aug 08 08:49:25 rendar: Looks like Clang will define __ANDROID__ Aug 08 08:49:37 jfpoole: oh great, what about gcc? Aug 08 08:49:44 you've no guarentee that value is an Integer Aug 08 08:49:48 GCC will probably do the same. Aug 08 08:50:03 and you'll crsh in the case that it isn't Aug 08 08:50:15 jfpoole: thanks Aug 08 08:50:16 read the two links i sent Aug 08 08:50:20 they should clear it all up Aug 08 08:52:15 Hi, how can you rotate a camera ( or preview) 90 degrees and working on every device? Aug 08 09:07:00 Excuse me. Does anyone know a "Push-Service" which is similar to gcm and not used by Google? It must be free, own implementation and unlimited push. I checked pushwood which looks great but it uses GCM as base :S Aug 08 09:07:42 Using GCM as base is the way to go as it makes sure you have the lowest impact on battery & perf Aug 08 09:08:02 yeah but using GCM means "sometimes" lagging or not available or other crappy shit which i want to avoid Aug 08 09:13:18 Hey! Anyone can point me in a good direction to start programming for android? I'm a java developer Aug 08 09:14:20 http://developer.android.com/training/index.html Aug 08 09:30:01 I'm looking to use oauth2 in my webapp/android app and need some help in doing it correctly Aug 08 09:30:37 I have the user auth'd in both and have the token, but it's completely different for the android app and what i'm receiving with my web app Aug 08 09:34:22 can i get help on dispatchtouchevent Aug 08 09:34:38 any body please Aug 08 09:37:08 i have a custome view on press of it i am showing a dialog Aug 08 09:37:26 and i am dispatching touch from the cutom view to dialog Aug 08 09:37:42 its workign fine for one cycle Aug 08 09:38:10 when again i press the custom view and dispatch it Aug 08 09:38:18 dialog is not taking any touch Aug 08 09:38:19 ? Aug 08 09:43:31 what do you mean by dispatching touch? Aug 08 09:45:20 SEjanthkar: For the dispatch to continue, you have to return true in ACTION_DOWN Aug 08 09:45:32 to store configuration for a widget, is the widget id unique during its existence? Aug 08 09:47:13 cyrilmottier, yup i am returning true Aug 08 10:18:20 Anyone got experience moving from Eclipse to Android Studio - Was it a good move? Stuff you miss from Eclipse? Aug 08 10:18:53 hi, is there an api to get the users Home/Work location that are set in Google Maps? Aug 08 10:20:50 I hope not Aug 08 10:20:56 and I don't think there is Aug 08 10:21:16 hm. I use AutoCompleteTextView, and I try to force it open with showDropDown(), but that function has no effect... Aug 08 10:24:30 anyone familiar with Android Studio - and if you can sanely merge 2 or more Projects together (where two or more pages/ui of an app have been developed on two+ different laptops). Aug 08 10:27:30 you should start using git to manage your projects Aug 08 10:28:30 it's made (among other things) for that Aug 08 10:29:11 for now you'll have to import files from one project into the other and fix issues manually Aug 08 10:32:48 eisbehr, danke (that was the answer I was expecting) Aug 08 10:46:27 hi. I have the sourcecode of a music visualizer from here: https://github.com/felixpalmer/android-visualizer . I can now visualize the mix output sound from my phone with that app. the problem is that in the current form, the update frequency is really low.. like the visualizer is lagging, sampling in a non-continous mode. I cant figure out how to increase the sampling rate of the Visualizer. It Aug 08 10:46:28 possible to obtain a better sampling over the sound data? I know that 'android.media.audiofx.Visualizer' has some limitations.. Aug 08 10:47:12 *Is it possible... Aug 08 10:56:07 What's the CPU usage? Aug 08 10:56:22 https://github.com/felixpalmer/android-visualizer/blob/master/src/com/pheelicks/visualizer/VisualizerView.java#L108 Aug 08 11:07:07 thank you alex_PP. I will set that Aug 08 11:08:54 it is working. I get much better framerate :D Aug 08 11:18:02 Hey Aug 08 11:18:18 I am build a voice command app Aug 08 11:18:52 Using the easy method with intents Aug 08 11:19:59 Now I want my app to listen permanently and when a MAGIC word is said, I would like to recognize the words spoken after that Aug 08 11:20:21 i think that'll drain the battery Aug 08 11:21:08 OKay.. Aug 08 11:21:23 mniip, And some push to talk button? Would that be possible? Aug 08 11:21:46 But not using the intent Aug 08 11:22:13 I want to be able to record longer sentences Aug 08 11:22:20 is that possible? Aug 08 11:23:15 push to talk should work, though you might have problems getting some buttons, especially in modern phones that lack usable ones Aug 08 11:24:36 But a screen button? Big, ol touch button? Aug 08 11:25:04 would work Aug 08 11:25:10 that's how Google's voice search etc. do Aug 08 11:25:36 p_l, mniip - yes, but I dont want the intent on screen Aug 08 11:25:58 I think I need to "record" audio and pass it to SpeechRecognizer Aug 08 11:26:22 May I record the audio in main thread? Aug 08 11:26:49 And only have SpeechRecognizer in a Background service? Aug 08 11:27:00 Or do I need 2 bg services? Aug 08 11:28:35 not sure, haven't played with taht stuff Aug 08 12:05:57 hi , i am making a android app which picks a incomming call if unanswered for a long time , and then plays a audio to the caller as "i am busy" , how to do that ? i have made a code to pick the call but cant figure out how should i play the audio file ? Aug 08 12:06:19 offhook: on many devices the second part is impossible Aug 08 12:06:36 yeah Aug 08 12:06:56 well, impossible without breaking radio license Aug 08 12:07:19 is there no way i can do that ? i just want to make a simple voicemail app which picks the fone receive a message Aug 08 12:07:20 some HTC devices did include access to voice path, though Aug 08 12:07:45 offhook: most phones have physical separation between telephone voice path and what the OS has access to Aug 08 12:08:39 p_l thanks a lot that was useful , but for making such a app is there any alternative so that i can tell the caller that now he can record his message ? Aug 08 12:09:30 not sure. In theory it should be possible to redirect for example to voice mail or something like that with a prerecorded message, but this depends on a) either your own telco infrastructure b) the operator the phone is connected to Aug 08 12:10:15 ok , i think i have to drop my million dollar idea then :( :( :( Aug 08 12:10:58 offhook: the problem is that on many devices, speaker/mic is connected to the modem directly, and when you enter "voice call", the audio data doesn't even physically go through the SoC on which android runs Aug 08 12:11:15 ok Aug 08 12:11:36 great knowledge you provided by the way p_l thanks a lot Aug 08 12:11:59 sometimes weird tricks work like recording at the same time and mic picking the sound from speakers, but... well :D Aug 08 12:12:31 but if we can record the audio of the user right ? Aug 08 12:12:46 offhook: not always. There's no guarantee such a trick would work Aug 08 12:13:00 but i see 1000's of such voice recording app Aug 08 12:13:06 in play store Aug 08 12:13:10 I heard of it working on some devices, but on some, the microphone becomes exclusive to modem Aug 08 12:13:29 offhook: and the common thing is that they work only on specific set of devices and OS versions Aug 08 12:13:30 ... and very few that actually work, except on some specific devices. Aug 08 12:13:43 for example older 2.x HTC ones Aug 08 12:14:12 and *only* on HTC Sense or certain custom roms that export certain device file that isn't part of any standard api Aug 08 12:14:56 why android restrict such feature ? is there a misuse or it makes hardware less costly ? whats the main use of doing this ? Nokia Symbian allows all this Aug 08 12:15:06 offhook: it's not an android thing Aug 08 12:15:21 Symbian's case is a bit different, and is also related to hw, not os Aug 08 12:15:47 many Symbian devices do not have separate modem chip Aug 08 12:16:08 ok Aug 08 12:16:31 got a good lesson today , now have to work on other ideas Aug 08 12:16:36 instead they use Symbian's hard-realtime support to run radio code on the same cpu as applications (something that is *always* separate on Android, for practical reasons) Aug 08 12:16:58 so the audio data in voice call actually passes through somewhere that application can touch Aug 08 12:17:35 Thanks again p_l Aug 08 12:17:39 np Aug 08 12:18:11 it's nice to explain such stuff to someone who actually reads (bad memories of modding forums here... and rent-a-coder) Aug 08 12:20:09 :) Aug 08 12:23:52 i just want to make a app which changes the front swipe panel of my android device, so is that a widget ? Aug 08 12:24:13 i want to give it a look of a windows panel Aug 08 12:25:29 Ziber_: you mean the homescreen? Aug 08 12:25:43 yes exactly Aug 08 12:25:56 https://play.google.com/store/apps/details?id=info.tikuwarez.launcher3 <--- like this? Aug 08 12:26:59 then yes, it's definitely possible :) Aug 08 12:27:03 (it's normal application) Aug 08 12:29:13 yes like that , so where should i start with ? right now i only know to make simple apps with icon and an activity Aug 08 12:29:49 Ziber_: launcher screen is essentially an activity that responds to a specific intent Aug 08 12:31:25 projects that dont ever freeze code for a realease make me :| Aug 08 12:31:32 how is this activity set without starting it ? yes i get it intent function , but to make the activity as a theme ? Aug 08 12:34:03 Hello colleagues. Aug 08 12:34:34 Can I /somehow/ make my UI use the layouts for -qwerty- explicitly? Aug 08 12:34:54 That is without attaching a keyboard. Aug 08 12:35:28 i don thtink you can Aug 08 12:38:00 mikedg: Really? Wasn't there some way to make an app use a default locale different than that of the system? Aug 08 12:38:19 If i'm getting cannot cast from Fragment to ItemViewFragment for this: ItemViewFragment itemFragment = (ItemViewFragment) getFragmentManager().findFragmentById(1); Aug 08 12:38:29 yeah, but who's to say the user doesnt have a dvorak keyboard Aug 08 12:38:39 and i'm implementing android.support.v4.app.fragment in both places Aug 08 12:38:42 actually i think you can force an internal keyboard for your app, i just havent done it Aug 08 12:38:43 what might I be doing wrong? Aug 08 12:39:04 flipture: getsupportFragmentManager I think Aug 08 12:39:40 ahhhh Aug 08 12:39:53 BING! thanks :) Aug 08 12:40:14 mikedg: Well... I would like to have the UI behave as if KB is attached, and -qwerty- is what I've seen in the logs, I was under the impression that that means a hardware keyboard is attached. Aug 08 12:40:19 we dont bing in here Aug 08 12:40:22 it's too damn early Aug 08 12:40:37 Lachezar: oh maybe I dont completely understand your problem sorry Aug 08 12:41:13 mikedg: My bad: I have a USB Barcode Scanner, that does not behave correctly, so I wrote a 'driver' app. Aug 08 12:42:06 mikedg: The problem is, that this way applications show soft keyboard. I'd like to make *my* applications handle this situation and behave as if hardware keyboard is attached (with the appropriate layouts used). Aug 08 12:42:26 mikedg: 'Cause my apps have different layout when a hardrware keyboard is available. Aug 08 12:43:44 mikedg: DING, i dont' really bing either... Aug 08 12:44:43 someone said they |binged| something the other day and I thought they ate too much of it Aug 08 12:44:46 in this case bing was short for bingo, not the crappy search engine that tricks people in their commercials to ping their search engine by not including the google image search results... Aug 08 12:44:56 LOL Aug 08 12:45:13 s/ping/pick/ Aug 08 12:49:26 when I extract the ADT on OS X, does it stay entirely self-contained? Aug 08 12:49:58 or does it need additional directories outisde Aug 08 12:50:57 self-contained Aug 08 12:51:07 well, it uses ~/.android Aug 08 12:51:12 and maybe ~/.eclipse Aug 08 12:54:55 this stupid mac needs an ssd badly Aug 08 12:55:51 Is it possible to restart the Wifi process (for example kill followed by start)? Aug 08 12:56:28 My Samsung Galaxy S2 gets a complete battery drain every now and then when I enable Wifi Aug 08 12:56:42 so I thought I could write a root app which kills the service when that happens Aug 08 12:56:47 :) Aug 08 12:59:50 how can i have a limit for ScaleGestureDetector Aug 08 13:01:17 Ziber_: basically, on start, Android fires an intent that homescreens have to respond to, and provides you a list of choices if more than one application responds Aug 08 13:04:29 I have an AsyncTask that doesn't seem to execute at all, and I can't see any reason why it shouldn't Aug 08 13:05:26 Maestro: how are you executing it? Aug 08 13:06:33 new DownloadNewsTask().execute();, almost just like in the docs Aug 08 13:10:32 I smell AsyncTask Aug 08 13:11:38 well it stinks as of right now, I'll tell you that Aug 08 13:12:02 there could be a prior asynctask in the asynctask executor pool Aug 08 13:12:16 it's a serial thing, there's only 1 thread available by default since android 3 Aug 08 13:14:09 bleh, logging window was completely messed up Aug 08 13:14:19 no wonder there's 0 output Aug 08 13:16:08 If i'm trying to do a getSupportFragmentManager().findFragmentById(R.id.DUNNOWHERETOSETTHIS) and i'm using a FragmentPagerAdapter to set up the fragments, now can i set DUNNOWHERETOGETTHIS? or the fragment ID i guess it would be called Aug 08 13:17:02 I'm reading that i can set it using FragmentTransaction but I am not currently using FragmentTransaction to do anything with my fragments. Would this be something that replaces the use of FragmentPagerAdapter, or something that I would set up along side what I'm doing now? Aug 08 13:18:52 Maybe i would set it in the fragment_pager.xml? Aug 08 13:22:10 flipture: not so easy to get a fragment out of a pageradapter. In onResume and onPause of the fragment I call a method in the activity to keep a reference of the currently visible fragment. Aug 08 13:22:57 why are you trying to pull the fragment out by id? Aug 08 13:23:34 you can still call getItem() on the fragment Aug 08 13:44:25 i have two activities, activity1 and activity2, both of them can call an asynctask. is there a way for the asynctask to know which activity called it, so it will know what to do next? Aug 08 13:45:58 if (activity instanceof Activity1) ... Aug 08 13:46:23 altho it might make more sense to abstract most your logic into a superclass asynctask Aug 08 13:46:53 the asynctask is a login to a place. i tried using a singleton like thing to hold whether or not they are logged in. activity1 checked the login and if it wasn't set, then startactivity to get the credentials and stuff. this worked, but i need activity1 to od something once they get logged in. This is where i'm stuck, because I don't know how to tell activity1 to go do stuff now Aug 08 13:46:54 and then call an abstract method where you need it which is defined in each of the individual activity's concrete implementation of the asynctask Aug 08 13:47:42 kc8hfi, better to send a broadcast and have whatever activity is currently listening respond Aug 08 13:47:55 or post to a handler to which both activities are attached Aug 08 13:48:38 kc8hfi: you should not store platform-managed objects anywhere. Do not pass activity or anything else as argument to it. Aug 08 13:49:52 you can probably send the class name of the activity if that's what you really want though, that should be safe. Aug 08 13:51:13 using an abstract function, and then defining it in the subclass. Hmm, ok. in the onPostExecute, this is where i would call said function. how does it know which class's functions to call? Aug 08 13:52:17 note that these strategies imply that you pass activity instance. Do not do this. There is no guarantee that once the onPostExecute runs, the current instance of the activity is the same as the activity instance asynctask has Aug 08 13:52:24 if i named this function loginOk, and then both activity1 and activity2 has a method called loginOk, the asynctask will call the loginOk of activity1 if activity1 was the one that created the async task? Aug 08 13:52:26 for instance screen rotation could have replaced activity in the meantime Aug 08 13:52:58 so any methods you call could say update view instances that aren't visible or something such. Aug 08 13:53:35 ok, so an abstract methond ain't gonna work, because you gotta tell the async task who called it. Aug 08 13:53:36 this is why pfn suggested a broadcast Aug 08 13:53:48 pfn: what about this broadcast stuff? any place i can go to find out how it works? Aug 08 13:54:04 context.sendBroadcast Aug 08 13:54:06 it's clunky piece of crap to deal with broadcasts and intents, but it is also more likely to work Aug 08 13:54:11 and you registerReceiver Aug 08 13:54:19 * pfn shrugs Aug 08 13:54:23 I use my own homerolled eventbus Aug 08 13:54:27 juse use an Observer Observable pattern to make a simple event bus Aug 08 13:55:05 https://gist.github.com/pfn/1838359 Aug 08 13:55:09 that's what I do :) Aug 08 13:55:26 I just use http://square.github.io/otto/ Aug 08 13:55:52 and I just attach partial functions to the bus to process messages I'm interested in Aug 08 13:55:59 gc takes care of deregistering listeners for me Aug 08 13:56:04 otto is cool, the only bad thing is super class can't be registered Aug 08 13:56:11 only the final subclass Aug 08 13:56:31 Yeah, there's that Aug 08 13:56:32 any examples of this stuff in use? Aug 08 13:56:39 I blame JakeWharton for not getting 2.0 done Aug 08 13:57:20 otto or guava's eventbus work fine Aug 08 13:57:31 But it's easy to use, so Aug 08 13:59:31 i got a basic understanding of how the FFT data is encoded and what the bytes[] array represents when having a call to public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate). But I find that in on the Android Developer pages, at the method description: "If Fs is the sampling frequency retuned by getSamplingRate() the kth frequency is: (k*Fs)/(n/2), n is the... Aug 08 13:59:33 ...capture size returned by getCaptureSize()" -> is that correct? from what I understand the max frequency shoud be 22.05kHz. from their example it goes to 44.1kHz... too much for human ears Aug 08 14:00:27 Hey, I'm trying to build an Android app, that uses a library that I made as well. I tried including my library (marked as a library project, in it's project's Android section), and referenced the library project in the app project (in the Library section, under Android in the project properties), but I can't resolve any of the classes found in the library project. Aug 08 14:00:51 I tried searching Google for a few hours now, but to no avail - none of the solutions offered there (including many on StackOverflow) didn't work for me. Aug 08 14:01:02 put it in the path Aug 08 14:01:08 Zgary, 16bit/44.1khz is standard audio sampling Aug 08 14:01:29 the projects tab of the build path section Aug 08 14:01:48 yes. but what will the k-th frequency represent. when k is one of the last bins? isnt that too much? Aug 08 14:01:59 * pfn shrugs Aug 08 14:02:03 dunno anything about that Aug 08 14:02:12 nseidm1 - I tried to do that, but then when I run the app it crashes upon reaching a section of the code that uses the library, with a "java.lang.NoClassDefFoundError" error, and that's after the initial run where it says: Aug 08 14:02:19 Isn't it because FFT needs twice the samplerate of the highest frequency it needs to encode? Aug 08 14:02:24 "library.apk" not found. Aug 08 14:02:56 from their page: (64*44.1kHz)/(128/2) = 44.1kHz?!? Aug 08 14:03:00 3 things. 1) mark the library as a lib. 2) Add to android section. 3) Add to build path. Aug 08 14:03:02 Then clean Aug 08 14:03:16 Then if all fails I always fall back on clenching really firmly Aug 08 14:03:42 Zgary: obviously the FFT array will not hold frequency higher than nyquist Aug 08 14:03:46 gives me "Could not find myLibrary.apk!" upon build. Aug 08 14:04:04 and crashes when reaching the library-using section in the code. Aug 08 14:04:12 this being a real-valued FFT, it's usually encoded so that the first element holds the real part of the 0th bin, and the second element holds the real part of the N/2 bin or nyquist Aug 08 14:04:22 the rest of the bins are then (real, complex) value pairs Aug 08 14:04:27 sounds like the lib is getting dexed Aug 08 14:04:49 what do you mean by dexed? Aug 08 14:05:02 clean the lib and ensure that it's marked as a lib in the android section Aug 08 14:05:08 the reason for this encoding is that the complex part for the 0th frequency and the N/2th frequency is always zero, so they can be packed this way Aug 08 14:05:09 just did Aug 08 14:05:10 still Aug 08 14:06:14 nseidm1: any screenshots I can provide that may help you help me? Aug 08 14:06:14 the reason why N/2th frequency can only be measured in one phase is that this component can vanish entirely under sampling as phase varies Aug 08 14:06:40 the array is of length 128 -> holds 64 frequencies. in range form 0 to 22.05 kHz I expect.... but I dont get it... Aug 08 14:07:07 Zgary: that is how it must be, though it holds 65 frequencies because what is on the first 2 elements are special Aug 08 14:07:22 you can just ignore the first 2, it makes no difference for musical data Aug 08 14:07:44 I'm sure I'm just doing/not doing something silliy that I can't figure out, or else this would be a more common problem. This is the first time I'm trying to build an Android library, and including it in another Android project, so it's just the learning curve I suppose. Aug 08 14:07:46 so what is the frequency of the last valid frequency data in the array? Aug 08 14:08:02 Zgary: 63/64 * nyquist Aug 08 14:08:30 the last one ? Aug 08 14:08:33 the 64th is stored as array element 1, and the 0th is stored as array element 0, and the 1 .. 63 are stored as real-complex pairs Aug 08 14:08:44 the highest one I want to know Aug 08 14:09:24 well I thought you mean "I access array index 63 * 2 and 63 * 2 + 1. What is in there? I answer, it is the bin denoting frequency range 63/64*nyquist Aug 08 14:10:17 Zgary: note that what you are dealing with in android is the real-valued fft. It is different from the FFT used for complex signals Aug 08 14:10:47 the reason for this is that complex FFT of real-valued signal has symmetries that can be taken advantage of to reduce the computational load Aug 08 14:11:16 so people came up with special FFT for real-valued signals which has this special way it is encoded, and it differs from the full complex FFT Aug 08 14:11:24 what in my code: (64*44.1kHz)/(128/2) = 44.1kHz is wrong? shoud the 63 bin represent such a high frequency? Aug 08 14:11:35 sorry for all this missunderstanding Aug 08 14:11:45 no, it can't. There is no frequency above nyquist in digital sampling Aug 08 14:12:19 (k*Fs)/(n/2) from Android Developer pages Aug 08 14:12:23 :( Aug 08 14:12:46 here Aug 08 14:12:47 http://developer.android.com/reference/android/media/audiofx/Visualizer.html#getFft%28byte[]%29 Aug 08 14:13:09 nseidm1: see PM please. Aug 08 14:13:46 when I need to allocate in order to load a bitmap; how do I handle the eventuality that this may OOM me? Can I check/reserve space in advance and handle failure gracefully? (eg. show a dead image instead). Aug 08 14:13:59 Zgary: there may be a mistake on the page in that case. Aug 08 14:14:13 cool D: Aug 08 14:14:20 the idea is that k is the bin number Aug 08 14:14:20 thank you Aug 08 14:14:53 I'm looking to use oauth2 in my webapp/android app and need some help in doing it correctly Aug 08 14:14:57 the capture size is probably the length of the array Aug 08 14:15:03 so ... it looks wrong to me Aug 08 14:15:36 I will consider k = 0: freq 0 and k = max: freq 22.05kHz. is that ok? Aug 08 14:15:37 they probably should have said k * Fs / n, where k is the bin number, n is the array length, and Fs is the sampling rate, or as I prefer to write it, k / k_max * (Fs/2) Aug 08 14:15:41 lhunath: just set the sampleSize based on the dimensions of the ImageView Aug 08 14:16:00 always catch outOfMemoryError, and increase the sample size to decode again Aug 08 14:16:10 I'm getting a different token for android and my app Aug 08 14:16:27 since the maximum frequency that fourier analysis can reveal is the nyquist, at Fs/2, at array index 1, and in one phase only. Aug 08 14:16:35 thank you for support alankila! Aug 08 14:17:07 nseidm1: fair! thanks. Aug 08 14:17:57 Zgary: the signal within a bin is not exactly for that frequency either. You typically have some degree of blurring of the signal because of the windowing function used by android FFT, which iirc is the raised cosine window Aug 08 14:18:13 but typically the FFT bin peaks at the frequency given by the expression Aug 08 14:18:51 hmm I'm pretty sure that it's the Hamming window in fact Aug 08 14:19:33 I did a mobile systems course at Uni last year. I forgot a lot of these things :)) Aug 08 14:21:38 I need all these to build a simple 5 bar equalizer. will I average the amplitudes on the first (max_bins / 5) bins ? is that a correct implementation for a bar visualizer with just 5 bars? Aug 08 14:22:15 use logarithmic scale for frequency and decide the number to average based on that. Aug 08 14:22:52 so for the first put frequencies from 0 to 63, then from 63 to 250, then to next put 250 to 1000 then to next 1000 to 4000, then to next 4000 to 16000. Aug 08 14:23:21 the reason for this is that it roughly approximates the mel scale at 5-bin resolution and many humans can't hear much above 16 kHz and in fact many sound encoding techs leave this part out too Aug 08 14:23:43 I see Aug 08 14:23:54 thank you! Aug 08 14:24:16 I guess you want to calcualte the length of the complex number at bin and then average the lengths Aug 08 14:24:28 yes Aug 08 14:24:37 after this, transform it to dB Aug 08 14:25:05 aaa... how? Aug 08 14:25:12 I guess the formula for that is log(value) / log(10) * 20 Aug 08 14:25:47 don't remember if multiplication by 10 or 20 was right for some reason... it depends what the value is Aug 08 14:26:04 thank you again. this really is your domain Aug 08 14:26:16 apparently factor of 10 is right when dealing with quantities representing power Aug 08 14:26:33 the length of the bin would be a measure of spectral power Aug 08 14:26:40 or energy Aug 08 14:27:14 still I would prefer to actually validate this, but don't feel like it Aug 08 14:27:50 in fact I'll do it, it's not a long program, should be doable in just scipy Aug 08 14:28:53 Found this: Aug 08 14:28:54 dB_val = 20.0 * log10(sqrt(re * re + im * im)) + dB_correction Aug 08 14:28:56 but you can save yourself a square root and do this: Aug 08 14:28:57 dB_val = 10.0 * log10(re * re + im * im) + dB_correction Aug 08 14:29:12 what is dB_correction? will I have to consider it? Aug 08 14:29:23 When using oauth2 for authing a user between apps do you compare tokens to ensure the user is correct? Aug 08 14:29:43 like store a token for app 1 and compare it to app 2 Aug 08 14:30:15 ah of course. The input to FFT is the amplitude. Aug 08 14:30:22 how do you build and run the sample for otto? Aug 08 14:30:43 If you correct for the scaling inherent in FFT, you will receive a vector representing the same amplitude after the real-valued FFT Aug 08 14:31:08 therefore, the quantity represents amplitude, not power after the length has been taken, suggesting that a factor of 20 should be correct Aug 08 14:31:28 What context should I change the configuration in: The Activity, The Application, The Base Context? Aug 08 14:31:45 thank you sound master :D Aug 08 14:34:54 any LXC expert? Aug 08 14:35:43 Zgary: note that if you are summing or averaging bins, I recommend doing the Math.sqrt() and then averaging and then using the factor 20 Aug 08 14:36:00 otherwise you're summing the squares and I'm not sure if there is a physically meaningful interpretation to that action Aug 08 14:36:32 the skipping of the sqrt is really a kind of hack Aug 08 14:37:23 there's also a recommendation I prefer to make to always use a small epsilon to avoid doing Math.log(0). You can set this epsilon to be 1e-10 or something such. Aug 08 14:37:39 Anyone have experience using oauth to just ident the user across apps Aug 08 14:37:41 once your floating point code produces a NaN, everything goes to hell Aug 08 14:38:37 for instance, it is customary to do peak detection on FFT meaning your output is dependent on the previous inputs, and once one of those previous inputs is NaN, it has a habit of making all future outputs NaN too Aug 08 14:38:50 then you debug why you can't see anything, and it's because everything in your history array is now NaN Aug 08 14:40:07 also since the FFT output is 8-bit quantity from the shitty android visualizers crap code, your visualization has a resolution of 48 dB. That's the best you can do Aug 08 14:41:13 yey Android :D Aug 08 14:41:28 thank you for advices. just starting to code Aug 08 14:42:46 pfn: any examples on how your eventbus works? Aug 08 14:44:11 is the OnFocusChangeListener supposed to fire more than once? when i tap an edit text i get a true -> false -> true -> false -> true Aug 08 14:49:32 Zgary: also consider the frequency ranges I suggested, 0-63, 63-250, 250-1k, 1k-4k, 4k-16k. You need to get k_max = 512 or more to be able to "see" in the range of 0 .. 63 at all. 22050 / 512 = 43 Hz. Aug 08 14:49:37 In Activity.onCreate() I call getWindow().setSoftInputMode(SOFT_INPUT_STATE_ALWAYS_HIDDEN), but the Soft keyboard is still shown. Aug 08 14:50:10 I would suggest analysis for 1024 bins in order to be able to comfortably classify the frequencies in these bins at some level of accuracy Aug 08 14:50:30 that would be analysis size of 2048. I don't know if android visualization code agrees to such a large FFT Aug 08 14:51:15 I will consider that Aug 08 14:51:50 these frequencies are often used in equalizers because they roughly coincide to the key frequencies in human hearing according to the equal loudness contours Aug 08 14:52:17 you can choose musically more meaningful values if you think you have better ideas, my default is to do 62.5 and then calculate 2 octaves forwards until reaching 16 Aug 08 14:53:26 the reason for 2 octave separation is that relatively simple 12 dB/oct filters can be used when separation is 2 octaves, there's enough separation to make the controls meaningful Aug 08 14:57:12 in general when just classifying music to 5 bins it might be possible to use a bandpass filtering scheme ... though it requires continuous audio input to be available for accuracy Aug 08 14:57:52 but just thinking out loud, it would be fairly easy to construct lowpass filters at key frequencies and then subtract the output of the lowpass filter from the input that goes to the next higher order filter and this way achieve a bandpass scheme. Aug 08 14:58:42 but it would require steep filters, so ... bah, it'd probably suck Aug 08 15:02:28 kc8hfi: mvn clean package Aug 08 15:03:17 Is there an *easy* way to use for example the Roboto Bold Condensed typeface? Aug 08 15:03:23 Without getting into code Aug 08 15:05:40 Hey, I made an Android library project, and an Android project (an actual app) to use it, but when referencing the library project (using any method from any class in it), it crashes the app, saying "java.lang.NoClassDefFoundError". I tried Googling the error and saw more than a few StackOverflow questions about it, but no solution has worked for me from what I can see. I should also note that I'm using Maven in the library proj Aug 08 15:06:07 Any help on the matter would be most appreciated, I've been searching for a solution or a few hours now, but to no avail. Aug 08 15:06:46 Also, referencing final static members does work from the library. so a SomeClass.SomeFinalStaticString does show up in a toast in the app if I reference it. Aug 08 15:07:12 I added the library by going to the app project's Android preferences and adding it in the Library section there, and then added the library to the build path. Aug 08 15:08:05 JakeWharton: dang, its downloading stuff off the internet..... Aug 08 15:08:09 JakeWharton: is that normal? Aug 08 15:08:15 how do I store configuration on a per-widget basis? Aug 08 15:10:22 Hey guys, anyone familair with CalendarContract ? Aug 08 15:10:45 i need to query all events Aug 08 15:11:10 but repeats only one time Aug 08 15:11:19 anyone knows this? Aug 08 15:17:22 kc8hfi: If its the first time you've run maven or the first time some of the plugins have been used then yes. Aug 08 15:17:26 How can I have a border on the bottom of a layout? for separation Aug 08 15:17:48 alankila. thank you for support. I did some code and got http://pastebin.com/raw.php?i=KN2SCc6H. all other dBs are 0 (the range is set to 64) . I play the file http://www.mediacollege.com/audio/tone/files/10kHz_44100Hz_16bit_05sec.mp3 . my dB[29] is the strongest (from my math 29 * 22.05Khz / 64 = 9.991 kHz). is this a correct result I get? Aug 08 15:17:53 JakeWharton: ok, anothe question, ANDROID_HOME is pointing to where the sdk is, and its complaining about not finding aapt Aug 08 15:20:30 ah the maven-android-plugin needs bumped to 3.6.0 Aug 08 15:20:40 Otto hasn't had any activity since they moved the build tools Aug 08 15:21:08 I noticed that aapt is inside build-tools/17.0.0 Aug 08 15:21:57 just pushed a commit to master to fix Aug 08 15:22:28 Is there any way to set default SoftInputMode for all Windows in an application? Aug 08 15:23:21 JakeWharton: I see. It built successfully after that, thanks. Aug 08 15:23:44 Zgary: it seems entirely plausible. Aug 08 15:24:15 Zgary: you should normalize the output so that the maximum peak is 0 and every other value is negative though Aug 08 15:24:30 you do this by dividing the length of the vector with the maximum value possible (128, I guess). Aug 08 15:24:54 in general FFT bin amplitudes should be between 0 and 1 Aug 08 15:25:08 though it's just customary to do so Aug 08 15:26:03 How do I exchange the token for the user info when using google oauth2 Aug 08 15:26:35 I ran GoogleAuthUtil.getToken and got the token that it returns but I need to get things like the uuid Aug 08 15:27:37 anyone know the best way to crop an image in android? Aug 08 15:27:59 thank you. i am testing with a desktop visualizer . foobar2000 Aug 08 15:33:48 I have a ListFragment which is using a CursorLoader, how can I adapt it to cache images and show them? Aug 08 15:37:20 Ankhwatcher: subclass SimpleCursorAdapteer and implement (appropriately) setViewImage(...) Aug 08 15:37:41 Lachezar: ah, cool thanks Aug 08 15:44:48 I'm using the drawerLayout with the listview for navigation. My listview contains 3 items. Is it possible to add a 4th item and place it at the bottom? Aug 08 15:45:34 Just put it below the listview Aug 08 15:45:36 FrancescoV: Add the 4-th item to the list's adapter and call notifyDataChanged() Aug 08 15:46:30 SimonVT, possible with drawerlayout? Aug 08 15:46:52 Lachezar: can't be de solution, this will add the item under item3, it must be at the bottom Aug 08 15:46:58 Sure Aug 08 15:47:14 DrawerLayout doesn't care what you have as the drawer layout Aug 08 15:47:30 Just put something that can have a listview on top and some other view at the bottom Aug 08 15:50:58 design question: I have a need to load a specific image as the background during the launch of the app. Under certain circumstances I need that background image to transition (animate sweeping left) to a different background before ultimately loading the rest of my UI (branding). Question: what container/widget should I use? I was thinking a Gallery, but I don't want the user to have any interaction with it: just a timed (delayed) sweep from one image Aug 08 15:50:58 to the other when the second image is required, otherwise just the initial background image. Suggestions? Aug 08 15:54:49 if you cant do something that simple on your own, can you really make an entire app Aug 08 15:56:40 zanberdo: sounds like a splash screen, no need for it on Android Aug 08 15:57:17 Anyone familiar with Android SQLite Aug 08 15:58:36 nseidm1, if it were my call I'd agree. It's not. we load our company background image while the initial view is populating before we display it. Our product is 'branded' for clients and in the case where a client has selected a custom icon image i need to display first our image then a sweep to the 'branded' image before the initial view loads. it's not a question of want but need. Aug 08 15:59:26 Use ImageViews and ObjectAnimator or a PropertyAnimation Aug 08 16:00:30 wtf... I just uninstalled my test apk but /data/data/my.test.package still exists Aug 08 16:00:38 so if I try to re-run tests I get a uid_changed error Aug 08 16:00:41 nseidm1, thanks. that's the sort of suggestion I was looking for. I thought the gallery might be overkill Aug 08 16:00:45 friggin' fail Aug 08 16:00:58 is there any way to nuke that data directory? Aug 08 16:01:30 I'm too lazy to boot into recovery to remove it Aug 08 16:02:30 W/PackageManager( 518): Couldn't delete native library directory /data/app-lib/com.hanhuy.android.irc.lite.test Aug 08 16:02:33 wtf Aug 08 16:02:48 fail! Aug 08 16:08:10 pfn what could cause that ? Aug 08 16:08:43 different debug keys ? Aug 08 16:10:56 dunno, not different debug keys Aug 08 16:11:00 but I'm getting a dexopt failure first Aug 08 16:13:12 g00s, getting a dexopt failure which causes the install to fail, then subsequent install retries fail Aug 08 16:14:07 http://pastie.org/8219048 Aug 08 16:16:39 * pfn headscratches Aug 08 16:18:22 hrm, interesting Aug 08 16:18:25 looks like my dex file is invalid Aug 08 16:18:36 Because scala Aug 08 16:18:45 SQLite, y u break Aug 08 16:18:45 D: Aug 08 16:18:53 I wish I knew more about SQlite before I started using it Aug 08 16:18:53 lol Aug 08 16:18:55 Brian|CS sqlite doesn't "break" :) Aug 08 16:19:42 Its all like Aug 08 16:19:54 "Couldn't read row 0 column 0 from cursor" Aug 08 16:19:55 and I'm like Aug 08 16:19:57 SQLite plz Aug 08 16:20:09 sounds pebkak Aug 08 16:20:31 *pebkac Aug 08 16:20:41 Maybe you didn't get any results Aug 08 16:20:43 SimonVT, because scala or not, a malformed apk shouldn't prevent subsequent installations Aug 08 16:21:00 SimonVT: If there are 0 results it showsnothing Aug 08 16:21:08 It's when the database gets abruptly closed it doesn't handle it properly Aug 08 16:21:11 pfn: I was just messing with you, haven't seen that issue before :p Aug 08 16:21:13 and I'm not sure where to handle it Aug 08 16:21:13 D: Aug 08 16:22:18 Brian|CS are you closing sqlite abruptly by ripping the battery out :P Aug 08 16:22:42 g00s: Nope :S Aug 08 16:23:11 Do you check if moveToNext/moveToFirst returns true before reading? Aug 08 16:23:43 Yes Aug 08 16:23:51 I check moveToNext first before reading the cursor Aug 08 16:26:48 * g00s curses at ncurses documentation Aug 08 16:28:14 https://code.google.com/p/android/issues/detail?id=58748 Aug 08 16:29:20 [info] INSTRUMENTATION_RESULT: longMsg=java.lang.ClassNotFoundException: Didn't find class "scala.reflect.ScalaSignature" Aug 08 16:29:23 * pfn headscratches Aug 08 16:29:39 but ScalaSignature isn't referenced anywhere in the dex, and the class in the dex doesn't even reference anything Aug 08 16:30:25 i'm going to call that the dex-squatting bug Aug 08 16:34:48 strangely, my test works on device, but fails on emulator Aug 08 16:34:51 * pfn headscratches Aug 08 16:34:57 what kind of test Aug 08 16:35:24 messing with instrumentation tests Aug 08 16:36:07 RadioGroup, y u only 1 column Aug 08 16:36:42 because it's a linearlayout Aug 08 16:36:54 whats a good way to set up gradle to use my release google maps api key (v1) for the Release buildType and my debug maps api key for the Debug buildType? Aug 08 16:36:59 But why Aug 08 16:37:01 why does Google hate me so Aug 08 16:37:38 because you touch yourself Aug 08 16:38:39 kids, play nice Aug 08 16:38:56 essentially i am looking at how to do this: http://stackoverflow.com/questions/18119342/how-can-i-specify-per-flavor-buildtype-sourcesets Aug 08 16:42:24 * pfn tries -keep public class scala.reflect.ScalaSignature Aug 08 16:43:56 excellent, that works Aug 08 16:53:11 this is an interesting comment regarding python on android, if i understand https://news.ycombinator.com/item?id=6180041 Aug 08 16:53:22 Why when I try to open a .hprof does it say i'm out of heap space Aug 08 16:53:24 what teh fuk Aug 08 16:53:24 so did Guido try to do this ? Aug 08 16:55:19 g00s: I highly doubt it Aug 08 16:56:53 Brian|CS, increase the size of your heap Aug 08 16:56:58 it takes memory to process heapdumps, yanno Aug 08 16:57:05 maybe it's my inherent mistrust of hackernews comments; maybe it's my belief that no language is perfect and any choice will have people insisting it's an idiotic decision Aug 08 16:57:33 I'd like to point out this: https://news.ycombinator.com/item?id=6179488 Aug 08 16:57:45 p_l: that too Aug 08 16:58:24 I love java vs. python Aug 08 16:58:28 with python, you have nowhere to go Aug 08 16:58:30 great, now he's moved on everyone feels free to blame arubin for everything :) Aug 08 16:58:39 I would have absolutely no choice of using scala on android Aug 08 16:58:44 or ruby Aug 08 16:58:46 or python Aug 08 16:58:48 or javascript Aug 08 16:58:56 worst, choice, ever Aug 08 16:59:15 and it's not like CPython is all that good when it comes to concurrency. Or GC Aug 08 16:59:25 yes, that, too Aug 08 16:59:37 at least with Dalvik we have chances of better GC Aug 08 16:59:47 on ios, you could conceivable break out of objc with haskell, etc. although no one ever really dares Aug 08 17:00:03 pfn: Shouldn't it be using my laptop's memory to process the heap dump though? I have 8GB and hardly half is being used Aug 08 17:00:03 :S Aug 08 17:00:20 Brian|CS, yeah, so you need to bump up the heap size of the app you're using to utilize your laptop's 8gb Aug 08 17:00:22 On iOS you also have RubyMotion Aug 08 17:00:58 pfn: well, I hope that we will see a faster native call interface one day + interface definition files that would let you link with the JVM code easily no matter the language Aug 08 17:01:52 pfn: So you're saying my Eclipse has the heap limit set too low basically? Thats what my first thought was Aug 08 17:02:01 but I didn't think it was natural that I would need to raise it Aug 08 17:02:34 Is there a way to access the heap size limit from the eclise GUI? Aug 08 17:02:46 Brian|CS, yes Aug 08 17:02:50 Brian|CS, edit eclipse.ini Aug 08 17:02:54 not from gui Aug 08 17:02:59 p_l, indeed Aug 08 17:03:04 p_l, that would be most ideal Aug 08 17:03:19 but arguing that python should have been chosen from the getgo is a bunch of bullshit Aug 08 17:03:38 the whole reason why android even started off as a popular platform is the massive java community Aug 08 17:03:39 pfn: I've been thinking of something like dexopt using LLVM to generate shared libs optimized for particular device Aug 08 17:04:20 of course, classic DVM+JIT would be still available, but it could for example generate binaries when charging Aug 08 17:06:23 ... but then I think that if I somehow ended up in android team doing such stuff, it might mean california, and that sounds like TOO DAMN HOT ;) Aug 08 17:06:28 pfn: I have 512m allocated in the .ini. Is it normal that I would need mor than that? Aug 08 17:07:31 i was just wondering about that comment; i wouldn't want to write android apps in python either Aug 08 17:07:37 Brian|CS, need m0ar Aug 08 17:07:45 Brian|CS, upwards of 1gb preferred Aug 08 17:08:00 p_l, california is awesome, and MV is far from hot Aug 08 17:08:04 mild climate year-round Aug 08 17:08:15 you get maybe 10 days of ~100F at most Aug 08 17:08:28 summers average 85F with no humidity Aug 08 17:08:31 pfn: hmm... maybe. Doesn't fix that it seems that you need a car to get anywhere at all, and well, USA Aug 08 17:08:33 less than that, even Aug 08 17:08:43 p_l, I don't drive right now, when I'm at home Aug 08 17:08:48 I get around by bike, and train Aug 08 17:09:14 Hmm... well, it didn't look too well on the map Aug 08 17:09:28 (sat photos too) Aug 08 17:09:56 in the end I was happy that I botched the google SET interviews :D Aug 08 17:10:13 Let's make sure my memory isn't shit, 1024m == 1 g right? Aug 08 17:10:28 if it was SDE I might have followed with greater zeal, but functional testing is taking life out of me Aug 08 17:10:31 Brian|CS: yes Aug 08 17:11:04 so -Xmx is the heap allocation max right? Whats -Xms? Aug 08 17:11:20 Brian|CS, start size Aug 08 17:12:21 Ah Aug 08 17:12:24 thats what I figured Aug 08 17:12:37 Man, this app uses up so much RAM lol Aug 08 17:12:43 Nexus 10 full screen bitmaps are HUGE Aug 08 17:12:51 yes, they are Aug 08 17:13:01 Brian|CS: that's why you have to minimize chances of overdraw Aug 08 17:13:01 1200 res screen? that's about 9mb each Aug 08 17:13:19 13mb I believe for the N10 Aug 08 17:13:21 if I remember correctly Aug 08 17:13:22 lol Aug 08 17:13:28 RGBA 8888 anyways Aug 08 17:13:59 and why android tends to have more janky UI than iOS, iirc, as someone explained here (something about iOS-provided widgets and framework in general being against alpha-blending) Aug 08 17:18:19 Bitmaps are dumb Aug 08 17:18:21 they always cause problems Aug 08 17:18:21 using gradle, I'd like to add a task as a dependency to all the bundle tasks Aug 08 17:18:30 like how I had to stop my app from leaking full sized bitmaps lol Aug 08 17:19:08 I'm trying to do that by iterating android.libraryVariants.each Aug 08 17:19:13 That doesn't sound like an issue with bitmaps.. Aug 08 17:19:27 try all instead of each Aug 08 17:19:44 the problem is that the collection is empty Aug 08 17:19:58 and when the next version of the plugin comes out, expect to debug it again :) Aug 08 17:19:59 unless I access it while a task is executing Aug 08 17:20:16 SimonVT: I didn't properly understand how the GC handles every element(E.g. Canvas, Bitmap, Activity, View, etc.) properly which was the real issue Aug 08 17:20:21 and I feel likemost developers never really learn that Aug 08 17:20:22 :S Aug 08 17:20:30 but since I'm configuring tasks I'd rather do that before the tasks execute Aug 08 17:20:33 cause everyone just assumes "oh, it's java, it can't have memory leaks" Aug 08 17:22:02 Brian|CS: that's common issue with language and CS courses Aug 08 17:22:51 Hey All, for a guy new to Android development (I've made a hello world, had a play with resources, programmatically changed text in a TextView, etc) - what tutorial or guide on the web would you recommend for speedy familiarisation? I've developed for iOS for a couple years and I've worked with Java in the past too. Aug 08 17:23:00 Yeah, I would hae been better off and had to spend less time at working learning to fix those issues if I had realized that beforehand Aug 08 17:23:00 :S Aug 08 17:23:38 Brian|CS: a fullscreen bitmaps takes 16 MB of RAM on Nexus 10 Aug 08 17:23:51 noob question: hi i am creating an app which not much more than a webview. I want the back button behave as in a webbrowser instead of closing the app. But know when you press back the app crashes. here the code that causes the problem: https://dpaste.de/y7A0O/ Aug 08 17:24:17 *now Aug 08 17:25:23 romainguy: Full screen as in covering all the screen real estate right? I meant like, not including the top and bottom bars Aug 08 17:25:33 I mean the entire screen Aug 08 17:26:23 exoplanet: include the stack trace of the crash too, please Aug 08 17:26:39 Oh yeah, that sounds right then Aug 08 17:26:46 I'm using not technically "full" screen Aug 08 17:26:49 exoplanet: but I can tell you that myWebView is null because you initialize the wrong one on line 12 Aug 08 17:26:53 I'm just using all the normal app space Aug 08 17:26:53 lol Aug 08 17:27:43 evanc~ any suggestion what is a better way to declare myWebView global? Aug 08 17:27:57 exoplanet: look at line 12 again Aug 08 17:28:28 you have one extra item in that line that's making what you want to happen, not happen. Aug 08 17:35:55 evanc~ i know it is wrong but i can't figure out why :( Aug 08 17:36:31 <|0xD34D|> exoplanet: *scope* Aug 08 17:36:40 exoplanet: on line 12, you're declaring a second variable, also called myWebView, which obscures the class variable "myWebView" Aug 08 17:37:09 exoplanet: also: there isn't a global concept in java; I suspect you're used to other languages Aug 08 17:37:41 I have this like overarching feeling that Ihave a small memory leak somewhere Aug 08 17:38:00 Because my app keeps slowly going up by like 1-2 mb in RAM when it should be increasing by maybe .1-.2 :S Aug 08 17:39:05 Also this is random but @romainguy, just curious, if you're comfortable sharing where do you work/what do you work on? Aug 08 17:39:25 I work at Google on the Android framework team Aug 08 17:39:30 Oh really? Aug 08 17:39:31 Nice. Aug 08 17:39:56 romainguy: Do you work in the bay area? Or one of the other offices Aug 08 17:40:02 I'm in Mountain View Aug 08 17:40:11 Ah, nice. I think thats wheremy roommate is interning Aug 08 17:40:21 romainguy: Met any interns named Matt? Aug 08 17:40:37 Google is a big place :) Aug 08 17:40:48 Yeah, I know Aug 08 17:40:58 so obvious… (╯°□°)╯︵ ┻━┻ thanks evanc Aug 08 17:41:01 i am impressed by how well they handle their size though. You know Les Vogel? Aug 08 17:41:16 Hes the dev rel guy for the Cast. hes the only dev rel guy right now apparently or something like that Aug 08 17:41:17 no problem, exoplanet Aug 08 17:41:39 but he stillanswered all of my stupid questionswhen I emailed him, and he always responded within like 1-2 minutes Aug 08 17:41:42 that really impressed me Aug 08 17:42:17 @romainguy: Do you ever do tech talks/recruiting? O.o Aug 08 17:43:08 I speak at conferences yes Aug 08 17:43:55 @romainguy: You ever do college visits? I know Google usually sends people out to UIUC a few times a year, and if you could ever make it on one of those trips I'd really love to have you come talk to the Android developers on campus Aug 08 17:44:31 They usually send engineers to the college they're from Aug 08 17:44:31 I'm starting a group for people to help guide people through learning basic android concepts and mobile application development in general, and I was thinking if I could get a couple badass guest speakers it would be pretty cool Aug 08 17:44:39 And since I'm not from the US… :)) Aug 08 17:46:22 Brian|CS become the badass, problem solved ! Aug 08 17:48:18 @romainguy: But they could make an exception, right? :D Aug 08 17:49:06 they should just arrange for your to get honorary degrees everywhere Aug 08 17:49:37 I think it'd be really cool to have you come talk to new/fledgeling developers. I mean, most new devs(and experienced devs too) are constantly reading things/googling things they want to do you know Aug 08 17:49:42 * mikedg gives romainguy an honorary degree in Hamster Engineering from Dg University Aug 08 17:49:43 and your content comes up a lot Aug 08 17:49:51 sounds like you can come speak at my birthday party next year now Aug 08 17:50:05 So if they see your content a lot when learning, and then you come talk to them, I think that has a big impact Aug 08 17:50:12 romainguy: since you apparently have nothing else to do, can you come fix my bugs? thanks! Aug 08 17:50:28 evanc: I can file more bugs for you if you want Aug 08 17:51:02 romainguy: excellent, but only if they're the type that I can dupe or close as not a bug Aug 08 17:52:03 any way to make sure a view is visible when the soft keyboard pops up? i have an edit text with some buttons below it that i want to make sure are visible Aug 08 17:52:16 https://code.google.com/p/android/issues/detail?id=18809 why have you not fixed this one yet? Aug 08 17:53:25 mikedg: Because you touch yourself at night. Aug 08 17:53:31 Working as intended Aug 08 17:53:32 Hopefully someone gets that reference... Aug 08 17:53:39 otehrwise i'll just look like an ass Aug 08 17:53:44 Brian|CS: i dont get it Aug 08 17:54:49 do I really need to publish one first apk to the play shop to be able to use alpha / beta testing feature of the google play dev console? Aug 08 17:55:22 I don't seem to be able to figure out how I could otherwise get opt-in link to be given to them Aug 08 17:56:03 tonic: Have you looked into that test flight stuff? Aug 08 17:56:25 no Aug 08 17:56:45 tonic: https://testflightapp.com/ Aug 08 18:15:39 Hey guys, I can't seem to get my NotificationListenerService working. I have confirmed that the service is running via onCreate() but onNotificationPosted does nothing and yes it is enabled in settings. I have my source code here, but I can't figure out what's wrong. Someone mind helping? Thanks! http://pastebin.com/fKnpciuS Aug 08 18:16:13 I also have it declared in my manifest Aug 08 18:16:28 did you enable/renable it after install? Aug 08 18:16:46 are you explicitly running it? Aug 08 18:16:56 I think I got it working (the official alpha/beta test thing) Aug 08 18:17:56 mikedg: I have tried explicitly running it, but it doesn't work whether or not I do. And I have re enabled it after install Aug 08 18:18:17 via startService(this, Notification.class); Aug 08 18:20:15 rather, startService new Intent(this,Notification.class); Aug 08 18:20:27 Hey guys, I was wondering how I'd be able to get the google account name of a device. I've tried AccountManager.Key_Account_Name but that seems to only get the auth token? Aug 08 18:20:28 *startService(new Intent(this,Notification.class)); Aug 08 18:20:54 CocoStorm: "google account name"? Aug 08 18:21:43 evanc, so like the device's gmail address Aug 08 18:21:49 http://developer.android.com/reference/android/accounts/AccountManager.html#getAccountsByType(java.lang.String) Aug 08 18:21:58 remember that some devices have multiple accounts Aug 08 18:22:02 or no accounts Aug 08 18:22:09 further reading: http://developer.android.com/training/id-auth/identify.html Aug 08 18:22:50 evanc: aren't you required to have an account? Aug 08 18:23:04 Nope Aug 08 18:23:13 since when? Aug 08 18:23:19 Since always? Aug 08 18:23:30 Huh, I always thought you needed a google account Aug 08 18:23:31 evanc, I see thanks I will check out the links. I was hoping to implement something similar to the contacts app where you get to choose where you'd like to store a contact Aug 08 18:23:38 ollienx: no, you can skip that Aug 08 18:23:40 You can skip the setup screen Aug 08 18:23:45 ah right Aug 08 18:23:51 Of course you can't use play store then Aug 08 18:23:55 So that might not be an issue Aug 08 18:24:10 if i could only get the soft keybaord not th cover up my "save document" button i woudl be so happy Aug 08 18:31:49 Hi Aug 08 18:32:05 Anybody has something to read about the process of adding a new (custom-built) device to Google Play? Aug 08 18:32:31 Not installing Google Play with fake device name - adding a new device to Play itself Aug 08 18:33:07 SiPlus: just drop GApps on it. If you want to distribute such a device, you need to pass compatibility screening with Google Aug 08 18:33:23 compatibility screening? Aug 08 18:33:29 p_l, more info please Aug 08 18:33:39 http://s.android.com/compatibility/index.html Aug 08 18:33:50 SiPlus: there's a suite of tests that yourd device has to pass in order to be licensed to ship with GApps Aug 08 18:33:56 the one that SimonVT linked Aug 08 18:34:15 Interesting Aug 08 18:34:16 Thanks Aug 08 18:39:11 Okay so I've succesfully added the contact to google account which is awesome but it doesn't store it to the device. Is it not possible to store on both? :S Aug 08 18:41:48 hey, is there a work around to support bold text and emoji? Seems like setting the textStyle to bold ends up breaking some characters Aug 08 18:47:26 anyone have much experience with loadDataWithBaseURL() ? Aug 08 18:49:03 webview.loadDataWithBaseURL() > Aug 08 18:55:02 Anybody have a good example of how to capture video frames without using MediaRecorder? I have a MediaCodec encoder configured and ready to encode the video data but I'm not sure how to hook in to get the actual video buffers. Don't know if I have to get it from Camera or Surface or SurfaceTexture or what. Aug 08 18:55:28 API level 16/17 max. Can't move to 18 yet. Aug 08 19:03:11 i have an AutocompleteTextView in an ListView in a DialogFragment. when it opens it gets focus, keyboard shows up, then the keybaord hides and it loses focus. any ideas? Aug 08 19:03:39 Ash__: just ask your question - people will answer if they can. Aug 08 19:04:19 wee, added instrumented testing to my plugin Aug 08 19:04:23 ? Aug 08 19:04:31 that is how it works Aug 08 19:05:55 Hey everyone! Just switched our FOSS proj to building with gradle and I'm suddenly getting two application icons generated from our .apk. Here's our build.gradle: https://github.com/OpenWatch/OpenWatch-Android/blob/gradle/app/OpenWatch/build.gradle and Manifest: https://github.com/OpenWatch/OpenWatch-Android/blob/gradle/app/OpenWatch/AndroidManifest.xml Thanks much! Aug 08 19:06:16 gradle fooey Aug 08 19:06:17 dbro awesome ! Aug 08 19:06:32 2 for the price of 1 Aug 08 19:06:43 pfn you need that feature Aug 08 19:07:02 g00s lol, yeah. users may agree Aug 08 19:07:22 ? Aug 08 19:07:48 how are you getting 2 appicons Aug 08 19:08:26 pfn I wish I knew. in top I see both icons launch the same package to the same activity Aug 08 19:08:35 ? Aug 08 19:08:41 hello all Aug 08 19:08:58 I was wondering if someone could be so kind to help me out a little please Aug 08 19:09:09 dbro, you mean you have 2 activities in the launcher? Aug 08 19:09:18 i'm making an android app Aug 08 19:09:20 dbro, that's simple, look at the output AndroidManifest.xml Aug 08 19:09:24 pfn, yes, apologies Aug 08 19:09:26 and i'm using some external jar libs Aug 08 19:09:35 dbro, and see why you have two tags with MAIN/LAUNCHER Aug 08 19:09:39 I want these to be compiled statically with my apk Aug 08 19:09:48 i followed a load of tutorials Aug 08 19:09:54 nothing seems to be working Aug 08 19:09:58 dbro, fyi, gradle builds merge manifests now, so if you have a lib project, it will pull it in Aug 08 19:09:59 dbro: You're not supposed to check in build/ Aug 08 19:10:07 https://github.com/OpenWatch/OpenWatch-Android/blob/gradle/app/OpenWatch/build/manifests/debug/AndroidManifest.xml#L96 Aug 08 19:10:15 08-08 19:04:43.939: E/dalvikvm(1122): Could not find class 'com.threadox.xyz', referenced from method com.example.test1.MainActivity.onCreate Aug 08 19:10:19 all I get is Aug 08 19:10:23 But that's the manifest your apk is getting Aug 08 19:10:32 SimonVT Ohhhh thanks! Awesome catch Aug 08 19:10:42 oops Aug 08 19:11:01 starting to kill me now Aug 08 19:11:04 that was easiest enough to figure out :p Aug 08 19:11:11 SimonVT also thanks a ton for reminding me to remove build/ Aug 08 19:11:24 from git Aug 08 19:11:41 ^_^ Aug 08 19:12:24 Also, dude.. You're using gradle.. Pull dependencies from maven central if possible Aug 08 19:13:08 also ignore .gradle Aug 08 19:13:23 Aye. I really like using submodules so I can inspect bugs in these libraries, fix em, and push back. Aug 08 19:13:28 g00s, got it Aug 08 19:13:31 thx Aug 08 19:13:51 I know ABS and android async is in central.. Play services is in a local repo in the sdk Aug 08 19:14:25 yeah, good call Aug 08 19:14:33 dbro awesome project man Aug 08 19:14:54 No need to check in .idea either Aug 08 19:15:00 SimonVT, but aar isn't in central, is it? Aug 08 19:15:18 thx g00s Aug 08 19:15:30 pfn, for ABS it is Aug 08 19:16:01 compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' Aug 08 19:16:30 dbro: Project.properties isn't used either Aug 08 19:17:01 about time, heh Aug 08 19:17:26 haha, don't need any reminders of the past.. Shuddderrrr eclipse Aug 08 19:17:35 Yeah, you also have a lot of eclipse files Aug 08 19:17:40 Remove all the things Aug 08 19:18:25 Just need the build.gradle files, then AS can open the project Aug 08 19:18:58 k Aug 08 19:26:03 bah, android studio for teh suck Aug 08 19:26:46 * pfn twiddles thumbs for intellij 13 Aug 08 19:45:16 So I don't get why match_parent and fill_parent are the same thing Aug 08 19:45:29 Like I'd assume fill would use remaining space, and match wouldmake the dimensions the same for width/height Aug 08 19:45:33 fill_parent is pre-API 8 Aug 08 19:45:40 match_parent was introduced because it's more clear Aug 08 19:45:47 it describes the behavior better Aug 08 19:45:55 they map to the same integer representation Aug 08 19:47:09 Like I'd assume fill would use remaining space <- Which was exactly why it was renamed Aug 08 19:47:56 hey guys, what's some good tech communities you recommend? Aug 08 19:48:01 Okay so I've succesfully added the contact to google account which is awesome but it doesn't store it to the device. Is it not possible to store on both? :S Aug 08 19:49:01 contact in google account should sync to device Aug 08 19:50:09 Ah Aug 08 19:50:10 Yeah Aug 08 19:50:13 I figured that as much Aug 08 19:50:22 It just still confuses me as to why it happened in the first place Aug 08 19:50:22 lol Aug 08 19:51:12 hey guys, what's some good tech communities you recommend Aug 08 19:52:20 pfn, But if I delete the contact from Gmail, it automatically deletes the contact on my device Aug 08 19:55:58 CocoStorm, that's the point Aug 08 19:56:10 pfn, oh :) Aug 08 19:56:18 okay, so I guess there's no problem then heh Aug 08 19:56:25 thanks Aug 08 19:56:48 it's synchronized Aug 08 20:07:30 JakeWharton / SimonVT: I think I'm still confused then. I thought if match_parent implied same height/width, then if you had a relative layout with 2 layouts inside it, and 1 is set to say 100 width, and the other is match parent, together they would be bigger than the whole parent Aug 08 20:08:32 weirdest thing ever. tap an edittext in a dialogfragment keyboard shows up then goes away Aug 08 20:08:55 Brian|CS: Exactly Aug 08 20:09:43 Hi, does anybody know how to pass jvm args to the compiler (android studio/gradle) i've looked at the java plugin that seems to suggest jvmArgs but android/java plugin seem incompatible Aug 08 20:10:07 GreySyntax i think in gradle.properties Aug 08 20:10:50 org.gradle.jvmargs Aug 08 20:10:51 OH Aug 08 20:10:56 you mean passing stuff to javac Aug 08 20:11:13 yeah, need to pass options to it Aug 08 20:11:24 weaver to be specific Aug 08 20:12:45 hmm, themes applied to a parent view aren't reflected on the child view? yuck Aug 08 20:12:56 GreySyntax i would imagine they would need to allow different jvmArgs to each flavor / variant Aug 08 20:13:01 You just found out now? Aug 08 20:16:11 g00s: fair enough :) Aug 08 20:19:55 * g00s will embark on his first gradle plugin Aug 08 20:20:26 i hope xavd publishes the api to the android plugin soon Aug 08 20:22:24 GreySyntax i'm still learning this, but you may have a way Aug 08 20:22:41 if you do android.libraryVariants.all for example, you will get a collection Aug 08 20:22:48 I love spending all day messing with gradle rather than doing real work Aug 08 20:22:55 maybe on that collection, access the javaCompile task and set its jvm args Aug 08 20:23:10 theTerry shit man, i spent all week Aug 08 20:23:16 quit using gradle... seriously Aug 08 20:23:30 what is > gradle. pls don't say maven Aug 08 20:23:33 sbt Aug 08 20:24:16 I have spent all day making sure that my .so files are getting into my build Aug 08 20:24:36 yay :p Aug 08 20:24:46 Hello. What would be the best way to send data from phone to chrome on desktop? I thought I could do it using GCM CCS and chrome GCM but GCM CCS is not publicly available yet. Aug 08 20:34:56 hey guys, looking for a strategy to update live data in PagerAdapter from a BroadcastReceiver Aug 08 20:36:45 should I create a fragment in the adapter and have it listen to intent dispatch or should I use the parent Activity to look for the view and stamp it w/ data? Aug 08 20:37:26 I'm using a CursorLoader, so may see race condition or misses Aug 08 20:40:20 umanx: What about GCM for Chrome? Aug 08 20:44:10 kjeldahl: I think that would work fine. I have absolutely zero experience with servers and need direction on how it can be done. What do I use for the server and where do I host it if I do not want to spend money on it. Aug 08 20:44:47 umanx: Linode.com or similar? Aug 08 20:44:51 $20/m Aug 08 20:44:52 Hi All Aug 08 20:45:22 Does anyone know a good reliable/robust image download/cache lib? Aug 08 20:45:32 volley Aug 08 20:45:44 or UniversalImageLoader which also works fine, although most people seem to go for volley. Aug 08 20:46:24 hmm, I wanna go to portola coffee lab again, that place is awesome Aug 08 20:46:58 man I hate the galaxy s2 Aug 08 20:47:23 Picasso also works. Aug 08 20:47:37 people still have the galaxy s2? Aug 08 20:47:43 kjeldahl: okay. I will look that up. Any idea what technology I should use for the server? Aug 08 20:47:44 What do I use for the server and where do I host it if I do not want to spend money on it. Aug 08 20:47:47 ack Aug 08 20:48:06 if you don't want to spend money on a server you're kinda screwed. Aug 08 20:49:05 pfn does volley also load and decode to Bitmap? Aug 08 20:50:43 umanx: That really depend on your skillset. If you're starting from scratch anyway, maybe Google App Engine has some tech ready and can host you for free. My preference, at least until something needs proper scaling, is node.js (using coffeescript). Aug 08 20:51:05 umanx: But I run my own (virtual) servers (Ubuntu). Aug 08 20:51:44 umanx: node.js behind nginx is probably more correct.. Aug 08 20:51:55 umanx: (which is what I'm using I mean) Aug 08 20:58:05 kjeldahl: okay. Thanks. Aug 08 21:16:52 How could I do a ListView for a shopping list app, if I want it to show categories and products in them? Aug 08 21:17:12 a custom adapter Aug 08 21:17:19 with a custom layout for an item Aug 08 21:18:36 monsti, yes, I know until that point. I have Category objects, each containing an ArrayList of Products Aug 08 21:18:50 But... What View should I really return? Aug 08 21:20:27 zyngawow: calculateMyCoolView(myCurrentObject); Aug 08 21:20:33 code that function ;) Aug 08 21:20:41 create x views for your producs Aug 08 21:20:48 and myCurrentObject will drive the content Aug 08 21:21:05 name/group/image/... Aug 08 21:21:33 zyngawow: You're navigating in two dimensions, categories and items. One listbox isn't going to solve that, unless it's ok to show ALL items, where category is just part of the view. Aug 08 21:21:47 (for each item) Aug 08 21:22:11 kjeldahl, I want to have something like this http://img.imgur.com/TpE6NTd.png , so I guess order matters Aug 08 21:22:27 Show maybe have a ListView for each category? Aug 08 21:22:33 no Aug 08 21:22:36 zyngawow: No, that's a regular list with headers. Aug 08 21:22:46 kjeldahl, thats a psd file I made Aug 08 21:23:35 Still, that's doable with a single listview I believe. Aug 08 21:23:58 "android listview headers" give quite a few hits.. ;-) Aug 08 21:24:30 listview with section headers probably even more specific to your needs. Aug 08 21:25:04 kjeldahl, yeah, thanks! Aug 08 21:25:22 i create my own headers with a custom view Aug 08 21:25:30 np gl Aug 08 21:25:37 If anyone cares: http://stackoverflow.com/questions/13590627/android-listview-headers Aug 08 21:30:17 ugh, Eclipse is stopped building the project -- what do I do? Aug 08 21:30:38 like it only generates resources but no class files Aug 08 21:30:46 even after clean build Aug 08 21:34:14 So, does GCM _on emulator_ require minimum API level 17? Works fine on 17 and 18, but not 15 and 16. Anybody know any docs about the requirements? I see some mention of level 8, which make me wonder why 15 and 16 fails consistently at my end. Aug 08 21:34:21 try closing eclipse and remove the bin folder Aug 08 21:34:46 there might be also a buggy xml file Aug 08 21:34:49 I thought gcm didn't even work on the emulator Aug 08 21:36:23 Seems to work fine (I've only tested "registering" so far though) on 17+, as long as it's a Google image and you add a google account to it. Aug 08 21:36:38 kjeldahl arm image, right? Aug 08 21:37:04 g00s: Yes, automatic when selecting the Google API stuff. Aug 08 21:37:31 kjeldahl does that have play services? i forgot these days Aug 08 21:37:53 Where should typefaces be stored? Aug 08 21:37:59 hey, still no api 18 x86 image Aug 08 21:38:28 g00s: Haven't tested, but can check tomorrow (my app use it). Bedtime here now. Nite all! Aug 08 21:38:31 And.. Can I use fonts such as Roboto Bold without having to use the ttf? Aug 08 21:38:34 some apps stoped working on 18 Aug 08 21:38:45 i really hate google :( Aug 08 21:39:00 gnight kjeldahl Aug 08 21:39:06 monsti what broke ? Aug 08 21:39:21 g00s: i am one of the android binding developers Aug 08 21:39:28 i had some breakage between 2.3 and 3.x Aug 08 21:39:40 i bet there will be some breakage between 4.x and 5 :P Aug 08 21:39:43 hehe I heard similar love for a Cupertino co in #iphondev Aug 08 21:39:45 and in some of our libs the binding to comboboxes fails :) Aug 08 21:40:07 null pointer foo "that sucks most" exceptions Aug 08 21:40:55 it might also be a order change on how events are processed Aug 08 21:41:17 android binding developer ? Aug 08 21:41:21 * monsti is upgrading to phonegap %) Aug 08 21:41:29 mvvm for android Aug 08 21:41:45 hi, i am developing an indoor navigation application for android. at the point where the map should be displayed on the screen, it returned blank. i was told to use api but do not know how to go about it. i am a beginner in android development. can someone please help? Aug 08 21:47:32 you sound like you're out of your depth Aug 08 22:00:31 is there a utility to fill up my sms inbox with test messages for debugging/testing purposes? Aug 08 22:03:10 smoak: any of those apps on random .ru sites will do that for you (of course, that's because they're sending messages to shortcodes and costing you a fortune but ...) Aug 08 22:03:56 lol i meant more of a ddms utility to send a text message similar to how you can make a "call" to an emulator Aug 08 22:06:10 sqlite3 and a rooted device ;) Aug 08 22:08:44 hi Aug 08 22:09:42 smoak: if you're testing your app with messages, just have a mock sms provider or something Aug 08 22:15:45 How can I have a 1px black line underneath a RelativeView? Aug 08 22:15:55 Just for ListView separator Aug 08 22:16:27 dont, use listView divider Aug 08 22:16:42 it has dimension and drawable Aug 08 22:19:02 Is it a good idea to use several colors (eg: http://img.imgur.com/TpE6NTd.png ) or just use one + white/black?= Aug 08 22:19:22 very odd question there Aug 08 22:19:31 too many variables to answer that Aug 08 22:19:53 Just to try and keep it Holo-ish Aug 08 22:20:05 Better.. would you say that UI looks nice? Aug 08 22:20:18 I'm a designer 1st, so yes Aug 08 22:20:41 well no Aug 08 22:20:43 not that UI Aug 08 22:20:56 Is there any way to specify Android libraries at absolute paths, instead of relative? Aug 08 22:20:58 there are colors there that are not complimentary Aug 08 22:21:03 First I was like YAY!, I finally made something look nice. Then you kicked me in the nuts :( Aug 08 22:21:13 well the idea is good Aug 08 22:21:19 the pallet is a bit off I think Aug 08 22:21:25 but that depends on soooo many factors Aug 08 22:21:40 Well, the list will obviously be longer Aug 08 22:21:47 And allow user to pick colors Aug 08 22:22:06 I'm referencing the appcompat support library, with "android.library.reference.2=../sdk/extras/android/support/v7/appcompat" in project.properties. Aug 08 22:23:27 I want to change that to "android.library.reference.2=${sdk.dir}/extras/android/support/v7/appcompat" (using the variable defined in local.properties), but doing so gives the following error: Aug 08 22:25:15 /XXXX/dev/android/sdk/tools/ant/build.xml:455: /XXXX/dev/android/sdk/extras/android/support/v7/appcompat resolve to a path with no project.properties file for project /XXXX/dev/android/myproject Aug 08 22:26:00 but there is a project.properties, and with the relative path it builds. Aug 08 22:26:34 <_genuser_> hello people. Aug 08 22:27:17 Hmm, it's in that is failing. Aug 08 22:40:47 is there a native db that can be used to store app data for android? Aug 08 22:41:10 sqlite Aug 08 22:41:10 bah, sorry, should have googled first. will search before I ask Aug 08 22:41:13 :P Aug 08 22:41:18 thanks :) Aug 08 22:44:09 <_genuser_> can I just create a dialog frame that extends from DialogFragment and in onCreate uses setContentView to setup a GUI? Aug 08 22:44:13 <_genuser_> or do dialogs not work like that? Aug 08 22:44:35 DialogFragment is just a fragment really Aug 08 22:44:39 in that way Aug 08 22:44:45 so yeah, you can do what you want Aug 08 22:45:53 <_genuser_> ok, I was going to create an Activity for widget configuration but I thought dialog might look better. Aug 08 22:46:20 well you can create an activity themed as a dialog Aug 08 22:46:38 and any fragmentDialog would have to hang off an activity with fragmentManager neways Aug 08 22:46:45 afaik Aug 08 22:47:21 <_genuser_> oh, I see. So it's better to create an activity then. Because in widget configuration I'd need to have an activity to pop a dialog. Aug 08 22:47:32 <_genuser_> so activity themed as dialog then. Aug 08 22:47:43 up to you really Aug 08 22:47:59 these are all design aspects Aug 08 22:48:46 <_genuser_> :). I was just going to put a black background with some transparency and white text. But it seems as it might be hard on the eyes. So I want options depending on how I feel after long use. Aug 08 22:56:14 somebody in here mentioned this the other day, i didn't believe it http://www.androidpolice.com/2013/08/08/bug-watch-android-4-3-running-an-app-that-watches-the-clipboard-will-cause-other-apps-to-crash-when-you-copy-from-them/ Aug 08 23:01:10 wow Aug 08 23:04:19 sounds like X11's XA_PRIMARY :p Aug 08 23:05:46 with X11, a window says that it owns XA_PRIMARY -- then when it receives a request for it, it responds Aug 08 23:05:49 How can I delete an UI element with code? Aug 08 23:05:58 delete? Aug 08 23:06:13 you can make its visibility View.GONE? Aug 08 23:06:14 zyngawow i take it you work for zynga :P Aug 08 23:06:19 Yes, I want it show for my products bot not for category Aug 08 23:06:31 g00s, not at all :P. In fact, I don't like the company Aug 08 23:06:37 products but* Aug 08 23:06:39 zyngalol Aug 08 23:06:58 i hope your mom didn't name you that then :) Aug 08 23:08:12 Not at all! Aug 08 23:08:21 Just random name I chose.. Aug 08 23:17:18 There's been no word on chromecast's release date in the UK so far right? Aug 08 23:17:26 g00s, zyngawow's name has confused me many times Aug 08 23:17:53 canadiancow, your name sounds familiar Aug 08 23:20:17 hello all together Aug 08 23:20:35 got a question regarding nested fragments and their communication Aug 08 23:20:48 fragments aren't allowed to nest Aug 08 23:20:55 it works but is unreliable Aug 08 23:20:56 they are Aug 08 23:21:16 really? I checked the docs at API 4.0 time and it said this is not allowed Aug 08 23:21:19 alankila: child fragment managers are a thing now Aug 08 23:21:25 they are part of the api and the support-lib too Aug 08 23:21:34 api 17 Aug 08 23:21:34 oh. Since when can one expect this to work? Aug 08 23:21:42 Still horrible! Aug 08 23:21:50 with support lib - down to 2.x ^^ Aug 08 23:21:53 zyngawow, it's because we've talked before Aug 08 23:21:54 https://developer.android.com/reference/android/app/Fragment.html#getChildFragmentManager() Aug 08 23:22:05 i used to work for zynga, and your name always confused me Aug 08 23:22:26 I don't really like my nickname Aug 08 23:22:33 Can't figure out a new one Aug 08 23:22:40 Hmh. I see. Aug 08 23:22:46 how about zyngagrrrr Aug 08 23:23:10 ok. the do work. but i'm trying to do some communication between the nested fragments and thats a point Aug 08 23:23:19 alankila i haven't tried nested fragments yet - i do my best to avoid complex behavior like that in the apis; good way of hanging yourself Aug 08 23:23:25 stumbled upon the getparentFragment() Aug 08 23:23:47 g00s: guess so ^^ Aug 08 23:24:16 always running in some complex stuff Aug 08 23:24:39 anyway - api says getParentFragment() delivers the nesting fragment - otherwise null Aug 08 23:25:25 but i get null although i am inside a fragment Aug 08 23:26:13 is there any difference between fragments created as part of a pageradapter or standalone? Aug 08 23:26:32 mine are located inside a fragmentstatepageradapter Aug 08 23:27:17 I am only nesting fragments by accident in my own code because I couldn't get not-fragment-based viewpager code to work for some reason originally but the fragment-based code worked automatically Aug 08 23:27:34 and the fragmentmanager's automatic handling of transactions for back button press was mildly advantageous so I took it and ran with it Aug 08 23:28:22 but now that they actually support it, it will probably break :P Aug 08 23:28:27 I don't even understand why fragments were suggested for viewpager by any code anywhere Aug 08 23:28:32 that isn't the use case for fragments Aug 08 23:29:02 Hmmm, or on second thought, it fits the pattern of "reusable view component" Aug 08 23:29:11 alankila: I have use for fragments in a viewPager Aug 08 23:29:11 but still, it could have just as well been any layout Aug 08 23:29:29 much use actually Aug 08 23:29:30 :) Aug 08 23:30:15 any idea, why this getParentFragment()-call inside my nested fragment gives me null? Aug 08 23:30:54 what really kills me though is that the system isn't recursive. Why the f does there exist a "child" fragment manager. Couldn't they just make it work without one. Aug 08 23:31:05 will there be a childchildfragmentmanager one day? Aug 08 23:31:09 Because it's not added using a child fragmentmanager Aug 08 23:32:31 hm Aug 08 23:33:11 Unless you created a custom pageradapter, it's not using a child fragmentmanager Aug 08 23:33:38 that's what i figuring out right now :\ Aug 08 23:34:04 any hint to get out of this situation? Aug 08 23:34:14 ok. custom.. Aug 08 23:35:27 cheers! Aug 08 23:38:41 * alankila is tempted to raise minSdk to 17 for droidsound and see what the newest API that I can personally run has to offer, if anything Aug 08 23:39:04 I should really burn the whole god damn codebase and do it again but this time with less retarded ideas Aug 08 23:39:48 lol alankila. That's pretty much how development works Aug 08 23:40:12 alankila nooo, second systems syndrome Aug 08 23:40:18 more like the opposite Aug 08 23:40:21 this is the second system Aug 08 23:40:39 I would kill most of the code and look for the least possible amount of crap that can just about accomplish what I want it to do Aug 08 23:40:42 howdy folks Aug 08 23:40:51 anyone know off hand of an open source vpn for android? Aug 08 23:41:01 or a MDM component. Aug 08 23:41:07 Gambit-: have sucessfully used built-in ipsec capability Aug 08 23:41:53 true. Aug 08 23:42:08 there was a nasty bug in ZipFile that I reported & google engineers fixed, one which prevented it from showing the index when the zip has > 32767 files Aug 08 23:42:36 that bug being gone I might nowadays just access zip files directly without iterating them with zipinputstream... Bad news is, I have no clue which version of android fixed that particular bug Aug 08 23:42:55 I only noticed it is gone nowadays and I run api 17 Aug 08 23:43:08 minSdk 18, better safe than sorry Aug 08 23:43:59 it's also interesting how different the harmony implementation for ZipFile was from openjdk. Such a total waste of engineering time, to have to reimplement every shitty thing just because someone thinks they can control what is open source anyway Aug 08 23:44:42 This whole software ownership thing can't die fast enough as far as I'm concerned. I'm almost sad that github nowadays strongly suggests you to pick a license after it was noticed that most projects carry no license and programmers don't give a fuck about them Aug 08 23:44:59 the license charade will carry on for some time longer, I guess Aug 09 00:08:41 hm, iTerm2 is pretty nice. was going to use tmux but this fits the bill Aug 09 00:09:51 * jug6ernaut loves iterm2 Aug 09 00:09:59 as much as someone can love a terminal Aug 09 00:10:27 :) Aug 09 00:10:47 i thought it was silly that Terminal.app splits pane, but on the same session :| Aug 09 00:11:21 * g00s got frustrated trying to get the mousewheel working in tmux Aug 09 00:16:32 you know, logcat is so full of spam, i wonder if i could filter it through spamassasin and then i wouldn't need any of these pid following scripts Aug 09 00:17:41 holy crap, i'm going to try this http://www.vanheusden.com/btail/ Aug 09 00:28:10 lol Aug 09 00:28:49 how the fuck does that work Aug 09 00:29:14 hehe Aug 09 00:29:20 'adb logcat|grep ClassName' is still my preferred way of doing it, though I've started to think that I should include a common prefix to all my log tags Aug 09 00:29:45 there were some better ways but they seemed so verbose that I promptly forgot about them, the old grep is easy though Aug 09 00:29:56 alankila works great if you have one class :| Aug 09 00:30:08 hence why I think I might want to add a common prefix Aug 09 00:30:45 the whole Log class though is so poor that it pisses me off every time I use it. I should probably start making some android utility library and just link it in everywhere Aug 09 00:30:54 i made a helper function static String getLogger(Class clz) { return "goos:" + class.getSimpleName()) or something like that Aug 09 00:30:59 with a log that works better, like get stack trace and determine the location of the log statement automatically Aug 09 00:31:24 it's slow but would be convenient, or a Log statement that runs with MessageFormat.format or String.format so actually logging values isn't pure shit Aug 09 00:31:28 alankila yeah, i mean really, log4j is like 10 years old Aug 09 00:31:39 they could have even considered some of the nice things about it Aug 09 00:31:41 alankila: I have a class that wraps the Log methods.. My tag is always the app name, message looks like [CALLER_TAG] message Aug 09 00:31:45 even if the impl was too expensive Aug 09 00:31:53 Cus intellij filtering is pretty limited Aug 09 00:32:28 and I really can't believe they throw out stdout and stderr messages by default Aug 09 00:32:50 the api should be something like slf4j using parameter expansion Aug 09 00:32:57 really, how hard is it to attach something to read those fds in zygote or whatever and then just echo them to log Aug 09 00:32:57 to minimize temporaries Aug 09 00:33:21 yeah slf4j would be fine except they messed up a bit Aug 09 00:33:24 alankila its little shit like this that makes things annoying :P Aug 09 00:33:48 they should have only one prototype that goes like info(message, Object... args) Aug 09 00:33:49 alankila you don't need to use slf4j-logback; slf4j is just a wrapper Aug 09 00:34:10 alankila oh, i thought they made that change recently Aug 09 00:34:19 they did? In that case I withdraw criticism Aug 09 00:34:40 I know I have had to write 'LOG.info("foo {}={}", new Object[] { x, y })' because sometimes it doesn't compile Aug 09 00:35:03 haven't *really* investigated as to why but I bet the overloads have been screwed up somewhere Aug 09 00:35:12 hm Aug 09 00:35:40 there's also overloads for Throwable being one of the argument iirc, which is another annoying thing, it is confusing with the Object... argument collection Aug 09 00:36:12 probably to make it possible to handle the common case of LOG.info("Error", e) in a catch Aug 09 00:36:43 but that makes it more difficult to handle LOG.info("Error: x", x, e) kind of case now :-/ Aug 09 00:36:50 should have been Error: {} though Aug 09 00:37:19 anyway enough of this. Everything always sucks and if I cared too much I'd probably die in 10 years from stress Aug 09 00:38:33 java could provide some handy way to resolve the desired argument expansion though :-/ more convenient than code that reads like (Foo) null which sometimes happen because null has no type and there are two overloads with different object parameter and so on... and the Object... or similar stuff sure is nice but again needs help sometimes Aug 09 00:44:34 alankila when they added log.wtf, i thought - ugh, couldn't they actually make a real improvement to this :| Aug 09 00:45:16 cute and professional :-p Aug 09 00:45:44 its retarded, because then android's 5 log levels didn't match to every other fucking logging framework Aug 09 00:46:01 6 then Aug 09 00:46:15 The page for Log even explains how bad the logging framework they have is Aug 09 00:46:23 JUL, commons, slf4j, logback, etc Aug 09 00:47:04 "Don't forget when you make a call like Log.v(TAG, "index=" + i) that when you're building the string to pass into Log.d, the compiler uses a StringBuilder and at least three allocations occur ... Aug 09 00:47:18 they even know their logging framework is crap and still don't have sane methods to do logging with Aug 09 00:47:49 oh I guess everyone fixes their Log.v shit up with proguard, so it's a nonissue. Motherfucker, they could have given templates from day one. Aug 09 00:48:51 alankila actually, only dexguard eliminates the temps made in the arguments Aug 09 00:49:03 haha Aug 09 00:49:16 if (BuildConfig.DEBUG) Log.v Aug 09 00:49:18 Problem solved Aug 09 00:49:32 isLoggable() actually Aug 09 00:49:40 Most of the time I avoid using strings and + together because it looks unwieldy. The whole idea is just so poor. Aug 09 00:50:08 its like gosling said, "shit … overloading operators … no, damn it but it looks so nice for this case" Aug 09 00:50:17 SimonVT: Log.v(TAG, "index={}", i) -> problem solved. If log.v is no-op, it shouldn't cause almost any work. Aug 09 00:51:11 in the worst case there could be a new Object[] { i } there though. Aug 09 00:51:42 The string concat in general has no guarantee that it is side effect free, I guess, so optimizing it out altogether if the string isn't used could be visible Aug 09 00:52:33 though I personally think that the compiler ought to be allowed to assume that string concat is side effect free and never throws exception with the possible exception of outofmemoryerror or something... but that's neither here nor there Aug 09 00:55:12 i havent written c in a long ass time; i think i got like 10 working lines of code today :/ Aug 09 00:55:46 if it was c++ probably 2 Aug 09 00:56:37 alankila didn't you work on an app that captured packages for shipment on dslr or something ? Aug 09 00:56:47 take picture of shipments Aug 09 00:59:28 yes Aug 09 00:59:35 it wasn't android stuff though Aug 09 00:59:49 oh, i thought it was android controlling a canon Aug 09 00:59:50 I had an idea of using android as camera until I discovered I could program canon cameras over usb connection Aug 09 01:00:12 there was some other guy who I think tried to do something like android being usb host controlling canon camera Aug 09 01:00:17 I don't know if that's actually possible though Aug 09 01:00:38 chainfire has a nice app. too bad i dont have a nice camera :) Aug 09 01:00:46 ah yes it was chainfire Aug 09 01:02:30 looks like it is possible on some hardware Aug 09 01:02:33 would work on my phone for instance Aug 09 01:03:21 still needs the packet-level protocol access somehow ... I guess libusb is used, that would be logical choice. Perhaps I should dissect this app a bit to see how it's put together Aug 09 01:04:58 anyway I implemented the most minimal subset of MTP I could get away with so I could do viewfinder display on pc screen (the camera has jpeg-compressing hardware and can send a jpeg image about 50 times per second), and I used opencv to display it on screen Aug 09 01:05:38 then the remote triggering was just about putting the camera to remote firing mode, doing the viewfinder jpeg image display, and then triggering and asking for the object that was created immediately Aug 09 01:06:10 cool :) Aug 09 01:06:18 the result was another jpeg transfer to the host, nothing mysterious to that, after which I close the remote firing mode and open it right again because I couldn't figure out how to delete that object Aug 09 01:06:36 the camera did not respond to my object deletion requests and would simply stall after about 60 pictures as the internal RAM filled up Aug 09 01:06:49 so it was ugly shit I did but whatever Aug 09 01:07:21 I didn't have any documentation either so the only way I could figure out what to do was to snoop a windows machine running the canon eos utility and then trawl the usb packet dumps looking for what's happening Aug 09 01:08:11 <_genuser_> interesting problem. In my widget configuration activity, I close it with a result setResult(RESULT_OK, resultValue); but the widget says, "Problem loading widget". Aug 09 01:08:12 there's also program called gphoto2 but it didn't actually work very well with canon eos cameras but I used what I could gleam from that crap. Aug 09 01:08:12 now you could use one of those samsung nx cameras with android in it Aug 09 01:08:26 <_genuser_> anybody got any ideas on how to debug? LogCat shows _nothing_. Aug 09 01:09:55 also canon eos cameras are flaky as hell... if you have camera connected to laptop and either the pc power supply can't supply enough current at stable voltages, or the camera's own battery is starting to run out, it begins to show random flakiness and crahses Aug 09 01:10:45 customer refurbished second hand laptops for use with my software and they had an issue on 3 machines out of 4 and it was discovered that whichever laptop had the 4ths power supply worked reliably Aug 09 01:10:49 :-/ Aug 09 01:10:58 alankila: irrelevant really, cause you would not be active with a low low battery Aug 09 01:11:02 or I never am Aug 09 01:11:18 also I have spares and double bat grips :) Aug 09 01:11:35 but cameras can be connected to mains power instead of battery, and the customer replaced the low-power PSUs, and the problems ceased Aug 09 01:11:50 never had any at all Aug 09 01:11:53 but man, what a nightmare Aug 09 01:11:58 remote shooting always fine Aug 09 01:12:12 dell/apple/asus laptops etc Aug 09 01:17:22 in gradle, when you say buildToolsVersion "x" , does that mean x* - for example "17" works with "17.0.0" "17.0.1", "17.1" works with "17.1.0" and "17.1.1" but not "17.2", etc Aug 09 01:17:42 i see a lot of inconsistency Aug 09 01:19:50 there are sufficient differences in build tools that this sort of thing matters? Aug 09 01:20:02 I should probably try to get informed with what's going on with android these days Aug 09 01:20:59 alankila yeah, for example gradle plugin 0.5.5 had a hard dep on gradle 1.6 Aug 09 01:21:13 also no they have 2 versions of the build tools in the sdk manager Aug 09 01:21:24 in case you update and it breaks, you can revert easily Aug 09 01:21:41 yeah I noticed but am a bit confused about what has changed so much Aug 09 01:21:49 but it sounds like all this relates somehow to the android studio Aug 09 01:22:14 i'm just using gradle command line atm Aug 09 01:22:18 It relates to sdk updates not breaking builds (as it used to do) Aug 09 01:22:57 but yeah, AS would depend on some version of the gradle plugin, which then depends on soe version of gradle; and AS could itself depend on some version of gradle : Aug 09 01:24:38 i think writing windows device drivers was easier Aug 09 01:24:55 android is one of the more complicated platforms i've used Aug 09 01:27:58 g00s: google is a complex creature Aug 09 01:28:22 indeed Aug 09 01:29:00 especially with sundar pichai at the helm of android now Aug 09 01:30:37 i still expect chrome to be google's long term vision for computing Aug 09 01:31:10 it seems more likely now than ever- that chrome will eventually dominate android Aug 09 01:31:34 i agree Aug 09 01:31:48 especially due to sundar pichai Aug 09 01:32:02 They took the guy managing Chrome and added android to his dominion Aug 09 01:32:28 I'd wager that at someone we see an android/webos hybrid Aug 09 01:32:48 we're all going to be doing pnacl soon ... Aug 09 01:33:14 That being said, I don't think AOSP is going anywhere Aug 09 01:34:13 i'd bet we would still see it proliferate in devices like cameras, etc Aug 09 01:34:25 Well, Samsung is still making a killing on Android Aug 09 01:35:41 And there really isn't much way to customize chromeOS, so either they would continue developing android with fewer releases (heh), or they'd build on tizen instead Aug 09 01:36:09 You also have plenty of open source projects that build on AOSP and will likely be more involved, such as cyanogenmod Aug 09 01:37:52 even in that instance, developing android apps using dalvik would still make sense- seeing as tizen can run android apps Aug 09 01:38:26 it can ? i didn't realize Aug 09 01:39:07 yep: http://openmobileww.com/products.php Aug 09 01:39:23 eang Aug 09 01:39:26 wangs Aug 09 01:39:36 tizen meh Aug 09 01:40:28 seitensei ron_frown is building frownOS Aug 09 01:40:37 * seitensei frowns Aug 09 01:40:38 hah Aug 09 01:40:57 maybe I will, maybe I wont Aug 09 01:41:03 maybe goosOs sounds better Aug 09 01:41:13 gl is heavily dependent on x Aug 09 01:41:21 gles not so much Aug 09 01:50:52 http://gist.github.com/6190533 i know im missing a resource here.. how can i tell what it is? Aug 09 01:52:33 acidjazz: I'd read "Resource ID #0x0" as being an attempt to use a null resource Aug 09 01:54:07 yea i just wanan know what it is Aug 09 01:54:09 or... to use an int which hasn't been set... that sort of thing, anyway Aug 09 01:54:19 its def a missing xml file/entry Aug 09 01:55:54 R.raw.beep Aug 09 02:01:51 I am getting a large negative number back after calling getPackedPositionForChild() Aug 09 02:06:43 acidjazz: sorted? Aug 09 02:10:40 think so.. new one.. https://gist.github.com/6190617 Aug 09 02:11:00 http://goo.gl/Wv5cU6 ExpandableListView.getPackedPositionForChild(int groupPosition, int childPosition) I give a value 3 for groupPosition and 0-64 for childPosition, get back a large consistent negative number which get me 3 after passing it to getFlatListPosition Aug 09 02:11:20 maybe, AOSP bug ? Aug 09 02:16:16 How can I add a button to the bottom of this ListAdapter when the GUI was not done in xml? I have googled but all showed me with the Activity done in xml. https://github.com/BullShark/AndroidTutorial/blob/master/AndroidTutorial/src/ch/expectusafterlun/androidtutorial/Menu.java Aug 09 02:26:52 Hi, I'm wondering if anyone here knows if it's possible for my app to insert text into an text field in another app. Aug 09 02:28:32 NigglyWiggly i'm betting not Aug 09 02:28:55 That's what I was anticipating Aug 09 02:28:58 s/was/am Aug 09 02:29:16 NigglyWiggly: what would be use case of that ? Aug 09 02:29:23 just interested :) Aug 09 02:30:31 aunn: what do you think a PackedPosition is? Aug 09 02:30:50 I'm working on an app where the user can type a phrase or something and then the app sends a notification that the user can click on to get to those phrases quickly. Right now it just copies the phrase to the clipboard, but I was hoping that it would be possible to simply stick the text in whatever app was running. Aug 09 02:33:05 you *might* be able to do that with accessibility stuff? Aug 09 02:33:23 That's true Aug 09 02:33:30 Research tiem Aug 09 02:36:31 Looks like it might be possible Aug 09 02:36:59 Leeds: a PackedPosition is a single number representing both the groupPosition and childPosition, then you use that with getFlatListPosition to get the standard int position so that you can call standard ListView method Aug 09 02:37:10 let me know if I am wrong Aug 09 02:38:36 I'm getting to grips with Navigation Drawers. Am I correct to assume that generally when implementing a Navigation Drawer, the app will end up with only have a single Activity (the one containing the drawer), and everything else becomes Fragments? Aug 09 02:39:23 Or are there some general use cases for having multiple Activities each with their own Drawer? Aug 09 02:39:48 The way I did mine was I have a FragmentActivity and then each "drawer" was a Fragment Aug 09 02:40:23 * str4d is using an ActionBarActivity (subclass of FragmentActivity) for the MainActivity to support down to API 7 Aug 09 02:41:05 I think that since it's a subclass it should work Aug 09 02:41:34 The app I'm working on was previously a collection of Activities, joined together with buttons and Intents. I want to move the navigation from buttons to a NavigationDrawer. Aug 09 02:53:41 I'm sending images to a server for processing via a POST request, and I want to communicate the results of that processing back to the Android device. Is the best way to go about that creating an input stream that waits for a complete response? Will a lot of those input streams bog down the system? Aug 09 02:58:44 wow, Silent Circle shutting down their email service **** ENDING LOGGING AT Fri Aug 09 02:59:59 2013