**** BEGIN LOGGING AT Fri Dec 28 02:59:58 2012 Dec 28 03:00:10 edittext.gettext? Dec 28 03:00:16 getEditable, rather Dec 28 03:00:18 or just Text Dec 28 03:00:35 find the edittext, getText() and convert to double Dec 28 03:01:15 int text = (int) .getText? Dec 28 03:01:18 something like that? Dec 28 03:01:31 oh yeh double Dec 28 03:01:55 ok im going to bed. you read up on classes and their methods and return values :) Dec 28 03:02:11 definately Dec 28 03:02:12 :p Dec 28 03:02:33 generally the form is object.method() Dec 28 03:03:34 right Dec 28 03:03:48 look into Convert, also Dec 28 03:03:54 or .parse Dec 28 03:04:03 every project I work on has one ... :P Dec 28 03:04:05 http://developer.android.com/reference/android/text/BoringLayout.html#isBoring%28java.lang.CharSequence,%20android.text.TextPaint%29 Dec 28 03:05:37 What are your opinions on the proper way of doing forms? LinearLayout of EditText fields? ListView with each cell being a TextView with a dialog to input an answer? A ListView with a TextView and an EditText view? Other?? Dec 28 03:10:19 well with xorgate gone i may aswell sleep now too Dec 28 03:12:46 hey androiders! can someone tell me where i can find out why i can get projections from different tables in the same query? Dec 28 03:13:14 for example, this makes no sense to me: String[] projection = new String[] { ContactsContract.Groups._ID, ContactsContract.Groups.TITLE, RawContacts.ACCOUNT_NAME }; Dec 28 03:13:25 is android under the hood joining all these tables for me? Dec 28 03:14:04 and is there really a separate table "ContactsContract.Groups" than the "RawContacts" table? or is it some sort of magic? Dec 28 03:20:42 Is highp generally avoided on Android devices? Does it matter? Dec 28 03:20:47 oh so you did make your way into dangerous #Android-Dev territory, BadMrsFrosty. Nice to see you here Dec 28 03:21:02 I did it! Dec 28 03:21:14 * superfluous high fives BadMrsFrosty Dec 28 03:22:05 ive implemented touch to drag and it works ok but it's a bit jittery, it's as if the touch screen point detection is noisy Dec 28 03:22:15 My coworker’s heart turned black after a few months of NativeActivity Android development so I am worried that perhaps the same has happened to a lot of people here. Dec 28 03:22:20 anyone experienced this ? have a link or search terms for a work-around ? Dec 28 03:22:24 * BadMrsFrosty shivers in the corner. Dec 28 03:22:48 BadMrsFrosty, im usign a glsurfaceview and signaling between java and native to use it's rendering thread Dec 28 03:23:10 i was worried about the various work-arounds and fixes for problem devices that are in glsurfaceview not being there for me if i did a native acitvity Dec 28 03:23:23 Your worries were warranted. Dec 28 03:23:34 also a glsurfaceview can be placed as a component in more spots, whereas an activity is an entire activyt ... altho now with fragments maybe thats not a big deal Dec 28 03:23:57 i dont know if fragmets let you stick an acitivity within another activity as a fragment, never used fragments Dec 28 03:24:23 I can do better than that: Well your worries were way warranted, weren’t they? Dec 28 03:24:25 badmrsfrosty are you detecting user touch locations ? are you experiencing jitteriness, lack of smoothness in the detected point ? Dec 28 03:24:43 BadMrsFrosty, i dont know ive enver tried native activity, is tarted from glsurfaceview Dec 28 03:24:51 No idea. I don’t touch the Android devices. Dec 28 03:25:07 how do es the user play the game then ? Dec 28 03:25:11 not using the touch screen ? Dec 28 03:25:32 By touching the screen. I am saying I don’t touch the devices. That is not my job. Dec 28 03:25:37 That is the job of my coworker. Dec 28 03:25:49 I am on iOS now looking at the generated shaders and seeing a lot of highp used. Dec 28 03:26:00 And the shaders are the same on iOS and Android. Dec 28 03:26:10 So I want to know if the Android team is suffering because of these shaders. Dec 28 03:26:13 generated ? you have some method of "generatign" your shaders ? Dec 28 03:26:17 Performance problems and friends. Dec 28 03:26:20 oh, your code generates the shaders on thefly Dec 28 03:26:20 Yes. Dec 28 03:26:36 By stitching parts of shaders together. Dec 28 03:26:42 You know my job. Dec 28 03:26:57 no i dont Dec 28 03:27:04 later my coffee shop is closing, gotta go Dec 28 03:27:38 Buy. Dec 28 03:27:40 Coffee. Dec 28 03:27:58 I thought you knew my task etc. Dec 28 03:28:01 Oh well. Dec 28 03:30:22 So no one really knows about using high-performance shaders on Android devices? Dec 28 03:30:47 Generally converting from highp to mediump is slow. Dec 28 03:31:08 And gl_FragColor is going to be mediump most of the time, at least in our games. Dec 28 03:59:12 ok guys Dec 28 03:59:15 if im making a 'game' Dec 28 03:59:18 or multi screen app Dec 28 03:59:24 i must define many layouts right? Dec 28 03:59:29 screen1 2 etc Dec 28 04:05:45 BadMrsFrosty: I don't get why this is not just GPU specific issue? Dec 28 04:05:50 BTW hi ;0 Dec 28 04:05:52 :) Dec 28 04:16:46 How many times do you have to tell your creative team not to design android like iPhone? :\ Dec 28 04:18:04 6 Dec 28 04:18:07 maarek: fire them and get a new one? Dec 28 04:18:19 But they eventually realize it's Java and not Obj-C Dec 28 04:18:32 I'm but a developer. I'm not in any position to fire. Dec 28 04:18:34 maarek: better yet, every time they come back with tabs on the bottom, link them to http://d.android.com/design Dec 28 04:19:30 AmandaC: I wish they would take the time to look through it. ;) Creatives are lazy. One design to rule them all. Dec 28 04:19:59 Anyone know LiveView? Is there any way for a sandboxed plugin to end itself and send the user back to the menu? Dec 28 04:21:28 * AmandaC has been messing with the LV api today, she has it prettied up as a "2.0" in her privaqte maven repo Dec 28 04:22:34 instead os ugins string resources for the intents, I deduce them from code! :D Dec 28 04:22:59 s/os/of/;s/ugins/using/ Dec 28 04:23:11 w Dec 28 04:27:31 this may be impossible: Can I determine who the caller of a method is, without directly passing it in ? Dec 28 04:34:06 maslen: Thread.currentThread().getStackTrace() Dec 28 04:35:05 funny maarek someone said the exact same thing in the iphone dev channel 2 days ago Dec 28 04:35:21 inverted of course Dec 28 04:35:42 designing iphone app like android ? Dec 28 04:35:46 TheBunny: When dev iPhone, we always say damn those creative for making this app like a website! We can't do this shit. Dec 28 04:36:11 haha… yeah I hear that one a lot too :) Dec 28 04:43:52 What java package should I use for an android application I intend to publish on google play if I don't have a domain? Dec 28 04:47:19 abella.felipe.android.appname Dec 28 04:48:45 JakeWharton, great, thanks Dec 28 04:51:08 JakeWharton: Unfortunately, that only gives me names, not the actual object :( Dec 28 04:51:28 you can't get the object Dec 28 04:52:46 pass it in Dec 28 04:52:46 Thanks Jak Dec 28 04:52:51 JakeWharton* Dec 28 04:53:18 That's unfortunately not an option, since it would mean modifying the original code that uses it. Dec 28 04:55:54 then you're likely out of luck Dec 28 05:28:41 can you make apps with pure native c or c++ in android? Dec 28 05:29:30 yes Dec 28 05:29:34 hello Dec 28 05:29:40 look up NDK linuxuz3r Dec 28 05:30:43 http://wos4android.files.wordpress.com/2012/07/order13.jpg?w=960 Dec 28 05:30:47 what do you think of this ? Dec 28 05:30:50 sucks ? Dec 28 05:31:13 the stuff that i researched returned needs java as the driver program for c libs Dec 28 05:31:32 i would like to know if it is possible to use only c or c++ Dec 28 05:32:07 unless you are planning a game or some other media/performance-sensitive app with a fully custom UI, you shouldn't be planning to use the NDK for a complete app Dec 28 05:33:07 Im not sure if the newest OS can be 100% C++ Dec 28 05:33:09 Leeds, ok Dec 28 05:33:21 in the past you always need at least a java wrapper at some level Dec 28 05:33:23 ok TheBunny Dec 28 05:33:31 what did you want to make thjo Dec 28 05:34:14 nothing yet im extending my knowledge in c and c++ and also java Dec 28 05:34:40 java wrapper rocks Dec 28 05:34:46 looking for someone to make a fitness app with. anyone interested? Dec 28 05:35:05 but i want to know if it is possible for it to use c or c++ purely Dec 28 05:35:44 http://sourceforge.net/p/necessitas/home/necessitas/ Dec 28 05:35:55 that seems to claim a QT port to android Dec 28 05:37:51 in practice, native Android apps are written in Java... anything else is asking for at least a lot of work, and possibly a lot of trouble Dec 28 05:41:29 Parhs: wut the hell was that Dec 28 05:43:03 does there exist a thing that's like a mutable JSONObject / JSONArray ? Dec 28 05:43:11 or is that just the worst idea of the century? Dec 28 05:43:37 nothing to do with you guys but make your day a bit brighter Dec 28 05:43:37 http://imageshack.us/a/img89/2487/img20121227172800.jpg Dec 28 05:43:47 TheBunny - its... a bit of a mess. Dec 28 05:43:54 I played with necessitas Dec 28 05:44:09 you have to have an updater to download a pretty decently large "runtime" Dec 28 05:44:57 ron_frown: looking at this new odroid-u2, fun fun fun Dec 28 05:45:52 damn koreans Dec 28 05:45:54 I cant keep up Dec 28 05:46:14 g00s - I wouldnt buy thinking its widely supported Dec 28 05:47:22 I've spoke at length with xenoxas and mrdjr about state of android for that platform Dec 28 05:47:31 the port is half assed at best (not using traditional build system) Dec 28 05:47:46 and so I've been told that the video driver is basically MIA Dec 28 05:47:56 heh, ok thanks for the heads up Dec 28 05:48:06 it appears to be the same processor/board as the odroidx that I got collecting dust Dec 28 05:48:16 I managed to get ics on it, but jb? forget about it Dec 28 05:48:43 drivers ? Dec 28 05:49:19 well part of it is that they hacked the shit out of the codebase the WRONG way to get it to work in ics, vs using proper repo/git repos Dec 28 05:49:31 in which case you could theoretically repo sync Dec 28 05:49:41 well probably more like repo init -u... repo sync Dec 28 05:50:04 as far as I know ics vs jb... kernels are basically the same Dec 28 05:50:07 at least on some hardware anyway Dec 28 05:51:22 i was just reading Oracle just finished their first beta of Java 8 with arm support; they are supporting raspberry pi. funny thing though, is that it will be closed source, so they are basically asking the raspi community for free work Dec 28 05:51:49 ellison has to be darth vader Dec 28 05:53:19 I think oracle and apple should get a big fat community shunning Dec 28 05:53:24 for being anti competitive Dec 28 05:53:32 yeah Dec 28 05:54:08 well, here is the raspi / java story http://www.infoq.com/news/2012/12/java-raspberry-pi Dec 28 05:55:04 what i would find interesting, is a comparison of head to head performance dvm vs oracle jvm Dec 28 06:03:20 anyone have problems with views suddenly becoming invisible in 4.1? Dec 28 06:03:38 how do you guys make a native c and c++ apps in android Dec 28 06:03:43 When you tap them, they become visible, but when they first begin they are invisible Dec 28 06:03:59 linuxuz3r you provide the uitoookit or you use jni to nterface and use xml layouts Dec 28 06:04:22 ok Dec 28 06:04:41 for the uitoolkit is that one hard to create? Dec 28 06:05:12 like wxwidgets or straight gl Dec 28 06:05:24 basically you cant use xml layoutsthat are standard in android Dec 28 06:05:56 ok Dec 28 06:06:04 thanks so much for the insight ron_frown Dec 28 06:14:28 well guys i made my first app! it starts off w/ 1 button called "Click Me", you press it, it goes to a new screen and says (-: Hello :-) w/ a "Go Back" button, which goes back to the original screen Dec 28 06:15:17 what happens when you press the physical back button after the "Go Back" button? Dec 28 06:15:33 hmm good question :D Dec 28 06:15:49 it goes forward Dec 28 06:15:50 wtf Dec 28 06:16:30 haha Dec 28 06:16:33 thats what I'd expect Dec 28 06:16:39 so how do i fix that Dec 28 06:16:42 what call is that Dec 28 06:17:01 you need a CLEAR_TOP flag on the intent which goes back to the main screen Dec 28 06:17:17 no idea what a fag looks like JakeWharton Dec 28 06:17:19 flog Dec 28 06:17:21 flag too, tired heh Dec 28 06:17:37 Bitgod: grats Dec 28 06:17:42 thx Dec 28 06:18:09 Bitgod: How are you loading the new screens? Dec 28 06:18:28 heh ... Dec 28 06:18:40 maslen, intents Dec 28 06:18:52 calling a 2nd class to talk to the new layout Dec 28 06:20:08 So are you creating a new Intent with that Activity? Dec 28 06:20:23 yes sir Dec 28 06:21:08 Are you familiar with stacks? Dec 28 06:21:15 no Dec 28 06:21:22 <=newbie learning java Dec 28 06:21:28 Err, to give it in a nutshell Dec 28 06:21:34 imagine a pile ofpapers Dec 28 06:21:58 you add one paper to the pile, now that one is on top Dec 28 06:22:10 ok Dec 28 06:22:13 so like FIO Dec 28 06:22:16 fifo Dec 28 06:22:19 used in a pos system Dec 28 06:22:25 not quite. Dec 28 06:22:48 because unlike a pos system, you don't pull the bottom one out - you look at the one on top Dec 28 06:22:56 so it's Last-in-first-out Dec 28 06:23:00 (LIFO) Dec 28 06:23:14 got it Dec 28 06:23:30 So each time you create a new activity, it adds a new activity to the "stack" Dec 28 06:23:47 each time you hit 'back', it removes the activity from the top. Dec 28 06:24:08 and loads the one that's "underneath" back up Dec 28 06:24:13 sounds too hard for me Dec 28 06:24:18 i dont even know java 100% yet Dec 28 06:24:33 im just learning now that java is case sensitive, needs ; terminators, etc Dec 28 06:24:33 :D Dec 28 06:24:46 best of luck Dec 28 06:24:54 thx, i got a long wya to go im sure Dec 28 06:25:14 * capella sighs .... and I spent so much time getting your IDE working ...now you're gonna bail Dec 28 06:25:20 im bailing? Dec 28 06:25:27 how am i bailing? Dec 28 06:25:33 "sounds too hard for me" Dec 28 06:25:37 it is hard Dec 28 06:25:40 Bitgod: Stacks are simple. Read up on them on wikipedia Dec 28 06:25:43 but let me learn the bsics first! Dec 28 06:25:48 ok maslen Dec 28 06:25:50 stacks are basic :) Dec 28 06:26:09 (It's much, much easier to understand with pictures) Dec 28 06:26:13 before i continue i need to brush up on how java is handled Dec 28 06:26:16 i know it has classes Dec 28 06:26:21 similar to classes in .net Dec 28 06:26:28 im learning so :/ Dec 28 06:27:08 * maslen wishes Java annotations had functionality equivalent to python's decorators Dec 28 06:29:53 heh, just read up on them and one of the first examples is @accepts(int, int) and @returns(long) Dec 28 06:29:57 aka. typing Dec 28 06:30:07 which java definitely has :) Dec 28 06:30:26 You're looking at the converse of what I want :) Dec 28 06:38:05 hey guys question if i have some code in java already, how can i import it into an android eclipse project? Dec 28 06:39:27 copy / paste Dec 28 06:40:29 you can include a jar Dec 28 06:40:38 add it to library path Dec 28 06:40:42 or like he said, copy/paste Dec 28 06:44:14 made a native library with ndk, it's quite large ... is there a waay to strip all unecssary debug info form it ? Dec 28 06:44:25 maybe ethat will be done automatically when creating an apk ? (with eclipse) ? Dec 28 06:45:33 oi Dec 28 06:45:42 try it? Dec 28 06:46:27 i will eventually try it, sure, was asking in case someone has done it before and knows how ..esp if making an apk doesn't do it Dec 28 06:46:27 wtf there are so many android io videos Dec 28 06:46:56 k0nichiwa, do you know how to make native c c++ apps for android? Dec 28 06:47:11 not entirely native, no Dec 28 06:47:19 linuxuz3r, did you get the latest NDK ? Dec 28 06:47:24 yes Dec 28 06:47:31 there are about 10 sampel apps in it Dec 28 06:47:42 build the sample apps and look at how they work Dec 28 06:47:47 read the JNI tips at the android dev site Dec 28 06:49:35 so you cannot make android apps without a java wrapper? Dec 28 06:49:36 also there is a documentation.html, open it in your browser, info about make files etc Dec 28 06:49:47 i don't know im not trying to do that so i havent researched it Dec 28 06:50:08 you can make an activity that is entirely native Dec 28 06:50:25 how? Dec 28 06:50:38 the activity is also in java Dec 28 06:51:23 there is a sample Dec 28 06:51:43 native activity, sample in the ndk, with an eclipse project Dec 28 06:51:56 ok Dec 28 06:56:32 How do you cast a MapFragment to a Fragment? Dec 28 06:56:39 Or I mean the other way around Dec 28 06:57:14 (MapFragment)getSupportFragmentManager().findFragmentById(R.id.map_fragment) is the issue Dec 28 06:58:27 dont u do it like in C ? (MapFragment) x ? Dec 28 06:58:58 SupportMapFragment maybe hah :\ Dec 28 06:58:59 http://developer.android.com/reference/com/google/android/gms/maps/SupportMapFragment.html Dec 28 07:09:48 bluestack is out Dec 28 07:09:54 for mac Dec 28 07:10:03 wonder if it is 3dAccelerated Dec 28 07:10:39 I looked at that Dec 28 07:10:50 I must admit I am a bit confused at its purpose Dec 28 07:11:04 to me it looks like a glorified emu image/and emulator Dec 28 07:12:47 my ndk shared library is like 30 megs right now, why is it so big Dec 28 07:13:25 whats in it Dec 28 07:13:47 c++, curl, libxml2, libjpeg-turbo Dec 28 07:13:52 but i think it's the c++ tha tis bloating it Dec 28 07:14:06 because libjepg, libxml2, etc dont amount to more than a meg or 2 Dec 28 07:14:16 its got to be debug info Dec 28 07:14:18 for boost Dec 28 07:17:44 ron_frown, its like metro for android Dec 28 07:17:46 lol Dec 28 07:17:57 who what Dec 28 07:18:02 what gui stuff did you us Dec 28 07:18:16 bluestacks Dec 28 07:18:16 debug info for boost could be huge :) Dec 28 07:18:46 oh shits Dec 28 07:18:50 wait Dec 28 07:18:51 what Dec 28 07:19:27 yeah its got to be debug info for boost that's makign it big Dec 28 07:19:41 but even when i ndk-buid DEBUG=0 it's still putting it in there Dec 28 07:19:50 probalby in ndk docs somewhere it tells me how to strip Dec 28 07:23:53 k0nichiwa, ron_frown thanks a lot for the help Dec 28 07:23:59 im off to bed Dec 28 07:24:01 later Dec 28 07:24:35 http://androidandme.com/wp-content/uploads/2012/01/image01.png Dec 28 07:24:43 guys the button at bottom at right Dec 28 07:24:47 is menu button? Dec 28 07:28:21 anyone here experts of soundPool? Dec 28 07:32:36 Parhs no... thats recent applications Dec 28 07:32:39 may be apps still running Dec 28 07:32:46 may be apps that have recently closed Dec 28 07:36:00 anyone here experts of soundPool? Dec 28 07:38:03 Bitgod repeating is annoying. Dec 28 07:38:57 12-28 02:29:00.420: ERROR/AudioCache(96): Heap size overflow! req size: 1052672, max size: 1048576 Dec 28 07:39:05 i dont even get any audio lol Dec 28 07:39:13 thanks ron_frown Dec 28 07:39:43 i want to add title between some listview items.. what should i look for ? Dec 28 07:39:51 is there a default thing ? Dec 28 07:41:31 suppose you sublcass a View and have some resources you want to destroy when the view is going to be deallocated Dec 28 07:41:57 anyoje dealt with this? what is the life cycle change you use to determine when to nuke your resoruces Dec 28 07:48:04 how on earth with droid 4.2.1 do you enable usb debugging Dec 28 07:49:54 it is documentated somewhere Dec 28 07:51:21 eagles0513875: go to about phone and tap on the build number row 7 (?) times Dec 28 07:51:35 deebo: this is a nexus 7 btw Dec 28 07:51:51 yeah, doesnt matter Dec 28 07:51:53 wow nice :D Dec 28 07:51:58 that opens the developer menu Dec 28 07:52:11 very nice :D Dec 28 07:52:36 wow much more detailed than my desire hd running CM7 Dec 28 07:53:03 yeah that pissed me off it was hidden by default Dec 28 07:53:05 but now that I know Dec 28 07:53:06 oh well Dec 28 07:53:42 well there are some weird settings now, wouldnt want normal users going in there by accident :) Dec 28 07:54:38 they shoudl have just had a warning dialog whe they were accessed i think Dec 28 07:54:39 good point deebo but Dec 28 07:54:44 you can set them up with their own user Dec 28 07:54:58 and not leave them on an admin account Dec 28 07:55:09 you cant have multiple users on phones Dec 28 07:57:17 I bet taht could be changed fairly easily Dec 28 07:57:24 thats something I'll be reverse engineering soon enough Dec 28 07:57:47 yeah id actually really want that feature Dec 28 07:57:52 wow, i cannot figure this out Dec 28 07:58:03 no idea why it isnt enabled on phones, easiest way to have a work and home profile Dec 28 07:58:23 We've got some ImageViews which we download the data from our servers -- when they finish loading, we display them. super basic stuff Dec 28 07:58:37 and Dec 28 07:58:41 never adding my work account to the default user again since the apps cant decide which account they use consistently Dec 28 07:58:48 but for some reason on 4.1+, when they finish downloading, they are there for a fraction of a second, and then disappear Dec 28 07:59:00 (they reappear when you touch them though...?) Dec 28 07:59:26 my work account has games etc installed, even though i never wanted to do that, it just randomly chose that this time i'm using google play on my work account Dec 28 08:00:09 oh : and only the ones we animate don't show up Dec 28 08:01:58 Is there a callback for a GoogleMap/MapFragment MyLocation button press? Dec 28 08:03:25 oh well beddy bye time Dec 28 08:03:37 deebo: my nexus 7 has that feature to add multiple users too Dec 28 08:03:52 it seems to be a new feature in 4.2 or something not sure when that came in Dec 28 08:03:55 eagles0513875: everyones does, but its only enabled in tablets Dec 28 08:04:11 deebo: bring on a custom rom that has it enabled lol Dec 28 08:04:56 just to confirm if i have the jar file for what i want to port to android. how can i view the source code in an android project in eclipse Dec 28 08:05:32 nm getting my hands on the source code Dec 28 08:06:28 what im impressed with is the latest versin of eclipse Dec 28 08:06:38 how the heck did they manage to reduce its memory footprint to 1mb Dec 28 08:07:01 eagles0513875: what?? Dec 28 08:08:40 guys Dec 28 08:08:41 http://pastebin.com/TYK4uquB Dec 28 08:08:44 superfluous: latest eclipse on windows 8 is only atm pulling 0.8MB of ram Dec 28 08:08:48 why the hell is my app crashing soon as it loads Dec 28 08:08:57 it looks fine in code and i checked w/ 3 other examples Dec 28 08:09:01 this is the eclipse with android ADT as well as the standard eclipse not sure what they did Dec 28 08:09:29 eagles0513875: that sounds impossible! Here I am with 865 mb currently Dec 28 08:10:02 superfluous: i can screenshot it if you like Dec 28 08:10:14 its 755k of ram according to task manager granted i dont have any projects open yet Dec 28 08:10:18 i mean i believe you but dang, thats crazy Dec 28 08:10:20 bitgod: check the logcat Dec 28 08:10:32 superfluous: they have done something which has me in awe as well Dec 28 08:10:59 superfluous: all i have noticed compared to the previous version i used in terms of eclipse this is the fastest version Dec 28 08:11:43 ok Dec 28 08:11:45 output: http://pastebin.com/BzBhcxgD Dec 28 08:12:56 what happens if you set the image of an imageview after an animation has been done to it? Dec 28 08:13:49 well crap, thats not how i want to phrase that... Dec 28 08:16:31 just want some recommendations, I am looking to help port an open source game to android, where would be an ideal place to start? Dec 28 08:17:51 its already written in java Dec 28 08:22:08 or how about changing it while the animation is happening or something? Dec 28 08:36:30 subclass a View what if you load sound sor someting, is there some life cycline indication when the view has been "disposed" ? Dec 28 08:50:29 is there a way i can import all the files in a java project into an android one? Dec 28 08:51:27 I have view pager and in my views I dont have any horizontal scroll. But when I try to swipe page its not swipping, If I touch area not part of horizontal scroll then it swipes. What could be the problem? Dec 28 08:55:01 It really seems like..if I set an image while the animation is going, then i get 2 images Dec 28 08:55:10 perhaps they're fighting as to which is the right one or something Dec 28 08:55:17 i dont know, i'm an iOS guy :) Dec 28 09:08:08 superfluous: your opinion. if im porting an app written in java for mac windows linux would the best way to start be with the UI of the application? Dec 28 09:08:48 I would say probably not, but i have no idea Dec 28 09:08:49 lol Dec 28 09:11:45 superfluous: the UI isnt designed for android so it would actually need an entire rewrite im sure Dec 28 09:13:53 probably, but hopefully you could get the underbelly working Dec 28 09:19:33 superfluous: i need to figure out how to import the code into eclipse the entire code pase not just parts of it Dec 28 09:19:57 hehe, you're asking the wrong person about doing android things Dec 28 09:23:04 superfluous: ironic seeing as your in a dev channel :p Dec 28 09:23:26 they got me started up on the android dev today :( Dec 28 09:27:20 hi Dec 28 09:28:00 I've written a service which should log sensor data in the background which so far works fine but is killed after some time where I don't use the phone, how can I prevent the killing? Dec 28 09:37:49 i still cant figure it out... does havoc wreak if you change the image in an imageview after an animation has started on it on 4.1? Dec 28 09:53:30 Are not files ending with .txt supported in adt? Dec 28 09:55:33 I am trying to keep a xml file in the assets directory, but adt tries to find android prefixes on attributes Dec 28 10:00:01 I am trying to have a txt file with xml markup in assets, and adt tries to actually enforce android prefix Dec 28 10:00:05 Its not even stupid Dec 28 10:09:55 is there a way to view frames per second for updates in your UI ? Dec 28 10:10:07 assets is a structured folder, it's very picky Dec 28 10:10:23 for "raw" data, you'd probably want a raw resource Dec 28 10:10:43 But isnt assets containing whatever I feel to put in it? Dec 28 10:10:53 I thought it was just raw data in there Dec 28 10:11:32 anli, what do you mean enfore ? Dec 28 10:11:40 it thinks it's an error and refuses to run your app ? Dec 28 10:11:45 yes Dec 28 10:12:22 raw as in any data you want, assets required the android identifier compatable file name Dec 28 10:13:03 As in does not require any longer? Dec 28 10:13:35 If I put a txt file in assets and have some xml data in it, how could that affect building my project? Dec 28 10:14:34 anli, i just put an arbitrary xml in my assets dir, no problem Dec 28 10:14:39 is it actually complaining about the contents or the ".txt"? Dec 28 10:15:11 does anyone use continuous integration for their android apps? Dec 28 10:15:16 I need some help setting this up Dec 28 10:15:18 The contents of the txt Dec 28 10:15:22 assets are stuctured data and as such require a file name that is a valid android identifier Dec 28 10:15:30 It demands Android namespace prefix Dec 28 10:16:05 in the assets folder it doesn't seem to care about xml content in a file that ends with xml extension Dec 28 10:16:08 Despite the suffix then, I presume Dec 28 10:16:15 i put an aribrary xml file, nothing to do w/android, no problem Dec 28 10:16:28 Strange, maybe I need to restart eclipse Dec 28 10:16:31 You use juno? Dec 28 10:16:38 are you putting it in "assets" ? Dec 28 10:16:44 anli: what is the actual error you're getting? Dec 28 10:16:49 maybe you need to use tools -> fix project properties Dec 28 10:16:54 yeah im using juno i think Dec 28 10:17:01 Attribute is missing the Android namespace prefix Dec 28 10:17:06 assets is a special folder set up by eclipse Dec 28 10:17:44 My xml file is named foodmenu.xml, or I have also tried foodmenu.txt Dec 28 10:18:00 That should pass as identifier? Dec 28 10:18:07 Sure it would Dec 28 10:20:39 sorry, my mistake, assets is a arbitrary folder structure, raw uses android indentifiers Dec 28 10:21:04 I would like to enable a few buttons once the stuff in doInBackground is finished, Can someone please let me know how to do that? I can't use findViewById as its not an activity file Dec 28 10:21:07 class* Dec 28 10:21:24 Anoia: That makes sense Dec 28 10:25:04 I seem to be able to put the file in res/xml, but then I dont have the luxury of creating sub directories Dec 28 10:33:37 So.... after god knows how long, my app will finally be up on the market in an hour :p Dec 28 10:43:18 Tee_Pee: better than apple that have a week+ leed time on publishing apps :) Dec 28 10:46:46 I *love* the fact that Apple simply stop publishing apps and updates for a week over Christmas Dec 28 10:55:52 I am *indifferent* to what apple does Dec 28 11:06:00 If Color.Black == 0xFF000000 ... could I somehow find black, and its relative shades (as in, get lighter..toward gray, light gray, etc...) somehow? I'm trying to avoid "filling" the black outline of this coloring book I've got going on, if the user touches it..because it messes up the whole photo. Trying to find a good solution to make sure it isn't going to color in the "black" pixels if Dec 28 11:06:00 touched.. make sense? Dec 28 11:07:43 sort of like make a gradient in an array from black to about... a hair past dark gray... and then say if touched pixel == a color in array, then stop. otherwise, {}... I just need the 'if color touched (have this) INSIDE array of black to dark gray (dont have this)"... Dec 28 11:09:26 you guys are probably drinking the coffee or not quite awake yet.. I'll be around if anyone has any ideas. It'd just be crap to have to do a 100% black and white image as opposed to grayscale and whatnot... loses so much quality on the coloring book image. kids dont care, but the big kids :p might not enjoy it as much Dec 28 11:11:26 just thought of this... would there be a way to use the constant value and a range? such as if black = -16777216 and blue = -16776961, that if int c = bitmap.getPixel(x, y) BETWEEN (black) AND (blue), stop, else {...} ? Dec 28 11:12:15 ^ sounds the most efficient to me, but then again, I am me, and usually always wrong. Dec 28 11:13:38 Hello all Dec 28 11:13:43 mornin rakan Dec 28 11:13:48 all = me Dec 28 11:13:50 :p Dec 28 11:14:11 pierpark: hahahaha yea it's good afternoon here Dec 28 11:14:19 taking this opportunity to think 'out loud' in the chat, as you ... was going to say as you can tell... but you just missed all that. Dec 28 11:14:32 rakan, Britan? hmm.. no that'd be 11... China? Dec 28 11:14:53 Jordan actually Dec 28 11:15:04 it's GMT+3 here so it's 14:15 Dec 28 11:15:06 close enough. actually I have no idea Dec 28 11:15:14 yea Dec 28 11:16:04 I have a question which i find quite unusual Dec 28 11:16:18 Go for it. Not sure I'll have a clue, but I'll see. Dec 28 11:17:04 I am developing an app... currently using the architecture of: Activity renders a layout with a fragment tag ... fragment gets instantiated which in turn renders a layout of it's own... that goes for all my activities Dec 28 11:17:41 in one of my fragments i am using CalendarView. Once this fragment is rendered, the app slows down Dec 28 11:17:58 i start seeing dalvikvm freeing memory Dec 28 11:18:17 and the calendarview takes like 2-3 seconds to animate the switching between months and stuff like that Dec 28 11:18:30 i am suspecting that my problem is with that arch that i am using... Dec 28 11:18:54 as there are too many activities, each has it's own fragment each of which has it's own set of components ... etc Dec 28 11:19:17 is there any way to browse the official android samples in a browser? somehow sorting them in categories, atm i must download samples for all API versions and then look through them all and guess from their name if they might be showing the use of an custom adapter, which is what i'm looking for Dec 28 11:19:22 i am thinking in the right direction? if not, how can one figure out why the activities take a notable time to load ? Dec 28 11:19:35 I'm not really sure on that one... I haven't really been good at nesting views and so on, but have you tried checking for an OutOfMemoryError ... or can you show the error log itself? I won't reply too much about it, so that your question can hang low here and not get flooded..maybe Leeds or one of the other wizards on here will wake up soon and be able to help. Dec 28 11:20:27 That's the problem, i don't see any OutOfMemoryExceptions, nothing in logcat shows exactly what the problem is Dec 28 11:20:30 rakan, it does sound like a way to rack up excessive memory real quick, without them being able to free, since it's so nested... I hate running into those memory problems..esp since it's SO EASY to do using graphics. Dec 28 11:20:55 there are links to specific android samples on the official tutorial and elsewhere but they all redirect to this page which tells me to download samples with the SDK manager, however with this redirect i loose the pointer to the specific sample Dec 28 11:21:17 Chilley: are you asking if you can open the samples and run them on emulator or device? Dec 28 11:21:33 Chilley: right, I hate that. Dec 28 11:22:26 Chilley: You can use the SDK manager and download the samples per API level. Then, in Eclipse, click File>New>Other>Android>Android Sample Project> and select a sample project. It'll create it, then you run it. Dec 28 11:23:10 Chilley: with me so far? Dec 28 11:23:41 actually i found what i needed in the ApiDemos folder Dec 28 11:23:53 however running them on my phone would be useful too Dec 28 11:24:01 ill try follow what u say Dec 28 11:24:09 you on windows? Dec 28 11:24:11 mac Dec 28 11:25:16 whoa.. i created a sample project from the ApiDemos Dec 28 11:25:21 but i couldn't make it more specific Dec 28 11:25:25 Should be about the same... SDK manager is installed on your machine... open it. That's where you will find the list of API's (Gingerbread, etc...) ... http://lifeofchance.com/sdkmanager.png <-- looks like this Dec 28 11:25:30 so now the project has every single api example in it Dec 28 11:25:39 Now, after installed, you can open Eclipse (if tha tis what you are using)... Dec 28 11:25:52 and use: File>New>Other>Android>Android Sample Project> Dec 28 11:26:04 it'll show you a listof all the API samples that were downloaded. Dec 28 11:26:05 i got it loaded Dec 28 11:26:10 now how do i run a specific example Dec 28 11:26:12 now, you click on a sample, and make the project. Dec 28 11:26:13 list List4.java Dec 28 11:26:32 Are you following my steps? Dec 28 11:26:37 Or are you inside a folder browsing around Dec 28 11:28:04 oh sweet Dec 28 11:28:09 I said something wrong... http://lifeofchance.com/chooseapilevel.png is the next thing you'll see in Eclipse Dec 28 11:28:19 you have to select the "Google API's" one like in my photo Dec 28 11:28:27 then it'll show you the samples from that API. Dec 28 11:28:35 Select one, next next next finish, etc... Dec 28 11:28:38 boom, then run it. Dec 28 11:28:54 cant choose any API levels but this is awesome Dec 28 11:29:18 so now all samples are just a few clicks away Dec 28 11:29:26 well, at least you found a way. Dec 28 11:29:27 :) Dec 28 11:30:00 actually I lied again.. Dec 28 11:30:17 you dont have to click API's... you can click the normal check box and there is a big list in there, too Dec 28 11:30:25 API's = the API's examples ;) Dec 28 11:31:01 which looks like: http://lifeofchance.com/gingerbreadsamples.png Dec 28 11:32:51 if you run into a bunch of "Remove @Override" errors... just use the Android->Fix Project Properties, and then Project->Clean, ... if error remains, remove the @Overrides and then build it. Dec 28 11:35:41 Why doesnt this change my spinners content? Dec 28 11:37:14 zyngawow: why doesn't _what_ change Dec 28 11:38:41 That was just maybe eclipse Dec 28 11:38:50 it got fixed by installing a few times Dec 28 11:41:01 Now I'm getting a Unable to start activity ComponentInfo. Line 18 is on stacktrace http://pastebin.com/Map82iem Dec 28 11:41:46 Does anyone know if eclipse can add the auto advance code, and advance past what it added? always remains in the "" for me Dec 28 11:42:17 strange working now, hah. Dec 28 11:44:59 maybe check for inkList being null before checking empty... not sure on isEmpty with Java... also, might make sure that this is running on a background thread, if using Android 3.0 and above, otherwise it'll blow out on you. Dec 28 11:45:37 check your imports, also, and make sure that you are importing the right component from the right area. Dec 28 11:45:52 if I want to make a customAdapter class in eclipse do i make it a service or contentProvider or what? in the wizard Dec 28 11:47:32 if i make a java class it wont allow me to use android librarys Dec 28 11:48:17 not sure on the specifics... but I usually do stuff like: public class LazyAdapter extends BaseAdapter { ... then do all my code... and make a constructor, so it can be called... like this: public LazyAdapter(Activity a, ArrayList < HashMap < String, String >> d) { ... code ... } Dec 28 11:49:19 so just a .java file with the first thing I wrote, and then the second type thing that I wrote, so that in your other .java file you can say: LazyAdapter la; and then on OnCreate() or wherever, you say: la = new LazyAdapter(...fill in the requirements you set...); Dec 28 11:49:45 ou use eclipse? Dec 28 11:49:51 yep Dec 28 11:50:08 so how do you create the file in which you start writing the code Dec 28 11:50:20 do you do new -> class? Dec 28 11:50:48 yeah... I just type the name and hit enter, with it being on public Dec 28 11:50:59 because I'm not some guru.. I just make stuff work somehow or another. :p Dec 28 11:50:59 nvm now suddenly it was able to import arrayadapter Dec 28 11:52:07 sometimes you want to write your own adapter, though, so my way would show you that. Just keep in mind that they have to have their name, then they also must have a constructor (the public LazyAdapter(Activity a.....) .. part)... so that they can be called from another activity/class/etc. Dec 28 11:55:16 i generally write my own adapters Dec 28 11:55:52 i am debating trying writing my own recycler even to see what FB made a fuss about Dec 28 11:56:35 not sure I know what you're talking about with the FB thing... care to share? Dec 28 11:57:31 pierpark: their new app they said they wrote their own recycler for the listview Dec 28 11:58:05 oh. right. hmm. interesting Dec 28 12:00:32 i've got the scrolling almost as smooth as i want it Dec 28 12:00:33 almost Dec 28 12:01:22 just gotta add in some fling detection and maybe sacrifice my firstborn to cthulu and i'll have it at iPhone level Dec 28 12:02:26 how are you optimizing it? Dec 28 12:03:24 Krob: things i've done thus far are nine patches everywhere, viewholders and lazy loading of some things and a crazy complicated image cache Dec 28 12:03:44 Is anyone particularly handy at spotting a bad bracket? been on this one for 20 minutes now cant really move on without finding it lol. Dec 28 12:04:02 Kieronboz: try an ide Dec 28 12:04:39 im using eclipse now funkbox Dec 28 12:05:03 funkbox: I have fling animations already built... you want them? Dec 28 12:05:32 Is it possible to warn Google about malicious comments on your Apps? Dec 28 12:05:47 pierpark: basically when there's a fling going on don't render a lot of the things Dec 28 12:06:14 right now there's certain situations in which my renderer can trigger GC mostly dealing with images Dec 28 12:06:38 I banned a user from using a certain part of an App, because they were abusing it. They then posted that the App has a virus installed. :/ Dec 28 12:06:54 funkbox: I have the XML animations for making a "fling" animation (the list item sliding to the left or right)... and I also have a ListItemGestureListener built, that will determine if the user DID fling the list item, etc... Dec 28 12:07:39 Knossos: you can report the comment Dec 28 12:07:59 pierpark: do you keep track of the velocity etc? Dec 28 12:08:07 Hmm, I don't see that on the developer console. I will have a look around. Dec 28 12:08:07 does anyone know how to track down internal android errors? (http://pastebin.com/e99HU8HN) Dec 28 12:08:44 when i touch my view in my listview component my app crashes with that error.. Dec 28 12:08:58 funkbox: * Fling left (or right) animates the item and, if far enough, then { ... } (in my case, adds to playlist) Dec 28 12:09:12 funkbox: So if that is what you mean by velo, then sure... Dec 28 12:09:49 funkbox: Yeah, it's velocity.. let me just send you the files... one minute Dec 28 12:09:56 pierpark: thanks Dec 28 12:10:02 pierpark: it's not GPL licensed is it? Dec 28 12:11:43 funkbox: no Dec 28 12:11:52 pierpark: good Dec 28 12:13:12 got anything against apache license? because I'm not sure what part, if any, might be apache,... Dec 28 12:13:30 pierpark: as long as it's not herpes infested like GPL Dec 28 12:14:50 Do I need an asynctask for viewing a website? (just reading a json from the internet, no need to download it) Dec 28 12:15:21 zyngawow: "viewing" means downloadin g Dec 28 12:15:33 zyngawow: throw the downloading and parsing in an async task yes Dec 28 12:15:46 So.. also another class Dec 28 12:16:32 just implimented my first progress dialog >:) Dec 28 12:17:05 zyngawow: you will find there are lot of classes Dec 28 12:17:41 funkbox: http://lifeofchance.com/ListItemGestureListener.txt <--- there's the listening... you know how to use it? I can dig up that too from my code somewhere. I have the animations here: http://lifeofchance.com/left_fling.xml, http://lifeofchance.com/right_fling.xml Dec 28 12:18:26 pierpark: thanks , will look at it some more Dec 28 12:20:20 k. yeah its not bad ... easy to use and works on all my list views and whatnot. I even have the adding/pulsing of icons on those items as well. hopefully it'll at least spark ideas. Dec 28 12:20:44 yep looks like a good implementation Dec 28 12:21:11 pierpark: will need some masssaging :) i've got list views in view pagers with drag and drop Dec 28 12:22:57 funkbox: yeah, I suck... so ha ha. Not sure what all I did with that when I found the idea somewhere. It's been a long time. I just knew I had it for a working reference in one of my projects somewhere. Dec 28 12:23:25 funkbox: and I can't even figure out how to determine if the 'color' at pixel level is between dark gray and black... grrrr. any ideas? Dec 28 12:23:41 pierpark: elaborate Dec 28 12:24:03 ah you've got like a dark red and want to determine how dark it is ? Dec 28 12:25:02 pierpark: http://en.wikipedia.org/wiki/Luma_%28video%29 Dec 28 12:25:43 funkbox: I have a drawing app... turned it into a coloring app... I load in the coloring book 'outline' image into the canvas/drawing it in... they touch the canvas and it fills in the color between the lines.. however, since I didn't want to convert the images to 100% black & white, I've got some gray areas to preserve graphical quality... well, I am stopping the "flood fill" when black Dec 28 12:25:43 is touched, so that the trace/outline of the coloring page doesn't get ruined and them have to start over... so I'm trying to get a small range of colors to check against...such as ... if the color they touched (by mistake) was the (black-ish) line of the coloring page, then dont continue, else { ... } Dec 28 12:26:31 ah Dec 28 12:26:58 pierpark: can you define a black and white mask separetly ? Dec 28 12:27:02 separately Dec 28 12:28:21 funkbox: I'm not sure... I'm not using a mask to determine where to 'fill' this... here's what I'm trying to avoid: http://lifeofchance.com/spiderman_11.png Dec 28 12:28:46 so the user tapped the outline and it colored it ? Dec 28 12:29:15 what i'm saying is if keep 2 instances. one that the user can modify one that the user cannot Dec 28 12:29:46 what I've just colored in pink/purple was me "accidentally" tapping the black line of the trace... (right, to your last comment).... and I'm stopping this *mostly* by saying if int c = bitmap.getPixel(x, y); .... then checking that c != BLACK. But I need to find some darker grays, too, apparently. Dec 28 12:30:03 then every time there's a touch, check in the unmodifed mask if it's black and if it is ignore the touch Dec 28 12:30:17 otherwise you get into a situation where they may want to color something black Dec 28 12:30:55 funkbox: that's a good idea. I wonder how I could implement that. hmm. That is true, about them wanting to use black... though I was hoping they'd be good little kids and not want to. :p Dec 28 12:31:09 pierpark: they will Dec 28 12:31:22 pierpark: just create two instances of the bitmap Dec 28 12:32:27 what does e.printStackTrace(); do? Dec 28 12:32:28 bastards, I tell you... :p --- Alright, two instances... draw one, and have an exact replica as the other... and check x,y against bitmap2's x,y and determine if that area is deemed colorable or not? Dec 28 12:37:45 is it more efficient to use an sqllite db then using an arraylist? (when having to insert lots of objects at certain positions and having to keep it sorted) Dec 28 12:37:55 pierpark: yep Dec 28 12:38:15 Krob: no, and there are more appropriate structures than an array list Dec 28 12:38:35 heh. World *has* ended. I just got a phone that isn't horribly out of date :D Dec 28 12:44:19 I should be able to use progressDialog more than once shouldnt I? Dec 28 12:44:26 Or does it need a new name Dec 28 12:51:42 hey Kieronboz how's it going :) Dec 28 12:52:29 Hey! good just been going through a book, covered progressdialogs, some other dialog stuff http://puu.sh/1Gl2Y Dec 28 12:52:38 just trying to simulate download dialog now Dec 28 12:53:02 as far as my currency problem- I hit a wall. :p Dec 28 12:53:19 too bad Dec 28 12:55:02 but heres what im working on now https://gist.github.com/4397504 its coming along Dec 28 12:55:23 but my progressDialogs are all broken for some reason Dec 28 12:56:56 is it github or is your indent fucked up Dec 28 12:57:22 well the short time you have had to know me may be enough to assume its 99% my fault Dec 28 12:57:23 :P Dec 28 12:57:29 :0 Dec 28 12:57:36 do yourself a favor and learn it the right way Dec 28 12:57:40 it will save headaches Dec 28 12:58:24 but aside from being a visual nightmare, that shouldnt affect errors should it? Dec 28 12:59:22 no Dec 28 12:59:45 im sure eclipse has a tool for it to select all and do proper formatting Dec 28 12:59:45 I just wanna fix all this then take my new learnings to the currency calc :p Dec 28 13:00:20 I did a source format now, looks a bit better Dec 28 13:03:13 If ive used progressDialog in one activity thing, its ok to use it again isnt it Dec 28 13:07:40 time for some currency stuff, xorgate I was remembering back to when i did java last, and ill need some parsing wont I Dec 28 13:09:15 yes from string to double and double to string Dec 28 13:10:33 The thing im unclear on, is figuring out from 2 array lists, which value corresponds to which string Dec 28 13:10:58 the index in the array Dec 28 13:11:03 which is why i said to be careful Dec 28 13:11:09 or to place them together in a new class Dec 28 13:11:35 I think ill do that, though im being incredible hopeful i plan on publishing this lol. Dec 28 13:11:39 so I want it to be right Dec 28 13:13:11 Quick question - is there ANY wait time for publishing your app on the play market? Dec 28 13:13:17 Or is it available as soon as you put it up? Dec 28 13:13:24 several hours buffer i think? Dec 28 13:13:44 though a friend put one up last night and it was up within 1 Dec 28 13:16:51 xorgate, incredibly stupid question, but atm I have mainacti.java open, I cant find the file where I place my buttons and stuff lmao. Dec 28 13:18:06 res\layout Dec 28 13:18:37 cheers. Dec 28 13:18:38 if you move the cursor on R.layout.mainactivity or whatever its called, eclipse should have some option to jump to that file Dec 28 13:19:28 Is there a way that I can buy "android.test.purchased" again when testing In-App-Billing? Because right now I always get that I've already purchased the item when checking the inventory... Dec 28 13:22:22 Would something like this work xorgate, https://gist.github.com/2246ce8cab9e1092f928 Dec 28 13:22:46 Kieronboz try it out Dec 28 13:23:11 you can use Log.i("hello", "this is my logmessage"); to see what happens Dec 28 13:23:39 the thing is, without a button or something to create the variable from inputvalue, how do i reference it? Dec 28 13:23:57 not sure what you mean Dec 28 13:24:48 well a button would DEFINE inputvalue as 33, but if they just put a number then choose a dropdown, theres no setting of a var? Dec 28 13:27:27 like i think i would have to do onclick edittext gettext inputvalue = parse double inputvalue ? Dec 28 13:32:50 Ok this was my guess xorgate, am i far off lol https://gist.github.com/e1de6995e3a4aa97c71c Dec 28 13:33:11 this wont work Dec 28 13:33:40 oh damn Dec 28 13:33:46 you cannot put an EditText into a CharSequence Dec 28 13:34:16 do you know what (EditText) means ? Dec 28 13:34:26 or (Classname) Dec 28 13:34:41 its referencing the kind of object? Dec 28 13:35:11 it is casting an object to a certain class Dec 28 13:35:20 casting, look it up :) Dec 28 13:36:30 ok so it casts to the class Dec 28 13:38:38 can somebody please help me in implementing stackoverflow.com/questions/14068097/enabling-buttons-after-doinbackground-finishes Dec 28 13:38:52 Ok i see i need the gettext dont i, String value = text.getText().toString(); Dec 28 13:39:07 tl:dr I just want to set the button to visible after doinbackdround finishes Dec 28 13:39:51 I tried creating a method i mainactivity and called it fromonpostexecute() from asynctask class, but that gave me an exception making my app to forcecloss Dec 28 13:39:54 close* Dec 28 13:42:22 Kieronboz findViewById returns a View, but you want an EditText. fortunately EditText extends View but you still need to be explicit Dec 28 13:43:33 right Dec 28 13:43:42 obscurant1st maybe this helps: http://stackoverflow.com/questions/3357477/is-asynctask-really-conceptually-flawed-or-am-i-just-missing-something/3359003#3359003 Dec 28 13:45:08 xorgate Ok thanks, let me try! :) Dec 28 13:45:50 for the IDEA lovers, my plugin is starting to resemble something proper :) http://plugins.jetbrains.com/plugin?pr=&pluginId=7146 Dec 28 13:46:09 So xorgate, can i use EditText inputval = (EditText)findViewById(R.id.inputvalue); Dec 28 13:46:10 now with screenshots Dec 28 13:46:19 Kieronboz that looks proper Dec 28 13:47:42 ok it FC when I pushed it lol. Dec 28 13:48:09 look at the stacktrace and find the line that causes it Dec 28 13:49:09 its my toast Dec 28 13:49:19 Toast.makeText(this,inputval, Toast.LENGTH_SHORT).show(); that crap Dec 28 13:49:30 ok Dec 28 13:49:36 toast was supposed to be the easy bit Dec 28 13:49:38 you need to think about what parameters you're giving it Dec 28 13:49:50 what is 'inputval' ? Dec 28 13:50:00 the variable i want to toast Dec 28 13:50:05 what class is it Dec 28 13:50:14 its made in onClick1 Dec 28 13:50:23 is it an int or a string or what? Dec 28 13:50:39 does edittext gettext have a default, i forgot to define one Dec 28 13:50:40 lol Dec 28 13:51:32 or is it an object of type EditText Dec 28 13:52:14 right its an object called by the findbyid, I wanna parse as a double then toast Dec 28 13:52:23 http://www.niceandimportant.com/newnew/wordpress/wp-content/uploads/2010/04/blokkendoos1.jpg Dec 28 13:52:29 this is what you're doing wrong :) Dec 28 13:52:38 being clinically retarded Dec 28 13:52:57 no you're not understanding the concept of classes and types Dec 28 13:52:59 Not reading the stacktrace, or pastebinning it when asking for help Dec 28 13:53:29 Hi people. I have an edit text which... when I rotate my phone horizontically it takes ups half the space of the screen, whereas in vertical orientation it's onle 1 line. Does it ring any bell to you what I may be doing wrong ? Dec 28 13:54:07 SimonVT if it annoys you we can take it private.. he's just learning to code Dec 28 13:54:42 Ok I think i have it, will try this now Dec 28 13:54:59 oO no it's fine Dec 28 13:55:31 But if you're trying to help him, you should help him understand the stacktrace Dec 28 13:55:41 Instead of just randomly guessing at what could be wrong Dec 28 13:55:43 i mentioned it Dec 28 13:59:37 weird. I hit ctrl + f11 in the emulator but the apps don't adjust to orientation change Dec 28 14:00:21 Is it the gingerbread emulator? Dec 28 14:01:22 Ok I THINK I am close now, though I havent printed out the variable yet so im not entirely sure its stored properly; https://gist.github.com/126fb7ced056bac2b2a6 Dec 28 14:01:54 SimonVT, yes Dec 28 14:02:28 Yeah, it has been broken forever Dec 28 14:05:19 :( Dec 28 14:05:37 4.x's emulator any better? Dec 28 14:06:30 Everything but GB works Dec 28 14:07:38 Kieronboz you can easily show it with Toast if you use "Value: " + finalval Dec 28 14:07:54 xorgate Doesn't it have any easier way of doing it? I mean I just have to set the buttons to visible after the completion of doInBackground. This is my code: http://pastie.org/private/5ztugny97ppmvfwx1obkuw Dec 28 14:08:24 obscurant1st you are making a new activity, but you want to modify the current Dec 28 14:09:04 either have a handle to your original activity in the task (as per my url) or make the task an inner class of the activity and use MainActivity.this Dec 28 14:09:15 SUCCESS Dec 28 14:09:20 \o/ Dec 28 14:12:54 I was disconnected! :/ Dec 28 14:13:35 did you catch my reply Dec 28 14:13:47 Why might the app FC if I move elements around using the graphical view? Dec 28 14:13:51 xorgate Nope Dec 28 14:13:55 is that a no-no? Dec 28 14:14:26 obscurant1st you are making a new activity, but you want to modify the current Dec 28 14:14:28 either have a handle to your original activity in the task (as per my url) or make the task an inner class of the activity and use MainActivity.this Dec 28 14:14:47 Kieronboz in eclipse find 'logcat' and look at its output Dec 28 14:15:17 xorgate so this doInBackground creates another activity? Dec 28 14:15:47 obscurant1st no your onPostExecute does Dec 28 14:16:17 so you make a new activity which lives only in that method, and has no real effect on the original activity Dec 28 14:16:20 so nothing happens Dec 28 14:16:31 you need to reference the original activuity Dec 28 14:16:45 So for that I would need a handler? Dec 28 14:16:54 It does force close btw! :/ Dec 28 14:18:20 xorgate So this answer is wrong? http://stackoverflow.com/a/14068127/348851 Dec 28 14:20:13 No, that's right Dec 28 14:20:13 obscurant1st no, you are implementing it incorrectly Dec 28 14:20:48 ask yourself why you are making a new instance of MainActivity in onPostExecute Dec 28 14:23:25 I was trying out several stuffs from google, soo. Btw I deleted it now and still it force closes. I am getting error at widget45.setVisibility(View.VISIBLE); because View is not passed to the method(that would be my guesss) Dec 28 14:23:35 hello. Dec 28 14:24:52 obscurant1st pastebin full code? Dec 28 14:25:06 xorgate private msg? Dec 28 14:26:17 is there any api to pan audio? Dec 28 14:26:41 no here is fine Dec 28 14:29:01 xorgate mainactivity: http://pastie.org/private/bjy3wadrakhgu5ky3jvq9a Dec 28 14:29:13 connectiondb: http://pastie.org/private/amdwxqb0vaipul7ep8qiw Dec 28 14:30:19 ok your onpostexecute Dec 28 14:30:25 it accesses a certain btnView Dec 28 14:30:32 which is never set Dec 28 14:31:01 also realize that Activities are Contexts Dec 28 14:31:08 RIGHT time to convert Euro into a usable number Dec 28 14:32:29 what is it with these code pasting sites that they use very little width and a scrollbar Dec 28 14:33:07 xorgate how can I set btnView? I am sorry, but I am kinda new into programming! Dec 28 14:36:36 new connectionDb(getAppContext()); -> change to new connectionDb(this) and in onpostexecute do prefContext.setButtonsVisible() Dec 28 14:36:42 think about who has access to what data Dec 28 14:37:05 ok. Dec 28 14:37:09 Let me try! :) Dec 28 14:41:31 xorgate it gives me an error saying: The method setButtonsVisible() is undefined for the type Context Dec 28 14:42:13 And what do you mean by who has access to what data? Dec 28 14:44:24 xorgate, at this stage i feel you know more about my app than me, but does what I want to do WORK in your head? to me it doesnt lol Dec 28 14:44:37 currency is relative to the 2 currencys your taking in isnt it Dec 28 14:44:52 so 1 gbp is worth different in euro, than it is in USD Dec 28 14:44:56 theres no base figure is there Dec 28 14:45:26 i'm sure you feel my pain https://twitter.com/zenilja/status/284671188502974464 Dec 28 14:45:49 obscurant1st ah yes of course. cast it to MainActivity Dec 28 14:46:33 Kieronboz that's why you have relative value per currency Dec 28 14:46:40 xorgate tried that ((MainActivity) prefContext).setButtonsVisible(); still gives me the same exception with force close Dec 28 14:47:03 obscurant1st and the exception is ? Dec 28 14:47:34 Kieronboz you just decide GBP = 1.0, then stuff other currencies relative to GBP in there Dec 28 14:47:48 I think it makes sense Dec 28 14:47:49 convert gbp to gbp? value*1.0 Dec 28 14:47:49 lol. Dec 28 14:48:00 convert gbp to eur? value*1.1234 Dec 28 14:48:11 Ok yeah I see Dec 28 14:48:22 convert eur to gbp? value*(1.0/1.1234) Dec 28 14:49:09 xorgate: no I am sorry, there is no exception is the logcat tag I set earlier for trouble shooting! Dec 28 14:49:09 Right so i need to do my spinners now dont I! Dec 28 14:49:17 It worked. Thanks a lot! Dec 28 14:49:22 this is the hard part. Dec 28 14:49:28 Kieronboz: Gold is a base figure isn't it? Dec 28 14:49:51 xorgate So can you please tell, what was the main reason why my code was not working? Dec 28 14:49:53 I really dont know obscurant1st, I suppose it is, its hurting my brain figuring out the logic lol. Dec 28 14:49:56 better use bitcoin :) Dec 28 14:50:13 I'm analyzing my "mask"/copy of Bitmap to examine the pixel boundary between the black lines of ... coloring book page ... then I'm calling setPixels on the Bitmap that the user is seeing... now I've got this beautiful thing that when I touch-to-color, it'll color alright... perfectly... but when I touch the next part to color it, BAM, color disappears from my first touch and appears on Dec 28 14:50:13 new touch... So, any ideas here? I was hoping to draw those pixels on top of the canvas... those pixels and those pixels alone... so I'm thinking setPixels might be taking my empty/copy, assigning the pixels, and drawing the entire thing on the canvas, and not just overlaying my newly colored pixels.? Dec 28 14:50:19 obscurant1st your AsyncTask did not know about your Activity Dec 28 14:50:40 obscurant1st so it cannot tell it what to do Dec 28 14:51:00 I created a new instance of activity instead of giving it the details of the current activity? Dec 28 14:51:08 that too Dec 28 14:51:27 SO I need to match up text on a spinner, too a value, that ONLY becomes relevant after the first value is chosen Dec 28 14:51:29 your activity made a new task, ok, but the task is unaware of who created it Dec 28 14:51:31 I'll follow up to that with: I have the coloring working perfectly, if I'm drawing on top of the canvas they see... but if they paint with black, then there isn't any going back :) (because it'll paint over the black lines I use to detect the boundary to flood fill inside of... which is why I'm trying to use the copy to analyze, get the pixels, color them and return it) Dec 28 14:52:13 Also you asked me to change: connectionDb cdb = new connectionDb(getAppContext()); to new connectionDb(this); to pass the activity instead of context? Dec 28 14:52:55 obscurant1st you are passing the application context (which is not your activity), if you pass the activity (which is also a Context), you can call methods on it Dec 28 14:53:51 So if we want to call methods we should always pass the activity and not the context! thanks a lot for explaining this to me. Really appreciate it! Dec 28 14:54:03 activity = context Dec 28 14:54:20 http://developer.android.com/reference/android/app/Activity.html Dec 28 14:54:21 ok. Dec 28 14:54:34 look at that tree at the top Dec 28 14:54:36 do you have that link on clipboard all the time xorgate Dec 28 14:55:00 no i have a search in my browser so i type 'a activity' and it searches d.android.com Dec 28 14:55:07 ah :p Dec 28 14:55:24 I need to read everything from the dev. I created this project in a hurry without much reading! Once I complete this project I will read everything from there! Dec 28 14:57:05 Right xorgate with the 1st spinner, their currency, its always going to be 1.0 isnt it? Dec 28 14:57:31 no :) Dec 28 14:58:53 amountentered -> convert to gbp -> convert to out_currency Dec 28 15:01:51 geez, I didn't know Android could be that responsive Dec 28 15:03:19 afk Dec 28 15:03:24 1/away afk Dec 28 15:08:25 xorgate, if you use chrome: https://chrome.google.com/webstore/detail/android-sdk-reference-sea/hgcbffeicehlpmgmnhnkjbjoldkfhoin Dec 28 15:09:03 hm Dec 28 15:09:23 i prefer opera Dec 28 15:10:09 xorgate: congradulations! You're the 2nd person I know to use opera! Dec 28 15:10:47 as soon as chrome allows tabs on the left side of the screen and mousegestures, i'm all on it Dec 28 15:11:20 oh well, anyone who uses chrome should install that addon Dec 28 15:11:44 but my chrome seems to be stuck on 'checking...' Dec 28 15:19:10 ok ty xorgate :-) Dec 28 15:19:15 I owe you a beverage Dec 28 15:24:35 "It may take several hours for your application to appear on the google play store" Dec 28 15:24:41 I am referring http://stackoverflow.com/questions/13270425/control-which-directions-the-viewpager-can-be-scrolled-dynamically-with-ui-feed code to implement gesture on viewPager. But my application crashes on multitouch device. Here is my code http://paste2.org/p/2660583 Dec 28 15:24:57 is this a realistic estimate, or is the actual average lower / higher? Dec 28 15:25:15 yes Dec 28 15:25:21 (it varies a lot) Dec 28 15:25:59 alrighty, thanks Dec 28 15:49:51 i have a dialog with an edittext and a button, when the focus is on the edittext and i press on the button, it moves the focus to the button and i have to press again to click it. is there a way for me to automatically press it? Skipping 1 tap Dec 28 15:56:17 is there any way I can check if there's an intent receiver for an action? Dec 28 15:59:13 Something like this should work: https://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent,%20int) Dec 28 16:00:05 There's methods for services and broadcast receivers as well Dec 28 16:06:09 So, my app is on the store, but Dec 28 16:06:16 "The item you were attempting to purchase could not be found" Dec 28 16:06:22 still not processed? Dec 28 16:06:27 what app is it? Dec 28 16:06:29 probably Dec 28 16:06:35 https://play.google.com/store/apps/details?id=com.atlantbh.pycsell Dec 28 16:06:52 incompatible with all my devices lol :( Dec 28 16:07:15 not found Dec 28 16:07:17 lol, what kind of devices you got? Dec 28 16:07:24 Nexus S, Nexus 7, Nexus 4 Dec 28 16:07:25 This goes up from api level 8 Dec 28 16:07:39 probably still processing, how long ago did you upload it? Dec 28 16:07:52 Uploaded it about an hour ago, appeared on the market some 15m ago Dec 28 16:08:03 ah Dec 28 16:08:22 well it's still got to get sent to every datacenter and such, so it'll be awhile before everyone can get it. :P Dec 28 16:08:47 I wanna put an app on there even more now Dec 28 16:08:58 shame I have nothing to contribute lol Dec 28 16:11:51 the "android:windowBackground" attribute uses the area _below_ the ActionBar, correct? Dec 28 16:11:59 unless ACTION_BAR_OVERLAY mode is set? Dec 28 16:12:11 is it possible to have the windowBackground fill behind the ActionBar without having that flag set? Dec 28 16:13:15 Kieronboz: it doesn't have to be nessarially contributing, I made https://play.google.com/store/apps/details?id=net.darkdna.choices_choices for fun and put it up. :P Dec 28 16:13:54 Lol, looks good! :D Dec 28 16:14:07 If i can finish my currency converter ill put it up :-) Dec 28 16:18:47 how the fuck is the app not compatible with my S3, my own app lol Dec 28 16:19:02 <.< Dec 28 16:19:52 Tee_Pee: did you do something with the compatability stuff on the market? Dec 28 16:20:02 no, nothing Dec 28 16:20:08 it even lists the S3 as a compatible device Dec 28 16:34:25 right, more app training, or far cry 3 :) Dec 28 16:34:34 choices, choices! ;) Dec 28 16:34:50 :P Dec 28 16:37:11 Well the app said, app dev, unfortunately lol Dec 28 16:37:49 my android SDK is fucked up, grrr Dec 28 16:38:38 Any ideas on how to create a shopping cart inside an app(design)? Dec 28 16:39:15 what chalanges you? Dec 28 16:39:28 and how do you want to add new products? Dec 28 16:39:37 I can get you a screenshot Dec 28 16:39:46 it is in spanish, but I'll translate :P Dec 28 16:39:51 ok :) Dec 28 16:40:01 I'm not a very good programmer though :) Dec 28 16:40:09 but I'll have a look Dec 28 16:40:23 http://puu.sh/1Gouf Dec 28 16:40:53 Show 4 spinners to choose the product, text field for quantity and then an add to cart button Dec 28 16:40:53 don't translate :) Dec 28 16:40:58 i think i get it Dec 28 16:41:00 too late Dec 28 16:41:01 yes Dec 28 16:42:26 are you familiar with arrays? Dec 28 16:44:06 of course Dec 28 16:45:46 I'd make a two or more dimensional array for each item with name and price in it and another array or list for the cart wich gets filled with those and an aditional number for the quantity (which needs check for a simmilar item, so you can +1 the quantaty instead of adding it again) Dec 28 16:46:00 than cast the prices to int and make the sum... Dec 28 16:46:22 regarding payment methods and gateways: no idea Dec 28 16:47:17 but I'm not shure what the smartest way to handle nested arrays Dec 28 16:47:20 is Dec 28 16:47:37 I was talking about just the desing Dec 28 16:47:44 ah ok... Dec 28 16:47:53 what do you sell? Dec 28 16:48:06 I dont sell anything. My customer sells printer ink Dec 28 16:48:13 .... Dec 28 16:49:10 a spinner for ink sounds like a horrible idea Dec 28 16:49:56 can i somehow set a unique identifier to each checkbox i have in a list with listitems? I need to know on which listitem the enabled checkbox is Dec 28 16:50:50 amandaC any better ideas? Dec 28 16:51:09 amandaC it is like Brand>Series>Model>Ink Dec 28 16:51:36 i have a custom arrayAdapter that creates a listView from Alarm objects, each alarm has an enabled attribute which i want to be linked to the state of the checkbox Dec 28 16:53:49 zyngawow, my internet broke, did you get my PMs* Dec 28 16:53:50 ? Dec 28 16:54:01 I did Dec 28 16:54:19 good Dec 28 17:04:39 is it okay to give my checkboxes IDs [0,...,10] acording to their position on my listview? Dec 28 17:05:09 this way i can ask the checkbox for it's ID in th onClick method to know it's position Dec 28 17:12:03 Anyone that sells app dev here? Dec 28 17:18:09 i sell app dev all the time Dec 28 17:18:33 anyone know what the point of an tag in your manifest that has the attribute android:enabled="false"? Dec 28 17:18:40 *point is Dec 28 17:18:48 tophyr: so you can enable it conditionally in the code Dec 28 17:18:57 ah; did not know you could do that. Dec 28 17:19:18 how is that accomplished? Dec 28 17:19:43 I forget now Dec 28 17:19:55 aqnd I'd point you to a code snippet, but I can't use my mouse Dec 28 17:19:58 wasn't aware you could modify manifest info programmatically Dec 28 17:20:09 hmm.. sounds like a rough morning Dec 28 17:20:59 AmandaC, whats up with tho moise? Dec 28 17:21:05 I broke my mouse a hgood month ago taking my netbook apart and putting it back to gether. :P Dec 28 17:21:21 ah, the trackpad? Dec 28 17:21:33 yep Dec 28 17:21:42 and I'm too lazy to find my external mouse Dec 28 17:21:49 hahah, for month? Dec 28 17:22:21 PackageManager.setComponentEnabledSetting Dec 28 17:23:18 Thats it! Dec 28 17:23:21 cya, i need to restart, hopefully enableing me to fully remove my android sdk.... Dec 28 17:23:31 What do you normally charge per hour of development? Dec 28 17:24:04 zyngawow: one MILLION dollars. Dec 28 17:24:08 ofc Dec 28 17:24:27 * AmandaC should add javadocs to this API sometime Dec 28 17:25:05 zyngawow: you would do well to read the channel title before you get booted. Dec 28 17:25:32 and, yes, $1m/hr Dec 28 17:25:40 tophyr: you would do well to read the messages before you judge Dec 28 17:25:49 I ask what the standard wage is Dec 28 17:26:00 I'm not advertising/solicitating a job, am I' Dec 28 17:26:15 you definitely give the appearance of doing that. Dec 28 17:26:20 touche sir, i'll grant you that. sounded like you were tho Dec 28 17:26:49 if you're looking for advice on what to charge for your own work, that's something that is somewhat often discussed here Dec 28 17:26:51 zyngawow: that obviously depend on e.g. the country Dec 28 17:27:04 tophyr: That's what I'm asking Dec 28 17:27:10 Country? Spain Dec 28 17:27:27 I imagine Norwegian wages are quite different to Spanish wages. Dec 28 17:27:28 then i apologize Dec 28 17:28:12 alexander__b: they indeed are. I'm not talking about being employed by a company Dec 28 17:28:48 I assume you are talking about freelance work, but you should probably say what country you are in, what country the clients are in, what kind of work, etc... Dec 28 17:29:35 your experience with Android is also a factor Dec 28 17:30:05 Yes, freelance work. My customers would be in Spain, as I announce myself in spanish forums, and.. I'm also in Spain. What kind of work? That depends on what the customer wants. My experience is not good. I charged 150€ for an app that took me 4-5hours Dec 28 17:30:26 But I guess that is cheap Dec 28 17:30:30 150 eur? Dec 28 17:30:54 yes Dec 28 17:30:55 Sounds cheap to me. Dec 28 17:30:59 well, you didnt do any design either Dec 28 17:31:05 I did not Dec 28 17:31:15 maslen: for 4 hours of hacking by a newbie? Dec 28 17:31:16 but if you're still learning, it sounds like a fair price Dec 28 17:31:32 alexander__b: Maybe new to android, not to java Dec 28 17:31:46 as you dont have a designer and no slick and pretty app to show yet id guess its hard to ask for much Dec 28 17:32:00 alexander__b: I was once paid to write a batch script that starts a process, sleeps for 10 minutes, and then restarts that process Dec 28 17:32:08 wtf Dec 28 17:32:24 other than that id have a minimum in mind and see how much you can get Dec 28 17:32:39 alexander__b: It's sometimes just cheaper to pay someone else an over-inflated rate :) Dec 28 17:32:42 I do this as a hobby, so.. Dec 28 17:33:17 once you start charging for it, stop thinking of it as a hobby ;) Dec 28 17:33:23 biggest favor you can do for yourself. Dec 28 17:33:30 hello, unlocking bootloader officially from sony site is reversible? Dec 28 17:33:42 #android-root Dec 28 17:33:53 heath: try there ^ Dec 28 17:34:02 also goodd never take to little money, rather do it for free than. either satisfying salary or no demands that can be claimed Dec 28 17:34:02 err hg_5, you Dec 28 17:34:08 tophyr: Well... I need to invest more time on the desing.. and more elegant and less hackish code Dec 28 17:34:14 cougarten++ Dec 28 17:34:55 im sorry, i cant type most special chars right now.... no smilies... im smiling for you, belive me... Dec 28 17:34:57 cya later Dec 28 17:35:14 AmandaC: :) Dec 28 17:35:20 you got my attention at least Dec 28 17:35:39 i'm sure my employer is happy about this ;) Dec 28 17:35:46 zyngawow: show your code to other people so they can point and laugh correct it. Dec 28 17:35:54 Anyone in here have any experience with the LiveView API? I've made a toy sandbox plugin, but I'd like to make it self-temrinate, since all it does is take no input and show some text. I tried stopSelf() in the button event, but that doesn't seem to have done anything Dec 28 17:36:14 zyngawow: i've got years of experience and i still say that ;) don't charge until you think you're ready. once you charge, it's no longer a hobby Dec 28 17:36:17 maslen: If you see the code of my app now, you all would laugh Dec 28 17:36:45 I also need a name. This one is shit Dec 28 17:36:46 either to your client, or to you. it's surprising how much of a change simply shifting your mindset from "i'm a hobbyist" to "i'm a professional" can bring about Dec 28 17:36:48 zyngawow: is the code a comedian? I like comedians! Dec 28 17:37:17 * maslen whacks AmandaC with a slimy politician Dec 28 17:37:31 :( Dec 28 17:37:52 Why waste a perfectly good fish? Dec 28 17:38:03 when I was given a salary suggestion by my employer I said uhm OK sure IDC about money though, and then they gave me a big raise... Dec 28 17:38:57 Well... I was going to do it for free, but the guy insisted on paying Dec 28 17:39:09 So I'm not really charging, but getting paid Dec 28 17:39:21 Once you're paid, you're more responsible Dec 28 17:40:01 it also completely changes the relationship. Dec 28 17:40:18 s/responsible/accountable Dec 28 17:45:20 maslen: that's what you think Dec 28 17:54:21 Does anyone here have anything (links, whatever) so I could improve my app designing? Dec 28 17:55:39 zyngawow: http://d.android.com/design Dec 28 17:59:58 Goodevening everyone Dec 28 18:01:19 question how do i move the default sdk,avds location ? Dec 28 18:07:52 Hmmm... my email-sending code isnt sending the email.. Dec 28 18:15:40 Goodevening everybody, i've got a problem; I've made a seekbar and OnSeekBarChangeListener, but on my Nexus 7 it doesn't register the onProgressChanged correctly. That is, when i drag the thumb it works, but when i "click" the seekbar it only triggers the onStopTrackingTouch (it works fint on my Desire Z)... Any suggestions? Dec 28 18:17:12 So, I've seen some apps where an ActionBar icon has a number in a circle next to it (just like in the notification menu). I wanted to use a pattern like that in my app (useful for things like invite requests, new messages, etc) using ActionBarSherlock but I'm not sure how to go about doing this Dec 28 18:23:21 Jouva: something like the facebook number of messages received type thing? Dec 28 18:23:34 Yes Dec 28 18:26:34 if an intent filter has a category on it, do i have to specify that category in order to resolve to it? Dec 28 18:36:59 Do people in here use juno? Switching between xml editors is not very fast, and there is some toolbar icon spamming meanwhile Dec 28 18:37:11 https://bugs.eclipse.org/bugs/show_bug.cgi?id=391868 Dec 28 18:42:15 I've written a service which should log sensor data in the background which so far works fine but is killed after some time where I don't use the phone, how can I prevent the killing? Dec 28 18:42:56 neXyon: make it run in the foreground Dec 28 18:43:02 neXyon: you need an ongoing notification for that Dec 28 18:43:04 http://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification) Dec 28 18:44:50 stevel, AmandaC: ah ok thanks, that was my plan for later anyway :) looks like I'll implement this earlier then Dec 28 18:45:21 neXyon: what are you making, if I may ask? Dec 28 18:45:40 AmandaC: a simple GPS logger Dec 28 18:45:44 ha Dec 28 18:45:45 ah Dec 28 18:46:05 my first app Dec 28 18:46:23 heh Dec 28 18:53:25 should ListViews automatically remember where they were? so if I tap an item and bring up an activity/view/whatever, and hit back -- the ListView will remember where I was? Dec 28 18:53:48 I don't think so Dec 28 18:54:38 AmandaC: oh. looking at a program where it remembers it for all listviews but one. trying to figure out where to troubleshoot. Dec 28 18:55:10 it fails on the search results dialogue. I suspect that when you go back to it, it redoes the query, but I'm not sure. Dec 28 18:55:16 s/dialogue/view Dec 28 18:55:17 maybe Dec 28 18:57:06 yep. it doesn't check if anything's changed, it just does runs the 50 lines each time. Dec 28 18:57:45 AmandaC: it's pretty interesting :) Yesterday I spent like 4-5 hours reading the docs, then I coded for 3 hours, then I executed the first time and it worked xD Dec 28 18:58:16 neXyon: that's a wonderful feeling. :3 Dec 28 18:59:07 AmandaC: yeah, but needs a lot of programming experience ^^ that's basically what I dreamed of 10 years ago Dec 28 19:18:19 slow and steady :) Dec 28 19:18:43 uhm is onCreate() called when you flip your phone to landView? this is a bit confusing. Dec 28 19:20:00 ok no. something else is really weird in here. Dec 28 19:20:43 anyone got a decent custom app form for a freelance app developer? Dec 28 19:22:58 why can't an asyncTask doInBackground method take a simple String as a parameter, do i really have to use it like String param = params[0] if I only want to pass one string value to the method Dec 28 19:27:41 Chilley: It's generics... I'm a little vague here, but I think you can specify the parameter as void. Dec 28 19:27:46 Chilley: That is, I think I've seen that done. Dec 28 19:28:20 Chilley: AsyncTask is a very elegant, hairy mess. Dec 28 19:29:50 Chilley: It mashes together runnable with a queue/threadpool with callbacks that have generic parameters and runs it all in a lifecycle. Dec 28 19:32:04 because asynctask takes variable arguments for doInBackground, if you want one that doesn't do that, rewrite it Dec 28 19:39:17 there's nothing stopping you from doing varArgs[0] and using just that, though Dec 28 19:39:39 oh, now I see the context Dec 28 19:41:41 Chilley: just create AsyncTask or whatever you need your return result to be Dec 28 19:41:52 and you can pass your String to your doInBackground() method Dec 28 19:42:19 Hello, I have a question about designing UIs for widgets Dec 28 19:42:52 is the interface of an AppWidget designed the same way as in an Activity? Dec 28 19:42:54 e.g. new AsyncTask() { … }.execute(stringToPass); Dec 28 19:43:04 and in your doInBackground() method: protected Void doInBackground(String… strings) { String theOneYouCareAbout = strings[0]; } Dec 28 19:46:29 either way, he's bitching about params[0] Dec 28 19:46:52 … what's there to bitch about it? Dec 28 19:47:02 you're given an array of varargs, just take the first one - what's the big deal? Dec 28 19:47:06 that's what I think Dec 28 19:47:11 sorry an array of args Dec 28 19:47:38 Can somebody clarify something for me... a lot of the AsyncTask docs and tutorials use very passive voice descriptions, e.g. "onProgressUpdate(Progress...), invoked on the UI thread after a call to publishProgress(...)." Dec 28 19:47:59 But I'd like a little more clarity on how/when onProgressUpdate() gets called. Dec 28 19:48:01 what's your point? Dec 28 19:48:09 a) Passive voice sucks :-) Dec 28 19:48:17 onProgressUpdate gets called when you call progress() or whatever it is Dec 28 19:48:24 onProgressUpdate is invoked whenever you call publishProgress() Dec 28 19:48:25 I'm guessing it doesn't though. Dec 28 19:48:45 publishProgress() is invoked from doInBackground, which occurs in the background - but it will take care of proxying the call so that onProgressUpdate() gets invoked on the UI thread Dec 28 19:48:52 so something just magically happens? No, something, somewhere, _does_ something. Dec 28 19:48:58 so inside of onProgressUpdate() it will be safe to touch widgets/views/etc. Dec 28 19:49:01 you're guessing it doesn't? Dec 28 19:49:07 something magical happens, yes Dec 28 19:49:24 If publishProgress() actually directly caused the UI thread to invoke onProgressUpdate() that would defeat the whole point of the asynchronosu separation. Dec 28 19:49:36 So what I'm curious about is what actually happens. Dec 28 19:49:47 look at the AsyncTask source if you're really curious Dec 28 19:49:51 I have suspicions, but they're only guesses. Dec 28 19:49:52 but basically AsyncTask creates a Handler Dec 28 19:49:52 publishProgress -> post to handler Dec 28 19:49:56 handler calls onProgressUpdate Dec 28 19:49:58 how is that magical Dec 28 19:49:58 publishProgress posts a message to that Handler Dec 28 19:50:04 Yeah, I was hoping somebody else might actually understand it, but I guess I'll have to get the source and look. Dec 28 19:50:13 and that Handler runs the onProgressUpdate() in the UI thread Dec 28 19:50:19 Ah, so there is a handler behind the scenes then? Dec 28 19:50:22 it's a pretty standard way of proxying calls to the UI thread Dec 28 19:50:23 yeah Dec 28 19:50:29 Cool, that's the missing piece I was looking for. Dec 28 19:50:29 there's always a handler behind the scenes Dec 28 19:50:31 puff: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/AsyncTask.java#L620 Dec 28 19:51:11 if you're ever reconciling between background threads and ui threads, there is a handler involved Dec 28 19:55:07 Cool, thanks. Dec 28 20:02:45 anyone in here using the new gradle-based build system? I'm curious how to work in a protocol buffer can I just stuff in the PB gradle plugin or...? Dec 28 20:03:46 gradle based build system? Dec 28 20:03:48 eh? Dec 28 20:03:58 yeah, google is switching Dec 28 20:04:32 that's gonna be a pain Dec 28 20:04:56 pfn: new zebralight http://zebralight.com/S6330-Triple-18650-Triple-XM-L-2400Lm-Flashlight_p_104.html :D Dec 28 20:05:11 thermal regulation Dec 28 20:05:18 fancy :p Dec 28 20:05:32 looks so stubby Dec 28 20:06:03 * AmandaC has been toying with using it for her projects, even converting a few existing libraries to beeing able to use it Dec 28 20:06:39 What did you guys practice with, I cant make a useful app so just looking for things to make to further familiarize myself with this stuff Dec 28 20:06:41 i only briefly looked at groovy and was ike meh, i hope i dont have to learn a bunch of it again to tweak the gradle scripts Dec 28 20:06:47 wtf ever happened to groovy anyhow Dec 28 20:07:01 groovy sucks ass Dec 28 20:07:08 haha Dec 28 20:07:59 even the creator of groovy admits it, heh Dec 28 20:09:10 kind of taken out of context Dec 28 20:09:12 http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html Dec 28 20:11:41 I wonder how compatible the gradle-build is with the current ant build Dec 28 20:11:47 i.e. how much needs to be changed Dec 28 20:13:29 pfn: going to learn any new languages in 2013 ? Dec 28 20:13:52 I doubt it Dec 28 20:14:08 who knows, I use whatever fits the job at hand Dec 28 20:14:10 * pfn shrugs Dec 28 20:14:17 g00s: Prolog Dec 28 20:14:23 I think :) Dec 28 20:14:27 which is scala, all the time, everywhere :D Dec 28 20:14:27 maybe forth Dec 28 20:14:45 p_l: there was a huge forth guy here at one time Dec 28 20:14:47 afk - food Dec 28 20:14:49 iatt04 or something Dec 28 20:15:04 IA44O4 Dec 28 20:15:16 g00s: btw - my n4 arrived :3 Dec 28 20:15:25 (brb for food) Dec 28 20:15:25 p_l: oh finally ! Dec 28 20:15:27 took long enough eh Dec 28 20:15:40 i haven't been able to get a n7 online, been out of stock forever Dec 28 20:16:28 p_l: lucky Dec 28 20:16:36 i may just bite the bullet and grab a iphone 5 Dec 28 20:16:36 still out of stock? Dec 28 20:16:46 what's up with all the supply delays... Dec 28 20:19:28 pfn: clearly it's SJ's ghost haunting the drivers, causing them to drive into rivers Dec 28 20:19:37 It's the only sane explination! Dec 28 20:19:55 AmandaC, so, do you have a migration guide for moving from ant-to-gradle for the android builds? Dec 28 20:20:00 I'm curious what needs to be accomodated Dec 28 20:20:16 * pfn still wants to retain library project support in his current sbt plugin Dec 28 20:20:46 pfn: there's a "migrated" thing in the build tools repo, but it doesn't work last I tried, so I end up just restructuring the libraries myself Dec 28 20:22:05 * AmandaC looks through the MyTracks API, trying to figure it out Dec 28 20:22:22 so does gradle follow the src/main and src/whatever convention now Dec 28 20:23:01 the product flavors thing is interesting Dec 28 20:25:48 yes, it uses src/main/java Dec 28 20:26:21 Man, the AsyncTask code is a little twisty... something doesn't make sense to me. The docs, etc, all say onPreExecute() is run on the UI thrad, but I see executeOnExecutor(), which I assume is being run on the Threadpool thread, directly invoking onPreExecute(). (line 586). Dec 28 20:26:46 executeOnExecutor/execute must be called from the UI thread Dec 28 20:27:11 asynctask documentation says so clearly Dec 28 20:27:14 ? Dec 28 20:27:26 you said it doesn't make sense Dec 28 20:27:29 what I said makes sense of it Dec 28 20:28:10 Ah, okay, I see that line now. For some reason the preceding paragraphs made it seem like it was being executed by the threadpool. Dec 28 20:38:16 I have an Activity that uses sliding navigation with a ViewPager and Fragments Dec 28 20:38:25 right now the minSDK is 3.0 Dec 28 20:38:51 can I make this Gingerbread compatible? Dec 28 20:40:09 yes Dec 28 20:40:37 need to use the support lib Dec 28 20:40:47 g00s: yesterday I talked with customs, they told me to retrieve it personally on monday Dec 28 20:40:55 today, I had surprise mailman visit :) Dec 28 20:41:06 I'm using the support lib v4 Dec 28 20:41:26 do I need an older version to use gingerbread Dec 28 20:41:34 no, they all work on gingerbread Dec 28 20:41:50 hm, then I'm not sure why eclipse complains Dec 28 20:44:23 eclipse always complains Dec 28 20:44:36 you figure out what it's complaining about Dec 28 20:44:47 RustyShackleford: in my experience, ADT is often complaining about support lib. Sometimes in obscurely non-fixable ways Dec 28 20:45:49 my sliding browser was created mostly by the new activity wizard Dec 28 20:46:02 ouch Dec 28 20:46:03 that's where I saw complaints about the minSDK Dec 28 20:46:28 however, I lowered the minSDK in my manifest and I see no complaints Dec 28 20:46:29 the "wizards" in ADT always get something weird for me Dec 28 20:46:59 i need to try running it in a gingerbread emulator Dec 28 20:51:06 i really wish they made devices more easily upgradeable Dec 28 20:51:16 it's such a shame so many people still run gingerbread Dec 28 20:51:24 sure is Dec 28 20:51:46 hopefully they don't still sell devices that come with GB Dec 28 20:51:54 oh, they do Dec 28 20:52:11 even in the US Dec 28 20:52:18 and why? Does ICS require that much more resources? Dec 28 20:52:29 older devices are still sold Dec 28 20:52:37 I notice that most "budget" devices are running Gingerbread Dec 28 20:52:43 cheaper devices that they don't care about developing for do Dec 28 20:55:24 I almost wish I had an iPhone. There are too many Android devices Dec 28 20:55:47 do apps generally have a problem only on specific phones? Dec 28 20:56:42 that is, the app works fine on most devices, but a few cause some bugs? Dec 28 20:57:32 how do multimedia applications override other multimedia services? Dec 28 21:00:00 I'm a little confused about the Activity lifecycle. My app seems to work alright but I'm not 100% sure what's happening behind the scenes Dec 28 21:00:32 RustyShackleford: yes Dec 28 21:00:57 I load a cursor and then display the rows in a ListView. The cursorAdapter is saved as a member Dec 28 21:01:36 onStart() is fired whenever the Activity restarts, so I think that it performs the query each time the activity is started Dec 28 21:02:06 most likely Dec 28 21:03:01 the results will be identical, so I'd like to figure out how to query only once. If the user presses the back button and this activity is restarted, it should just use the results that were previously retrieved Dec 28 21:03:39 lots of ways. Loader is probably your best bet. Dec 28 21:04:45 it's my own Sqlite database Dec 28 21:05:04 you use a Loader with a ContentProvider, correct? Dec 28 21:05:21 You use a CursorLoader with a ContentProvider Dec 28 21:05:31 You use a Loader with whatever you want Dec 28 21:05:39 In my activity, I am saving all the needed information in the onStop function. How do I determine whether I need to read the saved data and restore it to the screen or simply continue the application because the information is already present on the screen? I need to know if the application was destroyed or not. And I have to restore the information in the onStart if that makes a difference Dec 28 21:06:58 If onCreate is called, your Activity was destroyed Dec 28 21:08:08 If I define a fragment in xml and set the id="@+id/fragmentId" shouldn't doing findFragmentById(R.id.fragmentId) return the correct fragment and not null? Dec 28 21:09:36 maybe.. depends if it's finished inflating Dec 28 21:10:13 tophyr: yeah it is done inflating. I'm trying to grab the fragment when a button is clicked Dec 28 21:11:02 is there a book equivalent in style to the gargenta o'reilly book, but more up to date? Dec 28 21:12:47 dunno, then. i don't really have the time to help, sorry :/ someone here will tho. Dec 28 21:15:06 tophyr: no worries. :) Dec 28 21:15:34 It should return the correct fragment Dec 28 21:15:47 It's currently returning null Dec 28 21:15:50 can I give MediaPlayers setDataSource() method an HTTP URL as a parameter? If not what must I do with the URL to get it in the correct format for this method Dec 28 21:16:03 Probably doing something wrong then Dec 28 21:17:10 SimonVT: yup. Not sure what though. In my xml I have Dec 28 21:18:56 why must i give the setDataSource() a context paramter when giving it a URL Dec 28 21:20:56 Chilley: have you tried just passing 'this' for contexT? Dec 28 21:24:17 An Uri can point to many things Dec 28 21:24:22 Some of which require a Context to access Dec 28 21:25:50 damnit... I figured out the problem... I have two layouts for tablets/phones and I was editing phone will testing on tablet... lol Dec 28 21:29:17 boas Dec 28 21:33:20 im going crazy. ive spent all day on this and cant get the selected item, or set the selection for my listview in a dialog fragment... http://pastebin.com/u4bxJ4wG Dec 28 21:34:01 .setSelection(0) doesn't update the list selection, and .getSelectedItem() returns null Dec 28 21:34:20 Can someone please help me with this problem - I'm trying to have it so I have an app that reads the gps sensor and the acc sensor at the same time, I got the gps sensor to work after a location change, but I want it to also read the acc sensor after location change to here is the code I made - https://gist.github.com/4395787 Dec 28 21:39:58 what do you mean? you want to measure the acceleration after you detect a move from the GPS? Dec 28 21:40:26 SpeedEvil yes Dec 28 21:40:57 Hi Dec 28 21:41:22 what happens? Dec 28 21:41:27 Is this type of progress bar something which is provided by the framework with title, cancel button, borders and colours etc. all done automatically, or do I need to build one myself? http://developer.android.com/design/building-blocks/progress.html Dec 28 21:42:40 SpeedEvil it doesn't read the change in acc - or depending on where I put the code it will crash the application, I have it post a toast to tell me if it has read it - I also tried to just have the event listener check for gps change, then grab the gps, then check for acc change which never gets called apparently Dec 28 21:48:52 "an activity bar (in Holo Dark) appears when a user first requests a download" ... is an 'activity bar' a UI control? I can't find anything called ActivityBar or similar... Dec 28 21:50:28 birbeck: I think you want ListView.setChoiceMode(CHOICE_MODE_SINGLE) and ListView.setItemChecked(0, true) Dec 28 21:51:15 Hmm these docs seem to be split into high level and low, with no link from the high to the low, so you kinda have to guess. Dec 28 21:51:29 SimonVT: thanks, i knew you would come through :) Dec 28 21:51:54 SimonVT: the choice mode is set in the layout and is working, but when i click on the positive button, the selection is null Dec 28 21:52:06 even when i click something from the list Dec 28 21:52:45 Yeah, I'm not actually sure what setSelection/getSelectedItem does :p Dec 28 21:53:25 I have a GLSurfaceView with Java GLES20 code that renders frames in <1.5ms (Tracer for GL). I get a sustained rate of about 59FPS on my device, never below 58. Yet I can see STUTTER in movement of objects. Looking at systrace I can see an occasional eglSwapBuffers that takes 18ms. I guess that results in a missed frame. Anyone has any idea why? Dec 28 21:53:28 i dont think i have actually ever used a single or multiple select list outside of a preference Dec 28 21:53:48 so maybe getSelected...() is not right Dec 28 21:54:16 fuck me Dec 28 21:54:22 rikkus: No, it's basically a TextView, a ProgressBar and an ImageButton or something.. You have to put it together yourself Dec 28 21:54:23 .getChecked...() Dec 28 21:54:36 SimonVT: I see thanks Dec 28 21:55:13 birbeck: Btw, final LayoutInflater inflater = LayoutInflater.from(getActivity()); breaks if you're extending Theme.Light and you run on GB or something Dec 28 21:55:13 * rikkus is currently trying requestWindowFeature(Window.PROGRESS_VISIBILITY_ON); setProgress(...) Dec 28 21:55:22 to see if that does anything like what's depicted Dec 28 21:55:55 (Dialogs are black on GB, maybe other older platforms as well) Dec 28 21:56:02 SimonVT: interesting. what about Theme.Sherlock.Light.DarkActionBar? Dec 28 21:56:09 Same deal Dec 28 21:56:29 So, basically what you have to do Dec 28 21:56:31 this will only be run on 4.0+ though, i dont even know why i have abs other than its part of my skeleton Dec 28 21:56:44 2 sec, gotta write an example Dec 28 21:57:19 cool. not a problem for this small project, but this is interesting nonetheless Dec 28 21:58:52 My internet is crapping up tonight Dec 28 21:59:52 thats no good Dec 28 22:01:21 Is there any trick in Android 2.3 and higher for getting JavaScriptInterface calls to work? I've tried every possible way of invoking an external method from within the JS, and I can't get a single sign of life out of it at all. Dec 28 22:01:27 setItemChecked() and getCheckedItemPosition() worked :) Dec 28 22:01:56 it was down for an hour earlier .. Then it was up and running fine until after my ISPs customer service closed >.< Dec 28 22:04:40 hello all Dec 28 22:05:38 SpeedEvil any ideas? Dec 28 22:08:22 anyone here ever worked with Evernote integrations before? Dec 28 22:09:11 sorry, no. Dec 28 22:09:40 SpeedEvil Thx Dec 28 22:11:47 anyone working on NFC Card Emulation on N4? Dec 28 22:12:22 you mean to pretend to be a credit card? Dec 28 22:12:46 SpeedEvil: in my case, I'm actually looking into Mifare Classic emulation Dec 28 22:13:05 k Dec 28 22:13:11 p_l: i only tried to do mifare stuff for a day Dec 28 22:13:35 didnt get very far with it since i couldnt get the terminal emulator running Dec 28 22:13:38 I'm unsure how it works, just that that's a common question, and is generally impossible. Dec 28 22:14:51 SpeedEvil: pretending to be a credit card is the most common use of NFC chips in phones, it seems ;) Dec 28 22:15:01 yes. Dec 28 22:15:06 and it's actually pretty simple as long as you don't try to clone the card Dec 28 22:15:11 p_l: the most talked about, not the most common though Dec 28 22:15:14 with the credit card vendors authorisation Dec 28 22:15:35 and cooperation, and a 'secure element' in the phone Dec 28 22:15:50 birbeck: most common for laymen Dec 28 22:16:43 SpeedEvil: "secure element" = physical cryptographic keystore (can be on SIM card - cause SIM card is such secure element too, except for mobile net login) Dec 28 22:17:08 can be emulated, actually Dec 28 22:18:18 sure. Dec 28 22:18:28 if everyone gives permission. Dec 28 22:18:47 getting the secrets to put in the key store is a problem otherwise Dec 28 22:19:54 the secrets are part of the data that composes the "card". So it's part of stuff given by issuer. Anyway, that's not what I was going after (I do not want to clone a CC card - since I would need to clone a card that already did PayPass etc.) Dec 28 22:19:59 This might be a retard question, however, I just tried some opengl es stuff on android and followed some examples. now I've got a "wobbly" rotating square. Anyone superfamiliar with that problem and can point me out what the heck I'm getting wrong? :) Dec 28 22:22:49 p_l: yeah, I'm interested in similar things, I want to fake an encrypted card for my own secure access uses Dec 28 22:23:36 mifare classic is mostly a storage card - I want to avoid the annoying mixups of cards to open doors at university and open subway access (not tickets themselves - it's just that I have two mifare cards in wallet, and I have to fiddle with them everytime I want to enter subway) Dec 28 22:23:46 Samsung Note 2 / Droid Jelly Bean / No SSD card; when removing an app that was stored on internal memory, after said removal storage space is left unmodified; yet files are gone. any ideas? Dec 28 22:25:45 Good day Dec 28 22:28:10 is there an intel version of 4.2? or 4.1? Dec 28 22:33:08 intel? Dec 28 22:33:23 oh, the CPU manufacturer?/ Dec 28 22:33:48 birbeck: http://pastebin.com/zXXfxqun Dec 28 22:35:18 hmm interesting Dec 28 22:35:50 sorry x86 AmandaC stop busting my balls Dec 28 22:36:46 damn, N4 charges *fast* Dec 28 22:37:01 AmandaC: pendantry ftl Dec 28 22:37:08 ... Dec 28 22:37:36 Fuck you guys, too, I didn't realise, "intel" means "inteligence" first to me, not "Major CPU manufacturer" so stop being dicks. Dec 28 22:37:46 birbeck: The Context returned is a ContextThemeWrapper with the appropriate theme (main concern here is text color) Dec 28 22:38:56 overreact much? Dec 28 22:40:07 Maybe, but frankly I'm just sick of people at this point. Dec 28 22:40:35 thats the first step in lesbianism Dec 28 22:40:43 QubeZ: already there. Dec 28 22:40:54 whoa Dec 28 22:41:01 It appeared you were being a pedant (which counts as dickishness). You weren't, so just say so, don't be an actual dick about it by calling people dicks... Dec 28 22:41:45 QubeZ: apply cold water to burn... ;) Dec 28 22:41:50 Mind you, I'm often a pedant, but then I'm such a dick... Dec 28 22:42:19 lol Dec 28 22:42:51 hmm Dec 28 22:43:15 writing an account authenticator and typoed "addaccount" Dec 28 22:43:22 :s Dec 28 22:44:34 is there a defined way for the account authenticator to say the details are invalid? Dec 28 22:44:50 oh, error code and error message Dec 28 22:55:58 lol QubeZ ….first step to lesbianism Dec 28 23:01:21 don;t worry guys, there are many more steps involved Dec 28 23:04:10 what's the name of the java/android method documentation headers? Dec 28 23:04:28 Anoia: javadocs? Dec 28 23:04:36 Anoia: Javadoc tags? Dec 28 23:04:43 ahh, ok Dec 28 23:04:49 that looks write Dec 28 23:04:53 erg Dec 28 23:04:54 right Dec 28 23:05:09 ahh, I now see the full syntax. Thanks Dec 28 23:05:19 (I'm not a native androdi developer) Dec 28 23:05:25 android/java Dec 28 23:08:08 are there any good/fun resources for working with robotics/arduino/android? Dec 28 23:13:16 Does anyone know of a good Joomla or other CMS template for a freelance software developer's website? Dec 28 23:14:40 zyngawow: Maybe ask in #web? Dec 28 23:22:17 zyngawow: sometimes the best website is what you have hosted on googlecode or github :D Dec 28 23:23:22 What do you guys prefer, adding a fragment at runtime or in xml? Dec 28 23:23:44 zyngawow: what do you plan to run with joomla/cms Dec 28 23:24:00 my website Dec 28 23:24:02 "freelance software developer's website" Dec 28 23:24:46 If you know css/html and php/mysql I would suggest just rolling your own Dec 28 23:24:51 well, in case anyone gave a thought to my earlier GLES20 performance question, the solution was to get rid of java.nio.Buff.get() calls (used when accessing vertex buffer object IDs allocated by GL). Dec 28 23:25:12 That's what I do. I would almost say just run a wordpress and grab a theme somewhere Dec 28 23:25:41 I dont have any html or css or php knowledge Dec 28 23:30:34 Personally a) this conversation is more appropriate for #web and b) I think joomla sucks :-). Dec 28 23:31:04 and c) wordpress is ludicrously easy to install and you can either select one of the bundled themes or find one elsewhere and upload. Dec 28 23:31:18 but d) wordpress is also notorious for having security holes, so keep it updated. Dec 28 23:31:57 And that's about all I have to say about that :-). Dec 28 23:38:40 is there a specific channel for Android + Robotics discussions? Dec 28 23:44:07 I hate it when Eclipse gets slow like hell (takes about half a minute to open a dialog) Dec 28 23:52:20 I knew there was a good reason I've stuck with emacs :-) Dec 28 23:52:37 IntelliJ IDEA has Android support Dec 28 23:53:27 well, restarting it helps and I guess it has the best integration of android development tools?! Dec 28 23:59:12 In the end our tools make us, as much as we make the tools; so I've personally much preferred being on the controlling side of that equation :-) but in the end, whatever makes you productive is desirable; and the secret sauce is different for everybody I suppose. Dec 29 00:03:52 anyone got a nexus 4 ? Dec 29 00:04:06 in java are instance variables initialized to 0 / null when a class intance is created ? Dec 29 00:04:27 k0nichiwa: yes Dec 29 00:04:41 oh cool, was wasting my time m_var = 0; in constructor =) Dec 29 00:04:57 a little wasteful tho for cases where it's not needed Dec 29 00:05:09 k0nichiwa: They're initialized to whatever you initialized them to in the declaration. If you don't initialie them in the declaration, then they initialize to whatever the defaults are for that type, it varies by type. Dec 29 00:05:31 k0nichiwa: E.g. "public int foo = 0 ;" Dec 29 00:05:57 ic, for an int the default is 0 Dec 29 00:06:08 k0nichiwa: Unless you're doing work where other people will be using your code (i.e. framework development or some such) then it's best to not anticipate. Dec 29 00:07:09 waht do you mean Dec 29 00:07:17 k0nichiwa: See http://docs.oracle.com/javase/tutorial/java/javaOO/initial.html and http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html Dec 29 00:07:20 if my class has an int member, it is initialized to 0 on construction Dec 29 00:07:24 ...for default values. Dec 29 00:07:39 so i wont bother doing m_var = 0 in the constructor Dec 29 00:07:43 or is that not correct ? Dec 29 00:08:13 k0nichiwa: Opinions vary on whether it's better to explicitly initialize default values or not. I prefer to be explicit, others prefer to leave it out. Dec 29 00:08:33 k0nichiwa: In either case, you don't need to initialize them in the constructor. Dec 29 00:08:51 yeah i know you can provide the default in the declaration Dec 29 00:09:14 k0nichiwa: You might want to have some sort of reinitialize-all-instance-vars method to plan for the object being pooled and reused, but that's usually not a good idea unless you're explicitly coding it to be pooled and reused. Dec 29 00:09:24 is it simple enough to convert between Uri and URL instances or is it best to stick to Uri for android stuff and URL for org.apache.http? Dec 29 00:10:15 I'm building an App with Project SDK 4.1.2 ... displaying the VERSION.SDK_INT shows 16 at runtime whether I build with minSdkVersion="8" or ="14" for example ... the minSdkVersion seems to be deciding which side of an AlertDialog the Positive and negative buttons are placed (left / right) ... I'd Like to code such that OK/Positive is always on the right ... can I determine the minSdkVersion... Dec 29 00:10:16 ...at runtime? Maybe I'm missing something? Dec 29 00:11:10 Anoia: A URL is a special case of a URI. I don't know what nuances there are for android code. Dec 29 00:11:53 I meant classes Dec 29 00:12:09 android.net.Uri vs java.net.URL Dec 29 00:12:49 from what I could see, they are incompatible without going to/from a string Dec 29 00:13:09 Anoia: Just a guess, but I would assume you'd use a URL for most uses, but Intent, etc, are coded to use the more general/more abstract URI so as not to lock out unexpected uses. Dec 29 00:13:27 Hm, lemme look at android.net.uri. Dec 29 00:13:34 I really wonder if the folks who made the WebView class ever actually tried… like… I don't know… testing it once or twice? Dec 29 00:16:47 hey guys Dec 29 00:18:48 hmmm .... i think I'm seeing a lightbulb Dec 29 00:20:17 hello world! - still got the translate error... anything else i need to change ? Dec 29 00:20:46 Anoia: the two classes aren't "convertable" in any convenient way (as far as I know) other than stringify -> parse from one instance to another. android.net.Uri purports to be more efficient and "better at handling malformed urls" than java.net.URL/URI, so take that for what it's worth. Dec 29 00:21:16 pretty much what I'd though Dec 29 00:21:55 so I'll stick with URL/URIs for org.apache.http* and Uri for android.* Dec 29 00:22:12 I don't think you have a choice, right? :-) Dec 29 00:22:15 Anoia: Well, there isn't much out there about it, but the android.net.URI javadocs say that URI is very forgiving and does little-to-no validation. It may be that they did this because it's lighter/faster, or it maybe that they thought java's URL is too finicky and causes too many problems (java's SMTP stuff drew a lot of criticism for this). Dec 29 00:23:11 Oh, malformed URIs, good point. I always hated that about a lot of java stuff, too much all-or-nothing and you have no idea what exactly was wrong with the data to make the code blow up. Dec 29 00:23:36 the URIs are all internal so shouldn't be much of a problem Dec 29 00:24:24 * capella googles determine minsdk at runtime Dec 29 00:28:07 the amount of code I see that says something like try { url = new URL(...); } catch (MalformedURLException ign) { /* bail entirely */ } makes me think checked exceptions weren't the right thing to do Dec 29 00:29:44 of course, there's the "i give up" style where every method "throws Exception" :-) Dec 29 00:33:32 Build.VERSION.SDK_INT seems to be just that ... Project SDK you built with ... not min/target to in manifest Dec 29 00:33:45 ok, now I just need to find a decent way to build a URI with various parameters :) Dec 29 00:34:24 for android.net.Uri? Uri.Builder might have something convenient. Dec 29 00:34:47 nope, Java.net.URI :) Dec 29 00:35:02 unless I get the android one to build the string.. Dec 29 00:35:10 utter PITA Dec 29 00:35:15 yikes. :-) Dec 29 00:35:53 the true java bigot would create a facade class and generate one of the three things on demand, right? Dec 29 00:45:46 oh, I;m a c# gal :) Dec 29 00:49:51 C# lives in the same O-O apartment as java, though maybe the virus hasn't spread too much ;-) Dec 29 00:52:30 but i far less anal and disparate :) Dec 29 00:58:06 c# is nicer Dec 29 00:58:10 for sure Dec 29 00:58:20 i'm still wondering if there is a market for apps in the windows store Dec 29 01:00:05 if I want to pass a list of (easily enumerable) key/value pairs to a method, what's the best object/data type? Dec 29 01:00:19 bundle doesn;t seem to have an obvious iterator Dec 29 01:00:30 map? Dec 29 01:01:06 looks ideal Dec 29 01:03:44 thanks. I'll add that tomorrow Dec 29 01:03:46 goodnight all Dec 29 01:07:15 c# is nicer, but you can write android apps in scala :) Dec 29 01:07:19 and scala > c# by far Dec 29 01:07:58 you do that? Dec 29 01:08:01 use scala? Dec 29 01:12:16 Is it possible for me to directly access an app's sqlite database on a non-rooted phone? Dec 29 01:13:13 I just want to be able to drop it and recreate it from scratch Dec 29 01:13:33 to save me from having to write upgrade scripts for an unreleased app Dec 29 01:13:55 wouldn't clearing app data be enough? Dec 29 01:14:10 or is there something else in there Dec 29 01:14:26 I'll try deleting the app Dec 29 01:14:50 But it would also be nice to have an "SQL shell" into that database for other reasons Dec 29 01:14:53 (to try things out) Dec 29 01:15:31 I'm guessing it's not possible without root Dec 29 01:15:32 cincinnatus: the updatehelper can drop tables if you want Dec 29 01:15:36 but not sure Dec 29 01:15:45 sqliteOpenHelper, err Dec 29 01:18:28 Hello :) Dec 29 01:19:51 Q: If i bay a tablet that have support for OTG is it possible also to connect some custom usb device and then wrote an apllcation that will use it ? Dec 29 01:20:54 anyone know what the wifi network interface is called on android? wlan0? Dec 29 01:20:58 the tablet has nothing to do with OTG Dec 29 01:21:13 the OTG cable acts as the USB host, something the tablet doesn't do on its own Dec 29 01:21:16 that's all Dec 29 01:21:46 if your tablet already acts as a USB host (don't know any that do without an expansion, though), then you're already set Dec 29 01:22:30 tophyr: it's called wlan0 on my nexus 7. Dec 29 01:22:31 ok but the point is where the host is? I suppose the tablet need to have on board the usb host controler and then when proper usb device is pluged then the rest is done by kernel and then android. Dec 29 01:22:38 tophyr: According to logcat output. Dec 29 01:23:12 so when the tablet will had information that support OTG then should be able to support also other kind of usb devices Dec 29 01:23:13 hetii: In theory, yes. Dec 29 01:24:27 hetii: If you have a tablet, an OTG cable and some mystery USB device and you plug the OTG cable into the tablet and the mystery USB device into the OTG cable, and the tablet has drivers & etc to speak to the mystery USB device then yes, the tablet can speak to the mystery USB device. For example, I have a nexus 7 with a broken screen, an OTG cable and a mouse.. Dec 29 01:24:50 cincinnatus: if the app is compiled in debug mode, shouldn't you be able to do run-as via an adb shell? Dec 29 01:25:06 hetii: But from what I've heard from a friend who implemented MTP and a big chunk of whatever it is the ipod uses, it's not pretty. Dec 29 01:25:28 hetii: That is, implementing a USB protocol is not pretty, etc. Dec 29 01:26:14 hetii: to clarify, the nexus 7 has a screen that is viewable but the touch aspect is broken, hence usable with a mouse. Dec 29 01:26:59 sounds interesting Dec 29 01:27:10 puff: grazie. how'd you grab that? ifconfig doesn't work on mine Dec 29 01:28:02 well... i suppose that OTG cable is simple wire that change just the size of connector. Then also i suppose that under linux the usb host device is done like any other hots from pc so if i plug my device the kernel should see it... The question is if he had already libusb or if not then i could play with my device like with HID interface. Dec 29 01:30:05 tophyr: I was running adb logcat to debug my app and I saw some messages about wlan0 go by. Dec 29 01:30:40 hetii: i read something the other day that seemed to indicate that android doesn't have HID support, it uses some other protocol. i have absolutely no knowledge of anything on this subject tho Dec 29 01:30:44 tophyr: Though I agree, I'd like to be able to ssh into my android and have the usual linux commands :-). I think there is a thing out there for this purpose... Dec 29 01:30:55 puff: oh, hah, cool kk. Dec 29 01:31:10 busybox usually does a pretty good job of that but i don't have it on this partiuclar device Dec 29 01:31:16 tophyr: That is, I remember reading about some package that is for such situations (minimal linux installs on embedded hardware) that gives you a bunch of the usual - right , busybox. Dec 29 01:31:33 not sure it does ifconfig tho Dec 29 01:31:37 * tophyr shrug Dec 29 01:31:43 How do you set that up? Dec 29 01:32:03 tophyr: huh now you kill my idea :) no HID ? So is it means that when i plug regular usb keyboard throught OTG cable then it will not work ?:) Dec 29 01:32:18 put it in /bin and then softlink all the commands it supports to it, i believe Dec 29 01:32:58 hetii: no idea. can't remember what i was reading, but it mentioned HID for RIM/Win8 support, some other protocol for iOS/Android support Dec 29 01:33:20 about OTG: http://tech2.in.com/how-to/accessories/how-to-make-your-own-usb-otg-cable-for-an-android-smartphone/319982 Dec 29 01:33:34 so its just wires :) Dec 29 01:33:34 tophyr: cool, I'll write that down for later. Dec 29 01:44:02 anyone know of a *good* implementaiton of pinch to zoom and dragging gesture listeners which allow for smooth movement ? Dec 29 01:44:23 i guess it's because the touch screen on my moto droid 1 doesn't produce clean touch data Dec 29 01:44:33 my pinch to zoom and drag are kind of jittery Dec 29 01:51:47 k0nichiwa: i have that phone, the screen sucks ass Dec 29 01:52:01 its impossible to use the web browser Dec 29 01:53:26 all relatie i suppose, i think its not bad, pretty good droid Dec 29 01:53:42 well it looks good, but its touch accuracy is terrible Dec 29 01:53:51 == in java is comparison of object references right ? =) Dec 29 01:54:00 i t must be u cant override operators Dec 29 01:54:51 k0nichiwa: yes it is Dec 29 01:59:47 unless what you're comparing are primitives of course Dec 29 02:04:30 Technodrome, depends on the project, but yes, I've used scala on android Dec 29 02:07:15 for the record, OTG isn't just a connector adapter Dec 29 02:07:31 OTG acts as an inline USB host for the USB device Dec 29 02:07:43 since your tablet, the Nexus 7 for example, doesn't have a USB host driver Dec 29 02:26:02 hm my java breakpoints arent breaking, time to restart adt maybe Dec 29 02:34:34 What in the hell does "process is bad" mean? Dec 29 02:35:22 W/BroadcastQueue( 389): Unable to launch app net.darkdna.amanda.lv.trackswhere/10122 for broadcast Intent { act=com.sonyericsson.extras.liveview.LAUNCH_PLUGIN flg=0x30 (has extras) }: process is bad Dec 29 02:40:36 moral corruption Dec 29 02:45:07 AmandaC, google suggests remove app, reboot phone, reinstall Dec 29 02:46:10 Zharf: indeed, I'm curious what it means, though Dec 29 02:46:52 https://android.googlesource.com/platform/frameworks/base/+/483f3b06ea84440a082e21b68ec2c2e54046f5a6/services/java/com/android/server/am/BroadcastQueue.java line 774 :) Dec 29 02:48:37 Zharf: that's not very informative Dec 29 02:48:53 it means that the process has done or tried to do a naughty thing and now has to go to his room without supper Dec 29 02:48:59 ah Dec 29 02:49:10 so it's caused by the earlyer version's missing permission? Dec 29 02:49:40 I always find code to be more informative than plain text Dec 29 02:50:03 * AmandaC only finds code more informative when she's familiar with the codebase. Dec 29 02:50:16 true enough Dec 29 02:50:21 I'm not with the inner workings of Android Dec 29 02:50:22 but the codebase is there! Dec 29 02:50:25 :p Dec 29 02:50:37 AmandaC: sounds like the process got into a bad state and was killed Dec 29 02:52:09 Zharf: every time I try to dig in and find the puzzle peices for that, it leaves me out of (mental) ram and confused as hell. Dec 29 02:52:20 err s/for that/for Android/ Dec 29 02:52:29 it's got too many moving parts for me. P Dec 29 02:52:41 * AmandaC gives up on typing Dec 29 02:52:45 it's quite the machine Dec 29 02:53:07 what i usually do is run around screaming "FIX IT FIX IT FIX IT" and then restart the phone and then it works Dec 29 02:53:27 speaking of which Dec 29 02:55:38 While I can guess the reasons a restart is required, it doesn't make it any more friendly a bug fix. :P Dec 29 02:58:51 * AmandaC makes a note to not use crittercism, ever, because of all the errors it's dumping into her logcat Dec 29 02:59:30 AmandaC: what's wrong with i ? Dec 29 02:59:39 i talked with them twice and added it to my app Dec 29 02:59:41 great success **** ENDING LOGGING AT Sat Dec 29 02:59:58 2012