**** BEGIN LOGGING AT Thu Jul 18 02:59:58 2013 Jul 18 03:05:51 If you guys get a chance to review my app that wuold be great https://play.google.com/store/apps/details?id=com.marco.numbersnap Jul 18 03:05:59 trying to get to top 10 new paid apps for tools category Jul 18 03:06:02 currently 40th Jul 18 03:06:08 dammit Jul 18 03:06:10 wrong channel Jul 18 03:06:23 ohhh woops Jul 18 03:07:44 yay, more spamming Jul 18 03:08:50 SpamStorm Jul 18 03:13:26 after updating android studio, I am getting an alert, that I am not sure how to fix, "Project is using an old version of the Android Gradlin plug-in, The minimum supported version is 0.5.0. Please update the version of the dependency in your build.gradle files." Jul 18 03:13:33 How would I do that? Jul 18 03:16:12 hm, oreilly has new Gradle book "beyond the basics" Jul 18 03:16:18 too bad i can't get the basics Jul 18 03:17:42 ah, n/m fixed it by just changing the vresion number in the file Jul 18 03:39:19 guys, to perform processing on any file that will be uploaded on the website, should I store it before or there is a method that is treating flows recovered? Jul 18 03:41:17 what kind of flow are we talking Jul 18 03:41:19 heavy flow? Jul 18 03:43:54 small files which will be recovered by flow Jul 18 04:03:34 Is there an intent to open multiple images in the stock gallery? Jul 18 04:17:30 i keep getting into this lame situation: i have an object (pojo) with a bunch of properties that I would like to put in a listView: one property per row. i need t somehow map Adapter.getPosition() to a title and value of that property. anyone have any ideas?i seriously thought about writing some Adapter that takes 2 lists as resources (one titles, the other the class property name) and using reflection populate an array with the data Jul 18 04:20:41 you could create a ListItem class with the different fields Jul 18 04:21:39 g00s, Map ?? Jul 18 04:22:33 alex_PP Adapter.getView(position…) … i need to map the position to a pojo attribute's title and value (the attributes are heterogenous) Jul 18 04:23:10 Map Jul 18 04:23:11 ? Jul 18 04:23:55 or switch(postion) Jul 18 04:23:59 yeah, i could do that. or i could do a huge switch statement Jul 18 04:24:08 yeah, seems so yuck Jul 18 04:24:12 you're always going to need to write it all out in soe way or you lose control over the order Jul 18 04:24:20 alex_PP hey, did you get Lr5 yet ? Jul 18 04:24:22 *some Jul 18 04:24:26 not yet Jul 18 04:24:32 been super lazy recently Jul 18 04:24:37 take any pictures lately ? Jul 18 04:24:41 more so than before Jul 18 04:24:45 nope :( Jul 18 04:24:49 heh Jul 18 04:24:53 been working and riding Jul 18 04:25:07 going to japan in a week though so that'll be nice Jul 18 04:25:13 and pgoto-tastic Jul 18 04:25:15 *pgoto Jul 18 04:25:21 *photo Jul 18 04:27:34 alex_PP great! hope you have a good time Jul 18 04:27:39 get some nice pictures Jul 18 04:27:40 me too Jul 18 04:27:44 i'll try Jul 18 04:27:50 i'm rather rusty though Jul 18 04:27:54 what camera do you think you will bring ? Jul 18 04:28:09 20D + 24-70 + 70-200 Jul 18 04:28:17 and S95 for my pocket Jul 18 04:28:56 i miss my s95 Jul 18 04:29:06 what happened to it? Jul 18 04:29:13 got destroyed in a storm Jul 18 04:29:17 water damage Jul 18 04:29:28 oh dear Jul 18 04:29:39 pack filled up with water Jul 18 04:30:54 chiming in --- know of a simple way to use my android phone to auto-upload (ssh/scp/sftp) photos from my 50d? Jul 18 04:31:23 does the eye-fi work with android? Jul 18 04:31:35 http://www.eye.fi/ Jul 18 04:31:41 that might be worth a try Jul 18 04:32:02 does the 50d have an SD slot? can't rememebr Jul 18 04:32:09 ahh, my 50d uses CF cards. Jul 18 04:32:22 Right now, I use my laptop with canon's tethered shooting app Jul 18 04:32:42 What I like is that I can ignore the silly GUI from Canon's software and just use all the controls on my camera. Jul 18 04:32:48 CatYak what kind of photography ? Jul 18 04:33:14 And when I take a picture, my laptop auto-copies the photo to a folder where I have a script watching and then scp's the photo to a web server... Jul 18 04:33:19 I just muck around... Jul 18 04:33:25 one sec Jul 18 04:33:28 oh cool Jul 18 04:33:32 http://www.flickr.com/photos/ad5ey/ Jul 18 04:33:37 i was watching set resnicks work flow, pretty elaborate Jul 18 04:33:59 I use this tethering for my church. Jul 18 04:33:59 he;s a big proponent of editing in Lr that very day Jul 18 04:34:19 We have a bunch of elderly members who are stuck at home or in nursing homes. Jul 18 04:34:21 so he'll shot a bunch, and that evening xfer to Lr and keyword / edit Jul 18 04:34:47 So, I've set up a poor-man's live photo stream for our services… with icecast to get audio. Jul 18 04:34:52 Lr is fun. Jul 18 04:34:59 never bothered with tags and keywords and whatnot Jul 18 04:35:12 alex_PP its a pita to do it after the fact Jul 18 04:35:22 best to have a good dam workflow from the outset Jul 18 04:35:27 I'm only just starting to dabble with tags. It does seem handy after-the-fact, but I have to get off my arse to set the words on each photo. Jul 18 04:35:29 i just import eveything from the card, could be a day or a months photos and go though pressing b on all the best Jul 18 04:35:45 then rinse and repeat until i have a workable selection Jul 18 04:37:00 On sunday mornings, after I take a photo, I have a CGI script running that pushes the photos out to any browsers. The whole process from camera to the server to the browsers is <10 seconds, when I set my camera to small jpeg's. Jul 18 04:37:00 http://fbc-worc.org/live/ Jul 18 04:37:33 I'd like to ditch my laptop and just use a host USB camera straight through my gnex from my 50d. Jul 18 04:37:39 CatYak heh, looong time ago i went to FBC Tempe :) Jul 18 04:37:58 *long* Jul 18 04:38:03 that's a pretty cool idea Jul 18 04:38:14 / setup Jul 18 04:38:33 Tempe? Ahh --- a whole bunch of FBC's around… my folks used to go to FBC Houston. Jul 18 04:38:53 Thanks --- yeah, I keep my expenses on the cheap side. Jul 18 04:39:28 Some other folks are looking into live video streaming, but before a couple years ago, they didn't even have ethernet cable pulled to the balcony where the sound equipment is. Jul 18 04:40:15 CatYak so every sat morning, you take some pics at service and put them on the photostream, and this is for those that are not able to make it ? Jul 18 04:40:17 https://play.google.com/store/search?q=dslr&c=apps&hl=en Jul 18 04:40:23 there might be somthing in there that can do it Jul 18 04:40:24 I'd love to be able to involve other photographers for the live photos during the services, and it would be sweet if they only needed an android phone with a USB cable to their camera (assuming their camera couldn't use the nifty eye-fi's) Jul 18 04:41:39 Yeah, I have a few of those apps installed now, and need to try them when I'm next in: DSLR Controller, DSLR Gallery, DslrDashboard Jul 18 04:41:52 im setting a gridview up filling it with ImageView's via my custom adapter. Then i set a listener on the gridView, but its not executing the listener when an item is clicked (my debug message never hits logcat, but the activity finishes like it WAS executed) http://pastebin.com/Huzchjvv Jul 18 04:42:01 what, the hell Jul 18 04:43:15 failing that, CatYak I had some sucsess writing C usb stuff to trigger a capture on my 20d Jul 18 04:43:17 i just need the position in the grid that was clicked, not the actual object in the grid, so i really dont want to set up hundreds of listeners Jul 18 04:43:26 with some googling i'm sure you can find the specs Jul 18 04:43:39 alankilla did some of that too, haven't seen him in ages Jul 18 04:43:50 basically you need to open a chanel and tell it you want it to send you evey photo that gets taken Jul 18 04:44:04 g00s -- Yep, that's exactly right. The photo stream is delayed only ~10 seconds and roughly matches the audio buffering delays. Jul 18 04:45:32 alex_PP -- that's close. Here, I was wondering about just waiting for new photos to appear on the camera's internal storage and then copying them off to some folder on the phone. (Then I could try an app like BotSync for scp'ing the photos to the web server.) Jul 18 04:45:50 CatYak, http://libptp.sourceforge.net/ Jul 18 04:46:07 So, then I can just leave my phone in my pocket and concentrate on the physical camera controls. Jul 18 04:46:19 https://code.google.com/p/cameraptp/ Jul 18 04:46:32 there's loads of information on these sites Jul 18 04:46:41 implementing it can be a pain Jul 18 04:46:41 libptp --- all C, right? (anything java-liscious?) Jul 18 04:46:48 second link Jul 18 04:46:59 cameraptp ------ hadn't noticed that yet! thanks! Jul 18 04:47:01 the c one has better docs if i rememebr rightly Jul 18 04:47:11 bookmarking…. Jul 18 04:47:18 the java one isn't great Jul 18 04:47:43 once you get a usb endpoint though, you just need to squirt the right bits down it Jul 18 04:47:56 :) I'm just looking for barebones to suck photos off. Jul 18 04:48:16 I've never tried my hand at USB stuff yet, so this should be interesting. Jul 18 04:49:36 Thank you! Jul 18 04:50:02 no worries, this stuff is fun Jul 18 04:51:04 Who wants to answer a Figments, Er Fragments question? Jul 18 04:51:23 would be nice if there was a json version of this http://developer.android.com/reference/android/content/res/Resources.html#getXml(int) Jul 18 04:51:30 wonder how i could do that Jul 18 04:52:32 json in your assests folder? Jul 18 04:52:36 if i recall i can use this to read an arbitrary xml with @string and whatnot resolved because of the attributeset Jul 18 04:52:41 and jackson or gson Jul 18 04:52:48 ahhh Jul 18 04:52:50 use a raw resource Jul 18 04:54:08 yeah, i guess I could use gson + AttributeSet directly Jul 18 04:54:32 So I've got an app that uses a bunch of headless code (No UI) as java classes.. Should I convert this mess to Fragemnts? Jul 18 04:55:11 g00s: openRawResource Jul 18 04:55:36 codebutler what i would like to do is open a json file that has resource references Jul 18 04:55:57 does that make sense ? :| Jul 18 04:56:18 resource references? Jul 18 04:56:31 since it's static stuff, why not rewrite it as ZML? Jul 18 04:56:34 *X Jul 18 04:56:50 ZML ! Jul 18 04:56:57 XML++ Jul 18 04:56:59 as if XML wasn't enough Jul 18 04:57:14 alex_PP, JSON :D Jul 18 04:57:15 XML# Jul 18 04:57:25 g'night Jul 18 04:57:27 ha Jul 18 04:57:32 objective XML? Jul 18 04:57:34 night CatYak Jul 18 04:58:05 night Jul 18 04:59:01 * hackkitten ports g00s to WP8 Jul 18 04:59:11 hi hackkitten Jul 18 04:59:25 hackkitten, wait, you're here too?! Jul 18 04:59:28 long time no see, kitty Jul 18 04:59:34 I thought you were only an iOS developer Jul 18 05:02:21 I swear, whenever I get yi in aram, someone dodges Jul 18 05:02:57 heya Jul 18 05:03:03 pfn, you get what in what? Jul 18 05:03:15 random Jul 18 05:03:28 hows it going fellas? Jul 18 05:06:07 basically I'm interested in putting together a little racing game, just interested in what it would take to put it together Jul 18 05:06:15 been looking around at the different platforms (unity, corona, etc) Jul 18 05:06:29 theres just so much info out there its hard to get a solid idea of where to start Jul 18 05:11:46 hi g00s, narekb :) Jul 18 05:11:57 narekb: nah, I have been developing for Android since early 2011 :o Jul 18 05:12:02 iOS only earlier this year :D Jul 18 05:12:07 I remember Jul 18 05:12:18 hey hack Jul 18 05:12:22 I'm an iOS/Android dev now for the company I do work for Jul 18 05:12:26 it was either ##electronics or ##microcontrollers, I met you somewhere there Jul 18 05:12:28 nice Jul 18 05:12:30 they pushed the Android version on me as well :D Jul 18 05:12:41 hackkitten, isnt it cool? :D Jul 18 05:12:44 hack - mind if i ask you a quick question about developing a racing game? Jul 18 05:12:44 :) Jul 18 05:13:03 what kind of question, justdl_? Jul 18 05:13:23 narekb: kinda, I had to refactor the Android app as it was initially written by an absolute idiot Jul 18 05:13:27 hack - basically i'm wondering what it would take to take an idea from concept to product Jul 18 05:13:42 each class in it could access any other class in the dep graph in 1-2 jumps Jul 18 05:13:45 it was ridiculous Jul 18 05:13:50 haha Jul 18 05:13:58 hackkitten: I know that coding style.. LOL.. I'm using it.. Jul 18 05:14:07 :3 Jul 18 05:14:17 I removed about 4-5 classes in their entirety Jul 18 05:14:26 reduced dependencies by about half Jul 18 05:14:41 was fun :D Jul 18 05:15:04 hackkitten: Can/Should I move all the crap I have in library classes into Fragments? Jul 18 05:15:34 fragments replace activities Jul 18 05:15:39 you should think of them like that Jul 18 05:15:55 keep shared functions in libs where possible Jul 18 05:16:02 don't want a copy-pasta mess Jul 18 05:16:24 but if a function is used only once in one activity/fragment, just put it in there Jul 18 05:16:29 hack - basically i'm just wondering what it would take create a simple racing game - from physics, graphics, to code etc Jul 18 05:17:27 justdl_: 2-d or 3-d? Jul 18 05:17:42 either or Jul 18 05:19:20 justdl_: Top down 2-d is simpler than bumper-cam 3-d.. Jul 18 05:19:32 makes sense Jul 18 05:20:44 justdl_: Physics is just math and tuning.. same for AI players.. Jul 18 05:25:58 Bleeptech: can always use 2D with Box2D physics :P Jul 18 05:26:07 can get really funky physics effects that way, though Jul 18 05:52:22 hey guys Jul 18 05:52:48 I am looking for some sort of global proxy settings support table Jul 18 05:52:56 I need to know from which version does it work Jul 18 05:53:08 having problems in 2.2 Jul 18 06:01:59 heh Jul 18 06:15:07 fook man Jul 18 06:15:32 i've tried two methods to get a return value from clickable events Jul 18 06:15:36 just not friggen working Jul 18 06:16:02 gridview wont execute the adapter onclicklistener Jul 18 06:16:15 and the actual imageview's i attach an onclicklistener to also wont Jul 18 06:16:37 i need an ClickListener pro to look at some short code Jul 18 06:17:40 just paste it here Jul 18 06:17:41 :D Jul 18 06:17:43 I mean Jul 18 06:17:46 a pastebin link! Jul 18 06:18:33 http://pastebin.com/pDE2MSQR Jul 18 06:18:42 you can see the original gridview implementation commented out but still in place Jul 18 06:18:53 and then the new ImageView oncilcks in the adapter code Jul 18 06:19:12 ultimately im just trying to get the position in the gridview returned when its clicked Jul 18 06:19:25 I've enabled and disabled clickable on the gridview to no effect Jul 18 06:20:11 are you sure your inner views get clicked? Jul 18 06:20:17 well, probably not Jul 18 06:20:19 as it's not working Jul 18 06:20:34 the wierd thing, is that the activity finishes like its reading the finish code Jul 18 06:20:42 no errors, and no debug logs Jul 18 06:21:16 also my ActivityREsult function isn't getting called, so i probably have bigger problems Jul 18 06:21:56 I think correct way is to add click listener to your gridview Jul 18 06:22:18 that way listener will be triggered Jul 18 06:22:57 you could make your adapter implement OnItemClickListener Jul 18 06:23:06 and then add gridView.setOnItemClickListener(adapter); Jul 18 06:23:14 so you would get events inside of your adapter Jul 18 06:23:53 but it doesn't seem right to add click listener to your sub views Jul 18 06:23:56 it doesn't work that way Jul 18 06:24:07 I started by adding the click listner to the gridview Jul 18 06:24:19 did you see the code that was commented in oncreate? Jul 18 06:24:28 yes Jul 18 06:24:29 i can try the adapter, its not much of a change Jul 18 06:29:05 hi guys, can anyone please tell me what i am doing wrong here? http://paste.ubuntu.com/5886612/ object.arg1 is the mot name, but in my view all the views have "false" as text, even if the sysout indicates otherwise Jul 18 06:30:54 Does the Navigation Drawer do a slide in animation by default, or does it just pop up? Jul 18 06:31:17 installed my app on the phone, but it is crashing immediatly after start Jul 18 06:31:42 how can I find the problem? Jul 18 06:31:58 ./adb logcat Jul 18 06:32:04 EugenA, Jul 18 06:32:06 cannot test it in emulator, it is crashing on start (android studio 0.2) Jul 18 06:32:26 logcat works in emulator or fone Jul 18 06:33:33 so, I need to connect the phone somehow to logcat Jul 18 06:33:48 i assume you have developer mode on Jul 18 06:33:52 and usb debugging turned on Jul 18 06:34:34 and the phone should be connected over usb Jul 18 06:34:51 you can adb over the network as well but i didn't look into that Jul 18 06:35:22 i think it works only on rooted devices Jul 18 06:35:22 Alright talk to you guys later Jul 18 06:35:26 #?ams Jul 18 06:35:31 ?ams Jul 18 06:38:12 wow.. getting so many interesting information to logcat from device :-) Jul 18 06:38:56 just look for the stacktrace Jul 18 06:39:11 figured it out, i had clickable set in the interface editor for the gridview. If you bind a clicklistener in code, apparently you can't have that flag set :) Jul 18 06:39:14 good to know though Jul 18 06:40:36 the problem is: I/dalvikvm(16359): Failed resolving Lcom/albrecht/scantest2/MainActivity; interface 549 'Lcom/mirasense/scanditsdk/interfaces/ScanditSDKListener;' Jul 18 06:41:00 classnotfoundexception? Jul 18 06:41:01 scandit is external scan library Jul 18 06:41:14 are you exporting that library? Jul 18 06:42:00 I don't know.. it is in build.gradle: compile files('libs/scanditsdk-barcodepicker-android-3.3.1.jar') Jul 18 06:42:46 do I need something else? no errors while compilation Jul 18 06:43:08 i'm not sure, i never used android studio, Jul 18 06:43:20 and classnotfoundexception is a runtime exception, the library is not accessible at runtime Jul 18 06:43:40 hehe, oh ipover dns. you're so great :) Jul 18 06:44:00 in eclipse, you can Project Properties -> Java Build Path -> Order and Export Jul 18 06:44:07 and choose to export whatever library you want Jul 18 06:44:20 i'm not sure how you do that in android studio Jul 18 07:08:11 Hi All Jul 18 07:09:31 I'm using an Animation class to animated a popup summary in a scrollview but Im finding that the first time I try to run the anim it fails unless I scroll the scrollview by 1px Jul 18 07:10:25 after doing one scroll it starts working, any ideas what I can do to avoid having to scroll? Jul 18 07:11:50 The anim is being applied to a LinearLayout element btw Jul 18 07:22:45 can i add an ImageView to a surfaceView? Jul 18 07:23:19 if not, is there a way to add an ImageView to some kind of layout where i can freely move it around Jul 18 07:47:33 Please help me? Can I run the exact same Activity from web in different processes? so that would be at the close Activity freed memory used webview Jul 18 08:00:14 shinkamu you can dump the bitmap into the canvas drawing on the surfaceview Jul 18 08:01:34 lasserix: thats what i was figuring i'd have to do Jul 18 08:01:42 wanted to take advantage of onclick calls though Jul 18 08:02:30 so i guess now i should just check the tap location bounds against each images dimensions to handle selection Jul 18 08:02:51 I've already started working in that direction Jul 18 08:03:27 can you suggest a resource to learn C++ / NDK as fast as possible? Jul 18 08:03:34 link Jul 18 08:07:09 um Jul 18 08:07:23 Java JNI docs, docs bundled with NDK Jul 18 08:07:29 depends what do you intend to do. Jul 18 08:14:35 trying to use external library (scandit), but getting classnotfoundexception. Using android studio 0.2 Jul 18 08:16:20 EugenA: drop .jar into "libs" folder, rightclick and "add as library" = Jul 18 08:16:21 ? Jul 18 08:16:53 http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library Jul 18 08:23:14 how do I switch between fragments while keeping the fragments state Jul 18 08:23:41 i have a list of items i need to keep so that i can recreate the view without downloading them again Jul 18 08:24:17 defnordic: all this was already done Jul 18 08:24:46 defnordic: also I can compile my project without any error Jul 18 08:26:19 EugenA: You've verified that the "compile .." line is in your build.gradle file, and that the classnotfoundexception is from a class in this jar? Jul 18 08:26:36 eSatsu depends on what you're doing. Using a viewpager by any chance? Jul 18 08:27:42 not using viewpager Jul 18 08:28:29 eSatsu: I am a total newb, but was reading about this, isn't there something like a "back stack" that you can push fragments onto, keeping their state, and retrieve them from there? Jul 18 08:29:31 im adding them to the backstack as i launch them Jul 18 08:30:00 but i'm a bit confused how do i check if a fragment is already there and how to retrieve it from there Jul 18 08:34:13 fragmentManager.findFragmentByTag(TAG) at least can't find the fragment Jul 18 08:36:31 kjeldahl: this is my gradle file: http://pastebin.com/hRdTd6zB and the log: http://pastebin.com/VXemKTAj Jul 18 08:36:47 not sure I'm reading the log correctly Jul 18 08:37:35 this is my first app, I want to build scan-App Jul 18 08:38:40 You may want to run "jar tf scanditsdk-barcodepicker-android-3.3.1.jar" and verify that com.albrecht.scantest2.MainActivity is there (in the proper place). Jul 18 08:39:48 On the other hand, if "com.albrect" is your namespace, blaming the jar is incorrect. Jul 18 08:40:24 kjeldahl: no, it is not there. Why it should be there?? it is external library, i've downloaded it Jul 18 08:41:14 EugenA: Well, if you blame the jar, you would expect it to be found in the jar. If it's not there, it's not the jar's fault. Jul 18 08:41:41 so, why the app is crashing? Jul 18 08:42:10 Do you have a MainActivity.java file? Is it in the right namespace/package? Is it listed in AndroidManifest.xml? Jul 18 08:42:25 It's not finding the MainActivity class. Jul 18 08:47:18 Need help Jul 18 08:47:19 urgent Jul 18 08:47:20 http://paste.ubuntu.com/5886872/ Jul 18 08:47:23 thats java code Jul 18 08:47:38 basically pops up google maps and navigation feature Jul 18 08:48:00 this is logcat Jul 18 08:48:00 http://paste.ubuntu.com/5886874/ Jul 18 08:48:08 Running directly on phone from sdk Jul 18 08:48:38 lol Jul 18 08:48:52 if (lm.someMethod) { lm = something} ... Jul 18 08:49:05 lm is not initialized when you call a method on it. Jul 18 08:49:29 Mavrik, I intend to learn the C++ syntax as fast as possible and then the libraries available to the NDK Jul 18 08:49:39 Looks like you'll be needing lots of help. ;-) Slow down, do some reading! Jul 18 08:49:46 mastro, uh. Jul 18 08:49:52 oh lol thanksalot kjeldahl :P Jul 18 08:50:16 mastro, stick to C. It's hard to learn C properly even on desktops. C++ is even worse, it's a huge language with alot of gotchas. Jul 18 08:50:20 Why do you need C++? Jul 18 08:50:33 Mavrik: memes, I bet Jul 18 08:50:51 Mavrik, don't doubt it, but I'll need it for Vuforia :) which use C++ Jul 18 08:51:33 uff, a bit better :P Jul 18 08:51:40 Still not working :'( Jul 18 08:51:41 http://paste.ubuntu.com/5886879/ Jul 18 08:51:43 Mavrik, sorry if my reply got late, didn't saw you replied ;) please call my nickname or I might miss it Jul 18 08:51:43 help Jul 18 08:51:45 :| Jul 18 08:51:45 you can however try avoiding C++ as much as possible :) Jul 18 08:51:57 kjeldahl: yes, I have MainActivity.java, here is AndroidManifest:http://pastebin.com/kHBtvBiQ Jul 18 08:52:22 mastro, ah… :) Well, the problem you're having is you'll have to learn C++, Java JNI and Android at the same time… not easy :) Jul 18 08:52:24 Isaac: You need to CHECK for null before trying to use it, or else you will keep getting these null exceptions. Jul 18 08:52:27 good luck. Jul 18 08:53:13 kjedahl: okay thanks. Do you find any other problem? I;'m a newbie to be honest :P Jul 18 08:53:16 p_l, I'd rather forget about C++ if possible.. I also used it a little long time ago and what is still burning in my mind is this: http://yosefk.com/c++fqa/ Jul 18 08:53:16 EugenA: Ok, what about the "package" statement and class defintion and location in the file system? Jul 18 08:53:52 Mavrik, know Java and Android pretty well :) Jul 18 08:54:13 way easier for you then :) Jul 18 08:54:20 kjeldahl: what do you mean with package statement? Jul 18 08:54:21 Mavrik, I used C and C++ long time ago -- not very much, but I'm somewhat advantaged Jul 18 08:54:22 as I said, Java JNI docs are relevant to you Jul 18 08:54:25 mastro: My personal record was getting w pages of template errors because an application dared to use ! on a class pointer in an if. The application code contained no templates, iirc, or at least none on that class Jul 18 08:54:36 and what ever little doc you have bundled with NDK Jul 18 08:54:52 Issac: Well, you need to add some error checking, but otherwise it looks like it could run (the little code there is). You're not really using "lc", but I expect you will be later... Jul 18 08:55:04 Mavrik, yup I'll start from them and the NDK examples Jul 18 08:55:22 kjeldahl how do i add error checkign? Jul 18 08:56:03 p_l, :) still a better love story than PHP Jul 18 08:56:53 hahahahahahahahaha Jul 18 08:57:00 EugenA: The top of every java package typically starts with "package ...", you your case that probably should be "package com.albrecht.scantest2;" (for the MainActivity.java file). But honestly, this isn't Android related at all, this is Java 101. Jul 18 08:57:51 Issac: Again, Java 101, but typically if (lm != null) { proceed....} else Log.e(TAG, "OH NOES"), or alternatively try/catch blocks. Jul 18 08:58:35 oh thanks kjeldahl (y) Jul 18 09:01:06 kjeldahl: http://pastebin.com/0sKd1Y2p files: http://wstaw.org/m/2013/07/18/scr-1.png Jul 18 09:01:17 guys, this may not be a dev-realted question but Jul 18 09:01:25 anyone here have experience with reviewing phones? Jul 18 09:02:04 EugenA: Same logcat output?? Jul 18 09:03:57 p_l, :P Jul 18 09:09:16 kjeldahl: logcat output is here: http://pastebin.com/VXemKTAj Jul 18 09:09:55 hmm Jul 18 09:10:13 how do I stop Button views from "eating up" touch events? (e.g. I want to see the touch event on background view) Jul 18 09:11:38 umm i believe you can return false Jul 18 09:11:45 and then set a listener on the background view ? Jul 18 09:11:59 I think this is most important message: I/dalvikvm(16359): Failed resolving Lcom/albrecht/scantest2/MainActivity; interface 549 'Lcom/mirasense/scanditsdk/interfaces/ScanditSDKListener;' Jul 18 09:12:08 EugenA: Hm, looks related to the ScanditSDKListener interface. Try removing the interface and verify that it then work. It should. Jul 18 09:12:40 Regarding implementing the interface, obviously you've done that, or else you would get a compile time error. Jul 18 09:12:43 Mavrik or use a onInterceptTouchEvent Jul 18 09:12:56 hmm Jul 18 09:20:26 EugenA: Sorry, can't really tell what the problem is. I see from here http://www.scandit.com/support/getting-started-with-scandit-sdk-for-android/ that you also need to copy resources into your project. Maybe that's what's missing causing the interface to fail? Jul 18 09:20:55 anyways, gotta pop out now, laters Jul 18 09:25:04 are you guys using Loaders extensively in your apps? Jul 18 09:27:39 karlo, yes Jul 18 09:28:28 do you use content providers as well? Jul 18 09:30:20 karlo, I did for a while, then quit it unless I had to develop for exporting data to an external app or writing an SDK Jul 18 09:32:19 so basically Loaders are a layer between your API and your views? Do you have any problems with how Loaders work? For me, they seem to have a bit overcomplicated lifecycle Jul 18 09:32:50 its hard to avoid using the support package Jul 18 09:53:04 karlo, makes no sense to me what you are saying. They are not over-complicated. If they are for you you are doing something wrong or not thinking about the design of your fragments / activities Jul 18 09:53:49 karlo, on the contrary, they help getting data easier Jul 18 09:53:55 is there a meaningful log from proguard when it fails? i even have -verbose in my proguard-project.txt but it just fails with a meaningless "error 1" Jul 18 09:55:45 Are shared preferences called like that because they can be shared between apps? Jul 18 09:56:49 more like shared between app components Jul 18 09:57:38 so how do I share simple data between apps then? by writing files? Jul 18 09:59:01 content provider? Jul 18 09:59:27 No Jul 18 10:00:02 because? Jul 18 10:00:37 I think it violates the Human Rights Charta having to do all that for just sharing an Integer. Jul 18 10:01:01 ^^ Jul 18 10:01:10 marrrk, sadly, that's by far the easiest thing ;) Jul 18 10:01:21 Is it? Jul 18 10:01:22 you can also bind a service IIRC Jul 18 10:01:33 or send a broadcast when the value changes Jul 18 10:01:58 I already have a database. Could I write a content provider for that whole DB? Jul 18 10:04:56 yes Jul 18 10:05:01 fairly easily too Jul 18 10:05:31 a content provider is basically an interface to a db Jul 18 10:06:55 Will all other apps be able to access it then? Jul 18 10:07:34 yes Jul 18 10:07:38 that's what you wanted to do Jul 18 10:08:13 No Jul 18 10:08:20 Only my one other app. Jul 18 10:08:23 so how do I share simple data between apps then? by writing files? Jul 18 10:08:39 That's what I said but that's not what I want :) Jul 18 10:08:51 do you think other apps are going to want to maliciously consume your integer? Jul 18 10:09:03 It's precious. Jul 18 10:09:20 Yeah, I'm not really worried, to be honest. Jul 18 10:10:34 ha ha, I've got marrrk's data! It's 17!!!! Jul 18 10:10:57 That's a possible one. Jul 18 10:11:06 but don't tell everyone, because it's an important and secret 17 :) Jul 18 10:11:45 I beg you not to run around other channels and propagate it even further. Jul 18 10:12:02 how much is it worth to you? Jul 18 10:12:30 17 Jul 18 10:12:32 I suggest setting up a PKI system to encrypt your 17 Jul 18 10:13:46 with private ceritifcates and revocation lists Jul 18 10:15:46 write it on nice parchment and charge entrance to see it Jul 18 10:17:30 The Secret Integar that will unlock your infinities, jackpot any atm, and enable you to solve any NP problem by marrrk Jul 18 10:18:32 almost deserves its own tumblr with those crazy tilting gifs Jul 18 10:20:30 anyone knows of a way to use getTitle on a MenuItem but get the english one and not a locale one? Jul 18 10:21:26 lasserix: It's quite easy to solve NP problems. Jul 18 10:23:32 Actually, I have another question. I'm keeping the database on the sdcard. What do you suggest I should do when it's not available but I want to write to it? Cache the stuff internally somehow but is there an easy way? Jul 18 10:24:08 marrk oh you know how to solve the travelling salesman problem ? ;p Jul 18 10:25:41 hm, my gridview, or maybe layout has some weird padding on API level 10. works nice on API level 17 though . any idea where might the issue be, if anyone dealt with simmilar stuff before. Jul 18 10:26:24 although gridView.getPadding returns 0, so it's not exactly that Jul 18 10:39:15 marrrk you might be able to have a key that will always return null for your content provider Jul 18 10:39:43 lasserix of course I know how to solve the traveling salesman problem. Jul 18 10:39:58 If I would make a interface with enable(), disable() and isEnabled() how would you call such interface mm Jul 18 10:40:08 Here's the algorithm: Try each possibility. Choose the best one. Jul 18 10:40:29 unless your database is *huge*, why would you put it on external storage? Jul 18 10:40:40 I was worried it might become huge. Jul 18 10:40:56 I will have a look at it's size now Jul 18 10:41:07 its* Jul 18 10:42:05 dunno that garuntees effectiveness as an algorithm mark, but i know what you mean. Jul 18 10:42:37 There's no -h for ls on the shell through adb. Jul 18 10:42:48 What is this: 61440? Jul 18 10:42:50 Bytes? Jul 18 10:43:40 it's an integer :P Jul 18 10:43:47 My secret integer. Jul 18 10:45:06 marrrk a young inquisitive lad always with his nose in the books one day opened knuth's on the art of programming to a very special page indeed, for when he opened to the page number <614440> he found himself falling through the text into a digital world. Jul 18 10:45:10 anyways got to run Jul 18 10:45:35 Okay. Yeah it's only 60 kb Jul 18 10:45:36 we can rip off lion witch and wardrobe and flatland Jul 18 10:45:44 I can't. Jul 18 10:45:51 I would have to read it first. Jul 18 10:46:02 Which might prove impossible. Jul 18 10:46:42 So Leeds, you're saying just leave it on the internal memory? Jul 18 10:47:47 I like that solution. Jul 18 10:47:56 marrk if you do put it on external i think it'd be liable to be accidently deleted when a user decides to clean out their sdcard (for instance) Jul 18 10:48:01 hah, android: listSelector="@null" to the rescue: http://stackoverflow.com/questions/14740522/gridview-padding-in-api-less-then-10 Jul 18 10:48:46 It is logging some user activity so it will become bigger and bigger but maybe I'll just delete stuff that's older than one year and I should be safe. Jul 18 10:58:39 fixed the emulator issues on linux too, hint install kvm and intel atom images Jul 18 11:06:49 Heya folks, I am having a weird issue with a viewpager and an underlying fragmentpageradapter Jul 18 11:06:52 how come there is no Intel Atom x86 System Image for API level 8 ? Jul 18 11:07:10 Namely - the adapter holds an arraylist of fragments, and returns the needed fragment from it Jul 18 11:07:36 I have to dynamically add and remove fragments from the end (like a stack), but removing a fragment from the adapter does not remove it from the viewpager Jul 18 11:07:43 despite calling notifyDataSetChanged Jul 18 11:08:11 The viewpager can't scroll to it, it snaps back to the initial position, but I can drag it partially to see the fragment that was supposed to be removed Jul 18 11:08:22 getCount() does return the right size, it's just that the fragment is in the viewpager Jul 18 11:08:34 This gives me a stupid bug when navigating around Jul 18 11:09:14 e.g. I start at fragment A, then add B, making the stack A,B. I then return to A and want to add C (and navigate to it), but since B is still in the viewpager I just go to B Jul 18 11:15:41 anybody uses ACRA? Jul 18 11:16:04 searching for a decent backend reporting server Jul 18 11:16:53 my google spreadsheet can't be opened anymore because of its size -.- Jul 18 11:18:44 I want the users of my app to be able to search youtube for videos, but instead of opening and displaying the video they select I want to do something custom with the link - can I make such a thing? Is there a youtube API for searching their videos from android or do I need to find a webbrowser and manipulate it to do what I want? Jul 18 11:23:04 good try NSA, build your spy network on your own! Jul 18 11:23:15 lol Jul 18 11:23:32 we're made, abort! Jul 18 11:23:42 primski: the intel images are contributed, afaik, by intel Jul 18 11:24:13 p_l: k, thanks ... Jul 18 11:24:17 Xabster: https://developers.google.com/youtube/code sounds like what you want Jul 18 11:24:39 I want to make a collaborative youtube playlist for use during parties. I want smartphone users to be able to tell my device (probably a raspberry) which youtube link they want to enqueue Jul 18 11:24:42 primski: and I don't think Intel is truly that dedicated to bringing itself to mobile... Jul 18 11:24:52 or at least they don't seem very effective Jul 18 11:25:03 All users are limited to 2 or maybe 3 links in the common playlist and after that the app is frozen so people don't stare at their phones Jul 18 11:25:18 anyway... API 8? I think the first device that got relased with intel chip was API9 Jul 18 11:25:48 actually, API10 Jul 18 11:28:24 so, there's no intel image for api 8 because there was no such release, ever Jul 18 11:28:50 defnordic: exactly it, thanks Jul 18 11:29:37 Xabster: hth. sounds like a fun project ^^ Jul 18 11:48:16 hi Jul 18 11:49:04 I tried to add Tabs to my Actionbar … actually the tabs are there but the fragments are not shown :P Jul 18 11:49:06 http://pastebin.com/vKpKfTSL Jul 18 11:49:46 Thanks for having a quick look (cant be that big of a deal but I dont know why they aren't visible … no error occurs in the log file) Jul 18 11:53:01 C0br4: haven't used it yet, but have seen it recomended by a few veterans of this channel Jul 18 11:55:10 Tee_Pee are you sure the pages have been destroyed, ie you update but the previousily created page is still cached via the last one Jul 18 11:57:50 and if you are using fragment pager couldn't you decouple the content from the fragment, so that way going from a->b when you want to load c will load c's content but in b Jul 18 11:58:53 ie make an array of bundles with the pointers to the content and swap that out, and pull from that on either fragment view created / becomes current (using swipe observer) Jul 18 11:59:28 lasserix - I've solved the issue by overriding the adapters destroyItem and getItemPosition Jul 18 12:00:01 now it works properly but I have to take care of retaining fragment states as they're destroyed upon leaving them Jul 18 12:01:54 which is probably a good idea anyways :) Jul 18 12:03:04 it is :) Jul 18 12:03:47 I am starting to think that there was probably an easier way of creating a multi-leveled form though Jul 18 12:05:11 Although this does work quite well Jul 18 12:11:32 anyone familiar with tabs in the actionbar ? Jul 18 12:11:33 http://pastebin.com/vKpKfTSL Jul 18 12:11:56 does not display the fragments but no error is in the logs Jul 18 12:17:01 What is the purpose of a * in xml attributes...Like: android:theme="@*android:style/Theme.Holo.Dialog.Alert" Jul 18 12:17:29 It's used in many places in Android's sources... Jul 18 12:17:54 I know of @+id notation, but @* is new to me... Jul 18 12:17:59 android studio refactoring SUCKS Jul 18 12:18:29 it renamed XML attribute "name" when I wanted to refactor an object property "name" Jul 18 12:22:29 now I have android studio is still buggy as hell. Jul 18 12:25:47 I noticed Jul 18 12:26:13 Eclipse is the bite manifestation of the devil, but at least it compiles. Jul 18 12:26:18 any idea how to change this back? why can't I just edit adroidmanifest and fix it? Jul 18 12:26:46 I got absolutely no clue. Jul 18 12:27:07 The stupidest suggestion I can give you is to restart android studio lol Jul 18 12:27:29 doing that and editing the manifest outside studio Jul 18 12:27:39 Tee_Pee, use intellij, ditch eclipse and android studio ;) Jul 18 12:28:56 what's the problem with android studio? it works fine to me.. if you know how to use it.. the only thing that I find very buggy is the layout renderer Jul 18 12:29:09 If you have trouble with AS not "compiling" anything, why not just run "./gradlew assembleDebug" from the command line and see if that is any different (probably not, as AS calls gradle when building). Jul 18 12:29:10 Zharf - eclipse comes pre-configured with the android sdk and it doesn't give me any shit at home, so it's simply a case of "can't be assed" Jul 18 12:29:13 :P Jul 18 12:29:52 GNUton: it worked fine before, but I just had to go and try an advanced feature...:S Jul 18 12:32:19 kjeldahl: if AS doesn't compile it means you have not imported the project correctly. IMPORTED. Jul 18 12:32:44 I need an additional... 7 screens to have a proper overview of all this code Jul 18 12:33:17 GNUton: Recent releases of AS doesn't have a concept of a project to build; it only reads or writes to the build.gradle file. Jul 18 12:33:40 GNUton: Which is why I suggested running gradle directly. Jul 18 12:34:10 how many pixels is 1 cm in 200 dpi? Jul 18 12:34:55 200/2.54 Jul 18 12:35:51 78 :p Jul 18 12:37:46 dp / pixel / cm conversions and inaccuracies are one of the few reasons that ever made me reconsider my profession :p Jul 18 12:39:37 Hi, what's the best way to handle the back button click inside a fragment? Jul 18 12:40:00 Hey yo! Jul 18 12:44:30 Hey guys: I am developing an app that stores my configuration in the cloud. Is it right that I can't build my preferenceActivity completely dynamically (as the number of settings is dynamic)? Jul 18 12:46:09 Hi, what's the best way to handle the back button click inside a fragment? <-----Back button clicks are handled in the parent activity. If you need to you can propagate it to your fragments by overriding the activities onBackPressed Jul 18 12:47:50 jan1337z - You can, but it's deprecated. You have to add a preference screent o the activity and put all the preferences on it one by one Jul 18 12:48:07 I haven't gone into it myself that much though Jul 18 12:48:39 Can you give me a link for that (as I am googling like 30 minutes now) Jul 18 12:49:08 I can give you example code, 1 minute Jul 18 12:49:56 that would be great! Jul 18 12:51:11 http://pastebin.com/kNh95jHf Jul 18 12:51:22 There, the SettingsActivity onCreate and an example of a category Jul 18 12:52:01 thanks so far Jul 18 12:52:15 SettingsActivity extends PreferenceActivity? Jul 18 12:52:29 I'm not 100% sure that that is what you were looking for, hope it could be of some help :) Jul 18 12:52:47 SherlockPreferenceActivity for me since I use ABS Jul 18 12:52:51 But PreferenceActivity otherwise Jul 18 12:53:03 Using that too :) Jul 18 12:53:24 Hi. I have two apps, and both need to be able to download a file from Amazon S3 using the same credentials. I could allow each app to provide a UI to take the credentials, and in each app write code to hook this all up. But that's duplication I'd rather avoid. Jul 18 12:53:28 Instead, could I write an application whose sole purpose was managing S3 credentials, which was also a content provider for S3 URLs, e.g. s3://foo.com/bar/baz and have both applications talk to this S3 app via intents? Jul 18 12:54:39 so instead of 2 applications, you have 3 applications? Jul 18 12:54:44 Yes. Jul 18 12:55:01 Why not just have 2 applications, and allow them to bind to each other and determine who will handle downloading? Jul 18 12:55:26 tom - yes, although that is the more complex route. You could alternatively write a library project that works as an amazon S3 handler, then hook that up as a library to your two apps. Jul 18 12:55:46 lov: I can't guarantee both will be installed. They're separate apps, they just both share the need for S3 configuration. Jul 18 12:56:56 Tee_Pee: In that case, if /both/ applications are installed (which isn't guaranteed, but can happen), wouldn't both apps need to manage the credentials independently? Jul 18 12:57:05 right. which is why I'm suggesting that both are able to handle what needs to be done, but they also have remote binders so they can bind to each other and negotiate credentails etc Jul 18 12:57:09 *credentials Jul 18 12:57:24 alternately, the user can just type their password twice. Jul 18 12:58:09 tom - yes, my solution just removes the "duplicate code" issue you mentioned Jul 18 12:58:49 lov: If both are able to handle what needs to be done, and accept passwords, that's duplicated code, and clutters both UI with stuff I'd rather the system dealt with. Jul 18 12:58:51 im using navigation drawer and i have the drawer items set in strings.xml as string-arrays, and currently im passing the item from the array as a string to my selectDrawerItem function, which opens a fragment based on which item was clicked Jul 18 12:59:22 this works for now, but i'm using strings in this manner. drawerItem.contentEquals("cart"); for example Jul 18 12:59:28 I'd rather each app didn't have to provide the ability to configure S3 credentials, and whatever credentials I may need in future. I just want to download s3://foo.com/bar/baz as easily as I can download http://example.com/hippo Jul 18 12:59:38 tom39291: do what you need to do then I guess. Jul 18 12:59:42 I'll see how the intents solutions works. Jul 18 12:59:47 this isnät good practice and will not work in multiple languages, what else could i do? Jul 18 12:59:55 lov, Tee_Pee: Thanks. Jul 18 13:00:29 i guess theres no other way to do it than position? Jul 18 13:00:35 by position* Jul 18 13:00:50 Once I've done this I get to figure out how to have a gpg app decrypt the file I get from s3, and ideally without having to add decryption code to my app. :) Jul 18 13:01:07 I'd rather each app didn't have to provide the ability to configure S3 credentials, and whatever credentials I may need in future. I just want to download s3://foo.com/bar/baz as easily as I can download http://example.com/hippo Jul 18 13:01:29 Create an S3 Downloader library, have it just accept the URL and credentials, include library in all future projects Jul 18 13:01:42 Heck even create a login UI inside the library itself Jul 18 13:01:54 no duplicate code, portable, versatile Jul 18 13:01:54 Tee_Pee: Yes, that's probably simpler, but it still means each app needs to handle credentials. Jul 18 13:02:31 Well, you can code "default credentials" directly into your library and use those if none are provided by the app Jul 18 13:02:49 Security issues though... :P Jul 18 13:03:08 default credentials won't work, since I don't know which credentials to use. :P These credentials are provided by the user (yes, the app is expecting technical users) Jul 18 13:04:48 ah, that's another thing Jul 18 13:15:04 When theres activities added to the androidmanifest file, i'm seeing the android:name attribute with a . and without a . Jul 18 13:15:10 whats the deal with that? Jul 18 13:16:06 coder tunnel vision Jul 18 13:16:22 I see. which is the right way? Jul 18 13:17:01 kc8hfi_: if you see things that start with ., then the packagename for the application is silently added Jul 18 13:17:20 so, if your app has packagename com.foo.bar, then name=".MainActivity" is shorthand for "com.foo.bar.MainActivity" Jul 18 13:18:11 but if you have in the manifest section, the package attribute, theres no need for that . then? Jul 18 13:18:35 er... what? Jul 18 13:19:32 if you have ......... Jul 18 13:19:32 since the . silently adds the package, if you have package="com.foo.bar.MainActivity" in the no, that's incorrect. Jul 18 13:19:45 lov: yeah, exactly like that Jul 18 13:19:49 if you don't add the leading dot, the assumption is that there's no packagename. Jul 18 13:20:05 the leading dot isn't syntactically valid, so it uses it as a hint to prepend the manifest package. Jul 18 13:20:23 if you don't have the leading dot, then you'd be looking for the class MainActivity in the default (read: "") package Jul 18 13:20:53 if your MainActivity is in package com.foo.bar, you'll crash on startup because android won't be able to find your class, since it doesn't know the correct fully qualified classname. Jul 18 13:21:12 it will be looking for "MainActivity" when it should be looking for "com.foo.bar.MainActivity" Jul 18 13:21:19 take out the leading dot, see what happens. Jul 18 13:21:58 leading dot hasn't been on the program and it runs fine. however, the class itself does specify the package Jul 18 13:22:31 kc8hfi_: it's important to note that you can have activities, services, etc that don't actually live in com.foo.bar. Jul 18 13:22:39 so, you might have com.foo.bar.util.SomeOtherActivity Jul 18 13:22:54 the correct way to write this in the manifest is ".util.SomeOtherActivity" or "com.foo.bar.util.SomeOtherActivity" Jul 18 13:23:10 Ok, i see now Jul 18 13:23:13 not using the fully qualified packagename is a great way to lead to conflicts Jul 18 13:23:29 e.g. what happens if you have a .SomeActivity and a .util.SomeActivity; which one is chosen if you don't specify the packagename? Jul 18 13:23:53 thats where things will probably break, since it won't know which one to call Jul 18 13:24:25 right. so the leading dot is just a convenience for you, the programmer, provided by the preprocessor as it parses the manifest. Jul 18 13:24:41 it's not necessary and if it confuses and frightens you then don't use it and fully qualify everything instead. Jul 18 13:26:09 i have a better understanding as to what it does now. Jul 18 13:32:32 Tee_Pee still there? Jul 18 13:33:25 somewhat Jul 18 13:34:02 The example you gave me just shows a blank activity :D Jul 18 13:34:56 Does anyone know if it's possible to write a VpnService which can distinguish between connections initiated by different applications Jul 18 13:35:10 Did you add the last line in onCreate()? Jul 18 13:35:10 setPreferenceScreen(root); Jul 18 13:35:28 it's lumped together with the other preference generating methods, easy to miss Jul 18 13:36:00 That was it :D Jul 18 13:36:05 thanks dude :) Jul 18 13:37:13 The only layer I see is a routing layer, so no way to distinguish among apps Jul 18 13:37:42 hey folks, I got a question, have you seen the Notification Toggle app? Jul 18 13:37:56 I would like ot know how the dev added elements to the notifications area Jul 18 13:42:34 Hi! Jul 18 13:43:05 I have a question about Sqlite initialization Jul 18 13:43:27 its more than a techincal question, its about an advice or a techique Jul 18 13:45:02 ok. let us know when you get around to asking it. Jul 18 13:48:52 ok here it goes Jul 18 13:49:11 I want to makea little app and i need to initialize a DB with arround 200 records.... Jul 18 13:49:28 the problem is that i dont want to write 200 insert query statements in the code... Jul 18 13:49:47 I want to know which is the recommended way to load the data into de db for the first time? Jul 18 13:50:13 I usually just add a .sql text dump in raw folder Jul 18 13:50:19 and then read it line by line executing it Jul 18 13:51:28 so in yout .sql you have the complete sql sentence? Jul 18 13:51:32 INSERT INTO .... data.. Jul 18 13:51:34 ? Jul 18 13:52:05 sqlite has bulk load, but I'm not sure how/if the file gets read correctly in Android (there may be path issues). Only testing will tell. http://stackoverflow.com/questions/697004/bulk-load-data-into-sqlite Jul 18 13:52:47 Works. http://stackoverflow.com/questions/12286956/import-sqlite-file-in-an-android-activity-android-sqlite-database Jul 18 13:53:56 But for such a small amount of data, I'm not sure it's worth the extra effort. Jul 18 13:54:01 evanc - thanks, what you told me to do yesterday with the AlarmManager instead of Timer, works perfectly :) Jul 18 13:55:23 yp Jul 18 13:55:32 as long as you do everyhing in a single transaction it's rather fast Jul 18 13:56:31 ok thanks :D Jul 18 13:57:08 speaking of sqlite, under what circumstances would an INSERT not produce any errors or execptions, but just not work ? Jul 18 13:57:10 what are the best img formats to use on mobile ? At the mo I am using scaled down png images but they are quite pixelated Jul 18 13:57:58 goldstar: thats not a format issue most of the time Jul 18 13:58:24 thats a texel (bitmap pixel to screen pixel) ratio problem Jul 18 13:58:30 StingRay_: "Just not work" is kind of a shitty description. Jul 18 13:58:37 StingRay_: when you don't do a commit at the end? (or your database layer doesn't) Jul 18 13:58:37 StingRay_: do you mean insert 0 rows? Jul 18 13:59:12 yes I mean zero rows after commit and close, I traced it all the way through the super classes too Jul 18 13:59:18 it doesn't fail Jul 18 13:59:37 but only on 1 table, others in the db are fine Jul 18 13:59:44 so it has to be…me… somehow Jul 18 13:59:46 StingRay_: right, how does one address these issues ? Would svg be an apt alternative ? Jul 18 14:00:09 goldstar: there are many ways, svg is very heavy for a small mobile platform Jul 18 14:00:19 for anything but very basic use Jul 18 14:00:26 depends on the style and design factors Jul 18 14:00:46 StingRay_: attempting to insert a row that already exists if you require unique values? Jul 18 14:00:56 check the return code on your insert command Jul 18 14:01:24 the table is empty Jul 18 14:02:52 StingRay_: the app will be deal based so each deal will have its own image accompanied by text. Can you recommend any good reads on this topic ? Jul 18 14:03:39 any topics that relate to banner design and output to various mediums will help Jul 18 14:05:43 goldstar: in all honesty, deal type graphics that have text, graphics, etc. i would (well not me) get a designer to do it, giving the requirements Jul 18 14:06:06 and desining it in a element floaty way I think, but depends on loads of thing Jul 18 14:06:10 things* Jul 18 14:07:32 StingRay_: well, they are designed by a designer, however we use the images on mulitple platforms hence why the images are scaled down Jul 18 14:07:43 i wonder if they are going to bring back the promo graphics in the play store Jul 18 14:08:06 i bet lots of people hired designers to do that for their apps Jul 18 14:08:10 and it just gets shitcanned Jul 18 14:08:14 but some idiot at google Jul 18 14:08:16 goldstar: I'm sure they were not designed for an android app, by a designer Jul 18 14:08:24 or you wouldn't be asking :) Jul 18 14:08:31 StingRay_: no they weren't lol Jul 18 14:12:31 g00s, what if the developer is also a designer? Jul 18 14:12:51 narekb: chimaera! burn the witch! Jul 18 14:12:51 well yeah, i wouldn't call myself a pro designer, but I did all my own graphics Jul 18 14:13:00 yeah, the promo graphics were great Jul 18 14:13:05 no idea why they removed it Jul 18 14:13:14 defnordic, I don't have money to pay for a designer, and my apps are not SOMETHING to hire a designer for Jul 18 14:13:16 now it looks like a bland / sterile things Jul 18 14:13:18 **** me right?! Jul 18 14:13:46 anyone here is using ads in their apps? Jul 18 14:14:11 narekb: no thx Jul 18 14:14:18 haha lulz Jul 18 14:14:23 but good luck with your app Jul 18 14:14:27 thanks Jul 18 14:14:29 showing ads is thebest wat to earn some $$? Jul 18 14:14:50 nekosama, best but probably most annoying for the users Jul 18 14:14:55 http://www.businessinsider.com/windows-monopoly-is-getting-destroyed-2013-7 Jul 18 14:15:06 g00s, YAY! Jul 18 14:15:40 yes i know, but perhaps it better to give the app for free and earn some revenue from ads Jul 18 14:15:46 good morning Jul 18 14:15:50 but i dont know how much money can i earn with ads Jul 18 14:16:12 nekosama: is that a serious question ? Jul 18 14:16:19 is it possible to enable debugging for an app on a mobile device when connected to a PC? the idea to determine what content is retrieved, external URLs accessed and so on Jul 18 14:16:37 nop, i am not asking Jul 18 14:16:39 just saying Jul 18 14:16:48 there are lot of ads companies Jul 18 14:17:02 nekosama, AdMob Jul 18 14:17:11 it's from Google and helps you earn with your apps Jul 18 14:20:00 * Ge0rG hates ads so much, he will never add them to any one of his apps Jul 18 14:20:53 Hello all... Jul 18 14:20:57 Same here with the one exception of my plan to make an app that does one thing: show ads. Jul 18 14:21:11 What is: java.lang.SecurityException: Isolated process not allowed to call registerReceiver Jul 18 14:21:50 Lachezar, you can only registerreceiver from a service or activity or whatever that is long-lived Jul 18 14:21:52 quick q, haven't purchased a phone recently: if you get a sammy or htc phone that is not "google edition" or nexus, do you have to create accounts with the respective companies? which means you use a google account and a sammy / htc account ? Jul 18 14:22:03 no Jul 18 14:22:04 can anyone help me figure out my text encoding issue? i started looking into it yesterday but havent solved it yet Jul 18 14:22:13 http://stackoverflow.com/questions/16724895/text-in-xml-graphical-layout-appears-as-strange-characters Jul 18 14:22:24 csterling123, your fonts are busted Jul 18 14:22:27 pfn: I'm registering the receiver in a Service's onCreate()! Jul 18 14:22:31 csterling123, reinstall your computer Jul 18 14:22:35 lol Jul 18 14:22:40 g00s, well, sammy will try to coax you into registering into their shitty store Jul 18 14:22:41 my *whole* computer? Jul 18 14:22:49 g00s, but you need Google account as well Jul 18 14:23:04 Mavrik can you opt out of the sammy stuff ? Jul 18 14:23:12 mhm Jul 18 14:23:12 g00s> to answer yesterday's question, as with most of the changes Google makes, it's complete shite. We should all riot against it, and forget about the whole ordeal by next week ;) Jul 18 14:23:18 pfn: can you be more specific as to how to do that? Jul 18 14:23:22 don't buy Samsung crap if you value yourself though Jul 18 14:23:34 csterling123, insert windows/linux/osx disk, reboot, choose fresh install Jul 18 14:23:39 Chainfire yeah, i'm pissed Jul 18 14:24:19 g00s honestly it's a bit sad for the DSLR Controller graphic which I let somebody else slave over for hours without paying him. But mostly I'm just relieved I don't need to have more promo graphics made for future apps :D Jul 18 14:24:21 i was proud to show somebody my apps' page, it was more my creation. now its just a generic thing with a fucked up grid system Jul 18 14:24:22 i dont think thats going to happen just because eclipse isnt reading a font correctly...when i choose the serif typeface, it encodes the text properly Jul 18 14:24:50 well there is that. Jul 18 14:25:01 also, it's strange that the dev console still wants you to upload it ... Jul 18 14:25:03 csterling123, your font is busted, not eclipse isn't reading it correctly Jul 18 14:25:15 when starting the email app using startActivityForResult and the user sends the prepared email, shouldn't it return to onActivityResult with the requestCode passed on the startActivityForResult method? Jul 18 14:25:22 csterling123, I already gave you the suggestion of re-unpacking the adt zip Jul 18 14:25:25 csterling123, from windows/osx/linux, preferavly Linux :D Jul 18 14:25:28 csterling123, if that didn't help, your system fonts are broken Jul 18 14:25:40 *preferably Jul 18 14:25:48 memoryleak, only if it setResult Jul 18 14:25:54 but hey, for the amount of cash Google sent me this week thanks to their administrative error, I can deal with it! Jul 18 14:26:00 pfn, by re unpacking do you mean uninstalling and reinstalling from help > about eclipse > installation details ? Jul 18 14:26:20 Chainfire heh, do you think they will fix that :P Jul 18 14:26:30 pfn: so if the gmail app returns 0 on every case i can't to much about that? Jul 18 14:26:30 narekb- i agree entirely, unfortunately i work in windows and dont really have a say about it in my company Jul 18 14:26:33 csterling123, no Jul 18 14:26:42 memoryleak, that's right Jul 18 14:27:02 pfn- ok, good. then i havent tried that. i thought i did. sorry for making you repeat yourself. Jul 18 14:27:19 rm -rf everywhere-you-unpacked-the-adt-and-sdk-stuff Jul 18 14:27:20 csterling123, ahh, forced OS, I see Jul 18 14:27:25 unzip adt-bundle-whatever.zip Jul 18 14:27:26 try again Jul 18 14:27:44 g00s undoubtfully so Jul 18 14:27:45 forgive my noobness, but dont you install the adt from eclipse? Jul 18 14:27:54 I never do Jul 18 14:27:56 so how do i unzip a file like that Jul 18 14:27:58 Chainfire i already spent my $30 on food :( Jul 18 14:27:59 just unpack the adt-bundle Jul 18 14:28:02 that google distributes Jul 18 14:28:04 it includes eclipse Jul 18 14:28:16 so should i uninstall eclipse as well? Jul 18 14:28:32 sure Jul 18 14:28:34 narekb- yes, it is unfortunate. but they pay me well so i dont complain *too* loudly Jul 18 14:28:44 ok, thanks. Jul 18 14:28:56 csterling123 i agttribute my very good luck with eclipse to the fact that I always got the platform runtime and added only the fucking adt. it was as lean as you can get Jul 18 14:29:20 adt will bring in JDT of course Jul 18 14:29:27 and teh xml editor Jul 18 14:29:42 im trying to make apps using the ESRI ArcGIS SDK Jul 18 14:29:51 the adt bundle includes the bare minimum for android development Jul 18 14:29:54 g00s- so i'll not be as fortunate :( Jul 18 14:30:03 awesome good to know! thanks pfn Jul 18 14:30:23 it includes sdk, eclipse platform and adt plugins Jul 18 14:30:27 plus dependencies Jul 18 14:30:35 one drawback is that it doesn't really auto-update Jul 18 14:30:42 but who cares, bandwidth is more or less cheap for computers Jul 18 14:30:48 what the heck...why does eclipse not show up in add/remove software Jul 18 14:30:55 because it doesn't use an installer Jul 18 14:30:57 you just unzip it Jul 18 14:31:02 oo Jul 18 14:31:08 so you delete its folder and you're done Jul 18 14:31:17 so when i asked if i should install eclipse Jul 18 14:31:20 you meant delete it Jul 18 14:31:21 lol Jul 18 14:31:23 gotcha Jul 18 14:32:12 i dont understand the point of the bundle. its one click vs like 2 clicks. anyhow, you have to keep your adt up to date anyhow, and eclipse may come out with a newer version? may as well just do things normally Jul 18 14:32:35 you have to add esri anyhow Jul 18 14:32:39 yeah Jul 18 14:32:48 I have a custom baseAdapter implements Filterable, If no items matches the filtertext, i would like to set a linealayout visible, but i can't, how can i fix this? (I use a callback to my fragment and sets visibility on visible inside my fragment) Jul 18 14:33:16 g00s, you're far too concerned with keeping stuff up-to-date Jul 18 14:33:48 particularly when updating individual parts of the android development toolchain causes problems Jul 18 14:33:54 e.g. updating sdk but not adt or vice versa Jul 18 14:34:04 (particularly with the change from pre 22.0 to post 22.0) Jul 18 14:34:14 and keeping eclipse up-to-date is overrated as well Jul 18 14:34:17 brb rebooting Jul 18 14:34:37 i dont think keeping eclipse up to date is overrated, but anyhow Jul 18 14:37:33 there are very rarely issues I encounter in eclipse that are resolved by updating eclipse Jul 18 14:37:56 pfn: but using something else solves them all ? Jul 18 14:38:01 :) Jul 18 14:38:01 my problems are usually not with eclipse proper but the JDT, and yeah i like getting those fixes Jul 18 14:38:16 stay with your JDT and be happy Jul 18 14:38:16 you just seem to encounter lots of problems Jul 18 14:38:17 :p Jul 18 14:39:24 also, the more plugins you use, the more you want to update eclipse because its all on one release train. i use xtext, birt, and the lua plugins for example Jul 18 14:39:43 but again, - who cares, be happy Jul 18 14:40:26 i have to decide between the eclipse / idea clojure plugins next Jul 18 14:40:38 ccw works fine Jul 18 14:40:42 hm Jul 18 14:40:58 Oh man... UsbManager.mService is null?!? Jul 18 14:41:34 why are you even accessing it? Jul 18 14:41:52 lov: btw my insert problem, return of insert is "1" Jul 18 14:42:04 StingRay_: are you perhaps just not committing then? Jul 18 14:42:27 pfn: me? I'm not accessing it. UsbManager.openDevice() crashes with a NPE. Jul 18 14:42:27 hang on, a small bit of logic just kicked in Jul 18 14:42:31 let me check :) Jul 18 14:42:40 Lachezar, then you're not calling it in the right lifecycle Jul 18 14:43:34 * Lachezar stares blankly... Yet again... Works on one device, doesn't get called on another device, and crashes on a third device. Jul 18 14:44:10 pfn: Does this mean I can't work with USB in my own thread? Jul 18 14:45:06 you should be able to Jul 18 14:45:17 but the way you obtain the usbmanager may need to be handled more delicately Jul 18 14:46:13 pfn: I get the USB Manager in my Service.onStartCommand, then start the background Thread, and it crashes there. Jul 18 14:46:47 pfn: USBManager.getDeviceList() crashes with a NPE too :( Jul 18 14:47:45 what happens if you use it from your service before starting the thread? Jul 18 14:48:41 pfn: Does the fact that the device has no USB Host, but rather an USB OTG with an adapter have any weight? Jul 18 14:48:54 I dunno, I don't think so Jul 18 14:50:31 Hey guys. I'm extremely new to Android development so don't judge too harshly. I am having a problem accessing SharedPreferences from an AsyncTask. I have a doInBackground method in which I need to access something from SharedPreferences. Can this be done? Jul 18 14:50:31 pfn: Crashes with a NPE in IntentService.onStartCommand(). Jul 18 14:51:26 * pfn shrugs Jul 18 14:52:33 Corporalist: even if you can it's not a good idea: load prefs in onPreExecute(), and store any preference changes in onPostExecute() Jul 18 14:53:03 Is there a way to force GridView the redraw of it's childs? Jul 18 14:53:15 notifyDataSetChanged Jul 18 14:54:01 pfn: What you're sayning is: I'm screwed? Jul 18 14:54:12 pfn: Doing that alredy. Text data changes, but the grid shows pictures that should have bin updated Jul 18 14:54:24 Lachezar, I'm saying you're beyond my understanding of how android usb works, you'll need to delve deeper yourself Jul 18 14:54:36 memoryleak, then your getView isn't doing the right thing Jul 18 14:54:59 pfn: I see... Jul 18 14:55:35 If I want to download new content from a server in my Activity, it is best to be done by an AsyncTask ? Jul 18 14:56:54 it's best done asynchronously Jul 18 14:57:11 depending on what needs to be done, asynctask may or may not be a good fit Jul 18 14:57:43 pfn: Can you have a look into my adapter: http://pastie.org/private/zfywlo4i1lmlloqvm4j1w Jul 18 14:57:46 ? Jul 18 14:59:49 pfn, I need to get ~90KB content (images, text) from a server and display it on UI while the user is waiting. Jul 18 15:00:03 pfn: the new picture is shown when something is overlaying the item (like scroll down until it hides) Jul 18 15:00:25 jwalker60, then use an asynctask Jul 18 15:00:37 pfn, thanks :) Jul 18 15:04:21 memoryleak, dunno, see why your setImageURI doesn't take effect right away Jul 18 15:04:30 memoryleak, use a debugger or prints Jul 18 15:06:51 Lachezar, thanks :) Jul 18 15:06:53 jwalker60: use an async task. Better yet, check out Volley. Jul 18 15:06:56 pfn- i just unzipped the adt bundle Jul 18 15:07:12 it looks worse than before =/ Jul 18 15:07:24 this time it says its missing styles Jul 18 15:08:08 * g00s doesn't hear much about volley Jul 18 15:08:21 lov have you found it useful ? Jul 18 15:08:25 because everyone loves volley Jul 18 15:08:55 haven't actually tried tbqh, but it seems to handle this exact use cae Jul 18 15:08:57 *case Jul 18 15:09:05 csterling123, you need to run sdk manager/android and download platforms Jul 18 15:09:49 pfn: here's what im seeing- http://imgur.com/fCaCei7 i'll go ahead and start the platform downloads Jul 18 15:10:16 although it says i have 4.2.2 (API 17) installed.. Jul 18 15:10:17 if i want to check for some saved user preferences using SharedPreferences, where would be the best place to put it, in the onStart method, or onCreate? Jul 18 15:15:16 kc8hfi_: anywhere ??? Jul 18 15:15:30 well, not "after" when you need to use it Jul 18 15:16:39 i thought about it some more, and in my case it hsould go in onCreate, since i want to use an item from there as text in a textview Jul 18 15:21:23 kc8hfi you'd probably make your life easier if you wrapped the getting the preferences in a method that returned some kinda of preference object, that way you could call it when you needed it from wherever Jul 18 15:23:23 imgur needs a forwarding lookup Jul 18 15:24:14 Gah... Application.onCreate() can not register a receiver? Jul 18 15:26:00 * Lachezar is dumb... Really... The service was 'isolated' in the Manifest :( Jul 18 15:27:05 * Lachezar goes in the corner and puts a 'Dunce' hat. Jul 18 15:28:58 lets say i have 2 classes, ClassA and ClassB. ClassB extends from ClassA. how would ClassB call a function from classA? Jul 18 15:29:06 a friend had a SIII with their mophie juicepack. i told him he could probably get rid of that if he just used a nexus device; bloatware was probably eating his battery. i think his head exploded Jul 18 15:29:17 how does classA call a function from classA? Jul 18 15:29:48 oh, ok. i'm dumb Jul 18 15:29:58 same thing from member variables, Jul 18 15:30:08 yeah but make sure to use right access modifier Jul 18 15:30:27 b won't be able to use a's privates Jul 18 15:30:57 for extending you want to use (probably) protected Jul 18 15:31:04 but these are all basic java questions Jul 18 15:31:16 What would cause a runtime dataoutput stream to have a broken pipe? Android throwing it out of memory? Jul 18 15:31:25 lasserix: yeah, basic stuff here, sorry Jul 18 15:32:10 no worries, just the android development god androidino will get irratated and perhaps netsplit us all into a data vacuum if we persist :) Jul 18 15:33:52 imgur really has a bad interface Jul 18 15:35:49 O developers, what's a good ergonomic keyboard? Jul 18 15:36:01 microsoft natural Jul 18 15:36:12 someone already bought that - I want to get another one Jul 18 15:36:22 haha Jul 18 15:36:55 typematrix, kinesis keyboards Jul 18 15:37:04 I found some keyboards where the keys are like a sphere Jul 18 15:37:08 (into the keyboard) Jul 18 15:37:12 what's the advantage of those? Jul 18 15:38:03 you can pretend you are from the future Jul 18 15:39:13 you don't have to pull your wrists back like normal keyboards Jul 18 15:39:19 also it's easier to throw at coworkers behaving like morons? Jul 18 15:39:32 shmooz, that makes sense Jul 18 15:40:19 anyone know why my adt bundle would come with missing themes? Jul 18 15:43:10 or what i can do to fix it? Jul 18 15:44:36 Hello Jul 18 15:45:52 I am learning to access location information from an android device. I have set up a class that implements the LocationListener interface. Jul 18 15:46:01 Why would my process.exec('su -c cmd') not request permissions? Jul 18 15:46:21 both onProviderDisabled and onProviderEnabled are working, but onLocationChanged(Location) is never being called. Jul 18 15:46:47 sulaiman did you add it GPS / location permission to your manifest? Jul 18 15:47:02 I am using the COARSE access Jul 18 15:47:54 I am trying not to repeat myself. Jul 18 15:47:55 lasserix, yes, I have added "android.permission.ACCESS_COARSE_LOCATION" permission Jul 18 15:54:12 maybe it's because it can't detect my location through the cellular network, let me try GPS provider Jul 18 15:56:57 using GPS_PROVIDER with the FINE LOCATION access didn't work either Jul 18 15:57:23 I also enabled GPS on my device Jul 18 15:59:45 Okay, I just installed the ADT Bundle, and of course on the first open I get errors. Can anyone help me figure this out? http://i.imgur.com/dzgWUNg.jpg Jul 18 16:01:32 heh, the adt bundle comes with egit? Jul 18 16:01:41 should have got the platform runtime :D Jul 18 16:02:57 whats that? Jul 18 16:03:10 sorry, i dont know what is. Jul 18 16:03:14 do you mean just install eclipse Jul 18 16:03:18 egit? the eclipse git plugin Jul 18 16:03:22 then get the android sdk? Jul 18 16:03:31 i dont need the git plugin lol Jul 18 16:03:38 im sure it would be useful though Jul 18 16:04:15 the platform runtime is here http://download.eclipse.org/eclipse/downloads/drops4/R-4.3-201306052000/ Jul 18 16:04:24 better check if the esri plugin is compat with 4.3 Jul 18 16:06:01 who cares if it doesn't come with egit, you can still add the plugin like you would have anyway Jul 18 16:08:33 why google play has no analytics? Jul 18 16:09:21 Google was lazy Jul 18 16:09:31 can anyone tell me how is this effect achieved? Jul 18 16:09:32 https://lh3.ggpht.com/aabAW_fFA9Xyg6_NL-DbuOKRNVD57n1AnHPRZ9deFcVT_xzPDZDOK-9zKMMunD3h0aeO=h900-rw Jul 18 16:09:49 bad jpeg compression ? Jul 18 16:10:11 Chainfire: funny Jul 18 16:10:12 speeder, it's totally stupid how google play doesn't have analytics Jul 18 16:10:13 Sterioids? Jul 18 16:10:18 considering they have analytics for the chrome web store Jul 18 16:10:19 .... Jul 18 16:10:20 assholes Jul 18 16:10:24 narekb: you use PS ? Jul 18 16:10:33 PS? Jul 18 16:10:33 :) Jul 18 16:10:40 PostScript Jul 18 16:10:40 PhotoShop Jul 18 16:10:54 ahh is this PS? Jul 18 16:11:02 cause you can create that in like 3 seconds Jul 18 16:11:13 with actions inside? Jul 18 16:11:15 wth Jul 18 16:11:16 ? Jul 18 16:11:22 there is a srtuctur scatter brush with the metal oval thingies Jul 18 16:11:31 structured* Jul 18 16:11:53 narekb: is this what you're looking for? http://developer.android.com/design/patterns/navigation-drawer.html Jul 18 16:12:25 omg! I thought he was on about the background Jul 18 16:12:28 :) Jul 18 16:12:38 StingRay_: he still might be, it's a really vague question Jul 18 16:12:56 StingRay_: although tbh I thought you were taking the piss Jul 18 16:13:30 Ankhwatcher: na, I like doing fabric type textures in photoshop Jul 18 16:13:39 soothes the mind Jul 18 16:13:53 StingRay_: good for you ;-) Jul 18 16:16:00 I'm trying to get PicUntu to run on an Android HDMI stick. I think PicUntu wins the most vague and misleading documentation award. Jul 18 16:16:11 Ankhwatcher, that's EXACTLY what I wanted, thank you Jul 18 16:16:23 narekb: glad to help, good luck with it Jul 18 16:16:30 thanks :) Jul 18 16:17:48 i've got a sqlite table that has an id and a description. is it better to just query this table each time i want the description, or get all the records and store them in a hashmap, and then get the description from the hashmap every time i need it? Jul 18 16:18:23 StingRay_, you really thought I was asking about graphics? Jul 18 16:18:40 kc8hfi_: how many records, how often do you need them? Is the table being written to by any other process? Jul 18 16:18:48 narekb: yeah, the onlything that is not explained clear in the docs is a background like that image you posted Jul 18 16:19:14 * Ankhwatcher has to reboot to windows to flash a kernel image, brb Jul 18 16:19:15 and was also thrown by Chainfire's bad compression comment Jul 18 16:19:17 StingRay_, it looks really cool, would be good if it was also described in the docs Jul 18 16:20:32 narekb: well like I said, it's a few seconds in photoshop 101 stuff to do Jul 18 16:20:45 well add about 40 more seconds to make it tileable Jul 18 16:20:59 Ankhwatcher: about 10-15 records. i've got 3 different sub activities that will use the description, one of those activities will be writing to that table Jul 18 16:21:51 StingRay_, hmmm Jul 18 16:22:00 so, you offer creating the image manually? Jul 18 16:22:14 then defining it as a background of the drawer in XML? Jul 18 16:22:41 not sure I understand the question Jul 18 16:23:02 StingRay_, 1) create the png in Photoshop/Gimp Jul 18 16:23:15 2) then can I define it as a background of the drawer? Jul 18 16:23:22 in XML or something Jul 18 16:23:25 narekb: that's actually not a navigation drawer, it's a SlidingPaneLayout Jul 18 16:23:47 TheDruidsKeeper, damn, how do you guys know all this?! Jul 18 16:23:50 difference is that the navigation drawer sits on top of the content pane, whereas the sliding pane pushes to the side Jul 18 16:24:22 i just started android dev a month ago, so i've been spending a lot of time researching design ;) Jul 18 16:24:30 great job Jul 18 16:26:04 there was an awesome google i/o that talked about it.. i believe it was this one: http://www.youtube.com/watch?v=XwGHJJYBs0Q Jul 18 16:26:41 no, nm.. im retarded.. wrong one Jul 18 16:28:16 this is the vid i was thinking about: http://www.youtube.com/watch?v=F5COhlbpIbY Jul 18 16:28:33 hey...someone posted a URL to eclipse SDK. i had to reboot my pc. is this the same thing they posted to? http://www.eclipse.org/eclipse4/ Jul 18 16:29:12 I stuck my device out of the window and the gps provider worked (onLocateChanged callback) Jul 18 16:29:26 So I'm going to do some work on a simple 2d puzzler style game (2d pieces, drag and drop etc). So what should I google? Is there enough handholding (hit/shape detection etc) to do opengl directly, or are there any libs I should look into. I do not want something that offer a full pipeline with weird languages etc, I would prefer something minial that plugs in with regular Android apps. Jul 18 16:30:37 I can do the googling myself ("android game engine"); I'm looking for advice from people who have used this stuff (if any). Jul 18 16:31:11 whats the difference btwn the eclipse SDK and eclipse Jul 18 16:31:15 or are they the same thing? Jul 18 16:31:52 csterling123, just guessing, but eclipse may refer to the IDE, the eclipse sdk maybe used to extend the IDE Jul 18 16:32:03 extend the IDE for android dev? Jul 18 16:32:25 the IDE, i'm just guessing Jul 18 16:37:23 Eclipse can also be a framework for other things, so the SDK may refer to something which uses the eclipse code as a basis for something else. But that's a guess. Jul 18 16:39:06 more likely they meant the 'traditional' Android SDK with eclipse, rather than the new Android Studio... but that's just a guess Jul 18 16:40:53 do I want to be using eclipse kepler? Jul 18 16:42:32 hello! can anyone here help me out with programming service? Jul 18 16:43:06 I am tyring to learn but its this is just not going in :P Jul 18 16:43:19 man what the hell has happened to me. i've downloaded eclipse 3 different times and each time i get errors. these problems werent happening yesterday! Jul 18 16:44:56 no one able to teach me/walk me through the steps? ;( *sad facing* Jul 18 16:45:20 sharpy-penguin: Sadly I haven't had a lot of experience with services Jul 18 16:45:21 :S Jul 18 16:45:30 :( Jul 18 16:45:56 that sucks, I just cant quite understand these turotials that dont explain the seperation of classes well enough so i dont know where i am coding it Jul 18 16:45:58 * Bleeptech is still learning to seperate Fragments from figments.. Jul 18 16:46:58 a Service is not a complicated thing... Jul 18 16:47:03 sharpy-penguin: seperation of what classes ? and what type of service ? Jul 18 16:48:21 Fragments are tricky Jul 18 16:48:23 sharpy-penguin, I was just reading about services today Jul 18 16:48:32 Every time I think I know the ins and outs of fragments, I learn something new Jul 18 16:48:37 they're incredibly useful though Jul 18 16:48:44 Who wants to answer a Fragments VS Java Classes question? Jul 18 16:48:50 and once you know how to use them effectively it's no more work to use a Fragment over an Activity Jul 18 16:49:02 Bleeptech: Go ahead and ask it, if anyone knows they'll probably chime in Jul 18 16:49:03 :P Jul 18 16:49:29 sharpy-penguin: so what is it you don't understand about Services? Jul 18 16:49:53 Bleeptech, what's the question, i'm interested Jul 18 16:50:41 I've got several headless classes for JSONParser, FileUpload, Etc.. No UI needed just need to trigger them in the background.. Should I leave them as classes of translate them to fragemnts? Jul 18 16:51:16 Fragments aren't meant to be used for non UI tasks, i believe Jul 18 16:51:29 s/s of t/s or t Jul 18 16:51:35 sulaiman: I dont think thats true Jul 18 16:51:49 you can very much use headless fragments Jul 18 16:51:58 and they can be very very useful Jul 18 16:51:59 i'd leave them as classes for abstraction. Jul 18 16:52:12 What StingRay_ Jul 18 16:52:15 sharpy-penguin: are you, in fact, listening at all, after asking for help? Jul 18 16:52:17 UIless fragments are actually really useful Jul 18 16:52:24 there are articles about the topic actually I believe Jul 18 16:52:30 I remember reading something about them Jul 18 16:52:37 I think they are also mentioned in the android dev guides Jul 18 16:53:14 ahh i wish this was colour coded Jul 18 16:53:22 i am istening Jul 18 16:53:32 sharpy-penguin: it would be, if you used an actual IRC client Jul 18 16:53:50 So I offered to help my friend learn Android on Facebook, now I have a group of like 15 people I'm going to be helping learn Android! So I'll probably introduce any that don't already use IRC to this channel and boost our population a bit :D Jul 18 16:54:11 Nah man, you should just charge them for courses Jul 18 16:54:24 ^ Jul 18 16:54:29 the issue i am having with services is just understanding the layout, wouldnt be able to help me leeds? Jul 18 16:54:41 sharpy-penguin: erm, Services don't have layout Jul 18 16:54:50 sorry Jul 18 16:54:53 i mean structure Jul 18 16:55:07 Nah Jul 18 16:55:07 as in the code layout and class layout not as in design sorry Jul 18 16:55:10 I wouldn't charge people Jul 18 16:55:20 I've only been developing Android for like a little over a year Jul 18 16:55:25 I don't think it's fair to charge to teach Jul 18 16:55:26 :P Jul 18 16:55:27 Brian|CB: Or at least institute a fine system for stupidity.. Procedes to benefit the '#android-dev Beer fund' :) Jul 18 16:55:29 oops, I just read about it in the guide, fragments can be used for background tasks Jul 18 16:55:36 sharpy-penguin: so you're having trouble understanding http://developer.android.com/guide/components/services.html then? Jul 18 16:55:38 mmmm beer fund Jul 18 16:55:38 Plus someone helped me learn for free, so I'm doing this to give back to my community Jul 18 16:55:50 shouldn't a service be used for such background behaviour? Jul 18 16:55:58 sulaiman: depends Jul 18 16:56:15 Brian|CB: Learning should be free.. Stupidity should be painfull. :) Jul 18 16:56:20 the correct answer is probably, "yes/no" Jul 18 16:57:04 Bleeptech: ++ Jul 18 16:57:14 Im drawing circles in a circle with for (int sixth=0; sixth <= 2*Math.PI; sixth+=(2*Math.PI)/6) { canvas.drawCircle( 10, cos(sixth), sin(sixth), paint); } BUT its drawing them counter clockwise... Why? Jul 18 16:57:16 I have read through that but being self taught it uses alot of technical language I do not understand lol, I am fairly good with android only been programming it since feb and once i get services down i can finally finish my gps program Jul 18 16:58:08 sharpy-penguin: if you ask specifics, people here I'm sure will help if they can Jul 18 16:58:37 sharpy-penguin, i'm also working on my first gps app! will be using services for it too Jul 18 16:58:47 but your problem is, your question "can someone teach me all about services?" Jul 18 16:58:50 I just read about on demand services today Jul 18 16:59:02 ok i will try my best to explain but keeping it short lol, im working on an parental app haha ;D Jul 18 16:59:09 you start them with intents, similar to an activity Jul 18 16:59:50 sulaiman: that statement is nor really true Jul 18 16:59:54 not* Jul 18 17:00:05 it's probably 33% true Jul 18 17:00:19 erm... I am fine with intent services, but I guess i am having trouble understanding bind mainly this line and how to use it properly "bindService(intent,null, Context.BIND_AUTO_CREATE);" Jul 18 17:00:33 http://paste.debian.net/16846/ Why are these circles going clockwise? circle[1] is below circle[0] Jul 18 17:00:41 counterclockwise* Jul 18 17:00:42 Sooo, the answer to my question about game engines is... LibGDX. Jul 18 17:01:17 StingRay_, don't you create an Intent with the service class name? and then pass it to startService() ? Jul 18 17:01:31 you can start it lots of ways Jul 18 17:01:59 oh, I haven't read enough about them yet Jul 18 17:02:28 by you above statement, everything is started from intents Jul 18 17:02:47 yeah, I should gain more knowledge before I try to answer questions :P Jul 18 17:02:47 startActivity etc, startService Jul 18 17:03:26 sulaiman: I've got a GPS java class that uses LocationManager.. Sound like what you're trying to do? Jul 18 17:03:59 sulaiman: You can do what I do and pick it to bit to see what makes it tick. Jul 18 17:04:06 bits Jul 18 17:05:21 lets assume I have my service all programmed correctly... am i putting it into the main activity? or in its own class file? im mainly confused on where I am starting the service and then my main point of the program? Jul 18 17:06:43 Bleeptech, yeah, I already wrote some code for it, I created a class that implements the LocationListener. I then used "requestLocationUpdates" on the location manager with my location listener and I am able to get the coordinates Jul 18 17:08:18 sharpy-penguin: I've been putting all the excess/background parts in class files.. Not sure if that's how it's supposed to work, but that's how I'm doing it. :) Jul 18 17:09:25 Bleeptech, Thanks lol clears one thing up, but how is your program starting do you have much experience with services? if you do I would like to ask you 101 questions Jul 18 17:09:27 lol Jul 18 17:10:41 I'm looking for a URL where I can read up on graphics scaling. I'm trying to make a basic game (for educational purposes) where I have 10x10 tiles and the images have a fixed size but I can't figure out how to calculate their size. ANyone got a good URL? Jul 18 17:10:52 sharpy-penguin: It goes Launch -> Login -> Upload -> Logout Jul 18 17:11:16 so is it an intentservice then ? Jul 18 17:11:26 Maffelu: What type of graphics scaling? As in screen density Android stuff? Or like Scaleble Vector Graphics Jul 18 17:11:29 Maffelu: Fixed size or one device or scaled? Jul 18 17:12:24 Oh right, screen density. It's just 2d PNG files Jul 18 17:13:02 Maffelu: What exactly are you looking to find out? Like how to make images show up properly on different densities? Jul 18 17:13:40 Brian|CB, Yea. I don't know if I should position them with pixels or DPI and how to set the size on them so it works on multiple screens Jul 18 17:13:46 DP not DPI Jul 18 17:14:05 sharpy-penguin: I dunno.. You'll have to look.. It's <60 lines. http://pastebin.com/FrZrEVQD Jul 18 17:14:11 Maffelu: if using bitmaps it wont, so maybe look at designing around it Jul 18 17:14:11 Maffelu: If you're trying to use high density devices, one of the best ways to get things to look right is to use BitmapFactory.Options(); when you load your bitmaps, and then set the options.inScaled = true; Jul 18 17:14:47 or do what Brian|CB says if you dont want crisp sharpe 1:1 pixels :) Jul 18 17:14:59 sharp* Jul 18 17:15:16 StingRay_: Yeah, I suppose my reccomendation was based on my general needs Jul 18 17:15:23 if you have more specific general needs, my suggestion isn't right Jul 18 17:15:25 Brian|CB, well it's small images and right now I'm just placing them in ImageViews in a gridlayout Jul 18 17:17:45 btw if anyone wants to look at my code and laugh at me ? and tell me what i need to do to correct my self... then please do http://pastebin.com/7FBWex4B Jul 18 17:18:04 ive made the function of it very simple to try and practice but im just getting confused Jul 18 17:18:56 sharpy-penguin: what's the issue? Jul 18 17:19:47 Is 0,0 at the top left in a canvas? Jul 18 17:19:55 marcab : I just dont know what I am doing in all honesty I know most of the code but not how to use it lol Jul 18 17:20:08 Miesco: Should be. Jul 18 17:20:27 if you look at the code its very short, it will just crash, and I dont know what to do to make it correct Jul 18 17:20:46 sharpy-penguin: Look at your error log. Jul 18 17:20:56 Bleeptech: speaks the truth Jul 18 17:21:52 sharpy-penguin: What OS are you on Windows, Mac or *nix? Jul 18 17:21:54 Miesco: Yeah, top left is (0,0) and bottom right is (width, height) Jul 18 17:22:05 bleeptech , nix :P Jul 18 17:22:12 Bleeptech * Jul 18 17:22:32 sharpy-penguin: fwiw, I usually do my bind/unbind calls in resume/pause, but I doubt that's the error you're seeing. Jul 18 17:22:32 sharpy-penguin: Google 'plogcat' Jul 18 17:23:30 marcab I will run it now to see the error but i just think its because I am rubbish with services i think im missing half the code for it to work (Bleeptech , i have eclipse for my errors) Jul 18 17:23:57 sharpy-penguin: so what's the error? Jul 18 17:24:35 Okay its a official, when I do canvas.drawCircle(340, 345, 10, paint), then canvas.drawCircle(289, 431, 10, paint), the 2nd circle is LOWER than the first... Jul 18 17:24:42 sharpy-penguin: Put that away or I'll swat you with my copy of kernel 0.96b.. On Floppies.. LOL Jul 18 17:24:52 erm what one should i list ? :P Jul 18 17:26:03 oh I see whats wrong Jul 18 17:26:16 Im thinking 0,0 is at bottom left :/ Jul 18 17:27:09 07-18 18:26:05.545: E/AndroidRuntime(6106): at dalvik.system.NativeStart.main(Native Method) Jul 18 17:27:51 in general its just null pointers Jul 18 17:28:15 I was thinking in cartesian coordinates : Jul 18 17:28:21 sharpy-penguin: Sounds like it's not happy at all.. Is there a line with 'FATAL'? Jul 18 17:29:00 Bleeptech : fatal exception main lol doesnt even get off the ground Jul 18 17:29:17 sharpy-penguin: you just get null pointers ? Jul 18 17:29:24 you know what they are ? Jul 18 17:29:48 sharpy-penguin: Quick qeustion.. Did you update Eclipse recently? Jul 18 17:30:10 no my eclipse is ancient Jul 18 17:30:31 helios B) Jul 18 17:31:14 there are lot of errors ... message dispatcher... lots to do with handler Jul 18 17:31:40 Man thats confusing when doing math on the canvas as the Y axis is reversed from the cartesian coordinate system Jul 18 17:32:05 ive i have never struggled this much trouble coding before... I dont get why i am just not understanding services, getting so angry im sweating buckets Jul 18 17:32:08 Miesco: You get used to it Jul 18 17:32:09 lol Jul 18 17:32:18 I <3 the Canvas Jul 18 17:32:32 I've done more cool shit involving the Android and HTML5 Canvases in the past two months than I have done in my whole life Jul 18 17:32:58 can you replace the text in a listview item and see it without using invalidate? Jul 18 17:33:09 assuming it is still on screen Jul 18 17:33:41 jeppy: I think so, invalidate is just for Drawables I thought Jul 18 17:34:56 Brian|CB: What if im using cos() and sin() Jul 18 17:35:09 Brian|CB: The whole image will be flipped upside down Jul 18 17:35:25 Miesco: Just use some basic properties of trig Jul 18 17:35:35 like changing the angle by a factor of 90 degrees(pi/2 radians) Jul 18 17:36:23 Brian|CB: I guess I could make a function to convert the Y coordinates to cartesian like: cartesianY(50) Jul 18 17:36:47 Miesco: Thats what I meant by getting used to it Jul 18 17:36:55 int cartesianY(int y) { return height-y; } Jul 18 17:36:58 it may take some thinking to understand how to transform your math to fit the system Jul 18 17:36:59 but you learn Jul 18 17:37:08 Okay Jul 18 17:37:23 sharpy-penguin: Here's a thought to cheer you up.. I'm sitting here looking at my first Linux CD sets.. Jul 18 17:37:46 :O OLLDDD Jul 18 17:38:15 * Bleeptech is looking at the WGS copies of the TSX-11 and Sunsite archives from the mid 90's Jul 18 17:42:21 sharpy-penguin: Finally had to slot a disk to get a file datestamp.. TSX-11 is from 06/06/96.. LOL.. Jul 18 17:42:58 is it running at the speed of snails? Jul 18 17:43:31 Curse you bitmaps and your memory efficiency or rather lack thereof. Jul 18 17:43:55 sharpy-penguin: Actually since its for a 386 it should scream in a VM on new hardware.. Jul 18 17:48:28 i have a DialogFragment. i call .show(getFragmentManager()) and then close it. if i do something like start the camera the fragment gets shown again when the camera activity closes. any ideas on how to prevent this behavior? Jul 18 17:55:34 classic eclipse, can't open workspace Jul 18 17:55:35 GG WP Jul 18 17:56:40 For loading lots of images from resources, would having a disk cache help, or would just a memory cache suffice? Jul 18 17:57:20 you can't have a memory cache of images Jul 18 17:58:01 Isn't this using a memory cache for bitmaps https://developer.android.com/training/displaying-bitmaps/cache-bitmap.html Jul 18 17:58:48 you'll quickly run out of ram Jul 18 17:59:36 Displaying it in a viewTHat's why it limits the memory cache size Jul 18 17:59:40 *whoops Jul 18 17:59:54 *That's why it limits the max size Jul 18 18:00:39 and depending on how many images you want loaded, it may be mostly unusable Jul 18 18:00:46 or, rather, mostly useless Jul 18 18:01:32 Used it in my app and saw definite performance improvement Jul 18 18:02:55 hehe /r/Android organizing giveaways Jul 18 18:03:10 ok I know I am a loser but at least, trying luck isn't harmful Jul 18 18:09:01 Hello guys, I just have a question. If I'm doing freelance app developing, the person asking for the service is the one to pay for the app fees for each store right? Jul 18 18:10:06 I think thats a business decision Jul 18 18:10:12 rather than a development one Jul 18 18:10:22 You're arguing over $5? Jul 18 18:10:30 I would think it's more of a control issue.. Jul 18 18:11:05 Is there anything like twitter boostrap for android guis? Jul 18 18:11:24 Google "android bootstrap" Jul 18 18:11:27 bleeptech , what client is best for linux if i want to have this running on my desktop ? Jul 18 18:12:04 sharpy-penguin: ?? What client for what? Jul 18 18:12:23 well im webbased for this irc at the momment Jul 18 18:12:50 Oh.. I'm using kvirc. Jul 18 18:13:06 that on nix? Jul 18 18:13:14 weechat here (linux, terminal) Jul 18 18:13:29 sharpy-penguin: Yeah, What distro are you on? Jul 18 18:13:42 Bleeptech dont wana say ;( you will laugh at me ;( Jul 18 18:14:26 sharpy-penguin: Man.. Are you on Redhat-9? LOL.. Jul 18 18:14:56 Bleeptech: *mumble mumble* ubu...*mummble mummble* tu Jul 18 18:15:18 sharpy-penguin: Oh, OK.. Debian base.. Jul 18 18:15:23 ;D lol Jul 18 18:15:28 ubutu, must be something new? ;-) Jul 18 18:15:39 ubuntu ;D haha Jul 18 18:15:52 yes deb :P Jul 18 18:15:58 Fedora 17 here. Jul 18 18:16:00 kjeldahl: I saw android bootstrap but that doesnt look like it's gui stuff. more like nice stuff for my application. Am I wrong? Jul 18 18:16:07 I'm sure lots of people here is. I'm on Ubuntu 13.04. Jul 18 18:16:29 Bleeptech, 17? Jul 18 18:16:34 13.04 isnt LTS is it ? Jul 18 18:16:41 actually, yeah, do NOT upgrade to 18 Jul 18 18:16:48 I was an avid Fedora fan until 18 Jul 18 18:16:50 it was unstable as hell Jul 18 18:16:53 switched to Ubuntu Jul 18 18:17:37 narekb: Sounds like me and Eclipse till the last update.. LOL Jul 18 18:17:53 tomeo: Well, it looks decently styled, should provide a great starting point. Unless you're looking for themes or prototype gfx, which I can't help you with. Jul 18 18:17:56 haha Jul 18 18:18:13 sharpy-penguin: https://launchpad.net/ubuntu/+source/kvirc Jul 18 18:18:27 Bleeptech : just installed it ;D haha Jul 18 18:18:44 ubuntu has an easy install software centre now :P Jul 18 18:19:01 * Bleeptech likes yum... Jul 18 18:19:44 pacman -Syu Jul 18 18:28:28 anddd im back in chatty thing B) yea Jul 18 18:29:07 If one has experience in C, JavaScript, Python and a healthy bit of other languages would it be possible to just jump right into Android development? Or do I have to read up on Java? Jul 18 18:31:08 if you have /good/ experience, you can just jump in Jul 18 18:31:10 a little bit I'm sure. but mostly it's a problem of getting familiar with the pecularities of getting a program to run on android ^^ Jul 18 18:31:18 thanks kjeldahl Jul 18 18:31:32 atm I am fighting more with android studio than with android development (coming from c#) Jul 18 18:31:54 pfn: How good is that? Jul 18 18:32:05 if you live and breath c, javascript and python Jul 18 18:32:10 then you can probably jump in pretty sfaely Jul 18 18:32:13 if you don't, then learn java well Jul 18 18:32:42 well, C++ would be better than C Jul 18 18:33:00 I also know a bit of C++ Jul 18 18:33:09 And javascript will loosly transfer Jul 18 18:33:18 loosly Jul 18 18:33:34 I don't know if I live and breathe the languages. But I've been hobby programming in these languages on and off for 5 years. Jul 18 18:33:48 capella? loosly isnt even the right word haha ... they dont relate in anyway the syntax isnt even simular Jul 18 18:34:22 yah and one is runtime versus compile time etc... but theres concepts of classes / objects Jul 18 18:34:24 so againh... loosly Jul 18 18:35:10 psldepind : perl should be enough to get you started Jul 18 18:35:20 sharpy-penguin: Well, I think the syntax is pretty similar. They both look a lot like C/C++. JavaScript also has syntax that's only there to make it look like Java - the new operator etc. Jul 18 18:35:23 Though the JS coders I work with tend to "think" in odd ways ... can''t describe it but there is a code style difference / approach Jul 18 18:35:45 I hate JS Jul 18 18:35:50 with a passion Jul 18 18:36:18 It has first order functions and closures. Java doesn't. Jul 18 18:36:26 watch it, i live & breathe js ;) Jul 18 18:36:27 definitely less typing, less grasp of parallel programming in js Jul 18 18:36:35 * marcab recently moved from js Jul 18 18:36:38 But there's a lot of garbage in it definitely. Jul 18 18:36:52 PHP to java was easy enough for me .. and i think android is to much of its own language for you to need to go to java first Jul 18 18:36:55 but it helps obviously Jul 18 18:37:46 sharpy-penguin, still, all that class, OOP stuff needs to be learnt first Jul 18 18:37:59 but you are right about Android SDK being like a separate language Jul 18 18:38:02 knowing java well is very important if you want to be a good android developer Jul 18 18:38:18 sharpy-penguin: I'm working my way trough Android documentation and so far it's going well. But I'm afraid I might get trapped by Java oddities later on. Jul 18 18:38:25 narebk : yes deffo agree, but you would learn all that starting at android basics anyway lol :P Jul 18 18:38:53 well, I think that applies to every platform Jul 18 18:39:01 when I was a noob a few years ago Jul 18 18:39:07 I wanted to start with Windows API Jul 18 18:39:12 narekb: Well, OOP is no stranger to me. I've also toyed with Ruby and Smalltalk. Jul 18 18:39:14 (for C++) Jul 18 18:39:22 paldepind, ahh wlel Jul 18 18:39:53 narekb i wanted to start wth C based languages lol ... i soon changed very quickly Jul 18 18:39:55 there are no java oddities Jul 18 18:39:58 it's all straightforward Jul 18 18:40:24 paldepind, surely you must be familuar with the OOP concept and calling classes and passing data? Jul 18 18:40:28 pfn: That sounds nice. Jul 18 18:40:32 setters and getters? Jul 18 18:40:34 pfn: There are java oddities.. They're called programmers.. LOL.. Jul 18 18:41:26 sharpy-penguin: Sure. I know what that is. Jul 18 18:42:03 if you dont have much experience with OOP then I would suggest maybe java first then just to practice a bit, because android Jul 18 18:42:05 imho, understanding programing concepts (OOP, threading, architecture, etc) is really the only crucial element.. languages come quick Jul 18 18:42:07 oop can be a douche Jul 18 18:42:21 sharpy-penguin, C++ was my entry into programming Jul 18 18:42:22 oop in android* Jul 18 18:42:31 I have always dreamed to have a mobile platform to develop for Jul 18 18:42:34 then I get an Android phone Jul 18 18:42:45 I go crazy, but soon realize this phone is utter c**p Jul 18 18:42:59 haha hwat phone ? Jul 18 18:43:17 ZTE Racer Jul 18 18:43:21 :'( Jul 18 18:43:22 wth is that Jul 18 18:43:25 lol Jul 18 18:43:26 exactly! Jul 18 18:43:43 it was a nice entry level "phone" to get me into Android Jul 18 18:43:44 IIRC ZTE is Chinese.. Jul 18 18:43:48 yes it is Jul 18 18:43:52 but ZTE has some awesome phones Jul 18 18:43:54 I dropped my GS3 last week ;( need to get a new one ;( im so sad Jul 18 18:43:59 Racer is probably the s**ttiest Jul 18 18:44:04 sharpy-penguin, considered Nexus? Jul 18 18:44:23 well i was thinking about getting a nexus tab :P Jul 18 18:44:37 * Bleeptech is playing with Moto and Samsung devices. Jul 18 18:44:45 Nexus 4 is an epic device Jul 18 18:44:48 I want one so badly Jul 18 18:44:56 but im going to claim on insurence to replace my GS3 cause its just a cracked screen but i can replace whole thing Jul 18 18:44:58 I am considering getting into phone reviewing for that Jul 18 18:45:05 I can write some good stuff for some good phones Jul 18 18:46:31 I realise all my languages and OSes are open source... does this make me hip and anti-establishment? or cheap ? Jul 18 18:46:41 heh, I'm hoping to steal my friend's sgs4 google edition :D Jul 18 18:46:46 sharpy-penguin, socialist :D Jul 18 18:46:47 :O Jul 18 18:46:55 deleet, WHAT?! Jul 18 18:46:59 I hope you are not serious Jul 18 18:47:06 I want it :o Jul 18 18:47:15 steal as in, 'permanently borrow' Jul 18 18:47:32 he doesn't really use it anyway, it's sitting on his desk for 5 weeks now Jul 18 18:47:33 WTH Jul 18 18:47:39 deleet, Omg Jul 18 18:47:42 can he send it to me? ;) Jul 18 18:47:44 I don't think it's even charged lol Jul 18 18:47:47 nah, I'm first Jul 18 18:47:51 :( Jul 18 18:47:56 I still run with the galaxy nexus Jul 18 18:47:56 he has insulted my honour ;( Jul 18 18:48:04 deleet, Gnex is deop Jul 18 18:48:05 (dope Jul 18 18:48:09 I would dream of having it Jul 18 18:48:14 it is but I want moar Jul 18 18:48:31 deleet, steal the GS4 and send the gnex to me ;) Jul 18 18:48:33 deleet: Just copy the front of it and glue the copy to a box of Junior Mints.. LOL.. Jul 18 18:48:39 I hope no one's first there :D Jul 18 18:48:41 gnex is company's tho :/ Jul 18 18:48:47 DAMMIT! Jul 18 18:48:58 Bleeptech: the thought has occured to me .. Jul 18 18:49:07 i find doing all this android work more stressful then my physical trainning ... code makes me angry when it does not work ;D Jul 18 18:49:09 ;D * Jul 18 18:49:22 * Bleeptech is looking at the specs for http://arstechnica.com/information-technology/2013/07/99-arm-based-pc-runs-either-ubuntu-or-android/ Jul 18 18:49:50 I wish intel launched a real mobile cpu already, not something clocked down to hell Jul 18 18:50:08 whats wrong with intel atom ;D Jul 18 18:50:11 because I have the razr i and this shit is fast already.. but the phone isnt great Jul 18 18:50:18 if you want a micro processor go snap dragooon Jul 18 18:50:30 mobile* Jul 18 18:50:32 that's arm tho, x86 trumps arm for just about everything Jul 18 18:50:32 processor Jul 18 18:51:57 deleet: Depends on what you're doing.. Why buy a Ferarri when you need a wheelbarrow? Jul 18 18:52:44 because i dont need to push a ferrari to get my work done Jul 18 18:53:06 also no chicks what to bang you when you get a wheel barrow Jul 18 18:53:10 want to* Jul 18 18:53:10 deleet: not sure how well it works on a building site Jul 18 18:53:14 I'm doing vm's within a dalvik vm :D Jul 18 18:53:30 Keeping in mind that it's cheaper to detail the wheelbarrow than the Ferarri especially after hauling a load of manure.. LOL Jul 18 18:53:44 but a smart man convinces the ladies his wheel barrow is a ferarri Jul 18 18:53:47 >_> Jul 18 18:54:13 smart man and dumb ladies is required for that to work Jul 18 18:54:23 sharpy-penguin: Toss in a cusion and offer them a ride. :) Jul 18 18:55:23 Bleeptech : rather charge them for use of a cusion Jul 18 18:55:25 lol Jul 18 18:55:30 im cheap >< Jul 18 18:57:50 brb got to code a bit...and ungroup my boxers from the small space they have just occupided up my bum. Jul 18 18:59:34 ROFL @ sharpy-penguin.... Jul 18 19:00:33 Hmm. So I have been unable to find any refernces to my view, but it don't leave memory D: Jul 18 19:01:34 how do you know it don't leave memory Jul 18 19:02:15 clearly there are references Jul 18 19:02:29 Brian|CB: findViewById(R.id.WhereTheHellDidItGo) ? Jul 18 19:06:17 Brian|CB: nulled and you see that GC run ? Jul 18 19:13:26 Does anyone know if there is a non-negligeable benefit to using a property animator vs AlphaAnimation? Jul 18 19:14:40 "The view animation system, however, takes less time to setup and requires less code to write. If view animation accomplishes everything that you need to do, or if your existing code already works the way you want, there is no need to use the property animation system. It also might make sense to use both animation systems for different situations if the use case arises." Jul 18 19:14:56 Assuming that's correct I guess, since its from the docs... :-\ Jul 18 19:20:36 this is bizarre. I have an AsyncTask that I'm running execute() on, and the onPreExecute starts, and finishes, but the doInBackground doesn't start. :( Jul 18 19:31:40 I have a scope issue. I have a custom class Im using inside of a called activity. That activity creates its view from a SurfaceView class I extended (implementing runnable). Inside of the run function of the object (to draw) I need some location data thats global to the Activity that created the View. how can i access that data? Jul 18 19:35:23 man, I feel like a tool, it just dawned on me to change the constructor to pass an array of the class type in Jul 18 19:35:26 *groan* Jul 18 19:35:42 why does surfaceview and imageview given the same bitmap render them at different quality? Jul 18 19:37:30 harw386: I dont know, but quality is a very, broad term…. maybe AA ? Jul 18 19:38:29 how can I update the textview of a listview item without a reference to the listview? Jul 18 19:38:31 I just updated my Android Studio and now I am getting a "Could not find any version that matches com.android.support:support-v4:13.0" when I start a new project Jul 18 19:39:03 i can change the string that is in the view, but setText wont be called until getView is called again Jul 18 19:39:05 Googling around suggests that I need to change something in the SDK manager, but how do I access the SDK manager? Jul 18 19:39:52 Fervicus: the button in the main tool bar Jul 18 19:40:04 when its in surfaceview it looks like 32 bit colors, when its in Imageview it loooks like 16 bit colors Jul 18 19:40:19 would a weak reference to the view be ok? i'll figure out if it's on screen or not Jul 18 19:40:24 StingRay_: But since I get the error, I can't even open the IDE Jul 18 19:40:31 oh, sh*t Jul 18 19:40:33 nice Jul 18 19:40:40 well you can run it from cmd line Jul 18 19:40:45 it throws me back to the welcome screen Jul 18 19:40:50 StingRay_: How do I do that? Jul 18 19:40:50 tis in ../tools or something Jul 18 19:40:57 have a look Jul 18 19:43:20 StingRay_: It says "On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory" Jul 18 19:43:24 I don't see any such exe Jul 18 19:44:00 Oh wait, spoke too soon Jul 18 19:44:06 Fervicus: ya Jul 18 19:46:54 StingRay_: I run it and I get a Failed to execute error Jul 18 19:47:01 tools\android.bat not found Jul 18 19:49:54 i draw stuff on a canvas and pass it to surfaceview and imageview but when drawn they dont look the same, is there a way to make them render the same image to look identical? Jul 18 20:00:55 ok, now im at a snag. I need to use getApplication to get some global data I stored in my application class from within a surfaceView class, but the method is not accessible. How can i break scope here? Jul 18 20:01:48 kamui: strongly reconsider whether you want to use your Application class as a God class. Jul 18 20:02:45 Trying to run proguard on my game, that has Greystripe ads. Complains that it can't find android.webkit.JavascriptInterface. Googled for half an hour, and finding examples of people having the same problem, but no solution. Jul 18 20:02:47 lov: its storing only some image (icons) data that I dont want to keep reloading, do you suggest making a completely standalone class and then passing it in? Jul 18 20:03:34 i guess if Im going to have to pass all these additional varables in, it doesn't make much of a difference, other than to horribly complicate my view subclass Jul 18 20:05:40 Is calling adapter.notifyDataSetChanged() every 200ms or so too much?? I am trying to show live data in a listview but am having trouble updating only the required view(s). Jul 18 20:06:51 I cant really get a reference to them without each item storing the view it uses from getView(). Jul 18 20:07:23 s/them/the textviews Jul 18 20:08:30 jeppy: isn't the item tied already tied to the view that it uses via the position? Jul 18 20:09:29 yeah, calling adapter.getItem(position) should get you the view Jul 18 20:09:33 is imageView anti alias by default? Jul 18 20:10:05 i dont have a reference to the listview Jul 18 20:10:48 harw386: dont think so Jul 18 20:10:51 i think i have to move some functionality to the fragment with the list Jul 18 20:11:41 so your adapter is updating itself? Jul 18 20:12:15 I call it manually the first time Jul 18 20:12:17 does anyone know why im getting this error? Description Resource Path Location Type The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, StartFragment) MainActivity.java Jul 18 20:12:22 java - http://pastebin.com/ZQ4kK053 Jul 18 20:12:27 xml - http://pastebin.com/BFThstaP Jul 18 20:12:36 if I understand correctly you have a separate thread or something that is dealing with the data, and you want it reflected on your listview (which isnt accessible from this thread), right? Jul 18 20:12:53 csterling123: a miss match of imports Jul 18 20:13:02 it's the ui thread Jul 18 20:13:07 mr_lou: add these two lines your your proguard config -keep class com.greystripe.sdk.** { *; } -keep interface com.greystripe.sdk.** { *; } Jul 18 20:13:12 (well for this instance) Jul 18 20:13:15 StingRay_: thanks...what do you mean? Jul 18 20:13:35 csterling123: I mean you cant use native and support like that Jul 18 20:13:39 pick one :) Jul 18 20:13:51 sorry, i dont understand Jul 18 20:14:05 i have been following a video tutorial Jul 18 20:14:10 in android studio, anyone know the keyboard shortcut to autofill a method with the description parameters so i can replace them with my own? Jul 18 20:14:21 tutorials ftl, cargo culting is a surefire recipe for failure Jul 18 20:14:28 csterling123: android.support.* VS android.app.Frag* Jul 18 20:14:53 oh i see. whats the difference? Jul 18 20:15:15 http://developer.android.com/reference/android/support/v4/app/package-summary.html Jul 18 20:15:23 http://developer.android.com/tools/extras/support-library.html Jul 18 20:15:27 jeppy: it sounds to me like your forgetting about Adapter#getItemId() Jul 18 20:15:29 jeppy: why dont you save a reference to the adapter on a common/accessible place? like on AppContext or ActivityContext or global or something Jul 18 20:15:37 then when the data changes you can call adapter.notifyDatasetChanged()... Jul 18 20:15:53 StingRay_: so should I not use the support and use android.app.FragmentManager instead? Jul 18 20:16:07 up to you, but you dont want both Jul 18 20:16:13 okay Jul 18 20:16:15 rottz: are you series? Jul 18 20:16:18 serious Jul 18 20:16:23 dont do that Jul 18 20:16:28 so i changed it to android.app.fragmentmanager Jul 18 20:16:31 but still error... Jul 18 20:17:16 use android.app.Fragment* only if you're supporting 3.0+ Jul 18 20:17:19 and not 2.3 Jul 18 20:17:36 why not? Jul 18 20:17:37 im developing for 4.2 Jul 18 20:17:52 so you're not supporting anything before 4.2? Jul 18 20:18:00 csterling123: pastebin activity code and exception Jul 18 20:18:03 its only to be used internally Jul 18 20:18:06 ok Jul 18 20:18:08 rottz, napalm, I think I've got a way to tie the items back to the adapter. sorry for the confusion. Jul 18 20:18:11 by my company, on one tablet Jul 18 20:18:29 jeppy: yea, its called a Loader Jul 18 20:19:30 Napalm, maybe but the problem seems to have been fabricated in my head now Jul 18 20:19:32 http://pastebin.com/69Suanqt Jul 18 20:19:39 the exception is at the bottom Jul 18 20:20:13 StartFragment <--- Jul 18 20:20:24 u sure it's not using support* ? Jul 18 20:20:35 Are AVDs now stored in the SDK directory rather than $HOME? Jul 18 20:20:38 I've been up all night and my brain is mush Jul 18 20:20:52 Mine got created there for some reason and the tools seem to find them their naturally... Jul 18 20:20:52 i just copied the code into the pastebin for you man, idk im looking at exactly that code you see Jul 18 20:21:24 how would i know if its using support* or not? Jul 18 20:21:26 csterling123: StartFragment <---- this is a fragment right ? Jul 18 20:21:39 it extends Fragment Jul 18 20:21:52 is that Fragment from app.* or support.* ? Jul 18 20:22:00 oh, um, idk Jul 18 20:22:47 hence why ya not really solving this too quicklly Jul 18 20:22:51 :) Jul 18 20:23:28 :) Jul 18 20:23:40 im struggling with this android thing Jul 18 20:24:29 how would i know what the fragment is from? app.* or support.8 ? Jul 18 20:24:32 .* Jul 18 20:24:45 do you know java ? Jul 18 20:25:02 instanceof Jul 18 20:25:03 i did the lynda.com intro to java course :) Jul 18 20:25:15 then i did their intro to android Jul 18 20:25:43 is there a simple mechanism to send an apk to a client for them to install without adb and without an app store? Jul 18 20:25:52 i know python, so programming isnt new to me. just java is Jul 18 20:25:57 csterling123: are you sure you didn't skip something ? Jul 18 20:26:08 well you know when you extend a class in python ? Jul 18 20:26:12 yeah Jul 18 20:26:37 ? Jul 18 20:26:38 you import that class ? using the full class path ? Jul 18 20:26:41 be nice, not knowing the correct package for a class is not a Java-knowledge problem, but a specific SDK problem Jul 18 20:26:47 vorsorken: send them a link to the APK hosted online and it will ask them to enable "unknown sources" to install it Jul 18 20:27:18 no? Jul 18 20:27:19 if there are 2 versions of the same class in different packages, it's not his fault he doesnt know (hell, I dont know also which is the "correct" Fragment) Jul 18 20:27:21 fragment class exists in 2 locations … I think you will be using the support location in that fragment Jul 18 20:27:25 Napalm: ok thanks Jul 18 20:27:35 no ? Jul 18 20:27:58 like import something.math.* in python gets you maths class methods ? Jul 18 20:28:14 yeah man Jul 18 20:28:32 but import somethingelse.math.* gets you a class with methods, but it's a different class Jul 18 20:28:34 sorry, misunderstood what you meant by full class path Jul 18 20:29:02 so in your fragment, you're probably using android.support* Jul 18 20:29:07 yeah so your point is that there are two frag classes Jul 18 20:29:21 developers, I got another question, anyone used the FB app chat in Android? Jul 18 20:29:22 and im importing the wrong one? or one that conflicts with others i am importing? Jul 18 20:29:26 as in your extending the fragment from the support lib Jul 18 20:29:34 whne you switch to other apps, it shows the profile pic of your friend with a badge Jul 18 20:29:37 how is that done? Jul 18 20:30:10 so you're saying im extending the frag from the support lib with android.app.Fragment and android.app.FragmentManager ? Jul 18 20:30:56 csterling123: the class that your using in the fragment that your passing to native transactionManager is maybe extending fragment from the support lib Jul 18 20:31:01 not native Jul 18 20:31:10 am i going to get chased out if i ask a java question in here? Jul 18 20:31:31 For anybody that's going to start some localization stuff, check out http://www.illustr.us/ Jul 18 20:31:35 my mate its building this site. Jul 18 20:32:05 how would it be extending that from the support lib if i dont import it? can it do that? Jul 18 20:32:20 csterling123: oh you checked ? Jul 18 20:32:37 i thought just by changing the import line it would be enough to change it? Jul 18 20:32:56 well yes it would Jul 18 20:33:05 okay, because i did that at least Jul 18 20:33:06 :) Jul 18 20:33:14 in the fragment class ? Jul 18 20:33:17 What OEM driver do I need to test my app on my nexus 4 phone? Jul 18 20:34:06 hehe Jul 18 20:34:09 oopsies Jul 18 20:34:13 :) Jul 18 20:34:19 got there in the end Jul 18 20:34:26 thanks for your patience brother, i really appreciate it Jul 18 20:34:32 np Jul 18 20:34:57 im sure you were born with this knowledge, but some of us havent been as gifted :P Jul 18 20:35:07 I'm not even a programmer Jul 18 20:35:11 haha Jul 18 20:35:13 damn you Jul 18 20:35:21 but really, thanks Jul 18 20:35:24 and I'm very maths deficient too Jul 18 20:35:28 :) Jul 18 20:35:46 can't stand numbers Jul 18 20:36:01 so why do you hang out in the android-dev if you're not a programmer :P Jul 18 20:36:43 StingRay_: Did you figure out the sqlite problem, and what was it if so? Jul 18 20:36:58 StingRay_, you're not a programmer? Jul 18 20:37:00 designer? Jul 18 20:40:09 Can anyone help me getting my app running on my device? Jul 18 20:40:48 Fervicus what do you need? Jul 18 20:40:51 What would cause daemonsu zombies? Jul 18 20:41:11 rottz: I just got android studio running, wrote a hello world. Now I want to run it on my nexus 4 Jul 18 20:41:45 rottz: I enabled developer mode on the phone, plugged in the device and I get an error saying failed to install driver Jul 18 20:42:16 uhmmm Jul 18 20:42:36 you have to use the USB drivers provided on the SDK, did you do that? Jul 18 20:42:48 or did you let the OS pick the driver? Jul 18 20:43:18 rottz: I just plugged the phone in and windows did its driver installation thing and failed Jul 18 20:43:33 rottz: Where are the SDK drivers located? Jul 18 20:43:35 i need to draw some basic bounding boxes on a video stream. i am reading this: http://developer.android.com/training/graphics/opengl/environment.html i am already doing setContentView(R.layout.my_activity) Jul 18 20:43:36 well not a real programmer, zero apps released, but as an artist, lots of films,tv,vfx,console games etc… so until my apps goes up, not an android dev really Jul 18 20:43:58 how do i 'roll in' a GLSurfaceView onto that so i can draw? Jul 18 20:44:04 is there some trick to getting a button in xml to call a method in a java file? Jul 18 20:44:19 ok, you have to go to the device manager, find your phone there, double click, then click somewhere to change the drivers, "with disk", then navigate to the folder with the driver (I will check the folder and paste here in a sec) Jul 18 20:44:35 Is there any way to go to lockscreen without using Device Policy Manager Jul 18 20:44:52 like i have a method in the java Jul 18 20:44:55 onButtonClick() Jul 18 20:45:03 and in the xml, in the button Jul 18 20:45:16 android:onClick="onButtonClick()" Jul 18 20:45:27 Fervicus \sdk\extras\google\usb_driver Jul 18 20:45:28 but when i run the app it crashes saying it cant find the method Jul 18 20:45:55 Fervicus but before that you have to download the USB drivers using the SDK Manager, its on Extras on the bottom of the list Jul 18 20:48:00 csterling123: it expects the signature to accept a View as the argument Jul 18 20:48:06 so you need onButtonClick(View v) Jul 18 20:48:20 rottz: Okay. Thanks got it. Jul 18 20:48:23 oh, gradle 0.5.2 plugin is out Jul 18 20:48:31 alternately, use ((Button)findViewById(R.id.whatever)).setOnClickListener() { new OnClickListener() { onClick(View v) { ... } } }); Jul 18 20:48:36 lets say that i have a view already as an arg Jul 18 20:48:55 then you need to check your spelling, and maybe pastebin your code/layout Jul 18 20:49:10 anybody know why around 0.5 the syntax "0.5.0+" was recommended for the dep version qualifier? was it a gradle issue ? Jul 18 20:49:29 I don't think it's a gradle issue, per se Jul 18 20:49:41 Fervicus np Jul 18 20:50:07 g00s: http://pastebin.com/pt3NqjAK Jul 18 20:50:11 oops Jul 18 20:50:12 i mean Jul 18 20:50:14 lov: http://pastebin.com/pt3NqjAK Jul 18 20:50:16 rottz: Now when I click Run App, my device shows up in the list but it says [offline] Jul 18 20:50:23 http://pastebin.com/qnpCEX2u Jul 18 20:50:31 csterling123 huh? wut am i lookingat Jul 18 20:50:38 oh Jul 18 20:50:40 g00s: sorry Jul 18 20:50:44 wrong guy :) Jul 18 20:50:57 csterling123: make it public void Jul 18 20:50:58 not private Jul 18 20:51:03 again, method signature. Jul 18 20:51:10 derp Jul 18 20:51:11 thx Jul 18 20:51:13 np Jul 18 20:51:44 rottz: nevermind, phone had a permission pop up that I didn't see Jul 18 20:51:57 awesome, super many thx to you Jul 18 20:52:14 oh, ok, I wouldnt remember about that step Jul 18 20:52:30 man i hate this cards stuff on google+ Jul 18 20:52:40 How can i lock screen without using Device Admin Policy Manager Jul 18 20:52:43 boxes everywhere ! Jul 18 20:52:45 boxes! Jul 18 20:53:10 Manavan: press the power button on the side of the device Jul 18 20:53:32 funny Jul 18 20:53:37 accurate Jul 18 20:53:53 I have broken the power button Jul 18 20:54:55 you should get the phone repaired then Jul 18 20:55:03 alternately, set the screen timeout to like 15 seconds Jul 18 20:55:27 <_ForestJ> hello-- can someone help explain what might have happened in this situation? Jul 18 20:55:54 <_ForestJ> • created a project with some activities, added them to AndroidManifest.xml, I can launch them Jul 18 20:56:23 <_ForestJ> • cloned project from github on another computer, same os, same eclipse, set everything up just like it was Jul 18 20:56:54 <_ForestJ> • got android.content.ActivityNotFoundException when trying to launch an activity Jul 18 20:57:24 <_ForestJ> is there some way to, say, force eclipse to reload AndroidManifest or something ? Jul 18 20:58:06 is there a way to add a network using WifiManager or ConnectivityManager that shouldn't be used as a way to the internet? like for a game creating a local wifi net, but leave the device still able to use mobile for internet access? Jul 18 20:58:37 can i naively just draw on top of a SurfaceView that is displaying a camera preview? Jul 18 20:59:21 basically what i want to do is use an asynctask to take a snapshot, send it to an external server that will process it and return some meta info, then i want to draw on top of the camera to display that metainfo Jul 18 20:59:50 in the simplest case, i would take a pic, send it to the server, it would send me back 2 sets of coordinates which represent a rectangle Jul 18 20:59:54 what happens when that process takes a few minutes ? Jul 18 20:59:57 \and then i would draw that rectangle Jul 18 21:00:14 bankai_: me? nothing.. it just displays whenever it is done Jul 18 21:00:28 at least for now Jul 18 21:00:44 if it takes 2 minutes to get the response, then i wo uld want it to just display the rectangle 2 minutes later Jul 18 21:06:38 how do i disable bilinear filtration of an imageView? Jul 18 21:11:40 harw386: good question, but thats a filter scale type, what would you use other than that ? pixel binning (nearest neighbour) ? Jul 18 21:12:00 harw386: get the paint for the drawable and set filtering to false Jul 18 21:12:11 with hardware acceleration this will work only starting with 4.1 Jul 18 21:12:24 prior to 4.1, filtering is always enabled with hw acceleration on Jul 18 21:16:59 Hi. What's the best way to develop Android applications? Jul 18 21:17:11 by writing cose Jul 18 21:17:12 code Jul 18 21:17:14 can i use onTouch and onLongClickListener in the same View? Jul 18 21:17:30 Zharf: pray tell, in chat language? Jul 18 21:17:47 s/chat/what/ Jul 18 21:18:38 java usually Jul 18 21:19:13 How reasonable is it to develop apps in C or C++? Jul 18 21:19:44 why would you ? Jul 18 21:19:50 romainguy quick q; do you know if Lr 5 brought any improvements to the raw processor? seems mostly like small features to me Jul 18 21:20:16 I didn't see any big difference Jul 18 21:20:19 aside from all the new features of course Jul 18 21:20:29 romainguy do you like it ? Jul 18 21:20:35 yes I do Jul 18 21:20:41 :) Jul 18 21:21:16 it is very noticably faster on my system Jul 18 21:21:48 bankai_: better performance perhaps? Jul 18 21:21:54 (catalog, library navigation, that sort of thing) Jul 18 21:22:19 nice Jul 18 21:22:51 if you're doing a lot of 3d rendering then perhaps, but in most other cases you'll see little to no benefit. Probably more pain than it's worth Jul 18 21:23:08 i wish it could handle multiple exposures (panorama, exposure fusion, etc) Jul 18 21:23:18 seems like thats still Ps territory? Jul 18 21:23:34 then again, lr4 was crazy slow on my fairly uber system, I might have been suffering from an uncommon bug in LR4 Jul 18 21:23:46 Chainfire lots of people said it was slow Jul 18 21:23:47 yeah definitely Jul 18 21:24:32 however, unfortunately, after upgrading from PS5 to PS6, I've found that many of my source shots no longer combine to a panorama in PS6 - while the same shots worked fine in PS5, which is very strange as well Jul 18 21:24:52 bankai_: so basically, Java is the recommended and best-support language for Android development? Jul 18 21:24:58 yes Jul 18 21:25:40 how closely does Android Java follow non-Android Java? when Java 8 comes out, will we be able to use its new features in Android? Jul 18 21:25:53 Chainfire i hope Lr stays non-subscription Jul 18 21:26:34 Adobe makes me anxious Jul 18 21:27:11 put all that work into adding metadata to your catalog, then one day they change their pricing model. i hope not Jul 18 21:27:52 dunpeal Android is Java 1.6 Jul 18 21:28:14 g00s: will they upgrade at some point? Jul 18 21:28:36 Java 1.7 doesn't add a lot of core language features, but Java 8 does add a few nice ones like lambdas Jul 18 21:28:50 i dont think anyone outside google knows that Jul 18 21:29:03 yeah, i wanted to use nio.2 Jul 18 21:30:05 anyone here migrated to Android Studio (from Eclipse/ADT)? is it any good? Jul 18 21:30:33 AS, no it's not good Jul 18 21:30:45 I didnt try it yet Jul 18 21:31:18 bankai_ using plain intellij? Jul 18 21:31:27 yep yep Jul 18 21:31:40 me too, but trying to also use gradle grrgrrgrr Jul 18 21:32:11 i had a brief look at it, didn't see a point, so i moved on Jul 18 21:32:31 I guess I'll wait a couple months before trying it Jul 18 21:32:54 I've been always an Eclipse guy, so it would take me a bit more of effort to learn IntelliJ Jul 18 21:33:02 rottz: it's still beta code and lots of people are having issues with it Jul 18 21:35:17 rottz, meh, a coworker of mine who was pro-eclipse moved to intellij in a couple of days Jul 18 21:35:25 intellij has eclipse keybindings available Jul 18 21:35:36 and lots of other nifty plugins :) Jul 18 21:35:46 yeah, ideavim being my favourite Jul 18 21:36:44 the big difference I think is that eclipse is a workspace with projects, intellij is a project with modules Jul 18 21:37:44 g00s: what are you using gradle for ? Jul 18 21:38:27 oh, i was breaking up an older project into reusable library components, its much more fun with gradle than the old ant library project stuff Jul 18 21:38:46 i could have used maven but dont like the apklib stuff Jul 18 21:39:08 i may license one of the components, thats why i decided to split it out Jul 18 21:39:15 me and maven are besties ;) Jul 18 21:39:19 * Zharf too Jul 18 21:39:20 good idea Jul 18 21:39:34 I need to decide on a license for my library and put it up on maven central Jul 18 21:39:41 I'll probably end up with WTFPL again Jul 18 21:40:01 So when you reference a view in an XML layout, and then inflate that layout multiple times, it creates multiple unique views in memory, correct? Jul 18 21:40:10 I would rather just not care about it at all, but people bitch Jul 18 21:40:12 g00s: thanks. Jul 18 21:40:25 Brian|CB, yep Jul 18 21:40:25 Zharf: in that case, BSDL it and you have no problem :) Jul 18 21:40:35 also, since google since gradle is the way they are going forward, whether i like it or not may as well accept that and get used to it Jul 18 21:40:40 gah Jul 18 21:40:45 bitmap memory, why are you so frustrating Jul 18 21:41:05 bsd license term is ambiguous Jul 18 21:41:05 when my fragment gets destroyed, it is somehow still keeping the bitmap that was drawn to the view canvas in memory Jul 18 21:41:07 >.> Jul 18 21:41:25 g00s: just coz google say something, doesn't mean you have to follow :P Jul 18 21:41:55 Brian|CB: i was having problems with something similar, i got into the habit of bitmap.recycle() Jul 18 21:41:56 ;) Jul 18 21:42:02 google should just suck it up and go with maven Jul 18 21:42:11 bankai_: I'm explicitly calling Bitmap.recycle and such Jul 18 21:42:19 and System.gc() Jul 18 21:42:22 and i t's still not leaving memory Jul 18 21:42:29 and I already looked for memory leaks and such Jul 18 21:42:35 I'm just dumbfounded Jul 18 21:42:45 i thought it was bad practice to call gc directly Jul 18 21:42:48 it is Jul 18 21:42:50 it is Jul 18 21:42:53 I just wanted to remove any shadow of doubt Jul 18 21:42:59 I'm just that crazy right now Jul 18 21:43:01 from this stupid bitmap Jul 18 21:43:02 >.> Jul 18 21:43:04 calling gc doesn't remove any doubts Jul 18 21:43:05 it most probably doesn't even do anything Jul 18 21:43:30 it removes my doubts that something is going horrible wrong and no GC is occuring sorta idk Jul 18 21:43:42 The logical side of my brain is at it's end Jul 18 21:43:44 >.> Jul 18 21:43:47 this issue is driving me crazy Jul 18 21:43:58 Brian|CB: you tried filling mem to see if system clears it then ? Jul 18 21:44:03 I don't think System.gc() actually guarantees a GC run (?) Jul 18 21:44:08 not sure Jul 18 21:44:12 StingRay_: What? Jul 18 21:44:24 how do i get Paint.DITHER_FLAG to work in imageview ? it works on surfaceview Jul 18 21:44:28 as in load sh*t loads of something, forcing heap change Jul 18 21:44:29 You mean like just creating junk mem? I mean, using DDMs I was able to see that GC was occuring Jul 18 21:44:35 it's just that the bitmap from canvas stays in memory Jul 18 21:44:38 For no fucking reason Jul 18 21:44:39 >.> Jul 18 21:44:56 how do you know it is that Jul 18 21:45:14 I am getting an error in "setContentView(R.layout.activity_main);" Jul 18 21:45:21 it can't find activity_main, but it's there? Jul 18 21:46:02 I see they changed play store pages again Jul 18 21:46:04 Zharf: I can see the bitmap from teh canvas in memory using the MAT Jul 18 21:46:33 OK.. Here's a stumper.. How do I get a usable debugging error out of 'java.lang.RuntimeException: An error occured while executing doInBackground()' Jul 18 21:46:50 debug Jul 18 21:50:12 has anyone here worked with qt on android? Jul 18 21:50:25 yes, don't waste your time Jul 18 21:50:35 could you elaborate? Jul 18 21:51:48 You nknow would would be fantastic? If DDMS would just dump my hprof Jul 18 21:51:50 i was playing with it more for a "oh this is interesting", which it was, but when i tried to run on the device it wanted to download and install the QT framework - no user is going to put up with that Jul 18 21:51:53 instead of just idling Jul 18 21:51:56 and ruining the ADB connection Jul 18 21:52:27 There's a Qt5 Demo application in the Play Store. It doesn't ask you to download anything Jul 18 21:52:54 I thought the separate framework install was just for convenience to cut down on file size if you have many qt apps installed and want a central location for the libs Jul 18 21:53:53 yeah probably right. QT has some great features and looks really nice, but you can do things easier and more consistently with the default framework Jul 18 21:59:07 i wonder if "Gradle in Action" is worth it Jul 18 21:59:18 42% off today Jul 18 22:00:00 "Gradle inaction"... Jul 18 22:01:23 when learning these things, its hard to tease apart the way the tool works, groovy syntax & semantics, and how the dsl works Jul 18 22:01:50 the example look simple, but ... Jul 18 22:02:41 I think the gradle loving people love programming buildscripts and nothing else. Jul 18 22:03:16 android plugin incompatible with the java plugin. Great, that make every java addon the gradle community come up with unusable. Jul 18 22:03:49 If the android plugin does not support what you are trying to do, if it is anything but very basic, you are SOL. Jul 18 22:04:08 Hate it already. Maybe I'll become an ant expert instead. Jul 18 22:04:14 hehe Jul 18 22:04:36 i'd rather use maven than ant i guess Jul 18 22:04:51 not like the android ant scripts are all that flexible either Jul 18 22:05:38 Spent two days to do something really simple; 1. Find all source files in some other jvm language, 2. Call custom compiler instead of java to create class files; do the rest as normal. Jul 18 22:05:57 g00s it might be me, but the idea that I even have to think about that sort of stuff sort of annoys me Jul 18 22:06:02 in my ondraw method I have paint.setFlags(Paint.DITHER_FLAG); it works when displayed on surfaceView, but when I use it on ImageView it has no Dither even if i set a drawable and set dither to true :( Jul 18 22:06:18 Any good pointers to simple maven scripts for Android building? Jul 18 22:06:20 Chainfire which part now ? Jul 18 22:06:22 kjeldahl: http://xkcd.com/1205/ Jul 18 22:06:34 the gradle stuff? Jul 18 22:06:55 harw386: dithering is ignored with hardware rendering because it doesn't make sense (since hw surfaces are always 32 bits) Jul 18 22:07:02 g00s learning how yet another tool works, the syntax and semantics, etc. I'm sure it's cool, but wouldn't you rather just be working on your app's code ? Jul 18 22:07:13 Chainfire oh yeah, for sure Jul 18 22:07:35 that, and the session at I/O that explained it was full. On a friday. With the big halls empty. And no live coverage. Jul 18 22:07:35 i also dont really want to know Groovy, not like i'm going to use it anywhere else Jul 18 22:08:22 Chainfire: but it was recorded Jul 18 22:08:54 Chainfire: I started with gradle as I've just recently dived into Android development, because it's what google pushes. Now I can't really understand why. I'll take another look at maven and ant instead and see if that can do what I need a lot more easily. Jul 18 22:09:24 Writing build scripts in low-level languages is a really bad idea if you ask me. Jul 18 22:09:46 Groovy is Java with lipstick, not much more. Jul 18 22:10:03 romainguy that's helpful now, but not then. It just seemed very surprising at the time - both to me and the approx 50-60 others standing in line. Jul 18 22:10:12 yeah, it was one of the first alternative jvm languages Jul 18 22:10:24 kjeldahl what do you need it for ? Jul 18 22:10:25 The Gradle DSL language simplifies things a bit, but the low level abstractions and inflexibility shines through as soon as you move away from really basic stuff. Jul 18 22:10:26 people like its web dev framework Jul 18 22:11:06 I appreciate I may not be building Facebook or anything, but I've never actually really needed to customize the build process (though some of the Gradle features I've seen mentioned look nice to have) Jul 18 22:11:10 Grails, or whatever. i guess coming from JSP it was a step up maybe Jul 18 22:11:17 Chainfire: I'm going to write apps in Kawa - a scheme running on jvm. Works fine, but I want to integrate the builds with the java parts. Make everything smooth. Jul 18 22:12:45 hah ok, I guess that is a valid reason :) Jul 18 22:13:12 Guys - anybody got any tips with regards to memory management without relying on the GC? Jul 18 22:13:32 dont make garbage :) Jul 18 22:13:39 \o/ Jul 18 22:13:39 Anthaas that really depends on what you mean and what you're doing Jul 18 22:13:40 * g00s runs Jul 18 22:13:57 re-using objects helps ... Jul 18 22:13:58 General tips really, I guess specifically with images Jul 18 22:14:21 when push comes to shove, it's very very hard to keep the GC from being the proverbial female dog at exactly the wrong time Jul 18 22:14:36 (though I must say it's a lot better now than it used to be) Jul 18 22:14:53 For example, if I have a listview with a baseadapter attached, and Im loading images into an image view (through reusing the convertView parameter) Jul 18 22:15:06 where are you loading the image from ? Jul 18 22:15:09 If I am loading some from gallery, and some from a URI of a recently taken camera photo Jul 18 22:15:25 I know that the camera photos are huge in terms of file size Jul 18 22:15:42 load them downscaled Jul 18 22:15:43 if decoding from jpg/png/whatever, you can supply BitmapOptions to the decoder to load the decoded image into an already allocated bitmap Jul 18 22:15:49 look at BitmapFactory.Options Jul 18 22:15:57 And I am using BitmapFactory.Options inScale field to scale the image down Jul 18 22:16:11 hmmm now the images in imageview and surfaceview look the same but one is slightly brighter then the other Jul 18 22:17:06 Ok, I have the docs of BitmapFactory.Options open, which of these variables should I look at using/adjusting? Jul 18 22:17:12 What do each of them actually do? Jul 18 22:17:15 I'm not sure if that bitmap reusing works when loading scaled, from memory, I believe not. Are you geting out of memory errors ? Jul 18 22:17:17 AS 0.2.1 released just now. Jul 18 22:17:31 Chainfire: it's not supported at the moment, in a future release Jul 18 22:17:33 Its just very slow at loading the images etc Jul 18 22:17:45 I made a few adjustments to stop the out of memory error Jul 18 22:17:50 But jesus christ that thing dies Jul 18 22:17:54 It becomes so slow and laggy Jul 18 22:18:02 The scrolling isnt smooth whatsoever when loading a camera image Jul 18 22:18:25 The loading process etc is run on a separate thread Jul 18 22:18:42 Oh wait Jul 18 22:18:47 It MIGHT be hahaha Jul 18 22:18:50 romainguy now that you're here anyway.. is there any way to apply a sort of ColorFilter over my entire activity ? Jul 18 22:18:50 Not sure Jul 18 22:19:27 Chainfire: Wouldnt a relative layout with a translucent background do that? Jul 18 22:20:47 Anthaas, I don't think so in the way that I mean it Jul 18 22:20:53 hey guys, trying to implement a file uploader using HttpUrlConnection and the Mechanoid RESTful API library, it's not playing nicely, can anyone reccomend another library for this? Jul 18 22:21:34 romainguy - Sorry, I didn't see your post about loading them downscaled - I am doing that already, that was my issue to preventing the outofmemory error, but now it is just really slow and as I mentioned, the scrolling is not smooth at all... Jul 18 22:21:36 i've tried chunked streaming, non streaming Jul 18 22:22:10 Anthaas regarding your loading - you're loading these camera images into a listview with I assume small images ? the loading of the images itself (even when downscaling) is very expensive Jul 18 22:22:13 each way I try i get different errors, it's taking a REALLY long time to try and upload 1.5MB of base64 image data Jul 18 22:22:43 Yeah, the idea is the list view is a list of people, and the image is a thumbnail of them which is taken by the camera Jul 18 22:23:09 are those images stored in the MediaStore ? If so, load the thumbnails instead of the image Jul 18 22:23:17 When the image is solely of images that happen to be downloaded to my phone via the web, the loading and scrolling is perfect Jul 18 22:23:19 if not, create the thumbnails yourself and cache them for later use Jul 18 22:23:33 The images are captured from the camera intent Jul 18 22:23:47 the URI that is returned to the callback is saved and used to load images (after downscaling) Jul 18 22:24:45 Ha ha, funny: http://blog.golang.org/first-go-program Jul 18 22:24:47 ok so you're not loading fullscale images, you're already loading thumbnails ? Jul 18 22:24:59 Ummm Jul 18 22:25:04 I couldnt answer that question Jul 18 22:25:10 This is the process I am going through Jul 18 22:25:16 1) Launch camera intent Jul 18 22:25:19 2) take photo Jul 18 22:25:23 3) save photo Jul 18 22:25:28 4) get URI from intent callback Jul 18 22:25:46 5) load image from input stream using URI Jul 18 22:25:50 6) downscale Jul 18 22:25:52 7) display Jul 18 22:27:02 ok but you're display in an image view, so you're talking a lot of pictures in a row ? Jul 18 22:27:06 *taking Jul 18 22:27:12 i do the same thing, and have the same problem, but haven't looked into it yet.. so this conversation just got interesting for me Jul 18 22:27:18 8. PROFIT! (couldn't resist, sorry) Jul 18 22:27:31 Err, not necessarily Jul 18 22:27:40 In the activity, I can choose to add a new record Jul 18 22:27:56 ah ok. so you're also displaying previously taken images Jul 18 22:28:05 are you downscaling these on load as well ? Jul 18 22:28:08 I can assign an image to the record (in the database) by either URI or an existing image in the gallery, or a camera Jul 18 22:28:18 I didn't find the need to Jul 18 22:28:26 This problem only exists with camera images (just taken) Jul 18 22:28:33 Anthaas: You are reusing your views (in case you have a loong list with references to many images offscreen...), if you're using a list or similar? Jul 18 22:28:36 I can do if it would fix it Jul 18 22:28:49 I am reusing the view, yes. Jul 18 22:29:06 Anthaas I'm still not really understanding the issue, I guess. Just loading a single big image shouldn't make the rest of your app slower, unless you keep reloading it Jul 18 22:29:25 The listview can have multiple images from a camera Jul 18 22:29:28 this is where it becomes slower Jul 18 22:29:34 Anthaas: i think chainfire may have nailed it when he said to cache the scaled images Jul 18 22:29:58 TheDruidsKeeper: Is there any example of how to do this caching? Jul 18 22:30:01 Anthaas ok, so what happens if one of these big-ass pictures is scrolled out of view, then back into view. Then that view is re-used Jul 18 22:30:08 Also, any light reading on the matter would be beneficial Jul 18 22:30:18 does that mean you reload that big ass image from the URI ? Jul 18 22:30:23 Yes Jul 18 22:30:25 right ok Jul 18 22:30:31 that's completely not what you want to do. Jul 18 22:30:41 every image that ends up in the imageview: Jul 18 22:30:49 Anthaas: I'm using this library which takes care of most of the issues. https://github.com/nostra13/Android-Universal-Image-Loader At least read up on it, it discusses things like caching etc. Jul 18 22:30:58 Ok. Thank you for recognising the problem. I am a student on placement and this is my first time with Android Jul 18 22:31:12 when loading it, scale it down to the smallest size bigger than the thumbnail size Jul 18 22:31:38 I am do this before loading it to the image view Jul 18 22:31:45 I have a loop to do so Jul 18 22:31:48 for example, in your listview, a picture might appear as 200x200 pixels. If the original is 4096x4096, the smallest size bigger than the thumbnail size is 256x256 Jul 18 22:31:53 which also finds the quickest way to do this Jul 18 22:31:55 then, SAVE that image somewhere Jul 18 22:32:00 AHHH Jul 18 22:32:05 The save part is the part I am missing Jul 18 22:32:08 and next time LOAD the SMALL image Jul 18 22:32:23 now, you can save it to DISK Jul 18 22:32:25 Right, so I am loading the first image from the URI that is given in the callback Jul 18 22:32:37 but you generally don't have to, UNLESS you're loading a shitload of images Jul 18 22:32:50 So what you want me to do is downscale the image there, then find a location in storage, store the image, get the URI and use THAT URI in future? Jul 18 22:32:53 Chainfire: so recommended save the thumbnail to a disk cache, not memory? Jul 18 22:33:34 not necessarily Jul 18 22:33:40 saving/loading to/from disk is usually overkill Jul 18 22:34:08 what you want to use is a SoftReference Jul 18 22:34:13 is there an android caching mechanism that will page to disk if ram is low? Jul 18 22:34:20 I'm getting to that Jul 18 22:34:30 sorry, this is exciting :) Jul 18 22:34:35 Indeed. Jul 18 22:34:38 I love learning :D Jul 18 22:34:48 nite all! Jul 18 22:34:54 you are re-using your views, so your bitmaps get thrown away, and you need to reload them if they scroll back into view. Jul 18 22:34:59 But what if you did not throw them away ? Jul 18 22:35:05 nigh kjeldahl Jul 18 22:35:10 Would that not clog up memory? Jul 18 22:35:10 night* :) Jul 18 22:35:16 you use a secondary collection to hold all the scaled-down images Jul 18 22:35:28 and load/save to that collection Jul 18 22:35:40 no, it will not clog up memory, because instead of using a Bitmap, you will use a SoftReference Jul 18 22:35:55 the SoftReference will be freed by the GC if your app runs out of memory Jul 18 22:35:58 mind : blown Jul 18 22:36:02 I have never heard of or used that class (SoftReferenece) Jul 18 22:36:32 private HashMap> imageCache = new HashMap>(); Jul 18 22:36:46 now that you know the keywords, use the Google, figure out how it works. Jul 18 22:37:09 Thank you! So useful! Much more help that I often get from IRC! Jul 18 22:37:31 ^ agreed.. and i wasn't event asking the question Jul 18 22:37:38 I can tell you right now Jul 18 22:38:02 you will find very elaborate examples if you search for listview / adapter / softreference / image cache ... but I can only advise you to just read the solutions from different people Jul 18 22:38:04 A little background info on me, Im a student on placement at a minor app dev company. My background before starting was about 2 months on what the manifest was, what activities and intents were, and what to do with them Jul 18 22:38:04 then build your own Jul 18 22:38:08 SoftReferences are quite, strong though right ? Jul 18 22:38:12 Got started here and just got thrown in the deep-end. Jul 18 22:38:13 @Chainfire Jul 18 22:38:16 because then you will learn how it really works :) Jul 18 22:38:20 have to learn everything myself. Jul 18 22:38:40 Awesome :D Jul 18 22:38:52 (and it's not that difficult once you see how it works) Jul 18 22:38:54 I have a project that is effected by it at the moment, I will branch it and work on it during my lunch hour Jul 18 22:39:02 StingRay_ yeah they stay around long-ish Jul 18 22:39:20 but it can take a while to stick, your VM size might need to grow Jul 18 22:39:53 for example, when I started with this technique (which is some Android versions ago, so details might have changed), I would find that after the first two-three pages of listview, my image cache would be empty again Jul 18 22:40:07 but then after scrolling up and down again, it would be full again, and would *stay* full Jul 18 22:40:58 you don't really control the GC, you just say "can I pretty please keep this? no? I'll fetch it again. Can I keep it now?" Jul 18 22:41:53 Anthaas / TheDruidsKeeper well next time somebody asks you something, be sure to explain it as well instead of just sending them on to Google ;) Jul 18 22:41:55 So, you kind of train it that you want to keep something Jul 18 22:42:02 I do, ALWAYS Jul 18 22:42:03 The reason Jul 18 22:42:20 I find that if I can explain something clearly and in a way that is easy to understand, I prove to myself that I understand it. Jul 18 22:42:27 If I use it, but can't do that, I do not understand it well enough Jul 18 22:42:31 Anthaas it doesn't really care, it's just a stupid VM. The VM reserved memory grows if the system sees you need more memory than you're using Jul 18 22:42:32 And must do my own studying. Jul 18 22:43:02 so first time you run out of memory, it may throw away your cache, but also increase your total VM memory size, so next time you will not run out of memory so fast Jul 18 22:45:18 It is the exact opposite of the attitude I found in the C++ IRC channel Jul 18 22:45:18 Awesome :D Jul 18 22:45:19 I did do some reading on memory management in Android Jul 18 22:45:19 there is a tool that shows a dominator tree Jul 18 22:45:19 etc Jul 18 22:45:19 I found it interesting Jul 18 22:45:19 That is the problem with where I work though - they expect you to do things you don't understand at that time, and expect it instantly without giving you time to research and understand. Jul 18 22:45:19 yeah I've noticed before they are not really helpful in the #(#)C(++) channels ... Jul 18 22:45:19 They just laugh at you for doing Android or Java programming. Jul 18 22:45:19 Anthaas welcome to the wondrous world of development :) Jul 18 22:45:19 Hahaha Jul 18 22:45:26 Chainfire++ .. i was going to say the same thing Jul 18 22:45:38 It wouldn't be so bad if my manager (or his manager) had a clue about anything technical. But alas, I assume that is the welcome to the world of managers hahaha Jul 18 22:45:46 Chainfire: not sure thats language specific :) more down to the individual, and even the moods of those individuals Jul 18 22:46:03 although would be good to get some hard stats on helpfulness per language Jul 18 22:46:06 :) Jul 18 22:46:10 Basically, I was trying to learn some C++ as I am told it is a useful language to know Jul 18 22:46:17 you have to keep in mind that the people who do this kind of stuff are not generally known for being very social or nice, so you shouldn't really expect them to be nice. And any help is help, even if it's rude and sends you to Google ;) Jul 18 22:46:25 I prefer to go through a book, apply, go through another book, apply, and rinse and repeat until I find I don't need the book so much Jul 18 22:46:44 I came across a problem, and couldnt find an answer, went on there and asked and pretty much got told to f*** off lol Jul 18 22:47:16 But yeah. I do know a fair amount of Android stuff, just always found that image/graphics was my weakest part. Jul 18 22:47:45 I have been on here several times helping people - I believe I have spoken to you before Chainfire Jul 18 22:48:14 It has gotten to the point now, where I am teaching the senior developer things (which I guess is kind of cool) Jul 18 22:48:27 We both see each other as equals, not one above the over which is awesome. Jul 18 22:48:38 Its nice to be around somebody like that, where you can both teach each other. Jul 18 22:49:03 It certainly is Jul 18 22:49:18 it speeds things up as well ;) Jul 18 22:49:37 Yes! :D Jul 18 22:49:43 One thing, I have just come across this: Jul 18 22:50:00 Chainfire: can you add ML controls to DSLR ? Jul 18 22:50:22 In practice, soft references are inefficient for caching. The runtime doesn't have enough information on which references to clear and which to keep. Most fatally, it doesn't know what to do when given the choice between clearing a soft reference and growing the heap. The lack of information on the value to your application of each reference limits the usefulness of soft references. References th Jul 18 22:50:29 now that there is some awesome RAW video options for lots of cameras, and more bracket options :) Jul 18 22:50:36 at are cleared too early cause unnecessary work; those that are cleared too late waste memory. Jul 18 22:50:55 And this: Most applications should use an android.util.LruCache instead of soft references. LruCache has an effective eviction policy and lets the user tune how much memory is allotted. Jul 18 22:51:46 StingRay_ I don't use ML Jul 18 22:51:56 you should Jul 18 22:51:59 StingRay_ but even if I did, I regularly hear they break something in the USB protocol Jul 18 22:52:21 I've heard from someone that the new RAW recording actually breaks USB remote completely, not sure how true that is Jul 18 22:52:22 well if you do any video, there is now, no equal Jul 18 22:52:34 Anthaas sweet Jul 18 22:52:40 this is a (relatively) new class Jul 18 22:52:48 even better, if you're targeting API level >= 12 Jul 18 22:52:57 Chainfire: I think they have mods/tweaks, that shut down services Jul 18 22:52:59 but it not, the SoftReference thing does indeed work well Jul 18 22:53:08 Ahh, which I am not. :( (I do on some new project though) Jul 18 22:53:13 API 2.2 :( Jul 18 22:53:18 Much to my dismay :( Jul 18 22:53:33 SoftReferences are not perfect, they are limited, hence the strange behavior I have noted earlier Jul 18 22:53:35 More people to hit with the app - although I love that Google doesn't enforce user updates. Jul 18 22:53:51 What would be the difference in using a WeakReference rather than a SoftReference? Jul 18 22:53:59 Anthaas to be honest, if you're releasing something *new* now ... don't bother with < 4.0 Jul 18 22:54:10 unless you're making a free app Jul 18 22:54:25 Yeah - these are for clients and are released as free Jul 18 22:54:27 usage numbers may still be 50% < 4.0, I assure you, the money spending isn't Jul 18 22:54:35 Only our top new apps go to 4.x + Jul 18 22:55:21 Anthaas IIRC the difference is that Weak's get released before Soft's Jul 18 22:55:37 Ahh, and because we want to hold the reference as long as possible Jul 18 22:55:40 Soft would be better Jul 18 22:55:43 right Jul 18 22:55:45 however Jul 18 22:55:50 you might also check out the source of LruCache Jul 18 22:56:02 Soft holds until the memory NEEDS to let it go, Weak hold it until the memory is getting fuller? Jul 18 22:56:03 just because it's only in API 12, doesn't mean it's source code won't work on 2.2 Jul 18 22:56:08 Soft, needs to hit a mem limit, Weak die after some seed when no refs are left, iirc Jul 18 22:56:12 Interesting. Jul 18 22:56:32 In fact, may I ask a question that would help me personally? Jul 18 22:56:37 As a student... Jul 18 22:57:09 src - http://androidxref.com/4.2.2_r1/xref/frameworks/base/core/java/android/util/LruCache.java Jul 18 22:57:24 androidxref.com - if you're not using that site every damned day, you're missing out. Jul 18 22:57:41 I am entering my Bachelor's year at University shortly, and am still to decide on a final year project. I would very much like to stick with Android with this (my fallback is looking at neural networks), but can you think of anything involving Android and/or mobile application development that would provide enough academic research? Jul 18 22:58:19 Oooh, it would appear I have been missing out - I will bookmark that one! Jul 18 22:59:30 ok now that I'm actually reading LruCache, it doesn't actually provide optimal memory usage Jul 18 22:59:42 My degree is in Software Development (as opposed to Computer Science) Jul 18 22:59:48 and using it may still lead to OOM that a colleciton of SoftReference wouldn't Jul 18 23:00:20 I'm not convinced this is actually better Jul 18 23:00:36 (for all situations) Jul 18 23:00:46 Interesting. Jul 18 23:00:47 thats difficult Anthaas Jul 18 23:01:00 what is enough academic research ? Jul 18 23:01:06 I don't even have a degree Jul 18 23:01:15 Im not even sure yet, however I know that some is better than none Jul 18 23:01:28 Some can be research heavy, where the dissertation is ~12,000 words Jul 18 23:01:33 but I've been to lots of Software Engineering / Computer Science / etc end-project demonstrations and paper defenses Jul 18 23:01:46 and generally found them all lacking in being new or interesting Jul 18 23:01:48 Some can be product heavy with a less research and are ~7,000 words Jul 18 23:02:04 "they give out degrees for this shit ?" Jul 18 23:03:03 I understand what you mean Jul 18 23:03:26 There are some people, who without meaning to sound elitist, have gotten decent grades for software that in all honesty isn't great. Jul 18 23:03:34 There are some people who even struggle to do that Jul 18 23:03:41 Programming isn't for everyone, I get that. Jul 18 23:03:47 But there needs to be a standard upheld. Jul 18 23:04:03 I went to a defence where one dude literally did more on his own then all the other graduates added up :') Jul 18 23:04:05 I find myself reading more, studying more, staying late more than anybody I know just in an attempt to KNOW more. Jul 18 23:04:20 That was like my first year and second year projects Jul 18 23:04:27 I did 90% of the work. Jul 18 23:04:33 Without trying to sound pretentious here. Jul 18 23:04:38 I did pretty much all of it. Jul 18 23:04:49 Just because it was a team project and I didn't want a bad grade because of other people Jul 18 23:04:53 but yeah I'm not sure regarding projects, you need some ideas .. I'm not sure what would pass for whomever will be judging you Jul 18 23:04:59 Which is why Im looking forward to the individual project. Jul 18 23:05:20 At the moment, I am trying to just collect ideas. Jul 18 23:05:39 Different lecturers are after different things Jul 18 23:05:49 what has always worked for me is finding something you want to be done, then doing that Jul 18 23:05:49 I just want it to be interesting to do Jul 18 23:06:01 This is where I am poor :( Jul 18 23:06:04 I am not an ideas person. Jul 18 23:06:10 Are you independantly wealthy? Jul 18 23:06:19 No. I am a student. Jul 18 23:06:24 you know what that tells me? that tells me you are not annoyed enough by the world. Jul 18 23:06:28 I live on student loans and the occasional help from my parents. Jul 18 23:06:41 So, that needs to be a consideration too. Jul 18 23:06:50 I try not to let things annoy me. I figure why be annoyed at stuff when I cannot do things myself to change them Jul 18 23:06:59 People are assholes at times, don't be annoyed. There will always be assholes Jul 18 23:07:03 Just don't be one yourself. Jul 18 23:07:09 I don't mean annoyed like that Jul 18 23:07:14 Things in life go wrong Jul 18 23:07:17 Its the way it is. Jul 18 23:07:38 I mean annoyed like seeing which things aren't perfect - where there's room for improvement. Those are the places you can fix stuff Jul 18 23:07:41 I mean, ultimately, perhaps even after Uni, I would like to develop software that helps people. Jul 18 23:08:41 My grandfather dies due to complications of diabetes. I would like at some point to develop an application which helps diabetics keep track of things like this, and use data processing in the background to try and foresee problems before they happen. Jul 18 23:08:59 sounds like a graduation project to me Jul 18 23:09:16 Whist that would be an ideal project for me to do, I dont think it would satisfy the necessary criteria Jul 18 23:09:20 https://play.google.com/store/apps/details?id=com.gexperts.ontrack Jul 18 23:09:24 The academic research would be outside of my field. Jul 18 23:09:39 there are many apps like that Jul 18 23:09:53 ...and naturally somebody has been there and done that before me... Jul 18 23:10:45 well tbh, there's not much real research in development I see ... Jul 18 23:10:47 Who want to tell me if I created an obvious mess? http://pastebin.com/Dc7SZrgE Jul 18 23:11:05 I think the research can even be into a problem, and the best possible solution to that problem Jul 18 23:11:12 It doesnt necessarily have to be ground breaking. Jul 18 23:11:43 But when the research I am doing is in a completely different field (e.g. details of diabetes), that isnt good enough Jul 18 23:11:57 will there be significant performance degradation if I use ArrayList instead of Object[] for a fixed size? Jul 18 23:12:13 Anthaas: I think your probably the opposite of me, I have hardly any coding tallent but too many ideas :) Jul 18 23:12:27 Share some ideas, and I shall share some programming knowledge hahaha Jul 18 23:12:38 I am seriously running out of ideas, but I love the whole use of Android aspect. Jul 18 23:12:57 hesperaux_ significant ? that depends on what you're doing with it Jul 18 23:13:24 Anthaas, create an MIT licensed graph library that links with a huge data file for visualizing stored binary data? That's what i need :D Jul 18 23:13:28 there will obviously be overhead, but I would rarely call it significant Jul 18 23:13:46 Chainfire, i figured it'd be ok but wanted to check with the master Jul 18 23:13:53 yeah, Chainfire, I was typing a long explanation, but in short your answer is the best "depends" Jul 18 23:14:32 if it suits your code better to use one over the other, the overhead is 9 out of 10 times not the deciding factor Jul 18 23:14:38 hesperaux_ I would say that unless you are accessing the array on a tight loop, you should be OK with the ArrayList Jul 18 23:14:47 my life goes from sad to happy using ArrayList Jul 18 23:15:00 well that certainly sounds like a valid reason to use it Jul 18 23:15:01 Hmm Jul 18 23:15:06 lol Jul 18 23:15:08 if all our lives were that simple! Jul 18 23:15:13 haha Jul 18 23:15:30 Anthaas you can look at Android in non-mobile solutions Jul 18 23:15:31 I know my supervising tutor would love if my project were commercially viable Jul 18 23:15:48 Oooh, that is an interesting proposal Jul 18 23:16:30 I mentioned a student planner application, and one lecturer perks up and said "implementing the timetabling algorithm would be a great project" - the only downside is that it wouldnt interest me Jul 18 23:16:37 you could make an iOS virtual machine to run on iOS apps on Android Jul 18 23:16:37 for example, I've turned a tablet into a submarine-camera-controller for underwater earth. As an other example, I'm currently working on a system that uses a Nexus7 as display for custombuilt electronics that monitor *censored* in *censored* for the medical industry Jul 18 23:16:40 * Bleeptech wishes that someone would simplify his and point out whatever is borked in the code... Jul 18 23:16:44 I really want something that excites me so I can take it the furthest I possibly can Jul 18 23:17:02 then just do it Jul 18 23:17:16 Cool! Jul 18 23:17:22 My Nexus 7 broke today :( Jul 18 23:17:22 you can use an Android machine as just some building block for something bigger Jul 18 23:17:27 make crypto accessible to the normal person :-) my dream Jul 18 23:17:37 Somebody at work hit it without realising, but nobody knows who - they won't own up Jul 18 23:17:42 crypto is accessible to the average person Jul 18 23:17:51 encrypted comms is a different story Jul 18 23:17:53 Now my 8GB Nexus 7's screen doesn't work and has a massive impact crack over it :( Jul 18 23:18:06 ugh Jul 18 23:18:08 As I mentioned before, not being wealthy - I cannot afford to repair it :( Jul 18 23:18:21 next time, don't impact crack it Jul 18 23:18:22 So my wish to do a final year project with it is out of the window :( Jul 18 23:18:26 It wasnt me. Jul 18 23:18:34 then get whomever did it to replace it Jul 18 23:18:49 pfn: a distinction without a difference? ;-) Jul 18 23:19:00 kbs, not really Jul 18 23:19:00 I opened my bag, opened the case on it and checked its charge, everything was fine, put it back. Opened it a couple hours later and it was cracked. Jul 18 23:19:04 hey guys, I have just sorted out my bind service... but it only does a task once... do I need to add a listener for it to continue the task upon change of state? Jul 18 23:19:06 I dont know who did it. Jul 18 23:19:24 kbs, the biggest problem with the accessibility of pk crypto for comms is the lack of a p2p pki Jul 18 23:19:26 don't they have websites for these sorts of ideas ? Jul 18 23:19:31 if not, build one, and graduate on the roject Jul 18 23:19:32 and key management is a bitch Jul 18 23:19:39 Chainfire: Using Android as a machine for something bigger REALLY interests me - I thought about home automation... Jul 18 23:20:07 Or that Bartendro that was on Kickstarter a while back seemed like such a fun project. Jul 18 23:20:22 isn't it already possible to control x10 home automation units from Android ? Jul 18 23:20:37 I dont know haha Jul 18 23:20:44 See, I am not an ideas person! :P Jul 18 23:21:10 Anthaas you'll be an ideas problem when you start having problems to solve :) Jul 18 23:21:22 g*person Jul 18 23:21:23 sharpy-penguin: http://pastebin.com/Dc7SZrgE Spot any obvious screwups? Jul 18 23:21:48 g00s: It takes an idea to create an idea.... Jul 18 23:21:54 Wanna get the ball rolling? haha Jul 18 23:22:10 if you donate time somewhere, there is bound to be inefficiencies & friction in some area that requires attention. can't have that idea unless you immerse yourself in that context however Jul 18 23:22:28 I currently work at a placement student at a small app development company Jul 18 23:22:30 forget about just sitting there and getting ideas Jul 18 23:22:37 There is so much that is wrong there, but nobody willing to listen. Jul 18 23:22:48 Does not Android have its own file picker dialog? Jul 18 23:22:57 smallfoot- hah, no Jul 18 23:23:04 wow, what a piece of shit system Jul 18 23:23:12 ..... Jul 18 23:23:13 Anthaas: we all think that when we start a new job :P Jul 18 23:23:16 there are some 3rd party libs Jul 18 23:23:17 it is so frustrating developing for android Jul 18 23:23:21 Bleeptech not from what I can see whats the error so much code i dunno where to look Jul 18 23:23:32 bankai_: This company is bleeding money in one particular area and everybody can see it, but the MD isn't interested. Jul 18 23:23:37 yeah, but there ought to be support for a file picker without third-party libraries Jul 18 23:23:47 does iOS and Windows Phone include a file picker? Jul 18 23:23:52 smallfoot- google / apple don't want your users to have a 'file system' Jul 18 23:23:59 they want their stuff on the cloud ! Jul 18 23:24:12 g00s, oh, but I want open/save files Jul 18 23:24:21 sharpy-penguin: Dunno.. The AsyncTask just dies.. java.lang.RuntimeException: An error occured while executing doInBackground() Jul 18 23:24:23 they dont want you to have files either Jul 18 23:25:39 Does not WebView support ? Jul 18 23:25:53 Bleeptech , no idea man lol you are working on same stuff as me ;( Jul 18 23:26:00 sharpy-penguin: And then there's 'Caused by: java.lang.NullPointerException' pointing me at teh JSONParser.. Jul 18 23:26:07 g00s: that's actually an interesting comment and i instantly thought "no, you're wrong", but thinking about it, google really does 'hide' a lot of stuff doesn't it ? i use a file explorer, so i kind of forget sometimes Jul 18 23:26:17 (Going off topic a second, a question that I still haven't found a well explained answer to: What is the "..." notation when passing a parameter, for example "doInBackground(String... params)" Jul 18 23:26:26 ) Jul 18 23:26:35 smallfoot-: I think you're going to enter a world of pain if you try to apply your desktop knowledge directly to mobile operating systems. Jul 18 23:26:41 Anthaas you can pass as many params as you like of that type Jul 18 23:26:53 Anthaas doInBackground(string1, string2, string3, string4) Jul 18 23:27:04 Bleeptech is callback meant to be a method? Jul 18 23:27:10 you can access them as an array in the method itself Jul 18 23:27:20 params.length, params[i] Jul 18 23:27:23 and so string1 would be params[0] Jul 18 23:27:24 ahhh Jul 18 23:27:26 thank you! :D Jul 18 23:27:45 kakazza, but i want the user to be able to upload a file Jul 18 23:27:53 I would have told you to consult the Java manual, but I know how shitty "..." is to Google for :) Jul 18 23:28:07 Any file? Or a file created with your app? Jul 18 23:28:07 Yeah, I have tried searching in the past Jul 18 23:28:17 Even reading forums, but nobody seemed to give a straight answer... Jul 18 23:28:26 kakazza, either a file on the file system or a file created by the app Jul 18 23:28:33 what is ... called so i can google by its name? Jul 18 23:28:35 sharpy-penguin: Not a clue.. I'm still learning this.. LOL.. Jul 18 23:28:39 ellipsis Jul 18 23:28:48 in programming too? Jul 18 23:28:53 Oh haha Jul 18 23:28:54 damccull: varargs Jul 18 23:28:56 Any file with any extension? Jul 18 23:28:57 I don't know Jul 18 23:29:00 i suck at this lol i am still trying to sort out my service and binder! Jul 18 23:29:01 Ahh varargs Jul 18 23:29:02 http://docs.oracle.com/javase/1.5.0/docs/guide/language/varargs.html Jul 18 23:29:03 kbs thanks Jul 18 23:29:03 Interesting Jul 18 23:29:12 Its so much easier when you know the name Jul 18 23:29:39 I'm pretty sure 'elipsis java' yields a result. Jul 18 23:29:44 Varargs is a good rpg name Jul 18 23:29:56 ellipsis* Jul 18 23:30:21 Android still uses shitty old Java 6? When will it be able to use Java 7? Jul 18 23:30:42 smallfoot- once you submit the patch to AOSP Jul 18 23:30:47 ^ Jul 18 23:30:51 I looked into this Jul 18 23:30:56 I don't wanna be the guy doing that... Jul 18 23:31:03 Some features of Java 7 are available. Only the ones that are syntactic sugar, though. Jul 18 23:31:32 trivia -> one of few words with a plural that's the same for two different words. ellipsis -> ellipses, and ellipse -> ellipses Jul 18 23:31:32 So many times the switch (String) feature would have been useful... Jul 18 23:32:11 switch in java is the devil Jul 18 23:32:34 even in onClick(View view)? Jul 18 23:32:34 it doesn't support non-integer(based) types and uses break-semantics Jul 18 23:32:42 ahhh Jul 18 23:32:44 its goddamn stupid, that's what it is Jul 18 23:32:48 what's wrong with break? Jul 18 23:32:51 Bleeptech tell me when you have learnt lol im so lost Jul 18 23:33:18 damccull look at your switch statements - how often would it have been way more practical if break was implied ? Jul 18 23:33:28 hahaha true. Jul 18 23:33:29 in other words, how often do you *not* want to break ? Jul 18 23:33:38 it happens, but it's certainly rare in my code Jul 18 23:33:39 Float is to be fair inherently broken, for case Jul 18 23:33:50 Does not WebView support ? Jul 18 23:33:54 It COULD be implied that a break always happens before the end of the body, or the beginning of a new case UNLESS preceded by "continue;" Jul 18 23:33:56 Chainfire: Do you understand how AsyncTask works? Jul 18 23:34:01 I wonder what the effects of that would be. Jul 18 23:34:09 smallfoot-: dont you mean Jul 18 23:34:17 Bleeptech yes Jul 18 23:34:28 smallfoot-: Do you only want to allow uploads of files with a specific extension? Jul 18 23:34:53 break in switch is just a bad idea - mostly you don't want it, and when you forget it, the compiler doesn't complain, but all hell breaks loose Jul 18 23:34:59 but look -- how could you write duff's device without the break semantics :-) Jul 18 23:35:11 hahaha Jul 18 23:35:28 the only device by duff I'm interested in is beer. Jul 18 23:35:28 "But why are ALL my onClicks running...this makes absolute no sen....ahhh...break." Jul 18 23:35:35 kakazza can you get string / switch w/o any libraries in android ? Jul 18 23:35:58 Chainfire: Can you take a peek at http://pastebin.com/Dc7SZrgE and see if you spot any obvious errors? Jul 18 23:36:12 post the error Jul 18 23:37:07 http://pastebin.com/vtmT9hsu Jul 18 23:38:26 NPE ... Jul 18 23:38:31 Napalm, yes, sorry, of course Jul 18 23:38:48 Bleeptech line 47 Jul 18 23:38:51 params = null Jul 18 23:38:53 kakazza, I want to allow *all* uploads regardless of extensions Jul 18 23:38:58 line 54 references params Jul 18 23:39:46 kakazza, thing is when I click on the "browse" button, nothing happens, because WebView does not seem to support it, perhaps because it has no file picker dialog Jul 18 23:39:55 What kind of app are you writing, exactly? Jul 18 23:40:09 Because most users wouldn't know where their files are. Jul 18 23:40:22 Simply because they don't have to, and shouldn't. Jul 18 23:40:26 Anthaas wouldn't that be a nice research project? a world without break in switch? :D Jul 18 23:40:50 Chainfire: So my return @ 85 is borked too.. ?? Jul 18 23:40:54 switch is awesome tool for generated code Jul 18 23:41:06 for example state machine compilers Jul 18 23:41:16 whether goto or table driven Jul 18 23:41:17 Hahaha, it would! I would love to know what implications would occur from implying the break before any case or the end of the switch body unless preceded by continue, however I probably don't have enough time for that! Jul 18 23:41:18 Chainfire: There _are_ languages that don't have fallthrough. Jul 18 23:41:38 kakazza, a text editor Jul 18 23:42:06 kakazza yes I know, Pascal for example Jul 18 23:43:00 g00s sure it has it's uses... maybe there should be two statements ... unbreakableswitch() Jul 18 23:43:16 smallfoot-: Then store the files created with your app inside your data directory and display them in a way you like. A ListView, a GridView, whatever. Look at how other applications do it. Jul 18 23:43:18 * Bleeptech throaws Holy water and makes the Sign of the Cross @ Chainfire Jul 18 23:43:29 Spoiler: None use a filebrowser. Jul 18 23:43:47 kakazza, I see Jul 18 23:44:06 _If_ I am a user that has a filebrowser installed for some reason, I can browse my files there and when I try to open them, all apps that can work with this file type will report themselves. Jul 18 23:44:09 Are there any benefits of using a subclassed adapter over a baseadapter? For example using an ArrayAdapter or CursorAdapter over a BaseAdapter? Jul 18 23:44:39 CursorAdapter comes in handy when you're using a ... Cursor Jul 18 23:44:48 ArrayAdapter comes in handy when you're using an ... Array Jul 18 23:44:52 kakazza, then my app should listen for a file intent? Jul 18 23:44:54 I could go on :) Jul 18 23:45:18 Hahahahah! Whenever using an adapter, I have always extended baseadapter, and implemented the four funcitons necessary Jul 18 23:45:24 Regardless of what it does... Jul 18 23:45:33 there are subtleties Jul 18 23:45:53 additional features, etc Jul 18 23:46:04 You talking about things like StickyHeaders? Jul 18 23:46:30 or headers in general on lists... Jul 18 23:47:50 smallfoot-: Yeah. If you're talking about tags in the Manifest. Jul 18 23:47:53 not really, but for example a CursorAdapter when used with a ContentObserver can auto-refresh when content in the database is updated Jul 18 23:47:56 that sort of thing Jul 18 23:48:10 Ahhh cool. Jul 18 23:48:35 Anyway, I'm gone. Jul 18 23:48:39 Rather than needing to call notifyDataSetUpdated or whatever the function is (cant remember off the top of my head) Jul 18 23:48:47 In fact, if you're basing a listview on a database, I'd strongly recommend doing the extra work of using a CursorAdapter with auto-refresh based on a ContentProvider that accesses the actual database Jul 18 23:48:59 it works out neatly Jul 18 23:49:24 and though it sounds complicated, it's only like 100 lines total Jul 18 23:49:26 I will definitely bear that in mind. Jul 18 23:49:49 it allows you to separate manipulation of data from presentation of the data Jul 18 23:49:51 I love the idea of implementing and understanding new things - I will definitely give this a shot! Jul 18 23:49:55 100 lines? That seems an awful lot for something that should be very easy. Jul 18 23:50:13 kakazza welcome to Android Jul 18 23:50:17 :D Jul 18 23:50:30 Yeah, it has its ups and downs Jul 18 23:50:47 But I laugh in the face of iOS devs at work when I can do things with Intents that they have to write 239847294724 lines of code for... hahaha Jul 18 23:50:52 I think JakeWharton also complained about the amout of code he had to write for accessing a database (IIRC). Jul 18 23:51:01 yes, database work is annoying Jul 18 23:51:05 but so are lots of things Jul 18 23:51:10 Which is why I wrote a framework for it hahaha Jul 18 23:51:12 like fragments :') Jul 18 23:51:24 Is it the fault of the API or is there just no way to have it easier? Jul 18 23:51:29 Which unfortunately belongs to work because I wrote it there.... Jul 18 23:51:34 When I look at LINQ for example. Jul 18 23:51:36 but when you do get it done, and have it all working nicely, it all just falls in to place Jul 18 23:51:38 Only a small framework... Jul 18 23:52:44 I thought this Database / ContentProvider / CursorAdapter / ListView / Fragment combo was stupid and "wtf would I want that" as well, before I actually started using it. And having done this shit in many different ways in the past, this is the most elegant. Jul 18 23:53:49 Yeah - Fragments took me a little bit to understand Jul 18 23:53:51 BUT SO USEFUL! Jul 18 23:53:53 its part fault of the API, part lack basic classes in the framework, and part because its just copmlicated Jul 18 23:54:26 for example, you could probably pretty easily write a BaseContentProvider class that provides read-only access to a table Jul 18 23:55:08 that you'd jsut override and set a table name or something Jul 18 23:55:17 but it's not there ... Jul 18 23:55:36 Im pretty sure that goes along the lines of what is used at work Jul 18 23:55:46 What do you guys make of an object that contains only a hashmap Jul 18 23:56:00 this hashmap is used in place of variables and getter/setter functions Jul 18 23:56:22 But can be used to hold anything that is not a complex object Jul 18 23:56:22 blenderfodder ? Jul 18 23:56:23 Bundle? Jul 18 23:56:43 ah yes, Bundle will also do nicely :D Jul 18 23:56:44 No, a custom class created by a guy at work which works in his framework and does everything Jul 18 23:56:59 Got a database? This all the contents can be stored in this object Jul 18 23:57:04 Got an RSS feed? This object will hold it Jul 18 23:57:07 is he a lua developer ? :D tables everywhere Jul 18 23:57:18 so it's sort of like my trashcan Jul 18 23:57:20 Nope haha, he started out in C++ I believe Jul 18 23:57:25 everything can fit in it, but it's hell to take things out of it Jul 18 23:57:33 Hahaha Jul 18 23:57:38 spaghetti everywhere Jul 18 23:57:41 You kind of have to know what is in there to get it out Jul 18 23:57:51 yeah well a Bundle pretty much works that way Jul 18 23:57:58 but I get his idea Jul 18 23:58:00 But when developing the apps that gets done at work, you do know. Jul 18 23:58:05 I've used it in magic OR mappers in the past Jul 18 23:58:47 Does it seem like a good idea or a bad idea? Jul 18 23:59:06 regardless Jul 18 23:59:12 it's certainly not "well modelled" Jul 18 23:59:19 Yeah Jul 18 23:59:24 Everything is stored as a string. Jul 18 23:59:28 lol Jul 18 23:59:31 I have argued this with him Jul 18 23:59:32 it can have its uses - again with Bundle - it's used everywhere Jul 18 23:59:50 That was the idea of it for him though Jul 18 23:59:54 It could be used everywhere Jul 19 00:00:12 Anthaas sounds like he's using the wrong language; when you fight against it like that Jul 19 00:00:20 google "why variants are a bad idea" Jul 19 00:00:26 I'm just making it up, but I'm sure you'll find a convincing argument Jul 19 00:00:28 First Jul 19 00:00:36 I must google "What is a variant" hahaha Jul 19 00:00:52 variant is type from Visual Basic that can hold anything Jul 19 00:01:03 touted both as the best and worst feature of Visual Basic Jul 19 00:01:13 depending on who you talk to Jul 19 00:01:39 Anthaas is he using boost::variant or something ? Jul 19 00:01:44 it's just a joke, but it goes to illustrate that this debate has been going on for a long time Jul 19 00:01:52 crossing multiple languages Jul 19 00:01:54 Ahhh Jul 19 00:02:01 And I don't believe so. Jul 19 00:02:18 Do you want a 'trashcan' class? Or are you going to do the work to model your code ? Jul 19 00:02:38 either answer can be right Jul 19 00:02:43 The reason for it was to save time (after being given unreasonable deadlines) Jul 19 00:02:50 i guess python devs may also be inclined to keep stuff in a dictonary Jul 19 00:02:50 Im a huge advocate of re-readable code Jul 19 00:03:04 If you can't read it again and completely understand it in 2 months, you've done it wrong. Jul 19 00:03:11 Not necessarily the code is wrong Jul 19 00:03:14 But the style is. Jul 19 00:03:21 time concern is the #1 reason for cutting corners Jul 19 00:03:34 He is an advocate of, and pardon the language, "Fuck it, it works, next..." Jul 19 00:03:53 Cutting corners is the #1 reason things go wrong at work. Jul 19 00:03:55 and while some will claim the maintenance overhead will kill any advantage that cutting corners brings ... I do not necessarily agree. Jul 19 00:04:12 no, the #1 reason things go wrong at work is because your boss doesn't know what he's doing. Jul 19 00:04:22 Thats true hahah Jul 19 00:04:29 But thats not new news hahaha Jul 19 00:04:32 if he did, your coders would have enough time to not write spaghetti code Jul 19 00:04:40 Completely agree Jul 19 00:04:41 but get this Jul 19 00:04:42 Chainfire: not always true Jul 19 00:04:44 they still would Jul 19 00:05:01 "Fuck it, it works, next..." is a valid way of working Jul 19 00:05:04 it just depends on what your goals are Jul 19 00:05:06 sometimes a boss that know a bit, or has a background in a dicapline from the shop floor is worse than one that knows nothing Jul 19 00:05:35 See, I'd like to say I wouldn't. The reason being I take a lot of pride in trying to get my code as correct as possible. When time gets cut, the ability to do that gets taken away... Jul 19 00:06:05 StingRay_: That would be the case if and only if the boss that knew nothing listened and took advice from those who do. Jul 19 00:06:10 StingRay_ your boss doesn't need to understand anything about you're doing to give you enough time to get it done :) Jul 19 00:06:18 My boss wants to build Rome in a day. Jul 19 00:06:37 Chainfire: I dont think thats true at all Jul 19 00:06:58 well I guess it depends on the size of production and the methods in use for project management Jul 19 00:07:05 Anthaas that is also a valid standpoint. However, your goal is to write "perfect" code, while somebody else's goal may be to work on many different things, and just get this shit working so they can spend their time elsewhere Jul 19 00:07:23 Its not necessarily perfect code Jul 19 00:07:26 in a small team, probably true, in a > 100 team, no, not really the case Jul 19 00:07:55 But clean, re-readable, bug-free code such that in a weeks time, I don't have to go back to it because I have missed something because of the short deadline. Jul 19 00:09:51 StingRay_ really? If you tell him something takes 200 hours, and he says you're getting 100 hours only, it doesn't matter if he could do your job or not, he's not going to, you have to, and if you can't do it in that time, the deadline is bogus regardless Jul 19 00:10:23 faced that many times Jul 19 00:10:30 and thats not what I said Jul 19 00:10:32 :) Jul 19 00:10:51 Haha cute. The documentation of the project said 160-200 hours, I got 48 Jul 19 00:11:29 I was saying, in bigger teams that I have been part of, in the 100+ range, bosses with knowledge enough to make those choices are sometimes good Jul 19 00:11:32 Whilst also getting called off of it to do other tasks Jul 19 00:11:43 I can imagine that not being the case with < 20 Jul 19 00:11:46 100+ team? Jul 19 00:11:48 * pfn headscratches Jul 19 00:11:59 pfn: people Jul 19 00:12:02 I only managed to complete it by staying late, working through lunches, and completely zoning myself out when on task. Jul 19 00:12:03 workers Jul 19 00:12:04 ants Jul 19 00:12:06 :) Jul 19 00:12:13 I know, a 100+ size team is not functional Jul 19 00:12:23 huh?? Jul 19 00:12:29 When I first said that 6 days was not enough to complete a 160-200hour job, I got told to pull my finger out.... Jul 19 00:12:37 if that were at all the case, you would never play any console games Jul 19 00:12:48 well not the big ones neways Jul 19 00:12:52 you're talking about different teams Jul 19 00:13:25 ah, maybe Jul 19 00:13:31 well different production I guess Jul 19 00:13:32 Anthaas a week has 168 hours... Jul 19 00:13:38 a team is a team ;) Jul 19 00:13:47 8 hours a day Jul 19 00:13:50 5 days a week Jul 19 00:13:55 it has 40? Jul 19 00:13:57 well yeah but you're talking about everybody working on the product, and he's probably referring to the group your work intimately with Jul 19 00:13:59 Anthaas: what? that's 144 hours. should be plenty :) Jul 19 00:14:33 Hahha Jul 19 00:14:39 But that is how my manager sees things Jul 19 00:14:43 24/7 programming Jul 19 00:14:45 Not happening. Jul 19 00:14:55 Ive started taking my lunch hour out of principle. Jul 19 00:15:03 I leave the company in 4 working days having finished my placement Jul 19 00:15:12 "Thats miles away in my world..." Jul 19 00:15:16 ....and thats the problem. Jul 19 00:15:28 Business and Development are two completely different worlds Jul 19 00:17:03 I sometimes like to do business while i develop Jul 19 00:17:06 makes me feel awesome Jul 19 00:17:14 so i'll go on amazon and purchase a doodad Jul 19 00:17:18 yaaay Jul 19 00:19:41 After all this I still need ideas or a final year project - I don't know of anywhere I could go to find a reasonable solution to a problem. Jul 19 00:20:25 guys, going a bit off topic here, does anyone know if theres a way to contact Google Play dev support? Jul 19 00:20:44 I'm having an issue with my app, its getting fake 1* anonymous ratings from a competition :/ Jul 19 00:20:52 Theres an submission form on there somewhere Jul 19 00:21:08 How do you know it is competition? Jul 19 00:21:16 Not just some really annoyed users? :P Jul 19 00:21:46 completely odd statistics Jul 19 00:21:52 http://www.droidforums.net/forum/android-applications/248954-being-gamed-google-play-ratings-what-do.html Jul 19 00:21:59 I explain it a bit better there Jul 19 00:23:49 Hmm, it does sound odd... Jul 19 00:24:07 As I said, I can't remember where, but there is a submission form on there somewhere - you have to be logged in to reach it. Jul 19 00:24:08 anyhow, even tho Im pretty sure its being gamed, Google would be able to check the IPs and devices and etc to confirm/deny it Jul 19 00:24:11 I think its in the dev console. Jul 19 00:26:41 nicely done rottz Jul 19 00:26:44 theres a support/help navigation thing, but I cant get to contact, only on help topics Jul 19 00:27:10 thanks Jul 19 00:27:45 Does anybody have any good ideas for a developer name on Android? Jul 19 00:27:52 Without cliches? Jul 19 00:28:06 (i.e. iSomething, SomethingDroid, DroidSomething, etc) Jul 19 00:28:17 AnthaasDroid? :P Jul 19 00:29:05 rottz: https://support.google.com/googleplay/android-developer/troubleshooter/2857301?rd=1 Jul 19 00:29:36 If you follow through the options on that page, you reach a contact form. Jul 19 00:29:40 And no! hahaa Jul 19 00:30:01 I couldnt reach that contact form (not without clicking on items not related with my problem) Jul 19 00:33:47 Hmm, Ive had a look but can't find anything specific to your situation Jul 19 00:33:53 Perhaps someone else might be of more use. Jul 19 00:34:00 But on that note - I must go to sleep! Jul 19 00:34:08 Goodnight everybody, and thank you all again for your help! Jul 19 00:34:10 Bye! Jul 19 00:36:16 my developer name would be SlantedFeind Jul 19 00:36:25 or DandelionCusp Jul 19 01:05:15 Hey guys - Been away from the Android dev scene for a while. Wanted to bring an old app up to 4.0+ design guidelines. Was going to use the Navigation drawer pattern but eclipse is complaining that DrawerLayout cannot be resolved. Jul 19 01:09:07 tjbiddle: right click on your project in eclipse project explorer and choose Android > Add Support Library and it will update your library to the latest revision to include the DrawerLayout Jul 19 01:09:35 Napalm: Just started reading this: https://developer.android.com/tools/extras/support-library.html#Downloading I'm assuming that's what you're talking about? Jul 19 01:10:58 tjbiddle: just do as i sa Jul 19 01:11:00 said Jul 19 01:11:04 problem solved Jul 19 01:13:44 Napalm: https://gist.github.com/thomasbiddle/6b60f828ee95290db99d - Getting an error =\. I'm on OSX Jul 19 01:14:24 Hello. Jul 19 01:14:44 tjbiddle: thats just a permissions error, at a guess Jul 19 01:16:07 StingRay_: Well I didn't expect root to be the owner of that folder. I didn't even bother checking earlier. Jul 19 01:16:50 well you should be Jul 19 01:16:59 and that should also be the problem Jul 19 01:17:12 Boom, perfect - Thanks Napalm & StingRay_ Jul 19 01:17:27 Weird - Have no idea why that folder was set to root lol. Jul 19 01:17:41 diskutil fixpermissions Jul 19 01:17:43 ;) Jul 19 01:21:15 Is this an okay chaannel for ndk questions or is there another one for ndk? Jul 19 01:23:36 ask away Jul 19 01:23:42 Here is my code: http://pastebin.com/tXV1HfPF . I get the following error for line #3: "The constructor ArrayAdapter(Main, int, List) is undefined", but I am pretty sure this constructor: [public ArrayAdapter (Context context, int textViewResourceId, List objects)] exists in this page: http://developer.android.com/reference/android/widget/ArrayAdap Jul 19 01:23:44 ter.html Jul 19 01:23:50 http://developer.android.com/reference/android/widget/ArrayAdapter.html * Jul 19 01:27:45 I've been trying to figure out how to generalize assorted opensl es ndk examples I've been finding online to write a small sound engine that can play sound samples and then call a callback procedure when its finished, but every example I've found does it so differently that I haven't been able to generalize a solution, and now I'm completely lost. Jul 19 01:29:54 Hey guys, as part of the end of a wizard i want to take user to lock screen (not turned off but turned on). How can i achieve this Jul 19 01:30:11 The few examples that do seem to come close to doing what I want are described in the context of some unique framework that is specific to the application and it's difficult to filter out what's extraneous. Jul 19 01:31:43 Alright, so apparently getActionBar() needs at least API level 11. Is there a way for me to stay at 5? 33% of my app's users are still on gingerbread it looks like. And 11 is 3.0 I think? Jul 19 01:35:27 I'm assuming that's where ActionBarSherlock comes in. Nevermind - Starting to remember things now :p Jul 19 01:36:33 Can I have an app with no activity or service but only BroadcastReceivers Jul 19 01:46:14 Manavan: pretty much your question http://bit.ly/1aVRn1j Jul 19 01:46:29 I see answer on 2nd link in SO post ? Jul 19 01:46:55 Thanks StringRay! Jul 19 01:47:51 I actually have across those posts but wanted to confirm before going in that direction. Jul 19 01:47:56 will try Jul 19 01:48:21 it's a bit odd the change in 3.0 Jul 19 01:48:33 well I guess people were abusing it with phishing stuff Jul 19 01:48:33 yes, that's more or less how 'share' things work Jul 19 01:48:43 they get the file share broadcast Jul 19 01:50:22 tjbiddle: That's the idea! Jul 19 01:52:09 JakeWharton: Heh, I actually tabbed 'jake' to see if you were in here right after I thought about it :-). Jul 19 01:53:30 StingRay > If you are talking about Broadcast Received in Stopped State. Its not a problem, I can add a flag to look for Stopped ones when i am sending the broadcast. Jul 19 02:09:39 I imported the source of a library into my app and have generated an apk-file. But now I'm getting a NoClassDefFoundError that is dying on R.styleable.DragSortListView. Jul 19 02:10:01 it looks like the imported library is not able to find it's own resources. Jul 19 02:10:07 I can see the stylable in res/values/dslv_attrs.xml Jul 19 02:10:15 This library works fine in the demo but is dying with this NoClassDefFoundError ... any idea what I did wrong when I imported the library? Jul 19 02:13:59 look at the import of your class Jul 19 02:14:15 is the import pointing to the resources of your library or your own resources Jul 19 02:15:49 What is the battery consumption of leaving Bluetooth on at all times, and running discovery every 1 minute? I would like my app to discover when the phone is near the bluetooth headset. Jul 19 02:16:50 just in case, everytime I run into those kind of problems before I look for the possible bug I first try a sanity IDE check: refresh all resources, do a full clean/rebuild, in case of library problems remove/readd the jar or reference Jul 19 02:17:48 jwalker60: that would be just asking the phone never to sleep I would expect Jul 19 02:18:02 dam good if you need to drain the battery quickly Jul 19 02:20:14 rottz: ok, I've done the "clean all projects" then rebuilt. (And I did at command line as well.) But maybe I should try a remove/readd. Jul 19 02:20:33 StingRay_, yes, but let's say I do it every 15 minutes, is the bluetooth very battery consuming? Jul 19 02:21:05 rottz: this the first time that I've added library source to my code. And I've already corrected a number of errors. Jul 19 02:21:11 I would be more worried about the phone being in a wake state so often Jul 19 02:21:16 doesn't BT automatically connect if a paired device comes into range? Jul 19 02:22:46 Leeds: I would imagine on if awake Jul 19 02:23:10 roadfish how did you add it? Jul 19 02:23:34 lasserix: what do you mean by "import of your class". Are you talking about Build Path or the "import" statement in my code or the library path in the layout file ... or something else. Jul 19 02:24:08 rottz: Import > Existing Android Code into Workspace Jul 19 02:24:33 that to create a new project (for the library), right? Jul 19 02:24:45 then how did you link that project-library to your main project? Jul 19 02:24:48 rottz: although I might have done "Existing Projects into Workspace" at one point. Jul 19 02:26:06 rottz: I imported a existing library, DragSortListView. I copied the directory from the DSLV project that included the library as well demo code. Jul 19 02:27:58 rottz: I'm not use what you mean by "create a new project (for the library)". Is each top level entry in the "Package Explorer" a "project"? Jul 19 02:28:15 (I'm still somewhat new to Android and Eclipse) Jul 19 02:30:56 rottz: "how did you link that project-library" ... ok, I have been meandering in the IDE for a few hours (and messed things up at time). But in the end, I when into Java Build Path and then did an "Add Jars". Jul 19 02:31:05 roadfish: starting from the beginning, assuming this thing you are using is a library, you should: 1) create a project for your app (lets call it project A), 2) download the source code for the library, 3) import the source as an existing separate project on Eclipse (project B), 4) from project B, open the project properties, then Android, then on the bottom "Add Library", then select Jul 19 02:31:06 Project A Jul 19 02:32:23 no, dont do that for Android projects. Remove from there, if you have the JAR built forget all I said Jul 19 02:33:00 if you have the JAR simply do step 1 (create your android app project), then drag the JAR onto the "libs" folder it creates automatically for you inside the project Jul 19 02:33:11 then do a full refresh/rebuild Jul 19 02:33:17 rottz: I just imported the JAR because I got desperate at one point. Jul 19 02:33:37 thats the correct approach for java projects, but for Android theres this "trick" Jul 19 02:33:46 just copy the JAR onto the libs dir Jul 19 02:34:37 I have actually successfully imported a few JAR file already, namely super-csv-2.1.0.jar svg-android.jar ... and they have been working great. Jul 19 02:35:02 Maybe I should have also imported DragSortListView's JAR file as well ... instead of importing the source code. Jul 19 02:35:37 for super-csv and svg-android, I did what you said. I just copied them to the libs dir. Jul 19 02:37:28 yeah, if you have the JAR then certainly go that way Jul 19 02:37:37 rottz: the only problem is with how the DragSortListView demo uses the library. It has a demo and library directory. And the demo seems to makes use of some resources from the library. Jul 19 02:38:14 but I would guess those are 2 separate projects, right? Jul 19 02:38:39 so I thought that I had to import the source of library to make use of this resource. Jul 19 02:38:59 rottz: yes, there are two seperate projects in DragSortListView Jul 19 02:39:15 you could do that, just follow those 1-4 steps I mentioned Jul 19 02:39:25 but having the JAR simplifies the process Jul 19 02:39:49 you would want the source there only if you wanted to change/test something on the library code Jul 19 02:40:21 other than that, it is rarely a good idea to have the library there Jul 19 02:40:29 as a project, with source Jul 19 02:41:02 ok, I'm leaning to the JAR approach now. and I'll see if the resource can be used with just the JAR file. Jul 19 02:42:06 rottz: thanks. some good comments to think about ... and I might try your 4 step approach too. Jul 19 02:43:17 out of curiosity, is everyone here moving to Android Studio or are some people sticking with Eclipse? Jul 19 02:43:30 I don't know how much my efforts would have been different with Android Studio. I just wanted to get this DragSortListView library into my app before I tried out Android Studio. Jul 19 02:47:10 I didnt try AS yet, I was asking the same thing here today Jul 19 02:47:17 I was advised to not try it yet, too buggy Jul 19 02:47:52 i stand by my statement too :P Jul 19 02:47:59 ok, thanks for the tip. Jul 19 02:48:11 bankai_: what was your statement? Jul 19 02:48:25 AS is shit Jul 19 02:48:40 ok, so maybe it should be called ASS instead Jul 19 02:49:03 that's an insult to donkeys Jul 19 02:49:23 lol Jul 19 02:58:18 how is Android development with Scala these days? Jul 19 02:58:49 Am I likely to hit any limitation that otherwise I would not encounter if I used Java? **** ENDING LOGGING AT Fri Jul 19 02:59:58 2013