**** BEGIN LOGGING AT Fri Aug 10 02:59:59 2012 Aug 10 03:17:20 ok Aug 10 03:17:22 for the record Aug 10 03:17:40 android file transfer does NOT work for mountain lion Aug 10 03:23:09 oh I guess its a kernel thing Aug 10 03:23:10 boo Aug 10 03:33:38 i hope burner becomes available for android Aug 10 03:38:30 what is burner Aug 10 03:39:22 app for disposable phone numbers Aug 10 03:40:04 http://gigaom.com/2012/08/08/need-disposable-phone-numbers-burner-has-you-covered/ Aug 10 03:43:21 g00s, questionable utility. Aug 10 03:43:50 since there's no anonminity. Aug 10 03:45:04 thats ok. today i had to provide my ph# to craislist for verification, i would rather not have. Aug 10 03:45:12 *craigslist Aug 10 04:21:49 Yeah, I don't get how they managed to acocmplish throw away phone numbers. Aug 10 04:26:47 dude craigslist has gone ghetto Aug 10 04:26:57 their policies for data usage basically make it useless Aug 10 04:29:27 I use Google phone as mine. Aug 10 04:32:31 ron_frown: they actually changed that policy within the last day or so; but yeah its a ghetto. apparenty the guy gets a chuckle at how lame he can make the site while other attempts fail Aug 10 04:33:09 can you build apps that consume their data Aug 10 04:33:20 its not a good ux at all; and i don't mean from a visual design perspective. its bare the way Norman would prescribe; but its just a shitty ux all around Aug 10 04:33:24 I can understand some of their use cases Aug 10 05:06:28 hey guys. Those of you who have published apps, what have you done to get your apps noticed and downloaded ? Aug 10 05:10:36 hey Jak_o_Shadows Aug 10 05:10:39 JakeWharton: Aug 10 05:10:45 lol Aug 10 05:10:58 devslash: Aug 10 05:11:04 i hate when people have nicks that are almost the same as someone else Aug 10 05:11:36 seriously Aug 10 05:11:46 if i have to type more than two characters it should be a kick/ban Aug 10 05:12:33 Ja is very common.... Aug 10 05:19:30 do app updates count towards the graph shown on the Play web store? Aug 10 05:19:37 or is it fresh downloads only? Aug 10 05:24:53 i thought it was the number of total user installs that shows up in the console Aug 10 05:27:09 JakeWharton, I think it is fresh installs only Aug 10 05:27:26 i'm skeptical of that Aug 10 05:27:44 but i'd like to think that was true Aug 10 05:28:06 Because if it was not, I would almost double every time I put out an update Aug 10 05:29:41 true story Aug 10 05:30:36 I looked up Square on Techcrunch and it said Susan Wu was an advisor or something Aug 10 05:32:52 indeed Aug 10 05:36:16 devslash, if you want to get your apps notices and downloaded, consider translating them Aug 10 05:36:53 "It works for me", as Fred Dryer used to say on Hunter Aug 10 05:41:22 Ologn, I'm curious about the results you've gotten by translating. How much did it help? Aug 10 05:42:04 The number of words in my app is like 60 so it'll be easy for me Aug 10 05:42:34 Maybe more like 40 :) Aug 10 05:42:36 themirror: for active user/device installs, English is my 6th most popular language for all my apps Aug 10 05:43:08 Okay thanks I'll definitely do so then Aug 10 05:43:13 I have 93k active Spanish users, 64k active Portuguese, 50k active Italian, 35k active Dutch Aug 10 05:43:25 Damn nice Aug 10 05:43:31 35776 Dutch, and 35266 English Aug 10 05:43:39 What is ur app Aug 10 05:43:48 I know i have one, undetermined whether i have more Aug 10 05:44:00 http://play.google.com/store/apps/developer?id=Panacea+Supplies Aug 10 05:45:23 Ooh anime game :D Aug 10 05:45:34 I just started looking into Asia recently...but then I got sidetracked with an Android consulting gig, so I've been dealing with JSON interactions and not my apps Aug 10 05:45:57 Yaa, that's a port of Hex-a-hop, an open source C++ game Aug 10 05:46:21 Three 5 star ratings but not many users yet Aug 10 05:46:55 I thought that was your package name for a second Aug 10 05:47:02 almost had an aneurism Aug 10 05:47:43 Making any money Ologn? Aug 10 05:48:04 mr_lou, I made $475 in ads in July Aug 10 05:48:20 Ologn, Very nice. What ad-system are you using? Aug 10 05:49:23 mr_lou: Admob, Millennial Media and Inmobi. Aug 10 05:50:30 My first four apps were not games and did well with those ad companies...but my three newest games are apps geared toward a younger audience...I have to find a new thing ad thing since CTR is bad...maybe Jumptap or something... Aug 10 05:51:12 Ok Aug 10 05:51:42 Getting on Android Market makes me lose 3G :/ overall I need to update from 2.1 already o.O Aug 10 05:52:13 The Admov/MM/Inmobi CTR is bad for the young people games, not the non-game apps Aug 10 05:52:27 Ologn, We'll soon be done with the development of our first Android game (4th title though), and need to choose some ad-system. That's why I'm asking. Aug 10 05:53:14 We had some great experience with Greystripe for your first 3 games. But they were J2ME, and Greystripe doesn't support that platform anymore. Aug 10 05:54:51 Yes, people have told me Greystripe might work for the games Aug 10 05:56:48 That's good to hear. Aug 10 06:16:46 hi, i have galaxy w, i need to find device name of gps, i checked the folder /sys/devices/platform but i couldn't find device name Aug 10 06:16:51 thanks in advance Aug 10 06:20:36 i'm trying to make a custom layout that has a gridview inside a horizontal scrollview inside a vertical scrollview and i'm trying to understand how to do this Aug 10 06:20:55 mostly, i'm wondering which to extend Aug 10 06:21:43 is it enough to just extend scrollview to get the gesture methods, etc, and write the hscrollview and gridview inside of it? Aug 10 06:22:30 it's a bad idea to put a gridview inside a vertical scrollview Aug 10 06:22:36 gridview already handles scrolling Aug 10 06:22:51 Hi. If an IntentService calls stopSelf() from handleIntent(), will the system invoke handleIntent() with the queued intent if there were multiple calls to startService() from some component? Aug 10 06:23:27 I mean, to continue with the next call, should I call stopSelf() or simply return from hendleReturn() Aug 10 06:23:42 *handleIntent() Aug 10 06:26:05 romain: didn't realize that… does it handle horizontal scrolling too? Aug 10 06:27:00 yati: from the onHandleIntent() docs: When all requests have been handled, the IntentService stops itself, so you should not call stopSelf(). Aug 10 06:28:28 doc_savage: okay, thanks for pointing out. I missed that :| Aug 10 06:29:28 yati: :) np, I'm not sure if calling stopSelf() would prevent the next Intent being triggered though, but best to avoid it Aug 10 06:32:01 yati: looking at the sources, IntentService doesn't override stopSelf() so it will likely just stop the service Aug 10 06:33:46 doc_savage: wow. You do core devel? I am new to Android dev, and must say, I love the design. I just love the concept of intents :) I have written services on .NET, but IntentService is just so neat :) Aug 10 06:34:27 yati: no, nowhere near core dev :) I just keep a copy of the source to hand as it's useful when the docs aren't clear enough Aug 10 06:34:35 I have to admit, I do love the whole idea of intents too Aug 10 06:34:45 doc_savage: the sources are huge aren't they? Aug 10 06:35:31 a few gb I think, tbh I've not checked the size of it (it's on a file server with loads of room) Aug 10 06:35:37 it's calculating :) Aug 10 06:35:42 okay :P Aug 10 06:36:10 I did not want to disk hog my laptop, so I did not clone the code :P Aug 10 06:37:09 4.8gb is my source directory Aug 10 06:41:20 doc_savage: ooh. Tried Jelly Bean? Aug 10 06:41:37 i have it on my NS yeah, it's very smooth Aug 10 06:41:57 how would i access kernel memory in android if i wanted to look around at things? Aug 10 06:42:17 I love Google Now :) Almost like in movies :P Aug 10 06:43:27 kanzure: Maybe use kernel modules with NDK? Aug 10 06:43:57 yati: "kernel modules" ? which ones Aug 10 06:43:59 kanzure: a) become root b) go to #android-root Aug 10 06:44:03 there are many linux kernel modules Aug 10 06:44:27 Leeds: oh this is #android-app-dev-only? :/ Aug 10 06:44:34 indeed it is Aug 10 06:44:39 ok fine. Aug 10 06:44:48 which is why it says that in the channel topic... Aug 10 06:44:52 yati: I've not really played with Now, I'll have to have a look at some point Aug 10 06:45:19 Leeds: well, maybe i didn't consider root to be important Aug 10 06:45:28 Leeds: e.g. consider i was running an emulator of a non-custom rom Aug 10 06:45:43 you didn't think it was important to be root to read directly from kernel memory? Aug 10 06:45:50 not if i'm running the vm, no Aug 10 06:46:22 whatever Aug 10 06:47:16 kanzure: I meant try compiling your own kernel modules with the NDK. And you're planning to see kernel memory from an emulator? :D Aug 10 06:50:45 yati: not planning.. just looking around Aug 10 06:51:04 seeing what else is out there. i figured there would be some way to wire up gdb without a lot of pain. i might be wrong. Aug 10 06:51:20 /proc/kcore is probably what i want Aug 10 06:51:51 guys... really... wrong channel Aug 10 07:01:53 Hey I just must not have paid attention much with photoshop. What are guide lines in the ic_launcher template? I want to put them on my 512x512 to stay in bounds but I don't know what they are or how big Aug 10 07:24:04 They are 4 px and under view for the record Aug 10 07:25:16 the icon guidelines on d.android.com are really good Aug 10 07:29:38 :) Aug 10 07:30:02 :( Aug 10 07:30:49 :( Aug 10 07:40:24 interesting, Exynos Dual 5 supports GL ES 3.0 and DX 11 Aug 10 08:29:33 I have got a problem with android assets. First app run an xml file gets successfully loaded from assets. Exit app, open it again, xml file from assets could not be read. I already tried closing the stream, but this did not help. After the app crashed, i can restart it normally as desired. Aug 10 08:30:57 can a fragment have its own sub fragments or must they reside in an activity? Aug 10 08:32:18 hi Aug 10 08:32:31 How to know if my Galaxy S2 has NFC support or not ? Aug 10 08:33:57 maxagaz, http://stackoverflow.com/questions/7618657/how-to-check-whether-nfc-is-enabled-or-not-in-android Aug 10 08:34:14 maxagaz: I'd look on the battery - many/most NFC phones actually have the circuitry in the battery, to keep it close to the back cover Aug 10 08:34:45 or if you don't want to write any code download z-devicetest Aug 10 08:34:47 and it'll tell you Aug 10 08:39:48 Hi guys, I'm looking at having a crack at Android development. I've been developing other stuff with PHP, C and c#.net for years, but never Java. Can anyone point me in the right direction to getting started? Aug 10 08:39:58 I got as far as getting Eclipse and the ADK installed Aug 10 08:40:14 Although the virtual Android device ran unusably slow Aug 10 08:42:01 if you have a physical device it's significantly nicer to develop with Aug 10 08:42:14 I have my personal SGS3 Aug 10 08:42:25 great, what operating system? Aug 10 08:42:30 Can the development environment be configured to run and debug on the device? Aug 10 08:42:33 ICS Aug 10 08:42:43 I meant your development machine Aug 10 08:42:50 Oh, OSX Aug 10 08:43:07 cool, OSX is the easiest imo Aug 10 08:43:12 http://developer.android.com/tools/device.html Aug 10 08:43:28 follow the docs here and you can debug to your device over usb rather than the emulator Aug 10 08:53:06 android sdk manager cant access the repository, just keeps sptting out "network is unreachable" any workarounds? Aug 10 08:55:19 ensi: tried forcing https in options? Aug 10 08:55:25 bindv6only is 0 in /proc/sys.. Aug 10 08:55:27 appel1: yes Aug 10 08:55:58 then I dont' know, works just fine here Aug 10 08:56:55 ok Aug 10 08:59:25 appears to be an unresolved issue Aug 10 09:00:33 holy crap, Yegge's last blog post is like … book long Aug 10 09:10:13 preds: a fragment is a management container around a View, you cannot nest them Aug 10 09:10:28 fragments, that is. you can, of course, nest views! Aug 10 09:11:54 cheers Aug 10 09:30:35 Can someone explain how PathMeasure works to someone who isn't strong when it comes to math? Aug 10 09:35:19 hi there Aug 10 09:38:42 i know this is not a programming question... but has anyone been getting their transactions cancelled in Google Checkout lately ? I woke up this morning to and there were 10 cancellations in a row. I'm pretty sure it's a google issue because the clients keep trying to buy the game Aug 10 09:49:56 Can anyone tell me if a resource name like ball_54.png is illegal for resource name? I'm getting bitmapfactory fail and wondering if its the problem Aug 10 09:50:28 not sure _ is legal Aug 10 09:51:38 na it's legal Aug 10 09:52:57 ball_54.png is legal Aug 10 09:53:31 If it is not you have an error when AAPT bundle resources. Aug 10 09:53:50 themirror: The problem probably comes from the fact your image is not OK. Aug 10 09:53:53 I'll look into it thanks Aug 10 09:53:57 What are you doing to load it ? Aug 10 09:53:59 maybe Aug 10 09:54:13 bitmapfactory decode Aug 10 09:54:22 but it was working earlier Aug 10 09:54:31 And what's the error ? Aug 10 09:54:49 skimagedecoder factory returned null Aug 10 09:55:04 I used pngout on em Aug 10 09:55:12 Why don't you simply use Context#getResources().getDrawable(R.drawable.ball_54) ? Aug 10 09:55:14 and now using alias xmls Aug 10 09:55:30 it was working with decode Aug 10 09:55:36 what's the difference Aug 10 09:55:52 No need to pngout your images. AAPT does that for you. Aug 10 09:56:36 getDrawable returns a Drawable which is way easier and more powerful to use than a low level Bitmap Aug 10 09:57:20 How so? I don't need powerful Aug 10 09:57:50 you can get a bitmap from the drawable i suppose Aug 10 09:57:55 hi Aug 10 09:57:59 I don't see what in my manifest could be filtering the nexus 7: http://pastebin.com/STKLLZ2r any ideas? Aug 10 09:58:06 Of course you can but that's useless Aug 10 09:58:22 except if you really want a bitmap Aug 10 09:58:26 nx5: I think it is Aug 10 09:58:39 add android:required="false" Aug 10 09:58:47 why would that cause trouble? Aug 10 09:59:31 You ask for a rear camera … a Nexus 7 doesn't have Aug 10 10:00:05 hmm.. so that asks explicitly for a rear cam, not any cam? Aug 10 10:01:00 nx5: http://developer.android.com/guide/topics/manifest/uses-feature-element.html#hw-features => The application uses the device's camera. If the device supports multiple cameras, the application uses the camera that facing away from the screen. Aug 10 10:01:07 So I guess so :) Aug 10 10:01:25 well, let's try and see Aug 10 10:01:37 what am I really supposed to do with an UnsupportedEncodingException? I don't think there's any way to handle that gracefully Aug 10 10:03:37 cyanogen: that seems to use any camera, if there is no back one Aug 10 10:13:34 looking for help to resolve a findViewById bug that returns an object the first time around but null the second time around Aug 10 10:13:36 http://pastebin.com/pAVXPfGq Aug 10 10:14:17 Both of the Log statements return the same object reference Aug 10 10:14:41 but when I run it, I get a nullpointerexception on line 6 Aug 10 10:14:50 saying tv is null Aug 10 10:20:08 um, if I'm builing a library project that uses GPS, do I have to add permissions to library manifest? Aug 10 10:22:33 not sure, but i think you definitely need them in your project manifest Aug 10 10:40:02 hi Aug 10 10:41:07 to create a grid of buttons that scrolls in both directions, is it best to have a tablelayout inside a hscrollview inside a scrollview? or is there a better way? Aug 10 10:41:26 i see there's a gridview but i think it might only support images Aug 10 10:42:23 how do i call a method from a tab activity within the main activity without changing the tab? Aug 10 10:48:56 i play a bit with the example tabview from here http://www.mkyong.com/android/android-tablayout-example/ and extended one of the tab activities with an TextView an a method call textOut(String text). Now i would like to kall the methon from the main activity but it fails:( Aug 10 11:04:45 I have a HorizontalScrollView with images, how can I make the images be full-screen? Aug 10 11:33:52 <[emil]> hi, I need to display a text over the selected image in gallery view. I followed http://saigeethamn.blogspot.in/2010/05/gallery-view-android-developer-tutorial.html . Can some explain to me how I can do this following the code given in the link? Aug 10 11:35:16 <[emil]> It could be really simple. Am not even one week experienced in android programming and it is extremely important that I do this. Aug 10 11:35:32 <[emil]> But somehow I dont get it. Aug 10 12:02:27 hi there.. looking for someone who can help me with some questions about ProviderTestCase2 and its capabilities Aug 10 12:05:15 suppose I have a ContentProvider that shares files which are stored in its private data directory (Context.getFilesDir()) Aug 10 12:06:11 Got an API problem guys, if anyone can help? I'm using an activity to create another activity and it works flawlessly in API 14, however, when I knock it down to the target API of 8, it totally hangs without throwing any kind of exception :( Aug 10 12:06:21 In the onCreate() of my ContentProvider I already copy some default files into that directory Aug 10 12:07:06 When running a ProviderTestCase2 against my Content Provider the Context.getFilesDir() returns /dev/null (because of the IsolatedContext which is used by the testcase) Aug 10 12:07:11 Lamium: can you pastebin the code Aug 10 12:07:21 Sure Aug 10 12:09:00 wongk: http://pastebin.com/BDc2kUqw Aug 10 12:10:29 Lamium: and when you debug this after setting the target, where does it hang? Aug 10 12:10:36 also, why are you reducing the target at all? Aug 10 12:12:19 wongk: I initially started developing for API14 accidentally so when I realised I just used eclipse to switch out the API target to 8. When I debug this, it gets to starting the activity and literally just hangs, I can try and pinpoint exactly where for you if you give me 2 seconds Aug 10 12:12:46 Lamium: you should target api 16 Aug 10 12:13:39 that doesnt make much sense Aug 10 12:13:47 unless you don't care about providing a suboptimal experience on newer devices Aug 10 12:14:03 wongk: what about all the people that don't yet have API16? I'm releasing an app for commercial purposes and I need to make sure as many people get it as possible. API8 seems to be the average of where people are at now Aug 10 12:14:10 so few people are running JB, why would you target 16 Aug 10 12:14:26 Lamium: sure, you should set your minimum API to an appropriate level Aug 10 12:14:31 i also use 8 Aug 10 12:14:56 do you understand the difference between minimum and target?> Aug 10 12:15:07 Hey guys, can anyone explain to me what exactly "deprecated" mean Aug 10 12:15:20 Omar: it means the function is no longer used Aug 10 12:15:33 Omar: not the preferred API on the API level in which it was deprecated Aug 10 12:15:34 i do, but you still should test your app with the minimum. Aug 10 12:15:46 sevenseacat: well, yes, of course Aug 10 12:15:55 you should test it on all supported levels Aug 10 12:16:18 so isnt that what hes saying, its not working when he tests against 8? Aug 10 12:16:23 wongk: I would assume that minimum allows the app to be compatible with the minimum API set, but surely this means all your methods must be compatible with the minimum API Aug 10 12:16:33 but yeah Aug 10 12:16:34 he's saying it doesn't work when he sets his target to level 8 Aug 10 12:16:36 wongk: Gallery is deprecated, what would happen if I use it now? Aug 10 12:16:53 Omar: you'd have a Gallery Aug 10 12:17:08 someone can help me on how to call a method on an child activity in a tab activity pls? Aug 10 12:17:26 haha I mean my app wont run on Android versions Jellybean and beyond? Aug 10 12:17:32 wongk: However, If I run an android emulator that runs on API14 it works flawlessly Aug 10 12:17:38 Lamium: only the methods that are executed on that level Aug 10 12:18:55 and another question, is Gallery widget a class I can download and import it to my porject library? Aug 10 12:18:56 Lamium: what happens if you don't putSerializable? Aug 10 12:19:25 Omar: isn't it part of the API? Aug 10 12:20:24 wongk: my playerObject isn't passed. I've just run debug again, and according to logcat, the activity is being displayed but there's nothing on the screen and the emulator hangs Aug 10 12:20:41 wongk: but Gallery is deprecated.. meaning it wont be supported further so shouldnt I add it to my project to ensure I can use it? Aug 10 12:20:46 i'd suspect the FSMenuActivity class Aug 10 12:21:06 Omar: well, no, you should use its replacement Aug 10 12:21:42 wongk: the thing is, Gallery is EXACTLY what I'm looking for, and I've already wasted a day trying to implement it Aug 10 12:21:49 wongk: I'm heading out for lunch, I'll check it when I get back, thanks for the help guys, I'll be back later to let you guys know how I get on Aug 10 12:22:27 Omar: in the long run a day is insignificant Aug 10 12:23:04 you will likely experience problems/bugs in the future, and have an outdated looking app Aug 10 12:25:47 I tried implementing it through HorizontalScrollView but I have many problems =\ Aug 10 12:26:48 perhaps you're getting ahead of yourself? do you need to take a step back and learn more about the platform first? Aug 10 12:37:38 hey guys, i'm having an issue w/ android.support.v7.widget.GridLayout.Layout. i keep getting null pointers like: http://pastie.org/private/b1i1fduittsmqbqkg Aug 10 12:38:20 so, you know the different between a null pointer and an out-of-bounds array access? =] Aug 10 12:38:25 difference Aug 10 12:38:49 hah, i meant, OOB Aug 10 12:38:54 it's too early :| Aug 10 12:39:26 anyways, it happens when on click of one of the images in the gridview, so i have all of these log messages in the on click Aug 10 12:39:35 and it makes it all the way through the onclick without incident :\ Aug 10 12:39:47 gridlayout, i mean Aug 10 12:40:16 now the only thing i really changed was the animation, i programatically made an animation set instead of using an XML one Aug 10 12:40:40 but then i tried switching it back and it stil gives me array OOB Aug 10 12:40:49 so now i'm really lost Aug 10 12:42:11 wongk, and google doesnt seem to know anything about this one in particular Aug 10 12:43:25 yeah i got nuthin Aug 10 12:43:43 wongk, yah, and i maen erally nothing, it's scary Aug 10 12:43:53 OH, i added an animation listener Aug 10 12:44:06 start taking pieces out until it works? Aug 10 12:44:18 wongk, indeed, i did have this working at some point ;) Aug 10 12:44:44 nvm, i added the animation the other branch Aug 10 12:44:49 animatino listener, rather Aug 10 12:44:57 fark, what is wrong with this? Aug 10 12:46:45 can someone please tell me why I never get network updates? http://pastebin.com/DBHKHPFA Aug 10 12:46:56 (location network updates that is Aug 10 12:47:34 mornin Jug6ernaut Aug 10 12:47:47 mornin Aug 10 12:48:12 wongk, it's definitely something in one of my animation sets Aug 10 12:48:19 do someone knows how to remove an app without PackageManager? Aug 10 12:48:33 anyone know if a linear interpolator can mess with a gridlayout? Aug 10 12:48:38 cause crazy array OOB? Aug 10 12:50:09 wongk, i've isolated it to one of these lines: http://pastie.org/private/yjh86cxjhrdwif2eqjjw Aug 10 12:50:26 but just to be clear, none of these lines actually causes the OOB exception directly, and each line runs successfully without incident Aug 10 12:50:41 this seems to work http://stackoverflow.com/questions/8418385/can-i-uninstall-an-application-without-a-dialog Aug 10 12:50:43 one of these lines causes the gridlayout to look for an OOB index sometime shortly after this runs Aug 10 12:51:25 i don't know jack about animations Aug 10 12:51:42 wongk, animations are actually very easy Aug 10 12:51:48 sure Aug 10 12:51:58 that doesn't mean i know anything about them :P Aug 10 12:52:36 the one for isRightSide is an animation that interpolates a scale and a translation, the scale going from 50% size to 100% size relative to the top right side of the view and then translating it to 50% of the vertical pos Aug 10 12:53:10 it's good if you have multiple columns of images, it looks more natural if their pivoted relative to the side they lie on Aug 10 12:53:18 s/their/they're/ Aug 10 12:54:24 i'm thinking of an even more natural animation system that takes the row # / rows total to decide the vertical pivot point Aug 10 12:58:52 http://pastebin.com/DBHKHPFA simple network location class not working (no exception, and no location). Help? Aug 10 12:59:01 im a bit frustrated:( Aug 10 13:01:20 maybe i try the wrong way... but im a newby :D I would like to get a 4 tab layout and on the 4th tab i like to put some text logout output. Some exaples about that for me? Aug 10 13:02:42 tabhost + tabmanager + fragments + fragmentactivity Aug 10 13:03:46 at the moment i use startActivityForResult in the main class and putting an extra, in the Tab Activity class i create another intent an putting out the extra on the text pane. Aug 10 13:04:51 is it right to do that in the onCreate method of the second class? Aug 10 13:04:59 ok wongk, through experimentation the array OOB exception is caused by having layout params that specify a margin Aug 10 13:05:34 tango Aug 10 13:05:55 so, i think i'll put some padding on the imageview instead Aug 10 13:06:01 see if that works Aug 10 13:07:44 alemos: I need more information. Do you ever get any of your listener callbacks? Do you have the LOCATION_COURSE or LOCATION_FINE permissions? Are you actually somewhere that would have a network location (e.g. celltower or known wifi)? Aug 10 13:07:55 If you go to google maps with GPS turned off, is your location ever found? Aug 10 13:08:34 lov: callbacks never get called. I have both COURSE and FINE, and google maps does work Aug 10 13:09:44 that works :) Aug 10 13:10:02 so, guys, if you use a gridlayout, do NOT set the margin of the inner elements with a GridLayout.LayoutParams Aug 10 13:10:16 use the internal setPadding Aug 10 13:10:27 kaneda^: congrats, you've found a framework bug Aug 10 13:10:34 b.android.com =] Aug 10 13:10:37 wongk, i feel like i shoudl report it or something Aug 10 13:11:27 lov: it has to be some small detail :| Aug 10 13:11:53 09:10:32 < wongk> kaneda^: congrats, you've found a framework bug Aug 10 13:11:53 09:10:39 < wongk> b.android.com =] Aug 10 13:12:10 lov, i said i FEEL like i should, not that i would ;p Aug 10 13:13:14 alemos: what happens if you request GPS updates? Aug 10 13:13:44 lov: I do see the GPS icon on the cellphone, but I don't get callbacks either Aug 10 13:15:02 alemos: attach breakpoints, verify that way instead of just logging statements Aug 10 13:15:15 if the GPS icon appears, you should at least be getting the onProviderEnabled callback Aug 10 13:15:20 and onStatusChanged Aug 10 13:15:45 weird:| Aug 10 13:17:49 http://pastie.org/private/fwmnfn8z9xbblueous7lig <-- is this a good bug report? Aug 10 13:20:07 lov: breakpoints on the overrides are never hit Aug 10 13:21:00 alemos: hmm Aug 10 13:21:29 but setting breakpoints in your getLocation method get hit? Aug 10 13:22:35 lov: I am paused there right now Aug 10 13:23:04 lov: resumed, and then nothing… (and the gps icon is up) Aug 10 13:27:08 http://pastie.org/private/fwmnfn8z9xbblueous7lig <-- is this a good bug report? Aug 10 13:27:40 alemos: I'm not sure what to suggest offhand; you're apparently registering for location callbacks appropriately. Aug 10 13:27:57 try registering a gps status listener, see what you get Aug 10 13:28:02 lov: can i send you the project? could be something else somewhere else Aug 10 13:28:20 Please don't, sorry. I've got a bunch of stuff to do. Aug 10 13:28:26 I get the same result with gps or network provider Aug 10 13:28:31 ok, thanks anyway Aug 10 13:28:38 Here's something else to try Aug 10 13:28:53 download and install a GPS status app, see if it actually gets callbacks when the GPS is running Aug 10 13:28:58 also, try restarting your phone Aug 10 13:29:02 you could just be in a bad state Aug 10 13:29:16 What is the preferred place to call AlarmManager#setInexactRepeating() to have my IntentService fire every so minutes? Aug 10 13:30:09 Should I call it in a calling component or the service itself? Aug 10 13:31:00 lov: gps test from the play market works fine :\ Aug 10 13:33:48 style advice - should I use runOnUiThread or a Handler to switch the content view from another thread? Aug 10 13:35:23 Oh, hmm. Aug 10 13:35:23 lov: weird. if I disable GPS, the "onProviderDisabled" gets called Aug 10 13:35:33 try replacing your 10, 10 args with 0, 0 Aug 10 13:35:42 you might just not be getting anything because you haven't actually moved Aug 10 13:36:41 lov: had already tried that. same behavior Aug 10 13:36:52 * lov shrugs Aug 10 13:38:18 lov: it's weird I get stopped on the breakpoint for the requestLocationUpdates twice Aug 10 13:41:15 An_Ony_Moose: It's the same thing.. Might as well use runOnUiThread if you can Aug 10 13:41:51 SimonVT: ok, thanks. Seems simpler but I thought it might be ugly/hackish/something otherwise bad Aug 10 13:42:35 runOnUiThread just posts it to a Handler as well Aug 10 13:42:41 oh right Aug 10 13:42:52 well I'll do that then. Thanks! Aug 10 13:45:21 anyone else wants to take a stab as to why location services aren't working? Aug 10 13:45:38 the listener isn't getting called Aug 10 13:49:50 I'd like to fix some typos and grammar mistakes on developer.android.com .. is there anyway to submit changes without downloading all 8.5 GB of source code? :) Aug 10 13:57:36 Right I'm back Aug 10 13:58:02 * doc_savage needs a break Aug 10 14:03:57 Sri19: nope Aug 10 14:04:12 wongk: The app still refuses to work on the API level 8 and there's definitely nothing out of the ordinary in the FSMenuActivity Aug 10 14:04:15 lov, ouch Aug 10 14:04:36 maybe consider separate repo for docs? Aug 10 14:04:47 i know its wishful on my part Aug 10 14:04:48 :) Aug 10 14:05:27 Sri19: That's not really possible, since the docs are autogenerated from the source code Aug 10 14:05:49 yes, some part of the docs Aug 10 14:05:52 I THINK that different parts of the sources could end up as different git repositories in some way Aug 10 14:05:52 Lamium: can you clarify, it doesn't work on API level 8, with what target? Aug 10 14:06:00 i was refering to typos specificaly on developer.android.com Aug 10 14:06:02 so you could probably skip the vendor proprietary stuff Aug 10 14:06:06 but that'd take a bit of hacking Aug 10 14:06:21 wongk: I have now changed the target to 14 and the kept the minimum API as 8 Aug 10 14:07:28 hi Aug 10 14:07:38 Lamium: can you run in hierarchy viewer and see if it thinks something is on screen once the new activity 'launches'? Aug 10 14:07:56 wongk: Sure sec. Aug 10 14:08:03 or maybe it will give some other clue Aug 10 14:10:38 wongk: Should my activites be appearing twice in the Windows window of the Hierarchy Viw? Aug 10 14:10:42 view* Aug 10 14:11:24 that sounds unusual but i honestly don't use it often enough to know Aug 10 14:12:07 wongk: This is the first time I've used it. But then again, when I use the API 14 emulator, it also displays the activites twice Aug 10 14:12:42 wongk: The activity is definitely listed as showing in the Hierarchy View though Aug 10 14:12:47 Looking for recommendations on good android-dev books. Aug 10 14:14:13 deadmund: http://www.amazon.com/Professional-Android-Application-Development-Guides/dp/1118102274/ Aug 10 14:14:46 wongk: Can I ask why you recommended this one over the others? Aug 10 14:14:53 wongk: (thanks btw) Aug 10 14:15:08 http://www.amazon.com/Reto-Meier/e/B002BMF4OC/ref=ntt_athr_dp_pel_1 Aug 10 14:15:47 the problem with books is that the time between being finished and being on shelves is usually a major android release Aug 10 14:15:53 so the day it's available, it's old Aug 10 14:15:54 yeah Aug 10 14:15:58 and doesn't cover everything Aug 10 14:16:22 this one is on the 3rd addition and covers most everything up to and including ICS, at least Aug 10 14:16:26 edition Aug 10 14:16:38 canadiancow|work: I realize that :) Aug 10 14:16:43 i had early access to a book once for an open source project, and i laughed, because "v2" of the open source project was being written in private, but was pushed out to the public before the book was available Aug 10 14:16:46 and it was totally obsolete Aug 10 14:17:17 canadiancow|work: download an update to the book then.. ;) Aug 10 14:17:25 also, being a tech lead at google gives some nice inside access as things are being developed =] Aug 10 14:17:26 how about any of the o'reilly publications Aug 10 14:17:30 there werent any updates? Aug 10 14:17:33 and it wasnt an ebook? Aug 10 14:17:44 canadiancow|work: Aug 10 14:17:46 :P Aug 10 14:17:57 well ive seen some books that do have updates Aug 10 14:17:59 for minor things Aug 10 14:18:01 but this was major Aug 10 14:19:15 hi did someone use the 'androidViewPageIndicator' Library of JakeWharton ? Aug 10 14:19:23 at least once Aug 10 14:19:30 ok cool Aug 10 14:19:37 morning canadiancow|work Aug 10 14:19:45 hi Aug 10 14:19:49 or should i say, moo Aug 10 14:20:42 it makes me nervous when i see libraries that build against 1.6 Aug 10 14:20:45 :\ Aug 10 14:20:59 stork: I want to use this to create an image slider with circle indicator. I follow this tutorial http://life-optimized.blogspot.de/2012/04/android-create-image-viewer-using.html but it doesn't work in my project, I just see the indicator Aug 10 14:21:05 stork: not the imageViews :( Aug 10 14:21:07 they're missing so many features for no good reason Aug 10 14:21:11 canadiancow|work: won't you be my neighbor Aug 10 14:21:47 no? Aug 10 14:21:50 well maybe? Aug 10 14:21:55 are you moving where i'm moving? Aug 10 14:22:33 using abs light theme and a listview with android.R.layout.simple_list_item, any idea why the default text color is white? => not visible white on white background Aug 10 14:22:41 shouldn't the theme apply to that one too? Aug 10 14:22:43 no Aug 10 14:22:52 why dont you move to the beast coast Aug 10 14:23:38 newfoundland? Aug 10 14:23:44 nty Aug 10 14:23:45 stork: any idea? or you need to see the pasteIn of my code? Aug 10 14:24:01 mikedg, honestly, because i dont know anyone there Aug 10 14:24:09 canadiancow|work, come to MTL Aug 10 14:24:13 if you pay me enough to fly to toronto every weekend, then maybe Aug 10 14:24:18 :) Aug 10 14:24:34 canadiancow|work: there are easy American girls in NY Aug 10 14:24:45 they don't exist in California Aug 10 14:24:49 canadiancow|work > americancow|work ?! Aug 10 14:24:49 there are easy [insert location] girls in [insert location] Aug 10 14:24:53 canadiancow|work, neg, we're a start up, you'd have to come live here ;) Aug 10 14:25:04 kaneda^ i wasnt talking to you Aug 10 14:25:12 montreal would be easier because i could drive to ottawa Aug 10 14:25:14 canadiancow|work, well you ought to be ;) Aug 10 14:25:15 and i know people there Aug 10 14:25:19 aliencow|work Aug 10 14:25:23 but you wouldnt be able to offer what id want Aug 10 14:25:26 haha Aug 10 14:25:27 in terms of total compensation and other perks Aug 10 14:25:32 mikedg, i had a contract out in cali last yaer, definitely plenty of girls ;) Aug 10 14:25:32 he wants a penis Aug 10 14:25:34 a perky penis Aug 10 14:25:38 lol Aug 10 14:25:45 canadiancow|work, probably true, they were barely able to offer what *i* want ;) Aug 10 14:25:52 mikedg wants my perky penis Aug 10 14:25:57 whoa, what conversation did i walk into the middle of here? Aug 10 14:26:08 hahah Aug 10 14:26:13 canadiancow|work: wirte me codes that sums up all multiples of 3 and 5 below 1000 Aug 10 14:26:16 .... Aug 10 14:26:25 lol Aug 10 14:26:28 no? Aug 10 14:26:31 kthxbai Aug 10 14:26:48 yes, or I'll have president Obama revoke your green card Aug 10 14:27:04 that might scare me Aug 10 14:27:05 if i had one Aug 10 14:27:12 and if i thought you could follow through on the threat Aug 10 14:27:52 Obama is my bro Aug 10 14:27:59 We were brogrammers back at Yale Aug 10 14:28:13 mikedg, int sumCount = 0; for(int i=1; i < 333; i++) { if(i*3 < 1000) { sumCount+=(i*3);} if(i*5 < 1000) { sumCount += (i*5); } } System.out.println("Sum of 3s/5s below 1000: "+sumCount); Aug 10 14:28:27 :| Aug 10 14:28:37 probably should be 334 at the top actaully, to include 333 Aug 10 14:28:44 5 points off for using System.out.println instead of Log Aug 10 14:28:50 ^^^ Aug 10 14:28:52 lov, it was a general java q ;p Aug 10 14:28:57 20 points off for including multiples of 15 twice Aug 10 14:29:00 5 more points for string concatination instead of String.format Aug 10 14:29:07 nothing in here is a general java question :P Aug 10 14:29:07 mikedg, better than using a % ;p Aug 10 14:29:32 20 points off for using brute force and not just using math to solve the damn Aug 10 14:29:33 lov String.format faster? Aug 10 14:29:35 problem Aug 10 14:29:44 Jug6ernaut: it is more elegant Aug 10 14:29:52 fair enough Aug 10 14:29:54 lov: math? Aug 10 14:29:59 yes? Aug 10 14:30:08 mikedg, yes, you can solve it using modulus math Aug 10 14:30:14 mikedg: Give me the sum of all numbers between 1 and 1000 Aug 10 14:30:23 mikedg: Gauss did this in kindergarten Aug 10 14:30:26 it is literally childs play Aug 10 14:30:28 lov, (n)*(n+1) / 2 Aug 10 14:31:08 So the answer can be deconstructed as "sum of all numbers with a factor of 3 + sum of all numbers with a factor of 5 - sum of all numbers with a factor of 15" Aug 10 14:31:27 lov, it said "or", so i dont think you need to remove the overlapping numbers Aug 10 14:31:39 sure you do. Aug 10 14:31:44 you don't want to include 15 twice Aug 10 14:31:47 he didnt say "or" ? Aug 10 14:31:55 and im with lov on this Aug 10 14:31:57 canadiancow|work, oh, i thought it was clear to include a # twice Aug 10 14:31:57 if(num%3 == 0 || num%5 == 0) Aug 10 14:32:20 lov, in that case just replace my if witha n else if Aug 10 14:32:22 lov wins an internet Aug 10 14:32:29 wait..... if(i*3 < 1000) what the fucking fuck Aug 10 14:32:30 then it wont double count Aug 10 14:32:41 lov, it's the reverse of he modulus, less expensive Aug 10 14:32:47 where i*3 < 1000 Aug 10 14:33:00 whatever Aug 10 14:33:03 this interview is over Aug 10 14:33:03 yea because time is an issue with a loop that iterates 1000 times Aug 10 14:33:07 thank you for your time Aug 10 14:33:10 security will help you out Aug 10 14:33:14 lol Aug 10 14:33:22 canadiancow|work, modulus operations are more expensive Aug 10 14:33:26 canadiancow|work: extrapolate to 1,000,000,000 Aug 10 14:33:30 or BIGNUM Aug 10 14:33:37 canadiancow|work: ok od it to a billion! Aug 10 14:33:41 anyways, reversing it like taht WILL save you cycles Aug 10 14:33:43 also, just gonna put this one out there: http://projecteuler.net/ Aug 10 14:33:51 lov: thats where I got it from Aug 10 14:33:54 lov, are you on projecteuler? Aug 10 14:33:58 and I did that one Aug 10 14:34:01 lov, can i send you my friend key? Aug 10 14:34:03 and then didn't both doing more Aug 10 14:34:11 because I solved the hardest one Aug 10 14:34:12 if you ask me to do something 1000 times, i might do it differently than 1000000000 times Aug 10 14:34:26 canadiancow|work, same, but most of thje time i want it to work just as well for both ;p Aug 10 14:34:27 because development effort is almost always more expensive than computer processing power Aug 10 14:34:30 canadiancow|work: I think you'd be dead before you did it 1000000000 Aug 10 14:34:35 canadiancow|work, perhaps... Aug 10 14:34:45 dont make me go write this Aug 10 14:34:56 all your base are belong to us Aug 10 14:35:07 shut up everyone Aug 10 14:35:09 this interview is over Aug 10 14:35:10 am I stupid or you don't even need a loop to compute that? Aug 10 14:35:11 just get out. Aug 10 14:35:18 did I get the job? Aug 10 14:35:19 lov, are you on PE? Aug 10 14:35:25 kaneda^: I'm on PE Aug 10 14:35:27 sam, you don't, you can use a formula Aug 10 14:35:27 I think some people just need to re-learn pen & paper Aug 10 14:35:28 kaneda^: probably, I haven't used it in years. Aug 10 14:35:38 lov, oh, i'm looking for people who are active in PE Aug 10 14:35:38 I used it as an "Ima learn python" thing Aug 10 14:35:42 lov, i did the same thing Aug 10 14:35:45 but then I stopped learning python ._. Aug 10 14:35:46 but i continued on Aug 10 14:36:03 kaneda^: I last used PE 2 days ago Aug 10 14:36:11 1852196669185_0e94d959d48288237782def666e31eb8 <-- my friend key Aug 10 14:36:11 I first used PE 2 days ago too Aug 10 14:37:37 any opinions on multi-monitor setups? as far as layout/aspect ratio(of screens)/ect Aug 10 14:38:02 on android? ;o Aug 10 14:38:06 I dont think stock android supports that Aug 10 14:38:15 ... Aug 10 14:38:54 for the record, it ran on my computer for numbers up to a billion in 2.622 seconds Aug 10 14:38:56 some of the packages installable in the Android SDK Manager mention something about dual-screen Aug 10 14:39:31 canadiancow|work, well aren't you speshul ;p Aug 10 14:39:36 An_Ony_Moose there is one phone that has dual screens i think Aug 10 14:40:01 canadiancow|work: who gives a shit. Aug 10 14:40:07 lol Aug 10 14:40:11 lov, you seem like you're in a bad mood -_- Aug 10 14:40:12 the record Aug 10 14:40:12 Jug6ernaut: I know nothing beyond that Aug 10 14:40:17 An_Ony_Moose: Check who provided those images Aug 10 14:40:21 Probably not google Aug 10 14:40:50 SimonVT: nope Aug 10 14:41:01 ah well, never mind me, I'm just an idiot who doesn't know what he's doing! Aug 10 14:41:03 kaneda^: it must be a day that ends in "y" Aug 10 14:41:11 ;p Aug 10 14:41:27 www.smearcampaign.us Aug 10 15:04:29 I have an arrayList of fairly large arrayLists (of instances of a custom class) in an activity, that the user can modify. What's the best way to save this master list and its contents so that when the user re-enters the app that the app doesn't restart from scratch? Aug 10 15:05:28 probably a database Aug 10 15:05:38 another option is to serialize to a file Aug 10 15:06:38 Is this black in an android style? #000000 Aug 10 15:06:51 deadmund: Yes Aug 10 15:06:53 deadmund should be Aug 10 15:06:56 leslie: thanks Aug 10 15:06:58 ericrichardson: thanks Aug 10 15:08:43 deadmund anything that works in html will work. so #000 is also black Aug 10 15:09:10 leslie: Ahh, thanks Aug 10 15:14:58 it was #ARGB or #AARRGGBB if i recall Aug 10 15:15:07 or just #RGB #RRGGBB Aug 10 15:35:14 when working with Preferences, does the PreferenceManager.setDefaultValues method actually take the defaultValue tag from XML and give that value to each preference, or when using that preference do we need to fill the "defaultValue" portion of the pref.getString("","defaultValue") manually Aug 10 15:39:38 anyone in here familiar with perferences? Aug 10 15:42:42 epsilonorion: according to the docs it takes the default values from the xml file Aug 10 15:45:39 lov: that is what I thought, however it does not seem to work. I call PreferenceManager.setDefaultvalues(this, , false) Aug 10 15:45:56 ineed a basic pretty html/css design for a small component of a website Aug 10 15:45:58 lov: this should load the defaultValue tag to each preference, which means they should not be null Aug 10 15:46:27 lov: however, when I try to use them (before opening the preference menu) nothing works. As soon as I open the preferenceMenu, they work Aug 10 15:47:40 If, when using the preference, I fill the default value component of the getString methods then it works, but my understanding is that setDefaultValues means that this is not needed Aug 10 15:49:14 how the hell is an EditText holding a reference to my activity if the activity does not contain an edittext :\ Aug 10 15:49:44 canadiancow|work: it must be a virus! Aug 10 15:49:58 canadiancow|work: only joking. It's a possibility of course but I wouldn't know Aug 10 15:50:19 can anyone tell me how to make my app ignore the rotation of the device? Aug 10 15:50:36 You generally don't want to do this. Aug 10 15:50:37 I'm not quite sure why it does not work, but I have following a bug chain on the issue which seems to exist from 2010 all the way to june this year Aug 10 15:50:37 never mind google helped me Aug 10 15:50:45 You can always set your activity to specify that it handles config changes itself Aug 10 15:51:01 actually, maybe I should see if any of you have any idea what causes my problem Aug 10 15:51:45 when I rotate the screen while in the main view of my app, it resets to the view first shown when my app starts. Aug 10 15:53:42 An_Ony_Moose: when rotating are you in a new activity that was started from the initial view/activity Aug 10 15:54:42 epsilonorion: no, same activity Aug 10 15:55:37 An_Ony_Moose: the activity is restarted on orientation change Aug 10 15:56:12 oooh I see... thanks Aug 10 15:56:39 yep Aug 10 15:56:55 http://stackoverflow.com/questions/6605986/android-natural-sensor-orientation-help I can use the second solution of the first answer, no? Aug 10 15:57:05 s/first/only/ Aug 10 15:57:52 Just asking again, anyone familiar with why PreferenceManager.setDefaultValues would not be setting the default values of preferences Aug 10 16:02:38 I am still not seeing why the defaultValues are not being set Aug 10 16:02:46 if i have an object as a key in a WeakHashMap, and i tell MAT to filter out WeakReferences, it will not show up, correct? Aug 10 16:04:22 or better question: invoke-interface {v0, p1, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; Aug 10 16:04:32 is that inserting the same value as the key? Aug 10 16:07:02 canadiancow|work: #smali Aug 10 16:09:32 what's the easiest way to access a layout instance from another activity? i'm trying to use 'findViewById', but i don't think it's accessing that instance (instead it's just creating a new one) Aug 10 16:10:29 You want to get a reference to one Activitys layout from another Activity? Aug 10 16:10:31 Yeah, don't do that Aug 10 16:12:35 what SimonVT said. Aug 10 16:12:43 Please don't do whatever it is you're trying to do. Aug 10 16:12:57 Have your activity listen for updates and handle its own layout appropriately Aug 10 16:19:52 ok, i'm adding a bunch of fragments to a LinearLayout programmatically.. Aug 10 16:20:21 and before starting the transaction i remove all the childViews using removeAllViews() on the LinearLayout Aug 10 16:21:03 so my onCreate basically looks like this: 1] remove all views 2] begin transaction 3] add views 4] commit transaction Aug 10 16:21:42 now if i turn the device from landscape to portrait i would expect to add the exact same fragments as before. Aug 10 16:21:53 but interestingly i get additional views.. Aug 10 16:22:08 hmm, probably a bug in some other part of my program Aug 10 16:23:05 the source is quite short.. maybe someone else sees an issue? Aug 10 16:23:05 http://pastesite.com/41317 Aug 10 16:24:04 You are creating new instances of your fragments Aug 10 16:24:25 On orientation change the fragmentmanager automatically re-adds any fragments that were previously attached to a view Aug 10 16:26:28 Also, why do you even have to removeAllViews.. Just make a layout where they have no child views Aug 10 16:27:17 SimonVT: yeah i ust added the removeAllViews after i saw that the fragments got readded.. Aug 10 16:27:20 ;D Aug 10 16:27:34 Fragments are added after onCreate Aug 10 16:27:54 onPostCreate iirc Aug 10 16:28:45 Give them tags so you can find them again Aug 10 16:28:55 SimonVT: ok, that makes sense.. Aug 10 16:28:57 Then only add if they don't exist, or are not added Aug 10 16:29:01 ty for the infos.. i'm a fragment noob.. Aug 10 16:29:58 Trying to use SharedPreferences.getBoolean("checkbox", true) to see if the box is checked and I am getting the default value everytime regardless of if the box is checked or not. Aug 10 16:30:04 (on the emulator) Aug 10 16:31:23 So, before I go the really long and annoying way of doing this, does noone have any idea as to why PreferenceManager.setdefaultValues would not set defaults for the various preferences I am using??? Aug 10 16:32:26 SimonVT: so if you do not add the fragments yourself, fragmentmanager will think "ok, the coder isnt catering for this" and add them itself? Aug 10 16:35:24 It knows what layout id the fragment was previously added to Aug 10 16:35:34 So when it's restoring state, it'll re-add the layout to that id Aug 10 16:35:43 view id, rather Aug 10 16:37:12 I'd trying to toggle which LinearLayout is shown when the user clicks a button using setVisibility, but the layout is still reserving space for the invisible layout. How can I avoid this? Aug 10 16:37:31 it would seem as if no matter how I use the setDefaultValues method, the preferences are never being set until I enter the Prefereneces menu Aug 10 16:39:24 Jeremyz: set it to GONE Aug 10 16:39:51 To get the state of a checkboxpreference I should use SharedPreferences.getBoolean() Right? Aug 10 16:40:05 That is, to check if it is checked or not Aug 10 16:40:17 yes Aug 10 16:40:56 xorgate: You're talking to me? Aug 10 16:41:01 Make sure your SharedPreference instance is the same your checkboxpreference is saving to Aug 10 16:41:09 aka PreferenceManager.getDefaultSharedPreferences Aug 10 16:41:28 SimonVT: I can't use getSharedPreferences in the activity that is going to check the state? Aug 10 16:42:36 Sure, if you pass the right name Aug 10 16:42:42 ok Aug 10 16:42:43 thanks Aug 10 16:42:46 But just use getdefaultsharedpreferences Aug 10 16:43:17 SimonVT: sorry for butting in, but do you know much about setDevaultValues Aug 10 16:43:28 Not at all Aug 10 16:44:38 SimonVT: dangit. I have no issue using the preferences as of yet, but am having an issue with the default values portion Aug 10 16:45:58 SimonVT: how do you deal with default values for preferences since you don't use setDefaultValues?? Aug 10 16:47:04 I set it in my xml Aug 10 16:48:34 does .getFilesDir return /data/data/package.name/files or /data/data/package.name/ Aug 10 16:48:49 Jug6ernaut: /files Aug 10 16:49:00 Jug6ernaut: you have no guarantee that, say, databases actually live under /data/data/packagename Aug 10 16:49:07 SimonVT: I do too. For instance, I have an EditTextPreference that defines a defaultValue="10". Then using a PreferenceActivity (the Fragment way), I can open activity through a menu option. However, I want the defaultValue to be loaded before I open the PreferenceActivity Aug 10 16:49:20 is there anything that returns /data/data/package.name/ ? Aug 10 16:49:20 Jug6ernaut: shared prefs, for example, moved on a samsung device which famously broke things Aug 10 16:49:27 :| Aug 10 16:49:30 seriously Aug 10 16:49:44 that exactly what i wanted, prefs dir xD Aug 10 16:49:44 SimonVT: From reading, I found that just calling PreferenceManager.setDefaultValues(this,,false) would set those values of the first install of the app, but this is not working Aug 10 16:49:50 hmm Aug 10 16:49:57 Oh, like that Aug 10 16:49:58 SimonVT: even setting it to true does not work Aug 10 16:50:03 I pass it to the getters Aug 10 16:50:38 Jug6ernaut: the implementation of SharedPreferences is an implementation detail; you shouldn't assume that they'll be backed as xml or their location Aug 10 16:51:15 hmm Aug 10 16:51:16 k Aug 10 16:51:25 SimonVT: so when you use prefs.getString("id","defaultValue") you actually place a default value in that call instead of Null Aug 10 16:51:44 yes Aug 10 16:51:46 may need to do a custom data store then :S Aug 10 16:52:08 SimonVT: Dang, I was hoping I would not have to do that. I feel the setDefaultValues is more elegant, but it does not seem to be working so I guess I will have to deal Aug 10 16:53:41 i think..ill make my own sharedperfs using json...should be easy enough Aug 10 16:54:04 * Jug6ernaut adds to-do list, o wait todo is now trademarked fml Aug 10 16:54:08 :| Aug 10 16:54:14 Is Date class parcelable? Aug 10 16:54:20 What are you actually trying to do such that you need the actual file locations for shared prefs? Aug 10 16:55:22 I want to show a toast message triggered at some point in a thread. How can I get a reference to a certain activity inside the thread so i can do activityRef.runOnUiThread(... ? Aug 10 16:55:51 lov just seeing if the sharedprefs exist, ofc i could just use a boolean defaulted to false Aug 10 16:55:58 deadmund: is your thread an inner class of an activity? Could you just use an AsyncTask? Aug 10 16:56:15 napster: couldn't you determine that in like, 5 seconds on d.android.com? Aug 10 16:56:20 lov: my thread is an inner class of a service Aug 10 16:56:39 jasta: let me get a stopwatch Aug 10 16:56:43 deadmund: there's no guarantee that a valid activity will even exist then. Aug 10 16:56:55 SimonVT: thanks Aug 10 16:56:59 deadmund: I THINK you can show toasts from services, though. Aug 10 16:57:01 lov: I see. I can't show toast messages without some activity running? Aug 10 16:57:13 deadmund: regardless, I'd recommend using Notifications for this Aug 10 16:57:19 lov: yeah, my service shows other toasts in other situations Aug 10 16:57:39 lov: ok. I'll look up how to do that. Haven't written a notification yet. Aug 10 16:57:54 deadmund: It's actually super simple. Aug 10 16:58:35 lov: thanks Aug 10 16:59:03 napster: i got 6 seconds Aug 10 16:59:14 :) Aug 10 17:00:07 * Jug6ernaut made a toast that can be used from a service that is interactable :D Aug 10 17:00:10 But rather, is it possible to write a Date object as millis into the parcel and safely get it back from it? Aug 10 17:00:15 jasta: ^^ Aug 10 17:00:16 * Jug6ernaut still needs to opensource that... Aug 10 17:00:37 couldn't think of a better solution from my experience :( Aug 10 17:00:52 napster: absolutely you could do that. Aug 10 17:00:57 napster: of course. Aug 10 17:01:10 lov: jasta Thank you. Aug 10 17:12:03 Before I rename everything, is logo_256.png an invalid resource name? Aug 10 17:12:12 I know _ is fine Aug 10 17:12:39 but having mere numbers after it is possibly causing me troubles Aug 10 17:13:26 Just can't start with numbers iirc Aug 10 17:16:24 themirror: it should be fine. Aug 10 17:19:01 Yeah that isn't the problem thanks Aug 10 17:24:25 Is there any way to see where android is looking for resources in debug? It's likely that its either stopping at drawable-hdpi and not looking in drawable-normal-hdpi or instead defaulting to drawable, where the file isn't located by that name Aug 10 17:25:04 o_O Aug 10 17:25:09 themirror: that is a valid name, i use pin_1.png, pin_2.png etc.. in my resources Aug 10 17:26:26 QubeZ Yeah okay I renamed a couple and it didn't matter Aug 10 17:26:47 not sure what drawable-normal-hdpi is, never seen that naming convention Aug 10 17:27:01 Yeah, I'm not really sure what the -normal is there Aug 10 17:27:32 Is it the wrong order? Aug 10 17:27:34 Doh Aug 10 17:27:39 lemme check brb Aug 10 17:28:05 themirror: I don't think it'll compile if they're in the wrong order, but the normal/large etc is for screen size, with layouts, I don't think it'd affect drawables, since they're sized based on the DPI? Aug 10 17:28:50 No its fine i used it before Aug 10 17:28:56 and I need it Aug 10 17:29:10 themirror: http://developer.android.com/guide/topics/resources/providing-resources.html#AliasResources Aug 10 17:29:21 large hdpi screens use a different bitmap over large ldpi Aug 10 17:34:11 interesting Aug 10 17:35:05 about 4 months ago i published an app which was getting downloads fast. 2 days later another app pretty much the same as mine appears. 1 day later my android account gets banned. that "other" app has now had half million downloads Aug 10 17:35:09 what a BLAG Aug 10 17:35:47 you don't really say why your account was banned. Aug 10 17:36:20 i dont know Aug 10 17:36:23 it just got banned Aug 10 17:36:43 why didn't you enquire further? Aug 10 17:36:59 hi Aug 10 17:37:03 i -thought- that the app was a little grey in terms of its functionality Aug 10 17:37:19 but i it was a a breach then the other app should have been taken down too Aug 10 17:37:23 im seriously pissed off Aug 10 17:37:32 what did the app to that was 'grey'? Aug 10 17:37:37 can someone explain to me why the NETWORK_PROVIDER never calls onLocationChanged in this very simple example? http://pastebin.com/TRj9bUk8 it works fine if I use the GPS_PROVIDER (and the network location settings are on) Aug 10 17:37:42 downloaded vimeo videos Aug 10 17:38:21 it's driving me crazy Aug 10 17:38:51 I recommend Android to EVERYONE and have ben loyal to Android for 2 years Aug 10 17:40:34 wtf is ben Aug 10 17:41:02 i wanna know which little shit at google pulled my app and closed down my account. I have collected tonnes of info on the developer of the app which was the same as mine. if i can prove a link between the 2 there will be a brick and a face involved Aug 10 17:45:26 http://pastebin.com/TRj9bUk8 again. Network location never shows up, but GPS does. Help? Aug 10 17:46:46 alemos have you added internet permission? Aug 10 17:47:29 I could be wrong, but I'm pretty sure you don't need internet permission for location tracking Aug 10 17:47:48 brx_: yes Aug 10 17:47:52 thoguht you did with network Aug 10 17:48:10 I've tried with, and without. Same result Aug 10 17:49:57 brx_: according to http://developer.android.com/guide/topics/location/strategies.html you should just need the location permission Aug 10 17:50:39 ryanm: but that's not it. I have COARSE, MOCK and FINE. Just for the sake of it Aug 10 17:50:47 brx_ sounds like you got ripped off. Someone pirated your app and told Google you stole their app Aug 10 17:50:53 alemos: yeah I don't think that's your problem Aug 10 17:51:03 my question is why u didn't take care of this day of Aug 10 17:51:12 the mirror i appealed it Aug 10 17:51:16 i never got a reply Aug 10 17:51:23 i simply got Aug 10 17:51:24 ryanm: any more hints? it looks so simple Aug 10 17:51:27 REASON FOR TERMINATION: Multiple violations of the Content Policy and Developer Distribution Agreement as outlined in previous emails sent to the registered email address of your Publisher account Aug 10 17:51:43 i then appealed, got no reply, and just noticed the app which coped mine Aug 10 17:52:06 has half million donwloads, this is less than 4 months ago Aug 10 17:52:07 if google can't look timestamps to work out who made the app before, they're pretty incompetent. Aug 10 17:52:48 its not exactly the same, mine was simpleer yet more error handled Aug 10 17:52:51 it never crashed Aug 10 17:53:12 alemos: you're getting GPS updates but not network updates? Isn't that a good thing? Aug 10 17:53:23 ryanm: it is if you're outdoors. Aug 10 17:53:28 ahhh Aug 10 17:53:52 unfortunately, I've never dealt with location-aware apps, so I don't have any experience to help you with Aug 10 17:54:07 there is a nice boiler plate for gps/network location Aug 10 17:54:13 on stackoverflow, its an answer to a question Aug 10 17:54:48 it's difficult for the code to get simpler than this Aug 10 17:55:04 i've already googled/stackoverflowed my ass off Aug 10 17:57:02 alemos: http://stackoverflow.com/questions/4772686/location-managers-requestlocationupdates-called-only-once Aug 10 17:57:13 answer with 6+ Aug 10 17:58:22 will try that Aug 10 17:58:23 1 sec Aug 10 17:59:33 $UNG Since mid-July, gas -12%, CAPP coal +6%. Expect coal to gas switching here. Floor for gas or lookout below coal. Aug 10 17:59:41 ack! wrong channel Aug 10 17:59:44 sorry Aug 10 18:00:20 * ryanm was a little confused for a moment Aug 10 18:02:21 believe it or not… still doesn't work Aug 10 18:02:22 damn it Aug 10 18:03:26 ahh well, fuck android, fuck google I'm buying a mac Aug 10 18:03:46 emo quit Aug 10 18:03:59 priceless Aug 10 18:04:45 unless you count chromebooks (which arent made by google), google doesnt make computers so why would they care if he buys a mac? Aug 10 18:04:52 most googlers use macs anyhow Aug 10 18:14:04 fuck macs Aug 10 18:18:26 I like Macs. Aug 10 18:18:29 Kind of. Aug 10 18:24:14 birbeck i was under the impression they used linux Aug 10 18:24:18 i mean i guess that could be on a mac Aug 10 18:25:06 afaik they are allowed to choose linux or mac, and most choose macs Aug 10 18:25:38 my mac runs pure linux though, i removed the os x partition, though i might run os x in a vm Aug 10 18:25:57 macs = sensible basic system, closed-source software, correctly rendered fonts, color-corrected display, largely same look and feel as 10 years ago Aug 10 18:26:02 yea they can choose Aug 10 18:26:07 i was under the impression most chose linux though Aug 10 18:26:08 :P Aug 10 18:26:32 linux = random collection of system software, no possibility of closed source software for most part, fonts ignoring gamma rendering, no color correction, random look-and-feel du jour Aug 10 18:26:42 my work was 100% linux for a long time, but now all the idiots want their macs Aug 10 18:26:58 oh good. Aug 10 18:27:16 hey guys, lets not start a holy war plz. Aug 10 18:27:25 my company is pretty much all mac for the tech side Aug 10 18:27:31 but im sittin here on win7 :) Aug 10 18:27:33 just trying to explain why people might choose mac. Because I sure as hell would. Aug 10 18:27:38 id take linux if it were offered Aug 10 18:28:02 lov: vim is the best editor of all time, emacs and eclipse are terrible, and Windows is the best OS of all time. did I miss anything? Aug 10 18:28:18 ryanm: I'll see you in hell. Aug 10 18:29:33 lov: not trying to start a war. i have just observed how stupidly giddy the people around here get when they get a macbook to replace their dells Aug 10 18:29:41 and I would switch to linux as soon as ... well, if my laundry list of issues got fixed. I place some value on the notion of free software. I don't enjoy paying extra for apple hardware or OS X updates. *sigh* but it's just not good enough. Aug 10 18:30:20 lov: to me, imho, the macbook pro is one of the worst computers ever made, i would love a newer dell in its place Aug 10 18:30:36 mbp isnt bad hardware Aug 10 18:30:37 I did author a patch to pixman that allows alphablending fonts correctly on sRGB surfaces, so it isn't like I'm just complaining on the sidelines Aug 10 18:30:39 if you get the screen upgrade Aug 10 18:30:41 and replace teh hard drive Aug 10 18:30:43 :) Aug 10 18:30:50 and an apple update doesnt brick it :) Aug 10 18:31:12 As someone who doesn't use or like macs, I strongly disagree, but largely because a lot of manufacturers make some truly awful computers. Aug 10 18:31:22 but they say that getting developers to do what you want is like herding cats. It is very difficult to make the case for something like sRGB, and most of the debate ends up in neverterminating discussions about what the perfect solution is. Aug 10 18:32:44 I swear I will turn this channel right around and we'll all go home Aug 10 18:32:52 vacation will be ruined Aug 10 18:33:14 mama bear's a little uptight today Aug 10 18:33:49 I'd say. Aug 10 18:34:35 So, I have a for loop that does something snd prints it on the screen Aug 10 18:34:44 well time to go to the bay for cheesesteak and throw fries at the google sf office Aug 10 18:34:51 diki: such a thing is not possible to have. ;-) Aug 10 18:35:11 diki: you could have a for loop that runs and schedules work for ui thread that results in stuff appearing on screen. Aug 10 18:35:13 Problem is that the ui is updated only when the loop finishes Aug 10 18:35:42 I thought that the ui thread is blocked so I ran this loop in another thread Aug 10 18:35:45 see AsyncTask, consider using the publishProgress etc. stuff Aug 10 18:36:40 But even there only when the loop finishes does the text get displayed Aug 10 18:36:58 diki: you probably messed up something there. Aug 10 18:37:13 technically if you work in another thread, and publish Runnables or something that update the display, that should work Aug 10 18:37:27 but AsyncTask is pretty much this design only made easy/sensible. Aug 10 18:37:32 Textviewvar.post etc Aug 10 18:38:07 diki: also some people fail at making thread. For instance, they do new MyThread().run() instead of new MyThread().start() Aug 10 18:38:20 I use. Start Aug 10 18:38:25 heh, alright. Aug 10 18:39:29 diki: how are you updating the ui / when are you updating the ui? Can you pastebin some code? Aug 10 18:39:49 lov: sure i can Aug 10 18:39:56 Just a min. Aug 10 18:43:31 pastebin.ca/2179030 Aug 10 18:43:55 Sorry for bad indent Aug 10 18:44:04 diki: eh Aug 10 18:44:10 you are doing the for loop inside the runnable Aug 10 18:44:14 that's not how it is supposed to be done Aug 10 18:44:29 Then how? Aug 10 18:44:50 you are supposed to do like for (int i = 0; i ..) { somework(); view.post(new Runnable() ...); } Aug 10 18:45:09 Ok, will try. Aug 10 18:45:14 and this all as the thread. Again recommend AsyncTask, but it should work Aug 10 18:45:24 because right now your entire for loop runs in the UI thread again Aug 10 18:45:37 you made a thread whose only effect was that it posted Runnable for the UI thread that does all the work Aug 10 18:46:56 diki: Consider using a Messenger to handle updating your editText and and displayText Aug 10 18:47:42 What I am doing now is just an experiment Aug 10 18:54:40 <_99percent_> i have an app that needs to parse data from a website Aug 10 18:54:52 yeah Aug 10 18:54:57 99 percents but a bitch aint one Aug 10 18:55:20 <_99percent_> i was previously doing this with regular expressions, but i recall someone telling me that there was a better way to do it, and i'm now completely rebuilding the app and releasing a new version of it Aug 10 18:55:29 <_99percent_> so what is the better alternative that i should be using? Aug 10 18:55:40 what format is the data in Aug 10 18:55:43 <_99percent_> html Aug 10 18:55:45 I have no idea what kind of data you're parsing Aug 10 18:55:49 uh Aug 10 18:55:54 you could TRY an xml pull parser Aug 10 18:55:57 <_99percent_> i'm literally parsing data from a website Aug 10 18:55:57 get it in another format Aug 10 18:56:00 there's no guarante that this would be a reasonable solution though Aug 10 18:56:09 <_99percent_> and pulling a few urls, might end up pulling things like comments, description, etc Aug 10 18:56:20 do whatever you get working Aug 10 18:56:23 <_99percent_> getting it in another format isn't really an option that i'm aware of Aug 10 18:56:23 because it's going to break Aug 10 18:56:36 <_99percent_> i don't own the sites i'm parsing data from Aug 10 18:56:44 try beautifulsoup Aug 10 18:56:50 do you have a license to parse it? Aug 10 18:57:00 <_99percent_> shouldn't need a license to parse it Aug 10 18:57:17 ok do you have a license to reuse the data you are parsing Aug 10 18:57:28 it's a valid point. Aug 10 18:57:43 if this is a "for fun" project it's probably not a big deal Aug 10 18:57:53 but if you're putting out a "Youtube comments lol!" app and expect to make money on it... Aug 10 18:58:00 <_99percent_> well credit is given where it's due, ie: the user is aware the website they are getting the data from, and that the app is just acting as a gateway for android Aug 10 18:58:15 it's not about credit unless that's in the license Aug 10 18:58:25 <_99percent_> the app has been up for a year, and sold over 1000 copies, and it targets 3 different sites so far, and i've yet to receive any letters from them so i don't think i'm in a legal grey area Aug 10 18:58:33 mikedg: why would you need a license for that? Aug 10 18:58:50 hrnt: it's not his content to redistribute Aug 10 18:58:57 hrnt: there's tons of stuff out there that says "you can use this however, but give me credit" Aug 10 18:58:58 <_99percent_> i'm not redistributing the content though Aug 10 18:59:02 <_99percent_> it's a video browsing app Aug 10 18:59:05 there's tons of stuff that says "you may not use it" Aug 10 18:59:08 * lov shrugs Aug 10 18:59:08 what app Aug 10 18:59:16 <_99percent_> all it does is give the user a more intuitive interface to access the videos with Aug 10 18:59:19 You've gotta convince the lawyers, not me. Aug 10 18:59:30 so it wastes bandwidth and likely skips some ads Aug 10 18:59:41 i can see how the hosts are gonna love that Aug 10 18:59:44 <_99percent_> they're able to view the website via their android phone prior, so i see no reason i wouldn't be allowed to add that same functionality in the app Aug 10 18:59:44 lov: i assume that if you are downloading a web page on an android phone you are not redistributing it Aug 10 18:59:51 lov: unless your android acts as a web server Aug 10 19:00:17 i feel bad for you son Aug 10 19:00:21 <_99percent_> actually it doesn't waste bandwidth, yes it does skip ads but like i said, they haven't sent me any letters nor have they sent them to the app store Aug 10 19:00:22 lov: consider something like instapaper, do they need a license? Aug 10 19:00:45 * lov shrugs Aug 10 19:00:50 again, that's a question for lawyers. Aug 10 19:00:56 he could totally be fine Aug 10 19:01:03 <_99percent_> assume i'm fine for now Aug 10 19:01:14 <_99percent_> if they haven't said anything in the past year i doubt they're going to Aug 10 19:01:18 is it possibly/hard to port 2.6.32 kernel drivers (touch,camera) to 3.x ? Aug 10 19:01:31 or better to backport kgsl, memalloc, genlock Aug 10 19:01:36 asturel: anythings possible in #android-dev Aug 10 19:01:41 * mikedg kicks asturel in the gut Aug 10 19:01:53 JakeWharton Aug 10 19:01:58 yeah but which choise is better? Aug 10 19:02:00 i mean easier :D Aug 10 19:02:01 mikedg Aug 10 19:02:59 i need a technology that lets me make pretty web stuff with no effort Aug 10 19:03:04 can you make that Aug 10 19:03:20 <_99percent_> actually i could Aug 10 19:03:22 <_99percent_> well Aug 10 19:03:24 <_99percent_> not no effort Aug 10 19:03:28 <_99percent_> nothing comes with no effort Aug 10 19:03:37 <_99percent_> but i can make a technology that eases the process Aug 10 19:03:38 _99percent_: you can't even make a screen raper Aug 10 19:03:55 <_99percent_> what is a screen raper? Aug 10 19:04:34 Did you mean: screen scraper Aug 10 19:04:45 <_99percent_> i've already made a screen scraper Aug 10 19:04:49 <_99percent_> so shut your cock scraper Aug 10 19:05:06 <_99percent_> i'm just looking for a better way to do it Aug 10 19:05:52 try the NDK Aug 10 19:06:30 <_99percent_> do you have anything constructive to add? Aug 10 19:06:40 generally he doesn't Aug 10 19:06:45 <_99percent_> or are you just going to troll like a mindless drone? Aug 10 19:06:54 anyway Aug 10 19:07:23 Hi what are other options for decoding resource to bitmap instead of BitmapFactory.decodeResource? Apparently that method is too poorly coded to recognize xml alias bitmap, thus causing the problem Aug 10 19:07:27 xml pull parser, or beautifulsoup, or something Aug 10 19:07:46 I need bitmap for canvas Aug 10 19:08:00 scrapy.org Aug 10 19:08:17 themirror: getDrawable, cast to BitmapDrawable, getBitmap(); Aug 10 19:08:36 er, getResources().getDrawable(...) Aug 10 19:08:44 Thx! Aug 10 19:09:08 hi Aug 10 19:09:18 <_99percent_> i prob could have looked at the source for my app and found the answer to that actually :/ Aug 10 19:09:25 <_99percent_> think i had to do something similar for thumbnails Aug 10 19:09:59 Do someone know if it's possible to control the scrolling of the ListView manually? thanks Aug 10 19:11:04 firstdeveloper: it is possible. Search for the word "scroll" in the listview documentation. Aug 10 19:11:25 ok thanks Aug 10 19:11:26 <_99percent_> intellij idea... Aug 10 19:11:28 <_99percent_> you look nice but... Aug 10 19:11:31 <_99percent_> eclipse is just better Aug 10 19:11:39 firstdeveloper, Since API level 8, you have "public void smoothScrollToPosition (int position)" Aug 10 19:11:49 mikedg: http://www.geocities.com Aug 10 19:11:57 <_99percent_> LOL Aug 10 19:12:02 mikedg: http://www.myspace.com Aug 10 19:12:32 firstdeveloper: you also have http://developer.android.com/reference/android/widget/AbsListView.html#pointToRowId(int, int) since API 1 Aug 10 19:12:34 <_99percent_> there was an ad i saw the other day around 4:05 pm that said i could make my first website by 3:45 that afternoon Aug 10 19:12:42 <_99percent_> i should have saved it and gave it to mikedg Aug 10 19:12:49 can't wait till facebook and twitter become the geocities of tomorrow Aug 10 19:12:56 Does anyone know if there is an easy way to disable snapping for a ViewPager? Aug 10 19:16:31 HI Aug 10 19:17:13 i need help i use 'linkinus' but i can't see all msg Aug 10 19:17:16 just one :( Aug 10 19:18:15 firstdeveloper: this is the wrong channel for help with linkinus. This is your only warning. Aug 10 19:18:39 lov: ok Aug 10 19:19:23 JakeWharton: i need to host it elsewhere Aug 10 19:19:30 mikedg: http://rrrrrrrroll.tumblr.com/ Aug 10 19:19:33 brb lunch Aug 10 19:23:21 Hey, I'm getting an error when I try to run a project that says the jar for a 3rd party library cannot contain NDK libraries Aug 10 19:23:45 the jar contains a few lib/*.so files, is there a way I can get this to play nicely in a recent eclipse/ADT set up? Aug 10 19:24:15 I tried ripping out the .so files and putting them in the project/libs/armeabi folder, but no dice so far Aug 10 19:33:37 I have seen 'smoothScrollToPosition(int position)' that scroll a list view to a specific position. But I need to smooth Scroll the listview by offsetvalue. Indeed I have a listview and i display on the screen an item and a small part off the second item. I then need to scroll by X pixel to keep this consistency.any help? Aug 10 19:34:29 i need a little help, second pair of eyes.. i made a little app that does signature capture on a tablet, converts it to a jpg compressed byte array and streams it to a remote server.. it works most of the time but once in a while i get one of these bad boys: http://tinypic.com/view.php?pic=3321a82&s=6 Aug 10 19:34:52 i pasted the code i used to retrieve the image, and also how i streamed it to the server here: http://pastebin.com/1ieX2fvT Aug 10 19:35:01 feel like i'm missing something stupid, like it's cutting cut off too soon somewhere Aug 10 19:35:05 ddavis: is that picture supposed to be incomplete? Aug 10 19:35:48 absolutely not.. it should be all white except where the signature is drawn Aug 10 19:35:51 oh Aug 10 19:36:00 and yes, in the example, the incompleteness is the problem i'm having Aug 10 19:36:06 ddavis: ok Aug 10 19:36:11 how are you actually capturing the signature? Aug 10 19:36:52 oh herp derp Aug 10 19:36:53 doesn't matter Aug 10 19:36:55 you're not flushing :P Aug 10 19:37:02 using touch events i create a path and use drawPath on the canvas Aug 10 19:37:03 herpaderpa Aug 10 19:37:09 where am i not flushing? Aug 10 19:37:14 before you call socket.close(), call output.flush(); Aug 10 19:37:33 i did Aug 10 19:37:36 see os.flush in the middle Aug 10 19:37:42 line 25 in the paste Aug 10 19:38:25 i'm not sure if the network code is the problem, tbh.. i have similar code on the server end in c#.. the first 4 bytes are the size of the following data Aug 10 19:38:44 it would block if the output data was incomplete and the phone wouldn't get a response Aug 10 19:38:45 oh derp Aug 10 19:39:00 How can I scroll a listview smoothly by a given offset? Aug 10 19:39:04 you're right, that's for the response. Aug 10 19:39:28 OK. How frequently does this happen? Aug 10 19:39:47 if this happens often enough that you can easily reproduce it, I'd recommend that you also save the signature to disk and check to see whether what you wrote to disk is also bogus Aug 10 19:39:53 figure out if this is a network issue, or a drawing issue. Aug 10 19:40:19 i do save all the images to disk actually, before they go in the database.. they're not coming across right Aug 10 19:40:24 are you suggesting saving it on the device before i ship it over? Aug 10 19:40:46 not a bad idea.. the network interface does many other things other than the signature and this is the only thing i'm having a problem with Aug 10 19:40:48 it's yeah Aug 10 19:40:51 makes me the think the compress method has an issue Aug 10 19:40:55 save it before you send it Aug 10 19:40:59 to see if it's an issue with drawing, or networking. Aug 10 19:41:02 both look "ok" Aug 10 19:41:07 I'm curious how you're actually storing the signature Aug 10 19:41:17 on the server end? Aug 10 19:41:20 rather than passing in a viewgroup, you could probably better pass in your custom view Aug 10 19:41:23 on the client I mean Aug 10 19:41:32 when the user draws their signature, what class are you using to locally store that signature Aug 10 19:41:38 I assume you're making your own custom view Aug 10 19:41:43 i'll paste you the whole class Aug 10 19:41:46 sure Aug 10 19:42:22 http://pastebin.com/diGZhJiB Aug 10 19:42:27 help plz :) Aug 10 19:43:22 i'd help you firstdeveloper but i'm a newb myself :) sorry Aug 10 19:43:30 firstdeveloper: http://developer.android.com/reference/android/widget/AbsListView.html#pointToPosition(int, int) Aug 10 19:43:33 christ Aug 10 19:43:36 read some docs Aug 10 19:43:37 don't just sit there Aug 10 19:44:35 firstdeveloper: I don't understand why you're passing in a viewgroup to draw into at all. Aug 10 19:44:50 firstdeveloper: why don't you just call your own getWidth/getHeight and draw into an arbitrary bitmap that way? Aug 10 19:44:56 you mean me? Aug 10 19:45:13 er sorry Aug 10 19:45:14 yes Aug 10 19:46:06 good question let me check the reference Aug 10 19:46:12 Seriously? I didn't even touch my music files and now they can't be created Aug 10 19:46:27 is there a generic camera library out there that encapsulates all the little hacks for the different (old) API versions ? Aug 10 19:48:34 yeah you're right i probably don't need to do that Aug 10 19:48:47 might be some leftover artifact from something i was trying before Aug 10 19:48:54 ddavis: personally, I'd be sending the path back to the server instead of a graphic of the signature. Aug 10 19:49:42 i'm not following what you mean Aug 10 19:50:13 essentially, this is linking in to a backend system on the server... which runs off sql.. this is getting pumped into a record with an image column, straight in Aug 10 19:51:04 microsoft sql that is Aug 10 19:51:16 ddavis: Yeah, it's not a big deal. Aug 10 19:51:33 I assume that there's some sort of legal weight to using signatures instead of paths anyway Aug 10 19:51:37 er Aug 10 19:51:38 using pictures Aug 10 19:51:46 it's irrelevant to your problem anyway Aug 10 19:52:31 yeah this is for pharmaceutical delivery hah Aug 10 19:52:57 ddavis: have you considered using a third party application for signatures? Aug 10 19:53:04 i'll beta test, send me some pharmeceuticals ;) Aug 10 19:53:39 (or is that the main functionality of your app?) Aug 10 19:53:59 hrnt: i have but it would need to tie into the other communications between server and device, plus this is something that i thought should be so trivial that it wasn't worth budgeting Aug 10 19:54:13 it's... a very important part but not the entire app Aug 10 19:54:14 well, the signature part is easy, the legal aspect is not :) Aug 10 19:54:49 well, whatever the lawyers tell you you need to do. Aug 10 19:54:54 what legal aspect are you talking about anyway? Aug 10 19:55:07 the idea of "digital signatures" Aug 10 19:55:14 and the fact that we still have fucking fax machines Aug 10 19:55:18 if based in US, see http://en.wikipedia.org/wiki/Electronic_Signatures_in_Global_and_National_Commerce_Act Aug 10 19:55:23 (ESIGN) Aug 10 19:55:50 i think in some legislations you need to record the pressure information as well Aug 10 19:55:55 oh... yeah that's not my problem anyway... just doing what the company told me Aug 10 19:56:00 good to know though! Aug 10 19:56:09 so its not just legal issues, its technical too Aug 10 19:58:22 yeah i'm gonna try to dump the images to the device before sending it... the networking stuff i'm doing has been in my "toolbox" for years and many projects and i've never run into such a problem with it.. even does store and forward if it doesn't get a proper acknowledgement from the server.. so.. who knows Aug 10 19:58:29 just wanted to see if there was any glaring problems Aug 10 19:58:56 your networking looks fine (now that I read it correctly) so I suspect it's just the drawing. Aug 10 19:59:26 oy.. i would've used PNG(if that matters) but their software doesn't support that Aug 10 20:00:52 is it normal that when one uses a custom adaptor & view for a listview the bg color doesn't change anymore on focus? Aug 10 20:01:00 ddavis: what device/android version are you trying this on, and do you have something different? Aug 10 20:01:59 dzan: how did you set the background color? Aug 10 20:02:18 hrnt, I didn't.. that's why it's strange Aug 10 20:02:30 dzan: did you try android:cacheColorHint="#00000000" on your ListView?> Aug 10 20:02:51 it's a zte optik tablet.. 3.2.1 Aug 10 20:02:57 and unfortunately no i don't have anything else Aug 10 20:03:00 wongk-home, on the listview right? Aug 10 20:03:08 dzan: hold on, you didn't set a bg color? Aug 10 20:03:27 no just a linearlayout Aug 10 20:03:29 http://pastebin.com/pJu6Ys3g this one Aug 10 20:03:31 for the list items Aug 10 20:03:39 and then i inflate it in the getView of the adapter Aug 10 20:03:42 like i always do Aug 10 20:03:43 i thought the cacheColorHint only affects scrolling Aug 10 20:03:46 then what do you mean by it doesn't change any more on focus? Aug 10 20:03:58 like when you press an item in the list? Aug 10 20:04:06 when i tap some item in the list it should momentarely change the bg color no? Aug 10 20:04:09 yes Aug 10 20:04:17 oh, then n/m what i said Aug 10 20:04:39 but how could I have 'broken' that? Aug 10 20:04:56 Stupid question time; Is there a simple way that I'm missing (other than guessing at color values, etc), to make a popupwindow that blends into the system ones? Aug 10 20:04:58 dunno Aug 10 20:05:14 dzan: how did you declare your listview? Aug 10 20:06:14 hrnt, (7 lines) http://pastebin.com/f3JWyK28 Aug 10 20:07:43 hrnt, any idea? Aug 10 20:07:52 i'm not really an expert at java.. think it's possible that this images memory is getting "cleaned up" while i'm making the byte array? Aug 10 20:08:46 ddavis: the ListView looks legit Aug 10 20:08:57 dzan: ^ Aug 10 20:09:36 but I shouldn't do anything special to have it change bg color on focus right? Aug 10 20:09:52 ddavis: no Aug 10 20:10:20 dzan: when did it stop working? Aug 10 20:11:42 ddavis: no, i don't think that's happening. Aug 10 20:11:52 wongk-home, when I changed the simple_list_item for a custom one Aug 10 20:12:18 ddavis: personally, I'd take your drawing code and make it testable. Aug 10 20:12:31 verify via unit testing that certain paths will generate certain bitmap outputs Aug 10 20:13:25 dzan: well, you have to do special stuff to change the background color when focused but i don't think your code overrides the default behaviour Aug 10 20:13:34 dzan: what list is this? i assume it's not MessageList? Aug 10 20:14:00 wongk-home, it's not but I broke that one to in the same way before so if I know what went wrong here I can fix that one too :D Aug 10 20:14:17 but MessageList alsways used a custom view Aug 10 20:14:20 yeah i'm trying a few things now such as logging the "expected" size of the file before it streams over, see if that has anything to do with it Aug 10 20:15:19 wongk-home, i know Aug 10 20:15:24 thank you for looking at what i did have, much appreciated Aug 10 20:15:30 could it be because I added an ImageButton ? Aug 10 20:15:42 one way to find out Aug 10 20:15:44 that's the only common thing I did for them Aug 10 20:15:47 I know Aug 10 20:15:52 but eclipse is giving me a hard time again Aug 10 20:15:53 ddavis: you're welcome Aug 10 20:16:02 R not found -> 200 errors Aug 10 20:16:22 clean and rebuild Aug 10 20:16:24 did so Aug 10 20:16:44 probably some caching stuff or something Aug 10 20:16:44 oh noes, i don't have any audible credits... lov can you take care of that for me? ;) Aug 10 20:17:04 If R doesn't build then either eclipse needs a reboot, or you fucked up in your resources somewhere Aug 10 20:17:48 wongk-home: insert money plz Aug 10 20:17:53 haha Aug 10 20:18:28 SimonVT, i know I fucked up a resource but I changed it back but the error markers are still there that's why I said a caching thing, i'll fix it :) Aug 10 20:18:37 stupid eclipse Aug 10 20:19:20 sometimes you just need clean & build... sometimes you just need to try it 3 times or so :P Aug 10 20:19:32 argh fuck I hate eclipse Aug 10 20:19:36 the xml is correct Aug 10 20:19:39 still red marks Aug 10 20:19:49 rebooted it 4 times Aug 10 20:20:43 does anybody actually like eclipse? Aug 10 20:21:00 guess it's just the best thing out there so not really a choice Aug 10 20:21:10 crazy how much memory it uses Aug 10 20:21:13 never used it never will Aug 10 20:22:02 sam, what do you use? Aug 10 20:22:48 dzan: mostly vim Aug 10 20:23:07 sam, .. vim is great for small project but really.. you go hunting with bow and arrow too, Aug 10 20:23:08 ? Aug 10 20:23:10 :p Aug 10 20:24:05 dzan: I use vim on a million-lines of code AAA game project Aug 10 20:24:26 hmm, manning has a MEAP book "Android UI in Action". I haven't seen a good book on android UI specifically, yet. Aug 10 20:24:27 so really I'm not afraid of an Android project Aug 10 20:24:30 * g00s has high hopes Aug 10 20:24:42 what, i go away for a couple weeks and come back to people STILL having religious wars? sheesh. Aug 10 20:25:05 that said, I don't do much Java -- maybe it would be a different thing then Aug 10 20:25:05 sam, can it take you to a function declaration and stuff? like with a lot of plugins? Aug 10 20:25:13 if we didn't talk about IDEs at least once a day, this wouldn't be a dev channel on irc ;) Aug 10 20:25:19 dzan: remember that vim >>> vi Aug 10 20:25:23 dzan: lol, of course Aug 10 20:25:37 ctate, I know I really use vim a lot but for real big projects I can't seem to get it down Aug 10 20:25:42 wongk-home: it's depressing how true that is Aug 10 20:25:43 tried installing all those plugins but.. Aug 10 20:25:59 wongk, removing the checkbox made it highlight again .. Aug 10 20:26:22 ctate: wb Aug 10 20:26:28 thank'ee sir Aug 10 20:26:29 dzan: there's something called clang_complete that actually compiles the C/C++ code in order to gather all references; something most IDEs don't do, which is why they (including Eclipse) suck at autocompleting template-heavy code Aug 10 20:26:50 i hope you did something fun|exciting|relaxing Aug 10 20:26:57 sam I tried that ( clang_complete ) Aug 10 20:27:02 two weeks in Ireland Aug 10 20:27:03 Does anyone know what the drawable for 'Application has stopped responding" is? Aug 10 20:27:11 just setting it up and then remembering all the short cuts.. pain Aug 10 20:27:20 i'm a spoiled visual studio user so that's my point of reference Aug 10 20:27:22 enneract: ? it's a dialog displayed by the system Aug 10 20:27:22 nice Aug 10 20:27:35 the text there is just a string resource, of course Aug 10 20:28:06 i don't think spoiled and visual studio are allowed to exist in the same sentence ;) Aug 10 20:28:09 ctate: the background should be defined somewhere, no? Aug 10 20:28:10 * wongk-home trolling Aug 10 20:28:16 trolling HARD. Aug 10 20:28:22 :P Aug 10 20:28:42 enneract: oh i assume so. i dunno offhand where it's defined. Aug 10 20:29:12 yea, me neither :( Digging through source for it, hoped someone might be able to shortcut me Aug 10 20:29:14 as far as an ide goes i've never used anything better, imo.. i wish it could do more Aug 10 20:29:39 MSVS is still pretty much the gold standard for IDEs, despite its flaws Aug 10 20:29:48 do you come from a land of .NET? Aug 10 20:30:21 Anyone use SL4A? How do you go about passing command line parameters into your python, perl, etc scripts? Aug 10 20:30:29 enneract: i believe it's an AppErrorDialog, if you're looking at the sources Aug 10 20:30:29 you go from something like that to using XCode and Interface Builder and you get nauseous Aug 10 20:30:52 wongk-home: oh yeah, but i do a lot more... embedded(pic programming), all sorts of stuff Aug 10 20:31:17 ever tried it with a large C++ (> 1 million loc) project? Aug 10 20:31:31 ctate: thanks Aug 10 20:31:41 wongk-home: .net? Aug 10 20:31:46 wongk-home: i mean vs? Aug 10 20:31:47 VS Aug 10 20:31:55 nah Aug 10 20:31:59 very large c# projects though Aug 10 20:32:11 yeah, that's a different story Aug 10 20:32:22 haha, so samsung 1/10 of the galaxy tablets that IDC forecasted, WAT Aug 10 20:32:27 *sold Aug 10 20:32:35 the last thing i did with windows in c++ was an ant colony optimizer... but it wasn't that big of a program Aug 10 20:33:15 i have a different favorite IDE for every language i use :P Aug 10 20:33:31 wongk-home: at intel, we used straight up vi on 4 million line code project :P Aug 10 20:33:45 one would think they would have better tools :) Aug 10 20:33:48 i'd say the same, but for platforms, not language heh Aug 10 20:33:53 heh Aug 10 20:33:55 i never took the time to learn to vim properly... i'm kind of ashamed of it Aug 10 20:34:01 * ctate still misses BeOS + Eddie Aug 10 20:34:12 hah... BeOS Aug 10 20:34:17 what does Iron Maiden have to do with BeOS ? Aug 10 20:34:19 * ctate worked at Be, you see.... Aug 10 20:34:21 XD Aug 10 20:34:23 to my signature problem... i added a line to the server to report the expected size of the data coming from the device Aug 10 20:34:30 the size and the resulting file size are matching Aug 10 20:34:46 so that suggests that the byte array on the device itself was broken (i.e. compress didn't work) Aug 10 20:34:46 i think i ran BeOS for about 1 day Aug 10 20:35:15 you should go work for BOKU then ;) Aug 10 20:36:28 ddavis: too bad you can't test this in an emulator :P Aug 10 20:36:32 or maybe you can Aug 10 20:36:41 wongk-home, hrnt any idea: http://pastebin.com/pJu6Ys3g removing both the last checkbox and imagebutton make it highlight again..? Aug 10 20:36:45 wongk-home: i originally developed it in an emulator and didn't have this problem until i went on the device :( Aug 10 20:36:47 removing one of them doesn't fix it Aug 10 20:36:51 does the emulator let you draw with the mouse, like a touch event? Aug 10 20:36:55 yes Aug 10 20:36:56 it works fine Aug 10 20:37:10 what version of android was the emulator? Aug 10 20:37:55 3.2 Aug 10 20:38:25 so that leaves the device as the problem variable, which seems unusual since it draws correctly on the view Aug 10 20:38:38 dzan: i assume one of them is stealing the press event Aug 10 20:38:46 i can't help but think there is some kind of race condition Aug 10 20:38:48 dzan: can you explicitly make them not focusable? Aug 10 20:39:09 ddavis: the more I look at it the more I suspect there is. Aug 10 20:39:10 but - nothing is going out of scope from the time the byte array is created so i can't imagine what Aug 10 20:39:13 It sounds an awful lot like tearing. Aug 10 20:39:25 ddavis: I'd really dump the whole viewgroup thing and just draw directly to another bitmap Aug 10 20:39:49 wongk-home, trying that focusable="false" Aug 10 20:40:16 added it to all, didn't help Aug 10 20:40:23 k Aug 10 20:40:24 i'll google a bit thx for the help! Aug 10 20:40:47 i'm off to wild and wonderful west virginia... oh boy Aug 10 20:40:47 you mean store the paths and draw it separate from the actual view? Aug 10 20:41:53 wongk-home, before you leave :D http://stackoverflow.com/questions/1121192/android-custom-listview-unable-to-click-on-items says I should do fosucable="false" but didn't work, any other ideas? Aug 10 20:42:50 hi, I should create a layout where I can make the switch between a listview and mapview, what can i use ? Aug 10 20:45:07 nvm fixed ( for all the others out there: need to do it programmaticaly if you mess around with the visibility attribute ) Aug 10 20:46:59 ddavis: I mean don't pass in a viewgroup to do the drawing just so you can get a bitmap you turn into a byte array Aug 10 20:47:13 I don't understand what you're doing with that viewgroup, and it's possible that it's screwing things up because something else is drawing to it Aug 10 20:48:04 i don't either to be honest with you.. the viewgroup is the signature view plus a few buttons, it doesn't make sense now that i'm looking at it Aug 10 20:48:45 since the Path object is just appended to throughout the "writing" procedure i'm just going to find a way to re-render that right into a Bitmap instead of relying on any of the UI elements Aug 10 20:48:52 would just make more sense, all the data is there Aug 10 20:49:35 exactly. You don't need it for width/height either, and really shouldn't be using it for that Aug 10 20:49:41 you should be using your own view's getWidth/getHeight Aug 10 20:50:01 i don't even need that really, the resolution is fixed.. this is only made for this device Aug 10 20:50:35 just need to google the way to draw the Path a different way and hope that it's not the compress method that's broken Aug 10 20:51:36 aha.. funny you mentioned paths before.. in my head i was thinking file paths.. i get it now, i'm an idiot Aug 10 21:01:02 much cleaner: http://pastebin.com/8ePm0z2u Aug 10 21:02:33 \o/ Aug 10 21:02:37 you probably don't even need that try/catch Aug 10 21:02:48 you can probably just return stream.toByteArray() Aug 10 21:02:50 Aliasing doesn't work. Android sucks Aug 10 21:03:01 glad to hear. Aug 10 21:03:37 Does anyone know how to prevent buttoned pressed state from being reset by long clicks or the notification drawer Aug 10 21:03:44 Resource not found. What a joke Aug 10 21:04:22 sysRPL, is that you? Aug 10 21:05:26 eh java requires me to put it around the close Aug 10 21:05:32 are you suggesting let it just go out of scope? Aug 10 21:05:44 Would there be a java compiler integrated in android? Aug 10 21:06:37 hi any response for me? Aug 10 21:07:08 diki: android has a DVM JIT compiler on 2.2+ I believe Aug 10 21:07:23 Is there any way to detect when the notification panel has been opened or closed Aug 10 21:07:40 how can switch between a ListView and mapView without reset component? Aug 10 21:07:45 themirror: you see, there is an app called aide whixv Aug 10 21:07:57 Which lets me compile android java Aug 10 21:08:16 And package and sign apks on the phone Aug 10 21:08:51 Those are separate processes Aug 10 21:08:57 What is your question Aug 10 21:09:38 themirror: i did not see a java compiler come with it Aug 10 21:09:51 But did notice it using aidl Aug 10 21:10:01 Which is used for ipc Aug 10 21:10:57 Okay idk I just have it setup with JDK and ADB plugin for eclipse. Aug 10 21:11:38 I use console on pc but I am talking about phone itself Aug 10 21:12:05 I can and i am developing on android itself Aug 10 21:13:18 Android comes with DVM JIT Aug 10 21:13:32 Apk has java bytecode Aug 10 21:15:30 anyone know any good up to date app engine tutorials for android? Aug 10 21:15:45 App engine? Aug 10 21:16:05 Google App Engine Aug 10 21:16:56 gonna ship this out and see if the problem goes away... thanks for your advice lov Aug 10 21:18:14 np Aug 10 21:18:36 "thanks for your advice lov"... that sounds funny to me when read aloud Aug 10 21:18:42 very cute Aug 10 21:25:15 heh, made my first completely custom listener, whee Aug 10 21:45:39 In order of precedence. Does that mean higher precedence at the end or at the beginning? Aug 10 21:48:25 technically it's unambiguous: higher precedence by definition should mean that it precedes other things Aug 10 22:01:47 damn sprint phones, i constantly get exception reports from one particular phone on sprint that is getting UnknownHostException when I try to load up mapquest Aug 10 22:02:32 <_99percent_> where's the debug button in eclipse? Aug 10 22:02:38 <_99percent_> it should be on the toolbar Aug 10 22:02:40 <_99percent_> but it's not Aug 10 22:02:52 <_99percent_> and all android's website wants to tell me is how great debugging is and how important it is Aug 10 22:03:21 <_99percent_> i have a device connected, set up for debugging, adb set up, etc etc Aug 10 22:03:30 _99percent_: there' also a menu item under the 'Run' menu, no? Aug 10 22:03:45 <_99percent_> nope Aug 10 22:03:56 and see the top right of the window for a possible button to switch between the Java and Debug perspectives? Aug 10 22:04:01 <_99percent_> all i have under run is an external tools folder Aug 10 22:04:04 <_99percent_> and nothing in there is useful Aug 10 22:04:17 <_99percent_> nope Aug 10 22:04:20 wtf? Aug 10 22:04:33 you in the right perspective? Aug 10 22:04:33 sounds like you have set up Eclipse in an atypical way Aug 10 22:04:55 Newby question: what's the android equivelant of console.log() ? Aug 10 22:04:58 <_99percent_> i downloaded it from ubuntu's software center and followed the instructions to set up the android dev tools in it Aug 10 22:05:22 aarobc: import android.util.Log; Aug 10 22:05:41 and then use Log.d / Log.e / Log.i etc Aug 10 22:05:57 http://developer.android.com/reference/android/util/Log.html Aug 10 22:06:10 <_99percent_> i love when framework sites completely change their shit around and make it harder to find the beginner tutorials you were once presented with almost as soon as you viewed the site Aug 10 22:06:13 <_99percent_> idiots Aug 10 22:06:37 ctate: thanks Aug 10 22:07:14 sigh. whenever I try making anything for android I get sad. It's the most unfun programming ever. Aug 10 22:07:41 <_99percent_> yeah, android development is completely fucked Aug 10 22:07:52 <_99percent_> fucking half ass pain in the ass of a fucking hackjob CHORE Aug 10 22:08:03 I have added the progressbad tag in my main.xml the problem is that it is displayed all the time, but I wish to display it only when I am doing a specific action and if a boolean variable is set to true and hide the bar when the action has completed Aug 10 22:08:15 *progressbar Aug 10 22:08:35 <_99percent_> none of the information you need is easily found, the tools used have a way of fucking off not doing what you want half the time, and then some jackass college kid comes in, steals the idea you had, sells it for half the price, and cuts you out of them market Aug 10 22:08:48 _99percent_: please calm down and stop swearing Aug 10 22:09:12 aarobc: you've obviously never developed for symbian or blackberry :) Aug 10 22:09:28 <_99percent_> that's the sad part ctate Aug 10 22:09:34 <_99percent_> android is the best option available Aug 10 22:09:37 _99percent_: then you havent tried symbian programming Aug 10 22:09:42 ha, though developing for windows phone is happiness. Aug 10 22:09:57 <_99percent_> too bad nobody uses windows phone to buy your apps for it Aug 10 22:10:05 witch is sad, because I would like to support android, because open source. Aug 10 22:10:11 ctate: you too had your probs with symbian? Aug 10 22:10:20 not me personally, but i hear stories Aug 10 22:10:21 <_99percent_> i just want my eclipse to be set up properly Aug 10 22:10:30 also if you're a student you can only have 3 development apps per windows phone or something Aug 10 22:10:33 And they are true. Aug 10 22:10:34 <_99percent_> always a pita when you try and do things like this with linux instead of windows... Aug 10 22:10:40 <_99percent_> windows i installed it and it just worked Aug 10 22:10:48 <_99percent_> linux i install it and half the features i need are missing >.> Aug 10 22:12:22 In symbian you need to add data to around 4-5 resource files just to display a button. Aug 10 22:12:36 Let alone make it do something. Aug 10 22:12:57 And Symbian C++ is horrible. Aug 10 22:13:10 <_99percent_> in eclipse how do you set it up properly for android development? ie: debug feature actually exists Aug 10 22:15:13 I was able to create an android program with native code and java code in just 3-4 hours whereas i wouldn't be able to do this in a month on symbian Aug 10 22:15:33 _99percent_: http://developer.android.com/sdk/installing/installing-adt.html Aug 10 22:15:36 diki: lol, so android is to me what symbian is to you. Aug 10 22:15:42 <_99percent_> i did that ryanm Aug 10 22:16:04 I'm trying very hard to not get frustrated. Aug 10 22:16:05 mind posting a screenshot of what your Eclipse looks life? Aug 10 22:16:06 *like Aug 10 22:16:51 <_99percent_> omg intellij idea is useless Aug 10 22:17:02 <_99percent_> asking me a bunch of crap about java sdks... nothing about android sdks Aug 10 22:18:07 <_99percent_> http://postimage.org/image/owq8ncemp/ Aug 10 22:18:15 aarobc: I dont even kniw java. Aug 10 22:18:20 *know Aug 10 22:19:29 neither do i lol Aug 10 22:20:04 but I do know that i'm starting to hate eclipse. it's not obeying my keybord commands. Aug 10 22:20:13 <_99percent_> eclipse sucks Aug 10 22:20:17 <_99percent_> no two ways around it Aug 10 22:20:22 <_99percent_> unfortunately it's really the only option Aug 10 22:20:28 <_99percent_> because intellij idea is a joke Aug 10 22:20:57 Use console, much better. Aug 10 22:21:06 <_99percent_> should just make my own android ide Aug 10 22:21:24 Empty words... Aug 10 22:21:48 <_99percent_> not really Aug 10 22:21:49 intellij is awesome Aug 10 22:22:00 ya, I've definitely written a line of android code, had eclipse tell me there was an error, cut and pasted the code, and then its error free.. Aug 10 22:22:05 <_99percent_> good simon then how do i get it to stop acting like some hyped up all in one every language craptool Aug 10 22:22:10 <_99percent_> i just want android development Aug 10 22:22:22 <_99percent_> i don't want it asking me what jdk version to use, because i don't care about that Aug 10 22:22:40 The compiler does Aug 10 22:22:40 okay, I'm seriously wanting to hurt someone right now. Eclipse is astoundingly unsuable. Aug 10 22:22:53 <_99percent_> good then the compiler should know >.> Aug 10 22:23:00 <_99percent_> eclipse knows Aug 10 22:23:38 eclipse thinks "toggle comment" means change focus, then do nothing at all. Aug 10 22:24:58 aarobc: you could try the console and your editor of choice Aug 10 22:25:25 Android create project, ant debug/release insta Aug 10 22:25:39 <_99percent_> if you can use the console and your editor of choice for android dev, and you can make software with C#, you can develop your own android ide Aug 10 22:26:08 <_99percent_> Seamless Android SDK Integration Aug 10 22:26:12 <_99percent_> yeah whatever you say buddy Aug 10 22:26:43 It was easy to install it. And the NDK was easy to install and use Aug 10 22:26:54 Android makefiles are also sort of superior. Aug 10 22:29:07 But..when I compiled my C code I forgot to fix a mem leak I intentionally left out lol Aug 10 22:30:11 'make' is the worst build tool there is, except for all the other ones. Aug 10 22:30:35 The syntax is hard, yes. Aug 10 22:30:57 But a lot of libraries including the linux kernel source are make dependent. Aug 10 22:32:36 and the Android build Aug 10 22:33:03 (though yes, the tools folks have created an Eclipse/ant-based build for individual apps or .jar libraries) Aug 10 22:33:04 I feel sory for the linux kernel though... Aug 10 22:33:10 make is a great tool. Unfortunately it's rarely written directly, but Makefile is often product of some other tool. Aug 10 22:33:17 just say no and write Makefiles by hand Aug 10 22:33:22 (he left, but...) so, uh, it looks like the version of eclipse is ancient. Aug 10 22:33:40 *the version in Ubuntu, that is Aug 10 22:33:44 It is too dependent on lots of 3rd party libs Aug 10 22:33:48 if he comes back, he needs to get it from eclipse.org Aug 10 22:34:04 linux distributions, failing to distribute software from day one. Aug 10 22:48:35 <_99percent_> ok so i can debug via right clicking my project in the workspace, debug as->android application Aug 10 22:48:52 <_99percent_> where are the buttons on my toolbar to do this in a way that's actually intuitive Aug 10 22:49:18 _99percent_: you need to download eclipse from eclipse.org Aug 10 22:49:24 the version in Ubuntu is ancient Aug 10 22:49:36 <_99percent_> i see Aug 10 22:50:06 yeah, don't get it from your distro Aug 10 22:54:17 <_99percent_> they really need to remove that ancient crap from the software center then Aug 10 22:54:25 <_99percent_> it's pointless being there Aug 10 22:56:00 <_99percent_> would i want classic or ide for java developers? Aug 10 22:56:06 <_99percent_> i used classic last time but who knows Aug 10 22:56:41 _99percent_: Classic is recommended for Android development Aug 10 23:09:22 Heya Aug 10 23:09:34 I'm trying to run an ARM binary compiled with gcc on Android Aug 10 23:09:41 But I can't figure out how to actually get it on there :| Aug 10 23:10:05 adb push tests /tests (where tests is the binary) gives me: failed to copy 'tests' to '/tests': Read-only file system Aug 10 23:12:55 for game, how should i play mp3 background music and mix sound effect wavs? Aug 10 23:14:47 jrajav: / root is read only, do: adb push tests /data/local/tmp/tests Aug 10 23:22:13 Napalm: Thanks Aug 10 23:26:00 far_: mediaplayer is optimized for long playing sounds like bg music and soundpool is optimized for short files like sound effects. Aug 10 23:26:34 Regardless I wouldnt use wav ever.. Aug 10 23:38:28 wow, big channel Aug 10 23:38:51 hey, anyone around Boston? I'm a Director of Software Engineering, and I need to hire some Android developers Aug 10 23:39:23 small software consulting firm (currently 6 people) need 2-3 android devs for a new android team...only have 1 now Aug 11 00:29:47 aww wow haven't seen a kick msg here before Aug 11 00:34:14 hi hi. am back. As I understand it if you have to send back an insured phone they dont check to see if it is your phone. (dont knwo why you would have to send one back if insured but I read this.) -- what about sending one back on a warranty? Thanks. (I got the replacement phone, took both to starbucks to do an experiment -- lost my phone. (wrings hands and heart). That's my situation. Aug 11 00:34:41 better than losing theirs. then they charge me the full amount. Aug 11 00:35:36 and can I do anything to find my phone using the ESN or MEID or something? Aug 11 00:35:43 Thanks.. Aug 11 00:46:22 If I am only calling a method from the UI thread or a Handler, I dont need to worry about syncronizing it, right? Aug 11 00:47:15 Even if other threads make multiple calls through that Handler Aug 11 00:47:18 Correct Aug 11 00:47:35 Well you won't be guaranteed order Aug 11 00:48:00 I think they will post messages to stack Aug 11 00:48:22 is there any way to guarantee order? This probably isn't a big deal (I have a network stream, I dont think it is going to be fast enough to get ahead of processing it to the UI) Aug 11 00:48:27 Pretty sure a locking mechanism is built in Aug 11 00:48:37 May be wrong Aug 11 00:48:45 locks Aug 11 00:48:48 I guess the only way to find out is to try Aug 11 00:48:54 its pretty simple Aug 11 00:50:17 I have in my code: readLock.lock(); try { read shared resource } finally{ readLock.unlock(); } Aug 11 00:50:36 if another thread has the lock it waits Aug 11 00:50:40 to get it Aug 11 00:51:31 I was gonna do the same approach you are trying a couple months ago and thats what they told me Aug 11 00:51:50 hmm, instead of handler? Aug 11 00:51:55 Oh Aug 11 00:52:02 Hold up Aug 11 00:52:08 you said network stream Aug 11 00:52:16 you want asynctask then Aug 11 00:52:18 I'm probably misusing jargon Aug 11 00:52:23 forget the locks then Aug 11 00:53:27 My case is different with a game logic thread accessing stuff in objects on uithread Aug 11 00:53:40 I have a Thread which handles a network connection to a server, which sends packets periodically containing some data which I parse into a List of Integers, and then use a Handler to call a method in my UI thread which takes that List as an argument and makes UI changes based on it Aug 11 00:53:50 but in case of network data, assume 1 kb/hr :) Aug 11 00:54:05 I'm like 90% self taught, especially in this area, just wanting to make sure I'm doing this right Aug 11 00:54:38 Right this is important. My best advice is to take my advice with a grain of salt :) Aug 11 00:55:07 Okay. If you already have the data at this point a surefire way is locks yes Aug 11 00:55:28 fairly light, does what you need Aug 11 00:56:18 ok, I'll investigate that Aug 11 00:57:34 as I said, I'm quite a derp, was quite proud of myself for figuring out how to implement my own event listener, lol Aug 11 00:58:34 You're good, I'm actually impressed considering I have a degree and were able to discuss this at a good level :) Aug 11 00:58:46 *we're Aug 11 00:59:09 i've created (via java) a class with a tablelayout, nested inside a horizontal scrollview, which is nested inside my class that extends scrollview… height/width for the main scrollview class are matched to the screen size, but the horizontal and tablelayout are 0 for h/w… is this normal? Aug 11 00:59:54 Also, make the lock access stuff minimal. All the way down at the bottom just encapsulating the shared resource access Aug 11 01:00:08 they're all set to MATCH_PARENT so i think they should have some size even if there's nothing in the table layout Aug 11 01:01:42 ultra-: tangental but helpful: Hierarchy Viewer Aug 11 01:01:45 why do you have a scrollview nested inside your own class which extends scrollview? Aug 11 01:01:59 i have a horizontal scrollview nested in the class Aug 11 01:02:06 ah, right, sorry Aug 11 01:02:09 didnt see the horizontal part Aug 11 01:02:11 np Aug 11 01:02:37 isn't hierarchy viewer for the graphical editor? Aug 11 01:02:48 i'm only using xml for the main relative layout that contains everything Aug 11 01:03:15 been programming for android for under a week so i don't know jack, i'll google it Aug 11 01:06:10 doesn't seem to connect to my device Aug 11 01:08:05 ah, i must have to use an emulator… says only works with the developer version of android Aug 11 01:11:37 suppose i write a chat app, and i wish to have my app send login/pass (aka, secret info) to a webserver. how to implement this? Aug 11 01:12:47 themirror: this is cool, thank you Aug 11 01:12:59 Hey np Aug 11 01:13:07 a horizontalscrollview must not accept MATCH_PARENT for the height, because that's 0 while the width is the correct 1196 Aug 11 01:14:38 perhaps i should set them all to wrap_content anyway, since i'll end up with a 4x4 grid of buttons, where each button's height/width = 1/4 of the main layout's size Aug 11 01:34:59 i'm dynamically creating a button, and using setOnClickListener… the example i'm looking at uses public void onClick(View v) Aug 11 01:35:06 is View v something that's standard and should be left in? Aug 11 01:35:17 also, the example uses @Override but eclipse tells me to remove it Aug 11 01:49:40 ultra-: yes you don't have to use v, but it refers to the view that was clicked. In your case, the button Aug 11 02:10:30 ultra- your activity needs to implement View.OnClickListener Aug 11 02:19:23 anyone know of a good resource on designing tablet apps ? Aug 11 02:21:17 design? look at the good ones that are already available **** ENDING LOGGING AT Sat Aug 11 02:59:58 2012