**** BEGIN LOGGING AT Sat Jan 18 02:59:59 2014 Jan 18 03:06:53 join #android-studio Jan 18 03:09:12 HelloUniverse is sick Jan 18 03:10:45 hi, why this condition is always false if (navigation_level.toString() == "1") while in debugger the value of navigation_level is 1. navigation_level is string variable but still converting to string. Jan 18 03:11:50 string cmparison sometime does not work, can someone tell me why? Jan 18 03:13:36 because strings are objects, not primitives Jan 18 03:13:46 you are basically comparing pointers and those points to different objects Jan 18 03:13:53 use .equals Jan 18 03:14:04 "1".equals(navigationLevel.toString()) Jan 18 03:15:57 jaami-win, use .equals, with strings, not == Jan 18 03:15:57 or .equalsIgnoreCase() Jan 18 03:16:03 JakeWharton: ah, that was sure trick of java. :) thanks for help. Jan 18 03:16:19 LewsTherin: for all those lowercase 1s :) Jan 18 03:18:18 JakeWharton, heh Jan 18 03:18:20 oh okay , thats how case is ignored. thank you LewsTherin . Jan 18 03:18:31 I'm sure he has words and letters he's comparing as well. Jan 18 03:18:43 jaami-win, you're welcome Jan 18 03:19:14 also, jaami-win, do the "reverse" comparison, when using literal strings, as JakeWharton did above Jan 18 03:19:32 Otherwise, if navigationLevel is null, you Jan 18 03:19:36 ll get an NPE Jan 18 03:20:36 yeah i was only joking Jan 18 03:20:43 oh i thought he just gave another way to do the same thing but there was difference. this is sure good channel for learning Jan 18 03:21:17 joking? Jan 18 03:21:26 jaami-win, you should also be asking these things in ##java :P Jan 18 03:21:44 This channel is more for helping those who have a solid grasp on how to use Java. Jan 18 03:21:55 oh , okay that is nice tip for sure. Jan 18 03:22:01 jaami-win, he was joking to me, about the lowercase 1s Jan 18 03:22:29 nooo worries, you guys have a great day. Jan 18 03:22:59 You too. Jan 18 03:23:26 don't tell ##java that you are doing android Jan 18 03:23:40 they seem to forget that the channel isn't called ##jvm Jan 18 03:23:41 hehehe :) Jan 18 03:23:59 oh okay Jan 18 03:23:59 JakeWharton, good point. Jan 18 03:43:00 ##java people seem to think android isn't java Jan 18 03:43:08 they've drank the oracle koolaid Jan 18 04:25:52 hello Jan 18 05:01:02 hello! Is is considered bad practice in a fragment to have and use a constructor with arguments in addition to the no arg ctor? (I did ask this question last night, but unfortunately got torn from the computer before I could see the answer. sorry :) ) Jan 18 05:01:24 *the required no arg ctor* Jan 18 05:38:15 .... :( very quiet in here tonight Jan 18 05:40:17 whoah weird, there's a dude in another channel i'm in called xxzz Jan 18 05:41:05 zzxx: no fragment should have a constructor with args Jan 18 05:42:04 bankai_: thanks Jan 18 05:42:18 anywhere I could read the reasons for that? Jan 18 05:42:19 if you wanna pass in info, use bundles Jan 18 05:42:31 ah right Jan 18 05:42:34 All subclasses of Fragment must include a public empty constructor. The framework will often re-instantiate a fragment class when needed, in particular during state restore, and needs to be able to find this constructor to instantiate it. If the empty constructor is not available, a runtime exception will occur in some cases during state restore Jan 18 05:42:59 ok cool Jan 18 05:43:04 also, what channel? haha Jan 18 05:43:18 freebsd Jan 18 06:39:51 any android shell experts here? Jan 18 06:40:07 ask the ? Jan 18 06:40:55 I'm trying to listen to the bluetooth port (/dev/smd3), but it crashes whenever i do Jan 18 06:41:11 show your crash Jan 18 06:41:32 i dont have anything to show :\ Jan 18 06:41:49 it's in logcat :/ u new? Jan 18 06:42:02 hang on Jan 18 06:43:39 post your logcat and your code. as logcat will tell exact line of error Jan 18 06:44:16 i'm just doing cat /dev/smd3 Jan 18 06:44:34 after 20-30 seconds, it fails until rebooted Jan 18 06:44:57 gathering logcat info... Jan 18 06:48:41 how is listening to a port == to cat'ing a device? Jan 18 06:49:13 cuz i'm a noob Jan 18 06:49:38 how would you do it? in c? something else with the shell? Jan 18 06:50:00 listening to/on a port isn't equal to just cat'ing a file. that's just reading a file, nothing todo with ports Jan 18 06:50:44 you need to redirect your thoughts of what you are doing Jan 18 06:51:09 I want to listen to the port, for a byte sequence Jan 18 06:51:28 then that'd involve networking, cat has nothign todo with that Jan 18 06:51:50 something like this? http://en.wikibooks.org/wiki/C_Programming/Networking_in_UNIX Jan 18 06:52:13 sounds like you are wanting to be a middle man,but you are confused Jan 18 06:52:45 well i'm also the end men Jan 18 06:53:15 than if you are the end man, what's stopping you from reading the input? Jan 18 06:53:26 timing Jan 18 06:53:37 it has to be as early/late as possible Jan 18 06:53:49 no, if you are end man than u have all the data, process it Jan 18 06:53:55 doing distance measurements for research Jan 18 06:54:01 early/late? that make no sense Jan 18 06:54:07 Does google play services need the android support v4 library if I'm targeting API 15+ ? Jan 18 06:54:41 rdnt: i think you need to re-evalute Jan 18 06:54:44 I mean I want to mark a timestamp as late as possible when sending, and as early as possible when receiving Jan 18 06:55:02 evaluate* Jan 18 06:55:21 I added the dependency for it and looking at the dissasembled apk I'm seeing the android v4 library included. Jan 18 06:55:55 if u are sending what's the problem, if receiving, what's the problem? i think you are not thinking clearly, if you have access to the connections Jan 18 06:56:42 I was doing System.nanoTime (or w/e) in java, but it's not getting good enough results Jan 18 06:57:08 then BT isn't the problem, it's your detection Jan 18 06:57:09 so I wanted to have a C program listen and mark timestamps Jan 18 06:58:02 rdnt: you are being very vague without code, and more of an explanation. Be more open&detailed Jan 18 06:58:12 i'm trying Jan 18 06:58:45 This is for research using Time of Flight distance measurements Jan 18 07:04:17 https://github.com/jphilli85/essentiallocalization/blob/master/src/main/java/com/essentiallocalization/connection/StreamedConnection.java Jan 18 07:08:13 So I'm going to try to make a C program to listen to the port and mark timestamps using ktime or CLOCK_MONOTONIC_RAW if possibile. Jan 18 07:08:16 Does anyone know what the fuck I'm talking about? Jan 18 07:08:23 Gradle is driving me nuts Jan 18 07:08:57 compac, idk why you need v4compat if you don't use it. I just accepted it :\ Jan 18 07:09:45 There was actually something in there that wasn't in the main area (ViewPager iirc) Jan 18 07:10:04 rdnt, I don't need it, that's why I don't want it. I created a dummy app and it's almost 1mb, it's annoying. Jan 18 07:11:01 remove it from your project Jan 18 07:11:55 I don't have it on my project, I only included google play services as a dependency, that's why it's annoying. Jan 18 07:13:28 I see it on Project structures with 2 error saying the library isn't used but after I delete it, it reappears every time gradle is synched. Jan 18 07:23:06 hey, i was wondering which method in an activity gets called when the user switches away from an app Jan 18 07:25:29 or when the app is closed Jan 18 07:26:14 i am guessing onPause()? Jan 18 07:27:26 nevermind i think the answer is onUserLeaveHint() Jan 18 08:27:55 can I install apps from PC without enabling developer options? Jan 18 08:28:59 you could push over MTP, then use a local file manager to install - assuming you've got non-play-store installs enabled Jan 18 08:29:50 oh good Jan 18 08:30:31 Leeds surprised you didn't recommend xfer via bluetooth :) Jan 18 08:32:39 g00s: I'm old-fashioned, to me "PC" means desktop, which mostly means no BT Jan 18 08:32:58 I have BT installed :) Jan 18 08:35:07 operation successful. Patient died Jan 18 08:35:08 hehe Jan 18 08:35:20 Just kidding :) Jan 18 08:44:45 well great start of the day. Now I can test my softkeyboard on tablet and smartphone simultaneously Jan 18 08:45:44 I bought keyboard for iPad, rapoo 6300 instead 6100 and I can't use national special fonts... what pains a lot. Jan 18 08:46:14 I tried with sgs4 and nexus7 but it works the same, there is no special signs. Jan 18 09:16:20 should I be uploading a photo through async task Jan 18 09:16:31 or is the standard way without async task? Jan 18 09:21:33 LoneSoldier728: asynctask or intentservice are common ways to solve the problem Jan 18 09:21:48 an intentservice is fine for giving user notification bar feedback at the same time on the progress of upload Jan 18 09:24:15 for instance, if you use URLConnection, you will have an OutputStream where to write the image in small chunks and can tell the UI to refresh after each chunk Jan 18 09:27:36 alankila, got any apps i can buy? Jan 18 09:28:34 rdnt: nah, forget about it. I have one but I've open sourced it, just lost the password to the keystore so can't update the version on market. So awkward. Jan 18 09:29:01 in fact maybe it's time to delete it and upload it anew... Jan 18 09:29:30 last time I used the play store it was such an irritating piece of work. I hope they've fixed it a lot by now Jan 18 09:30:06 better, but still not a simple process Jan 18 09:32:05 it Jan 18 09:32:11 its pretty simple.. Jan 18 09:33:24 Looks like I can't even delete an application Jan 18 09:33:32 no you can't Jan 18 09:33:37 what on earth is this crap. You'd think such an elementary operation would be supported Jan 18 09:33:45 play store still seems to be missing basic stuff, like coupon codes Jan 18 09:34:18 * alankila sends some mild amount of hate google's way Jan 18 09:34:31 duck duck g00s Jan 18 09:34:31 also, i think they should do what itunes does, show comments / rating for your country only **** BEGIN LOGGING AT Sat Jan 18 09:59:03 2014 Jan 18 09:59:04 I have tried changing all folders to non-read only and pushing the picture to the sdcard folders Jan 18 09:59:47 unless it is easier for someone to tell me how to make my device work with localhost whichever can be done just so i can test pictures : / Jan 18 10:27:25 can i post a picture to the servers from an emulator Jan 18 10:39:19 LoneSoldier728 sure Jan 18 10:51:29 There. What a bother, but I published a couple of free apps Jan 18 10:57:25 Hello world! Jan 18 10:58:01 I'm starting to think I should create a "View" for my layout that I want to re-use on a lot of places, but also add some logic to. Does that seem reasonable? Jan 18 10:59:11 More precisely, it's my take on the "card" look&feel, and I'd like to encapsulate the functionality a bit. Jan 18 11:00:18 n20: don't understand what you are talking about. Maybe someone else does. Jan 18 11:00:40 views with behaviors sounds like fragments to me. perhaps you want to make one of those. Jan 18 11:00:51 alankila: Nope, it's probably me lol, I'll try to explain it a bit better :) Jan 18 11:02:12 n20: extract include? Jan 18 11:02:36 http://developer.android.com/training/improving-layouts/reusing-layouts.html Jan 18 11:03:08 come on you guys, cards are the not-so new hot! Jan 18 11:03:36 AbelianHorizon: I'm already utilizing includes at the moment, but I thought I'd create some sort of general View that I just add convenience methods to and whatnot. :-) Jan 18 11:04:01 extend View? Jan 18 11:04:57 AbelianHorizon: Yeah, that was what I was thinking of. Is that the best way to approach it? Jan 18 11:05:10 g00s: But... but... it looks so nice! Jan 18 11:05:16 :) Jan 18 11:07:10 there are card libraries available on github, either use them or see how they do it? https://github.com/afollestad/Cards-UI https://github.com/gabrielemariotti/cardslib Jan 18 11:07:25 but yes, i think that is what you want, extending a view Jan 18 11:11:03 for example, this guy extends LinearLayout for his custom card class https://github.com/gabrielemariotti/cardslib/blob/master/library/src/main/java/it/gmariotti/cardslib/library/view/BaseCardView.java Jan 18 11:11:16 hi all Jan 18 11:12:25 with all the hardness and breakage i bump into my new android development road, i keep looking for a greener grass in phongap and the likes. how do you keep sane and not run away to those other cross-platform frameworks? obviously almost any app I develop I guess I can also build for iOS Jan 18 11:13:01 the only thing i can imagine, is that developing native saves me UI customization time - getting the exact look an feel of the OS. Jan 18 11:14:00 they're shite Jan 18 11:14:20 if i'm looking at an app like okcupid (they built it html5/js/css on their own webkit wrapper) - it feels almost native, and looks great. i'm wondering if there's any point anymore Jan 18 11:14:52 must admit i haven't seen that app, but facebook originally went down that road and their app was notoriously bad Jan 18 11:15:47 well I'm very impressed with okcupid. it's almost as packed as the Facebook app, because in its core it is somewhat of a social network. it works very fast, faster than some native apps and on-par with my Facebook app on the same device Jan 18 11:16:18 (also you just totally outed yourself as an okc user, ha ha!) Jan 18 11:16:27 i'm an okc user. sure Jan 18 11:16:55 if that's a shame - too bad. i can tell you i date 2 girls in parallel, and the sex is awesome :) Jan 18 11:17:02 AbelianHorizon: Good idea, thanks! I think I'll probably do something similar. :) Jan 18 11:17:12 cool Jan 18 11:18:15 Given that my computer logged me off IRC for a few minutes, I'll just assume pellis is actually talking about android in a previous message. :) Jan 18 11:18:15 storkme, you're missing out. both on the app experience and the girls :) Jan 18 11:18:30 n20, haha Jan 18 11:18:37 if you say so Jan 18 11:19:38 to a minimum degree Jan 18 11:19:57 anyway their latest update to the app knocked me off balance. it really shows you can get almost native on a webkit app, and it's not snake oil. Jan 18 11:20:14 i'm just waiting for g00s to say something funny Jan 18 11:24:20 never used any dating websites; my advice to finding someone is to donate your time to a special cause; you'll often find interesting people that know how to love, because they know how to give … themselves Jan 18 11:25:28 date people similar to yourself in interests, but they can't have the same weaknesses Jan 18 11:25:39 you should know if someone is worth persuing in 2 dates Jan 18 11:25:52 it takes 2 years to know somebody well enough to propose Jan 18 11:26:00 thats my advice ;) Jan 18 11:26:39 g00s: i disagree Jan 18 11:26:51 Sometimes you know in a heartbeat Jan 18 11:27:10 DarkSlay3r i follow the research Jan 18 11:27:22 I am the research Jan 18 11:27:24 divorce rates drop after dating period of 2 years Jan 18 11:27:34 no you are a single point, an anecdote Jan 18 11:27:36 it takes < 5 seconds to know if someone is hot or not Jan 18 11:27:48 well, actually about 300ms Jan 18 11:27:48 forget about the rest, that comes along if it does :- Jan 18 11:27:51 p Jan 18 11:28:12 your subconscious sizes up someone in less than a second, several hundred parameters Jan 18 11:28:21 (for 'hotness') Jan 18 11:28:21 alankila: it defies spacetime Jan 18 11:28:29 but I'm on a long term relationship so any advice I might have is absolutely theoretical. 13 years now I guess. Jan 18 11:28:30 I can tell if someone is hot without looking Jan 18 11:28:42 with over 90% accuracy Jan 18 11:29:10 Look it's simple Jan 18 11:29:18 If you want a happy relationship Jan 18 11:29:27 http://stackoverflow.com/questions/21203411/image-not-post-ing-android Jan 18 11:29:33 Learn to compromise Jan 18 11:29:38 anyone understand what is going wrong there - <3 Jan 18 11:29:40 LoneSoldier728: Can't you see we are busy Jan 18 11:29:51 SO is becoming a cesspool Jan 18 11:29:57 Can you believe this guy? Jan 18 11:30:17 LoneSoldier728: what, file not found exception stymies you? Jan 18 11:30:28 DarkSlay3r compromise is important. the most flexible person is usually the one that keeps the relationship together Jan 18 11:30:37 the relationship is controlled by the one who cares the least Jan 18 11:30:49 lol Jan 18 11:30:58 stymies? Jan 18 11:31:03 LoneSoldier728: your fileuri is from 'buri', whatever that is. Jan 18 11:31:22 did oyu mean new Filename(sourceFile) Jan 18 11:31:42 well basically the buri is the image selected uri Jan 18 11:31:55 well it says something like image=11 apparently Jan 18 11:31:57 but i wasnt sure if i was having problems with it because of using an emulator Jan 18 11:32:19 so i hardcoded the buri to = to the sd card's image Jan 18 11:32:22 on the emulator Jan 18 11:32:29 LoneSoldier728: no you did not. buri is not hardcoded Jan 18 11:32:40 sorry i mean Jan 18 11:32:41 filename Jan 18 11:32:42 at least, not in this snippet Jan 18 11:32:49 LoneSoldier728: yes, but you are not using the filename Jan 18 11:33:01 ah Jan 18 11:33:03 good catch Jan 18 11:33:08 or well, you are, but not when it comes to FileInputStream Jan 18 11:33:08 didnt realize i didnt make the change Jan 18 11:33:24 why does buri not work is it because it is an emulator btw? Jan 18 11:33:48 I've no idea what that is, but I'm pretty sure it doesn't reference a valid file name, as you can get from the error saying File not found Jan 18 11:33:55 that is imho quite clear Jan 18 11:34:19 right i see the filepath too Jan 18 11:34:48 i was trying to connect my device to the localhost Jan 18 11:34:59 but not sure how to do that exactly still Jan 18 11:35:13 the "localhost" is the device itself Jan 18 11:35:20 you mean, connect to your pc? Jan 18 11:35:22 ya Jan 18 11:35:43 it's easy, work out your pc's hostname or ip, and connect both to same network Jan 18 11:35:59 I use device over wlan with my laptop quite often Jan 18 11:36:14 adb is over wifi too so I can dispense with the irritating usb cable Jan 18 11:36:44 is it suppose to be saying skipped 36 frames? Jan 18 11:37:19 yeah i tried to go to the same ip Jan 18 11:37:32 but it takes forever to load Jan 18 11:37:44 and it ends up saying oops Jan 18 11:37:47 01-18 06:36:48.372: W/InputEventReceiver(7867): Attempted to finish an input event but the input event receiver has already been disposed. Jan 18 11:37:47 01-18 06:36:48.372: W/InputEventReceiver(7867): Attempted to finish an input event but the input event receiver has already been disposed. Jan 18 11:37:47 01-18 06:36:48.372: I/Choreographer(7867): Skipped 87 frames! The application may be doing too much work on its main thread. Jan 18 11:37:47 01-18 06:36:48.372: W/ViewRootImpl(7867): Dropping event due to root view being removed: MotionEvent { action=ACTION_UP, id[0]=0, x[0]=287.0, y[0]=-358.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=5442878, downTime=5442722, deviceId=0, source=0x1002 } Jan 18 11:37:48 eh, I don't know what is up with that ui thread stalling Jan 18 11:37:52 don't copypaste here Jan 18 11:37:57 ya oops Jan 18 11:38:03 was trying to paste somewhere else Jan 18 11:38:33 http://pastebin.com/1wwSnBf5 Jan 18 11:38:55 I got the post this time on my server side, does that error have to do with my server or android Jan 18 11:39:01 morning all Jan 18 11:39:23 well these are generated by your android device and reference rate of display updates and touch events Jan 18 11:39:26 what do you think? Jan 18 11:40:12 yeah but I am getting on my server side errors saying canno call method 'split' I actually am unsure how to retrieve it on the server side as i do with websites as req.files Jan 18 11:42:07 HTTP Response is : Internal Server Error: 500 :/ appeared after Jan 18 11:42:33 well not knowing anything I'd say your http request is not valid Jan 18 11:42:51 if you just say it's multipart/form-data and then dump the binary file as request body, this is violating the spec Jan 18 11:42:57 well the okcupid app is a hybrid. looks like slide menu, top bar are all native Jan 18 11:43:07 just sniffed its HTTP requests :) Jan 18 11:43:10 oh wait I see you do more work Jan 18 11:43:10 sorry Jan 18 11:43:51 I guess this could actually be valid Jan 18 11:46:10 yeah definitely check out how to access uploads in server-side code next Jan 18 11:46:17 I can't find an error in the http request body Jan 18 11:46:33 not thrilled about your weak ***** boundary though Jan 18 11:46:58 ya ok Jan 18 11:47:20 well alankila i am up for other ways I was trying multipartentitybuilder Jan 18 11:47:22 I wish I could go back in time and punch the person who put mime multiparts into the spec Jan 18 11:47:25 and kept getting errors Jan 18 11:48:49 the boundary ambiguity for instance causes newlines at end of http posted values to get dropped Jan 18 11:49:12 doesn't sound very important to some, but if you are calculating cryptographic sums about this sort of shit then it is suddenly important Jan 18 11:50:11 and the mime spec is pretty awkward for this stuff. Why use a boundary, why not just provide Content-Length? Jan 18 11:53:59 anyone doing the same app for both iOS and android? Jan 18 11:55:27 i am picking this because it seemed to work Jan 18 11:55:37 I have been searching hard for a good image tutorial Jan 18 11:56:47 LoneSoldier728: well, my advice at this point of time would be to figure out how to dump the http req sent by your device Jan 18 11:57:00 I often run a faux web server with netcat listening on a port and that dumps the request Jan 18 11:57:12 it provides no response but allows investigating that the form of it is correct Jan 18 11:57:27 LoneSoldier728: https://github.com/kevinsawicki/http-request#perform-a-multipart-post-request Jan 18 11:57:31 after you know what goes out, you can confidently emulate it from say html form until it works just right Jan 18 11:57:44 then hook your android app in place of the html form last Jan 18 11:57:48 I'd just not do it manually. Jan 18 11:58:17 i dont understand how that works alankila Jan 18 11:58:38 like never used "dump" or anything Jan 18 11:59:33 kakazza i rather do it manually Jan 18 11:59:36 to learn : / Jan 18 11:59:39 kakazza: heh, a nice 3200 line class that does pretty much anything one needs Jan 18 12:00:18 I've my own class for some of the common types of http reqs I have to make Jan 18 12:00:37 usually I don't need proper post request support though, so that part is actually missing in my code Jan 18 12:01:43 you never deal with POST-ing forms Jan 18 12:01:52 or anything in an app? or making an http post? Jan 18 12:01:58 custom base64 encoders too ... fun Jan 18 12:02:15 LoneSoldier728: most apis do not require post requests, that's just how it is Jan 18 12:02:27 LoneSoldier728: Not worth your time. Jan 18 12:02:33 all parameters are in the query string, and if there's file then it's almost invariably put request, and you put the raw data as the body Jan 18 12:02:36 there is no encoding Jan 18 12:02:46 anyone interested in looking at a few screenshots? 40+ hours of hard labor and lots of irritations later... Jan 18 12:03:22 well if I am trying to let a user create a user profile and during registeration want to allow him to fill out his info and add a profile picture Jan 18 12:03:28 how would I go about that? Jan 18 12:04:13 I was under the impression that I would store the info into a JSON object send it over as a POST (httpPost) and that works, and the same with the image Jan 18 12:04:26 (which is currently giving me issues) Jan 18 12:04:27 LoneSoldier728: ew. Do whatever you want. Jan 18 12:04:57 so what would be the better way, I am still learning so I am really an amateur when it comes to all this and am willing to listen Jan 18 12:04:58 the point is, the way you do it on client depends on what server will accept. Now if server can do anything and you control both ends, feel free to pick the most convenient way to do things. Jan 18 12:05:39 ya i control both sides, and I am using node.js on the server side and I am used to breaking up json but I can accept w.e Jan 18 12:06:14 e.g. application/x-www-form-urlencoded is a fine way to send key-value pairs and easy to encode, and a "put" request is great for uploading an image, just encode whose image it is by the URL Jan 18 12:06:29 this way you can avoid the travesty that is multipart/form-data Jan 18 12:07:30 is there any link or something that can show me a full example Jan 18 12:07:36 I am not sure how to work that exactly Jan 18 12:07:58 and what do you mean encode whose image it is by the url? Jan 18 12:08:23 put http://yourserver/picture/username Jan 18 12:08:29 content-type: image/png Jan 18 12:08:32 content-length: 1234 Jan 18 12:08:36 newline, and data follows Jan 18 12:08:48 the username there is dynamic part. or user id, as it may be rather. Jan 18 12:08:58 i don't think any http server will allow uploading a file that way Jan 18 12:09:06 BtbN: you would be wrong. Jan 18 12:09:20 that'd be a huge security problem then Jan 18 12:09:44 you mean I have no session id here? Jan 18 12:09:47 or no authentication tokens? Jan 18 12:10:04 the ability to upload arbitrary files to any location in the docroot... Jan 18 12:10:10 no, that's not what I'm talking about. Jan 18 12:10:16 the thing is the username is generated with the content being post-ed like the user's info, but anyways the way I am currently doing it is 2 posts on one button click Jan 18 12:10:20 you have program code handling this request. It is written by you. Jan 18 12:10:25 It does just what you want and nothing else. Jan 18 12:10:39 ya alankila i understood that part Jan 18 12:11:29 BtbN: put requests like this are fairly common when working with e.g. jax-rs Jan 18 12:11:56 first off what is the content-length exactly... the size of the file ? Jan 18 12:12:11 the size of the request body Jan 18 12:12:20 it is mandatory when doing simple requests like this. Jan 18 12:12:22 does that have to be specified Jan 18 12:12:38 or how would I know the size is there a way to call getSize or something Jan 18 12:12:54 not doing this requires the client to do chunked encoding. But the point is, doesn't matter. http libraries like java.net handle this. Jan 18 12:13:26 LoneSoldier728: if you upload a file, of course you know what size that file is Jan 18 12:14:03 anyway, I have no more time for this. Jan 18 12:14:56 ok thanks Jan 18 12:23:07 yeah what I expected I need to send the image and text in one post Jan 18 12:30:30 anyone know of any good android tutorials Jan 18 12:48:18 hey Jan 18 12:50:42 hey TGMCians Jan 18 12:52:15 I have one technical question related to apply the gesture on bitmap in the imageview @ISDP Jan 18 12:52:46 i'm not the guy to ask stuff, i don't know anything about that subject Jan 18 12:54:27 Okay but dont you do Android development?. If not then what mean to join the #android-dev IRC Jan 18 12:55:30 Anyone here who do android development? Jan 18 12:55:58 TGMCians, i do develop. Jan 18 12:56:33 Okay Jan 18 12:56:43 Dont you have any idea of my question? Jan 18 13:04:51 This isn't jeopardy, you have to ask a question before you get an answer Jan 18 13:11:53 hmm cool Jan 18 13:13:30 I have set the bitmap in the ImageView. Even I have applied the gesture also on the bitmap (Rotation, Zoom, Drag). Jan 18 13:14:08 But When I start to drag the bitmap in the imageview it works well but when do keep this same things then it goes out side the imageview. Jan 18 13:15:32 So I want to put the restriction such that it should drag until it is inside the the boudary of the imageview. Jan 18 13:15:40 Any idea to anyone to do this? Jan 18 13:51:31 I just built android-4.4.2_r1 from AOSP, and in emulator I'm not seeing any appwidgets in Launcher2 nor Launcher3. Launcher2, in particular, only shows shortcuts in its widget listing. I figured, maybe no widgets are preinstalled, so I installed a new appwidget. However, even newly installed appwidgets don't show up in widget picker. Any ideas? Jan 18 13:54:31 the 4.4.2 emulator image coming with the official SDK doesn't have this problems Jan 18 13:55:27 same this is visible here: http://ronubo.blogspot.fi/2013/11/aosp-kitkat-emulator-first-impression.html Jan 18 13:55:36 only shortcuts visible in widgets view Jan 18 13:55:50 eventhough the first page normally has at least the 2x2 analog clock widget Jan 18 13:58:24 anyone using robotium and the wrapper tools like calabash? Jan 18 13:59:45 how small screens would you support? im making a game and i guess the best way would be to just scale down the tilesize for different screensizes, but how small phones would you go for Jan 18 14:15:40 guys, is there a way I can play an edittext (for search purposes) inside a ListFragment ? Jan 18 14:42:54 hello everybody Jan 18 14:47:28 gson is quite confusing Jan 18 14:47:48 i mean, when using it with Volley Jan 18 15:19:55 async task vs multithreading which one should i use or does it depend on the situation? Jan 18 15:24:29 LoneSoldier728, those are the same things. Jan 18 15:24:39 AsyncTask is just a prettier class. Jan 18 15:25:56 LoneSoldier728, if you opt for manual threads remember to make sure they don't run all the time Jan 18 15:26:20 or users will be pissed. Jan 18 15:26:30 Display theDisplay = ( (MainActivity) context ).getWindowManager().getDefaultDisplay(); Jan 18 15:26:31 Point sizePoint = new Point(); theDisplay.getSize( sizePoint ); // why do i have to case to an extended class of Activity and not Activity itself? Jan 18 15:34:05 curried: the Activity would probably do just as well Jan 18 15:34:13 iirc it is the Activity that defines getWindowManager Jan 18 15:34:50 Mavrik, is there a online code cleaner or something? Jan 18 15:35:11 i'm using android studio and i want to reformat my code, remove all comments etc Jan 18 15:36:39 ISDP, http://prettyprinter.de/ Jan 18 15:36:57 i use it to format java codes Jan 18 15:37:10 or in eclipse, ctrl+shift+f Jan 18 15:37:39 comment removal is not done by the reflow command Jan 18 15:37:47 I don't think such facility exists Jan 18 15:38:02 Hi, there's a widget that I use often that is broken on 4.3 and newer because it uses the wrong parameters for SimpleDateFormat. Does that have to be fixed by the app's developer or can I fix it somehow? Jan 18 15:38:05 though one could easily write a simple search-relace regex to destroy all comments Jan 18 15:38:29 The literal regex: /\*(.*?)\*/ would match block comments Jan 18 15:38:53 alankila, that's neat thanks Jan 18 15:38:55 and //[^\n]* would match single-line comments Jan 18 15:39:17 this here is assuming that "." has a match-any-character interpretation, not perl's "any character but \n Jan 18 15:39:39 this would be true for java and python, and even in perl can be disabled by the "single line" option Jan 18 15:40:55 in any case if you have string literals with /* stuff inside them, that wouldn't work right. It requires tokenizing Jan 18 15:41:10 but very few people do so simple context-free analysis is fine Jan 18 16:11:53 hello Jan 18 16:11:53 heyo Jan 18 16:17:38 what is better to use async or multi thread Jan 18 16:27:25 LoneSoldier728, Mavrik already answered that for you. Jan 18 16:32:12 After you have experience using Asynctask, try Volley for much cleaner code and its a good library Jan 18 17:02:35 In getView's BaseAdapter I want to set an element (TextView) of a row (RelativeLayout) but view.getLayoutParams() returns .AbsListView$LayoutParams . Why? Jan 18 17:04:46 Because the view you're getting is the direct child of an AbsListView Jan 18 17:06:03 shouldn't I get the view of a row? Jan 18 17:07:14 I don't know, should you? Jan 18 17:10:32 SimonVT: I set the view correctly because I manage find element with id. I just want to set layout_centerHorizontal parameter on a textview. Can I do that? Jan 18 17:10:54 Sure Jan 18 17:12:33 view -> android.widget.RelativeLayout{b3749a58 V.E..... ......ID 0,-43-464,32} ; view.getLayoutParams() -> android.widget.AbsListView$LayoutParams@b36ef318 Jan 18 17:13:59 You just said your row was a relativelayout.. Jan 18 17:14:11 That would make it a direct child of AbsListView Jan 18 17:18:26 SimonVT: I got what you say Jan 18 17:20:44 What are normal colors for start and finish, like a flag for start, what color would it have and what would finish have? Jan 18 17:21:49 Hey! Im doing an app that has two fragments, one of them is a list view. When I try it on my phone it is ok, but as soon as I try it on a tablet (two pane) I get an error Jan 18 17:22:01 Here is part of my code Jan 18 17:22:10 http://pastebin.com/gj88XvcF Jan 18 17:22:24 01-18 12:20:30.642: E/AndroidRuntime(1801): android.view.InflateException: Binary XML file line #8: Error inflating class fragment Jan 18 17:22:51 SimonVT: so how can I get the params of my cell? Jan 18 17:23:29 Also this: 01-18 12:20:30.642: E/AndroidRuntime(1801): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713) Jan 18 17:23:42 01-18 12:20:30.642: E/AndroidRuntime(1801): at android.widget.SimpleAdapter.createViewFromResource(SimpleAdapter.java:121) Jan 18 17:23:50 Well, if you want to get the layoutparams of your textview you'd call textView.getLayoutParams Jan 18 17:26:24 SimonVT: what I get doesn't have addRule method Jan 18 17:27:36 guys I have to remap physical keyboard. Any ideas how to do this? Jan 18 17:28:02 I have non-rooted android devices. Jan 18 17:31:15 Then cast it.. Jan 18 17:31:15 Is handling language specified signs possible with creating virtual, transparent keyboard? Jan 18 17:39:24 SimonVT: I don't very like it but it works. Thank you Jan 18 17:40:28 What don't you like? Jan 18 17:42:06 Because I have to cast Jan 18 17:47:49 Uh.. Jan 18 17:47:50 View#getLayoutParams returns ViewGroup$LayoutParams.. I don't see how you'd do it without casting Jan 18 18:00:41 so I have a setting toggle where the user can ask my app to start listening for notifications Jan 18 18:00:48 but of course, that has to be enabled separately by the user Jan 18 18:01:01 so I startIntent android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS and pop up a toast helpfully suggesting that the user check the right box Jan 18 18:01:03 but Jan 18 18:01:08 a) is there a better way? Jan 18 18:01:13 b) how can I check whether they actually checked the box? Jan 18 18:25:10 how come if I start an activity with startActivityForResult, and then hit the back button from that activity, I don't get onActivityResult? Jan 18 18:41:52 do i have to use 32 bit libs for android sdk on linux Jan 18 18:49:54 pvl1: yes Jan 18 18:50:53 ok thank you JesusFreke Jan 18 19:16:56 i've decided that fragments are Hard. Jan 18 19:23:38 and the docs aren't great Jan 18 19:23:40 JakeWharton: I'm facing some problems using dagger with gradle. I saw the issue discussing providing example projects, but there aren't any so far. Jan 18 19:24:56 I'm currently trying to use the android-apt plugin, but I still get the "Module adapter for class com.example.MyApplication$MainModule could not be loaded. Please ensure that code generation was run for this module." error. Jan 18 19:29:13 has anybody here tried to use an ORM for Android, and would you do it again? I'm seeing ORMLite and GreenDao as possibilities, but I have concerns about stability & performance. Jan 18 19:34:54 suggestions for an advanced book covering things like custom viewgroups etc? Jan 18 19:37:08 I just heard a rumor that Android Studio is not catching any momentum? is AS dying? Jan 18 19:40:26 when you call registerOnSharedPreferenceChangeListener, do you get notifications for settings that changed before it was called? Jan 18 19:43:58 I cant load android.support.* Jan 18 19:44:02 Anyone know how to fix? Jan 18 19:44:07 import android.support.v13.afpp.FragmentPagerAdapter; Jan 18 19:44:07 import android.support.v4.view.ViewPager; Jan 18 19:47:26 Android Studio? I'm using it. Jan 18 19:47:37 but I'm an Android rookie. Jan 18 19:48:03 Yeah im using android studio too Jan 18 19:48:17 I think its way too early to say its not getting traction because its still a preview release. No official release yet. Jan 18 19:48:26 I'm studying android usage too Jan 18 19:50:19 cigarshark: Yes - we use OrmLite in our app Jan 18 19:50:26 cigarshark: It's been a big time saver Jan 18 19:50:45 need homescreen widget template with single toggle button, similar to Power Control. Anything like that for download anywhere? Jan 18 19:50:49 cigarshark: We picked Ormlite as it allows you to use UUID as the ID field which mosh others don't Jan 18 19:51:04 cigarshark: Haven't had any performance issues, although none of our tables have more than a couple of hundred rows Jan 18 19:51:29 is there any danger in calling registerOnSharedPreferenceChangeListener twice? Jan 18 19:51:48 thanks juicessh, i'm going to try it out then. Jan 18 19:52:46 no worries - if you get stuck feel free to drop me a line - paul AT sonelli DOT com Jan 18 19:52:57 hmm JuiceSSH I wonder what app you develop :) Jan 18 19:53:12 but there's quite a lot of help online, and the dev grey is great Jan 18 19:53:30 durka42: ;) Jan 18 20:05:40 so, i am using show/hide to show and hide fragments and adding them with .add when they're not there for the first time. the issue i have is if android destroys the activity (the whole saveinstancestate flow) and then recreates it, all the fragments that have been added are rendered over each other. what is the proper way to make sure that this restore works well? Jan 18 20:05:53 the other issue i want to avoid is having the fragments get recreated Jan 18 20:09:55 Use attach/detach instead of show/hide Jan 18 20:11:03 that's what i thought Jan 18 20:11:09 It'll destroy the view instead of hiding it and it's retained through configuration changes Jan 18 20:11:21 And yeah, the fragments are recreated along with the activity Jan 18 20:11:39 the issue with that is that the views are expensive to setup Jan 18 20:11:54 so i'd like to keep them around Jan 18 20:12:22 i guess i could in Activity.onCreate go through and hide all the fragments that shouldn't be visible if i have savedInstanceState Jan 18 20:12:30 Make your views less expensive :p Jan 18 20:12:52 working on that too Jan 18 20:13:12 i guess i shall do visibility hack Jan 18 20:17:30 Why are your views expensive? Jan 18 20:32:42 I kinda wish l waited a few days to replace my phone Jan 18 20:32:43 the new moto x backs are so sexy Jan 18 20:32:43 such is the early adopter's lament Jan 18 20:32:43 and only a 25 premium Jan 18 20:32:43 the curved ones? Jan 18 20:32:43 replace Jan 18 20:32:43 or did they change again Jan 18 20:32:43 not early adopter Jan 18 20:32:43 my replacement arrived today Jan 18 20:32:43 headphone jack is defective Jan 18 20:32:44 I wll finally know if my headphone jack is defective or not when my pressy arrives lol Jan 18 20:32:44 They let me reorder and reconfigure my phone however I wanted Jan 18 20:32:44 Nexus 5. Jan 18 20:32:44 is goddamn sexy! :D Jan 18 20:32:44 but the wood backs became available on Friday and I ordered my replacement on Thursday.. m Jan 18 20:32:45 no but seriously, this is a dev channel Jan 18 20:32:57 moto x is the best android phone available now Jan 18 20:32:59 =u Jan 18 20:33:02 I can't wait to get it http://www.kickstarter.com/projects/556341540/pressy-the-almighty-android-button Jan 18 20:33:41 that's pretty cool Jan 18 20:34:01 my custom lock screen app also solves this problem :p Jan 18 20:34:17 it's alright... I can't imagine what I want to do with it Jan 18 20:34:39 pfn, the CPU in the N5 is faster O.o" Jan 18 20:34:51 plan set it to some common action or run some app lol Jan 18 20:38:48 obviously set it to launch ze missiles Jan 18 20:39:13 yep maybe set it to double press lol Jan 18 20:39:13 ISDP, doesn't matter to me in daily use Jan 18 20:39:13 touches control > * Jan 18 20:39:13 touchless Jan 18 20:39:13 stupid SwiftKey Jan 18 20:39:13 I orefer hacker keyboard Jan 18 20:39:14 I don't write code or use terminals on my phone Jan 18 20:39:14 swiftkey! ftfw Jan 18 20:39:14 also, pfn, http://www.phonearena.com/phones/compare/Google-Nexus-5,Motorola-Moto-X/phones/8148,7885 Jan 18 20:39:14 if I did, I would use my external keyboard Jan 18 20:39:15 ISDP, I'm not a spec whore Jan 18 20:39:17 pfn: specs and features are all that matters Jan 18 20:39:19 just sayin' that you paid more for less :( Jan 18 20:39:29 look at how great samsung is doing! multiview spen airview! Jan 18 20:39:50 specs? meh in most cases. features? hell yes. I wont buy phone with no real keyboard Jan 18 20:40:04 probably will finally get one though bah Jan 18 20:40:08 ISDP, nope Jan 18 20:40:12 i don't care about software made by motorola etc. Jan 18 20:40:23 airtouch and stuff is fun, but useless Jan 18 20:40:44 I used to insist on a physical keyboard but then I discovered swype :) Jan 18 20:40:49 as much as i hate to admit it, i think samsung may be onto something view the multiwindow stuff Jan 18 20:40:54 i hope it makes it into core Jan 18 20:40:58 tried swype Jan 18 20:40:59 sucked Jan 18 20:41:00 i'd rather have a fast soc, enough ram and hardware functionality Jan 18 20:41:06 guess its just not for me Jan 18 20:41:11 i hate custom keyboards. onEditorAction is rough because of them Jan 18 20:41:19 yep, spec whore Jan 18 20:41:45 and most of all, android as it should be Jan 18 20:41:46 anyway, since this is a dev channel… I just fixed a really bad bug where my app was asking for device admin permissions and refusing to take no for an answer :( Jan 18 20:41:46 sorry, had to switch screens for a sec Jan 18 20:42:03 durk ouch whats you do Jan 18 20:42:16 well it was supposed to be checking whether it got approved and doing some cleanup if not Jan 18 20:42:22 your app sucks :p Jan 18 20:42:23 but instead it got caught in a loop and just relaunched the intent :p Jan 18 20:42:27 now it's all better Jan 18 20:42:30 lol Jan 18 20:42:35 meh I did worse with some bugs Jan 18 20:43:28 i still have a bug where i call a AsyncTask from a fragment and try to spawn a "loading" dialog Jan 18 20:43:29 possibly because i'm passing the wrong context because the fragment is static Jan 18 20:43:33 and it can't be not static Jan 18 20:43:55 only thing I semi wish the moto x has is an unlocked bootloader Jan 18 20:45:11 what's the bug? you can't really do UI things from doInBackground Jan 18 20:45:12 and that's only so I can rip off free tethering Jan 18 20:49:03 I can bypass exchange policies without root Jan 18 20:51:25 and without touchdown Jan 18 21:13:38 how come I don't get onActivityResult when the user presses the back button out of the notification listener settings? Jan 18 21:13:38 hmm, did you start it startActivityForResult? Jan 18 21:13:44 yes Jan 18 21:15:21 I was thinking the back button causes it to be canceled somehow Jan 18 21:16:46 but, I should still get onActivityResult with a code for cancelled Jan 18 21:16:52 it works fine when I do startActivityForResult with the device admin pref Jan 18 21:16:52 but noto the notification listener Jan 18 21:16:52 not Jan 18 21:16:58 I guess I'll just put the check in onResume Jan 18 21:17:05 which will require kind of a hack :( Jan 18 21:17:22 durka42: are you aboslutely sure? Jan 18 21:18:37 unless logcat is lying to me Jan 18 21:21:20 funkbox: ok not continuously for example one time for 10 minutes Jan 18 21:21:20 still kills battery life Jan 18 21:21:20 can you use push instead of pull? Jan 18 21:21:26 this is what services are for Jan 18 21:22:00 really it will kill my battery if I perform one task every ten minutes ? Jan 18 21:22:01 kafor7: http://developer.android.com/training/sync-adapters/creating-sync-adapter.html Jan 18 21:22:01 Ideal for battery would be to check the RSS on a server somewhere, and use GCM to push a message to the phone when it needs to sync Jan 18 21:22:12 kafor7: yes. Jan 18 21:22:25 kafor7: Every 10mins... yes Jan 18 21:22:31 even every 30 mins Jan 18 21:22:57 Every other app will see that your alarm has woken up the device, and they'll all try to get in on the action while the radio is on and do their send/receives Jan 18 21:23:14 tl;dr: it's a super bad idea. use gcm Jan 18 21:23:20 ++ Jan 18 21:23:29 gcm ? Jan 18 21:23:34 kafor7: push notifications Jan 18 21:23:37 gcm = google cloud messaging Jan 18 21:23:52 see my last suggestion regarding doing the rss stuff on a server Jan 18 21:23:58 instead of having your app constantly ask "hey is there anything new?" have a server somewhere say "hey app, there's some new stuff!" Jan 18 21:24:41 Did the two-way GCM ever make it out of invite-only beta? Jan 18 21:24:42 sorry guys I don't have time to that now I just want to finish my project (deadline is coming). Jan 18 21:24:56 Last time i checked it was just "register your interest" Jan 18 21:24:59 it's a project for my University Jan 18 21:25:21 JuiceSSH: I *think* it's available now. not positive though Jan 18 21:25:55 JesusFreke: Just checked, doesn't look like it's changed: https://services.google.com/fb/forms/gcm/ Jan 18 21:27:14 JuiceSSH, it still has the form just like CDM had at the beginning Jan 18 21:27:34 they probably give you key in matter of a day tho Jan 18 21:27:56 We shall see :) Jan 18 21:29:00 Is it time consuming to integrate my app with GCM ? Jan 18 21:29:20 I've never heard about that Jan 18 21:29:43 It's quite a big change, yes. The main difference is you would need a server to do the RSS parsing on. Jan 18 21:29:55 Then your server notifies all of the mobile devices when they need to sync Jan 18 21:30:15 ahh it's too complicated now Jan 18 21:30:23 Adding GCM into your app is pretty easy, just a broadcast receiver to receive the messages Jan 18 21:30:27 I don't have time right now Jan 18 21:30:36 and a couple of lines to register with GCM/your server Jan 18 21:31:02 If it's just a university project I would just have an AlarmManager alarm that wakes up the device every 30mins and polls like you said Jan 18 21:31:07 So I'm going to implement my solution now Jan 18 21:31:22 ok Jan 18 21:31:22 but if it is a real app, that people will use, then it's worth doing it right with GCM Jan 18 21:31:39 yes maybe I'll develop this app later Jan 18 21:31:40 Hai guys! Jan 18 21:31:46 AlarmManager yes ? Jan 18 21:31:53 I'll google it Jan 18 21:46:05 funkbox: drat. works in my separate test activity. that means I done fucked up somehow Jan 18 21:55:38 dragorn you may find this interesting http://cyber.bgu.ac.il/blog/vpn-related-vulnerability-discovered-android-device-disclosure-report Jan 18 22:07:05 this is maddening Jan 18 22:07:13 doing the exact same thing in two different apps and getting different results Jan 18 22:07:55 Random.next()? :) Jan 18 22:08:10 nope Jan 18 22:08:14 startActivityForResult Jan 18 22:08:26 meh, that's practically Random.next() Jan 18 22:08:32 * JesusFreke kids Jan 18 22:08:46 tell me about it! Jan 18 22:08:53 especially with activities I don't own Jan 18 22:09:31 Hi, I'm trying to get location data and following this guide: http://developer.android.com/training/location/retrieve-current.html Jan 18 22:10:06 However, I'm having some trouble using GooglePlayServicesUtil. It can't be resolved. Jan 18 22:11:02 Is GooglePlayServicesUtil part of the "Google APIs" package? Jan 18 22:11:52 no Jan 18 22:11:55 No, it's part of the play services library Jan 18 22:12:00 it's a separate Google Play Services library Jan 18 22:12:17 Oh right... I already did this. I installed it from under "Extras" in the SDK manager. Jan 18 22:12:31 But I can't figure out how to add it to my project and resolve the dependency Jan 18 22:12:47 fuck it, hack implemented :p Jan 18 22:13:10 Then figure out how to add it as a dependency Jan 18 22:13:41 SimonVT: Do I add it as an external jar? I'm looking for help Jan 18 22:14:09 No, it's a library project Jan 18 22:14:40 SimonVT: so import it into my workspace? Jan 18 22:16:14 "Importing existing project" ? Jan 18 22:16:19 Import* Jan 18 22:16:57 https://www.google.dk/search?q=android+eclipse+import+library+project Jan 18 22:17:19 SimonVT: Have you got dagger running with gradle? Jan 18 22:17:25 yeah Jan 18 22:17:42 More specifically, only the library project has dagger and dagger-compiler as a dependency, not the main project. Jan 18 22:18:03 I see that for the library project, the $$FooModule classes are generated, but not for the main project. Jan 18 22:18:05 :\ Jan 18 22:18:21 I use it in my main project Jan 18 22:19:29 Make a test case, put it on github, ask on stackoverflow/squares g+ community :) Jan 18 22:19:47 Well, actually, I use it in both a library and main project Jan 18 22:19:51 oh nooooo I'm an idiot Jan 18 22:19:58 startActivityForResult codes can't be negative Jan 18 22:20:00 So I guess I got it working :) Jan 18 22:20:01 0xDEADBEEF is negative :( Jan 18 22:20:06 SimonVT: Got it. Thanks Jan 18 22:20:41 durka42, there's a lesson in there somewhere :) Jan 18 22:20:56 Mavrik: vegetarianism? Jan 18 22:21:05 ;) Jan 18 22:21:14 no :P Jan 18 22:21:29 My library project exposes a module that I add to my main projects object graph Jan 18 22:21:41 SimonVT: heh, so where do you define the compile dependency? Jan 18 22:21:56 I do the same. Jan 18 22:21:57 Along with all my other dependencies Jan 18 22:22:07 And that would be where? Jan 18 22:22:29 In dependencies {} Jan 18 22:22:52 I meant, do you define the dagger dependency only in the library project? Jan 18 22:23:11 No, in both Jan 18 22:23:23 0 Jan 18 22:23:31 Is that necessary? Jan 18 22:23:31 I can try just defining in library, 2 sec Jan 18 22:23:35 Thanks Jan 18 22:27:18 in my quixotic attempt to figure out how the play-store authentication flow works internally, I stumbled upon an encrypted classes.dex file that appears to be related to ads [within the google play services framework.] Got me wondering - what function of ads needs it to be inserted in this obfuscated way? Jan 18 22:27:49 Still works Jan 18 22:28:39 sup everyone Jan 18 22:28:44 ah - to prevent fake clicks etc? Jan 18 22:29:04 ISDP: I finally fixed the bug Jan 18 22:29:27 SimonVT: Weird. I tried to add dagger to the main project, too. Now it works. Only defining it in the library project doesn't seem to work for me. Jan 18 22:29:57 Do you use a gradle-android-apt plugin or just gradle + gradle-android plugin 0.7.+? Jan 18 22:30:09 Uh, the second Jan 18 22:30:15 Dunno what gradle-android-apt is Jan 18 22:30:21 i though if you were using Dagger with a library project, instead of depending on Dagger itself you would depend on jsr330 Jan 18 22:30:21 https://bitbucket.org/hvisser/android-apt Jan 18 22:30:37 otherwise, you have to make everyone use dagger Jan 18 22:31:12 durka42, how? :D Jan 18 22:31:24 i'm nearly done with my app Jan 18 22:31:34 ISDP: android wasn't calling my onActivityResult because I used 0xDEADBEEF as my arbitrary constant Jan 18 22:31:37 but 0xDEADBEEF < 0 Jan 18 22:32:10 SimonVT: Just 'compile dagger-compiler' and 'compile dagger'? I'll try that next. For some reason I need the dagger dependency in both, library and app. Jan 18 22:32:22 g00s: 'have to'? Jan 18 22:32:38 well, if i want to use your library and your library depends on dagger ... Jan 18 22:32:49 Oh, that. Yeah. Jan 18 22:33:48 Is the grass greener in android studio? Jan 18 22:34:04 I have this FrameLayout. The idea is to expand the first view programatically which should have a black background http://hastebin.com/dojiyugoto.xml Jan 18 22:34:22 when I make the height larger in the preview, the view expands correctly, but there's no background Jan 18 22:34:34 for the first element in the layout Jan 18 22:35:42 can anyone enlighten me? Jan 18 22:36:37 ejb if you dont mind each build taking at least 30 seconds, maybe Jan 18 22:37:15 I would just get IntelliJ if you want a change from Eclipse Jan 18 22:37:28 android studio is built on it and the regular version is far more powerful imo Jan 18 22:38:39 does intellij still let you build android apps using the 'old' android plugin - that is, without gradle, etc? Jan 18 22:38:40 what should I return from onPreferenceStartFragment? Jan 18 22:39:27 g00s: yeah I don't use gradle Jan 18 22:39:44 but you can if you want Jan 18 22:40:43 it's a boolean but the documentation doesn't say what the return value means Jan 18 22:41:47 When developing an application that needs to authenticate to a remote server to fetch information from it, then I need a LoginActivity. Which should "primary" activity, aka MainActivity, the LoginActivity or the activity you goto after you login? Jan 18 22:42:23 smallfoot- check out how they did it in iosched Jan 18 22:42:36 i think you are required to log into google+ Jan 18 22:42:40 g00s, I don't know what iosched is Jan 18 22:42:51 if i recall they made that logic a base class, and all the activities extended from that Jan 18 22:43:04 ah, I see! interesting! Jan 18 22:43:05 https://code.google.com/p/iosched/ Jan 18 22:43:18 Thanks! Jan 18 22:43:27 my memory might be failing though ;) Jan 18 22:44:03 the default implementation of onPreferenceStartFragment returns true Jan 18 22:44:05 so I guess I will do that Jan 18 22:44:06 why not Jan 18 22:46:40 i still have a bug where i call a AsyncTask from a fragment and try to spawn a "loading" dialog, it can be i'm passing the wrong Context because the fragment must be static or i can't use my app. Jan 18 22:47:01 and getApplicationContext doesn't work either Jan 18 22:49:04 ISDP: some code? Jan 18 22:52:35 durka42, the erroring code has been removed, but i've pasted what i use now. http://pastie.org/private/citopsdyedqhpqir7kqcg Jan 18 22:53:06 hmm Jan 18 22:53:09 it's the commented out part that errors? Jan 18 22:55:25 durka42, yup Jan 18 22:55:55 because you can't pass the main activity context to from a static fragment to an asynctask apparently Jan 18 22:56:56 erm Jan 18 22:57:03 compile error or runtime exception? Jan 18 22:57:03 ISDP this is the canonical way of doing asynctask http://stackoverflow.com/questions/3357477/is-asynctask-really-conceptually-flawed-or-am-i-just-missing-something Jan 18 22:57:07 see hackbod Jan 18 22:57:40 og Matthias asked that! didn't know who he was back then :) Jan 18 22:57:48 ISDP, What is AsyncAPIConnector? Jan 18 22:58:00 that's the asynctask Jan 18 22:58:08 i named it like Jan 18 22:58:10 that Jan 18 22:58:11 Is it something you coded, or its in Android API? Jan 18 22:58:16 oh, its something you coded Jan 18 22:58:35 my main class is Home Jan 18 22:58:39 does json.put() needs be wrapped in try/catch? Jan 18 22:58:59 irrelevant to the issue, right? Jan 18 22:59:09 durka42, runtime Jan 18 22:59:21 nvbf Jan 18 22:59:21 Yes, irrelevant. I am just curious, as I want to do something similar Jan 18 22:59:30 sorru Jan 18 22:59:54 please do not use my code :| Jan 18 23:00:21 ISDP you dont have to worry about that ;) Jan 18 23:01:22 meh, but what's the scenario from calling the asynctask from the static fragment? Jan 18 23:01:35 and using that code to show a dialog that it's sending data. Jan 18 23:02:40 Maybe you should get help somewhere else, if you're so worried about people using your code Jan 18 23:02:47 You want help from others, but you don't want to help others Jan 18 23:03:00 You're parasiting off the free software community Jan 18 23:03:11 There are commercial support providers for Android Jan 18 23:03:56 don't get butthurt, i'm just saying that you shouldn't use my shitty code. :| Jan 18 23:04:07 it's almost pure garbage. Jan 18 23:04:23 that works because of ductape and chewing gum. Jan 18 23:04:40 duct tape makes the world go 'round Jan 18 23:04:46 I think smallfoot- misinterpreted what you meant Jan 18 23:05:11 ah, I see Jan 18 23:05:14 yes, I did Jan 18 23:05:29 Sorry about that Jan 18 23:05:48 don't worry, language barriers suck Jan 18 23:12:27 KEYCODE_SYM which one is on keyboard? Jan 18 23:13:24 I mean on physical kb Jan 18 23:13:35 anyone interested in seeing my app design? Jan 18 23:14:35 yeah! :D Jan 18 23:14:41 http://imgur.com/a/ZB9a0 Jan 18 23:15:13 oh nice Jan 18 23:15:39 how's the professionality of the design? Jan 18 23:15:43 it's for customers. Jan 18 23:16:00 looks pretty clean Jan 18 23:16:09 I'm relatively new to gradle, is there anything I can do to speed up compilation? Jan 18 23:16:19 The outlook.com address... Jan 18 23:16:39 Got everything working then ISDP? Jan 18 23:16:57 Looks good though Jan 18 23:18:19 Everyone uses gradle these days? Jan 18 23:18:29 what's gradle? Jan 18 23:18:33 I don't know Jan 18 23:18:35 jonc-1, nope Jan 18 23:18:50 still issues with the progress dialog, commented that out Jan 18 23:18:53 its like some compile thing, i think it fetches dependencies? Jan 18 23:18:58 Hiraghm: The new build system. Jan 18 23:19:01 for the rest, it's sending json to the server, so that's good. Jan 18 23:19:03 yeah that Jan 18 23:19:11 aw crap Jan 18 23:19:47 Hiraghm, check Android Studio, it pwns Eclipse. Jan 18 23:20:09 Will pwn eclipse Jan 18 23:22:44 Heyo. I'm a total novice on the Android scene, but I know my way around Linux fairly well. Anyone know what might be going on here?: I'm trying to re-assert a dodgy Wifi driver in my old CM7 thing, but it's bouncing out... http://pastebin.com/QcY39Cxh Jan 18 23:22:59 Draconicus see topic Jan 18 23:23:41 Well, I'm not trying to troubleshoot the CM7 so much as figure out what's up with the driver/card so I can try to work in my own build... Jan 18 23:23:52 dragorn, CM7 is kinda old... also note there is #cyanogenmod Jan 18 23:24:13 I don't feel like creating an entire ROM if I can potentially write in a replacement driver. Jan 18 23:24:29 would I be able to copy modules from one copy of cynogenmod to another to enable features that wheren't in my original image, or do I have to reflash? Jan 18 23:24:37 Datalink see topic Jan 18 23:24:43 smallfoot-: I would go bigger, but nobody's managed to get the camera working right beyond Gingerbread Jan 18 23:24:48 ah, mybad Jan 18 23:25:00 I'll ask #cyanogen regardless Jan 18 23:27:33 I'd still love to know how to figure out what the card is and how to replace the kernel module Jan 18 23:29:58 No takers on a simple lesson? Even a guide? I'm looking for something shell-based where I can just force-write the binary over somehow. Jan 18 23:30:49 This channel is for app dev, please take it to #android-root Jan 18 23:37:45 SimonVT: Oh. Okay. I didn't know writing system binaries wasn't the same. You must mean the java dev stuff... Sorry. Jan 19 00:04:20 I've parsed some XML and am getting an HTML string from one of the tags. This HTML string has the characters replaced (i.e. " for " ≪ for < etc.). Should I just use string.replace("≪","<"); or is there a better way? Jan 19 00:10:42 there might be & etc too, lots of entities, äet; Jan 19 00:10:55 search for a HTML entities encoder/decoder Jan 19 00:13:14 I guess I should use this org.apache.commons.lang.StringEscapeUtils.unescapeHtml Jan 19 00:17:52 Yes! Jan 19 00:17:59 That sounds very good! Jan 19 00:18:17 Unless you have the same thing somewhere under com.android.* Jan 19 00:18:30 Yeah I'll take a look Jan 19 00:21:57 It seems HTML.fromHTML() might handle it actually Jan 19 00:26:09 I'd like to port-forward [src: device, destination: usb-connected computer.] Running "adb forward tcp:nnn tcp:nnn" from the computer returns immediately, but doesn't appear to actually do the forward. Running the same command on the device returns "error: device not found" By any chance, is this feasible only on rooted devices? Jan 19 00:30:19 i have a 9 patch defined in my layout xml files and in landscape the onMeasure is returning 0 pixles but it is being drawn just fine - why is the width 0 pixles ? Jan 19 00:30:38 i mean it really isnt 0, its closer to 220 pixles wide and is being displayed just fine Jan 19 00:32:19 onMeasure doesn't necessarily return the final width, right? Jan 19 00:34:18 if you really need the final assigned width from the parent, onLayout might give better results. Jan 19 00:36:38 hmm let me rtfm that :) Jan 19 00:37:54 onMeasure is basically this tango between a view and its parent container, where they converge on a suitable width for the view. onLayout generally gets called once it's been settled. Jan 19 00:40:13 stupid laptop video crashing lol Jan 19 00:40:41 Drawables aren't measured tho, the 9patch should have an intrinsic width Jan 19 00:42:02 the width of the patch is defined by the space available to it, NOT its contents Jan 19 00:42:11 right now it has no content but it still displays correctly Jan 19 00:42:32 If you're talking about a view, it will have a measured width after onMeasure and a width after onLayout Jan 19 00:42:39 Well, yeah and no Jan 19 00:42:46 it is a view that contains a 9 patch Jan 19 00:42:56 You tell a drawable its size Jan 19 00:42:57 and the onMeasure is returning a valid height but a width of 0 Jan 19 00:43:04 It has an intrinsic size based on what is backing it Jan 19 00:43:15 but only in landscape. portratit returns the right dimensions Jan 19 00:43:16 The intrinsic size doesn't change Jan 19 00:43:56 onMeasure seems to be called 4 times Jan 19 00:44:16 why does onMEasure work in portrait but not landscape? Jan 19 00:44:35 .. Jan 19 00:44:39 What kind of question is that Jan 19 00:45:22 in portrait the onMeasure returns 219 x 213 for example Jan 19 00:45:28 in landscape it returns 0 x 200 Jan 19 00:45:30 or something Jan 19 00:46:23 That's you setting up your layout in a way that causes it to get a width of 0 Jan 19 00:46:31 onMeasure works the same Jan 19 00:47:50 then why is the patch visually right? Jan 19 00:47:55 in both dimensions Jan 19 00:50:17 SimonVT, do you know how i can let people select a date and time, unless that time on that date is already taken? Jan 19 00:50:57 i want to check if those dates/times are already taken or not by saving some kind of file on the server, or generate it there somehow by looking in the database if those times and dates are already taken Jan 19 00:52:46 Compare the selected time with taken times.. Jan 19 00:54:15 how can i do that? Jan 19 00:54:19 properly? Jan 19 00:54:34 You'll figure it out Jan 19 00:54:36 because i want to use android's time and date picker :| Jan 19 01:02:24 SimonVT, how come you never want to help me? Jan 19 01:03:41 If you want to compare the result from a date picker then you need to convert it to something you can compare to your existing data Jan 19 01:04:42 Hmm, point is that there are timeslots on each date, from 9am to 6pm, those slots are all 1 hour Jan 19 01:05:04 so if there's one slot free, that date shouldn't be disabled Jan 19 01:05:28 but if that day is full, i would like to see it greyed out in the calendar view Jan 19 01:05:36 of the DatePicker Jan 19 01:05:55 or is that something for server-side? Jan 19 01:06:35 That's for you to decide Jan 19 01:44:05 hi, app was runnning ok on mobile but now it dont but on emulator it do not crash. last change was weight for 3 buttons. or if there is any other reason then i have no idea what. can someone tell me any way to fix it? Jan 19 01:44:49 did you look at where it crashes Jan 19 01:45:27 hmm, actually my mobile has n drivers for windows. i cant debug app on mobile Jan 19 01:45:41 no drivers*** Jan 19 01:47:33 anyway to see where app crash on mobile? is there a way to generate log file on device when app execute? Jan 19 01:47:56 just connect it to the computer, and you can use logcat in real time Jan 19 01:48:01 or use adbWireless Jan 19 01:48:30 anyway to see where app crash on mobile? is there a way to generate log file on device when app execute?? Jan 19 01:48:56 can i see logcat in file explorer on mobile? Jan 19 01:49:05 you can get logcat apps, yes Jan 19 01:49:09 they require root on newer android versions Jan 19 01:49:42 that is god thing, i must get logcat app Jan 19 01:49:57 i have 4.0 , will it work for logcat? Jan 19 01:50:03 good** Jan 19 01:50:46 I believe root is required since jelly bean Jan 19 01:51:07 ok Jan 19 01:53:32 another issue with my mobile is that, it cannot detect adhoc wifi . is there any app or way to make it find the adhoc wifi? Jan 19 01:54:50 some wifi scannner apps do detect the adhoc wifi but when i connect the dont Jan 19 01:55:03 many issues :) Jan 19 01:55:12 yeah I dunno about adhoc wifi :) Jan 19 01:55:26 making a mesh network? Jan 19 01:55:45 mesg network? no idea what is that Jan 19 01:56:06 shared usb net through wifi Jan 19 01:56:10 ah Jan 19 01:56:32 ipad do connect but android mobile cant Jan 19 01:56:44 :( Jan 19 01:56:48 :( Jan 19 01:57:10 Thank you durka42 for help ealy in the mrning Jan 19 01:57:15 early Jan 19 01:57:28 have a great day Jan 19 02:01:17 Isdp: I don't think this is possible from date picker (only min/max dates); I think you'll need to use calendar view Jan 19 02:01:57 i want to use calendar view Jan 19 02:06:01 because i want to use android's time and date picker :| Jan 19 02:06:44 yeah, i read about calendar view later, didn't know that it was called calendar view instead of date picker Jan 19 02:57:15 Im trying to make an app to login to this site: https://ta.yrdsb.ca/yrdsb/. Heres the code for the activity thats handling the form fillout: https://github.com/Chromium-/TeachAssist/blob/master/src/com/example/teachassist/Browser.java The last javascript command which is meant to submit all info on the page isnt working, but im not sure why. The co Jan 19 02:57:15 de seems to make perfect sense. Anyone have an idea? Jan 19 02:59:12 chromium: I think that JS command defined a function but didn't call it **** ENDING LOGGING AT Sun Jan 19 03:00:00 2014