**** BEGIN LOGGING AT Tue Jan 21 02:59:59 2014 Jan 21 04:26:03 ~ Jan 21 04:34:02 hola Jan 21 04:35:47 Hi, I'm not sure whether this belongs here or in the Java channel... I need to simulate super.onBackPressed() from within an activity when a certain button is pressed within an activity. The problem I'm having though is that the parent instance is not visible because I've created a Callable object; so inside public Void call() it can't find super.OnBackPressed(). Is there a way around this? Jan 21 04:36:14 obviously onBackPressed is android specific, but I think the general idea is just a java question Jan 21 04:39:31 ir7466: are you overriding onBackPressed? if not, just call onBackPressed() instead of the super one. Jan 21 04:40:58 hey guys...errr what exactly does a ClockWorkMod do for Android? Jan 21 04:41:26 ReGiStRaS: #android-root question Jan 21 04:41:47 opps...sry Jan 21 04:41:52 f2prateek - good point. is there any difference calling onBackPressed() VS MyActivity.onBackPressed()? Jan 21 04:42:17 MyActivity.super.onBackPressed() I mean Jan 21 04:43:26 if you haven't overridden that method from the parent class, then no Jan 21 04:49:01 Hey I'm working on developing my first app, I'm a complete beginner. I used to program in C# awhile ago. I installed Eclipse and am currently downloading the SDK. Are there any good, step by step tutorials available? Jan 21 04:49:21 keegangrayson: new boston videos Jan 21 04:49:46 Thanks f2prateek Jan 21 04:49:59 Does anyone have experience with Android Studio? Or would you recommend Eclipse? Jan 21 04:50:35 I would recommend Studio Jan 21 04:51:10 Hi, i'm developing in android studio, but it bugs sometimes, anyone know when it will be finally released? Jan 21 04:53:34 do you develop in windows or linux? Jan 21 04:54:11 I have an xml file. It is a drawable. It contains a statelist with 2 images and states android:checked as true and false Jan 21 04:54:41 I want to access this drawable via code and retrieve the source images based on the state Jan 21 04:55:02 keegangrayson, on windows Jan 21 04:55:25 Or better yet, I want to set the state of that drawable on a menuitem in actionbar and then invalidateSelf() to make it change, but that doesn't seem to work so I'm probably doing it wrong. Jan 21 04:55:36 Anyone have experience in this? Jan 21 04:57:54 ugh alright windows it is Jan 21 05:00:39 it's nice google now provide nicely packaged ADT nowadays Jan 21 05:00:45 i remember it being a pain on windows Jan 21 05:01:37 oh wait, it was a pain on linux too. Jan 21 05:03:48 did they ever update the instruction about getting jdk from canonical? Jan 21 05:04:53 i imagine a lot of beginners were scratching their heads at that considering canonical stopped carrying all java stuff Jan 21 05:05:15 (i was one of them) Jan 21 05:05:27 has anyone made an app just using webview? Jan 21 05:23:57 *shudders* i've seen many, they are a repulsive waste of time Jan 21 05:25:10 keegangrayson: it's rare for such an app to be a good idea, unless it is a very simple one Jan 21 05:28:42 keegangrayson: yes, i've made an app with just a webview Jan 21 05:31:03 why woud if(f.exists()) return false for a file that exists? Jan 21 05:31:17 i have the path name right and i am looking at the file in adb shell - its there Jan 21 05:31:50 I440r: make sure the pathname didn't get mangled somehow, check permissions... run in debugger? Jan 21 05:32:07 im running in the debugger. i have a breakpoint on the if statement Jan 21 05:32:08 that reminds me that I need to test running some higher-level code in debugger on android Jan 21 05:32:20 i run TO the if statement and stop. do an ls in adb shell and i see the file Jan 21 05:32:25 the if says it doesnt Jan 21 05:32:38 String mapname = retrorpg.FILE_PATH + "/minimap.png"; Jan 21 05:32:40 I440r: have you tried to go into the f.exists() function? Jan 21 05:32:48 no Jan 21 05:33:02 .. otoh, that might require more interesting debugger setup than normal Jan 21 05:33:10 analyze the 'f' var with the debugger and you can see the return results for all its methods Jan 21 05:33:12 exactly lol Jan 21 05:33:28 wtf actually Jan 21 05:33:45 although now I have a machine powerful enough to build my own firmware, come to think of it Jan 21 05:33:52 mapname = (java.kang String@XXXXXXXX)"nill/minimap.png" Jan 21 05:34:00 null even Jan 21 05:34:16 heh Jan 21 05:34:24 that would make for interesting path :) Jan 21 05:34:24 well, whats FILE_PATH Jan 21 05:34:25 which is nuts Jan 21 05:34:29 yes Jan 21 05:34:45 that should be initialized here. let me check Jan 21 05:35:01 actually, maybe not! Jan 21 05:35:22 its initialized in my onResume() Jan 21 05:35:23 ahh, the rubber ducky debugging session :) Jan 21 05:35:32 but the use here is done in a class constructor Jan 21 05:35:33 rubber ducky ftw Jan 21 05:35:41 which obviously happens before the resume Jan 21 05:35:43 dammit Jan 21 05:36:02 rubber ducky? Jan 21 05:36:41 I440r: put a rubber ducky on desk, explain to it your code Jan 21 05:37:16 in other words, trying to talk about your code to a 3rd party :) Jan 21 05:37:18 http://www.cnn.com/2013/05/02/travel/hong-kong-giant-duck/ Jan 21 05:37:29 sometimes talking about it helps Jan 21 05:39:02 g00s_: we had one of those in the river a few months ago Jan 21 05:39:14 https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQlw7TiKLPBbWbgq0QWTWM5okqq0wmeIMx0arIktVJZQeJz4FObpQ Jan 21 05:39:25 sweet ! Jan 21 05:39:48 afaik the one in hong kong got... deflated. by a bridge, even Jan 21 05:40:18 bridge: 1 duck: 0 Jan 21 05:46:26 ok so if in create a bitmap using the bitmap factory its writeable but if i load it in from the file system the resultant Bitmap is read only? Jan 21 05:46:56 I440r: the latter probably is memory mapped from file with read-only access flags Jan 21 05:47:42 p_l how would i copy the read only data into a rw bitmap? Jan 21 05:48:02 is there a copBitmap(bm1,bm2); something or other? Jan 21 05:48:14 let me look in the bitmap class Jan 21 05:48:40 hmm actually of course there is lol Jan 21 05:49:01 just need to set a src and dst rect the same and draw one into the other Jan 21 05:49:44 http://developer.android.com/reference/android/graphics/Bitmap.html#copy(android.graphics.Bitmap.Config, boolean) Jan 21 06:18:39 Hi Jan 21 06:18:50 If you are going to insert a blob, using SqliteStatement Jan 21 06:19:01 what happens if you have a null byte array? Jan 21 06:20:20 putNull maybe? Jan 21 06:21:16 bindNull you mean? Jan 21 06:21:27 ContentValues.putNull() Jan 21 06:21:36 i'm using SQLiteStatement Jan 21 06:22:40 is there any benefit to usign ContentValues? Jan 21 06:25:09 i don't think i ever used that one Jan 21 06:25:25 can you use a byte array/blob for content values? Jan 21 06:26:02 well, I guess you can or you wouldn't have suggested it :) Jan 21 06:26:36 http://developer.android.com/reference/android/content/ContentValues.html#put%28java.lang.String,%20byte[]%29 Jan 21 06:48:06 i'm a very strong believer that a build process shouldn't have to grab anything off the internet in order to complete, once it's started. how can i clone the maven repositories my project depends on, into a local directory that i can turn into a git submodule? Jan 21 06:48:18 i don't actually have the maven binaries, i just have whatever gradle brings along Jan 21 06:49:15 ideally i'd like to automate this so that if we add another dependency to the project, we have a tool to recurse through and grab its deps and add them to the repo. Jan 21 07:03:15 My widget will content a string which does not have any particular length. What is the good way to set the width and height for the widget layout or is there any way to organize the widget in term of user friendliness ? Jan 21 07:03:26 *contain Jan 21 07:07:11 tophyr would that be the job of something like artifactory? and then you would back up its cache ? Jan 21 07:07:38 bubuzzz you define its size relative to the views around it Jan 21 07:11:04 The fact that we're stuck with ETC1 is just resource management nightmare Jan 21 07:11:08 for me at least Jan 21 07:12:00 lurkerzero wut? Jan 21 07:12:24 oh Jan 21 07:12:50 i have a system set up for transparent textures 3 of them are collected into rgb channel of 4th texture Jan 21 07:13:02 alpha channels of the 3 textures i mean Jan 21 07:13:12 g00s_: i'll check it out Jan 21 07:13:58 it's just becomes needlessly complicated, in managing it, also using them in shaders Jan 21 07:14:07 iOS supports ETC2/EAC Jan 21 07:14:37 tophyr there are ones from apache and sonatype also Jan 21 07:15:01 durka42, please elaborate Jan 21 07:15:04 this is my files https://gist.github.com/bubuzzz/50aa3b54e2dfa2e52011 Jan 21 07:16:12 tophyr not sure what you had in mind originally, but git kinda sucks at storing large files atm Jan 21 07:16:20 i wouldn't put jars or whatever in there Jan 21 07:18:10 bubuzzz: well if that's the only thing in your layout, then yeah, just fill the screen I guess... Jan 21 07:18:15 seems like a pretty trivial layout Jan 21 07:18:24 I don't really understand the question Jan 21 07:21:12 my widget size is 4 x 1 Jan 21 07:21:32 it will contain a string which could be in any length Jan 21 07:21:47 g00s_: hmmm Jan 21 07:21:57 so, if the string is to long, then it is covered by the widget since the widget size is fixed Jan 21 07:22:16 really i just want *everything* we use in the build, contained in scm Jan 21 07:22:26 so, how do we (android developers) solve this usually ? Jan 21 07:22:43 i understand that maven points to specific versions and that they (in theory) don't change etc etc etc.. and i'm willing to accept that compromise for the most part Jan 21 07:23:07 but i think syncing the build dependencies should be self-contained Jan 21 07:24:00 Hello Jan 21 07:25:01 bubuzzz: chop the string somehow Jan 21 07:25:15 how to make button like back button face? Jan 21 07:25:15 "This is some really long text that won't nearly fit in my short widget" -> "This is some really long..." Jan 21 07:26:16 ^^^ is that grammar a product of search engines? serious question here. it's a common grammar construction in irc nowadays. Jan 21 07:26:21 $tophyr: yeah, that is the only way, I guess Jan 21 07:26:48 I know that Android supports vorbis audio streams according to the documenation, but over RTP how does it work? Jan 21 07:26:53 Does it use RFC5215? Jan 21 07:27:47 tophyr you would also have to pin down the particular maven plugins used for each build Jan 21 07:28:27 ew. i'm not even sure what that means. are you talking about gradle's support for maven? that differs between projects? Jan 21 07:28:47 i worked at one shop that used our compiler for military jet software. they mothballed everything; a few machines, operating system, all software required to reproduce a build Jan 21 07:28:59 but most of the time, its an exercise in risk management Jan 21 07:29:22 especially for an app; i would imagine only one version of it would be out ;) Jan 21 07:29:26 that's pretty impressive Jan 21 07:29:46 shit hit the fan during y2k :) Jan 21 07:29:55 i've thought up to the point of making the build machine a vm, so that could be snapshotted, but didn't take it to the actual save-the-hardware level Jan 21 07:29:56 they actually had to un-mothball all that crap Jan 21 07:30:11 no shit? good thing they did lol Jan 21 07:30:16 tophyr oh sure, maybe using vagrant, chef etc Jan 21 07:30:25 (i've never done that) Jan 21 07:30:37 our server guys use chef.. it's ridiculously cool Jan 21 07:30:57 they'll spin up entire deployments in vm's on their dev box Jan 21 07:31:08 cool Jan 21 07:31:18 couple commands -> 9 little vm's plugging away Jan 21 07:31:25 i'd like to play around a little more with coreos and docker Jan 21 07:31:33 but no, not for this, you're right about overkill for an app Jan 21 07:31:40 rdnt: okay, good that it worked out for you Jan 21 07:31:46 more than anything i'm just irked that builds are dependent on an internet connection Jan 21 07:32:23 rdnt: in this case if you are *really* using binary data, the right charset is iso8859-1 because there exists a unique mapping from each byte to a character without interpretation difficulties. So the string formed this way, when looking for another string, will work correctly. Jan 21 07:32:26 the more i think about it, the less offensive this "repo manager" idea is to me.. it's really just another piece of software to run in the bg on a dev box Jan 21 07:32:50 just add it to the list of stuff the probies have to figure out how to get set up Jan 21 07:33:20 rdnt: in iso8859-1 encoding, a byte value is directly the unicode codepoint value, whereas in utf-8 there is a whole class of byte values -- those with 8th bit set -- which must follow specific encoding rules and these multibyte expressions are converted to single codepoint values. Jan 21 07:33:42 this means that conversion to UTF8 will either throw or lose data Jan 21 07:33:59 or at least, it risks doing either one of those things depending on if the byte data is valid utf-8 or not Jan 21 07:39:28 hi, i could not find help on google about how to make a back button to navigate back to previous activity. can someone tell me how? Jan 21 07:40:13 jaami-win: why would you want that? every android device already has a physical back button Jan 21 07:40:15 i want to make the back button look like default back arrow like face Jan 21 07:40:34 are you trying to clone an iOS layout? because, that *always* ends terribly Jan 21 07:40:44 actually i made navigation depending upon selected item in list Jan 21 07:41:35 hmm, well, i won't judge too much, it's your app Jan 21 07:41:40 different list are displayed and each list title goes to text of navigation buttons on top. just need to make them look like back buttons\ Jan 21 07:41:41 but all the back button usually does is call finish() Jan 21 07:42:02 as to how to style it, couldn't tell ya Jan 21 07:42:22 yes, need to change style of button Jan 21 07:42:47 style = face ? Jan 21 07:43:01 whatever the term is, i hope you got my point Jan 21 07:43:57 hmm, is there an answer or need to wait? Jan 21 07:44:48 one back button cannnot help me, i have 3 back buttons at top , Jan 21 07:45:15 just tell me how to change shape of buttons so that they look like back buttons Jan 21 07:46:09 hello plz anybody help me Jan 21 07:48:04 am i disconnected or what? getting this msg? Jan 21 07:51:31 Hi, hoping someone knows the answer Jan 21 07:51:37 Never mind Jan 21 07:55:00 Uh. Jan 21 07:55:02 http://hastebin.com/gibeyobine.avrasm Jan 21 07:55:11 In this short void. What the fuck did I do wrong. Jan 21 07:55:18 I- Jan 21 07:55:36 Fuckin canvas Jan 21 07:59:42 huh, genymotion doesn't have 4.0 image O.o Jan 21 08:00:37 time for minSdk=16 \o/ Jan 21 08:08:48 hi! Jan 21 08:09:40 hello, need to mae a back button but dont know how, plz let me know Jan 21 08:09:46 make** Jan 21 08:09:52 i have a problem with Google Analitycs: In live i show only the first activity Jan 21 08:10:18 hmm, i have no idea Jan 21 08:10:23 i tried both v2 and v3 beta, with same issue Jan 21 08:11:31 How do you avoid high CPU usage when you have implemented the AdMob banner ads? Jan 21 08:11:44 Our developer is having hard time figuring it out. Jan 21 08:15:29 Hey guys! I am using google SDK ads AdView in my activity. But my app occupies CPU even the activity is paused. I tried place adView.stopLoading() in onPause, but everything is the same. Can anybode plz help me in this issue? Jan 21 08:18:25 yeah, get rid of the adds Jan 21 08:18:29 tada ! Jan 21 08:19:28 google will be sad, after all thats the existential justification for the platform - to put adds in souls, but your users will be happier ;) Jan 21 08:22:51 i may reask the question from yesterday because there was no answer: i do create tabs at runtime and set a TabContentFactory @ TabSpec. if i change the view variable (that gets returned there) the view (obviously) won't update... how would i achieve that? Jan 21 08:23:04 i am making an phone dialer app for blinds to dial. should i make all the buttons by myself. or is there source code which i can customize. please guide! Jan 21 08:23:55 i want to make a back button, can someone tell me how? Jan 21 08:24:02 hi, how can I figure out why I get the following exception: "Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.RelativeLayout"? I'm 100% sure that I'm using referencing right xml element (R.id.relativelayout, which is of type RelativeLayout) Jan 21 08:24:07 :) Jan 21 08:24:39 the xml may have error in it. Jan 21 08:24:43 jaami-win: phones already have back buttons ? or do you mean somewhere in your app ? Jan 21 08:25:00 jaami-win: i think if you use adt to create a new activity, it will ask you to put a back button and chose a parent activiy to start Jan 21 08:25:03 yes, in my app i want to create back button Jan 21 08:25:04 *activity Jan 21 08:25:21 jaami-win: in the activity bar ? or somewhere else ? Jan 21 08:25:40 some where else, Jan 21 08:26:02 i am making an phone dialer app for blinds to dial. should i make all the buttons by myself. or is there source code which i can customize. please guide! Jan 21 08:26:34 i used one acivity and replaced adapters and on top of screen are three buttons , just want to change their shape like back buttons with arrow on left Jan 21 08:27:19 aahhh!. if my question is not legit for this channel at-least sm1 tell that.. Jan 21 08:27:39 i did not use adt, actually did not know that adt can be used for navigation, thanks for the tip, i will check that. but right now just need to change shape of buttons i already have them working Jan 21 08:27:59 jaami-win: as in use a new graphic ? Jan 21 08:28:58 i am making an phone dialer app for blinds to dial. should i make all the buttons by myself. or is there source code which i can customize. please guide! Jan 21 08:29:09 SirLagz: hmm, no idea what you mean, im newb here, the rectangular shape is what i want to change to a back button like face Jan 21 08:29:16 trp24 stop repeating yourself Jan 21 08:29:59 g00s_: ok Jan 21 08:30:25 SirLagz: i dont know what is nt right about my question , explained it with best of my ability Jan 21 08:30:32 not** Jan 21 08:30:42 g00s_: come on, you know the rules... if nobody has answered your question within 3 minutes, you should repeat it in case anyone has joined the channel in the meantime Jan 21 08:31:19 jaami-win: well if the button works then all you need to do is update the graphics in the package and update teh xml to point to the new graphic Jan 21 08:31:28 *particularly* if it's a meaninglessly vague question Jan 21 08:32:08 SirLagz: ahh, thats what i need to do. thanks for help, but also let me have link for more detail to read if possible. Jan 21 08:33:41 jaami-win: I don't have a link at the moment...if you check out android doco though there should be an example there Jan 21 08:34:17 SirLagz: what will i be searching, i mean what term or search string :) Jan 21 08:34:39 where do i find source code for android 4.1.2 default dialer to customize it? Jan 21 08:36:09 SirLagz: do you mean that i need to change the background of buttons? Jan 21 08:36:48 is there any attribute of buttons like shape or face ? Jan 21 08:37:47 anyway, thanks for the help. look like i need to play with google Jan 21 08:39:18 jaami-win: I'm not sure what your buttons look like so I wouldn't know. But you can change the icon for buttons from the xml Jan 21 08:39:24 jaami-win: no problems Jan 21 08:47:29 anyone here play LoL? Jan 21 08:48:06 I want to test run my cordova app in a webpage that looks like a phone, is that possible? Jan 21 08:49:08 I'm trying to display mastery pages like on this site http://www.lolking.net/summoner/na/7460#masteries, I have a background image and each mastery image, what would be the best way to do this? gridlayout? Jan 21 08:51:42 anli_: you mean the webpage has a picture of a phone for a frame? Jan 21 09:03:53 Hi. I'm searching an horizontal progress bar with at least 3 different colored zones (for eg: green, orange, red). Do you know if there is some code already done ? Jan 21 09:11:01 what about using a gradient Jan 21 09:13:11 http://www.tiemenschut.com/how-to-customize-android-progress-bars/ Jan 21 09:13:45 reading... Jan 21 09:16:47 bye Jan 21 09:18:29 AbelianHorizon: yes! Jan 21 09:19:04 anli_: isn't the point of cordova to run it on a mobile phone? Jan 21 09:19:16 I will run on a computer when I am developing Jan 21 09:19:20 join java Jan 21 09:19:33 * omid8bimo oops! Jan 21 09:20:24 anli_: I don't really get the point, but there's probably a cordova channel Jan 21 09:20:28 hey i have a list/array of a key corresponding to a value like this http://paste.debian.net/77552/ -- how can i define this in an android class and then use it to populate a spinner? Jan 21 09:21:10 do you need the key attached to it? Jan 21 09:22:45 AbelianHorizon: well what i need is to put the values in the spinner and then use the corresponding key to the selected value (state names) Jan 21 09:23:05 i dont know if i should define this in an array, arraylist or hashmap or something else Jan 21 09:23:24 make an ArrayList of the state names, inflate a Spinner view, call spinner.setAdapter(new ArrayAdapter(....)) Jan 21 09:24:31 you could have both ArrayList and HashMap Jan 21 09:25:45 AbelianHorizon: can i use xml string-array for the values? Jan 21 09:26:15 values meaning names or keys, state names i assume Jan 21 09:26:35 yeah you should be able to Jan 21 09:27:09 when you define the spinner in the XML layout Jan 21 09:27:21 use android:entries="@array/array_name" Jan 21 09:28:47 you could probably store the keys in xml too, and use android:entryValues="@array/array_name_values" Jan 21 09:29:09 AbelianHorizon: ok so far so good, one thing remain, how can i get the key of each selected value(state)? Jan 21 09:29:09 Hello, I really need some help with this: can startService(intent) be used to send simple information to a WallpaperService live wallpaper? I'm having problems on Android 2.2. See this for all the details: stackoverflow.com/questions/21253438/launch-intent-from-and-to-a-wallpaperservice/ Jan 21 09:29:18 I always populate dynamically, so use ArrayList everytime Jan 21 09:29:42 Twinsen: is there a particular reason why you need to support 2.2? Jan 21 09:30:11 omid8bimo: yeah, mess around with xml array, you can store both key and value in xml Jan 21 09:30:46 AbelianHorizon: really? both in one xml? if you dont mind, could you please tell me the syntax? Jan 21 09:31:04 Leeds: there is still a fair percentage of devices on 2.x using my app Jan 21 09:31:38 Twinsen: lots of 2.3 users out there, not so many 2.2, in general Jan 21 09:32:09 Twinsen: you should add your manifest to the post Jan 21 09:35:49 added the manifest Jan 21 09:36:17 the important part at least Jan 21 09:36:33 i will test 2.3.3 right now Jan 21 09:38:53 Same error on 2.3.3, so I can't really ignore it Jan 21 09:40:05 omid8bimo: keep in mind, this isn't tested, and I've never done something like this Jan 21 09:40:11 omid8bimo: but http://pastebin.com/K6nxYyS2 Jan 21 09:41:14 omid8bimo: idk if it'll actually work Jan 21 09:42:47 omid8bimo: and look here for how you might access http://stackoverflow.com/questions/5980577/android-accessing-string-xml-using-variable-name Jan 21 09:43:53 omid8bimo: personally I'd use a hashmap Jan 21 09:44:32 hi Jan 21 09:45:39 hi Jan 21 09:45:48 how can i study android? Jan 21 09:46:01 fly2web: what does it mean, to study it, precisely? Jan 21 09:46:08 AbelianHorizon: ok thanks. i will try it and also read on hashmap Jan 21 09:46:41 what book? i don't know what book is good? Jan 21 09:48:30 http://blog.timbuk2.com/wp-content/uploads/2013/03/goodbook_front-640x532.jpg Jan 21 09:49:00 the Bible is the only true Good Book Jan 21 09:49:02 the good book is good Jan 21 09:50:26 fly2web: http://bit.ly/1fUXyFC Jan 21 09:50:40 well, Lord of the Rings is quite Good as well Jan 21 09:51:04 thanks l1ght Jan 21 09:51:14 thanks Leeds Jan 21 09:51:30 you're *very* welcome Jan 21 09:51:42 no love for my excellent links? Jan 21 09:52:14 android trolling, haha Jan 21 09:52:26 anyone here play LoL? Jan 21 09:54:11 this channel is for grown ups, so probably not. Jan 21 09:54:46 what counts as a grown up Jan 21 09:54:54 what on earth makes you think we're grown-ups? Jan 21 09:55:33 is it something like if you laugh at penis jokes then you're not a grown up? Jan 21 09:55:48 ha ha he said penis Jan 21 09:55:51 heh Jan 21 09:55:52 penis Jan 21 09:55:57 too old to be playing a childrens game Jan 21 09:56:15 storkme: the only sensible meaning of that is "dead" Jan 21 09:56:21 woah what sort of children's games have you been playing? Jan 21 09:58:43 Hello guys. I'm using ValueAnimator, but it only supports API 11+. What should I use to animate on API 10+ ? Jan 21 09:59:20 isn't lol the one the kids are playing these days Jan 21 09:59:31 oh you were talking about LoL, thank god Jan 21 09:59:37 yeah, real men play dota Jan 21 09:59:46 storkme: LoL is the most played game in the world, and i'm 23, not quite grown up. have no job, so I am writing an app for the game Jan 21 10:00:02 LoL means http://letoverlambda.com/ right ? Jan 21 10:00:05 "most played game in the world" citation needed Jan 21 10:00:23 Hi, I have two AsyncTasks and I want to do something when *both* of them are completed. Is it possible on Android? Jan 21 10:00:23 should probably work on getting a job instead of spending all day playing games for children Jan 21 10:00:42 I can listen on each one with onTaskComplete(). Jan 21 10:00:58 fabiob thats gross :) Jan 21 10:01:13 g00s_: What's gross? Jan 21 10:01:14 storkme: dems hurtin words Jan 21 10:02:27 Either way, pertaining to LoL... I'm trying to display mastery pages like on this site http://www.lolking.net/summoner/na/7460#masteries, I have a background image and each mastery image, what would be the best way to do this? gridlayout? Jan 21 10:03:09 storkme: waiting on a security clearance from the government Jan 21 10:03:09 the three things in the middle? Jan 21 10:03:32 forgive me i'm just being an asshole because i fucked up at work Jan 21 10:03:34 CallumTaylor: yeah Jan 21 10:03:38 i personally would do linear layouts with weights, but i guess grid layouts would work Jan 21 10:04:08 isn't grid layout api 14+ Jan 21 10:04:15 or is it also part of the support lib Jan 21 10:05:05 fabiob: you will have to code you own synchronization logic inside both task's doInBackground Jan 21 10:05:34 CallumTaylor: yeah gridLayout is 14+ Jan 21 10:05:37 source ~/.zshrc Jan 21 10:05:50 oops. Ignore. Jan 21 10:05:57 ignore what Jan 21 10:06:03 Exaqctly. Jan 21 10:06:53 I am missing a kendoui channel Jan 21 10:07:34 so can anyone else chime in? would you also use LinearLayout? Jan 21 10:07:48 fabiob: something like: while(otherTaskNotComplete){sleep} MethodToBeExecutedWhenBothFinish(). This will be in one of the tasks Jan 21 10:08:14 idk about that Twinsen Jan 21 10:08:42 Don't ASyncTasks execute concurrently? I vaguely remember seeing 'synchronized' throughout the class source Jan 21 10:08:58 *synchronously, not concurrently Jan 21 10:09:06 Hey guys? Jan 21 10:09:35 Desarun: I believe you can force them to run concurrently, but by default they run serially Jan 21 10:10:49 Ah, didn't know you could force them into concurrently. We just created a Thread Executor & queued stuff on that. Useful if you've got to request large sets of data & tons of images at the same time. Jan 21 10:11:07 fabiob: I would, in the activity, have two bools set to false, and when you get a callback from the service, set it to true and check to see if the other is true. If its not, then don't do anything, if it is, then call your method Jan 21 10:12:44 Desarun: http://developer.android.com/reference/android/os/AsyncTask.html look at Order of execution Jan 21 10:13:23 I am unsure as to why I can't write this bitmap from canvas to file.... Jan 21 10:13:26 I was reading this the other day Jan 21 10:14:15 AbelianHorizon: thanks, I'm going to try that Jan 21 10:14:21 Could somebody give me a tip, or? Jan 21 10:14:57 AbelianHorizon: Well that would've saved loads of time. Jan 21 10:15:02 Immaterial: Does it crash? Errors? Jan 21 10:15:07 Desarun: lol Jan 21 10:15:12 No, no crash, it draws fine. Jan 21 10:15:18 Immaterial: wish i knew anything about that Jan 21 10:15:26 I'm just really new to this, so I think I fucked up. Jan 21 10:15:40 http://hastebin.com/togerigivu.avrasm Jan 21 10:15:51 That's the OnDraw(), did I do a stupid, or? Jan 21 10:16:27 hastebin? Jan 21 10:16:36 Oh yeah. Jan 21 10:16:53 lol Jan 21 10:16:55 Certainly clearer than pastebin... Jan 21 10:16:56 Is good, is dolmio. Jan 21 10:17:03 Desarun: ikr Jan 21 10:17:39 But yeah, far as I can tell I opened and wrote to the file just fine. Jan 21 10:17:47 So I'm assuming I did something retarded elsewhere. Jan 21 10:18:01 super.ondraw? Jan 21 10:19:05 Drawing to canvas, I'm assuming it triggers when a line is drawn. Jan 21 10:20:04 So did I fuck up writing to file, or? Jan 21 10:21:39 Immaterial, what are you trying to do exactly? What are you trying to write to a file? Jan 21 10:21:50 A bitmap. Jan 21 10:21:56 idk but maybe its because you dont close the output stream? Jan 21 10:22:55 ...Oh. Jan 21 10:22:56 In what class does your onDraw method live? Jan 21 10:23:33 Why when I'm animating layout of one view element then it animates layout for every other view of the same class? Jan 21 10:23:52 If I just set visibility for it then it hides just that element Jan 21 10:24:03 if I animate layout then it animates all of them Jan 21 10:24:25 set animation to null for other views? Jan 21 10:24:42 sorry that doesn't answer your question Jan 21 10:24:45 idk Jan 21 10:25:10 I even set unique id's for all of them and access them with that id, and no luck Jan 21 10:25:42 pduin SingleTouchEVentView Jan 21 10:27:07 Immaterial: why are you writing to the file on every draw? shouldn't you have a save button or something? Jan 21 10:27:30 I am retardedly new. Jan 21 10:27:34 I am a newfag. Jan 21 10:27:58 Save button's probably a good idea though. Jan 21 10:28:05 Well it has nothing to do with animation, it seems that all views of the same type share the same LayoutParams, is that possible ? Jan 21 10:29:18 Immaterial: I'm also a noob, sorry vegetablesalad19 Jan 21 10:29:51 Immaterial, you are trying to make some kind of screen shot? Jan 21 10:30:15 pduin: saving a canvas to a bitmap Jan 21 10:30:27 its like a paint app Jan 21 10:30:29 Pduin, I'm just attempting to save the canvas contents to a bitma- Jan 21 10:30:30 Yeah. Jan 21 10:30:48 Well, PNG I guess, but. Jan 21 10:30:52 Still. Jan 21 10:32:06 ah, don't know enough about that to be of any help, sorry Jan 21 10:32:38 Immaterial: so yeah, closing stream probably didnt matter huh? Jan 21 10:33:13 I think that's probably what I missed, but I think it'd still have written a corrupt file at least if I didn't close the stream. Jan 21 10:33:23 Which wasn't there, so. Jan 21 10:33:28 onDraw is where the screen drawing gets done Jan 21 10:33:56 the problem here is taht as far as I can tell, you just ask android to save a blank canvas all the time Jan 21 10:34:08 oh wait missed a call, canvas.drawPath Jan 21 10:34:56 Oh i think I get it getLayoutParams returns layout of parrent. So if all my objects have the same parrent and i change it, then it visualy applies to all of them Jan 21 10:34:57 still, I'd suspect that the canvas.setBitmap() ends up replacing the underlying bitmap that you're actually supposed to draw to and something goes wrong there Jan 21 10:36:23 Ah. Jan 21 10:36:24 now doing canvas.getBitmap().compress() instead would most likely save the bitmap to disk that you actually drew something to Jan 21 10:36:26 Thanks alankila. Jan 21 10:36:33 though, the size of this bitmap is up to the view Jan 21 10:36:46 So don't specify size. Jan 21 10:36:49 so it's going to be device dependent sort of thing. Not much you can do about that though. Jan 21 10:38:50 a save button could do something like set a flag that tells onDraw to save an image after drawing, and then call invalidate() Jan 21 10:38:57 there can be a more elegant way to achieve the same though Jan 21 10:39:36 imho the view should cache the bitmap and just draw more stuff on top of the cached copy without rendering everything anew every time. This limits the cost of the draw operation, but if the view actually gets created from scratch, the entire path must of course be drawn then Jan 21 10:41:31 the general answer is apparently to write an onDraw like protected void onDraw(Canvas canvas) { canvas.drawBitmap(copy, 0, 0, new Paint()); } Jan 21 10:41:54 when a new stroke needs to appear on bitmap, you have to update a Bitmap called copy with the new stroke and then call invalidate() Jan 21 10:47:36 Ah. Jan 21 10:47:40 Thanks, alankila Jan 21 11:02:21 Oh goddamnit. Jan 21 11:17:10 hello again, all right ? Jan 21 11:19:07 following requirement : Create completely dynamic ui. Started approach : Used fragments ( which represent base forms, between them I navigate ). On the fragments are Views ( controls ) . Created, coloured and placed at runtime. I need to improve performance. How much can JNI help me in this case ? Jan 21 11:20:06 Fucking eclipse. Jan 21 11:20:15 XML can't find my goddamn signature view class. Jan 21 11:20:58 is there a special way to make the action bar's back button appear on a nested preference screen ? Jan 21 11:21:11 or a standard way using xml or something ? Jan 21 11:21:34 googling is getting me all these other ways of doing it...but it seems somewhat overcomplicating things Jan 21 11:24:41 ???? Jan 21 11:25:01 is that ???? to me ? Jan 21 11:26:18 nope. Regarding my question about dynamic ui creation..... Jan 21 11:26:40 oh right. Jan 21 11:27:37 Immaterial: it's probably not eclipse's fault. How do you reference it? Jan 21 11:28:07 Yeah, I fixed it. Jan 21 11:28:17 Sorry man, this signatuire field's just giving me a stroke is all. Jan 21 11:28:30 now I understand what you needa path for Jan 21 11:28:59 Mmm. Jan 21 11:29:09 you should of course have multiple paths to have a meaningful signature. If user draws his name or "x" or whatever by hand, I expect it bears little to no relevance to any signature of the user in documents Jan 21 11:29:17 the whole idea is not very smart if I may say so. Jan 21 11:29:49 Ah, it photographs the signer. Jan 21 11:29:54 With the front camera. Jan 21 11:29:57 well that is an improvement for sure Jan 21 11:30:03 what's the path stuff for then? Jan 21 11:30:05 Yeah. Jan 21 11:30:12 It's stupid, because I have all that working. Jan 21 11:30:22 And I still can't save the fucking bitmap. Jan 21 11:30:31 I want to kick an ooma loompa. Jan 21 11:33:08 Well at least you wouldn't have too much trouble doing that. Jan 21 11:33:36 I'm pretty much just desperately trying to pick up as much as I can while I go along. Jan 21 11:34:26 Immaterial: crush one with your fist? Jan 21 11:34:48 I'd eat that delicious orange bastard alive right now, man. Jan 21 11:35:28 Shit, he can go ahead and sing a song about if it he wants. Jan 21 11:36:30 well, at least your frustration is evident. Jan 21 11:37:52 I had a minor technical victory today because when I had to do a web app search function I looked up postgresql full text search and it was awesome Jan 21 11:38:00 got something done in like 5 minutes that would have taken hours otherwise Jan 21 11:38:07 today was a good day Jan 21 11:39:23 Mm. Jan 21 11:39:28 postgresql is awesome Jan 21 11:39:36 i love their notify stuff Jan 21 11:39:44 http://www.postgresql.org/docs/9.0/static/sql-notify.html Jan 21 11:40:04 notice the payload part … the shit ContentObserver should have had ;) Jan 21 11:40:13 Thankfully I don't need notify at this point of time... Jan 21 11:40:43 I can just update global datastructures because I only have single short-lived threads/connections which can pick updates next time they do something. Jan 21 11:56:53 no one in here ever used JNI ? Jan 21 12:06:23 should ObjectAnimator repeatedly call onLayout for the object being animated? Jan 21 12:22:40 icbytes probably nobody /willingly/ :) Jan 21 12:26:26 icbytes, i did, but i won't be of any help as it was some years ago ;-) Jan 21 12:37:29 icbytes: #java channel probably Jan 21 12:43:26 Hello people. Jan 21 12:44:04 Is it possible to get an app to block all calls or sms's in such a way that the internet connection remains uninterrupted ? Jan 21 12:46:02 can NotificationCompat.Builder be used in a PreferenceFragment ? Jan 21 12:48:13 Unknown0BC, I'm pretty sure a mobile OS does not want its app to block call and sms Jan 21 12:48:32 pduin, Thats what i'd think... Jan 21 12:48:47 pduin, Unknown0BC if there is a way though, I'd love to know about it Jan 21 12:48:54 I have a plan for an app that requires that functionality Jan 21 12:49:07 even if it consists of instantly hanging up an incoming call. Jan 21 12:49:42 Perhaps you can request something like that on the cellular provider... Jan 21 12:50:00 That they dedicate a sim for data only. Jan 21 12:50:01 rejecting all calls etc.. on their side. Jan 21 12:50:31 the app I have planned requires a setting to do it. i.e. get into a car, set the app to car mode, and it will drop all incoming calls Jan 21 12:51:01 oh Jan 21 12:51:03 Any reason my signatureview would just suddenly be unable to instantiate? Jan 21 12:51:30 Yes to annoy you. Jan 21 12:51:42 that's always the way computers work Jan 21 12:52:55 ...I really have no idea what I could have changed that made it do that, either. Jan 21 12:53:41 erp i derp. Jan 21 12:53:41 Which is the smallest android phone ? Like a watch or something. Jan 21 12:53:49 Unknown0BC: that new Samsung smartwatch ? Jan 21 12:53:59 the Sony Xperia Mini might come close too Jan 21 12:54:04 old school android phone Jan 21 13:01:45 how does one debug an android application? (logcat? toast-messages? something-different?) Jan 21 13:02:05 I'm using logcat mainly, and some toast-messages for on the go debugging Jan 21 13:03:30 logcat Jan 21 13:03:49 logcat works for me, except i just cant get those filters to only print "my" stuff Jan 21 13:06:06 patrick91: logcat YOURTAG:Level Jan 21 13:06:16 PatrickBic you can using TAG'S Jan 21 13:06:45 just put some defined tag in your logs and use the filter to see them isolated Jan 21 13:08:57 All fucked. Jan 21 13:12:04 Immaterial: you ? Jan 21 13:12:16 ? Jan 21 13:12:18 Me what? Jan 21 13:12:30 all fucked Jan 21 13:13:40 I am not at all in the mood for that, man. Jan 21 13:14:44 fBirD, tag as in Info/debug/warning/... or as in com.something.different.MyApp? Jan 21 13:16:08 Immaterial: sorry Jan 21 13:17:37 Can I possibly get a quick rundown of just why the fuck eclipse cannot find a class I can clearly see in src? Jan 21 13:17:45 It's frustrating as hell. Jan 21 13:17:52 And yes, I have googled this. Jan 21 13:18:11 case sensitivty ? Jan 21 13:18:26 I've checked case. Jan 21 13:19:09 typo? Jan 21 13:19:13 copy and paste the path ? Jan 21 13:19:31 I checked case, spelling, I removed any and all changes made to the code since the error. Jan 21 13:21:38 Immaterial, tried "clean project"? Jan 21 13:21:43 So yeah, I'm stumped, I don't know how I fucked up, but I did somewhere. Jan 21 13:21:57 menu => project => clean... Jan 21 13:21:57 Yeah, after every regression. Jan 21 13:22:07 Clean, build. Yeah. Jan 21 13:34:18 what android app can be used to reveal logcat on mobile? Jan 21 13:35:09 I just do not understand this Jan 21 13:35:34 jaami-win: on a rooted device, just a terminal app can do it Jan 21 13:35:42 I'm running MAT on my app and I see that an Activity failed to get collected, and that it's referencing UI elements that I haven't created Jan 21 13:35:48 any thoughts on how to fix this? Jan 21 13:35:56 thepoosh: i need to see th saved logcat on mobile if there is any. and for that i may need some app to install that can show logcat Jan 21 13:36:16 why would the logcat help you in this case?! Jan 21 13:36:43 SirLagz: it is new thing fr me, is it safe to rot mobile? Jan 21 13:37:38 actyally, for debugging my app i need to see logcat on mobile because my mobile cannnot be detected by windows Jan 21 13:37:39 jaami-win: sure Jan 21 13:37:53 jaami-win: use Linux instead ? Jan 21 13:38:05 jaami-win: were you asking me a question? Jan 21 13:38:56 SirLagz: that is best option but really i got stuck on setting path in debian. did try my best to solve that issue but that was taking too much time. then i used win7 again Jan 21 13:40:15 why were you setting a path in Debian ? Jan 21 13:40:32 what i need to do to root my mobile and to readt logcat? Jan 21 13:40:46 jaami-win: depends on the mobile. Jan 21 13:41:35 oh, my mobile is spredtrum , its chinese brand but has 4.0 android and all features are working Jan 21 13:42:12 jaami-win: No idea then. Every mobile is different. Jan 21 13:43:09 SirLagz: i will try to find how to root my mobile but can you tell me if there is any app that can be used to see logcat? Jan 21 13:44:46 <|RicharD|> what is the channel for android app develop ? Jan 21 13:45:17 |RicharD|: you are here Jan 21 13:45:37 <|RicharD|> Ops right! Jan 21 13:45:48 <|RicharD|> sorry :D i read only Rom in headline :P Jan 21 13:45:50 jaami-win: I don't think there will be one. an App cannot run the logcat executable without root Jan 21 13:46:32 |RicharD|: np Jan 21 13:47:09 Why do you want to see logcat? Jan 21 13:47:11 SirLagz: thank you. i should play with google to find how to root Jan 21 13:47:13 To check your own app? Jan 21 13:48:02 mikedg: yes, to check my own app because on start it crash one time and after that it run fine. but that is not the issue on emulator Jan 21 13:48:18 Just to be sure, whatever occurs dirung execution/test, I never need to remove the android app on the phot by hand using the phone connected to ecplise as launch device ? thanks Jan 21 13:48:32 I'm fairly sure you can read your own log with a permission Jan 21 13:48:43 ...Jesus christ, it literally just fixed itself. Jan 21 13:48:53 lol Jan 21 13:49:06 Immaterial: don't you just hate it when it does that and you have no idea why Jan 21 13:49:16 Yes, a hell of a fucking lot. Jan 21 13:49:21 I know there's a reason? Jan 21 13:49:33 mikedg: how to change permissions and exactly where the logfile is created Jan 21 13:49:34 It just would be nice if I knew what it was. Jan 21 13:50:08 And now back to trying to save from the cutom view. Jan 21 13:50:19 I might be wrong :( Jan 21 13:50:27 Need me sum dat sweet sweet bitmap. Jan 21 13:50:51 I forget how though since I never use it Jan 21 13:50:59 mikedg: np, :) Jan 21 13:51:47 <|RicharD|> What ide you use for android development ? Jan 21 13:51:48 i need to look into many basic things , Jan 21 13:52:17 |RicharD|: I'm using eclipse. Jan 21 13:52:23 Android Studio ftw Jan 21 13:52:35 |RicharD|: android bundle got eclipse in it if you download that your are all set Jan 21 13:52:45 |RicharD|: the correct answer to your question is...try one, and see if you like it. If not then try another one. Rinse and repeat. Jan 21 13:52:57 <|RicharD|> But android studio Jan 21 13:52:59 <|RicharD|> is good ? Jan 21 13:53:19 good is subjective. Jan 21 13:53:20 For what it's worth: I like it better than Eclipse. But it's all just personal preference Jan 21 13:53:25 i dont think android studio is good way to go because its not mature product Jan 21 13:53:26 what pduin said Jan 21 13:53:58 ops sorry, i think pduin is right Jan 21 13:54:55 <|RicharD|> Ok! Jan 21 13:55:07 <|RicharD|> I'm totally new to android(I came from iOS dev) Jan 21 13:55:31 |RicharD|: heh, I'm looking at porting my app over to iOS since people are asking me to port it Jan 21 13:55:48 |RicharD|: tell me how android compares to iOS so I know what to expect haha Jan 21 13:55:48 <|RicharD|> Me the inverse Jan 21 13:55:49 <|RicharD|> lol Jan 21 13:55:50 <|RicharD|> :D Jan 21 13:56:00 <|RicharD|> People ask me the port of android Jan 21 13:56:53 how would i exchange two views (one being in a tab as a content) at runtime with code? i tried with view.getParent().removeView(view) and addView(newView) but didnt get what i expected Jan 21 13:56:55 is there a way to port android app to iOS? Jan 21 13:57:12 SirLagz, |RicharD|, you should exchange projects ;) Jan 21 13:57:31 no need to learn a new language Jan 21 13:59:48 |RicharD|: if i were to publish a iOS app, do I *need* a mac ? or can I do it on a hackintosh ? Jan 21 14:00:02 <|RicharD|> mackintosh is fine ;) Jan 21 14:00:05 <|RicharD|> hackintosh* Jan 21 14:00:08 interesting Jan 21 14:00:18 still need to pay the $100 a year fee though :( Jan 21 14:00:26 Morning Jan 21 14:00:27 <|RicharD|> You need only an iPhone maybe Jan 21 14:00:30 evening Jan 21 14:00:36 |RicharD|: I don't even have that haha Jan 21 14:00:49 <|RicharD|> I don't remember…because you need some certificate etc... Jan 21 14:01:02 Apple's dev fee is $100 a year Jan 21 14:01:40 google's is just $25 outright correct? Jan 21 14:02:33 <|RicharD|> yes Jan 21 14:03:36 yep Jan 21 14:04:06 app cannot be installed on iOS without certificate from appke but android app need no certificate. just need to check Unknown Source in mobile Jan 21 14:04:13 apple** Jan 21 14:04:40 more over that if you dont have mac you cannot develope iOS app Jan 21 14:05:23 <|RicharD|> Right Jan 21 14:05:27 <|RicharD|> but based on some research Jan 21 14:05:37 <|RicharD|> on iOS you earn 2/3 time more Jan 21 14:05:53 best way to target both OS is to use some html framework Jan 21 14:06:02 people are more willing to pay upfront for an app on iOS Jan 21 14:06:25 jaami-win, not really. Last I knew apple was cracking down on HTML based apps Jan 21 14:06:43 And most of the HTML apps just suck Jan 21 14:06:44 they state that if it's just a webpage wrapped in an app then you should just make a mobile page Jan 21 14:06:48 they are slow Jan 21 14:06:51 plus some things you just can't do in HTML as well as you could in Native Jan 21 14:07:00 <|RicharD|> jonc: false Jan 21 14:07:18 I am looking for a source of crime geo data that is never more than 1 week old... any suggestions? Jan 21 14:07:21 <|RicharD|> apple allow html based app Jan 21 14:07:41 they do, but they have become harder to get passed through the review process Jan 21 14:08:11 zquad: local police ? Jan 21 14:08:16 to publish an app to iOS, you are under review typically for 1 week+ Jan 21 14:08:28 sure Jan 21 14:08:37 jonc: that is not true Jan 21 14:08:45 SirLagz sure, I just need crime data to display on a mpa Jan 21 14:09:16 jaami-win, unless you are a relatively large company or have many apps that have been passed, it is true Jan 21 14:09:30 unless it has gotten better in the last ~3-4 months Jan 21 14:09:31 zquad: local police would be the best bet. If they even allow that data to be published. Jan 21 14:09:34 anyone know what i might be doing wrong? http://www7.pic-upload.de/21.01.14/4h6p2v57lqri.png (test-button should be the content of the widget-tab) Jan 21 14:09:48 even updates to our apps would take 1 week for approval Jan 21 14:10:00 local police for every precinct in the US? I want nation wide data Jan 21 14:10:10 zquad: ah. well not sure then Jan 21 14:10:20 ah ok, i thought you was talking about just install app on tablet/mobile Jan 21 14:10:21 zquad, you may be able to find a service that has it, but it will probably be relatively expensive Jan 21 14:10:41 no I mean submit to apple for approval and then waiting for 1 week for them to approve it Jan 21 14:10:52 ok Jan 21 14:11:46 i developed some small apps using sencha and with proper certificate and phonegap cloud service you can install app on iOS device in few clicks Jan 21 14:11:58 <|RicharD|> Approval is a good thing Jan 21 14:12:03 <|RicharD|> avoid many shit app Jan 21 14:12:06 <|RicharD|> that are on android Jan 21 14:12:27 zquad, http://www.imsasllc.com/docs/ not even live data, $7.00 per api call Jan 21 14:13:32 yes approval helps but developers are used to manage security on win and linux Jan 21 14:14:36 users also know that they need some sort of antivirus Jan 21 14:14:48 thanks jonc Jan 21 14:15:31 my biggest problem with iOS dev isn't the cost or the certs, it is objective C Jan 21 14:16:28 <|RicharD|> I love obj-c :D Jan 21 14:16:36 Objective C is good Jan 21 14:16:43 I think it is ugly and terrible to look at Jan 21 14:17:52 C sure, not a problem, obj-c no thanks Jan 21 14:17:53 jonc: so is java... so? you can do great stuff with both Jan 21 14:18:37 <|RicharD|> If you use for some weeks Jan 21 14:18:43 <|RicharD|> then you see that syntax is ok Jan 21 14:19:14 java is C like syntax Jan 21 14:19:33 real difference in both google and apple is quality of product Jan 21 14:19:42 jaami-win: it is? Jan 21 14:19:43 oh man Jan 21 14:19:48 the great thing about java is the amount of 3rd party libraries Jan 21 14:19:49 google device is no match for apple device Jan 21 14:20:16 I have an iphone, because at the time there were no android devices I liked (S3 and S4 are too large to me) Jan 21 14:20:47 jaami-win: you have enlightened me. I am going to destroy all my android devices now and get iPads and iPhones in hopes that I could one day aspire to be as wise as you Jan 21 14:20:50 <|RicharD|> man pls not here iphone vs nexus or android :D Jan 21 14:21:03 <|RicharD|> it's stupid Jan 21 14:21:07 funkbox: retina display is real difference Jan 21 14:21:10 but iPhone's market share is dwindling Jan 21 14:21:37 jaami-win, S4, S3, Nexus all have "retina" displays Jan 21 14:21:48 put xoom and ipad2 side by side and see difference Jan 21 14:22:24 <|RicharD|> I go back to work :) at soon! Jan 21 14:22:41 i did not know that S4, S# are now coming with retina Jan 21 14:23:02 jaami-win: Retina display is just a fancy name for high resolution. Jan 21 14:23:11 ^ Jan 21 14:23:15 retina is just high res Jan 21 14:23:20 yeah Jan 21 14:23:27 y'all are feeding the troll Jan 21 14:23:28 a galaxy s4 is 1080x1920 Jan 21 14:23:30 its just a marketing term Jan 21 14:24:00 iphone 5s = 640 x 1136 Jan 21 14:24:21 my nexus 5 has the same resolution as my 37" tv ._. Jan 21 14:24:22 Nexus 5 is also 1080x1920 Jan 21 14:24:30 the S4 has a higher resolution than my monitor lol Jan 21 14:24:32 wtb 4k tv pls Jan 21 14:24:49 * SirLagz pats his 19" Square monitor Jan 21 14:25:08 Hi everybody. Is there a way to compile android 4.3 WebView in my app? I'd like the app to use it rather than chromium webview introduced in 4.4 Jan 21 14:25:42 Ghiottone: i have no clue, but i'm curious as to why Jan 21 14:25:59 apple products are very expensive. hard to find in local market where chinese android is king Jan 21 14:26:15 expensive != better all the time Jan 21 14:26:21 yes, Jan 21 14:27:19 really my first xperience with both xoom and ipad was all that i had in mind when spoke in favor of iOS Jan 21 14:27:30 mikedg, chromium lacks a lot of features that old webview had. More info here: https://code.google.com/p/android/issues/detail?id=62378 and https://code.google.com/p/android/issues/detail?id=62293 Jan 21 14:27:37 thanks Jan 21 14:27:47 xoom is also an old device, one of the first android tablets if I remember right Jan 21 14:27:47 i spent money in ipad and i am happy with it Jan 21 14:27:54 at the time android wasn't build for tablets Jan 21 14:27:59 built* Jan 21 14:28:24 jaami-win: cool story... we don't care Jan 21 14:29:01 mikedg, np Jan 21 14:29:29 infact neither google not apple is taking local market here Jan 21 14:29:58 and i guess its true worldwide Jan 21 14:30:01 xoom wasn't google. Jan 21 14:30:20 xoom was Motorola before they were bought (AFAIK) Jan 21 14:30:33 yup Jan 21 14:30:59 yes, thats right Jan 21 14:31:13 google will make money off of most android devices sold (marketplace) Jan 21 14:38:30 yes Jan 21 14:41:14 we cannnot ignore, phonegap, jquery mbile, oracle titanium and sencha. Jan 21 14:42:08 we can and do ignore all of those Jan 21 14:42:13 ^ Jan 21 14:42:18 do oracle own titanium now> Jan 21 14:42:19 ? Jan 21 14:42:41 I thought it was apache? Jan 21 14:42:56 what happens to a nested fragment when it's parents view is destroyed? does the child get destroyed or only the view? Jan 21 14:42:57 oh that's right, i don't actually care Jan 21 14:43:31 it was oracle , apache is cordova or smething Jan 21 14:44:01 not sure, what is latest but sure more are developed Jan 21 14:44:47 and also they are including low level API calls Jan 21 14:44:55 Anyone know of a thirdparty stackview that works in scrollview? Jan 21 14:45:47 I have used phonegap, and it was horrendously slow Jan 21 14:46:04 now this was over a year ago so it may have gotten better Jan 21 14:46:10 doubt it Jan 21 14:47:35 anyone done much with gps and distance between coordinates ? Jan 21 14:48:04 SirLagz if you want completely accurate distances the math is pretty complex since the earth isn't a straight sphere Jan 21 14:48:04 good one with phonegap is could service that need just js/html/css etc but not any binary files and then they convert it to any OS you want, i think last time i checked there were 4 or 5 OS Jan 21 14:48:22 jonc: not completely accurate. within a few meters is fine Jan 21 14:48:26 I've found the haversine formula Jan 21 14:48:39 so I think I'll make up some stuff to use that... Jan 21 14:49:05 i learnt this stuff in school years ago...and forgotten it all since then haha Jan 21 14:49:10 jaami-win, there was a reason a lot of companies moved away from HTML implementations (facebook app used to be html, but it was too slow to show the list they were showing) Jan 21 14:49:36 write once run everywhere amirate? it doesn't work Jan 21 14:49:41 ^ Jan 21 14:49:54 you end up with iOS designed app on android and its a horrendous experience Jan 21 14:49:59 write once, run slowly everywhere Jan 21 14:50:09 write once, crawl everywhere Jan 21 14:50:10 SirLagz i already worked with gps, what is the issue? Jan 21 14:50:12 jonc: i made 2 apps and converted them for both android and iOS, they were not slow Jan 21 14:50:35 It all depends on the memory footprint Jan 21 14:50:38 fBirD: no issues. Just thinking out loud really. Jan 21 14:50:46 what was it, a hello world app? Jan 21 14:50:53 if they were simple form type things, then that's fine, do any sort of animation, do anything with a decent sized list and it will start to crawl Jan 21 14:51:04 :) it was a financial app Jan 21 14:51:10 fBirD: just making an alert for when a user is within 50 meters of a specific point Jan 21 14:51:23 hum Jan 21 14:51:28 its possible Jan 21 14:51:46 fBirD: yeah, I'm looking at the haversine formula at the moment Jan 21 14:51:47 SirLagz then take 50m and convert it to the same units as longitude and latitude :P Jan 21 14:51:52 jonc: haha Jan 21 14:51:57 jonc: it won't always be 50 though :P Jan 21 14:51:59 then just compare the distance between the 2 points and check if it's the same Jan 21 14:52:09 or less Jan 21 14:52:20 distaces greater that 10 meters is fine Jan 21 14:52:27 what if they're in a deep hole 50m in the ground? Jan 21 14:52:29 fBirD: hmm ok Jan 21 14:52:36 helo: well then they've got bigger issues to deal with Jan 21 14:52:41 then they probably aren't getting GPS helo :P Jan 21 14:52:57 and don't forget rocket packs Jan 21 14:53:05 what if their phone is in the area, but their person isnt Jan 21 14:53:27 fBirD: if my app will only return coordinates if accuracy is better than 10 meters...will that still be somewhat accurate ? Jan 21 14:53:27 or if a racoon steals it and runs off Jan 21 14:53:59 SirLagz, it will be within ~33 feet or so Jan 21 14:54:08 it depends of quality of sinal and phone gps Jan 21 14:54:14 fBirD: hmm ok Jan 21 14:54:18 but with a god fone and outdoor Jan 21 14:54:18 might give myself a bit more leeway then Jan 21 14:54:27 you will have nice accurate Jan 21 14:54:36 ok cool Jan 21 14:54:40 fBirD: thanks ! Jan 21 14:55:08 1st time i use gps i tested with a samsung galaxy S and i get accurate less that 10 meters Jan 21 14:55:26 but i know that isn't impossible with phones Jan 21 14:56:24 phones have fairly good gps now Jan 21 14:56:41 you can get within like 200ft with just cell signal now Jan 21 14:57:52 jonc true, but you don't know what phone people around the world have Jan 21 14:58:02 in my case is for a commercial app Jan 21 14:58:19 I know, but you also have to pick and choose who you can support based on the requirements of your app Jan 21 14:58:45 yes Jan 21 14:59:07 i always pick for android 2.1 because i can target around 97% maybe more Jan 21 14:59:50 2.3+ is like 95% now Jan 21 15:00:03 and even 4.0+ is like 80-85% if I remember right Jan 21 15:01:26 lol noo Jan 21 15:01:29 2.2 Froyo 8 1.3% 2.3.3 - 2.3.7 Gingerbread 10 21.2% 3.2 Honeycomb 13 0.1% 4.0.3 - 4.0.4 Ice Cream Sandwich 15 16.9% 4.1.x Jelly Bean 16 35.9% 4.2.x 17 15.4% 4.3 18 7.8% 4.4 KitKat 19 1.4% Jan 21 15:01:36 http://developer.android.com/about/dashboards/index.html Jan 21 15:01:58 only around 50% for 4.0 + Jan 21 15:01:58 yup Jan 21 15:02:16 77.4% Jan 21 15:02:24 tabbed interface is supported from 11 Jan 21 15:02:30 16.9+35.9+7.8+1.4 Jan 21 15:02:40 +15.4 Jan 21 15:03:37 so yeah, 77.4% is 4.0+ Jan 21 15:03:49 * Raccoon steals helo and runs off Jan 21 15:04:06 neoooooo Jan 21 15:04:11 yes is great but for commercial it should be near 95% Jan 21 15:04:28 indeed Jan 21 15:04:34 77,4 is nothing Jan 21 15:04:43 its for children to play with but not for serious apps Jan 21 15:05:05 fBirD, I think that depends Jan 21 15:05:12 30 % in a world with milion of phones is a lot Jan 21 15:05:24 I would first want to know what actual set of people you are cutting out Jan 21 15:05:32 22.6% Jan 21 15:05:49 because it could very easily be a grouping of people that is not your target demographic Jan 21 15:06:11 what has the demographic to do with the use of android versions? Jan 21 15:06:27 sure you can say that "tech-savy" people tend to have later android versions.. Jan 21 15:06:43 798 million of them will run Android Jan 21 15:06:44 the people who haven't upgraded to newer phones from 2.3 in the US are going to be people who have been capable of upgrading their phones already Jan 21 15:06:52 http://www.businessinsider.com/15-billion-smartphones-in-the-world-22013-2 Jan 21 15:06:57 but what if e.g. a "tech-savy" has an old device which doesnt receives any upgrades anymore but the person does not develop for android so he actually doesnt care.. Jan 21 15:07:27 but choose not to Jan 21 15:07:28 fBirD: 22,6% of 15 billion is 22.6*150000000 Jan 21 15:07:34 sorry Jan 21 15:07:38 jonc: ^ Jan 21 15:08:25 i dont see any type of serious app that can drop those numbers easily Jan 21 15:08:46 not all apps are shooting for a worldwide market Jan 21 15:08:49 33000000 Jan 21 15:08:54 people don't update just because of an app Jan 21 15:08:57 maybe the booking-app that is special to the sushi-restaurent I go to.. Jan 21 15:09:02 people don't update because theres no updates available Jan 21 15:09:16 or because their device has such little space, they can't physically download it Jan 21 15:09:17 people don't update because theres no updates available , so true Jan 21 15:09:24 a good example (not android version really but still), Amazon Instant Video app Jan 21 15:09:32 not available on any android other than the kindle's Jan 21 15:09:32 any reason FragmentTransaction.show wouldn't show the fragment? Jan 21 15:09:50 jonc: thats not surprising as amazon has its very own android app store Jan 21 15:09:55 it looks like the fragment is there and i can interact with it, but it's rendered with like 0 alpha.. it's odd Jan 21 15:10:00 people don't update because they don't want to Jan 21 15:10:06 ^ Jan 21 15:10:15 the jump from gingerbread to 4.0+ was huge and pissed a lot of users off Jan 21 15:10:15 they dont update because they don't think its necessary Jan 21 15:10:58 which many may see apps as unnecessary, I am saying that you can't just put a blanket statement saying "you must cover everyone" when you first need to look at who you want to attract Jan 21 15:11:03 jonc: so at the end you have _all_ types of users running an older android version... you cannot say a thing about the demographic of those people Jan 21 15:11:09 if it's teens / young adults then go 4.0+ Jan 21 15:11:15 no Jan 21 15:11:23 there are LOADS of teens/young adults who run older devices Jan 21 15:11:29 just because of the mentioned reasons Jan 21 15:11:38 *older android versions Jan 21 15:12:09 if you consider that some vendors drop their device support less then a year afte the devices release.. Jan 21 15:12:30 I would bet the amount of teens / younger adults that are on android below 4.0 is smaller than the 22.6% Jan 21 15:12:45 If its a commerical app you should probably survey your demography too see which version is most prevalent. Jan 21 15:12:50 exactly Jan 21 15:12:54 that is all I am saying Jan 21 15:13:06 I am not stating that you shouldn't do 2.3, I am saying you should find out first Jan 21 15:13:48 and especially right now, if your app won't be released for 5-6 months, that number will be higher than 77.4% Jan 21 15:13:56 I don't know anyone who is still on android 2.3 within the ages 10-20 Jan 21 15:14:32 i don't know anyone named Fred Jan 21 15:14:42 Mrdarknezz its normal, just because people with age between 10 -20 change phone every year Jan 21 15:14:50 If you can you should avoid 2.3 Jan 21 15:14:58 and if that is your target market, then you can avoid 2.3 Jan 21 15:15:07 Obviously Jan 21 15:15:37 Unless the cost making the app compatible is higher then revenue generated from those users Jan 21 15:16:20 and dont forget a lot of people primarily download apps when they get a new phone Jan 21 15:18:01 The app I am working on deals with netflix and will be released in the US only, so to make things easier I am only aiming for 4.0 and above Jan 21 15:18:52 jonc in that case maybe is better if almost all people use 4.0+ :) Jan 21 15:19:25 which by the time it releases (2-3 months, need to create an LLC first) even more people will be 4.0+ and I will be marketing it towards college students Jan 21 15:19:25 Any suggestions for how to handle the location issue in this SO question (http://stackoverflow.com/questions/13594932/network-provider-not-providing-updated-locations)? It looks like this is a somewhat common problem. Jan 21 15:19:32 i want to make a modification to the android 4.3 source code. to be precise, I want to add a new .aidl IPC interface. do i have to add the path to that new file to some sort of makefile in order for the interface source file to be generated automatically? Jan 21 15:21:23 theblang, the answer has it: https://developer.android.com/training/location/retrieve-current.html Jan 21 15:23:45 jonc why does it say that Location services are part of the Google Play APK? Jan 21 15:25:22 jonc ahh, I guess the AOSP location manager has been abandoned for the new location services in the Play library? Jan 21 15:26:03 that's what it seems like. Google released the location services they use for google maps to the play library it seems Jan 21 15:27:41 whoa, does genymotion no longer do google apps? Jan 21 15:29:58 anyone managed to get google maps in genymotion images for android 2.3.7 ? Jan 21 15:30:07 jonc so this stale results issue with NETWORK_PROVIDER is probably a bug that won't be fixed then Im guessing. I need to support Kindle so I hate to hear that. Jan 21 15:30:56 theblang, is the issue present on kindle? Jan 21 15:32:17 jonc it isn't, but is present on my Galaxy S4 that I used on a road trip to do some testing with. Jan 21 15:32:20 and can you use the google play library on a kindle? Since it is just a library and I'd imagine all of the device specific things don't need to register to an api, you may be able to actually still use the google play library for your app Jan 21 15:32:29 jonc rather, I don't know if it is present Jan 21 15:33:21 jonc I'm pretty sure when you use the Google Play library it checks if Play is installed Jan 21 15:33:56 https://groups.google.com/forum/#!topic/google-admob-ads-sdk/obflEHgq_og one of the answers here seems to say you can use it Jan 21 15:37:29 funkbox: I don't think they are allowed to redistribute Google apps Jan 21 15:37:32 http://commonsware.com/blog/2013/05/22/remember-google-play-services-proprietary.html This suggests that it can;t be done nicely Jan 21 15:37:36 Mrdarknezz: that's what i thought Jan 21 15:37:49 funkbox: You don't get it with custom roms for example Jan 21 15:38:13 but developers :( Jan 21 15:40:15 mastro: http://t.co/8f1vA6KjVM Jan 21 15:40:34 funkbox: http://t.co/8f1vA6KjVM Jan 21 15:41:50 CallumTaylor, I know that procedure, but it doesn't work for Android 2.3.7 Jan 21 15:41:58 does it not? Jan 21 15:42:04 that's annoying Jan 21 15:43:32 i never used the Genymotion its faster than the default emulator? Jan 21 15:43:38 yes Jan 21 15:43:49 much faster but much weirder behavior Jan 21 15:43:54 i wouldnt trust it] Jan 21 15:44:07 only for development, make sure to test very thoroughly on actual devices Jan 21 15:44:12 i personally use it for quick development, then move on to a real device for proper testing Jan 21 15:44:12 i usualy use the phone Jan 21 15:44:37 that's what it was designed to be used for Jan 21 15:45:03 I used android x86 with virtual box Jan 21 15:45:37 I used real phone with depuration by wifi Jan 21 15:45:56 yeah, now I have an S4 right in front of me for testing Jan 21 15:46:01 that way the phone dont need to be in charge all the time Jan 21 15:46:04 is it possible to add a "custom" entry to a ListPreference? i.e. where the usere can specify his own string? Jan 21 15:46:09 can't use the intel image or x86 right now, using a native library Jan 21 15:47:11 ohcibi i realy dont understand the question Jan 21 15:47:19 ohcibi: maybe you'd like an edittextpreference and if that is set, change the listpref to value that reads "Custom" Jan 21 15:47:35 alankila: sounds a bit hackish Jan 21 15:47:58 fusing preferences like that is kinda annoying, I definitely agree about that Jan 21 15:48:07 but it is what I've done before Jan 21 15:49:02 CallumTaylor, I tried it a couple of time now.. the genymode emulator always get corrupted :/ Jan 21 15:49:10 seems like it is possible with a custom ListPreference... but a pain.. yes Jan 21 15:49:31 CallumTaylor, I'm trying it again using multiple reboot between one install and another and see if I can get it working Jan 21 15:49:41 ...Guys could I get some advice on pulling a bitmap out of a custom view? Jan 21 15:50:04 It's in a separate class, I tried to create an instance to pull the variable, and now the app keeps crashing. Jan 21 15:50:24 Also life is hard and my scalp is itchy. Jan 21 15:50:27 Immaterial, stack trace? Jan 21 15:50:57 Immaterial this http://stackoverflow.com/questions/2801116/converting-a-view-to-bitmap-without-displaying-it-in-android ?? Jan 21 15:51:13 CallumTaylor, hum.. may have worked this time... not sure yet.... Jan 21 16:02:16 Hi, there is a way, in running app, to know that was closing for a new version (during Eclipse RUN/DEBUG) ? Jan 21 16:03:16 I'm in Accessory Mode and before the new app will be installed I NEED to gracefully exit from read() blocking call otherwise the AOA mode goes corrupted till I remove/attatch again the USB cable Jan 21 16:03:55 onStop? Jan 21 16:04:16 I tracked any event (onPause/onResume/etc) in main activity without get any event before application will be uninstalled Jan 21 16:04:42 I will try onStop (actually I've omitted to check this) Jan 21 16:05:04 if you test onPause Jan 21 16:05:23 i think that onStop wont work Jan 21 16:05:35 onPause()->onStop() Jan 21 16:05:41 onStop doesnt work... Jan 21 16:06:23 its because the app is force closed to install the new one Jan 21 16:06:31 unfortunately is a bad thing to ask customer to manually exit running application before to update new ... Jan 21 16:07:14 and you will send the apk to customer ? oO Jan 21 16:07:22 to install manually? Jan 21 16:07:50 at this moment YES, because google play is too slow in update Jan 21 16:08:02 you can use another market to do it Jan 21 16:08:12 there are a lot of markets Jan 21 16:08:13 however I have yet to try what's happen upgrading from market Jan 21 16:08:26 Is it possible to control the WiFi signal output strength of an Android phone with an app ? Jan 21 16:09:02 the only big problem with accessory is a blocking read() .... which can't be unblocked when necessary Jan 21 16:09:15 hello Jan 21 16:09:46 hi Jan 21 16:09:51 shineworld but you can unblocked by code? Jan 21 16:09:58 nope... Jan 21 16:10:04 a sec for a pastebin Jan 21 16:10:34 I want to create a queque where i would put requests and other thread to consume them .But in android how cna this be done ? I mean consuming is communicating with a tcp socket and send some data .Like a pool Jan 21 16:10:57 same as in java on any other platform Jan 21 16:11:20 in java there is blocking queque but in android if you get out of activity it can die eventually Jan 21 16:11:34 it can be killed anytime in android Jan 21 16:11:35 http://paste.debian.net/77645/ Jan 21 16:11:58 the line 18 have the mInputStream.read() which is blocking Jan 21 16:12:19 and there is no way to unblock (also quitting the program) Jan 21 16:12:58 soo Jan 21 16:13:15 when you install the new app dont restart this? Jan 21 16:13:45 but read() is part of underground accesssory framework which remain blocked Jan 21 16:14:01 shineworld, is that happening on your main thread? Jan 21 16:14:03 not depends by application Jan 21 16:14:20 balr0g: so do it in a service Jan 21 16:14:24 fail. Jan 21 16:14:30 Baluse: so do it in a service Jan 21 16:14:30 I see it extends thread, but is that being run on the main thread? Jan 21 16:15:10 the only solution should be run a background app with service (without UI) which manage Accessory connection and then expose flows using a TCP/IP server to my program Jan 21 16:15:19 buy is a little bit complicated to do Jan 21 16:15:22 at this moment Jan 21 16:15:36 ok i will try services Jan 21 16:18:22 shineworld that is a dificult one :O Jan 21 16:18:41 there is no way to force the read ? Jan 21 16:19:13 shineworld: you can run a background service which does whatever and communicates with your program. I'm not sure what you're referring to as accessory, here - if you mean a usb accessory, then a service is definitely hte way to go. Jan 21 16:19:15 https://code.google.com/p/android/issues/detail?id=20545 Jan 21 16:19:27 shineworld: services have a pretty solid callback mechanism. You wouldn't need to serialize over tcp. Jan 21 16:20:21 fBirD, there is no way ... the call is inner blocked in kernel Jan 21 16:20:51 humm i see Jan 21 16:21:50 nice deadlock :p Jan 21 16:21:57 to solve I send a dummy request to accessory device which reply with a dummy flow, then In accessory read thread I check a request to terminate just when one of dummy bytes reaches inputBuffer Jan 21 16:22:31 so to detach a program/system by Accessory there are only 2 ways (at my knowledge): Jan 21 16:22:40 shineworld: ah, blocking usb. yeah you've got a problem there. Jan 21 16:22:41 1 - detach the USB cable Jan 21 16:23:47 2 - set read thread terminate request, send a dummy packet to accessory device, get dummy packet which throw out read() from block, check terminate flag and close thread Jan 21 16:24:02 are you acting as the host, or as the accessory Jan 21 16:24:50 android is acting in Accessory mode connected with a my external board which implements Accessory protocol Jan 21 16:25:09 shineworld: so you're in the unenviable position of "almost nothing does that, ever" Jan 21 16:25:31 which isn't to say it should work, since it's an official api, but no-one really uses it, at least not in my experience Jan 21 16:25:47 the power requirements make it prohibitive for portable devices Jan 21 16:25:49 you mean Android Accessory Mode ? Jan 21 16:25:59 no problems: Jan 21 16:26:13 yes. Some things (again, not many) use host mode. I've encountered almost none using accessory mode, so it's likely to turn up some issues Jan 21 16:26:22 1 - I'm using a tablet which don't charge in USB cable (have a separate JACK) Jan 21 16:26:48 well that makes sense Jan 21 16:26:49 you can try killing the usb connection by closing the usbdevice you get from openDevice Jan 21 16:26:49 2 - My device have a protection chip (limit to 100mA) which is one of power supply supported by USB Jan 21 16:27:00 in another thread Jan 21 16:27:08 that OUGHT to kill the blocking operations in your IO thread Jan 21 16:27:55 hello i want to ask if tis legal to open a google developer account in a supported coutry with bank account in other person's name and work from unsupported country Jan 21 16:28:38 I wouldn't recommend taking legal advice from irc Jan 21 16:29:38 SimonVT: where is the best place to talk about this? Jan 21 16:29:49 dragorn, this is my system: https://www.dropbox.com/s/wdqcnd1pubk2shy/IMG_20131105_153312.jpg Jan 21 16:30:06 resu01, a lawyers office Jan 21 16:30:28 hahaa ofcourse Jan 21 16:30:48 I've designed the board which drive a lot of I/O, 4 motors, CAN bus, etc... run a proprietary RTOS and is connected with a tablet using Android Accessory protocol Jan 21 16:30:59 There are probably all kinds of tax laws you need to be aware of Jan 21 16:33:46 Hello, I am a beginner at developing android applications. Are they written in Java? if so, can I use things like JOptionPanes, JFrames, etc? Jan 21 16:34:04 xrandr: yes and no Jan 21 16:34:15 They're written in java, but I would strongly advice against using that type of stuff Jan 21 16:34:17 i suggest you look at developer.android.com Jan 21 16:35:29 you can try killing the usb connection by closing the usbdevice you get from openDevice Jan 21 16:35:31 I would also generally advice not using swing at all Jan 21 16:36:06 can I reset USB device in an android app ? Jan 21 16:36:19 ok thanks. But I can use Sockets, Server Sockets, and send serialized objects to another java app? Jan 21 16:36:21 i don't think you can even use swing Jan 21 16:36:40 don't think of it as a java app Jan 21 16:36:56 and you shouldn't use it... ever.. even on win/linux/mac Jan 21 16:37:00 lol Jan 21 16:37:03 trudat Jan 21 16:37:17 :) Jan 21 16:38:21 xrandr, I believe those can be used, you might want to double check the android documentation for things you're not sure about Jan 21 16:38:31 thanks :) Jan 21 16:38:58 especially sockets might work differently on mobile devices due to the different type of connection. but don't take my word on that Jan 21 16:42:00 I accidentally posted this in #android instead, so here goes again: I'm using ViewPager from v13 support and I would like to maintain a list of fragments and swap out and add to the list as the user interacts with it, but I'm having a problem where the viewpager doesn't actually update when I replace the current fragment and set a new adapter. Does anyone have experience with this? Jan 21 16:45:18 how long should it take the android emulator to run? I have the window up with the word android and a light going through each of the letters... Jan 21 16:46:01 about an hour Jan 21 16:46:09 sometimes two Jan 21 16:46:27 (jk, but it takes ages) Jan 21 16:46:33 get a coffee Jan 21 16:46:56 as far as I'm aware i can access xmls with entries like this ... with context.getResources().getStringArray(R.array.stuff), is this correct? Jan 21 16:47:07 my work just blocked pandora Jan 21 16:47:44 and if so can I also access names like this? > Jan 21 16:49:00 i don't think you can have dots in resource names Jan 21 16:49:33 oh maybe you can Jan 21 16:49:47 but you get it using array.stuff_special Jan 21 16:50:29 then I guess I'll have to think of a better system Jan 21 16:50:51 also... the products i'm entering in this xml sound like toys... Jan 21 16:50:53 of the naughty kind Jan 21 16:51:38 Animas Corp. Vibe TM Jan 21 16:57:55 also, does it matter if I use or ? Jan 21 16:58:19 i think you have to use item for arrays Jan 21 16:58:52 alright, thanks Jan 21 17:00:15 jeeze this is taking forever Jan 21 17:00:28 told you. did you get a coffee? Jan 21 17:00:40 genymotion ftw Jan 21 17:00:44 I can't drink coffee, unless I want to take a trip to the hospital Jan 21 17:00:45 Coffee helps Jan 21 17:00:56 xrandr: About 10-15 Seconds. Jan 21 17:01:02 you could settle for tea Jan 21 17:01:02 well then, by the time you get back, it'd have started Jan 21 17:01:12 CallumTaylor: lol, true Jan 21 17:01:26 That is using a decent PC, the x86 image (with HAXM) (or Genymotion) and GPU Acceleration. Jan 21 17:01:33 Also, a physical device helps--just to state the obvious Jan 21 17:01:38 ^ Jan 21 17:01:39 kakazza: maybe it's my processor and available ram. I'm running a Lenovo H505s Jan 21 17:01:46 jpiche: i have a physical device :) Jan 21 17:01:50 Using the x86 image? Jan 21 17:01:53 you shouldn't be making apps for launch without a physical device Jan 21 17:02:00 It takes about a minute for me to start it on a physical device D: Jan 21 17:02:06 kakazza: x86_64 Jan 21 17:02:26 Emulator I mean Jan 21 17:02:57 ... i could make a million sex toy jokes about these device names -.- Jan 21 17:03:08 heh… sex Jan 21 17:04:07 lovely, now it says it failed to install the app on the emulator Jan 21 17:04:42 do not close it Jan 21 17:04:46 leave the emulator open Jan 21 17:05:02 there's no reason to restart everything Jan 21 17:06:03 If I am both pulling some objects from a server, and also showing the user how far away those objects are from their current location, should I do the network call with one async task and use a listener for the location update? Jan 21 17:06:26 Hey guys, I have an alert dialog appear when something a button is clicked which makes a HTTP Post request.. I was wondering whether if the user isn't within the app itself, it would send a status bar notification instead? Jan 21 17:06:51 how would I implement this? Jan 21 17:07:56 theblang, unless you want your app to freeze until the server replied, i would recommend doing it that way Jan 21 17:08:52 Syzygy I thought so. The tricky part, and really the part I have a question about, is how to handle the fact that either one of those tasks could finish first (bad internet connectivity vs long GPS lock time) Jan 21 17:09:11 theblang, use concurrency utilities, see java.util.concurrent.* Jan 21 17:09:24 there are multiple lock types to do what you want Jan 21 17:09:57 Syzygy I supposed I could show the list, then update all the location fields in the list once the listener is called. But, it could be vice versa. So I see myself having to do null checks and stuff that coudl get a little messy Jan 21 17:10:26 yeah I have no idea either, you'll have to figure something out Jan 21 17:10:44 I can't even tell you how we do it since this is my second week in this codebase Jan 21 17:11:31 i want know 'Intent'? Jan 21 17:11:43 Hey guys, I have an alert dialog appear when something a button is clicked which makes a HTTP Post request.. I was wondering whether if the user isn't within the app itself, it would send a status bar notification instead? Jan 21 17:13:11 grr, keep getting disconnected from freenode Jan 21 17:13:36 pfn so using those concurrent utilities I am guessing that I could put a lock in the Async Task that wouldn't let it finish until the location listener was called? Jan 21 17:13:49 theblang_, sure Jan 21 17:14:11 fly2web, http://developer.android.com/reference/android/content/Intent.html Jan 21 17:14:21 thanks Syzygy Jan 21 17:14:57 oh shit. endless story Syzygy Jan 21 17:16:28 well, either read that or this http://developer.android.com/guide/components/intents-filters.html Jan 21 17:16:33 and remember both websites Jan 21 17:16:47 or just quit ... that's cool too Jan 21 17:16:47 never say no to panda Jan 21 17:23:21 anyone here tried using the KVM option to speed up the android emulator? Jan 21 17:26:34 what's the simplest way to hack hashmap functionality into an xml? Jan 21 17:26:44 Do you have an idea how to make DialogFragment to don't crash on orientation changed? Jan 21 17:27:17 preferably in a way that I can simply do something similar to context.getResources().getStringArray(R.string.stuff) Jan 21 17:37:55 hey just wondering if I could get some advice. I am learning android dev and making an app that stores real time events these are stored online so they can be viewed in more than one place. What is the best practice regarding storing these locally on the phone? Should I store them in a db and check for changes or just not store them at all? I can think of issues with both scenarios :S Jan 21 17:39:21 hello, i'm having an issue with a samsung galaxy S4 and wifi access point behind a captive portal(which requires login information for internet but not for local network resources) however when i join the said access point, a limited browser window pops up asking for the login details, if i close the login window, the device automatically disconnects from wifi within 2-3 minutes, is there Jan 21 17:39:22 a way this can be disabled via code? Jan 21 17:39:31 at runtime that is Jan 21 17:41:45 matt1982_: cf android.database.sqlite and content providers, etc. Jan 21 17:42:41 ogamita, right ok so I should be storing it locally? I was just worried about if there was no signal and then it became out of date the information. I guess I could handle that use case though. Jan 21 17:47:58 the weirdest thing just happened, I was analysing my code to find memory leaks and saw that one of my activities is not getting cleared due to an EditText that I didn't put there Jan 21 17:50:05 thepoosh, woah weird. What do you use to analyse the app for memory leaks? Jan 21 17:51:02 I'm using MAT Jan 21 17:51:06 as any normal person should Jan 21 17:52:21 matt1982_: http://pasteboard.co/5udHxSo.png Jan 21 17:52:23 look at this Jan 21 17:52:54 ahhh hmm lol Jan 21 17:53:03 what is MAT? Jan 21 17:53:42 cigarshark: http://android-developers.blogspot.co.il/2009/01/avoiding-memory-leaks.html Jan 21 17:54:05 i see. looks like it will come in handy down the road. Jan 21 17:54:25 cigarshark: http://www.vogella.com/tutorials/EclipseMemoryAnalyzer/article.html Jan 21 17:54:28 anyone else enabled the hardware virtualization for the android emulator? Jan 21 17:54:31 yes, this is very usefull Jan 21 17:54:43 cigarshark: the emulator sucks Jan 21 17:54:46 I just enabled it via KVM on linux and I can't believe the speed increase. blazing fast now. Jan 21 17:54:54 try using Genymotion Jan 21 17:55:16 it's a simulator running on VB Jan 21 17:55:21 i don't see how it could be faster. my emulator is hauling ass now. Jan 21 17:55:33 whatever, I have actual devices Jan 21 17:56:10 it seems to take a little bit longer to deploy the apk to the physical device, or maybe I have a shitty device Jan 21 17:56:36 curious, have you switched to the Play Location API over the AOSP Location API? Jan 21 17:56:38 once the apk is running on the device, no doubt it runs well Jan 21 17:57:14 here is the info if anyone is interested -> http://software.intel.com/en-us/articles/speeding-up-the-android-emulator-on-intel-architecture Jan 21 17:57:48 <_u2pop_> hello all Jan 21 17:57:58 <_u2pop_> i have a galaxy s4 gt-i9500 and i root it but i dont find any great apps i can install it and i am new on android. Jan 21 17:58:04 <_u2pop_> i tried with Xposed Installer but dont work on s4 :/ Jan 21 18:02:46 The computer running Windows 8.1 worked perfectly. But after installing Java 7, Android Studio, and HAXM, it now crash with blue screen. Anyone experienced this? Jan 21 18:04:17 smallfoot-: sounds like your system is crapping on you Jan 21 18:04:25 this is a Windows specific question Jan 21 18:04:42 I would suggest taking a screenshot or remembering what failed Jan 21 18:04:46 and search MSDN Jan 21 18:05:18 that really sucks smallfoot. maybe check the virtualization is supported and configured in your BIOS? Jan 21 18:05:54 cigarshark, it seems to be supported, because HAXM is activated and running and I can run the emulator, it works fine and fast... then crashes randomly blue screen Jan 21 18:06:13 well, i got tired of waiting for the emulator lol. Sent it to my device and it worked just fine :P Jan 21 18:07:33 I have Windows 8.1 also, but I've dual booted my machine with Linux Mint 16, under which I run Android Studio with hardware virtualization using KVM. Linux Mint is better for development imo. I hate booting into Windows now. Jan 21 18:10:41 I have Windows only for android dev, because I normally run Linux, and didn't want to install Java :p Jan 21 18:11:11 is it save to delete files like gradlew.bat from project on linux machines in android studios? Jan 21 18:11:18 i mean.. it doenst use bats anyway i guess. Jan 21 18:12:33 what flavor of linux do you run? Jan 21 18:13:38 cigarshark: do u mean me? Jan 21 18:13:43 smallfoot Jan 21 18:13:49 ok Jan 21 18:13:51 :) Jan 21 18:14:49 Android Studio runs great on Linux. I've had zero issues so far. Jan 21 18:16:11 could say the same about everything else too. Springsource tool suite, chrome, vim, and all the other stuff devs use. Jan 21 18:16:56 smallfoot-, your computer sucks Jan 21 18:17:02 smallfoot-, take blue screen dump and search online for solution Jan 21 18:17:26 R.java isn't being built: aapt error 138 … what gives? I have no warnings or errors... Jan 21 18:18:11 i've even got Spotify and Dropbox. who the hell needs windows anymore? As soon as quickbooks and Adobe Suite hit LInux, windows can kiss my ass for good. Jan 21 18:18:17 explodes, run the aapt command from commandline and see Jan 21 18:18:18 too bad that'll never happen Jan 21 18:18:44 hey folks, just thought I would ask… so the "values/refs.xml" file overrides existing values such as layout file names, etc Jan 21 18:19:54 pfn: bus error 10 ._. Jan 21 18:20:14 explodes, probably bad libs for arch Jan 21 18:20:32 my other apps build just fine Jan 21 18:20:55 then your resources are so bad that they crash aapt Jan 21 18:20:59 strace Jan 21 18:21:06 or dtruss Jan 21 18:21:07 whatever Jan 21 18:21:13 huh Jan 21 18:22:51 well, at least I got Mike Murphy interested Jan 21 18:22:59 http://stackoverflow.com/questions/21265784/mat-identifying-a-leak-in-ui-elements-i-didnt-create?noredirect=1#comment32040573_21265784 Jan 21 18:23:23 thepoosh, samsung phone? Jan 21 18:23:26 mark moophy you mean? Jan 21 18:24:05 pfn: yep Jan 21 18:24:07 thepoosh, anyway, samsung phones have a memory leak in their actionbar implementation Jan 21 18:25:25 well, textview clipboard bullshit, but it trickles up to actionbar and causes activities to stick around Jan 21 18:25:33 jedir0x encountered this and might have a workaround, I forget what it is Jan 21 18:26:39 it's not that sucks Jan 21 18:26:59 pfn: if I can confirm this on a nexus device this is a real thing? Jan 21 18:27:13 there's no ClipboardDataPasteEventImpl in aosp Jan 21 18:28:04 pfn: the problem is 70% of the users have Samsung devices Jan 21 18:28:06 for us Jan 21 18:28:24 anyway, google for that specific object memory leak Jan 21 18:28:30 I'm sure someone's posted about it and maybe has a workaround Jan 21 18:29:18 Hi, I am experimenting with having my application as a intent filter. But I am not able to get the content url from the android.intent.action.SEND intent mot guides say you should use getIntent().getStringExtra(Intent.EXTRA_TEXT) but that gives me null, I am running this on my nexus 5 Jan 21 18:30:02 that just sounds like there is no EXTRA_TEXT Jan 21 18:30:46 mikedg: well yes, but I can see the content uri in the development tool while debugging, but I can't get to it Jan 21 18:33:40 hello I am studying Android UI for a school project would anyone be interested in helping me? Jan 21 18:34:13 curious1: irc 101, never ask to ask.... just ask Jan 21 18:34:29 #android-dev is not a teaching institution Jan 21 18:35:05 Google is Jan 21 18:36:38 curious1: how much can you afford Jan 21 18:36:53 ill answer some question for the low price of a single bitcoin Jan 21 18:37:30 I am not trying to learn a concept I am trying to gather feedback on Android Views and typical problems that are encountered with them. I have created a google form and I am gathering feedback. Jan 21 18:38:06 oh, forms, 2 bitcoins please Jan 21 18:38:17 https://docs.google.com/forms/d/1BOsh52tbks56RPn3H22evzvYyAVesWT27hjJFcWILM4/viewform Jan 21 18:38:50 Hey, what am I looking for to keep some objects persistent between activities? Do I have to make background process? Jan 21 18:39:31 submitted Jan 21 18:40:02 Janhouse: globalism! Jan 21 18:40:16 huh Jan 21 18:40:17 ? Jan 21 18:40:21 thanks mikedg Jan 21 18:40:45 Janhouse: some people like ot use services to achieve that Jan 21 18:41:00 hey folks, so I'm looking at this example scene and it's using two layouts depending on screen size (tab vs fon) via a values/ref.xml file… in the activity class we're showing a "FindViewById" call checking for the id that's only present in the tablet version to know if we're in one or the other. Is there an implicit rule that only layouts that are used at runtime are processed? Jan 21 18:41:35 just seems so strange because in one XML file there's clearly a "@+id/derp" being declared Jan 21 18:41:55 ? Jan 21 18:42:10 R.id.derp will be null if it's not available... Jan 21 18:42:58 meaning that it's not instantiated Jan 21 18:43:05 AH!!! Jan 21 18:43:34 xml layouts just describe a layout.. Until it's inflated the objects don't exist Jan 21 18:44:07 so while the id may be registered, findViewById will not be able to return anything because it will only exist when that layout is loaded (which will only occur when the values/refs.xml changes the layout alias) Jan 21 18:44:12 :-) Jan 21 18:44:43 that's why technically there can be duplicate @+id's Jan 21 18:44:45 Activity#findViewById finds views that exists in its content view Jan 21 18:45:26 just one of those concepts that are strange until you dig a little deeper Jan 21 18:45:43 reminds me of "pointer day" back in my first programming class (C/C++) Jan 21 18:45:48 heads exploded Jan 21 18:46:03 ty SimonVT + pfn Jan 21 18:48:18 my app keeps crashing...but the stacktrace doesnt shows the "caused by" part: http://pastebin.com/0WMLg8SL Jan 21 18:48:27 there is only android code at the stacktrace.. Jan 21 18:48:59 hello Jan 21 18:49:06 does crashlytics worth to try ? Jan 21 18:49:08 also, just to be clear… values directories are processed after the rest to (potentially but usually deliberately) override existing right? Jan 21 18:49:52 java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.LinearLayout$LayoutParams Jan 21 18:50:00 Do you use FrameLayout.LayoutParams anywhere? Jan 21 18:50:03 no Jan 21 18:50:04 i dont Jan 21 18:50:08 searched for it Jan 21 18:50:21 but..no results.. Jan 21 18:51:12 * alankila feels cheated due to experience with assembly Jan 21 18:51:23 I never had to tackle pointers, never saw the difficulty of them Jan 21 18:51:46 Somewhere, for some reason, a view in a linearlayout is getting framelayout.layoutparams.. Figure out what view, then you can find the reason Jan 21 18:51:52 I guess when you routinely do something like move.l (a0,4), d0 it's just no longer difficult Jan 21 18:52:42 hey guys Jan 21 18:52:46 got an interesting question Jan 21 18:53:04 I got my app launching from the default browser when you click http://mysite.com links Jan 21 18:53:14 however, it doesn't work with mobile Chrome Jan 21 18:53:31 looks like maybe mobile Chrome doesn't attempt to see if any apps can handle those links? Or am I doing something wrong? Jan 21 18:54:39 prgmmax, BROWSABLE Jan 21 18:56:06 apple should have called Safari i-Browse Jan 21 18:56:36 pfn: the same issue actually also happens on an LG-P769 running 4.1.2 Jan 21 19:06:32 Has anyone used any freelance sites for some additional work? if so which ones? Jan 21 19:07:58 could anyone point in the right direction for replacing the currently viewed fragment in a v13 ViewPager? I'm using a list backend Jan 21 19:10:34 Right now, I'm building a new adapter, setting it, and I even tried calling invalidate on the ViewPager, but it still shows the previous fragment. Anyone have experience with this? Jan 21 19:11:51 Anyone here use the Google Play Location API? Jan 21 19:13:06 That's what they want you to use! Jan 21 19:13:13 So your app becomes Google-dependent Jan 21 19:13:26 then it cant run on Google-free Android devices Jan 21 19:13:38 Yeah, and our client wants Kindle support.... Jan 21 19:14:54 I hate that Google is going to start doing that rather than contributing fully to the AOSP Jan 21 19:20:11 thepoosh, false, look at heap dump Jan 21 19:20:21 OOME is not same issue Jan 21 19:20:40 pfn: I'll check right now and post a screenshot Jan 21 19:23:15 Hi all, is this possible: I have a RelativeLayout with 2 childViews. ViewX and ViewY. Can you place ViewX so that the center of ViewX is the same as the center as ViewY? Jan 21 19:23:39 --> center of views must be the same, possible with xml layout or with code? Jan 21 19:24:08 FrancescoV: like, if the views are different sizes? Jan 21 19:24:20 yes Jan 21 19:24:58 FrancescoV: probably not easily Jan 21 19:25:01 Sure, center them horizontally Jan 21 19:25:17 pfn: holy shit Jan 21 19:25:32 And vertically Jan 21 19:25:37 Just center them Jan 21 19:25:49 MAT clearly states that it has a retained heap of 9 MB but no incoming references Jan 21 19:26:09 SimonVT: they can't be at the center of the parent, ViewX is relative to view which is centered Jan 21 19:26:40 Wrap them in a framelayout, position framelayout relative to the other view Jan 21 19:26:49 FrancescoV: you could use an inner RelativeLayout... Jan 21 19:26:54 FrancescoV: or what SimonVT said Jan 21 19:27:47 yo p33ps X) Jan 21 19:28:01 found the solution to my problem: https://developers.google.com/chrome/mobile/docs/intents Jan 21 19:28:15 turns out an app can't really just handle the implicit intents and let Chrome launch it Jan 21 19:28:42 instead, the website itself much say "This package can handle this page via an implicit intent." Jan 21 19:29:04 Any ideas on why a sqlite query would return no results in an app on a device but when I backup the database to my dev environment and run the same query it returns results? Jan 21 19:30:10 mmarklar: sounds like a permission difference Jan 21 19:31:16 thepoosh, that "it" what is "it" Jan 21 19:31:25 hmmm Jan 21 19:31:41 and a gc root doesn't need incoming references Jan 21 19:31:41 the activity that wasn't cleared on the S3 Jan 21 19:31:43 smooze: no, I can see all the data in the database Jan 21 19:32:03 shmooz: but this particular query behaves differently Jan 21 19:32:22 pfn: I usually filter first by incoming references and then exclude soft/weak Jan 21 19:34:00 shmooz: thanks, you helped me figure it out haha :) Jan 21 19:34:56 mmarklar: I could have said any other random thing probably ;) Jan 21 19:35:08 SimonVT, jpiche, this is what I have now but it's not what I need. http://i43.tinypic.com/14sh8qw.png Jan 21 19:36:00 "Test" and the dark gray are two buttons. The gray circle button is relative to the green "test" button. But the image behind the dark gray must have the same center as the dark gray Jan 21 19:37:01 shmooz: maybe, thanks anyway :) Jan 21 19:37:38 Wrap them in a framelayout, position framelayout relative to the other view Jan 21 19:43:40 if you need to call a util function that uses both Activity and Context, what do you pass to the function? do you just type case from one to the other? Jan 21 19:44:11 Not all contexts are activities Jan 21 19:45:06 SimonVT So would you go ahead and set up the function to accept two parameters, Activity and Context, even if usually the parameter will be the same? Jan 21 19:45:13 (if it needs an activity, make it take an activity) Jan 21 19:45:31 No, just one activity oO Jan 21 19:46:08 SimonVT Oh I see, so not all contexts are activities, so if I pass in activity then just typecase to context I should be good? Jan 21 19:46:23 You don't need to cast it to context Jan 21 19:46:30 Inheritance.. Jan 21 19:46:56 .. how does it work?!?!? Jan 21 19:46:57 <-- derp Jan 21 19:47:04 thanks SimonVT! Jan 21 19:47:47 JakeWharton: HAI Jan 21 19:47:56 greetings Jan 21 19:47:59 how's your new job? Jan 21 19:48:06 well, new position Jan 21 19:48:09 wait Jan 21 19:48:16 I'm thinking of other people Jan 21 19:48:18 :S Jan 21 19:48:26 you're not Romain Guy Jan 21 19:48:29 :S :S Jan 21 19:48:46 SimonVT: looks it doesn't work. This is how it must be. http://i43.tinypic.com/e7nwus.png Jan 21 19:48:55 have you seen my awesome question? Jan 21 19:49:22 no Jan 21 19:49:25 Red starts at the end position of Green. the center of orange must be the same center as Red. Jan 21 19:50:02 JakeWharton: http://stackoverflow.com/q/21265784/1056359 Jan 21 19:55:34 thepoosh, why are you asking again Jan 21 19:55:37 I already gave you a clear answer Jan 21 19:55:41 you suck at the googles Jan 21 19:55:50 O_O Jan 21 19:55:54 you clearly don't want help Jan 21 19:55:56 you just want to nag Jan 21 20:04:23 Getting this error from proguard, can anyone point me in the right direction. I'm unsure what to do. Jan 21 20:04:30 Hello guys Jan 21 20:04:34 what do you think about titanium? Jan 21 20:05:05 Titanium? Jan 21 20:05:10 yep Jan 21 20:05:42 appcelerator titanium? Jan 21 20:05:55 Can someone help me out with proguard, can't get my app to export. Jan 21 20:05:57 Warning: com.viewpagerindicator.UnderlinePageIndicator: can't find referenced class com.viewpagerindicator.R Jan 21 20:05:57 [2014-01-21 15:02:23 - myApp] You should check if you need to specify additional program jars. Jan 21 20:05:57 [2014-01-21 15:02:23 - myApp] Warning: there were 75 unresolved references to classes or interfaces. Jan 21 20:05:57 [2014-01-21 15:02:23 - myApp] You may need to specify additional library jars (using '-libraryjars'). Jan 21 20:08:51 to get help with proguard, we'd need more info: what libraries are you working with? what classes does your app load by name? Jan 21 20:10:42 Explodes, I defined a keep statement for "hopefully" my whole aoo Jan 21 20:11:06 -keep class com.eghdk.** { *; } Jan 21 20:11:50 I'm using about 8 libraries Jan 21 20:17:46 eghdk: you can try -dontwarn com.eghdk.** Jan 21 20:17:59 all of my warnings are coming from com.viewpagerindicator.somekindofIndicator Jan 21 20:18:05 be absolutely sure to run through your built app before launching it though Jan 21 20:18:13 hm Jan 21 20:18:32 i'm no expert, i only recently got proguard to work for me, with the use of -dontwarn Jan 21 20:18:42 proguard has a good troubleshooting guide on their website, though Jan 21 20:18:58 http://proguard.sourceforge.net/#manual/troubleshooting.html Jan 21 20:19:02 Okay, I will try that. Im glad that I'm not the only clueless one explodes Jan 21 20:19:11 I don't get how it works I think. Jan 21 20:19:29 Like, why do I need to tell it to keep classes? What is it doing that it needs to keep them. Jan 21 20:19:58 Hey quick bit of advice. In my application I will be making a few different calls to a server with data would it be worth creating some overall Class to handle these requests and then just pass a List to the constructor? Jan 21 20:20:46 if you pushed an update to your app, then realized you left out one small code change that makes a big difference with a feature, what would you do? Jan 21 20:22:30 theblang: Happened to me today. Pushed another apk really quick afterwards. Had one user complain to me, and had to tell them to uninstall and reinstall. just bit the bullet on that one. Jan 21 20:23:30 eghdk did you up the versionCode? I guess you have to huh? Jan 21 20:23:41 Yeah Jan 21 20:25:33 Hello, I'm adding `android:layout_gravity="bottom"` to a RelativeLayout, and when I do I get: "Child ... does not have a valid layout_gravity - must be Gravity.LEFT, Gravity.RIGHT or Gravity.NO_GRAVITY". What am I doing wrong? Jan 21 20:25:46 eghdk if I up the versionCode, but keep the versionName and changelog the same, will it still update in the play store? Jan 21 20:26:09 Yeah, the version code is the only change you have to make. Jan 21 20:26:17 Everything else can stay the same Jan 21 20:26:24 As far as I know. Jan 21 20:26:37 But I'm like 100% sure it'll work Jan 21 20:26:47 thanks eghdk Jan 21 20:29:35 yo can you start another AsyncTask from the onPostExecute() method of another? Jan 21 20:30:24 Should be no reason why you can't. Jan 21 20:30:49 seems to be *hanging*.. Jan 21 20:31:11 yes, you can Jan 21 20:31:16 and asynctasks run sequentially by default Jan 21 20:31:22 http://commonsware.com/blog/2012/04/20/asynctask-threading-regression-confirmed.html Jan 21 20:31:26 that may have something to do with it Jan 21 20:31:36 thnx X) Jan 21 20:31:53 so do you have any opinion about Appcelerator Titanium? I'm going to use it in my next project unless there's a serious problem with it that I'm not aware of Jan 21 20:32:02 no one has an opinion Jan 21 20:32:04 other than garbage Jan 21 20:32:28 Mattx: Tried it. Didn't like it. Jan 21 20:32:53 seriously? Jan 21 20:33:20 tell me more, I've no experience with it Jan 21 20:33:55 so why is the task still active in onPostExecute()..? Jan 21 20:34:12 thought that was called on completion..? Jan 21 20:34:49 Mattx: I'm trying to find this one article about native vs webapps. Jan 21 20:35:11 pfn? ^ Jan 21 20:35:14 eghdk, you're aware that titanium is not webapps right? Jan 21 20:35:30 you're probably talking about phonegap (?) Jan 21 20:35:44 eghdk? ^ Jan 21 20:38:22 Eh, I know it's not a mobile app. But I don't trust anything that takes code in on one side and spits out code for a whole bunch of other platforms on the other side. lol Jan 21 20:41:29 ok, but it's "native" in a way, not a web app for mobiles Jan 21 20:43:18 Yeah, I understand. It's tempting to go ahead and try/use it. Jan 21 20:43:21 though oddly, that's just what jvms do :-) Jan 21 20:43:53 yep, more or less Jan 21 20:46:12 how am I supposed to use aidl in AS Jan 21 20:46:21 putting stuff in src/main/aidl isn't working Jan 21 20:46:55 also my build.gradle says "cannot resolve symbol audl" for aidl.srcDirs Jan 21 20:46:56 Hello guys! Jan 21 20:55:08 Is there a way to exclude classes from a jar dependency? Trying to avoid the "Multiple dex files define…" DexException caused by two conflicting .jar deps Jan 21 20:55:47 you explicitly choose the maven jar you want Jan 21 20:55:56 in the dependencies section Jan 21 20:56:01 it worked once for me Jan 21 20:59:15 is there a good way to convert a web app to mobile? Jan 21 20:59:19 would using webview be acceptable? Jan 21 20:59:40 that begs the question of, why bother Jan 21 20:59:46 cordova makes it easy to store your assets clientside Jan 21 20:59:49 if you could just go to the mobil site in a browser Jan 21 20:59:53 supposedly Jan 21 21:00:01 I didn't really care about assets so I dropped cordova Jan 21 21:00:09 well maybe the web app is already developed, but you want to get it in the play store Jan 21 21:00:17 and set it so the page doesn't load except through that app Jan 21 21:00:37 make a launcher app that brings up the browser Jan 21 21:01:03 a launcher with a paywall? Jan 21 21:01:19 when did paywall come into this Jan 21 21:01:23 or how Jan 21 21:02:18 I just asked... if you want to charge 99 cents for a web app and make it easy by doing it through the google play store, why not use webview? Jan 21 21:02:26 I suppose that's a lot of things rolled into one. Jan 21 21:02:57 unless you think more money can be made with mobile ads? Jan 21 21:04:50 oooh you want to charge Jan 21 21:06:13 yeah, I don't know if charging is better or ads are better... or a free and premium app. Jan 21 21:06:25 I don't know if I should just roll it with webview or use phoengap... the app is already done Jan 21 21:10:42 free and open source software! Jan 21 21:10:44 all the way! Jan 21 21:11:05 but... I'm poor... Jan 21 21:11:24 * mr_lou is frustrated. :-( Jan 21 21:11:32 Just thought you should know. Jan 21 21:11:52 free open source software with donation? with flattr? Jan 21 21:12:10 or basic free open source software, then another with premium features Jan 21 21:12:51 * kbs gives mr_lou a cookie Jan 21 21:14:06 if you give mr_lou a cookie... Jan 21 21:15:55 are we gonna teach mr_lou to cookie Jan 21 21:15:59 so he can cookie for a lifetime Jan 21 21:16:06 …he's sure to ask for milk Jan 21 21:16:11 o Jan 21 21:16:14 I think I might need to go see a hypnotist. Jan 21 21:16:23 apparently he asked for a hypnotist Jan 21 21:16:59 Yes.... a hypnotist might be the answer. Jan 21 21:17:25 Because... he could hypnotize me. Jan 21 21:17:46 that's what they do Jan 21 21:18:09 And then maybe he could remove my frustration. Jan 21 21:18:18 I might get it back though of course. Yes, I probably will. Jan 21 21:18:29 Dammit. Stupid plan. Jan 21 21:18:31 Won't work. Jan 21 21:18:43 well, if you keep programming for android… :p Jan 21 21:19:07 That's just it. I don't want to. Jan 21 21:19:28 I don't have to either. Jan 21 21:19:32 I mean it's not a job. Jan 21 21:19:44 but it's so much fun Jan 21 21:19:55 It was supposed to be sparetime thing. Replacing my JavaME development... or... supplementing it. Jan 21 21:20:03 But it's no fun. Jan 21 21:21:04 I really don't like the way Android development was designed, and that's frustrating, because I really wanted to like it. Jan 21 21:22:12 well Jan 21 21:22:17 you can always be yet another web developer. Jan 21 21:22:26 Mavrik, I know! And that's frustrating! Jan 21 21:22:32 it's not like Android concepts are hard or anything. Jan 21 21:23:04 No, they're just not that well designed. Jan 21 21:30:27 mr_lou another satisfied customer :) Jan 21 21:33:01 hm, AS 0.5.0 to get local .aars , i guess they mean gradle Jan 21 21:33:09 not sure what i would use that for now Jan 21 21:35:38 what is the conventional way of restoring a fragment's listeners after an instance restore (e.g. i have an activity with a view pager using a fragmentpageradapter, the activity is a listener for the fragments) Jan 21 21:51:52 <_95A31_> HI guys I am working on Wi-Fi direct. I have this error: Could not set interface p2p0 flags (UP): Name not unique on network. Can you help me ? Jan 21 21:52:23 does anyone know of any documentation to create an application that uses facial recognition? Jan 21 21:52:25 the error sounds pretty straightforward Jan 21 21:52:28 name not unique.... Jan 21 21:53:43 <_95A31_> pfn Yes, of course, p2p0 and wlan0 have same mac address but I do not know how solve... Jan 21 21:53:55 it's name, not mac... Jan 21 21:55:39 <_95A31_> pfn I will try to change my ramdisk ty Jan 21 22:04:34 can someone tell me his experience on using ant/maven/gradle for android development? i have done a little ant today, but since i'm used to developing JEE projects with maven, it seems like an awful lot of typing and double checking. i know almost nothing about gradle except that it's almost finished and already usable and supposed to be the future of android development (because it's being pushed/developed by google). is it wo Jan 21 22:04:34 rth checking out yet? Jan 21 22:06:34 anybody using GreenDao, and if so, are you able to access a Cursor when needed? Jan 21 22:06:45 cigarshark: double yes Jan 21 22:07:19 you have access to the SQLiteDatabase Jan 21 22:07:36 so anything you can do in android with that, you can do with GreenDAO Jan 21 22:09:52 ok, the reason I am asking is I'm about to bite the bullet on either ORMLite or GreenDao and this is one of the requirements Jan 21 22:10:17 anyone have experience w/ both ORMLite and GreenDao and have an opinion on which is best? Jan 21 22:12:45 hi all Jan 21 22:13:08 hi Jan 21 22:13:09 i'm looking for a way to change or animate the alpha of the overflow icon in the actionbar Jan 21 22:22:52 *crickets* Jan 21 22:23:08 hrmmm I've run into an interesting problem Jan 21 22:23:20 after launching an activity from an intent Jan 21 22:23:25 is there a way to get that activity object? Jan 21 22:23:45 I need to popup a dialog over that activity. Creating a dialog requires a reference to the activity Jan 21 22:24:09 add some extra in your intent so that your activity knows to show the dialog Jan 21 22:24:14 prgmmax you would just make your dialog an activity with dialog theme Jan 21 22:24:23 don't try getting a reference to that activity from another activity Jan 21 22:25:17 meaning, your second activity is the one that should show the dialog, not the first one Jan 21 22:25:20 karakuri - That makes sense. But since any activity could be the one launched, I now need to have every activity's create check if it should show the dialog. I guess that's the correct solution, though Jan 21 22:25:25 right Jan 21 22:25:37 g00s_ not sure what you meant Jan 21 22:25:46 could make it part of a base activity that your other ones extend from Jan 21 22:26:05 he's talking about an activity that looks like a dialog Jan 21 22:26:14 which i think is different than what you are asking Jan 21 22:26:19 I'll definitely refactor it out somehow, but I probably won't make it a base. I would like to keep the binding minimal Jan 21 22:26:39 sounds like this is the correct solution, though Jan 21 22:26:47 having each activity check if it should display the dialog Jan 21 22:28:27 I'm being very blind here I guess (new to intellij and android dev) but in a call to onOptionsItemSelected(MenuItem item) , whats the best way to get a reference to the parent Menu so that I can find sibling menu items from their ID? Or is there a global call to get a menu item from its ID? Jan 21 22:28:28 Hello all. I'm trying to show a progressdialog when my app starts while the app gets the current gps location. I'm using AsyncTask to do the background work and show the progress dialog. But I'm getting a error and I cannot find the solution. I've been racking my brain for hours on this and I cannot figure it out. Any help would be appreciated. Heres the error+code http://pastebin.com/jH3G5ASK Jan 21 22:29:58 heh, I've just got my first AsyncTask running. Cant help though sorry. Jan 21 22:30:31 Ah. Jan 21 22:30:59 This is only my second time using AsyncTask....But this error truely has me stumped. Jan 21 22:31:33 the only thing I would suggest to you is to use a binary chop with the debugger and zoom in on the line that causes the exception. but youve probably done that. Jan 21 22:35:15 Hmm Jan 21 22:47:54 horseshit the bulb got burned Jan 21 22:49:46 rOOb, you finished your activity without properly disposing of any dialog windows Jan 21 22:53:02 c.get(Calendar.DATE); --> gives me "5" . Shouldn't that be 22 ? http://developer.android.com/reference/java/util/Calendar.html#DATE Jan 21 22:53:46 pfn hmm. Jan 21 22:54:18 I thought it was going like this: start activity, start progressdialog, finish getting data, return to activity... Jan 21 22:59:31 any gradle geniuses here? i'm trying to incorporate a third-party plugin's *source* (it works if i reference it simply as a maven artifact) into my gradle file and i am failing miserably Jan 21 22:59:49 which wifi adb connector app do you guys use? preferably free but I dont mind coughing up a dollar if there are obvious benefits of one over the other. Jan 21 23:00:09 adbWireless Jan 21 23:00:48 you push a giant green button and it shows you the IP address Jan 21 23:00:52 can't get much simpler Jan 21 23:03:30 hmm, bad reviews for that. ad-ridden they say. and a 20-9 review good v bad ratio. I'll try it though. Jan 21 23:10:01 this really is mental. It's taking abuot a minute and a half to rebuild a 80 line app with gradle etc on a not too shabby machine. These new "all singing all dancing" build systems suck arse for the simpler stuff. Jan 21 23:12:16 someone at google said "gosh we really should make eclipse faster" and instead the engineers interpreted that as "build something that makes eclipse look fast" :p Jan 21 23:12:37 heh. Jan 21 23:15:29 Ive just made the switch to intellij. A lot nicer IMO. I tried Android Studio which is based on it but there was just too much under the hood automation - when it went wrong it went wrong spectacularly. Jan 21 23:16:04 that said I'm not impressed with the speed of things in intellij to launch an app to a HW device - takes ages. Jan 21 23:16:31 but then my desktop is a few years old but still has 8 gigs of Ram which I thought would be ok. Jan 21 23:17:08 rgr, not much you can do about that Jan 21 23:17:12 hrmmm okay...my situation got a bit more funky Jan 21 23:17:17 I am running an i7 4770 and it still can be slow Jan 21 23:17:19 so I can add the extra to the bundle Jan 21 23:17:35 and then any given activity can look for that extra and show the dialog if it is there Jan 21 23:17:48 very impressive IDE though. As soon as Ive mastered Java a bit better I suspect development time to drastically improve using intellij. Jan 21 23:17:50 problem is, I have the landing activity, and IT is the one that brings up the second activity Jan 21 23:18:04 so if the landing activity is the one that should show the dialog, I cannot really send an extra Jan 21 23:18:39 I guess if it is the landing activity, I'll special case it? Jan 21 23:18:44 and for all others, do the extra? Jan 21 23:24:28 running app on device from intellij takes <15 seconds... Jan 21 23:25:07 my desktop was built in 2009 and runs intellij + stuff fine Jan 21 23:25:14 uggghh. if your product has 65 chapters and FIVE MORE APPENDICES... it might be TOO DAMN COMPLICATED Jan 21 23:25:17 500gb ssd + 18gb ram doesn't hurt, of course Jan 21 23:25:20 * tophyr looks pointedly at gradle Jan 21 23:25:33 s/product/product documentation/ Jan 21 23:25:53 pfn, and some idea64.properties tweaking Jan 21 23:26:05 yeah, had to bump up heap size in idea64.properties Jan 21 23:26:11 default heap makes it too laggy Jan 21 23:26:15 yeah Jan 21 23:26:18 it's not enough Jan 21 23:27:29 bumping it to 1.2gb or so is good Jan 21 23:28:42 oh I'll look at that. Jan 21 23:30:14 was that under linux or windows? Jan 21 23:30:53 When posting a result from a thread to the UI thread, using Handler.post(Runnable r) it seems that it takes about 100ms before the code in the Runnable is executed. Is it possible to speed it up a bit, maybe by using another way for passing messages between threads? Jan 21 23:32:33 just wait 100ms Jan 21 23:32:36 there is no faster way Jan 21 23:32:49 use a handler that already exists rather than creating a new one, perhaps Jan 21 23:34:26 it depends what's in the looper queue as well Jan 21 23:34:36 i'm using an existing handler, so it's not that... it's just annoying because it makes the UI flicker a bit Jan 21 23:34:39 if you post when the phone is changing orientations you're going to have to wait a bit Jan 21 23:35:54 yeah, i was hoping for a way to kinda "by-pass" the looper-queue, but i guess the queue is there for a reason :-) Jan 21 23:37:20 i'll just have to do some animation stuff to handle the delay, and that'll will solve it Jan 21 23:45:31 hellow Jan 21 23:46:03 is there some way to inject javascript with loadData on a webview? or is it only limited to loadUrl with a javascript: url Jan 21 23:48:03 I think it's just loadUrl Jan 21 23:48:09 why is that a limitation Jan 21 23:48:22 becuase loadurl clears the focus Jan 21 23:48:31 causing the softkeyboard to dissapear Jan 21 23:48:39 at least on android 4.0 to 4.4 Jan 21 23:48:55 sorry, i mean less than 4.4; 4.4 is awesome and everything is good Jan 21 23:49:46 i'm using loadurl to send javascript to the page because the old webview has no websockets, so i've implemented it via a javascript/java bridge Jan 21 23:50:18 and the world is great, except the keyboard hides every time loadUrl is called, Jan 21 23:50:31 you must not support 2.3 then :) Jan 21 23:50:37 well you could just pull the keyboard back up Jan 21 23:50:45 or use JS to re-focus the text area? does that work? Jan 21 23:50:58 the use case is with a chat website Jan 21 23:51:13 Can anyone help me understand why I'm getting this error? http://pastebin.com/jH3G5ASK Code is included. Jan 21 23:51:13 you'll be typing a message, and if another one appears, your keyboard will lose focus Jan 21 23:51:36 becuase the messages are delivered via loadUrl and java websockets Jan 21 23:52:25 well what if the JS that displays the new message calls focus() on the input Jan 21 23:52:40 interesting, i'll try that to see if it works Jan 21 23:52:41 or Jan 21 23:52:50 does the java/javascript bridge not let you call from java back into JS Jan 21 23:53:23 i think i could just write an event listener, and attach it to the input tag in the initial js load Jan 21 23:53:30 i'll be back if it doesn't work Jan 22 00:00:56 just played with greenDao. Does it not suck that you have to generate your model objects? What happens when GreenDao changes the code generation in future releases? Seems like a pain in the ass to merge in changes in order to upgrade greenDao down the line. Jan 22 00:13:26 hey durka42 thanks! Jan 22 00:13:38 this solution is sort of working Jan 22 00:13:46 I sort of worry about a race condition Jan 22 00:13:49 but maybe the JS is fast enough Jan 22 00:13:53 otherwise you could lose chars Jan 22 00:20:47 doesn't really work durka42 Jan 22 00:21:05 you lose some characters Jan 22 00:21:35 ok what about Jan 22 00:21:50 what if the edittext was outside of the webview Jan 22 00:22:18 yeah you could do that Jan 22 00:28:34 that's really unfortunate though Jan 22 00:36:48 Hey Left_Turn u r a qt Jan 22 00:37:07 what does tht mean? :) Jan 22 00:37:12 oh thanks Jan 22 00:37:24 =) Jan 22 00:37:35 One day I have to learn how to develop for Android Jan 22 00:37:54 I will count on you to help me hehe Jan 22 00:38:04 sure :p Jan 22 00:38:12 Did you do some android development already? Jan 22 00:38:19 nope:( Jan 22 00:38:29 Learning at the moment or just have plans to learn? Jan 22 00:38:38 Or plans to execute, not sure Jan 22 00:39:35 i don't know to be honest.. i plan on making android stuff but it may not be through the sdk? Jan 22 00:40:27 Through what then? Jan 22 00:40:42 Qt :) Jan 22 00:41:17 LOOL Jan 22 00:41:32 until i learn java that is... i just don't have enough time atm Jan 22 00:41:51 content provider question -- ive registered a content observer on the browser history URI (content://browser). when i get callbacks for changes to that URI in ContentObserver#onChange(boolean self, Uri uri), is there any way to get the *specific individual* URI that changed? Jan 22 00:42:04 Anyone know why my app that is using gps(GPS_PROVIDER or NETWORK_PROVIDER) is marked as "high battery use" under location in android whereas apps like gps status(that are very gps intensive) are marked as low? I've set requestLocationUpdates() to high values(min time 5 mins and min distance 10000) Jan 22 00:42:07 like content://browser/3 instead of just content://browser Jan 22 00:42:11 whats better Jan 22 00:42:16 Android Studio or VIM Jan 22 00:42:23 shouldn't I be using emacs Jan 22 00:42:30 what compiles faster? Jan 22 00:43:40 a compiler Jan 22 00:44:17 i'm being an idiot while android studio is being frozen; ignore me Jan 22 00:44:32 skinkitten? what the hell kind of name Jan 22 00:45:56 you shouldnt be using emacs if you're using Java thats for sure. Jan 22 00:46:12 gonna restart my computer; Jan 22 00:46:23 I wouldnt if I were you Jan 22 00:46:39 forcing a close on AS can lead to hell with half built gradle project support. Jan 22 00:50:54 so just re-import it? Jan 22 00:59:25 Ok I'm back Jan 22 01:08:41 how do you force an edittext to get focus Jan 22 01:08:51 is there some kind of view.focus method Jan 22 01:11:30 just gradle clean Jan 22 01:11:41 vim compiles faster Jan 22 01:11:42 ;-) Jan 22 01:12:49 hephaestus_rg: textView.requestFocus() should to it.. Jan 22 01:13:00 thanks burmat Jan 22 01:30:07 are there any real docs / source for the Android gradle plugin? Jan 22 01:31:57 I guess https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle will do Jan 22 01:32:57 huh, didn't now it was written in groovy Jan 22 01:34:26 groovy Jan 22 01:39:14 Hi, I'm completely new to android development. I want to make an adroid app to run a jar program. the jar has it's own gui, etc. I just want an app that acts like the installer and launcher. Any guidance? Thanks. Jan 22 01:40:29 Hey guys, I have an alert dialog appear when something a button is clicked which makes a HTTP Post request.. I was wondering how to send itself a notification instead if the user doesn't have the activity in the foreground? Jan 22 01:42:39 overyander: impossible to do this natively without running some type of java emulator. Port the code over. Jan 22 01:43:06 what burmat said Jan 22 01:43:42 why does nobody answer my question lol Jan 22 01:43:48 CocoStorm: i don't understand it Jan 22 01:43:57 which part :) Jan 22 01:43:59 you push a button, post request to server, alert dialog Jan 22 01:44:03 yes Jan 22 01:44:05 CocoStorm, just google android notifications Jan 22 01:44:10 so if you push it but the activity isn't foreground, you want a notification? Jan 22 01:44:22 http://developer.android.com/guide/topics/ui/notifiers/notifications.html Jan 22 01:44:54 I would imagine that if the request comes back you want to notify Jan 22 01:45:04 burmat, yes so if I push it, and while the request is still processing and the user presses the home button then receive a notification Jan 22 01:45:21 the button sends the request and wait for the response, on error show alert dialog (if app open), if app is not open then do a notification Jan 22 01:45:27 because I want to later implement this so that if there is no internet connection then receieve a notification when there is Jan 22 01:45:37 so you have to send the request as a background process and wait for the response, so you shouldn't have to worry about anything lifecycle related Jan 22 01:45:39 jonc, yes Jan 22 01:45:47 ahh, that could be more difficult Jan 22 01:46:01 burmat, oh really Jan 22 01:46:06 well maybe not Jan 22 01:46:46 jonc, would notifications handle it? How do I tell if the activity is in the foreground or not? Jan 22 01:46:50 not positive but you may have to create a service Jan 22 01:46:55 I see Jan 22 01:47:14 I don't think anything but a service will run while your app is not in the foreground (could be wrong) Jan 22 01:47:17 will def need a service or at least an alarm manager to test for a network connection if one doesn't exist Jan 22 01:47:50 what kind of service? Jan 22 01:48:07 but if you trigger a background task for networking operations, that won't kill the lifecycle until it at least gets a response, even if you push the home button Jan 22 01:48:42 gotcha Jan 22 01:48:43 what you could do is just launch your app and in onPause or something similar, register a service to take over Jan 22 01:49:05 that seems like overkill though if it is something simple.. Jan 22 01:50:18 it is something relatively simple I suppose. So what you're saying is check whether the app is in foreground or not and send a notificatoin if it isn't? Jan 22 01:50:19 This will work? Jan 22 01:50:29 because the app is still running Jan 22 01:50:35 burmat, it's not mine to port over. it's an app that i use at work constantly to manage some network devices and it would be great to have that on my phone. i'd even make an app just to have it work on my phones Jan 22 01:50:41 exactly, it would just suck if for some reason it wasn't Jan 22 01:51:08 burmat, there are many apps which use notifications, what's their way of implementing it? Jan 22 01:51:45 well push notifications are not easy (to me at least) to implement. If you don't use push, there is typically a service running. Jan 22 01:52:19 I managed to implement push notifications in a weekend hackathon but it was close Jan 22 01:52:22 what kind of service? Jan 22 01:52:23 and you need your own server Jan 22 01:52:55 durka42: props to you, I wouldn't have even considered trying to implement it on a schedule. Jan 22 01:53:14 yeah well we didn't exactly realize what we were getting into Jan 22 01:53:28 CocoStorm: i don't think you will necessarily need a service, I am sticking to my asynctask theory, just doing some reading before i tell you the wrong thing Jan 22 01:53:44 ah I see for sure Jan 22 01:53:50 durka42: 3 seperate occasions I was like: "yeah, i'm going to try this again", and 2 of those times I said f it Jan 22 01:55:13 actually; if you're ok with associating your google account with the notification [effectively meaning the data passes through the mother-ship and it knows the recipient] google cloud messaging is a pretty solid approach. https://developer.android.com/google/gcm/index.html Jan 22 01:56:11 I'm just trying to think how I could manage a post request when there is no internet connection. I'd store the data needed to post and when a connection becomes avaialble I'd send the post and wait for a notification but I'd need to know when there is any network connection and will it constnatly be checking? that would mean the app needs to be running? Jan 22 01:56:28 kbs, I should use gcm instead? Jan 22 01:56:45 Yeah. Jan 22 01:56:54 CocoStorm that depends Jan 22 01:57:12 CocoStorm: I didn't see the first bit of your question [apologies] - but for the general problem of getting notifications from a server; it's worth looking into. Jan 22 01:57:13 your server would have to send a message to verify that the network was available for your device Jan 22 01:57:34 CocoStorm: GCM has it's limitations I think.. on time to live Jan 22 01:57:57 but yes, GCM is how you do messages to clients (iOS push notifications) Jan 22 01:58:21 but your app has to have a special portion that handles the message and will create a notification Jan 22 01:58:42 CocoStorm: well in your app, you could test the connection. if it failes, register a broadcast receiver to monitor the connection and save the data to be sents when the receiver fires... Jan 22 01:58:54 god, my typing sucks Jan 22 01:59:46 But GCM XMPP can send device to server? Jan 22 02:00:03 is there a way to get java ported over or is there a recommended method to emmulate it? Jan 22 02:00:20 And it queues the messages in the device until it connects to the network Jan 22 02:00:41 Node, oh really so it would handle it for me? Jan 22 02:00:54 overyander, http://forum.xda-developers.com/showthread.php?t=2325619 Jan 22 02:01:08 because I was thinking something like burmat said Jan 22 02:01:15 CocoStorm: I think so. Let me link Jan 22 02:01:22 CocoStorm: Also, i just found an answer on SO that might be useful for checking if your app is front and center.. Looks like if you make a superclass that sets onResume/onPause, you can get the current state from your background task and call the correct method of notification Jan 22 02:01:24 and yeah, thanks kbs I'll look into GCM Jan 22 02:01:40 https://developers.google.com/events/io/sessions/324893448 Jan 22 02:01:51 Thanks Node Jan 22 02:01:56 I remember where he mentions something that you asked for, CocoStorm Jan 22 02:01:59 jonc, i read that, but you can't exactly embed another app into a new app can you? Jan 22 02:02:31 fwiw; *sending* from device -> server is usually not a big deal. Register a broadcast receiver for network changes, and send saved data when needed. The cute trick is *receiving* from the server, without polling (inefficiently.) Jan 22 02:02:43 CocoStorm: CommonsWare has a useful answer too, but it seems a bit complicated (dynamically creating broadcast receivers involved). anyway, link: http://stackoverflow.com/a/6848003/586859 Jan 22 02:02:52 thanks burmat ! Jan 22 02:03:14 you need it to be your app overyander? Jan 22 02:03:25 kbs, that's without gcm right? Jan 22 02:03:42 CocoStorm: yes - sending from device -> server doesn't really need GCM Jan 22 02:03:58 or, it's not particularly useful [in my opinion at least] for that situation Jan 22 02:04:09 reading and unmarshalling a 500mb xml file and tossing into a DB takes too much time Jan 22 02:04:12 it's probably the best approch for data coming in the other way. Jan 22 02:04:33 making a request from the device is easy, it's getting the device to wake up and do it Jan 22 02:04:47 no, you don't want to do that :-) Jan 22 02:04:55 kbs, I'm going to look into the gcm session that was linked to me but I'm taking that device->server with GCM doesn't handle the no network connection issue? Jan 22 02:04:57 in our app the GCM message just said "yo wake up there is new data" and then the app made the request to our server Jan 22 02:05:22 GCM can have a json object added to it iirc Jan 22 02:05:54 durka42: Why not send message itself? Jan 22 02:06:45 CocoStorm: my 0.02 is to structure the app so to decouple sending from the data creation. I.e., once data is created, just save it, without worrying about whether the network is available. An independent service/bit of code sends unsent messages, triggered by whatever mechanism seems appropriate. [eg: syncadapter, broadcast-receiver, etc.] Jan 22 02:07:23 requestFocus doesn't seem to work i'm trying to shift focus from an input in a webview to an android edittext Jan 22 02:07:33 i know it's getting called Jan 22 02:07:46 just seems to have no effect Jan 22 02:08:07 Node, don't really remember why we didn't do it that way Jan 22 02:08:26 there might be more new data since the GCM was sent Jan 22 02:08:26 hephaestus_rg, clearFocus? Jan 22 02:08:31 yeah was definitely looking at it that way, I was just wondering whether broadcast-receiver/gcm would be two different approaches and if so which one would be the best to look into Jan 22 02:08:41 what do you mean clearFocus? Jan 22 02:08:46 http://developer.android.com/reference/android/view/View.html#clearFocus() Jan 22 02:08:52 durka42: Oh okay, makes sense Jan 22 02:09:10 what focus should i be clearing, the webview? Jan 22 02:09:15 try it Jan 22 02:09:19 So you think that would be better approach if data is being updated quite often? Jan 22 02:09:21 whats it hurt? :P Jan 22 02:09:32 CocoStorm: if all you need is to send messages, I'd personally just use the stock android mechanisms [syncadapter/broadcastreceiver tickling a service.] I'd use GCM only if the server has async data to send to me. Jan 22 02:09:33 exactly Jan 22 02:09:51 I thought using GCM would just avoid us making http request again Jan 22 02:09:54 Node: I believe we had it queue up so it wouldn't send another GCM until the phone called up to download the data Jan 22 02:11:01 kbs, I see thanks, I'll look into broadcast receivers for now then Jan 22 02:11:02 you have to be very careful not to spam users Jan 22 02:11:33 it is also a pain because you can't send more than like 4k characters in 1 message to the GCM api Jan 22 02:12:50 if i do wv.clearFocus() and then editText.requestFocus() it still doesn't behave like you'd expect Jan 22 02:13:00 jonc, it'd be nice to have this just install like an app. even if it were something that had to be installed on a rooted device there are several co-workers that would have it installed tomorrow. Jan 22 02:13:24 hephaestus_rg: are you sure your edittext isn't gaining focus and your softkey isn't popping up to make it obvious? Jan 22 02:14:02 hmmm, now i have an error with calling an method on npobject Jan 22 02:19:11 that's not very descriptive... Jan 22 02:20:16 i suppose the error must be thrown from clearing the focus of the webview or requesting focus of the edittext Jan 22 02:20:32 because commenting out those two lines caused the error to stop showing up Jan 22 02:21:55 hephaestus_rg: so if you get rid of clearfocus and just use requestfocus, what happens/ Jan 22 02:22:56 still that error Jan 22 02:23:13 oh maybe it needs to be called ona different thread Jan 22 02:23:32 Is asking if people want to test / see my app considered advertising? Jan 22 02:23:41 (unreleased app) Jan 22 02:26:05 hephaestus_rg: yeah, idk what is happening there. if the edit text is inside another view, you might have to call that one first to focus before the edittext. Honostly though, I could be totally wrong. it is worth a shot. requestFocus() works though and sometimes it is not 100% obvious because the soft keyboard doesn't pop Jan 22 02:27:06 everytime i want to handle a button push, do I need to create a new Intent and a new Activity? even if i just want to update a text field/ Jan 22 02:27:39 xrandr: no, you just need an onClickListener() and you need to do what you want in there Jan 22 02:27:44 why would you need to do that xrandr? Jan 22 02:28:11 jonc: I'm an extreme n00b at this Jan 22 02:28:20 gotcha :P Jan 22 02:28:29 look up View.onClickListener Jan 22 02:38:08 * xrandr still wishes he could use Swing lol. It's more in my comfort zone :) Jan 22 02:41:10 it's best you think of the android ui-code as closer to AWT - that way, you won't be disappointed :-) Jan 22 02:42:04 :) Jan 22 02:44:07 ok, now i just need to figure out how to pop open the softkeyboard Jan 22 02:44:58 hephaestus_rg: so the focus is working? Jan 22 02:45:24 yeah it is now Jan 22 02:45:32 here: Jan 22 02:45:33 InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); Jan 22 02:45:51 imm.showSoftInput(whateverEditTextYouHave, InputMethodManager.SHOW_IMPLICIT); Jan 22 02:46:13 there is also getWindow().setSoftInputMode Jan 22 02:46:16 not sure what the difference is Jan 22 02:47:03 i need a contect for the first one Jan 22 02:47:32 don't have one handy? : p Jan 22 02:47:58 i don't, let me see where i can grab one Jan 22 02:48:07 an Activity is a Context Jan 22 02:48:24 editText.getContext() might work Jan 22 02:48:45 getApplicationContext() Jan 22 02:48:57 so Context c = getApplicationContext() Jan 22 02:49:05 use c in your getSystemService() cal Jan 22 02:49:22 it's called from a runnable though, not an activity Jan 22 02:50:06 any way you can pass a context into it? Jan 22 02:50:31 what are you trying to do? sounds like you're doing it wrong whatever it is Jan 22 02:51:46 haha Jan 22 02:51:56 it works fine if i pull the context from an edittext Jan 22 02:52:10 i have a webview that has a lot of javascirpt going on via loadurl Jan 22 02:52:23 so when that happens you lose focus on anything you had selected in the webview Jan 22 02:52:51 my workaround is to send the user to an edittext whenever they try to write somewhere, so that the focus isn't lost all the time due to the javascript Jan 22 02:53:44 sounds really hacky Jan 22 02:53:51 it seems like the inherint problem is that the webview is one thread Jan 22 02:54:03 so when you loadurl, it interrupts the user's typing Jan 22 02:54:38 the alternative seems like queueing all the loadurl calls and executing them whenever the user isn't typing Jan 22 02:55:02 but i'm not sure how to detect that from inside a webview **** ENDING LOGGING AT Wed Jan 22 02:59:59 2014