**** BEGIN LOGGING AT Tue Dec 18 02:59:58 2012 Dec 18 03:21:58 Guys, I have some weird behavior on my device. I give the app the accelerometer sensor. But as soon as I start moving the device, the program crashes Dec 18 03:23:21 https://gist.github.com/4324732 Dec 18 03:24:24 wilornel: com.example.road.DataFragment.onResume(DataFragment.java:70) Dec 18 03:24:34 something is null at line 70 of DataFragment.java. Dec 18 03:25:31 mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_NORMAL); Dec 18 03:25:59 Im not giving him a gyroscope sensor anymore, because my device does not have one Dec 18 03:26:08 im giving it an accelerometer Dec 18 03:26:22 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); Dec 18 03:26:38 is that good michaelnovakjr? Dec 18 03:26:54 wilornel: if you have an IDE why not set a breakpoint and inspect which variable is null at that line? Dec 18 03:27:09 good idea Dec 18 03:28:52 it crashes without even stopping at the breakpoint Dec 18 03:30:02 how can breakpoints even work if the device has its own app in itself and I have some ide which doesnt control the device Dec 18 03:30:23 huh? Dec 18 03:30:43 are breakpoints supposed to stop the activity of the app on my device? Dec 18 03:30:50 your IDE connects to your device over USB Dec 18 03:31:08 That I know, its used to send the app to the device Dec 18 03:31:11 wilornel: yes, it you select debug instead of run. Dec 18 03:31:20 thanks Dec 18 03:31:22 "sufficiently advanced technology" Dec 18 03:39:18 the app is constantly trying to resume... Dec 18 03:39:44 ? Dec 18 03:40:03 lol Dec 18 03:40:18 it seems like the resuming does not work... Dec 18 03:40:24 that is obvious, I know Dec 18 03:40:25 but! Dec 18 03:40:44 the value of 'this' is :DataFragment (id=830007836240) Dec 18 03:41:11 mGyroscope: Sensor (id=830007860584) Dec 18 03:41:33 and well SensorManager.SENSOR_DELAY_NORMAL is a constant, right? Dec 18 03:42:00 yes? Dec 18 03:42:11 then there is nothing that is null in my method call Dec 18 03:42:21 mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_NORMAL); Dec 18 03:42:41 i clearly joined this at the wrong time to understand anything Dec 18 03:42:44 michaelnovakjr, what's going on :) Dec 18 03:42:53 Im trying to run an app Dec 18 03:42:59 its giving me a nullpointerexception Dec 18 03:43:13 so I decided to debug it Dec 18 03:43:35 wilornel: what about the mSensorManager? Dec 18 03:44:11 I should use mSensorManager.SENSOR_DELAY_NORMAL instead? Dec 18 03:44:50 it says: The static field SensorManager.SENSOR_DELAY_NORMAL should be accessed in a Dec 18 03:44:51 static way Dec 18 03:45:01 wilornel: I'm saying maybe that is null. Dec 18 03:45:15 mSensorManager or SensorManager? Dec 18 03:45:23 Actually there is no SensorManager variable... Dec 18 03:45:50 wilornel: mSensorManager ... is a variable you have there. Dec 18 03:45:58 you call registerListener() on it... Dec 18 03:46:02 yo Dec 18 03:46:03 okay Dec 18 03:46:04 stack trace or gtfo Dec 18 03:46:13 yo what? Dec 18 03:46:14 canadiancow: past that point. Dec 18 03:46:18 oh Dec 18 03:46:34 k im going back to sleep Dec 18 03:46:38 you're in good hands wilornel ! Dec 18 03:46:39 good night Dec 18 03:46:52 canadiancow arent you a worker at google? Dec 18 03:49:14 omg I have no skills in this at all Dec 18 03:49:28 Im trying to relaunch my app but it launches at the wrong activity... Dec 18 03:50:36 wilornel: you've lost me. Dec 18 03:51:24 okay never mind got it working, I think I was debugging while I was trying to run the app.... Dec 18 03:51:30 how to end a debug session Dec 18 03:51:30 ? Dec 18 03:52:42 there should be a stop button somewhere in your IDE. Dec 18 03:52:45 press stop Dec 18 03:52:46 LOL Dec 18 03:52:51 alright alright Dec 18 03:54:17 Everything seems alright Dec 18 03:54:23 all the variables have an ID Dec 18 03:54:53 except for the SENSOR_DELAY_NORMAL, I dont know, should I do: mSensorManager.SENSOR_DELAY_NORMAL, or SensorManager.SENSOR_DELAY_NORMAL, without the m? Dec 18 03:55:33 wilornel: do you know what that 'm' means? Dec 18 03:55:46 its my variable Dec 18 03:55:55 there is the SensorManager class Dec 18 03:56:02 and there is the mSensorManager object Dec 18 03:57:11 wilornel: mSensorManager is your instance of the SensorManager. Dec 18 03:57:14 yes Dec 18 03:57:19 so what do I use for the constant? Dec 18 03:57:26 Im supposed to use SensorManager, right? Dec 18 03:57:29 it is static so the class. Dec 18 03:57:34 alright Dec 18 03:58:00 have you ruled out that mSensorManager is not null? Dec 18 03:58:21 mSensorManager is not null! Dec 18 03:58:53 I just don't believe you :) Dec 18 03:58:59 something on that line is null. Dec 18 03:59:07 and it definitely isn't the static member of SensorManager. Dec 18 03:59:21 I gave you all the variables earlier Dec 18 03:59:24 Ima give you the ID Dec 18 03:59:25 one sec Dec 18 03:59:32 on this crappy samsung device, onCreate is called if I lock the screen Dec 18 03:59:35 wtf??? Dec 18 03:59:59 so run activity -> onCreate. lock screen while activity is in foreground, screen turns off, onCreate is called again Dec 18 04:00:05 does that sound right? Dec 18 04:00:29 only if onDestroy was called first Dec 18 04:01:00 probably is Dec 18 04:01:09 the problem is that this activity starts playing a video Dec 18 04:01:27 michael: It seems like my app crashed, now the only variables that show up in the debugger are the stackState, stackTrace, mArgs, cause, detailMessage, etc Dec 18 04:01:29 so video is playing, lock screen, activity restarts and video plays from the beginning while the screen is locked Dec 18 04:01:54 video with the screen locked? Dec 18 04:01:59 not really sure how best to not play the video if the screen is off Dec 18 04:02:06 right. You hear the audio Dec 18 04:02:14 whuuuuuuuuuut Dec 18 04:02:25 is it on an actual device or is it on an emulator? Dec 18 04:02:55 device Dec 18 04:06:11 michaelnovakjr: https://gist.github.com/4324916 Dec 18 04:06:45 the line 70 on which it was crashing is the line 25 Dec 18 04:07:48 either mSensorManager or mGyroscope is null. Dec 18 04:07:54 well Dec 18 04:08:05 as you can see in the code, everything is correct Dec 18 04:08:25 that doesn't mean you don't have a null. Dec 18 04:08:30 I dont have any Dec 18 04:08:34 how can I show you... Dec 18 04:08:39 lol the stacktrace... Dec 18 04:08:52 the variables? Dec 18 04:09:05 the stacktrace. Dec 18 04:09:47 the stacktrace is null Dec 18 04:09:54 lol Dec 18 04:09:58 that meanas you have a null. Dec 18 04:10:01 I dont get what you mean.... Dec 18 04:10:08 the app crashes and the stacktrace is null Dec 18 04:10:19 when your app crashes, and there's a stacktrace printed in the log. Dec 18 04:10:28 that stacktrace tells you why your app crashed. Dec 18 04:10:32 well Dec 18 04:10:33 look Dec 18 04:10:39 the on resume loops ... Dec 18 04:10:45 so it works, then it doesnt... Dec 18 04:10:52 there is nothing null in there Dec 18 04:11:16 please gist the log when your app crashes. Dec 18 04:11:25 maybe the device is not capable of "taking control" of the accelerometer properly? Dec 18 04:11:36 logcat? Dec 18 04:11:38 yes Dec 18 04:11:43 I already gave it to you Dec 18 04:11:44 that's where the stacktrace is printed. Dec 18 04:11:50 it was a a nullpointerexception Dec 18 04:12:01 yes a null pointer exception means something is null. Dec 18 04:12:10 this is my point. Dec 18 04:12:11 there was nothing nul Dec 18 04:12:14 jfalkdsajfj Dec 18 04:12:28 the app isn't crashing with a null pointer exception because nothing is null. Dec 18 04:12:45 the point of a null pointer exception is that there's a null value Dec 18 04:13:18 12-17 23:12:59.863: V/Myapp(6396): android.hardware.SensorManager@4052eae0 Dec 18 04:13:32 thats my mSensorManager.toString(); Dec 18 04:13:46 and what about your mGyroscope Dec 18 04:13:47 now look Dec 18 04:13:58 the program came out of the onResume Dec 18 04:14:09 I start moving my device around, and it comes back to the resume!! Dec 18 04:14:44 * michaelnovakjr 's head hurts. Dec 18 04:14:49 mGyroscope... Dec 18 04:15:02 wtf! Dec 18 04:15:05 its null!!?? Dec 18 04:15:07 wait!!! Dec 18 04:15:21 that's generally what happens when you get an npe. Dec 18 04:15:26 something's null. Dec 18 04:16:07 ok let me try that again Dec 18 04:16:14 be patient, ima give you everything I know Dec 18 04:16:52 onCreate: mSensorManager SensorManager (id=830007854592) Dec 18 04:17:11 now im onResume: mGyroscope Sensor (id=830007855384) Dec 18 04:17:27 mGyroscope Sensor* Dec 18 04:17:44 got past the buggy line 70 Dec 18 04:17:52 mGyroscope Sensor (id=830007855384) Dec 18 04:17:58 still in onResume Dec 18 04:18:09 came out of onResume and back in Dec 18 04:18:16 back in? Dec 18 04:18:19 mGyroscope is null?!! Dec 18 04:18:20 what!! Dec 18 04:18:36 you know what? Dec 18 04:18:48 I really don't... Dec 18 04:18:51 Ima move the attribution of the mGyroscope object from onCreate to onResume Dec 18 04:19:23 why was the program coming out of onResume and back in??? Dec 18 04:19:46 that doesn't make any sense... Dec 18 04:19:56 what doesnt make any sense? Dec 18 04:20:31 going out of onResume and back in? Dec 18 04:20:37 yeah Dec 18 04:20:40 ok now it didnt do it Dec 18 04:20:46 that makes no sense. Dec 18 04:21:03 what the hell I move my device and its all buggy.... Dec 18 04:21:15 crashed... Dec 18 04:21:32 you must be doing something crazy in your sensor listener. Dec 18 04:21:43 thats why I gave you my code Dec 18 04:21:51 to let you see that there was nothing weird Dec 18 04:22:01 oh Dec 18 04:22:02 look Dec 18 04:22:06 got out of onResume Dec 18 04:22:20 now im getting the onSensorChanged event Dec 18 04:22:29 means the accelerometer is working right? Dec 18 04:22:31 wilornel: you didn't post all the code... Dec 18 04:22:53 one sec Dec 18 04:23:18 https://gist.github.com/4324995 Dec 18 04:24:32 where's the stack trace? Dec 18 04:24:43 the stacktrace is null Dec 18 04:25:41 wilornel: the stacktrace isn't null. Dec 18 04:25:45 you get it from logcat. Dec 18 04:25:58 the stack trace where Dec 18 04:26:00 then its mainly: sensorchanged Dec 18 04:26:04 it says null pointer exception Dec 18 04:26:24 wilornel: we aren't going to be able to help you figure it out without you pasting a crash log into pastebin. Dec 18 04:26:40 there is no crash log Dec 18 04:26:48 if your app crashes, there is. Dec 18 04:26:51 trust me. Dec 18 04:27:02 ok let me check one second Dec 18 04:27:07 in logcat Dec 18 04:27:10 change to verbose please Dec 18 04:27:53 oh cool its working now Dec 18 04:28:02 * michaelnovakjr bangs his head against the wall. Dec 18 04:28:14 * wilornel bangs his head against the desk Dec 18 04:28:51 why sprinkle all those Log.v() otherwise? :P Dec 18 04:28:52 hmm Dec 18 04:29:15 maybe sometime it works sometime it's not is because of underlying cause Dec 18 04:29:20 if you don't fix it Dec 18 04:29:24 your app will be unstable Dec 18 04:29:33 yes I understand that Dec 18 04:29:49 not understand the cause of some random errors can lead to problems later on Dec 18 04:30:01 oh here it goes again... Dec 18 04:30:35 https://gist.github.com/4325015 Dec 18 04:31:02 again the same registerListener line Dec 18 04:31:03 what the hell Dec 18 04:31:09 why does it always go back to the onResume??? Dec 18 04:31:14 you must be doing something wrong. Dec 18 04:32:41 what is it? Dec 18 04:32:49 oh maybe thats what is wrong Dec 18 04:33:09 Ithe activity to which is registered the sensor has a fragment running in it Dec 18 04:34:40 does that do anything? Dec 18 04:34:56 you might want to start with some simpler examples. Dec 18 04:35:12 in onResume Dec 18 04:35:23 put code Dec 18 04:35:53 if(mGyroscope == null){ Dec 18 04:35:53 mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); Dec 18 04:35:54 } Dec 18 04:36:14 put before mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_NORMAL); Dec 18 04:37:03 yes thats a good idea Dec 18 04:37:21 what... Dec 18 04:37:28 my app pauses Dec 18 04:37:54 https://gist.github.com/4325045 Dec 18 04:38:13 at the very end Dec 18 04:38:24 is it because the accelerometer is taking way too much data at the same time? Dec 18 04:40:44 guys? Dec 18 04:40:47 orientaiton maybe? Dec 18 04:41:03 actually its always saying -0.0 Dec 18 04:41:08 its not gathering any data... Dec 18 04:41:33 you lock the orientation ? Dec 18 04:41:36 what? Dec 18 04:41:42 what did oyu say right now? Dec 18 04:41:46 i LOCK it? :o Dec 18 04:41:46 you know hwo I feel about android dev these days? Dec 18 04:41:51 how? Dec 18 04:41:54 cant do it easily without people like jake Dec 18 04:42:05 o_O Dec 18 04:42:07 any modern app should be a collection of well built libraries Dec 18 04:42:16 because the way google does it out of box is masochism Dec 18 04:42:35 I was looking at source for some AOSP stuff and its like god damn it... is this the best we can come up with? Dec 18 04:42:42 totally agree Dec 18 04:42:49 expandable listview you have to override like 25 methods on a class Dec 18 04:42:54 vs listview in IOS Dec 18 04:43:02 which is how many items, how many items per group x Dec 18 04:43:06 hey jake, ron, do you know why would an activity pause for no reason? Dec 18 04:43:08 the fact that you can't do something as insanely trivial as download images in a ListView is laughable Dec 18 04:43:17 +1 Dec 18 04:43:19 wilornel - android can do that any time it feels like Dec 18 04:43:32 especially in constrained memory situations Dec 18 04:43:40 ron_frown, then how can make apps that rely on sensors? Dec 18 04:43:45 oooooooh my god Dec 18 04:43:50 wake lock mayng Dec 18 04:43:53 constrained memory, let me check something Dec 18 04:44:10 wake lock in the app itself or wakelock in the service Dec 18 04:44:15 just be careful Dec 18 04:44:18 what is wakelock? Dec 18 04:44:33 keeps device awake Dec 18 04:44:35 device/activity Dec 18 04:44:38 oh I just.. api Dec 18 04:44:39 yeah Dec 18 04:44:41 ala the gps app Dec 18 04:44:49 ah Dec 18 04:45:00 jake you should just lump all your shit together in one library Dec 18 04:45:17 I mean proguard should mangle out any unused classes, no? Dec 18 04:45:56 We might put out an Android bootstrapping template that integrates all our libraries. We have awesome internal things that depend on two of our open source libraries which we haven't been able to make public because they aren't usable outside of between our libraries. Dec 18 04:46:21 should I make the wakelock at the onCreate? Dec 18 04:46:37 its sad, but I look at a lot of this shit in aosp, and I'm honestly kind of surprised they dont just make it easier for themselves first Dec 18 04:47:10 JakeWharton: what you guys have released thus far is pretty kick ass. Dec 18 04:47:33 dagger is awesome. Dec 18 04:47:48 Yeah I adore Dagger. Jesse is a beast. Dec 18 04:47:58 wtf is dagger Dec 18 04:48:04 There's plenty of room for improvement in some of our other libraries. Dec 18 04:48:14 ron_frown: JSR330 impl. http://square.github.com/dagger/ Dec 18 04:48:31 ok Dec 18 04:48:41 does dagger use that other java ioc framework Dec 18 04:48:46 JakeWharton: I've found retrofit useful for some simple api stuff. Dec 18 04:49:10 ron_frown: no, it has no external deps. It uses code generation at compile time to avoid all reflection at runtime. Dec 18 04:49:13 nice Dec 18 04:49:23 I hate the terminology, but just because I'm used to DI in c# Dec 18 04:49:25 interesting Dec 18 04:49:46 maybe I just need to look at it Dec 18 04:49:51 looks good tho Dec 18 04:50:03 anybody have any idea how to remove the action bar divider (I'm using sherlock btw_ Dec 18 04:50:05 ) Dec 18 04:50:24 the horizontal blue divider? Dec 18 04:50:30 yup Dec 18 04:50:31 ~_~ Dec 18 04:50:49 the background? Dec 18 04:50:52 that's the action bar background, you can remove it by providing an action bar style or programmatically through getSupportActionBar().setBackground() Dec 18 04:51:01 er, it might be setBackgroundDrawable Dec 18 04:51:08 i recommend the theme option Dec 18 04:51:33 set it to null? Dec 18 04:51:52 done that. But the divider still there. but not blue Dec 18 04:52:00 jake I'll probably be releasing my first android app using viewpagerindicator and actionbarsherlock Dec 18 04:52:06 in 1-2wk Dec 18 04:52:19 and next project after that is einsetzen + a few tweaks Dec 18 04:52:19 =) Dec 18 04:52:29 I got lots of helpers now Dec 18 04:53:09 hmm Dec 18 04:53:16 any other pointers? Dec 18 04:53:54 it could be the windowContentOverlay I guess Dec 18 04:54:14 i can't remember at the moment, i'll be back in a bit though Dec 18 04:54:27 ron_frown, my activity is not registering the rotation of my device, and after a moment it crashes, even with wakelock Dec 18 04:54:33 if it looks like a shadow it's the content overlay, clearable with a @null in the theme attribute Dec 18 04:54:40 It take measures like 10 times a second Dec 18 04:54:52 wilornel thats probably a separate issue Dec 18 04:55:05 do youw ant the app to HAVE to be open? Dec 18 04:55:16 isee Dec 18 04:55:24 I need to register the orientation of the device Dec 18 04:55:27 it does look like a shadow Dec 18 04:55:55 which theme attribute? background? Dec 18 04:56:00 windowContentOverlay Dec 18 04:56:38 oh Dec 18 04:56:48 ok Dec 18 04:57:37 omg the accelerometer works! : D Dec 18 04:57:48 but the app still crashes after like 2 seconds Dec 18 04:59:19 okay now if I let the device stand still, it does not crash Dec 18 04:59:26 I start shaking it and it crashes after a moment Dec 18 05:06:55 ron_frown: better release your app before the world ends Dec 18 05:07:44 hah Dec 18 05:07:56 ron Dec 18 05:08:09 do you have any idea of what could be the cause? Dec 18 05:08:20 wilornel you need to handle rotation Dec 18 05:08:28 hey what the hell is a context really? Dec 18 05:08:38 ron_frown: what do you mean? Dec 18 05:08:41 i just passed an android development class and i cant really say i know what a context is Dec 18 05:08:46 My app is crashing when I rotate the device? Dec 18 05:08:47 if shit just dissapears in the middle of your sensors returning values Dec 18 05:08:54 its gonna crash Dec 18 05:09:03 sooooo Dec 18 05:09:11 its gonna crash when I rotate it? Dec 18 05:09:27 basically? Dec 18 05:09:28 rotation basically is going to reissue lifecycle events Dec 18 05:09:37 eg, pause destroy, create resume Dec 18 05:09:40 probably another jul pointer Dec 18 05:09:44 :O Dec 18 05:09:45 jul - null Dec 18 05:09:51 a rotation will cause a onPause? Dec 18 05:10:10 OH Dec 18 05:10:11 OH!!! Dec 18 05:10:14 Okay I get it Dec 18 05:10:15 yes Dec 18 05:10:17 you mean when the display Dec 18 05:10:21 when the display turns around Dec 18 05:10:26 look at it this way Dec 18 05:10:29 ohh yeah it MUST be that Dec 18 05:10:34 yeah I read about this thing Dec 18 05:10:40 so I just gotta lock my display Dec 18 05:10:41 by default if the screen rotates, its EFFECTIVELY just killing the original activity, and recreating the new Dec 18 05:10:46 exactly Dec 18 05:10:52 Thansk TONS! Dec 18 05:10:54 so if you just put your stuff in onresume, and kill it in onpause Dec 18 05:10:56 that may fix you Dec 18 05:11:14 well im just going to lock the display Dec 18 05:11:19 I dont need it to rotate Dec 18 05:11:26 anyways thanks a lot ron, have a good night Dec 18 05:11:40 or whatever it is that you have to do right now Dec 18 05:11:42 have a good one Dec 18 05:12:23 np Dec 18 05:13:49 JakeWharton: this works @null Dec 18 05:13:57 removes the shadowy divider Dec 18 05:13:58 thanks Dec 18 06:12:50 no documentation on whether the thread from which the AAssetManager native "object" must be accessed from a thread which has attached to JNI Dec 18 06:16:44 I have a question about XML - which I have never really been able to understand; when I develop my applications, are all these nicely made GUIs just made straight by hand from XML, there isn't a nice editor or something to make them? (I am using Eclipse so I have a basic design) but it's more of just nicely arranged fields Dec 18 06:22:43 Any advice please? Dec 18 06:49:02 ladies Dec 18 06:49:23 eWizardII there is eclipse and idea Dec 18 06:49:30 idea seems to now have a bit better designer Dec 18 06:49:37 but ultimately knowing the xml is the key Dec 18 06:49:45 then you can use designers to get close to what you want Dec 18 06:49:47 and tweak Dec 18 07:04:53 new native facebook for android is... interesting Dec 18 07:05:07 I am curious how they managed to get it to throw so many caught exceptions Dec 18 07:08:47 i like the way the list pauses everytime a new story appears Dec 18 07:09:09 gives me time to read them all Dec 18 07:09:15 :( Dec 18 07:10:26 lol Dec 18 07:28:01 If I want to write an app for android, I see one does not have much choice ekcept of writing it in Java ? Dec 18 07:28:38 using Common Lisp to write an app seems like a bad idea Dec 18 07:28:39 arnuld: you could write it in C# using Mono for android, you could write it in C using the NDK (not recommended, if you just don't want to write java) Dec 18 07:29:14 you could write it in scala, that compiles to bytecode, you could write it in some cross plttform toolkit, whatever language they use (often html5 + css + javascript) and compile it Dec 18 07:29:22 JRuby ? Dec 18 07:29:26 but if you really want to make a good app, yeah you will write it in java Dec 18 07:29:39 you're asking for a world of complication unless you just stick to java Dec 18 07:29:46 hmmm Dec 18 07:29:49 I dont know Dec 18 07:29:59 I wouldnt advise AGAINST c if you knew c Dec 18 07:30:05 just wouldnt suggest it for a beginner Dec 18 07:30:10 I know C ver well Dec 18 07:30:17 but going NDK means missing a bunch of the APIs, doesn't it? Dec 18 07:30:17 and I know only C Dec 18 07:30:27 not that I am aware of Dec 18 07:30:32 then it would be time to learn something new :D Dec 18 07:30:36 I mean, can you sensibly make a standard UI app with the SDK? Dec 18 07:30:47 using standard ui compoennts... doubtful Dec 18 07:30:54 "Before downloading the NDK, you should understand that the NDK will not benefit most apps. As a developer, you need to balance its benefits against its drawbacks. Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. In general, you should only use the NDK if it is essential to your app—never because you simply pre Dec 18 07:31:08 "NEVER because you simply prefer to program in c/c++" Dec 18 07:31:09 using qt, or clutter Dec 18 07:31:12 so unless you're looking at something like a game or media app with an entirely custom UI... Dec 18 07:31:17 yeah Dec 18 07:31:24 kinda sucks Dec 18 07:31:46 seems to me thats one of the major flaws and huge leaps forward Dec 18 07:31:48 with ios Dec 18 07:32:02 well, I have ben searching/googling from last 2 hours andg I got same outcome: wrotie in Java Dec 18 07:32:11 write* Dec 18 07:32:13 ios forces to write in a subset of c++ (obj-c) and being naturally native in type Dec 18 07:32:19 code is just gonna be more efficient Dec 18 07:32:30 sadly in my deep diving some ios code just makes more sense =( Dec 18 07:32:36 i like it, that still ppl think C++ is faster then java :) Dec 18 07:32:44 now from where to got an idea to write an usablo app Dec 18 07:32:46 android needs to hire non java folks to build their java shit Dec 18 07:32:49 get* Dec 18 07:33:01 timroes - I'll be the first to show you real world experience on servers where java can out perform c++ Dec 18 07:33:04 arnuld: http://d.android.com Dec 18 07:33:08 but on mobile devices thats simply not the case Dec 18 07:33:49 okay but then you are rare among these ppl Dec 18 07:33:58 I often meet ppl: ohh c++ is always faster then java Dec 18 07:34:11 timroes: it redirects to --> developer.android.com/index.html Dec 18 07:34:13 well I think super optimized c++ is gonna be faster than java Dec 18 07:34:27 but then the time you take to build super optimized c++ just pulls it out of significance Dec 18 07:34:30 and especially if it comes to object oriented stuff (and why would u use C++ and not C, if you don't need it) java outperforms C++ most of the tiems Dec 18 07:34:47 I come from the .net world where code is even that much more efficient and ms nay sayers are non stop bashing Dec 18 07:35:02 pretty sad when I build mono code in linux to perform what I used to leave to c/c++/perl etc Dec 18 07:35:06 (and my tests has been 2,5 years ago, I guess java VMs made bigger steps than c++ compilers since then) Dec 18 07:35:09 and it destroys that code in performance =) Dec 18 07:35:13 not so Dec 18 07:35:23 c++11 just came out, and clang has made huge leaps and bound Dec 18 07:35:45 so has g++ Dec 18 07:35:54 so functionality and performance has been vastly improved... c11 while is new, has a lot of language features you find in modern languages Dec 18 07:36:09 yeah, c++ recognized its kinda outdated Dec 18 07:36:34 I don't think it's even useful to compare the two Dec 18 07:36:51 I've been diving into c++ working on android platform code... and I dont know... it gives you a lot of ways to shoot yourself in the foot, but that being said Dec 18 07:36:53 now it got a lot of features java/C# or other modern language has, but with a syntax that is ... Dec 18 07:36:58 most people don't know c++ well enough to make such comparisons Dec 18 07:37:03 I find it very theraputic for some reason =) Dec 18 07:37:40 assembler also teaches you "where a string starts and where it ends" Dec 18 07:37:48 ron_frown: as opposed to C, which is pretty much a gun with a weight attached to make sure it points at your foot by default? Dec 18 07:37:55 hahaha Dec 18 07:38:01 I dont mind c as much anymore either Dec 18 07:38:08 c always seemed like a nightmare Dec 18 07:38:16 started kernel hacking and it doesnt seem to bother me as much Dec 18 07:38:21 i am happy if there are still some develoeprs for it, who will write great virtual machines for modern languages :) Dec 18 07:38:41 now if someone would write one for java.... Dec 18 07:39:09 oracle vm has made imho big improvements, especially when it comes to speed Dec 18 07:39:11 actually dalvik is nice Dec 18 07:39:17 timroes give it time Dec 18 07:39:26 oracle will fuck it up, without fail Dec 18 07:39:42 lots of the big influential people in java world are having major doubts and walking away from the platform Dec 18 07:39:52 at least not trying to help form standards etc etc Dec 18 07:40:18 did anyone ever use java7 Dec 18 07:40:21 :) Dec 18 07:40:38 seems pretty clear to me that Google are going to end up owning their own Java/Dalvik combo Dec 18 07:40:40 nope Dec 18 07:40:40 no one Dec 18 07:40:40 never Dec 18 07:40:42 I am very much opposed to java in webserver/desktop environments Dec 18 07:40:49 with one exception Dec 18 07:40:51 intellik Dec 18 07:41:00 j Dec 18 07:41:01 they get the pardon, because they do java on the desktop REALLY well Dec 18 07:41:09 yea yeah Dec 18 07:41:14 no need for typo nazis Dec 18 07:41:21 there's two java apps that I like Dec 18 07:41:27 h Dec 18 07:41:30 idea and kgs client Dec 18 07:42:31 i would also like, if google could take over java, and make a good own jvm :) Dec 18 07:43:06 I wish google would fall like nokaia Dec 18 07:43:20 nokia* Dec 18 07:43:28 wtf Dec 18 07:43:32 ... Dec 18 07:43:39 lemme check Dec 18 07:43:55 actually I think its kinda sad nokia failed... their hardware specs wise has always been pretty respectable Dec 18 07:44:02 stock values say, they have a very long way for that :D Dec 18 07:44:04 and I dont htink they gave meebo long enough Dec 18 07:44:10 couple of years from now, at this rate, dalvik will be the most widely-used computing platform in the world Dec 18 07:44:14 i still hope nokia will produce android phones Dec 18 07:44:24 well their sales numbers with wp8 Dec 18 07:44:24 would rescue their ass imho Dec 18 07:44:25 are not great Dec 18 07:44:39 because their hardware has always been great, but their only phones with shitty os policy hasn;t Dec 18 07:44:46 ron_frown: "not great" like WWII was "a bit of a fight"? Dec 18 07:44:49 would have saved bb too, cept bb was kind of all about their shitty os, what would they have now =0 Dec 18 07:45:06 Leeds precisely Dec 18 07:45:12 but there has been rumors nokia is working at android phones?! Dec 18 07:45:45 not that I am aware of Dec 18 07:45:48 nokia and RIM would be *insane* not to have a least some skunkworks stuff getting Android up on their devices Dec 18 07:45:50 there are rumors about everything Dec 18 07:45:53 it doesnt make them true Dec 18 07:46:11 samsung tried to recruit me for what sounded like rom development once, and for what sounded like home phone, or SIP roaming Dec 18 07:46:14 ron_frown: read it somewhere, but the imho the rumors were also pretty weak based, they were based on a jiob application nokia has currently written out Dec 18 07:46:23 wouldnt surprise me Dec 18 07:46:25 they can hire me Dec 18 07:46:27 timroes: they clarified that one - it was for mapping, I think Dec 18 07:46:33 I port android to hardware Dec 18 07:46:35 HIRE ME HIER ME Dec 18 07:46:46 don't hire ron_frown - he cant spell! Dec 18 07:46:53 oooh Dec 18 07:46:57 true Dec 18 07:47:07 I'll just put a bunch of internet meme speak Dec 18 07:47:13 "I CAN HAZ SETTINGS" Dec 18 07:47:35 Leeds: ah haven't read that one. sad so still no chance for nokia Dec 18 07:47:49 they jus thavent admitted wp8 failure yet Dec 18 07:47:57 I bet when they do, they'll be looking for alternatives Dec 18 07:48:00 they arent goign to just give up Dec 18 07:48:02 look at bb Dec 18 07:48:17 nobody gives 2.5 shits about bb, and they still keep trying to pull magic tricks out of their ass Dec 18 07:48:17 timroes: as I said, given the no cost, open source, ARM-everywhere thing, I'd be really surprised if they weren't keeping a minimal compatibilty project going Dec 18 07:48:25 ron_frown: wasn't there a statement from nokia ceo "windows phone 8 can't fail. we have no plan b" Dec 18 07:48:35 havent heard that Dec 18 07:48:42 funny quote tho Dec 18 07:49:35 ron_frown: http://www.phonearena.com/news/Nokia-has-no-Plan-B-after-Windows-Phone-7_id19534 Dec 18 07:49:40 was win7 phone sorry :D Dec 18 07:49:55 wow Dec 18 07:50:03 I am so thankful to have a second monitor at home now Dec 18 07:50:14 Do android messages have a file extension like 1.pdu Dec 18 07:50:56 yes Dec 18 07:51:02 welcome to 2007 me Dec 18 07:51:15 Meiwes: they're normally kept in the database, aren't they? Dec 18 07:51:20 does sqlite have bool types? I cant remember Dec 18 07:52:03 Leeds:I am not so sure about the database thing.Can one rename a message? Dec 18 07:52:16 god damn it dude Dec 18 07:52:23 an idiot abroad is classic comedy Dec 18 07:52:27 highly recommended Dec 18 07:52:35 ron_frown: you on series 3? Dec 18 07:52:47 just started s3e1 Dec 18 07:52:49 Meiwes: well... if it's in a database, what does "renaming" mean? Dec 18 07:52:53 I didnt know there was a series 3 Dec 18 07:52:59 until about 10min ago Dec 18 07:53:14 shorter series for Christmas Dec 18 07:53:26 they come - very briefly - to Hong Kong! Dec 18 07:53:27 season 2 seemed light on episodes Dec 18 07:53:54 remember that UK shows typically have around 6-8 episodes in a season, not the 22ish that US ones have Dec 18 07:53:59 yeah Dec 18 07:54:04 like IT croud Dec 18 07:54:09 or 3 :) Dec 18 07:54:10 like sherlock Dec 18 07:54:15 Leeds:Are they kept in an sqlite database?. Dec 18 07:54:19 is that a series at that point Dec 18 07:54:46 and again, in the UK, "series" is used both for the show as a whole and for what the US calls a season Dec 18 07:55:11 dude the short dude just aggrivated the shit out of karl Dec 18 07:55:11 Meiwes: yes, I think so Dec 18 07:55:15 jsut made it that much better Dec 18 07:55:21 yeah, that's what he's there for Dec 18 07:55:26 have you see Life's Too Short? Dec 18 07:55:31 Leeds:Thanks. Dec 18 07:55:35 no Dec 18 07:55:53 another Ricky Gervais production, with Warwick in the lead Dec 18 07:56:02 (the little guy) Dec 18 07:56:30 long story short, karl is god damn hillarious Dec 18 07:57:10 he is, although he's also getting a bit more sympathetic in this series/season - I think he might actually have seen enough of the world to have learned to appreciate it a bit Dec 18 07:57:30 or they just wrote it that way :) Dec 18 08:00:21 [23:54:48] and again, in the UK, "series" is used both for the show as a whole and for what the US calls a season Dec 18 08:00:23 that's a bug Dec 18 08:00:33 leeds, is that short guy the dude from willow? Dec 18 08:19:08 ron_frown: yup, that's him Dec 18 08:19:19 he was also an ewok, and prof flitwick in harry potter Dec 18 08:22:15 I think its hillarious how he talks so much shit about warick being short and shit Dec 18 08:22:54 <[deXter]> Leeds, I didn't know flitwick was an ewok. This... changes everything! O_O Dec 18 08:23:07 [deXter]: the more you know... Dec 18 08:25:05 can I use the constructor in an android Service class safely? Dec 18 08:30:43 anyone know off the top of their head how to read things out of Apache's UrlEncodedFormEntity in a sane way? Dec 18 08:30:56 hahah Dec 18 08:31:08 I did that before Dec 18 08:31:17 then kicked apache httpclient straight to the curb Dec 18 08:31:21 with a big fat FU Dec 18 08:35:19 you guys realize the jvm is written in c++ :P Dec 18 08:37:41 g00s: you have a too high delay :) Dec 18 08:38:43 XD Dec 18 08:39:04 ron_frown takes so damn long to make a point Dec 18 08:39:31 i had to reread all of his crazytalk :D Dec 18 08:40:20 AAssetManager_fromJava would be nice to know if the "natvie" asset manager tha tis returned is truly and purely native Dec 18 08:40:33 i.e. can be used by any thread, whether "attached" to jni or not Dec 18 08:40:54 ron_frown: but seriously, i wonder if google has designed themselves into a corner - arrixing a some suboptimal maxima Dec 18 08:41:07 (with the java framework, and the stuff you guys were mentioning before) Dec 18 08:41:23 on the one hande it says you have to keep around the java asset manager class to use it, so that would seem to imply it's using itself Dec 18 08:41:34 which would mean that you have to use it from an attached thread Dec 18 08:43:35 ron_frown: so there was no class to do it? Dec 18 08:43:37 this is for testing Dec 18 08:45:12 actually, nevermind Dec 18 09:03:15 i wish the support library and all the extra nice things like view pager were separated Dec 18 09:05:06 why? Dec 18 09:05:22 to make your employless :) Dec 18 09:05:25 -r Dec 18 09:05:58 because i'm fussy Dec 18 09:06:24 and when I'm writing a tablet app, i don't want all the support fragements stuff Dec 18 09:06:53 i should learn to read, i read you want them all included in the support library :D Dec 18 09:10:16 hi layout masters please help me to achieve this layout http://stackoverflow.com/questions/13929551/drawing-a-colorful-circle-inside-an-image Dec 18 09:12:51 Good day folks Dec 18 09:14:02 is there a way of retrieving the data that onPostExecute() returns in an asynctask, without using get()? As get() blocks the UI thread Dec 18 09:14:19 quick question - I have an app which starts a mainactivity.java, which checks a shared preference for an access key and redirects the user to either a login activity or an album list Dec 18 09:14:26 That works pretty well... except Dec 18 09:14:37 I start the app for the first time, get the login screen Dec 18 09:14:49 I log in, hit the home button, then bring the app back via the task manager. Dec 18 09:14:58 I get back to the login screen Dec 18 09:15:09 if I were to start the app via the app drawer the second time Dec 18 09:15:18 it'd work great Dec 18 09:15:27 and it'd work via task manager later on as well Dec 18 09:15:40 any idea what might cause this? Dec 18 09:15:53 alex_PP: so use the v13 support lib and proguard strip all the v4 fragment crap Dec 18 09:16:29 or just copy ViewPager.java, PagerAdapter.java, and FragmentPagerAdapter.java into your app Dec 18 09:16:49 (the v13 FragmentPagerAdapter) Dec 18 09:16:54 i'm out, night. Dec 18 09:22:41 didn't think of that, thanks JakeWharton Dec 18 09:33:15 tell me please free git hubs? Dec 18 09:33:30 squ: try bitbucket Dec 18 09:34:36 is it private? Dec 18 09:35:19 what about github :) Dec 18 09:37:51 http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively works in a pinch Dec 18 09:38:21 github is not free if you want privacy Dec 18 09:38:43 hello timroes, how do you do? Dec 18 09:38:50 you didn't said you want privacy :) Dec 18 09:38:54 and yeah I am well Dec 18 09:39:02 woke up early today Dec 18 09:39:14 first time i've been at work at 8 o clock i think :D Dec 18 10:02:02 JakeWharton, do you remember my issue with ActionBar Sherlock? https://groups.google.com/d/topic/actionbarsherlock/MDqW6KqCCzo/discussion -- I promised I would have filed a bug.. but it isn't happening anymore... dunno the reason but after cleaning everything up (my project / the emulator) the issue went away Dec 18 10:03:17 Not the first time that happened :) Dec 18 10:04:06 HDroid, sure, but that's weird.. I tried multiple time cleaning up... I just didn't reset the emulator image Dec 18 10:06:51 hi, does EVERY IntentService is run in it's own thread or is it that there is 1 thread for all IntentService instances? Dec 18 10:11:27 cube, i beleive it's a thread per instance Dec 18 10:11:46 might change in different versions of android though Dec 18 10:11:54 asynctask did Dec 18 10:13:48 alex_PP: just consulted the docs, and IIUC, there's single thread Dec 18 10:13:54 cube all are handled by seperate threads Dec 18 10:13:55 "All requests are handled on a single worker thread -- they may take as long as necessary (and will not block the application's main loop), but only one request will be processed at a time." Dec 18 10:14:03 Call requires API level 9 (current min is 8): java.util.Calendar#getDisplayName Dec 18 10:14:07 from: http://developer.android.com/reference/android/app/IntentService.html Dec 18 10:14:09 how to get month name? Dec 18 10:14:17 all requests to ONE IntentService is handled by one worker thread, but each intentservice has its own thread Dec 18 10:14:56 timroes: ah, that's the way, thank you Dec 18 10:15:51 yeah, each IntentService has its own execution thread, but inside the Intents are handled sequentially (eg queued) IIRC Dec 18 10:16:45 hmm, Apple will not get injunctions of Samsung devices, but Samsung's push for a new trial is also off the table Dec 18 10:17:00 belgianguy, linky? Dec 18 10:17:18 hi ctate! Dec 18 10:17:26 alex_PP: http://arstechnica.com/tech-policy/2012/12/in-major-setback-apple-wont-get-injunction-against-samsung/ Dec 18 10:17:56 Maybe you remember me having the Android DDMS problem on Linux, where Eclipse or the DDMS standalone hanged totally when showing LogCat? Dec 18 10:19:40 alex_PP: but stay away from the comments, some aren't taking it well Dec 18 10:19:48 ctate, you were right - it was a desktop problem (libgail-common): http://code.google.com/p/android/issues/detail?id=34641 Dec 18 10:20:19 belgianguy, i get all my opinions from news comments Dec 18 10:20:23 they're so insightful Dec 18 10:21:30 groklaw's dragging its feet a bit Dec 18 10:21:38 no news there Dec 18 10:21:53 alex_PP: yeah, I heard it on the radio here in Belgium and went to groklaw first too Dec 18 10:22:01 but nothing there yet Dec 18 10:25:43 JakeWharton, I take it back... it still happens, and it happens when you dynamically add (via fragment for example) some option reducing the space in the bar.. if the actionbar initially decided to put the tabs not-stacked it will blow up when there is no room anymore. Dec 18 10:26:10 JakeWharton, which means it wasn't happening anymore because I made the bar more wide before, and I narrowed it down again now Dec 18 10:45:08 Hi, I'm using jsoup in one of my applications, and got this: WARN/System.err(1366): java.net.UnknownHostException Dec 18 10:45:48 domain is reachable from the browser on the device.. Dec 18 10:47:55 Marius: your app has android.permission.INTERNET? Dec 18 10:48:13 ah! no! Dec 18 10:48:17 timroes, thanks Dec 18 10:48:24 you're welcome :) Dec 18 11:05:17 Hey guys Dec 18 11:05:39 If I want to include an apps tweaks in the Rom Dec 18 11:06:37 How ?? Dec 18 11:06:58 dctrd: #android-root? Dec 18 11:07:07 Ughhh Dec 18 11:15:09 please help me on this guys : http://stackoverflow.com/questions/13929551/drawing-a-colorful-circle-inside-an-image Dec 18 11:30:54 app crash when I rotate phone during alert dialog Dec 18 11:31:00 is it ok? Dec 18 11:35:36 Of course not Dec 18 11:35:41 http://imgur.com/jacoj Dec 18 11:37:08 #eclipse failed me guys, help me :( Dec 18 11:37:53 normally eclipse sits on top of ~200mb ram, as soon as i open one layout it spikes to 500 !!! and stays there long after the designer is closed, is there a way to make it release unnecessary heap space Dec 18 11:41:11 balls2thewall: give up eclipse, search for alternatives Dec 18 11:41:36 Cheaper to get more RAM, if you're paid by the hour. Dec 18 11:42:56 id prefer an efficient solution over a brute force one =/ dont want to surrender to bad software design Dec 18 11:43:02 hehehe HDroid Dec 18 11:43:26 You don't want to surrender to bad software design? Hah, best run like hell and find a different industry to work in. Dec 18 11:44:00 bravo HDroid Dec 18 11:44:48 you mean leave the java field? yeah that would be nice =/ Dec 18 11:45:05 No I don't mean the java field. I mean.. any computer. Dec 18 11:46:02 doesnt really hold up Dec 18 11:49:58 Android 2.1 has START_NOT_STICKY and START_STICKY in onStartCommand() method to manage Service behavior after its death. Has android 1.5 something similar ? I want that my Service doesn't rebirth. Thanks Dec 18 11:56:19 squ: using DialogFragments? Dec 18 11:57:00 IntelliJ can get quite heavy on the RAM as well, and I thought 4 GB would be enough for my whole system Dec 18 11:57:25 Any guides on how to make a database that ships with the application? I'm guessing that's the best solution if you want to say, make a quiz app. Making a test quiz app to learn, and wondering what the best approach would be Dec 18 11:57:26 but after setting up a swap drive (this being Ubuntu), it all runs fine now Dec 18 11:57:47 Suzpaz: "What is SQLite" ? Dec 18 11:58:23 just remember that you cannot distribute database files, but have to insert their contents on the first run Dec 18 11:58:53 So I can't put a db file in a resource folder? Dec 18 11:59:05 or assets Dec 18 11:59:16 belgianguy: so you're going to be writing their entire contents into values file, yes? Dec 18 11:59:55 Suzpaz: AFAIK, you can't, as there is no guarantee one device uses the same db implementation as another Dec 18 12:00:35 Ankhwatcher: I guess a giant "onFirstRun" function or something, consisting of swathes of inserts Dec 18 12:00:52 or just syncing with a Web service of some sort (would be easier to update) Dec 18 12:01:01 and then cache in SQLite Dec 18 12:06:20 I can't seem to able to provide a citation, but IIRC I got it from a Google IO talk Dec 18 12:06:46 you can also ship your own db lib Dec 18 12:07:28 p_l: have you ever done so? Dec 18 12:07:42 didn't ship an app yet ;P Dec 18 12:08:01 but I nearly shipped an application that had all of the core logic in C lib, so... Dec 18 12:08:49 yeah, but going NDK just to get a database to cache your results, isn't that overkill? Dec 18 12:09:25 I don't get why they didn't decide on a standard Dec 18 12:18:20 pindziukou: you'd have to use OnStart, but that has been deprecated since API 5, so I'd say you'd need a very solid reason to still want to use it Dec 18 12:21:19 does anyone know the resource usage of 4.2 vs 4.1.x ? Dec 18 12:22:01 I'm trying to decypher whether Samsung would also upgrade its Note tablets to 4.2, but seeing as their 4.1.2 update is taking ages, 5 might be out before 4.2 ever ships Dec 18 12:34:02 depends - are we talking about original Note with Tegra? Dec 18 12:39:37 p_l: it's a Note 10.1, don't think they have Tegra Dec 18 12:40:58 p_l: Exynos 4412 uses four ARM Cortex A9 cores built on a 32nm process Dec 18 12:41:55 it's more than capable enough IMO, but Samsung is releasing this "Premium suite" with stuff I don't want/need Dec 18 12:42:37 on another note, is android:hardwareaccelerated deprecated? Dec 18 12:42:56 or is IntelliJ's xml autocompletion lacking Dec 18 12:43:08 belgianguy: you trying to set it to false? Dec 18 12:43:27 I'm trying to get the IDE to write it for me, but it doesn't suggest it Dec 18 12:43:27 and it works fine for me Dec 18 12:43:57 so any suggestions on getting rid of overdraw when there actually are 4 layers of stuff? Dec 18 12:44:24 funkbox: check out romainguy's IO talk Dec 18 12:44:42 the invalidation of the displayLists is totally different when using hw accel Dec 18 12:45:05 (but only custom views should potentially have issues with that) Dec 18 12:45:23 what defines a "custom view" Dec 18 12:47:18 funkbox: something that extends View methinks Dec 18 12:47:22 ah Dec 18 12:47:50 but the hw accel allows to "only redraw what changed" Dec 18 12:48:03 I am trying to test the results of an asynctask, and right now I want to check the result of what happens if "null" is passed to it as a parameter. When null is passed, it is supposed to draw a Toast. Can I somehow check if the toast was drawn? Dec 18 12:48:31 sonOfRa: not in doInBackGround, no, use Log.w Dec 18 12:48:37 belgianguy: then it should get 3.2... sometime Dec 18 12:48:49 probably with other 4.2 tablets later Dec 18 12:49:01 I can check if something was logged? Dec 18 12:49:25 sonOfRa: AFAIK Log doesn't have UI Thread requirements Dec 18 12:49:41 Actually, if null is passed to doInBackground, it passes the null on to onPostExecute, and that spawns the toast Dec 18 12:49:42 yeah you can call it form wherever Dec 18 12:49:43 sonOfRa: Log messages appear in logcat Dec 18 12:49:59 ah, in onPostExecute you can Dec 18 12:50:04 that's back on the UI thread Dec 18 12:50:24 Any tips on how to persist state from a fragment in a viewpager? My problem is there are an unknown number of pages... If I store entries for each one in SharedPreferences that could get out of control quite quickly? Dec 18 12:50:46 but Toasts never should be used IMO, the fact that they disappear makes them fairly useless as output while debugging Dec 18 12:51:01 to notify a user, sometimes that may help Dec 18 12:51:19 but I'd rather have them acknowledge the information (press OK) Dec 18 12:51:27 hm, okay Dec 18 12:51:48 but you're free to do so, it's not an official guideline Dec 18 13:01:35 actually, might it be a better idea to cancel the task on invalid input, and have some error callback method in onCancelled()? Dec 18 13:03:23 sonOfRa: check before you call execute() Dec 18 13:03:37 if you can't do anything in the task, it's not worth starting it up Dec 18 13:03:50 makes more sense. What do I do if I get a timeout for example in my httpRequest? Dec 18 13:04:07 I'm just making some basic test cases to look at test behaviour, the app later will have proper input Dec 18 13:04:21 statusLine will get the HTTP status codes Dec 18 13:04:32 mh Dec 18 13:04:52 Right now "null" as input is just a substitute for timed out or otherwise erroneous httpRequests Dec 18 13:06:27 So I would check the status code, call cancel(), and do my error handling in onCancelled() Dec 18 13:06:57 sonOfRa: http://vikaskanani.wordpress.com/2011/08/03/android-proper-way-to-cancel-asynctask/ Dec 18 13:09:38 sonOfRa: also (which lead to to that blog) http://stackoverflow.com/questions/2735102/ideal-way-to-cancel-an-executing-asynctask Dec 18 13:10:01 it seems to be complicated, and Java and cancelling Threads never was easy to begin with Dec 18 13:11:03 oh, I can't just cancel the task while it is running from doInBackground? That's what I was trying to do, like "I received some invalid input per HTTP"-> Cancel myself Dec 18 13:11:33 sonOfRa: there is a cancel method, but it is not as straightforward as you think Dec 18 13:11:47 yeah, it seems to be working from the outside only Dec 18 13:14:01 sonOfRa: you don't have to see it as a "cancel" event per se Dec 18 13:14:02 If you handle searches with a custom ListActivity how do you return results? Also how do I show results on the ActionBar? Dec 18 13:14:10 yeah, I just read that Dec 18 13:14:15 you could return String and set it to null when not getting HTTP 200 Dec 18 13:14:58 but I should at least be abled to use cancel then, just to make it go to onCancelled, instead of onPostExecute? That way I can separate the code Dec 18 13:16:22 Or would that be considered bad style? Dec 18 13:23:15 sonOfRa: problem is you can't really signal what went wrong that way Dec 18 13:23:23 which you usually want to Dec 18 13:23:46 or wait, you can Dec 18 13:24:07 onCancelled exists Dec 18 13:24:16 and it takes a parameter Dec 18 13:24:29 but you'd have to check isCancelled() then Dec 18 13:27:55 so, whatever I return in doInBackground is passed to onCancelled(), if I called cancel() in doInBackground at some point? Dec 18 13:28:59 then I can return "http timed out" for example, and it is passed to onCancelled, by saying doInBackground (...) {... cancel(); return "Something;} Dec 18 13:29:06 sonOfRa: as I see it, yeah, it would cal onCancelled(Object) instead of onPostExecute(Object) Dec 18 13:29:20 perfect, that seems like exactly what I need Dec 18 13:36:54 sup folks Dec 18 13:37:08 quick question - I want to launch my app when a notification is tapped Dec 18 13:37:16 how would I actually go about doing this? Dec 18 13:37:29 Do I need to do broadcast receivers / pending intents? Dec 18 13:38:22 Tee_Pee: I do think so Dec 18 13:40:15 Tee_Pee: yeah you do, just checked my local example Dec 18 13:41:42 alrighty, thanks Dec 18 13:42:10 now, the big, last question Dec 18 13:42:39 When I start my app, I start a MainActivity.java, in which I check a sharedPreference for an access token. Dec 18 13:42:51 If I find one, I move to the content activity, otherwise I go to the login activity Dec 18 13:43:00 this works, but Dec 18 13:43:16 if I now install the app, open it, get the login screen, log in, then hit the home button Dec 18 13:43:30 then open the app via the TASK MANAGER, I get the login screen again. Dec 18 13:43:40 if I open up the app via the app drawer, I get the content activity as intended Dec 18 13:43:43 Hi guys, where in the android architecture must I put files for it to be readable by several apps, but not easily writable by the user, knowing that it is a xml file downloaded by an app when it start ? ? Dec 18 13:43:52 once I do the latter, running it via task manager also works as intended Dec 18 13:44:14 h3bus - just make a folder that starts with a . Dec 18 13:44:17 like .myappcache Dec 18 13:44:37 it'll be hidden from the user, which is enough in 99% of the cases Dec 18 13:44:39 Tee_Pee: how does that provide the file from being written to? Dec 18 13:44:44 Tee_Pee: good point, haven't even thought of hidden files Dec 18 13:44:55 H3bus: you could save it in your private files and give access to its content via a ContentProvider to other apps, if you want to have it readable only to other apps Dec 18 13:45:02 timroes - he never said prevent writing, he said "not easily writable" Dec 18 13:45:07 which translates into "not easy to find" Dec 18 13:45:54 hmm the file manager i am using (top hit when searching in store) shows hidden files by default Dec 18 13:46:52 timroes: I'm developping enterprise apps, with a custom ROM for providing phones to our sales team, so it's only a few phones Dec 18 13:46:59 is it possible to make a xml layout such that it looks like a black rounded rectangle? Dec 18 13:47:11 or I have to use PNG for that Dec 18 13:47:19 squ: that's gonna cost you a Apple lawsuit Dec 18 13:47:21 squ: you can define draweables with shapes in xml Dec 18 13:48:17 squ: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape Dec 18 13:48:46 timroes, are you proficient in this? Dec 18 13:49:15 the content of the link is very proficient :) Dec 18 13:49:24 it looks too much Dec 18 13:49:33 gradient is available too? Dec 18 13:49:37 yeah Dec 18 13:50:07 can I make these drawables stateful? Dec 18 13:50:18 yeah Dec 18 13:50:26 you can make anything stateful Dec 18 13:50:27 must be a lot of work? Dec 18 13:50:43 not really Dec 18 13:51:45 you make the rounded rectangle with gradient (about 5 lines xml i guess) and make it with each backgruond color you like as a state, and then make a state list drawable pointing to each of the rectangles for the matching state Dec 18 13:54:12 in the android emulator the screen is oriented the wrong way. how can i fix this? Dec 18 13:54:20 Dec 18 13:54:43 dagerik: ctrl + f12 Dec 18 13:54:55 I have btn_ok_unselected.png in my drawable-xhdpi Dec 18 13:55:13 timroes: ctrl + f12 did not work. im in eclipse in linux Dec 18 13:55:21 Ctrl + F11 Dec 18 13:55:31 emulator is seperate from IDE Dec 18 13:55:33 the new shape drawable I put to the same res/drawable/btn_ok_unselected.xml Dec 18 13:55:36 I'm on Linux too :p Dec 18 13:56:24 dagerik: Dec 18 13:56:26 is shape drawable supported in android 2.2? Dec 18 13:58:23 belgianguy: if its normal emulator ctrl + f12 (or f11) should work Dec 18 13:58:47 timroes: yeah, I guess the difference is CW or CCW Dec 18 13:59:00 yeah Dec 18 13:59:11 eh no :) Dec 18 13:59:14 yes and no Dec 18 13:59:24 they both work here at least Dec 18 13:59:41 as far as i know emulator doesnt separate in which direction its tilted Dec 18 13:59:57 ctrl + f12 just scrolls you to the next layout f11 to the previous, and there exist exactly two layout Dec 18 14:00:11 but I might remeber that wrong Dec 18 14:02:32 hey guys question if i want to release a program for both tablet and phone what do i need to do I currently have it released for tablets as well Dec 18 14:03:25 I'm have an image (with transparent background): I want to add a border. I created a layer-list drawable with the image (first) then the shape with a border width 1px... the result: I have the border but it's blurred -- any idea why? Dec 18 14:03:45 eagles0513875: worst case you don't do anything extra, but that'd be bad UX and a waste of space on tablets Dec 18 14:04:01 belgianguy: its a simple app from what I have see Dec 18 14:04:02 seen Dec 18 14:04:19 its a gps tracking software for these tracking devices Dec 18 14:04:29 that someone i know has developed and installs Dec 18 14:05:34 belgianguy: what would he need to do to release said app on tablets as well? Dec 18 14:05:59 eagles0513875: AFAIK nothing, unless Play has added certain requirements Dec 18 14:06:16 I've used phone apps on my tablet Dec 18 14:06:24 it seems like it has cuz on phones the app is found Dec 18 14:06:31 i have a nexus 7 with 4.2.1 and its not seeing it Dec 18 14:06:43 the sdk it was developed with was 4.0 so it should work with 4.0 and up no? Dec 18 14:07:01 what does the manifest say? Dec 18 14:07:18 minSDK and targetSDK Dec 18 14:07:42 Is it possible to remove the root access from ADB but still to be able to launch some apps with the root access (for instance, i have a binary which is launched with su, but I would like the users not to be able to have root access throught adb to remove applications) Dec 18 14:09:03 eagles0513875: the only reason it wouldn't be shown on a particular device is because play thinks that it's not appropriate to display it on that particular device. Your "friend" should check whether he has any sort of screen restrictions. Dec 18 14:09:27 lov: as in for the device? Dec 18 14:09:34 *sigh* Dec 18 14:10:12 in the manifest you can also disallow certain devices on screen size Dec 18 14:10:28 is there anything like http://developer.android.com/guide/topics/manifest/compatible-screens-element.html or http://developer.android.com/guide/topics/manifest/supports-screens-element.html or http://developer.android.com/guide/topics/manifest/uses-configuration-element.html that he needs to fiddle with? Dec 18 14:10:31 emulator-arm is always at 100%. wtf is this? Dec 18 14:10:45 lack of idling support? Dec 18 14:10:48 Bear in mind that for compatibility, lower API level targets may make assumptions. Dec 18 14:10:56 google play will also exactly tell you which devices your app will be available for Dec 18 14:11:03 check if your friends device is in that list Dec 18 14:11:04 Google Play should tell you what attributes are assumed and why. Dec 18 14:12:19 eagles0513875: and is this an SDK project? or an NDK? Dec 18 14:12:56 but check Play first, that should take care of the more obvious issues Dec 18 14:13:35 dagerik: do you have an Intel CPU? Dec 18 14:13:57 belgianguy: not 100% sure what he used if its SDK or NDK but i passed on part of the above mentioned to him Dec 18 14:19:15 belgianguy: yeah i7 Dec 18 14:19:25 dagerik: OS? Dec 18 14:19:33 help me disable audio. adding the -noaudio in eclipse did not work Dec 18 14:19:44 belgianguy: linux (gentoo 32 bit) Dec 18 14:20:16 dagerik: on Ubuntu I'm able to use the Intel Image and enabling virtualisation with KVM Dec 18 14:20:26 works many times faster than the ARM one Dec 18 14:20:42 Intel Atom Android Image Dec 18 14:21:18 Anyone know where I can find the Google Code Jam Sprint To I/O questions? I'm specifically looking for the second question. Dec 18 14:21:23 (from last year) Dec 18 14:21:25 yeah intel image rocks :D Dec 18 14:22:14 help me disable audio in the emulator. im using eclipse Dec 18 14:22:43 belgianguy: i got that working and it's actually usable Dec 18 14:23:32 funkbox: it's really smooth here Dec 18 14:24:28 omg why does the cpu use 100% Dec 18 14:24:40 because it has to emulate everything! Dec 18 14:25:07 use intel image, if you want virtualisation Dec 18 14:25:28 dagerik: this is for Ubuntu, no idea if this can fly on Gentoo https://www.youtube.com/watch?v=AZrdBIrRnsQ Dec 18 14:25:47 belgianguy: it does Dec 18 14:26:04 you normally don't need to do anything else, except creating an avd with intel image Dec 18 14:26:12 where is the intel image Dec 18 14:26:18 android SDK manager Dec 18 14:26:44 called Intel Atom Image or some sort Dec 18 14:27:09 Intel Atom x86 Image, is its name IIRC Dec 18 14:27:14 i have it installed Dec 18 14:27:36 then you can create a new avd and select the intel image instead of arm architevture Dec 18 14:27:46 i am unable to change it in the "edit AVD" Dec 18 14:28:17 yeah Dec 18 14:28:26 need to create a new one Dec 18 14:29:25 omg the intel image also causes the emulator to use 100% cpu Dec 18 14:29:46 peope on internet say i should disable sound Dec 18 14:29:47 while its booting up? Dec 18 14:29:53 how do i disable sound inthe emulator Dec 18 14:30:01 timroes: no, after it has booted Dec 18 14:30:29 strange Dec 18 14:30:55 if you want to disable sound, edit the avd, add a new hardware feature "audio playback support" and set it to false Dec 18 14:31:56 http://dagerik.fn.is/images/2012-12-18_15.30.35.png Dec 18 14:31:58 this is all i see Dec 18 14:32:07 cant find "add new hardware feature" Dec 18 14:32:29 ehh what the heckwhen have you updated your sdk last time :D Dec 18 14:32:40 while we at it, is it normal for the emulator to shoot up until 1gb of ram usage? Dec 18 14:33:07 timroes: it is the one packet in gentoo Dec 18 14:33:08 ah wait sorry Dec 18 14:33:28 intel image edit dialog looks different than arm dialog Dec 18 14:33:52 where is the file Dec 18 14:34:02 i can edit the config file and add manualyl Dec 18 14:34:30 now my problem is that my emulator is faster than the phones Dec 18 14:35:02 :D Dec 18 14:35:37 should i implement MVC in my android app? Dec 18 14:35:48 Chilley: you already have it Dec 18 14:35:52 and if I should could someone direct me to a good guide about it Dec 18 14:36:33 isn't both view and controller together in activities Dec 18 14:36:45 timroes, this one is possible? http://i45.tinypic.com/b6tvlx.png Dec 18 14:36:46 the view is the xml Dec 18 14:41:44 LOL, launching the emulator with -noaudio causes it to not use 100% cpu Dec 18 14:41:46 wtf is this Dec 18 14:41:59 dagerik: what sound system are you using? Dec 18 14:42:51 timroes: how can i find this out? Dec 18 14:42:57 in linux Dec 18 14:44:17 ps x | grep pulseaudio Dec 18 14:44:45 i don't know a comman to check what sound system is actually used Dec 18 14:45:45 not hits on pulse Dec 18 14:46:05 then i assume alsa or oss Dec 18 14:46:11 alsa works for me fine Dec 18 14:48:03 damn, the intel image was fast Dec 18 14:48:21 yeah virtualization outruns emulation a bit :) Dec 18 14:48:23 btw what is this image thing. is it the actual android os packed in a binary which is being run by the emulator? Dec 18 14:49:46 dagerik: /platforms/android-xx/images contains the img files of android so mainly yes Dec 18 14:51:50 dagerik: emulating ARM instructions costs time Dec 18 14:52:02 while just running on native Intel is easy :) Dec 18 14:58:37 Guys, I have a java.lang.ClassNotFoundException on my homeActivity, althought it's really here. Do you now where I should look first for errors ? Thanks Dec 18 14:59:27 H3bus: try clean project and rebuild Dec 18 15:01:04 H3bus: used the correct package names? Dec 18 15:01:40 is setAdapter(null) on ListView the correct way to remove its Adapter? Dec 18 15:02:34 AlCapwn: i would say so, though i guess its not very usual to remove the adapter completely from a listview? Dec 18 15:03:27 timroes: I'm getting a 'adapter modified in background' error, but as far as I can see, I only do that once the activity goes away Dec 18 15:03:45 I update the backing data of the adapter that is, when the activity goes away Dec 18 15:04:04 I'm wondering if removing the adapter during onStop would help rectify it Dec 18 15:06:24 If you handle searches with a custom ListActivity how do you return results? Also how do I show results on the ActionBar? Dec 18 15:07:54 looking at http://www.curious-creature.org/2012/12/06/android-performance-in-practice/ . what's a good way to get rid of the overdraw on the image? Dec 18 15:08:19 belgianguy: actually i'm trying to build an app I found on githup, SuperUser.apk, with some changes Dec 18 15:08:31 it almost looks like he has background of color A, container of color B and an image on top of it that doesn't result in overdraw Dec 18 15:15:23 Anyone know a way to Wait for an asyncTask to finish? If I use get(), and the task was cancelled, a CancellationException occurs Dec 18 15:16:52 how can i change the color of the menu button that appears in 4.0+ devices to the color of my choice. I am talking about the 3 dots button which has depricated the menu that 2.2, 2.3 devices have Dec 18 15:17:03 sonOfRa: just catch the exception? Dec 18 15:17:24 that's what I was thinking. Dec 18 15:17:44 if it's been cancelled you don't have to wait anyway Dec 18 15:18:26 hello guys Dec 18 15:18:37 hey Dec 18 15:19:03 I am working on my own application which is a kind of endomondo app but for motor sport at first aim Dec 18 15:19:21 I am also integrating my own social network Dec 18 15:19:31 and I wonder if it's actually a good idea ? Dec 18 15:19:54 sounds like you should be busy for th next couple of years Dec 18 15:20:00 what does edmondo do again? Dec 18 15:20:25 is a chat history recorded and available online for this channel, or freenode in general? Dec 18 15:20:41 At first, it will be a simple network where you can share your track and some stuff like comments etc Dec 18 15:21:16 www.endomondo.com > Dec 18 15:23:26 Creating it's own light social network it's interesting but I actually wonder if it's worth to do it Dec 18 15:23:43 can anyone have any suggessions regarding this ? how can i change the color of the menu button that appears in 4.0+ devices to the color of my choice. I am talking about the 3 dots button which has depricated the menu that 2.2, 2.3 devices have Dec 18 15:24:31 How do I check from the OUTSIDE of a task, wether it was cancelled? assertTrue(task.isCancelled()); Fails as a test for me, but the task was DEFINITELY cancelled. Dec 18 15:24:33 digitalfallacy: I don't understand Dec 18 15:24:46 which buttons are you talking about ? Dec 18 15:24:46 Joozey: possibly, but I wouldn't know where. No one is doing it publicly for this channel as far as I know, sorry. Dec 18 15:25:13 EvOox-: I don't know, is it a good idea? Dec 18 15:25:20 we're not really the people to answer that question. Dec 18 15:25:31 You should really be asking yourself this, and/or your investors if this is a business idea. Dec 18 15:26:06 AsyncTask.Status only supplies FINISHED(for onPostExecute finished) PENDING(not executed yet) and RUNNING Dec 18 15:26:29 EvOox-: menu has been depricated post 2.3 and has been replaced by a menu button on the action bar ... i am talking about it .. can we change color of the menu button according to our liking Dec 18 15:26:30 ? Dec 18 15:26:51 you are right lov Dec 18 15:27:14 digitalfallacy: yes you can Dec 18 15:27:24 you have to inherit your theme by xml Dec 18 15:27:55 EvOox-: could you please explain that a little more ... Dec 18 15:28:52 digitalfallacy: doesn't ABS cover that, too? Dec 18 15:30:27 digitalfallacy: did you search on inheriting @android:style/Theme.Holo.Light Dec 18 15:30:29 ? Dec 18 15:32:46 EvOox-: belgianguy : that what i wanted to ask too ....ABS works till we dont have Actionbar (pre 3.0) .. and then turns to native controls of 3.0 , 4.0..... basically i am applying an background to actionBar that's preety dark.. so my icon goes almost invisible in galaxy nexus say .. Dec 18 15:35:05 Anyone have a nexus 10 or transformer prime? I need someone to quickly test my live wallpaper with those devices Dec 18 15:39:58 so are there any proper XML guides that go into detail on design, because at best all I've been doing is try and find a demo app and reverse engineer the XML code, ron_frown Dec 18 15:41:08 lov, hm ok, couldn't find much on the internet either. Thanks. Dec 18 15:42:40 eWizardII you mean UI design ? Dec 18 15:43:09 StingRay_ yes Dec 18 15:43:33 there are quite possibly 10,000s of UI design tutorials/examples Dec 18 15:43:42 dont really have to be android/xml specific Dec 18 15:44:25 StingRay_ well I would still need XML specific ones maybe? Cause I can do css, photoshop, etc design - but it's this XML stuff that has me in a bind Dec 18 15:44:46 so then you just need to read some overviews of xml Dec 18 15:45:03 Okay Dec 18 15:45:17 tis quite a simple thing Dec 18 15:52:31 The mouse pointer on my android device is always an arrow, even when hovering over links in a webview. Dec 18 15:52:52 Is there a way to make the android mouse pointer switch to a hand on links? Dec 18 15:53:50 Hi. How do I fix the permissions on system.img to install it on a Android device? Dec 18 15:56:32 tinti: adp push your system.img to the /sdcard/ - then run "cat /sdcard/system.img /dev/nandd" Dec 18 15:57:13 nandd being the CORRECT partition on your device... could be nandf, or mnt3. (FIND OUT BEFORE RUNNING) Dec 18 15:57:29 Jonathan_Eyre: hum, but it wont solve the permission problem. I mean that there is a file in the recovery tool in which it has the chmod and chown of the whole files Dec 18 15:58:22 The files in system.img should already be the correct permissions. If they aren't you should NOT put it on your device. Dec 18 15:59:02 The permissions of the system.img file itself matters much less if your are going to cat the contents of it to your system partition. Dec 18 16:00:22 let me find the file. And they are not in my case Dec 18 16:00:50 I hate it when people like Joozey quits with an awesome message letting us know that he's a Lannister fan, but then he's gone and you can't compliment him on it. That said, why are quit message alllowed? Dec 18 16:01:07 It seems cheap. Dec 18 16:01:34 everything is allowed Dec 18 16:02:17 Jonathan_Eyre: system/core/include/private/android_filesystem_config.h Dec 18 16:02:29 Leeds: that seems like the motto of the universe Dec 18 16:02:39 is there any way to see the entire log from here looking for info? Dec 18 16:02:52 im sorry good morning everybody Dec 18 16:09:14 toxie: by "here" you mean "#android-dev"? Dec 18 16:09:20 If so, I don't know if anyone is logging/hosting the logs. Dec 18 16:09:32 Will a BroadcastReceiver still execute onReceive() when the screen is locked? Dec 18 16:09:37 alexfu: sure. Dec 18 16:09:52 how else are you going to handle the alarm manager sending periodic broadcasts? Dec 18 16:09:56 toxie: which logs? Dec 18 16:10:20 yes the chat logs Dec 18 16:10:33 "android-dev" Dec 18 16:10:41 I dno if log bots are allowed here Dec 18 16:11:27 They're not disallowed, they just don't happen to be here. Dec 18 16:11:29 Can someone confirm in android set properly the permissions on system.img during the build and according to android_filesystem_config.h Dec 18 16:11:43 at least, not that I know of. Dec 18 16:12:04 lov: would be great to ibot here. You can see it on #cubieboard Dec 18 16:12:54 hmm, botbot.me is a nice service Dec 18 16:13:10 but i dont imagine reading all logs from #android-dev for one day Dec 18 16:13:23 of course i want to learn about android programming but you just cant read all that Dec 18 16:13:24 :D Dec 18 16:16:23 hey guys, quick question - normally, only the items on the screen are loaded in a gridview Dec 18 16:16:25 or a listview Dec 18 16:16:44 is it possible to give it an offset to pre-load a certain amount of elements above and below? Dec 18 16:16:52 "The JAR of this class belongs to container 'Android Dependencies' which does not allow modifications to source attachments on its entries." <--- Any way around that? Dec 18 16:16:52 above and below the currently visible segment* Dec 18 16:17:01 ok thanks anyway Dec 18 16:19:33 NITR0GEN: Plus, typos are embarrassing enough without the additional knowledge that they will be scrutinized/googled on the internet for the rest of your life. Dec 18 16:24:42 Jonathan_Eyre: ah I got it. By using cat you dont override the original permissions Dec 18 16:25:52 tinti: patches welcome. Dec 18 16:26:26 tophyr: whatever you're trying to do, please don't. Dec 18 16:26:37 toxie: spoiler alert: you don't actually want the logs from #android-dev. Dec 18 16:27:16 is this the right channel to ask about the jackson library for java? Dec 18 16:27:26 tophyr: put a your_jar_name.jar.properties file next to the .jar, then do src="../path/to/its/src/ Dec 18 16:27:29 lov: see source.. Dec 18 16:27:39 Chilley: sounds like you should ask the jackson folks? Dec 18 16:27:40 oh. Dec 18 16:27:44 Then yeah what evancharlton said Dec 18 16:27:46 Chilley: but go ahead I guess Dec 18 16:27:59 apparently loading additional offscreen items in a gridview is a tabu topic Dec 18 16:28:02 do the jackson folks have a irc chanel? Dec 18 16:28:03 I can't find shit about it. Dec 18 16:28:12 lov: nice, I will try to check if there is some missing target or if I am doing something wrong. One simple solution that I was thinking was simply install recovery and always do an OTA Dec 18 16:28:21 anyway i'm puzzled about how the databinding of json to POJO objects work Dec 18 16:28:32 Chilley: probably reflection. Dec 18 16:28:34 tinti: huh? I meant wrt logging. Dec 18 16:28:42 Chilley: isn't jackson OSS? Dec 18 16:28:56 lov: what? Dec 18 16:28:58 but i'll still explore a bit before formulating a question Dec 18 16:29:05 yes im looking for info about bluetooth and im wondering if i can read the log maybe i could found some info Dec 18 16:29:14 11:12:11 < tinti> lov: would be great to ibot here. You can see it on #cubieboard Dec 18 16:29:29 toxie: look on stackoverflow or something, that's going to be more helpful. Dec 18 16:29:30 toxie: that wouldn't provide any useful information Dec 18 16:29:33 ah Dec 18 16:29:46 thanks dudes Dec 18 16:29:51 and yeah, you can look at the logs if you want to see scintillating lines of conversation like " Bluetooth more like blue shits" Dec 18 16:29:55 im on my way Dec 18 16:32:50 evancharlton: yeah, trying that, so far not working - it's for the support lib specifically, it's got a funky dir setup in aosp Dec 18 16:33:05 trying newest adt before i go back at banging head against that Dec 18 16:33:52 tophyr: oh yeah, support library is a pain in the ass for that. I'm almost positive it's not an ADT problem (rather, it's an eclipse shortcoming) Dec 18 16:33:58 Also, exciting "has joined" events and sudden death netsplits. Sometimes you just don't know who on the channel will have their connection reset by peer, or possibly have a ping timeout! Stay tuned for who will drop off next! Dec 18 16:34:15 * evancharlton gets on the edge of his seat Dec 18 16:34:25 * lov pushes evancharlton off of the edge of his seat Dec 18 16:34:29 Tee_Pee: no, it's not possible to tell any of the stock container views to preload further. the offscreen preloading/caching they do are internal details Dec 18 16:34:45 you could of course copy the source to them and implement your own handling, but that's kind of a bear Dec 18 16:34:58 thought as much... bummer. Dec 18 16:35:06 Jonathan_Eyre: looks like it's obscurant1st Dec 18 16:35:11 Tee_Pee: what exactly do you need to do that's causing a problem for you? Dec 18 16:35:12 and ultimately it really just pushes the jankiness problem i assume you're having, further away from the screen.. but doesn't solve it Dec 18 16:35:33 even if you've got 40 views preloaded, when you scroll one, you'll need to load + render that 41st and... jank. Dec 18 16:35:34 evancharlton: Exactly what I was thinking... Perfect timing. Dec 18 16:35:38 solution = make loading faster Dec 18 16:35:49 evancharlton: boo. k Dec 18 16:36:34 you'd think there'd be an android-support-v4-source.jar Dec 18 16:37:26 com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String[] out of START_OBJECT token at [Source: java.io.ByteArrayInputStream@6aba4211; line: 1, column: 1] Dec 18 16:37:43 tags = mapper.readValue(is, String[].class); Dec 18 16:37:45 lov - my manager wants an offline feel to an online application, and to that end he's annoyed that images, when scrolled, show a placeholder image for a few seconds while they're downloaded. He wants me to pre-load a few rows below the currently visible items so that "at a natural scrolling speed the experience is seamless" Dec 18 16:37:56 that's my try to databind Dec 18 16:38:40 Although I could probably take a different approach... I have the LIST of items and I have the amount of items in the gridview currently visible... I COULD just manually download the thumbs of the invisible items. Dec 18 16:39:43 You could manage that in your adapter Dec 18 16:40:00 Since you know which items have been shown Dec 18 16:40:52 aye... I'll have a look at it tomorrow. Dec 18 16:40:58 It certainly isn't a 5 minute job. Dec 18 16:41:47 but, here's an easier one - I want to replace the "check" icon on the top left of the actionMode contextual action bar with text Dec 18 16:42:09 I suppose I need to define a custom layout for it? Dec 18 16:42:15 No you don't Dec 18 16:43:43 There already is text (on some configurations) Dec 18 16:44:53 aye, but I want to get rid of the icon completely. Dec 18 16:45:05 I don't think you can Dec 18 16:45:10 but I'm not an expert on it Dec 18 16:45:27 that's what I said too, but the people signing my paychecks demand it to be done. Dec 18 16:45:31 iirc you can change the icon Dec 18 16:45:32 Has anyone gotten access to Testflight's Android beta? Dec 18 16:45:33 and who am I to question :( Dec 18 16:45:45 Not sure how that's going to help Dec 18 16:46:27 As far as I'm aware you can't change the text Dec 18 16:55:15 Jonathan_Eyre: you are right my problem was that I am using UBIFS. Which does not takes care about it (in my implementation). Android default mkfs_ext4 does. Dec 18 17:15:50 tinti: Does not take care of what? Dec 18 17:18:12 kroot: I think the mkubifs which comes from ubuntu (not in android build) will not perform one of the steps described in system/extras/ext4_utils/make_ext4fs.c Dec 18 17:23:05 i added an external library and tried using it, and i get java.awt.Dimension no class def. Dec 18 17:23:18 i did indeed add it to build path Dec 18 17:23:31 kroot: in after doing the fs it goes and set the proper permissions described in android_filesystem_config.h Dec 18 17:23:41 dagerik: an generic java library, or one known to support Android? Dec 18 17:24:14 "an generic"? too late for me... Dec 18 17:26:47 Leeds: im trying to use this: http://code.google.com/p/java-html2image/ Dec 18 17:28:01 dagerik: point is, Android doesn't implement any specific 'standard' Java profile, so unless it's known to work on Android, it's easy for it to be incompatible Dec 18 17:28:41 Leeds: javax.swing.* Dec 18 17:29:10 evancharlton: go fish? Dec 18 17:32:33 I don't know exactly which APIs differ... just that they do :) Dec 18 17:33:04 okay i got a picture in Picture object. how can i pass it as attachment on email intent? Dec 18 17:37:10 hi Dec 18 17:37:59 I have a listview in ListFragment but adding header makes it scrollable Dec 18 17:38:24 any hint how to avoid header scrolling? Dec 18 17:38:52 put the header outside of the listview Dec 18 17:39:25 Hello all, I am having a slight issue with my R file being missing. I checked the XML files and nothing is throwing fits at me. It just does not seem to want to come back. Any tips or Suggestions since this has been puzzling me for the last two days or so Dec 18 17:41:50 zilvarael: make sure all drawable hava correct names → check android console output Dec 18 17:42:24 Fisiu, Thank you I will look into that and get back to you ASAP Dec 18 17:44:35 Fisiu, Everything seems to check out. I even tried to redo the project from the ground up. Dec 18 17:44:52 hi all Dec 18 17:45:17 I am using absolute path for an so file in Android.mk Dec 18 17:45:30 absolute as /home/...... Dec 18 17:45:39 zilvarael: try disable autobuilding, clean project, then build and check console output Dec 18 17:46:02 Alright one moment. Dec 18 17:46:06 I was wondering if there is some sophisticated way to achieve the task Dec 18 17:48:56 Fisiu, Still having issues. and nothing is showing up in the android console. Dec 18 17:50:12 how do i launch an emulator with the skin/wrapper around it? Dec 18 17:50:21 from the shell, i mean Dec 18 17:50:48 why doesnt this work? it says File has no such contructor File(File, int). new File(Environment.getExternalStorageDirectory(), R.string.image_file) Dec 18 17:51:06 i thought the second parameter is the mode Dec 18 17:52:10 Because it has no constructor that takes a File and an int Dec 18 17:52:37 Fisiu, Fixed! It was an issue in my manifest XML. Dec 18 17:52:57 Thanks for the help! Dec 18 17:53:08 hi Dec 18 17:53:21 whats a good sdk book and ndk book? Dec 18 17:53:48 read the online stuff? Dec 18 17:55:13 is there an emulator 'debug' skin that has things like, a shell? Dec 18 18:20:29 how can i convert html to png? Dec 18 18:21:28 too bad you cant test nfc between two emulator instances Dec 18 18:22:06 i have to downgrade my nexus s to 2.3 to test pushing between ics/jb and gb Dec 18 18:23:28 g00s, thanks for that link yesterday, fonts do look better now... Dec 18 18:23:29 might as well flash ics to my galaxy nexus while im at it and use the nexus 4 for jb testing Dec 18 18:51:01 how I get in touch with google editorial team? Dec 18 18:51:03 anyone here has a clue? Dec 18 18:53:19 getting in touch with anyone at google for anything is very difficult Dec 18 18:53:29 most obvious channels have "don't contact us here" footnotes Dec 18 18:53:35 without proposing alternatives Dec 18 18:54:22 Hi Dec 18 18:54:35 I suspect the only feedback they're interested in is that which can be gathered programmatically - stars on an issue, automatically-submitted crash reports, telemetry data.. Dec 18 18:54:38 LordBeppo: howdy Dec 18 18:55:27 Can anybody give me some tips how to implement something like "step by step" tutorials into my application? Dec 18 18:55:35 speeder: no idea about your question, but curious -- what is the subject of interest? Dec 18 18:56:29 kbs I only want to ask them to review my apps Dec 18 18:56:40 I am sure they will want to feature at least one of them at some time Dec 18 18:56:47 (not necessarily this week) Dec 18 18:57:03 speeder: ah :-) Dec 18 18:57:21 actually now im wondering, would it even be worth implementing beam manually on 2.3? are there any devices that dont have upgrades to 4.0 or 4.1 that actually have nfc? Dec 18 18:57:41 it is kinda depressing to see my app racking good reviews from blogs and users, but the downloads not going in the same direction Dec 18 18:58:11 (and my revenue is only sufficient to pay for some coffee) Dec 18 18:59:13 speeder: well -- hope your apps eventually become a financial success; whether or not google decides to feature them. Dec 18 19:01:06 say i have an LruCache used for things like bitmaps Dec 18 19:01:17 what's a good way to find the max size Dec 18 19:05:11 kbs I too hope that, because right now my company is sinking lots of money on it Dec 18 19:05:17 and for now it is behaving only as a black hole for money Dec 18 19:06:13 is there a way to define a custom drawable in XML? like or ?? Dec 18 19:12:39 wtf. i did fastboot erase radio, fastboot reboot-bootloader, fastboot flash radio radio-crespo4g-d720sprkh1.img, fastboot reboot-bootloader Dec 18 19:12:52 and my radio version is still d720sprlf2 Dec 18 19:13:13 so i cant flash sojus-gwk74 Dec 18 19:14:12 sriramramani: not to my knowledge -- but in principle; you can create such drawables by simply parsing xml files in assets, no? Dec 18 19:14:49 kbs: in assets/ or resources? Dec 18 19:14:59 of course i can have one in res/xml/... Dec 18 19:15:14 but then i can't apply it in XML as.. "@drawable/my_custom_drawable" Dec 18 19:15:15 right? Dec 18 19:15:24 sriramramani: yep - that's correct Dec 18 19:15:50 what is the sort of special drawable you're trying to create? Dec 18 19:16:09 is that a reason for having the resources not extensible? and not being able to have a factory? Dec 18 19:16:33 My understanding is that there is a security hole there that they don't want to deal with. Dec 18 19:16:42 kbs: one of them needs to have bezier shapes.. and doing it at view's onDraw() doesn't make the drawable shareable Dec 18 19:16:50 eg: it could be used in icons and so forth, where they don't want to run arbitrary app-code Dec 18 19:17:03 sriramramani: gotcha. FWIW, I've used truetype to do that exact thing. Dec 18 19:17:39 another is having custom states with a state-list drawable.. that would change the opacity.. based on the state.. i can't do a "android:alpha" in drawable's xml Dec 18 19:18:05 kbs: ohh Dec 18 19:18:13 truetype? Dec 18 19:18:39 sriramramani: right. At least for things like vector drawing, I just create a truetype font -- truetype has vector primitives. Dec 18 19:18:59 and you draw the font? Dec 18 19:19:07 interesting :) Dec 18 19:19:17 correct. then I use it wherever needed. It won't do everything you are looking for, I think - but I've myself found it better than other solutions, at least for vector art. Dec 18 19:19:32 thats an awesome approach :) Dec 18 19:20:27 http://kbsriram.github.com/android-icon-font/ -- more details about a specific example, if this sort of idea makes sense :-) Dec 18 19:20:41 interesting! Dec 18 19:20:50 another sriram? ;) Dec 18 19:20:53 I've played with the svg library behind androidify Dec 18 19:21:03 it's not fast Dec 18 19:21:09 sriramramani: :-) happy coincidence, right? Dec 18 19:21:11 does anyone here not use an IDE such as eclipse or intellij or netbeans? is it possible to develop with vim? (my favourite editor) Dec 18 19:21:14 yup :) Dec 18 19:21:28 dagerik: yes, definitely possible. I've not done it =] Dec 18 19:21:38 I'm pretty sure there's ant behind the scenes of eclipse Dec 18 19:21:43 jrr: yeah. the truetype idea made more sense to me than svg, especially if the fonts were also used on the web. Dec 18 19:22:03 truetype is pretty well optimized in nearly all implementations Dec 18 19:22:27 someday android will have native SVG support and for a certain class of resource you'll be able to package one of those instead of all the different DPI versions Dec 18 19:23:30 yeah, I hope so too. The dpi bitmap thing is pretty silly, not to mention it doesn't "do the right thing" in general Dec 18 19:23:55 I have a big separate soapbox on dpi, but maybe another day :-) Dec 18 19:24:46 I'm on the soapbox with you Dec 18 19:24:54 maybe Dec 18 19:24:57 tell me about your soapbox Dec 18 19:26:38 The problem I see with dpi as in android at least, is two-fold. First, the "logical dpi" concept that android uses leads to different physical sizes, because it gets rounded to spec screen densities, rather than being accurate. Dec 18 19:27:06 so, "72dp" is not the same physical size on different devices Dec 18 19:27:21 second, it fails to account for the distance at with the device is vieweb by the user Dec 18 19:27:56 so, an app that uses 72dp on a tv is probably not gonna really want it to be the same as on a smartphone Dec 18 19:28:22 the bitmap-based scaling now adds to all the confusion, as you already know :-) Dec 18 19:28:52 what I'd like to see is (a) vector graphics, as you point out; and (b) the logical dp to refer to an angular size [like a css3 pixel] Dec 18 19:29:09 72dp on a television will be about the same visual size, because the TV's dpi calculation is based on assuming that people are sitting ten feet away or whatever Dec 18 19:29:36 also, vector art for icons is not the solution you think it is Dec 18 19:29:47 ctate: we never said icons Dec 18 19:29:50 drawables Dec 18 19:29:51 resources Dec 18 19:30:15 until low-dpi devices are all but gone, there will still be a need for hand-tweaked icons Dec 18 19:32:23 ctate: I'm not sure I agree with your #1 point either. If you want a different example, think tablets vs smart-phones; but from everything I see, the dp is scaled based on the dpi -- not the distance from the viewer. For instance, if I have a screen that happens to be 169dpi, it always gets quantized the same way -- regardless of whether it's for a tablet or for a tv screen. Dec 18 19:33:01 when you say "dpi" do you mean 169 dp? Dec 18 19:33:14 ctate: nope. I mean, a screen that physically has 169 dots per inch. Dec 18 19:33:30 oh oh i see Dec 18 19:33:41 a "160dp android line" will consume the same number of physical pixels, regardless of whether that screen is on a smartphone, or a tv Dec 18 19:33:52 when the physical part is used in different contexts, the device's build should identify as a different density Dec 18 19:34:21 ctate: that's the hack that I see in practice not actually being used, c.f. tablets vers smart-phonen Dec 18 19:34:33 that isn't a "hack"; that's the explicit intended use Dec 18 19:34:44 I'd love however, to see css3 style logical pixels -- this steps aside the whole question Dec 18 19:34:46 for example, the Nexus 7 and Nexus 4 declare different densities Dec 18 19:35:10 tv's are considered xxldpi? heh Dec 18 19:35:29 TVs are considered tvdpi Dec 18 19:35:35 (as is the Nexus 7) Dec 18 19:35:55 eh? Dec 18 19:36:04 whereas the Nexus 4, at almost the same pixel dimensions, is xhdpi Dec 18 19:36:28 as a practical case, all the standard buttons on my tablet are way too small - the reason again is that the available densities are quantized. So if you're unlukcy enough to get stuck at a physical dpi that's inbetween two logical densities, you get too big, or too small buttons Dec 18 19:36:30 instead of px or dp, we should all be using arcminutes Dec 18 19:36:38 kbs: which tablet? Dec 18 19:36:40 jrr: that's the css3 pixel Dec 18 19:36:40 jrr, interesting concept Dec 18 19:36:55 ctate: color nook Dec 18 19:37:00 every device would have a presumed distance from the user Dec 18 19:37:09 the problem with citing CSS3 is first that it doesn't exist, and second that it's a W3C spec :) Dec 18 19:37:27 jrr: that's essentially how it's [supposed to be] used Dec 18 19:37:44 ctate: it's not to mimic css3 - it's that it uses (i think) a useful concept that avoids quantized densities etc. Dec 18 19:37:48 this would also be a great hook for the user to control information density Dec 18 19:38:10 "zoom in" and "zoom out" for large print / detail / real estate desires Dec 18 19:38:27 kind of like using a dpi hack now Dec 18 19:38:48 kbs: mostly, it sounds like Barnes & Noble fucked up their tablet product and didn't do properly sized assets for it. Note that for example the Google-produced tablets use slightly larger button assets than would ordinarily be used, because people turn out to want them to be bigger on tablets (for not readily obvious reason) Dec 18 19:39:13 kbs: again, i'm not sure wha tyou mean by "quantized densities" Dec 18 19:39:24 dpi buckets Dec 18 19:39:27 you mean the buckets that Android defines? mdpi, hdpi, tvdpi, xhdpi, etc? Dec 18 19:39:33 ctate: correct. Dec 18 19:39:42 yeah, what happens if you have something akwardly in between two of those Dec 18 19:39:46 ==jrr Dec 18 19:39:58 in practice, everything kind of sucks if you have continuous ranges Dec 18 19:40:09 not if I have a knob for it Dec 18 19:40:18 yes, even if Dec 18 19:40:18 I can turn that knob in the direction I deem less sucky Dec 18 19:40:18 ctate: that's only because it's not using angular pixel dimensions :-) Dec 18 19:40:43 kbs: the problem is that artwork doesn't scale properly Dec 18 19:40:54 you need *different* artwork at different physical sizes Dec 18 19:41:07 for much artwork this is true, but not all Dec 18 19:41:18 for a surprising amount of it, actually Dec 18 19:41:23 ctate: hence (a) vector graphics, and (b) you *alreday* need to scale, if you have physical densities different from the buckets Dec 18 19:41:33 kbs: no, vector graphics are what has the problem Dec 18 19:41:34 seriously Dec 18 19:41:51 why do we even bother with vector fonts, then? Dec 18 19:42:01 ctate: I understand -- hence I use truetype, which allows for scaling and hinting and avoids a lot of the issues :-) Dec 18 19:42:10 see for example http://www.pushing-pixels.org/2011/11/04/about-those-vector-icons.html Dec 18 19:42:21 hinting is only a bit of the probelm Dec 18 19:42:46 [and bwahaha svg] Dec 18 19:42:59 svg is pig slow Dec 18 19:43:07 totally unsuitable for basically everything on mobile devices Dec 18 19:43:31 especially cases where you need drawing to be fast, like app icons Dec 18 19:43:41 JIT rasterize it Dec 18 19:43:45 ctate: I also think artwork is a bit of a strawman. The fundamental problem I currently see is simply that bucketing makes apps create controls of varying physical sizes, even on devices with the same size. Dec 18 19:43:47 just like you JIT your dalvik Dec 18 19:44:00 my app uses svgs for everything, and the build system rasterizes them for packaging. works great; you just have to know the limitations like that article above Dec 18 19:44:16 err, if the devices are the same size, then you only need one set Dec 18 19:44:22 or do you mean same pixel count but different densities? Dec 18 19:44:32 if you want to go all out with your assets, sure, reauthor them for every damn bucket, but most of us don't have the resources for that Dec 18 19:44:39 or do yo mean same physical size but different densities? Dec 18 19:44:51 ctate: the last. 2 smart phones, both 4 inches across. They have different densities. Dec 18 19:45:10 i mean, what a lot of people do is make xhdpi only and let that scale down on the fly for hdpi, and accept the quality loss Dec 18 19:45:42 again, I'm talking very simple stuff -- how easy is it to hit a button, not artwork, not nothing. Dec 18 19:45:57 also don't forget the not-irrelevant point that authoring good scalable vector artwork is harder than authoring pixmap artwork at a collection of sizes Dec 18 19:46:02 it's easy to hit a density that forces a button to get too small; forget artwork Dec 18 19:46:19 err, no? Dec 18 19:46:27 unless the devices are lying about their densities Dec 18 19:46:46 i dont know much about svq / css formats per se; but many web devs get over this using svg + media queries. i bet the tool chain could implement something like this also Dec 18 19:46:54 the whole point of densities is that when you ask for the nav bar to be 48 dp high, it's the same *touchable* size on all devices Dec 18 19:47:11 web devs get oer this by using Flash and hardcoding the size of their websites Dec 18 19:47:28 and by assuming that the site will be accessed by hardware 100x faster than smartphones Dec 18 19:47:36 these are not "solutions" Dec 18 19:47:41 ctate: a 48dp high target is too small to touch easily, on a device that happens to be on an inconvenient density vis-a-vis android's buckets. Dec 18 19:47:53 or 24 dp, or whatever the idea is. Dec 18 19:47:59 or 9dp text, and so on Dec 18 19:48:23 kbs: literally what you are saying is "buttons are too small on devices were the maker fucked up" Dec 18 19:48:28 this is not an Android problem. Dec 18 19:48:42 depends how you define android problem Dec 18 19:48:58 ctate: what the maker has, is to make the buttons either way too big, or way too small. again -- this is because their physical density forces them to pick one of the available buckets Dec 18 19:49:04 Android tells the vendors how to do this right Dec 18 19:49:14 if they don't, then what are we to do? Dec 18 19:49:28 kbs: no, what they're supposed to do is fudge their declared density so stuff is the right size Dec 18 19:49:58 examples of these devices would be good in this conversation. one example is the original Galaxy Tab, which samsung *deliberately* screwed up the density declarations of, to much travail. Dec 18 19:52:05 finally nokia's stocks are up Dec 18 19:52:29 does this dpi fudging cause resources to scale between the dimensions of their versions in different buckets? Dec 18 19:52:51 ctate: how would you fudge the density, for a device that has a physical density of 182 pixels per inch? Dec 18 19:53:13 you say it's 160dpi, mdpi Dec 18 19:53:36 Now, let's say I draw a line 160dp in my app. What would its physical size be? Dec 18 19:53:51 slightly longer than an inch Dec 18 19:54:23 actually hm, am i backwards? it'd show slightly smaller? Dec 18 19:54:26 nope. It would be about 10% shorter than an inch. Because, the framework actually draws 160 pixels Dec 18 19:54:32 ie, it's 0.9 inches. Dec 18 19:54:37 yeah, if necessary you could bump it up to tvdpi Dec 18 19:54:48 This, in essense, makes every conrol about 10% smaller than it should be Dec 18 19:54:58 is tvdpi a "legal" keyword in apps? Dec 18 19:55:02 of course Dec 18 19:55:15 I though the Google TV was a 3.2 branch Dec 18 19:55:18 introduced in Android 3.2. http://developer.android.com/about/versions/android-3.2.html Dec 18 19:55:20 this is the root of the problem. There is no "the device manufacturer screwed up" issue here. Dec 18 19:55:40 kbs: you want calibrated metrics? unlike every other computing platform? Dec 18 19:55:57 try working on Macs for a while, for a real giggle Dec 18 19:56:22 the guidance for vendors is that they should nominally use the "nearest" bucket Dec 18 19:56:41 ctate: I fully understand :-) what I'm tryign to point out, are two things. Dec 18 19:56:54 but that stuff should still be properly accessible, and if it isn't then they should go up a bucket to preserve usability Dec 18 19:57:15 1) The guidance leads to controls that basically end up being too small, or too large [both usability issues.] Dec 18 19:57:26 vector art will be viable when we have 50x faster phones with 600 dpi screens Dec 18 19:57:55 and still wont' necessarily be ideal, because although the busy detail will be there when drawn small,that's still not the best design :) Dec 18 19:58:05 too large is not much of a usability issue Dec 18 19:58:14 ctate: does that follow Moore's law? Dec 18 19:58:19 belgianguy: not so far Dec 18 19:58:30 2) There is an alternative. Why not use something like angular pixels or something else, to allow a more consistent way to let apps work well across physical densities, and device distance. Dec 18 19:58:34 cpu speeds yes, battery emphatically no, and screens are slow as well Dec 18 19:58:37 ctate: pulseaudio 3 is out :) maybe linux audio problems are over bwahahaha Dec 18 19:58:47 kbs: because scalable artwork is a nonstarter. Dec 18 19:58:56 g00s: bwhahahahaha Dec 18 19:59:05 Samsung seems to create a larger screen in each new device it seems Dec 18 19:59:12 ctate: whether you guys choose to do #2 or not is of course your prerogative; but at the very least, you can't vehemently oppose #1 as a vendor screw up :-) Dec 18 19:59:20 belgianguy: i hear the next Samsung phone is a 21" monitor Dec 18 19:59:20 I discovered today I'm one of the users for whom pulseaudio just works Dec 18 19:59:35 I expect the world to end soon Dec 18 19:59:51 ctate: last I read was 5" Dec 18 20:00:01 but a subpar resolution Dec 18 20:00:11 kbs: 1. is a compromise between screwing over developers and not allowing arbitrary device form factors. Dec 18 20:00:30 2. is currently unworkable Dec 18 20:00:59 but isn't android the one OS to find its way into all kind of screens? Dec 18 20:01:03 [and has its own inherent issues anyway; read the blog post i linked] Dec 18 20:01:19 alas i have to scoot for a bit Dec 18 20:01:41 esp with N-screens in the pipeline Dec 18 20:01:52 I've indeed looked quite a bit at vector formats, including issues mentioned, and the article posted ;-) Dec 18 20:01:55 tvdpi might find its way to regular tablet/phone apps Dec 18 20:02:05 just to stream an adequate picture Dec 18 20:02:14 and not a pixelated jumble of colors Dec 18 20:02:40 most actionbar icons seem ripe candidates for vector Dec 18 20:03:11 monochromatic, no gradients, no detail added or removed between buckets in the current system Dec 18 20:04:05 there's one place where, if performance/power requirements could be met, the 10%-too-big/10%-too-small issue could go away Dec 18 20:04:23 what database is used in android Dec 18 20:04:25 I'd argue that small monochromatic things would render quickly enough (just like _fonts_ ) Dec 18 20:04:34 but even if not, they could be JIT-rasterized Dec 18 20:05:05 jrr: :-) that would be neat. I do want the size-mismatch to go away; that's the place I see the most craziness. Dec 18 20:06:19 the artwork -- well, it's what it is; and my thought is that it's orthogonal to having consistent sizes across devices. But hey :-) them's the breaks, and you do what you can Dec 18 20:06:47 a year and change ago I began playing with android dev, and wedged the android-svg lib into the venerable com.kmagic.solitaire Dec 18 20:06:54 kind of lost interest and ignored it for a year Dec 18 20:07:11 then two weeks ago I got a nexus 4 and nexus 10, both with ridonculous DPI Dec 18 20:07:18 ran my old solitaire app and it looks great Dec 18 20:07:49 nice. I was never fond of svg; but sounds like you did something pretty cool with it. Dec 18 20:08:07 but to be fair, the performance isn't great Dec 18 20:08:17 I played around with caching bitmaps to get around that Dec 18 20:08:49 ah, yeah -- you mentioned that before. sounds like a neat project. Dec 18 20:09:48 is there a GPU equivalent of Moore's Law? Dec 18 20:10:01 as isn't the Tegra 4 much more powerful as the Tegra 3? Dec 18 20:10:23 belgianguy: the recent leak says 6x performance Dec 18 20:10:29 tegra 3 hurts for memory bandwidth Dec 18 20:10:40 yeah, so at what point is vector 'doable'? Dec 18 20:10:44 moore's law describes transistor density - that applies to both CPU and GPU Dec 18 20:10:46 or is battery the factor? Dec 18 20:11:35 I think it's doable when there's a robust implementation in skia and they decide to punch a whole throught he android application API to get to it Dec 18 20:11:36 btw jrr on the svg lib, I made a pet project like that too Dec 18 20:11:50 I think (ctate's objection atleast) to vector is more to do with whether you can get graphics that look as nice, compared to a bunch of different bitmaps at different resolutions. Dec 18 20:11:55 as I foresaw myself creating apps for bigger screens, and would like them to auto-adjust Dec 18 20:12:19 kbs: even with bitmaps some people just have no taste or graphical skills Dec 18 20:12:41 vector will never blur or pixelate Dec 18 20:13:21 at very low pixel densities you have to worry about how it will rasterize, and at varying physical sizes you have to choose how much detail you want Dec 18 20:13:36 on an icon that is a page of text, how many lines of text do you attempt to draw? Dec 18 20:13:39 do you make little letters, or just lines? Dec 18 20:13:42 jrr: even now you can already exclude devices on screen size Dec 18 20:13:46 I'd call that "information density" Dec 18 20:14:02 and the actionbar is smart enough to display text only if it has the extra space Dec 18 20:14:49 belgianguy: what jrr said; and also the link that ctate posted earlier has more examples. at any rate; I should get off the soapbox, I blame jrr for getting me on it. ;-) Dec 18 20:15:20 I think such discussions are healthy Dec 18 20:15:37 and one way or another, vector will find its way in I think Dec 18 20:15:54 where's ctate's link btw? Dec 18 20:15:55 it's already in, in a few ways - SVG in chrome, vector fonts Dec 18 20:15:59 ShapeDrawables Dec 18 20:16:14 belgianguy: http://www.pushing-pixels.org/2011/11/04/about-those-vector-icons.html Dec 18 20:17:33 another aspect of the bmp-vs-vector argument is amenability to hardware acceleration Dec 18 20:17:39 bitmaps can become textures in vram Dec 18 20:17:52 that favors bitmap Dec 18 20:18:02 blah blah blah hinting blah Dec 18 20:18:20 but for applications when the vector image not be transformed at runtime, it can be rasterized at install or startup, and then enjoy all the bitmap benefits at runtime Dec 18 20:18:41 *need not be Dec 18 20:19:01 okay, maybe I'll step off the soapbox too. Dec 18 20:19:48 jrr: bah .. this is all pretty silly .. it's been done for decades with vector fonts .. you render and cache the result Dec 18 20:20:32 oGMo: I know, right?! Dec 18 20:20:57 I think it's a mistake to label it as impossible, even that blog doesn't do that Dec 18 20:21:04 it's still utterly boggling to me why SVG isn't in the base android sdk Dec 18 20:21:10 it ends with "SVG not yet" Dec 18 20:21:12 or tinysvg/etc Dec 18 20:21:25 yes! another supporter! Dec 18 20:21:26 belgianguy: the blog is mostly blathering afaict Dec 18 20:21:30 let's all fork android Dec 18 20:21:35 like oGMo alluded to; the tools could rasterize and package the final pngs Dec 18 20:21:41 (cache the results) Dec 18 20:21:48 g00s: no .. you rasterize _at runtime_ and cache Dec 18 20:21:50 g00s: yeah, why not when installing Dec 18 20:22:00 ah Dec 18 20:22:10 oGMo: or that if you can :D Dec 18 20:22:11 otherwise you're still packaging 20 million images and you don't support whatever device came out 15 minutes ago Dec 18 20:22:22 I suspect it'd be lazily - rasterize each on first use, rather than bogging down install process Dec 18 20:22:24 I've sometimes used different vector art at different physical sizes (vis-a-vis some of the issues raised in that blog post.) Dec 18 20:22:47 jrr: yeah .. and you can even precache stuff you want immediately on startup .. write a local cache if you want so you don't have to do it more than once Dec 18 20:22:59 but if you don't render with device specs you're still going to be off Dec 18 20:23:17 I think SVG is a prime candidate, but just needs a critical look for use on mobile devices Dec 18 20:23:20 oGMo: it would be crazy, but the market could also do it when the user downloads Dec 18 20:23:28 there's apparently svg-android now, so probably not hard to do Dec 18 20:23:32 you have an X dpi device; here is an apk with those assets Dec 18 20:23:43 g00s: that would be highly unnecessary Dec 18 20:23:46 oGMo: yeah, there's a fork of it which introduces some upgrades Dec 18 20:23:48 overcomplicated Dec 18 20:24:04 i thought the market already modifies the apks in some case Dec 18 20:24:08 plus, what if you want to render from a single source and produce multiple images? i.e., different colors/sizes etc Dec 18 20:24:10 as the original introduced artifacts on tinysvg converts Dec 18 20:24:10 svg isn't a bad choice for some graphics. Dec 18 20:24:28 I think it can really shine in the N-screen era Dec 18 20:24:38 svg isn't perfect ubt there are tons of tools and stuff like tinysvg should be pretty easy to support Dec 18 20:24:43 where I can choose whether to launch on my phone/tablet/TV Dec 18 20:25:03 and that covers a big spectrum of sizes Dec 18 20:25:24 * michaelnovakjr already uses some svg in certain cases. Dec 18 20:25:32 i do too Dec 18 20:25:36 belgianguy: exactly .. this is why it boggles me it wasn't a day 1 consideration, especially with android's clear multi-device-spec target Dec 18 20:26:01 oGMo: same here, I see Android as the software for "Things" Dec 18 20:26:04 someone didn't have their coffee that day Dec 18 20:26:12 separate issue; i'm dissapointed that inkscape hasn't released anything since aug last year Dec 18 20:26:20 no bug fixes, etc Dec 18 20:26:25 SimonVT: do you do torrentToise support on IRC / query ? :) Dec 18 20:26:28 g00s: wow they haven't? suckage .. they were churning out stuff for quite awhile Dec 18 20:27:41 hi. i would like to start with open GL ES 2 for android. already started with a triangle which works for me. but squares so far dont work. all tutorials i found for android were for a deprecated opengl version Dec 18 20:27:52 can anyone help me out here with the square class? Dec 18 20:27:57 Tashtego: learnopengles.com Dec 18 20:28:05 uhm, can anyone take a look at this and suggest reasons why I might be getting a NoSuchElementException? I can iterate over the list in the callback register method, but not later Dec 18 20:28:05 http://pastie.org/5549102 Dec 18 20:28:46 does it have something to do with iterating inside of a runnable? Dec 18 20:29:03 if so, what is the appropriate way of accomplishing that Dec 18 20:29:16 THANK you belgianguy! Dec 18 20:29:19 i try that! Dec 18 20:29:35 Hello. I'm using a Twitter API in my application. Upon logging into Twitter and returning to the main View of the android application, the GUI elements are not updated until I turn the orientation of the phone's screen. Anyone know why this is? Dec 18 20:29:36 they're pretty good, and detailed Dec 18 20:29:55 Having terrible issues here Dec 18 20:29:57 mrsudoer: try calling invalidate on your view Dec 18 20:30:10 I'm inflating a view so I can create a 1000x1000 bitmap from it Dec 18 20:30:20 I want my MTV/SVG Dec 18 20:30:31 thanks enneract|laptop, that sounds familiar, I'll give it a shot Dec 18 20:30:40 so i inflate the view.. then I want to animate some stuff to get rorate on < API 11.. but calling startAnimation doesnt seem to do it.. the view is never displayed on the screen Dec 18 20:30:45 on purpose that is Dec 18 20:30:51 Money for nothing and effects for free Dec 18 20:30:51 ..I took a break from programming in java/android and am a little hazy on this stuff haha :/ Dec 18 20:30:52 i will try them at once. if i may ask another one, belgianguy, do you think its better to start with pure opengl or use a framework? i tried libgdx but it was very buggy for me Dec 18 20:31:06 Tashtego: depends on your needs Dec 18 20:31:10 hi, a have button inside RelativeLayout and setOnClickListener to button, and layout, but i cant receive click from user from layout and button in the same time Dec 18 20:31:15 you know how to do it? Dec 18 20:31:19 frameworks shield you from the nitty gritty details Dec 18 20:31:22 simple 2d game like "fleet commander" - chess like Dec 18 20:31:34 but IMO it helps to know what happens Dec 18 20:31:40 OpenGL can do 2D too Dec 18 20:31:40 enneract|laptop: are you able to move your .next() outside the post(Runnable) call? as it stands, (as you guessed) it's going to do very weird stuff :-) Dec 18 20:32:16 kbs: yay more objects, lol. Dec 18 20:32:23 if all my coordinates are with a z coordinate of 0.0 its 2D i guess. maybe depends on the cam position, too. but did you already try any framework? Dec 18 20:32:31 is there a good one that is worth using it? Dec 18 20:32:40 for a simple "tetris clone" or stuff like taht? Dec 18 20:33:05 kbs: you were right, shoving it inside a new final instance of the interface worked Dec 18 20:33:31 * hackkitten idly wonders whether the SDK emulator finally got more speed than a 100 MHz Android device yet Dec 18 20:33:45 nope Dec 18 20:33:50 Anyone any idea how to do this? 2 problems.. Animation doesnt result in end bitmap 2. image quality is poor: http://pastebin.com/KHvdCMGr Dec 18 20:33:50 :< Dec 18 20:34:12 they have been talking about upgrading it from 'suckiness' to 'doesn't suck so bad', but now I'm feeling all sad Dec 18 20:34:14 hackkitten: yes, it runs really fast on my OC'd 6.4GHz 16-core xeon Dec 18 20:34:20 :D Dec 18 20:34:28 I guess I should look into Android-x86 again, right? Dec 18 20:34:55 * hackkitten her Android phone just decided to go tits-up Dec 18 20:35:03 get a new one? Dec 18 20:35:14 no money Dec 18 20:35:18 need to have it repaired Dec 18 20:35:22 takes time and money Dec 18 20:35:42 oh the comment is wrong in the pastebin btw.. I want -9 degrees as in the code Dec 18 20:36:03 hackkitten: Windows or Linux? Dec 18 20:36:24 Intel Atom Image of Android can give you quite some speed gains Dec 18 20:36:39 (ofc requires Intel CPU :/) Dec 18 20:36:40 Windows Dec 18 20:36:48 Q6600 CPU :) Dec 18 20:37:26 hackkitten: I believe for Windows it's called HAXM Dec 18 20:37:40 (I'm on Ubuntu) Dec 18 20:37:51 I see :o Dec 18 20:38:04 any ideas chaps? http://pastebin.com/KHvdCMGr Dec 18 20:39:34 hackkitten: http://www.youtube.com/watch?v=99Er3i4siWw Dec 18 20:40:45 hackkitten: phone dead or just sw error? Dec 18 20:41:15 loose USB connector Dec 18 20:41:18 won't charge any more Dec 18 20:41:50 got to send it in for warranty, meaning I'll not have access to it for a month or more Dec 18 20:43:19 :/ bummer Dec 18 20:45:09 yup :( Dec 18 20:45:15 kinda wish I had a replacement phone Dec 18 20:45:23 if only a Droid 1 :) Dec 18 20:45:57 I'm clinging to my Xperia Mini Pro, (barealy) running 4.1.1 Dec 18 20:46:09 barely* Dec 18 20:46:27 i need help converting html to png. anyone done this? Dec 18 20:46:57 hackkitten: don't shops provide an "inbetween" phone when yours goes in for repairs? Dec 18 20:47:11 dagerik: html to png? Dec 18 20:47:16 screenshot ? Dec 18 20:47:18 some might... not sure Dec 18 20:47:27 dagerik: i dont even Dec 18 20:47:47 Is it even possible to animate layouts on a view thats been inflated but not displayed Dec 18 20:47:52 added to the list Dec 18 20:48:13 Its the only way I can think of to rotate a layout pre API 11 Dec 18 20:48:21 meteor strike / LHC black hole / Jesus comes back / Iran nukes / HTML to PNG Dec 18 20:49:16 belgianguy: sure, it would be like a screenshot Dec 18 20:49:45 can't a webview produce a bitmap of some sort? Dec 18 20:50:02 i tried, will little success Dec 18 20:50:23 http://unicornsoftware.com/products/2012/htmltopng/v2 Dec 18 20:51:12 dagerik: http://stackoverflow.com/questions/10009265/rendering-android-webview-to-bitmap-html5-javascript-callback-issue Dec 18 20:51:41 hackkitten: or some second hand thing you could flash a custom rom to? Dec 18 20:51:56 or a chinese brandless Android Dec 18 20:52:06 lov +1 Dec 18 20:52:08 I'm using a SeekBar, but the thumb is not on the line... any idea what properties I have to set to get this to work? Dec 18 20:52:41 belgianguy > I'm open for suggestions, though keep in mind that I have almost no money to spend :( Dec 18 20:54:36 hackkitten: if you are in the US, check craigslist. you can get someting relatively old or beat up for cheap (I saw a HTC Desire Z in my area for 50$ last week) Dec 18 20:54:55 also, craigslist is #1 fence Dec 18 20:55:25 you say that like it is relevant Dec 18 20:55:54 I'm in the Netherlands, enneract|laptop Dec 18 20:55:58 enneract|laptop: well, it explains why some items are so cheap :) Dec 18 20:56:14 and used phones are still bloody expensive last I checked around here =/ Dec 18 20:56:15 but I didn't want to enter "holier than thou" territory Dec 18 20:56:29 you'd think that with everyone getting a new phone every 1-2 years they'd be cheap as dirt, but no~ Dec 18 20:57:02 hackkitten: maybe a rude question, but do you have a ceiling on the phone budget? Dec 18 20:57:24 anyone use seekbars? Dec 18 20:58:17 belgianguy > I spent over 200 Euro on this phone earlier this year, but right now I'd like to keep it <100 Euro Dec 18 20:58:53 I just checked, and the T-Mobile store where I bought my phone is closed. Could still send them an email, but hopefully they can help me Dec 18 20:59:56 hackkitten: on or off contract? Dec 18 20:59:59 I'm assuming off contract Dec 18 21:00:24 lov > sim-only contract Dec 18 21:00:46 contract is not with t-mobile Dec 18 21:01:26 hackkitten: something like this? http://www.aanbod.be/telecom/gsm-overige/thl-a1-android-smartphone-3-0-mp-camera-3-5-inch-3271765.html Dec 18 21:01:46 it seems to be a brandless thing, so it might not work all that great Dec 18 21:02:10 did you buy your phone in a chain warehouse? Dec 18 21:02:41 nah, online Dec 18 21:02:53 that phone you linked to looks like, except for the display... Dec 18 21:03:08 Android 4.0 but a low-res display? Dec 18 21:03:09 hah~ Dec 18 21:04:34 hackkitten: yeah, for that price I wouldn't expect a lot, but when you have to make ends meet, it could work Dec 18 21:05:21 * hackkitten nods Dec 18 21:05:26 or ask around for a dev device, maybe someone has one gathering dust :) Dec 18 21:05:34 yeah, I'm asking around :) Dec 18 21:05:46 Anyone any good with creating bitmaps from views? Dec 18 21:05:57 I guess I'll try looking around for a proper screw driver tomorrow... I should be able to resolder this connector Dec 18 21:06:02 if nothing has snapped off, that is Dec 18 21:06:15 is it visibly loose? Dec 18 21:06:25 from what I can see, yes Dec 18 21:06:32 it seems to move more than it should Dec 18 21:06:36 ah okay, then a soldering is in order Dec 18 21:06:42 * hackkitten nods Dec 18 21:06:55 I have resoldered such connectors before, so that's not the issue Dec 18 21:07:05 it's getting to the actual soldering joints :P Dec 18 21:07:29 hackkitten: what kind of phone is it? Dec 18 21:07:35 I have my htc vision disassembled in order to replace the micro usb port Dec 18 21:07:48 belgianguy > Huawei U8850 Dec 18 21:07:52 and it's resisting my attempts to desolder Dec 18 21:08:04 like they used some kind of magical super high melt point solder Dec 18 21:08:11 jrr > heat is being sucked into the ground plane, is my guess Dec 18 21:08:22 that's usually the issue Dec 18 21:14:41 Is anyone here for-hire as a tutor? I need help with an Android assignment for my Java class. Dec 18 21:15:03 is phonegap a good option Dec 18 21:15:08 buttbutter: willing to pay upwards of $100/hr, 2 hr minimu? Dec 18 21:15:08 buttbutter: no Dec 18 21:15:12 I just started on some Android development... Going through the official First App tutorial right now, but had some questions. Can anyone explain to me what this "R" object is? Dec 18 21:15:19 buttbutter: from /topic - | Please no advertising or job solicitation | Dec 18 21:17:10 evancharlton: Sorry; wasn't paying attention. Dec 18 21:17:26 buttbutter: neither here nor in class, we see ;-) Dec 18 21:18:39 well "I thought the world would end" might fly as an excuse for once Dec 18 21:19:14 also, badum tsh > evancharlton Dec 18 21:20:41 and lov, shame on you :p Dec 18 21:21:15 maybe we should create #android-homework Dec 18 21:22:30 followed by #android-plzwritemyappforme Dec 18 21:22:55 and fill it with bots, which repeat your question in a slightly different way Dec 18 21:23:38 Maurits_: no kidding, I've helped a person with getting started Dec 18 21:23:45 and by now have written over half his app Dec 18 21:24:06 hahuang65: R is an object that holds the ID's for all of your resources that you drop into your eclipse project. Dec 18 21:24:06 problem is, he's getting paid for it, and I can't say no Dec 18 21:24:08 belgianguy: a rookie mistake Dec 18 21:24:30 MastaFlash: not using Eclipse Dec 18 21:24:42 ah.... well then, still the same thing. Dec 18 21:24:53 it's a generated class. Dec 18 21:24:59 but it's getting out of hand, he doesn't even try to get it, he doesn't even suggest a way forward Dec 18 21:25:04 "you do it" Dec 18 21:25:20 belgianguy: >_> Dec 18 21:25:28 so yeah, I just decided that isn't going to fly anymore Dec 18 21:25:32 hahuang65: then it happens during build-time, it reads out all the stuff specified in your res/ folder Dec 18 21:25:35 belgianguy: there comes a time where you just type /close and leave him be. Dec 18 21:25:45 MastaFlash: indeed Dec 18 21:25:49 and generates ids for it in R.java so you're able to refer to it in code Dec 18 21:25:57 *to them Dec 18 21:26:02 Maurits_: gotcha Dec 18 21:26:56 MastaFlash: Thanks Dec 18 21:27:07 belgianguy i love that tutorials ;) Dec 18 21:27:29 my main activity extends FragmentActivity, which contains ListFragment Dec 18 21:27:30 Tashtego: it's one of the few, but great OpenGL ES 2.0 tutorials Dec 18 21:28:07 choosing item from list allows to start new Fragment Dec 18 21:28:17 i dropped mp3 file in res/raw. how can i make it accessible and also make it appear in R.java? im using terminal only Dec 18 21:28:34 jsharkey you here Dec 18 21:29:01 dagerik: R.raw.tune Dec 18 21:29:06 if tune.mp3 is the file Dec 18 21:29:06 how can I implement pageviewer for those fragments? Dec 18 21:29:16 belgianguy i also checked out the free git source code of the open gl es book mentioned as commercial on the right. and now i even have a particle example! ;) Dec 18 21:29:18 great Dec 18 21:29:33 Fisiu: I assume you're talking about ViewPager, in which case you'd RTFM Dec 18 21:29:36 Tashtego: what book is that? Dec 18 21:29:45 http://www.amazon.com/gp/product/0321502795/ref=as_li_ss_il?ie=UTF8&tag=digipom-20&linkCode=as2&camp=217145&creative=399349&creativeASIN=0321502795 Dec 18 21:30:01 dagerik: and R will index that automatically Dec 18 21:30:07 if you click on "look inside" Dec 18 21:30:12 the git repo is mentioned ;) Dec 18 21:30:16 free sourcecode *g Dec 18 21:30:23 don't touch it, just put it in the folder, and R will know Dec 18 21:31:03 you might be able to generate it manually with some special ant command Dec 18 21:31:33 dunno, you should check the build.xml if there's a target for it Dec 18 21:31:35 source: http://www.opengles-book.com/ Dec 18 21:31:53 code: http://code.google.com/p/opengles-book-samples/source/browse/#svn%2Ftrunk Dec 18 21:32:10 belgianguy: thanks. that worked out nicely Dec 18 21:32:52 shiet, my phone now plays an mp3 file and i cant stop it. i guess i should have done that in onStop Dec 18 21:33:09 dagerik: yeah, esp if you put such things in a thread Dec 18 21:33:13 make sure you kill it Dec 18 21:33:29 I had a synth space loop playing for a while Dec 18 21:37:41 i am done for today. thank you again belgianguy. hope to see you next time ;) Dec 18 21:37:59 Tashtego: glad to help Dec 18 21:50:47 hello. how do i know which drawable (based on device dpi or size) is chosen by android using eclipse ? Dec 18 21:51:07 is there a simple way ? Dec 18 21:51:23 depends on what device you run it Dec 18 21:51:27 j0p: depends on your screen size Dec 18 21:51:34 eg your emulator Dec 18 21:51:37 j0p: not chosen by eclipse, chosen by android at runtime Dec 18 21:52:35 yes i mean...i'm using eclipse and im a newby experimenting with various emulators. is there a log or any other way to know which drawables are chosen by android on a specific emulator ? Dec 18 21:53:09 j0p: well, yeah, if you set the emulator to have an hdpi screen Dec 18 21:53:18 then it'll pick the hdpi drawables Dec 18 21:53:33 isn't there a nodpi as well? Dec 18 21:53:41 j0p: if you set it to have a screen which conforms to xlarge, then it'll pick the xlarge drawables Dec 18 21:55:23 ok but...let's say i'd just like to know which drawables are chosen starting the emulator with different (even non-standard) sizes. i'd like to know which drawables are actually chosen Dec 18 21:57:07 j0p: well, the dpi class is set directly Dec 18 21:57:45 j0p: which screen size class (assuming you're not using 3.2+ screen size qualifiers) corresponds to which size you can find at http://developer.android.com/guide/practices/screens_support.html Dec 18 21:58:26 ohh that's a nice reference. thank you :) Dec 18 22:09:00 hi Dec 18 22:09:09 does anyone here use apktool Dec 18 22:09:11 ? Dec 18 22:18:06 Hi folks, I have a service that I start with startService(), and then later bind to. It does network operations in the service itself (connects to a telnet-like server) and I need it to maintain connection until I close it. Unfortunately as I change orientation, I lose connection, or maybe the handle or something. I may not know what to search for on google, but I've tried every search I can think of on this. Dec 18 22:18:23 How can I figure out if my activity is just losing the link, or if it's the service that's getting restarted or soemthing? Dec 18 22:18:28 damccull, bind to your service again Dec 18 22:18:38 damccull, also, ctivity is losing the service on rotate Dec 18 22:18:57 pfn so the service is still there, but I need to rebind to it? Dec 18 22:19:14 damccull, depends, if you unbind to it, the service exited Dec 18 22:19:32 I thought it doesn't exit if you start with the onStartCommand Dec 18 22:19:43 no Dec 18 22:19:48 but if data is received while rotating, it is lost (as there is nothing bound) Dec 18 22:19:50 it doesn't exit if you use startService() Dec 18 22:20:00 belgianguy, that depends on how your service is pushing data to activity Dec 18 22:20:10 pfn: you could cache it, true Dec 18 22:20:12 belgianguy, the service could simply store it in a local queue that the activity queries Dec 18 22:20:26 I am reading data in an asynctask within the service and using localbroadcastmanager to push it as a string extra to the activity Dec 18 22:20:36 in that case, you can very well lose it Dec 18 22:21:31 pfn so i should store the input in the service and pull it from the activity? I was trying to avoid polling from the activity Dec 18 22:21:35 damccull: like they said: the service won't be interrupted by the configuration change Dec 18 22:21:48 damccull, it depends Dec 18 22:21:58 damccull, you can use the service to broadcast the notification that new data is available Dec 18 22:22:02 but by default your activity will be torn down and replaced with a new instance, which might well make you lose a member variable that held the binding Dec 18 22:22:06 re-bind in onStart() Dec 18 22:22:19 damccull, as for polling, just do an immediate poll for data when you bind, then poll data everytime you receive a broadcast Dec 18 22:22:30 or take advantage of the retain patterns to keep the binder instance across the configuration change relaunch Dec 18 22:22:34 ctate, need to unbind in onStop or else it leaks? Dec 18 22:22:52 nah Dec 18 22:23:04 the instance gets torn down and the binder gets unhooked at finalization time Dec 18 22:23:15 ctate which 'retain patterns' are you referring to? Like savestate? Dec 18 22:23:24 onRetainInstanceState() Dec 18 22:23:28 and the fragment equivalent Dec 18 22:23:31 take your pick Dec 18 22:23:40 (fragments are the way of the future) Dec 18 22:23:41 i saw something about onretaininstancestate being replaced by loaders? Dec 18 22:23:44 right Dec 18 22:23:53 or hell, keep the binder in a global variable Dec 18 22:24:02 whatever works best for you Dec 18 22:24:32 Hmm. If I do all this in a fragment instead of activity will it just keep everything alive and reattach the fragment to the new place on orientation change? Dec 18 22:25:52 guys does anyone use apktool Dec 18 22:26:05 damccull, yes Dec 18 22:26:33 damccull: setRetainInstance(true) is what works for Fragments Dec 18 22:26:39 headless fragments even Dec 18 22:27:21 Let me google headless fragments and setRetainInstance. Thansk guys, I'll probably be back for more later :D Dec 18 22:27:32 and you'd have to "find" the fragment when changing orientation Dec 18 22:27:53 what happens to the data when the orientation starts I don't know Dec 18 22:28:07 does headless fragments have another name? :) Dec 18 22:28:15 perhaps in onPause tell the fragment the UI is going down, so updates should be cached Dec 18 22:28:40 which would get priority in onResume, before just waiting on Listeners again Dec 18 22:28:53 damccull: fragments without UI Dec 18 22:29:12 therefor always dynamic Dec 18 22:29:13 belgianguy, thansk Dec 18 22:30:29 So just to verify, orientation changes call ondestroy and oncreate right? Dec 18 22:30:35 in my activity Dec 18 22:30:37 yes Dec 18 22:30:51 thanks Dec 18 22:32:06 If I set a class level variable mWasBound = false, then when binding set it true, and after orientation change check that variable, will it be true or false? Dec 18 22:32:57 in what? Dec 18 22:33:01 in the fragment? true Dec 18 22:33:26 in the activity? Dec 18 22:33:30 false Dec 18 22:33:35 new activity instance Dec 18 22:33:44 so the activity class is reinstantiated? Dec 18 22:33:55 thank Dec 18 22:36:04 will the following always refer to the same instance of a service once it's started? mServiceIntent = new Intent(this, ConnectionService.class); Dec 18 22:36:18 like if i send that intent after orientation change to bind, will it go to the right place? Dec 18 22:36:36 damccull: yep Dec 18 22:36:51 So there will only be a single instance of the service always? Dec 18 22:36:51 that's the entire point of the Intent system :) Dec 18 22:37:12 I think so, yes Dec 18 22:37:15 nice. Dec 18 22:37:17 thanks man Dec 18 22:37:22 actually I'm pretty sure of it Dec 18 22:37:24 but would it drop the current one and reinstate Dec 18 22:37:32 or drop the new Intent? Dec 18 22:37:48 I think it'll just deliver it to the running one Dec 18 22:38:25 or it could depend on service flags, let me see Dec 18 22:39:06 So. Fragments. Can I communicate directly to a service from one or is it accepted practice to communicate with the hosting activity and make the activity a go-between? Dec 18 22:40:03 Activity houses the Fragment, Fragment houses the Service IMO Dec 18 22:40:53 Maurits_: ah yeah, the onStartCommand return values Dec 18 22:41:03 START_STICKY etc Dec 18 22:41:49 belgianguy, so bind and work in the fragment is ok and not against generally accepted practices? Is that just for inter-fragment communications? Dec 18 22:42:16 well I'd bind in the thing I knew was not going anywhere when I rotate :) Dec 18 22:42:28 but I don't know what you're cooking Dec 18 22:42:36 eg if there are more Fragments etc Dec 18 22:42:42 so I could be wrong Dec 18 22:43:19 damccull, doesn't matter, you can do it in fragment or in activity Dec 18 22:43:55 so a manual queue would still be advisable IMO Dec 18 22:44:11 as the Handler/Looper of the original Activity probably go down with it Dec 18 22:44:19 yeah, if you run startService multiple times you'll just trigger onStartCommand multiple times Dec 18 22:44:27 at the service side Dec 18 22:44:31 you won't trigger a restart Dec 18 22:44:37 money Dec 18 22:45:06 I'd personally do it in the activity Dec 18 22:46:04 Maurits_: and have the Service keep its own state during the "dead" period (one act going down and another getting created)? Dec 18 22:46:58 eg a UDP stream of position packets Dec 18 22:47:21 (where losing some data isn't a disaster) Dec 18 22:47:30 what if losing data IS a disaster? Dec 18 22:47:35 store it in the service Dec 18 22:47:38 let's say gamestate over TCP Dec 18 22:47:39 you already got that answer earlier Dec 18 22:48:09 damccull: put it in a sqlite db Dec 18 22:48:13 Right. Ok, thanks. My brain is now full, so I shall go contemplate and plan. Thanks peoples :) Dec 18 22:48:26 damccull: that way you're sure it gets stored Dec 18 22:48:31 whatever happens Dec 18 22:48:37 Maurits_: is the SQLite db permanently visible to the Service? Dec 18 22:48:48 why not? Dec 18 22:48:51 as it is just a file, that should be possible Dec 18 22:48:53 sure, it's on storage right? Dec 18 22:49:19 I would never depend on callbacks running etc to store critical data Dec 18 22:49:20 Maurits_, I know of a way to put sqlite db on internal or redirect it to external too. Found it on google one day :D Dec 18 22:49:34 because phones tend to lose power, etc Dec 18 22:49:49 or your process gets killed because the system is OOM Dec 18 22:50:02 Maurits_: yeah, the "kill process" cases Dec 18 22:50:20 Alright guys, once again thanks. Gotta jet for now. Much appreciated! Dec 18 22:51:09 regarding the 'talk to servc]activity or from fragment' Dec 18 22:51:13 oops Dec 18 22:51:21 talk to service from activity or from fragment Dec 18 22:51:44 I tried to go the fragment route, and had a lot of problems due to the fragment lifecycle Dec 18 22:52:11 could be that I was just doing it wrong, but fragment detach/attach on rotation caused my app to crash Dec 18 22:52:33 in the end I just gave up and did the binding in the activity Dec 18 22:53:16 (this is binding rather than communicating with, though) Dec 18 22:53:52 Maurits_: that should work for most cases Dec 18 22:54:03 also, it might just be the fact that I was trying to nest binds from one activity context that caused it to fail Dec 18 22:54:32 there's no real benefit to it anyway Dec 18 22:54:39 if more precision or permanent connection is required, you could spawn a thread in the Fragment with setRetainInstance(true) Dec 18 22:54:52 and do the bookkeeping yourself Dec 18 22:55:14 but Threading in Java seems to be something that hasn't been done right in 15 years Dec 18 22:55:27 I don't know, it seemed a bit fragile Dec 18 22:55:43 usually an indication that you're fighting the recommended way Dec 18 22:56:25 well if you can't afford to lose _any_ data Dec 18 22:56:40 you could use sqlite as a communication mechanism Dec 18 22:57:00 but I'd still have the service manage the sqlite db Dec 18 22:57:17 Maurits_: isn't SQLite writing a slow op? Dec 18 22:57:26 (vs network traffic arriving) Dec 18 22:57:39 it is, but that's the price you pay Dec 18 22:57:51 you can buffer and write to sqlite occasionally Dec 18 22:58:00 yeah, and you could shape your traffic as well Dec 18 22:58:12 how can i learn how to edit smali Dec 18 22:58:15 but then you lose everything up to the last buffer point on failure Dec 18 22:58:21 ? Dec 18 22:58:30 Maurits_: yeah, those are the choices you have to make Dec 18 22:58:56 depending on whether speed or consistency are important Dec 18 22:59:05 I'd hate to say this guys but it made me laugh: http://justlold.com/priceless Dec 18 23:01:18 Maurits_: but would that lead to all game state being kept in the Service? Dec 18 23:01:34 and would that not bog down the UI thread? Dec 18 23:01:51 you can simply launch a background thread to do the sqlite writing Dec 18 23:02:03 well I suppose one could launch AsyncTasks for parsing and storing Dec 18 23:02:06 yeah Dec 18 23:02:13 and do nothing but dispatch a runnable from onStartCommand to the background thread Dec 18 23:03:28 and keeping all game state in the service is highly recommended imo Dec 18 23:03:50 if you need quick access to it you can always shadow it in the activity Dec 18 23:04:53 how would one shadow? Dec 18 23:04:58 a temp var ? Dec 18 23:05:41 depends on the data Dec 18 23:06:01 in general I'd ensure most of the volatile UI state is in the activity, but the game logic state is in the service Dec 18 23:06:52 local service calls aren't that slow, but you still don't want to call 1239 times to traverse a tree Dec 18 23:09:21 Maurits_: is there a professional term for "shadowing"? Dec 18 23:09:28 like a pattern or something? Dec 18 23:09:39 Google thinks I want to do graphics :( Dec 18 23:10:36 well, dunno about OOP patterns, but it's a common optimization, guess it's pretty close to caching in this case Dec 18 23:11:06 ie, you know when the game state is going to change, hitting the service for everything is slow, so you keep a local copy of it Dec 18 23:12:46 ie the new gamestate arrives over the network, the service tell the asynctask to parse and store it, do you trigger a Listener that copies this data to the Activity? Dec 18 23:13:02 Does anyone know how I can make a custom ActionBar view play nice with a searchview? I want the custom view to be hidden when the searchview is expanded like the title is. Dec 18 23:14:00 belgianguy: you have the service fill its event queue with the stuff that happened, update its own local state Dec 18 23:14:25 belgianguy: then signal the activity by intent or local notification Dec 18 23:15:00 the activity is resumed, binds to the service, queries the event queue and updates its shadow copy of the state Dec 18 23:15:14 or if it is restarted, it can request the entire up-to-date game state from the service Dec 18 23:15:33 or the parts of it it needs Dec 18 23:15:56 but this kind of stuff is generally not needed if you only keep the 'high level state' in the service Dec 18 23:16:21 then it's usually fast enough to query from the service everytime you require it Dec 18 23:17:04 Maurits_: I was planning on registering a Listener once bound (and to unbind when disconnected) Dec 18 23:17:10 would you advice against that? Dec 18 23:18:33 the queue seems more natural though, so maybe I could just send a notice through the listener that "something new is here" Dec 18 23:18:38 what kind of listener? Dec 18 23:18:51 oh Dec 18 23:18:52 wait Dec 18 23:19:01 I'd strictly use a pull mechanism Dec 18 23:19:03 just an interface, through which I could communicate from the Service to the Activity Dec 18 23:19:47 ie, you'll need the other code path where you store it in the service until later retrieval anyway Dec 18 23:20:00 cause you can't guarantee the activity will exist for delivery Dec 18 23:20:06 true Dec 18 23:20:51 in this case it's as easy as triggering a notification from the service with (for example) 'player x made a move' that starts the activity Dec 18 23:21:05 which then consumes the events from the service as usual, etc Dec 18 23:22:51 yeah, the first game I was about to make was a card game, which is turn based, P2P though, so this might backfire Dec 18 23:23:57 I've written a distributed system once before in C++, but it can be complicated Dec 18 23:24:06 you have an added advantage that the path to use cloud messaging is exactly the same Dec 18 23:24:39 except you have your internet server push the intent to open the activity instead of having your service post a local notification Dec 18 23:24:53 but you said it's p2p, so that might not be possible Dec 18 23:25:09 well a p2p node functions as both a server and a client Dec 18 23:25:31 but in terms of consistency and causality I might need to pick a Leader Dec 18 23:25:42 instead of using vector clocks Dec 18 23:25:44 but you can't authorize your clients to post stuff to GCM on your behalf Dec 18 23:25:52 that's asking for trouble Dec 18 23:26:10 plus there's no clear benefit if the service is stopped after the game is finished anyway Dec 18 23:26:14 yeah, that'd be easy hackable as it suffers from all dangers client side Dec 18 23:27:01 Maurits_: what kind of servers are used for supporting android games btw? Dec 18 23:27:23 are there dedicated services (SaaS?) or does one typically roll its own? Dec 18 23:27:40 you could do both Dec 18 23:28:11 ie, you could write something that targets a cloud hosting service such as google's or amazon's Dec 18 23:28:54 I would recommend using HTTP and JSON for the data exchange Dec 18 23:29:01 maybe I'm blinded by my webdev history, but would such a server be written in C++ then? Dec 18 23:29:20 HTTP and JSON I've mastered quite well Dec 18 23:29:29 no, I'd write it in python or some other fast language Dec 18 23:29:41 the server will not be doing much other than pushing I/O anyway Dec 18 23:29:55 but not PHP/ASP.NET, right? Dec 18 23:29:56 so there's no speed benefit in using C++ Dec 18 23:30:16 it depends, PHP I wouldn't use because it's not really meant for this Dec 18 23:30:23 ASP.NET I've never used Dec 18 23:30:37 I guess you could force something with a websocket, but that's asking for trouble Dec 18 23:31:30 I'm not very proficient in Python, only did the AI course of Udacity in it :) Dec 18 23:32:16 but atm money is a bit of an issue, I couldn't afford to keep a dedicated server up Dec 18 23:32:45 (that's why I thought P2P might save me from that issue) Dec 18 23:33:51 oh, yeah, of course, you need server initiated communication as well Dec 18 23:34:12 drop HTTP, post \n termined JSON messages Dec 18 23:34:27 websocket is cool and all, but probably not worth the effort Dec 18 23:34:52 I've written a websocket server in C++ once, using its RFC :( Dec 18 23:35:04 because push seemed 'kinda cool' Dec 18 23:35:20 big advantage is that it'll go through proxies Dec 18 23:35:30 although not a lot of operators still use those Dec 18 23:35:48 I was wondering if 3G/4G have lots of ports closed? Dec 18 23:36:03 or is it like everything above 1024 is fair game? Dec 18 23:36:07 not sure, here in holland it seems to be okay Dec 18 23:36:23 best way would be to test, of course Dec 18 23:37:14 true Dec 18 23:37:26 I have some friends with Mobile Vikings Dec 18 23:38:04 they seem to pack the best punch pricewise in Belgium Dec 18 23:38:06 * ctate RTA you have some friends with the Minnesota Vikings Dec 18 23:38:41 ctate: well, not yet, but who knows where my Android skills might take me Dec 18 23:38:55 but if you're comfortable in C++, use that Dec 18 23:39:19 you're just not very likely to get a large advantage in speed since it's likely an IO-bound workload Dec 18 23:39:54 Maurits_: true, I didn't even know there were servers you could push anything else on than "things that poop HTML or JSON" Dec 18 23:40:05 so I'll have to research that Dec 18 23:41:30 so implementing android beam is super simple Dec 18 23:42:03 is it even worth it to support nfc push on a gingerbread phone? are there any devices that have nfc that still run gingerbread? Dec 18 23:42:56 wasn't beam introduced in ICS? Dec 18 23:43:01 yeah Dec 18 23:43:24 its a lot more work to support npp in gingerbread, android beam is so simple Dec 18 23:43:25 I think the gnex is the first one that supports it Dec 18 23:43:42 oh, dunno about that, probably not worth it Dec 18 23:43:48 NFC hasn't really taken off yet Dec 18 23:44:15 just wondering if there is any devices that have nfc but no updates to 4.0+ Dec 18 23:44:32 birbeck, when i was doing some NFC work, i let 4.0+ write, but 2.3+ read Dec 18 23:44:40 so 4.0 could send to 2.3, but not the other way around Dec 18 23:45:07 hmm, my use case doesnt really support that, the other way around would be nice Dec 18 23:45:58 i mean really i would prefer to be able to push from any nfc capable device to any other, but if there is no one out there with a 2.3 handset with nfc support then that would be wasted effort Dec 18 23:46:08 when i could simply just use beam instead Dec 18 23:46:57 there are a few Dec 18 23:47:18 the galaxy s advance Dec 18 23:48:40 that phone can be upgraded to 4.1.1 though Dec 18 23:48:55 oh, expected in Jan. 2013 Dec 18 23:50:03 some obscure acer phone as well Dec 18 23:50:17 but there's bound to be a couple Dec 18 23:50:57 is there a standards body that manages NFC? Dec 18 23:51:10 for Miracast I could consult WiFi Alliance Dec 18 23:51:11 the e320? Dec 18 23:51:16 yea Dec 18 23:51:41 damn, that phone was released in the uk Dec 18 23:51:55 i only care about us/canada/uk Dec 18 23:52:21 my app isnt "officially" available in the uk though, but i know lots of people there are using it Dec 18 23:52:34 what's your app? Dec 18 23:52:41 my coffee card Dec 18 23:53:57 ah, cool Dec 18 23:54:19 don't think starbucks have introduced a customer card here Dec 18 23:54:23 i guess i only really care about phones in the us and canada, if they are using a pirated copy or using market enabler or whatever to obtain a copy outside of the supported distribution and they dont have 4.0+, then they cant use the nfc feature :) Dec 18 23:54:31 where is "here"? Dec 18 23:54:51 the netherlands Dec 18 23:55:16 starbucks has been doing a major rollout here Dec 18 23:55:24 like 50 new stores in the last year Dec 18 23:55:48 I've heard of _one_ in Belgium Dec 18 23:55:59 heh Dec 18 23:56:42 We have 9 in the whole country :) Dec 18 23:56:47 well considering its such a niche feature, i guess i will just draw the line at 4.0+. it will be a lot easier to support that way Dec 18 23:56:50 (says Wikipedia) Dec 18 23:57:07 seems to be pretty popular birbeck Dec 18 23:57:16 it used to be Dec 18 23:57:19 and a 4.6 is a nice rating Dec 18 23:59:41 now i just gotta find a good strategy for encrypting the data beamed Dec 19 00:00:03 I don't know how many there are here in .nl, but they have been appearing everywhere Dec 19 00:01:17 not a big fan though, especially since they only seem to sell two kinds of actual coffee Dec 19 00:01:26 birbeck: rpt13 Dec 19 00:01:54 I bet the US Starbucks has more to offer and is more popular there Dec 19 00:02:45 yeah, probably Dec 19 00:02:53 SpeedEvil: thats no more secure that plain-text Dec 19 00:03:11 but I generally just want a plain double espresso Dec 19 00:03:29 birbeck: I may not have been being completely serious. Dec 19 00:03:39 belgianguy: Starbucks is basically identical overseas Dec 19 00:03:49 and they do sell that at starbucks, but you get a lot less coffee per euro ;) Dec 19 00:03:55 it is indeed very popular in the US Dec 19 00:04:05 i dont drink it often any more Dec 19 00:04:16 only when ive loaded my starbucks card for app debugging Dec 19 00:04:45 lol poor birbeck Dec 19 00:05:06 gets a caffeine addiction while making his app ;) Dec 19 00:05:13 it's pretty much ubiquitous, so in any decent-size town you can pretty much rely on being able to get decent coffee thanks to their presence Dec 19 00:05:29 larger towns + cities will probably have more local, superior coffee sources Dec 19 00:05:29 and is it "good" coffee? Dec 19 00:05:31 ctate: yeah, travelling is the other time i go there Dec 19 00:05:47 or McDonalds style? Dec 19 00:05:47 its not "good" but its fairly consistent, you know what youre getting Dec 19 00:05:49 yeah, seems to be the case, the coffee seems to be decent Dec 19 00:06:07 I'd just like to have a bit more choice than filter coffee, espresso Dec 19 00:06:13 belgianguy: it's decent. they've always overroasted slightly, hence the nickname "Charbucks," but OTOH they're fairly fanatical about their procedures and cleanliness of the equipment Dec 19 00:06:43 I put Dunkin Donuts on par with McDonalds in terms of quality of service. Dec 19 00:06:44 ctate: ah, that's good to hear Dec 19 00:06:54 ctate: how would you encrypt data over beam? Dec 19 00:06:55 they aren't as good as they were twenty years ago when the baristas actually steamed the milk themselves etc, but they haven't slipped particularly far and they've become omnipresent Dec 19 00:07:15 cant really put a psk in another ndef record, that would defeat the purpose Dec 19 00:07:16 birbeck: i know nothing of NFC Dec 19 00:07:54 might as well use rot-13 then ;-) Dec 19 00:08:30 birbeck: Caesar's algorithm? Dec 19 00:08:47 eg "swap this letter with another" Dec 19 00:08:55 thats what rot is Dec 19 00:08:58 HAL -> IBM Dec 19 00:09:06 or the other one, which you break by matrix inversion Dec 19 00:09:16 was Caesar's a one-letter shift, or literal rot13? i forget. Dec 19 00:09:32 I think it was rot3 Dec 19 00:09:33 a 3 letter shift Dec 19 00:09:42 * evancharlton high-fives birbeck Dec 19 00:09:47 'lo Dec 19 00:10:46 i'm reading about the google licensing service Dec 19 00:10:57 i guess its not highly sensitive data, i could just embed the key in the application. Dec 19 00:11:01 if my app is free, can i still use it to verify that the app is signed correctly? Dec 19 00:11:07 lagann: no Dec 19 00:11:19 only paid apps can use the licensing api Dec 19 00:11:30 unless that has recently changed Dec 19 00:11:32 can a paid app cost $0 ? Dec 19 00:11:33 i have a server i'm running, and i'd like to make sure only valid versions of my app can access the server Dec 19 00:11:39 ctate: i wish Dec 19 00:11:59 lagann: why? Dec 19 00:12:11 lagann: as a general principle, you cannot trust the client device. period. Dec 19 00:12:14 ctate: google really needs the ability to do free promos Dec 19 00:12:29 ctate: you can use the market to "audit" your app Dec 19 00:12:41 ctate: Any progress on "gifting" apps? Dec 19 00:12:57 ctate: can you write my code for me? Dec 19 00:12:57 have it check your app to make sure it's signed correctly, then sign a message with a timestamp saying it's valid Dec 19 00:12:58 ctate: that is a real concern for data heavy free apps, using up tons of server resources and bandwidth can cost developers big time Dec 19 00:13:50 i forget which game company just shut down because their ios game was too heavily pirated, they couldnt pay the bills Dec 19 00:14:45 the licensing library allows free apps to access it to request apk expansion files Dec 19 00:15:03 can i just do a check with it pretending that's what i want, then send the response to my server which can verify the message? Dec 19 00:15:27 you can try Dec 19 00:16:27 i don't want to get my hand slapped by google Dec 19 00:20:26 birbeck: if the game is free what does "piracy" mean? Dec 19 00:20:55 yeah, i kinda goofed on that Dec 19 00:21:05 ctate: just because it's free don't mean others have the right to redistribute it Dec 19 00:21:15 if you're providing it free, you need to make sure your model can support the load Dec 19 00:22:28 interesting that piracy would be that widespread/prevalent on iOS, where the party line is that "apps can only be obtained from apple" prevents that kind of thing Dec 19 00:23:06 i heard a stat a few years back that for every ios app downloaded, 7 additional copies are pirated Dec 19 00:23:24 interesting Dec 19 00:23:38 im sure thats much lower as more service type free apps are available with multi-million downloads Dec 19 00:24:00 ctate: the iPhone is like the easiest-jailbroken phone in the world. You can get apps that make it more or less one click (at least you could for a while; no idea if that's still the case) Dec 19 00:25:18 what fraction of iphones are jailbroken? Dec 19 00:29:04 afaik jailbreaking is much more difficult on later iPhones, most people don't really bother with it anymore Dec 19 00:30:19 also, paid apps are down by 30 something % on the app store Dec 19 00:30:42 so the incentive to jailbreak for piracy has also become smaller Dec 19 00:31:30 ctate: not as many as you'd think. Dec 19 00:31:53 maybe >=10% Dec 19 00:32:53 that's roughly the figure i had heard Dec 19 00:33:05 When trying to set up the action bar 'Up' button, do you have to call 'getActionBar().setDisplayHomeAsUpEnabled(true)' or is setting 'homeAsUp' in the action bar style sufficient? Dec 19 00:33:07 I dunno, I personally don't know anyone anymore who jailbreaks, might be different in other countries Dec 19 00:33:29 rooters and jailbreakers are just very vocal, and its a hot topic on tech feeds. but i would think even less than that, at least for android Dec 19 00:33:33 ctate: still a strong community. Dec 19 00:33:40 I thought it would be good enough to just set 'homeAsUp' in the style, but it doesn't seem to work on all devices Dec 19 00:33:49 the home button works on my galaxy nexus but not some phones like the s3 Dec 19 00:33:54 sigh Dec 19 00:33:56 matt9: setting the style should b esufficient Dec 19 00:34:03 hmm Dec 19 00:34:25 it's a flag set, so you need to make sure you're setting all of the ones you need Dec 19 00:34:48 ctate I'm using showHome and homeAsUp Dec 19 00:34:54 and it does indeed work on some phones Dec 19 00:35:14 but on some phones it doesn't unless I call getActionBar().setDisplayHomeAsUpEnabled(true) Dec 19 00:35:22 I always do see the 'Up' button in the action bar though Dec 19 00:35:34 do you know of any non-Samsung phones that it seems broken on? :) Dec 19 00:35:41 :) Dec 19 00:35:43 yeah i have a list lemme check Dec 19 00:36:17 LG Intuition, T-Mobile G2, Optimus V Dec 19 00:36:18 so you see the Up thing but it just has no effect? Dec 19 00:36:28 yeah I see the up thing but has no effect when pressing it Dec 19 00:36:32 matt9: if you see the indicator, then it is displaying correctly Dec 19 00:36:53 but the onOptionsItemSelected callback isn't being called for some devices it seems Dec 19 00:36:56 matt9: do you have a callback assigned to it, or just using the manifest? Dec 19 00:36:56 get a bugreport (full log, not just your app) from a device where this happens, if at all possible Dec 19 00:37:38 birbeck I'm using onOptionsItemSelected Dec 19 00:37:48 matt9: the manifest attribute? Dec 19 00:38:03 what manifest attribute? Dec 19 00:38:04 ive only ever used native action bars on google tv, it has always worked for me when using abs on other devices and os versions though Dec 19 00:38:36 same issue happens with abs too Dec 19 00:39:08 matt9: does setHomeButtonEnabled(true) have the same effect as calling setDisplayHomeAsUpEnabled(true) ? Dec 19 00:39:16 i mean, are you in a position to test this quickly? :) Dec 19 00:39:28 yup im testing this now Dec 19 00:40:25 the manifest attribute i was talking about is android:parentActivityName Dec 19 00:41:07 which was my first thought when it was only working on some devices, but using abs and the menu callbacks should work on any device/version Dec 19 00:41:08 (what os is running on the tmo g2?) Dec 19 00:41:11 (is this ABS?) Dec 19 00:41:27 and paging JakeWharton :) Dec 19 00:41:30 wait Dec 19 00:41:31 (04:38:36 PM) matt9: same issue happens with abs too Dec 19 00:41:33 er, what* Dec 19 00:41:58 ermahgerd scrollback Dec 19 00:42:01 oh, so same behavior whether you're going native *or* using ABS? got it Dec 19 00:42:07 but if its just wrapping the native implementation and happens with/without abs, that seems like an android issue Dec 19 00:42:15 just trying to make sure that htis is happening *without* ABS Dec 19 00:42:23 Sorry sorry sorry I think it was totally my fault, I messed up the theme settings in the manifest Dec 19 00:42:24 for minimum surface area Dec 19 00:42:26 matt9: API call and action bar style attribute should have the same effect Dec 19 00:42:31 oho Dec 19 00:43:00 android:parentActivityName only works on API 16+ Dec 19 00:43:12 use onOptionsItemSelected and look for getItemId() of android.R.id.home for all API levels Dec 19 00:43:36 there's a lot of chatter up above so I'm not sure if any of that was what you were looking for... Dec 19 00:43:38 JakeWharton: right, thats why i thought of it first when he said its only happening on certain devices Dec 19 00:43:52 yeah sorry it was an error on my part Dec 19 00:43:54 please disregard Dec 19 00:44:06 future versions of ABS should be able to do the parentActivityName attribute reading on all API levels. Just haven't had any time to work on it Dec 19 00:44:10 okay, glad to hear that. easier for you to fix something than for us to :) Dec 19 00:44:16 hi im having problems getting my service to capture intents after activity is closed Dec 19 00:44:42 i have a activity that starts a service which registers the broadcast receiver Dec 19 00:45:12 when the activity closes the service is still running but it doesnt capture anything Dec 19 00:47:07 Pr070cal: you're using startService, not bindService, right? Dec 19 00:47:08 how do you know the activity is closed and the service is still running? Dec 19 00:47:36 logging their lifecycle calls? Dec 19 00:49:08 and the startService vs bindService as well :) Dec 19 01:00:52 ah hi im back :) Dec 19 01:01:14 i check running applications and it tells me one service is running Dec 19 01:01:36 JesusFreke, yes im using startService Dec 19 01:01:45 Hi could anyone help me get started regarding shapes? I want to make a rounded border. But it cant be a big rounded rectangle it needs to be a hollow perimeter Dec 19 01:02:31 Pr070cal: and you're registering it via the service context, not the activity context? Dec 19 01:03:14 JesusFreke, yes Dec 19 01:03:33 JesusFreke, its captures keys while activity is running Dec 19 01:04:35 Pr070cal: hmm... what broadcast? Dec 19 01:06:41 JesusFreke, android.intent.action.MEDIA_BUTTON Dec 19 01:07:19 Pr070cal: I'm not positive, but I suspect it's probably intentional that you don't get it while you activity is not active. Dec 19 01:07:35 yeah, you probably just don't have focus Dec 19 01:07:46 ie, try sending your activity to the background by pressing home Dec 19 01:08:09 and see if you receive it Dec 19 01:08:09 i tried to make a app like the ones for remapping headset buttons Dec 19 01:08:38 Pr070cal: which android versions are you targeting? Dec 19 01:08:59 Maurits_, yeah it doesnt receive anything without activity open Dec 19 01:09:07 3.2 honeycomb Dec 19 01:10:04 its strange cause activity starts my service which registers the receiver Dec 19 01:10:13 Pr070cal: there's a difference between 'open and in the background' and 'closed' Dec 19 01:10:14 and service stays running Dec 19 01:10:54 Pr070cal: if you press home your activity remains open but is sent to the background, but if you press back it'll get closed and destroyed Dec 19 01:11:07 hmm maybe i should try running the service when activity calls stop Dec 19 01:11:12 i'll try quickly Dec 19 01:13:07 Pr070cal: well, no, you should probably just register your service as the preferred remote control receiver Dec 19 01:13:18 err, the media button responder Dec 19 01:13:24 see http://android-developers.blogspot.nl/2010/06/allowing-applications-to-play-nicer.html Dec 19 01:14:18 what I'm guessing what's happening is that android routes the media button event to the currently visible process in case no preferred handler is available Dec 19 01:14:36 so the moment you kill your activity that's not your process anymore Dec 19 01:15:58 ok ive tried the tutorial in the link Dec 19 01:16:08 but i tried to keep it running in a service Dec 19 01:16:37 i mean the tutorial works fine to capture the keys until it closes Dec 19 01:18:33 you tried the tutorial in the 5 minutes it took you to respond? Dec 19 01:18:43 O_o Dec 19 01:19:07 the point is that you need to call registerMediaButtonEvent Dec 19 01:19:07 lol ive used this before works really well but when the activity closes it stops receiving keys Dec 19 01:20:19 yes, you've said so a couple of times, and the probable solution according to a couple of people on stackoverflow with similar problems is to use registerMediaButtonEvent in your service to set it as the preferred handler Dec 19 01:21:02 (and you can't guarantee your implementation is the top handler all the time anwyay, since another application can take preference at a later time) Dec 19 01:24:14 if i have a RelativeLayout, and added a view to it with certain params like width height left/top margin, is it possible to change those params later to move the view? (and how?) Dec 19 01:24:27 setLayoutParams(...) Dec 19 01:27:02 ugh sorry ctate/jakewharton I'm getting that action bar issue again. I triple checked for stupid errors this time so I'm fairly certain what I'm seeing may be a bug? The 'Up' button is working on my 4.2 Galaxy Nexus, but not on my 4.0.4 HTC One X https://gist.github.com/4333495 Dec 19 01:27:32 I'm only setting the action bar display options via styles, not using getActionBar()/getSupportActionBar() Dec 19 01:28:00 ok that sounds like something to do with how you've configured ABS Dec 19 01:28:10 or possibly (unlikely?) a bug in abs Dec 19 01:28:24 because on 4.0.4, i believe the ABS actionbar is used Dec 19 01:28:25 hmm its weird that it works on some phones and not others Dec 19 01:28:28 whereas on 4.2, the native is used Dec 19 01:28:44 oh interesting Dec 19 01:29:00 i dont recall waht version uses native and what doesnt though Dec 19 01:29:06 4.2 definitely does Dec 19 01:29:20 so I see the home icon and up button, but pressing it does nothing on the 4.0.4 device Dec 19 01:30:01 Maurits_, ok i done that, it still only works when activity is open Dec 19 01:30:13 matt9, if you use the native actionbar (not abs), does it work on 4.0.4? Dec 19 01:30:14 API 16+ might have changed whether or not the home button is automatically enabled when the homeAsUp flag is enabled via a style Dec 19 01:30:24 or that Dec 19 01:30:29 what happens on < API 14? Dec 19 01:30:35 canadiancow yeah native actionbar is fine Dec 19 01:30:43 let me try to find a device with a lower api level Dec 19 01:30:43 native action bar is used on 4.0+ Dec 19 01:30:52 so you're seeing inconsistency in the native action bar as well Dec 19 01:31:05 ah Dec 19 01:31:10 if pre-14 behaves the same as API14/15 then it's platform behavior change, not ABS Dec 19 01:31:13 sometime in the "HC/ICS" timeframe, it changed Dec 19 01:31:25 its no longer enabled by default Dec 19 01:31:29 and you may have to do it in code Dec 19 01:31:34 that's if you target API 14 or greater Dec 19 01:31:38 and ABS honors that Dec 19 01:31:47 im a little confused why we're still talking about this, since you know it works when you do it in code Dec 19 01:31:50 =P Dec 19 01:32:03 oh okay ill try changing my projects target to 11 or something Dec 19 01:32:13 just the targetSdkVersion in the manifest Dec 19 01:32:16 yeah Dec 19 01:32:18 it sounds like the platform changed behavior in API 16 to correctly enable the home action item when homeAsUp was specified in the style Dec 19 01:32:24 do NOT do that Dec 19 01:32:27 that is not the fix Dec 19 01:32:33 correct Dec 19 01:32:38 just enable it in code Dec 19 01:33:07 I was gonna try to do it to test if the target makes a difference, not as the long term fix Dec 19 01:33:12 I can patch ABS to correctly honor it on all APIs in a future version. For now you should just enable it in code. Dec 19 01:33:32 and yes, changing the target to 11 does fix the issue Dec 19 01:33:33 Setting your targetSdkVersion to < 14 will enable the home action item always (and also likely show the ugly three-dot overflow menu) Dec 19 01:33:34 Maurits_, im actuall writing this for google tv Dec 19 01:33:45 yeah the three dots are back noooo Dec 19 01:34:12 anyway thanks for the help candiancow/jakewharton, ill just configure the actionbar settings in code for now Dec 19 01:34:26 i'll create an ABS issue to remind myself to fix that on pre-API 16 Dec 19 01:34:33 cool Dec 19 01:47:06 canadiancow: thanks, trying. Dec 19 01:47:22 what? Dec 19 01:47:45 canadiancow: about setLayoutParams Dec 19 01:51:53 Maurits_, hey thats strange i changed my Log.e 's to toasts and it still works when the activity is closed Dec 19 01:52:49 I have a custom adapter in my listFragment class and I call setListAdapter(myAdapter = new MyAdapter(getActivity(), ...) in my onViewCreated method Dec 19 01:52:56 However the adapter becomes null after orientation change Dec 19 01:53:07 And I have a feeling since the getActivity() that was passed in became null, this became null too Dec 19 01:53:25 Maurits_, oh it works on phone but not on tv Dec 19 01:53:35 So basically I need to re-assign the listadapter in onconfigchange to have the new activity / new adapter instantiated on device rotation Dec 19 01:53:48 which callback in the fragment gets executed both on activity load and on activity rotate / recreate? Dec 19 01:54:29 Is onAttach called twice? Dec 19 01:56:53 It appears it is! Dec 19 01:59:39 when an activity is rotated, it is recreated (as you seem to know) Dec 19 01:59:46 i believe this actually instantiates a new activity Dec 19 01:59:48 and a new fragment Dec 19 01:59:55 and then attaches it Dec 19 02:00:07 i coudl be wrong on certain aspects of that, but the general idea is there Dec 19 02:00:18 I'm pretty sure you get a new instance of the object. Dec 19 02:00:35 which is why you can end up leaking objects pretty easily. Dec 19 02:01:46 class MyActivity extends Activity { static MyActivity self; onCreate(Bundle b) { if (self == null) self = this; } } // recipe for disaster! Dec 19 02:03:34 Maurits_, ok seems to be working ok now Dec 19 02:03:59 anyone know how to skip songs with currently running or default media player Dec 19 02:04:06 eg google music Dec 19 02:05:07 from your own app? Dec 19 02:10:42 I'm trying to compile tcpdump for my phone and it seems that autoconfig is going into my system's includes and libraries… "/usr/include/sys/_types.h" My build script is http://p.webra.in/dr Dec 19 02:11:27 I was able to build libpcap easilly Dec 19 02:11:29 no issues Dec 19 02:16:28 anyone know how to skip tracks of default media player Dec 19 02:23:49 ndk aasset manager and related functions, there' sno info about thread safety, youget an AAsset* via an open Dec 19 02:24:13 does the AAsset internally use the asset manager (native) so that you need to thread s ynch on both objects when an AAsset i used ? Dec 19 02:35:20 cool, another android camera Dec 19 02:35:50 the sammy one was a P&S, the polaroid is MILC Dec 19 02:37:54 que? Dec 19 02:38:32 if I want to change the background from a textview shortly if I click on it(like the button does), is it done by a backgrounddrawable or is this some kind of animation? Dec 19 02:39:01 hey , can you implelemtn the google now / voice stuff into your own applications? Dec 19 02:51:08 Technodrome: what do you mean? Dec 19 02:56:52 michaelnovakjr: similar to how people want to use siri in their own applications on ios Dec 19 02:59:16 g00s: I was trying out the galaxy camera in HK a couple of weeks ago Dec 19 02:59:20 it actually runs really well Dec 19 02:59:28 but... I can't think of a good reason to buy one Dec 19 02:59:52 yeah, the market for P&S is poor now b/c of the nice mobile phone cameras **** ENDING LOGGING AT Wed Dec 19 02:59:59 2012