**** BEGIN LOGGING AT Sun Nov 02 03:00:00 2014 Nov 02 03:32:33 Hey all, anyone got tips to improve the location detection of the device? Friend working on a sort of meta-game where it uses real world locations but overlays a game aesthetic to them. Nov 02 03:32:50 Seem to be running into issues where the location marker jumps around a but, and is inaccurate at small distances. Nov 02 03:42:25 Some codes: http://pastebin.com/KJRPEjwU Nov 02 03:42:54 * JacobTabak cringes Nov 02 03:44:35 http://www.oracle.com/technetwork/java/codeconventions-135099.html Nov 02 03:45:10 release the hounds ! Nov 02 04:26:16 ((ActionBarActivity)getActivity()).getSupportActionBar() gross Nov 02 05:08:53 heh - been playing with an actionbar bug for a week now also g00s ... used HierarchyViewer last night to explore why it's not inflating as I think it should Nov 02 05:10:32 trying to get the TextSelection actionbar working with our WebView apps :/ Nov 02 05:10:35 capella what version of android ? Nov 02 05:10:53 4.4.3 N7 ... I think I know the problem now Nov 02 05:10:53 i couldn't get the built-in viewserver stuff working on 4.4.4 Nov 02 05:11:18 Just fire up monitor ! Then Click the mobile icon worked for me no fuss Nov 02 05:11:28 man the eclipse monitor stuff is such garbage; for some reason the cursor changes to a checkered circle and after that i can't do anything Nov 02 05:11:32 i totally give up Nov 02 05:11:41 Ignore the checkered circle Nov 02 05:11:53 but i can't click on any part of the UI Nov 02 05:11:54 it works anyhow just the pointer is wrong Nov 02 05:12:02 mmm. Nov 02 05:12:03 on mac it must be fucked up more Nov 02 05:15:56 can't see cool stuff? https://www.dropbox.com/s/d8q15fos4jr4plw/actionDebug.png?dl=0 Nov 02 05:17:18 capella oh i do get that screen, i just can't move the panels so I can read the tree :| Nov 02 05:17:51 you mean they wont resize? (mine do) Nov 02 05:19:01 in order to use monitor, i actually have to shut down AS Nov 02 05:19:19 one sec Nov 02 05:19:30 says can't find some port or using another ddms Nov 02 05:19:30 oic ... mine isnt running so ...mmm Nov 02 05:19:46 yah, just |monitor| Nov 02 05:20:35 scrunchied resized https://www.dropbox.com/s/l6y9oexm45h03vn/newAction.png?dl=0 Nov 02 05:21:14 capella ok, so i just started it. i see my device on the left. what do i do next ? Nov 02 05:21:34 click the app in the left window Nov 02 05:21:45 then click the icon top rightish looks like phones Nov 02 05:21:51 yeah, thats the problem. my app isn't there Nov 02 05:21:56 its debuggable, and running Nov 02 05:22:07 let me kill adb Nov 02 05:22:54 yeah, nothing Nov 02 05:22:58 not sure what your IDE is configured like ... mine works no fuss ... but I don't use intelliJ for mozilla dev Nov 02 05:23:11 so maybe you get a conflict Nov 02 05:23:27 As/intelliJ/HV ... (?) that I don't Nov 02 05:23:38 i quit those Nov 02 05:23:40 i see [2014-11-02 01:23:15 - ViewServerDevice]Unable to debug device: asus-nexus_7-089d8eff Nov 02 05:23:48 these tools are so ghetto Nov 02 05:23:59 google should be embarrassed Nov 02 05:24:35 heh - eclipse https://www.dropbox.com/s/ru84c96iuspcc7v/pumpkin.gif?dl=0 Nov 02 05:29:50 capella this is what i see http://i.imgur.com/sZMKbcx.png Nov 02 05:29:54 any ideas ? Nov 02 05:30:13 capella and did you include romain's viewserver thing ? Nov 02 05:30:19 nope Nov 02 05:30:25 to both Nov 02 05:30:30 * capella thinking Nov 02 05:33:59 Is there anything like Gson, Jackson, but for Cursors instead of jsons? Nov 02 05:41:35 what Nov 02 05:42:25 built in view server? Nov 02 05:42:30 Like using Gson, Jackson we can map JSON strings to custom classes, can we do that with a Cursor? Nov 02 05:42:32 no such thing Nov 02 05:42:35 g00s, Nov 02 05:42:53 paranova, no Nov 02 05:43:43 pfn https://github.com/romainguy/ViewServer/issues/14#issuecomment-41880194 Nov 02 05:45:14 Is it at least to implement that kind of feature? Nov 02 05:45:21 possible to( Nov 02 05:49:09 g00s, interesting, I've never checked to see that it's there Nov 02 05:49:36 pfn ah, well "As of now, hierarchy viewer does not work on user builds - only on userdebug (such as emulator). For your own purposes, you need to compile in" Nov 02 05:50:03 my n7 is stock so, that explains that Nov 02 05:50:11 capella you have a userdebug build ? Nov 02 05:51:20 Just whatever my moz builds are ... live device / not emu, no special work on my part, using standard moz build options Nov 02 05:51:48 I checked, there's no Viewserver in the build Nov 02 05:52:10 but we build a debuggable version for devs Nov 02 05:52:22 yeah of course my app is debug ;) Nov 02 05:52:31 interesting "Unfortunately, we are in a messy situtation here. You cannot run any of these tools concurrently right now. We are planning on integrating hierarchy viewer into Studio itself, at which point this issue will go away. However, that will not happen until early next year." Nov 02 05:52:58 so maybe i/o 2015 :) Nov 02 05:54:09 g00s, cyanogenmod is userdebug Nov 02 05:54:35 capella you are using CM right ? Nov 02 05:54:59 or build aosp yourself Nov 02 05:55:03 No, thats on my Phone Nov 02 05:55:18 N7, stock Nov 02 05:55:22 how the fuck Nov 02 05:55:26 :/ Nov 02 05:56:11 Or is there any way to get a ContentValues object from JSON string? Nov 02 06:00:22 capella weird, i started hierarchyviewer manually and it kinda works Nov 02 06:00:34 but then i shut it down, went back to monitor, and it says: Nov 02 06:01:08 "unexpected error while parsing input: Invalid ui automator hierarchy file" Nov 02 06:02:00 Yah, I close windows / panels and refresh them manually and it sometimes "fixes itself" Nov 02 06:02:26 you see that msg in a dialog box iir Nov 02 06:03:45 capella what eclipse view are you using ? i see a black background with nodes, not the text-based tree you have Nov 02 06:04:38 or perspective ? Nov 02 06:05:13 eclipse? huh? Did your device fall asleep? Nov 02 06:08:58 g00s: that last png you posted doesnt look like the same app Im running when I start monitor - not sure what you see currently Nov 02 06:10:36 http://i.imgur.com/sZMKbcx.png Nov 02 06:12:02 rats ... wrong one ... https://www.dropbox.com/s/fksyjog2g66giv0/foo.png?dl=0 Nov 02 06:12:05 jesus christ Nov 02 06:13:07 capella your earler screenshot https://www.dropbox.com/s/d8q15fos4jr4plw/actionDebug.png?dl=0 Nov 02 06:13:28 yes? Nov 02 06:13:31 what perspective is this, and what view is the thing with the orange highlight Nov 02 06:14:03 perspective , view = eclipse bs Nov 02 06:15:12 ok found it, omg Nov 02 06:15:23 it's associated with the image on its left ... try close X the tab upper left of the image labelled "dump..." then re-open by clicking the phones icon Nov 02 06:15:32 \o/ Nov 02 06:16:36 so thats ddms, not hierarchyviewer Nov 02 06:17:15 ok Nov 02 06:17:36 I think jake said last night it's basically HV Nov 02 06:17:50 yeah i dunno, i had to restart adb like 10 times before monitor would see my device and list my app underneath it Nov 02 06:17:54 Just a way to get there I found that works Nov 02 06:18:14 i wish they would fix that stupid circle checker cursor Nov 02 06:18:29 nobody gives a shit about these tools heh Nov 02 06:18:37 obviously Nov 02 06:18:41 I think it indicates that the views are dynamically updating Nov 02 06:19:25 mine aren't. when i 'dump hierarchy for ui automator' they are static Nov 02 06:20:31 allright. it kinda works :) Nov 02 06:21:00 Kinda good enough ... it helped my identify my issue last night ... how I fix it I haven't gotten to yet :p Nov 02 07:08:01 I just created a TextView and change it's value every time I type into an EditText box. But the TextView text is underlined. Is there a way to remove the underline, and why is it there? Nov 02 07:09:06 http://stackoverflow.com/questions/8566805/disable-built-in-spell-checking-on-ice-cream-sandwich Nov 02 07:11:00 oh, that does explain what's going on, thanks g00s! Nov 02 07:31:27 hi anyone here Nov 02 07:39:16 hey nickz_GnD Nov 02 07:41:07 nickz_GnD: ! Nov 02 07:41:29 kozko: i need help will u Nov 02 07:42:35 Hi Guys Nov 02 07:42:47 TYPE_GAME_ROTATION_VECTOR is not present on Samsung Galaxy S4 (running Android 4.4.2). . .I confirmed that by getting list of all available sensors. Nov 02 07:42:58 Is there a way I could discard Magnetometer data from TYPE_ROTATION_VECTOR ?? Nov 02 07:43:44 m on htc explorer and i already rooted my mobile and used so many custom rom but never had a problem but yesterday i bought a new memory card and tried to install a rom again but twrp recovery saying your device does not appears to be rooted install supersu Nov 02 07:45:00 again i did same things for rooting and tried again but no joy same message again and again but same rom working perfectly with my old memory card Nov 02 07:45:50 nickz_GnD I think this is not the place to ask for roms etc.. Nov 02 07:46:14 nickz_GnD please read the topic , thanks Nov 02 07:46:26 kozka sorry for that will u please tell me the correct irc Nov 02 07:46:54 kozko: Nov 02 07:46:57 ? Nov 02 07:47:14 nickz_GnD: "Root/custom ROMs, head to #android-root" Nov 02 07:47:39 thanks surf2b1 Nov 02 07:48:32 TYPE_GAME_ROTATION_VECTOR is same as TYPE_ROTATION_VECTOR but does not include Magnetometer's data. Is there a technique to discard magnetometer data from TYPE_ROTATION_VECTOR ? Nov 02 07:52:33 With material, are we discouraged to use the ActionBar and everything should be Toolbar? I don't like some aspects about the Toolbar. Nov 02 07:56:30 hey everyone. I have a TextView inside a ListView that I want to update every second. What is the best way to do this so that I only update the View when it's on screen? Nov 02 07:57:07 when it goes offscreen it gets recycled Nov 02 07:57:22 so you have to stop updating it when it gets recycled. there is a listener for that Nov 02 07:57:46 ah, that sounds like what I'm looking for. I'll take a look. Thanks! :) Nov 02 08:01:32 I am guessing the listener I want would be an implementation of the OnAttachStateChangeListener. Is this the one? Nov 02 08:03:17 no Nov 02 08:03:49 when a view is passed to getView as the convertView instance it has been recycled and should be disassociated from the old data Nov 02 08:04:57 hi all, is there any good dialog for open/save files and folders? Nov 02 08:12:00 mortezajavan: how do you mean? Nov 02 08:12:42 mortezajavan there are a ton https://github.com/DeveloperPaul123/FilePickerLibrary Nov 02 08:13:28 mortezajavan I'm not sure, but there is no file dialog in Google Play Service, where use can choose between dropbox drive or filesystem? Nov 02 08:15:09 thenovelist, g00s, kozko, i mean something link FilePickerLibrary that g00s mentioned. thanks Nov 02 08:17:56 JakeWharton: What can I do if my TextView in my ListView will need updating every few seconds while it is on screen? Nov 02 08:18:16 it's always going to be on screen Nov 02 08:18:22 you just have to account for when it gets recycled Nov 02 08:19:24 look at the source to Chronometer as well Nov 02 08:19:33 https://developer.android.com/reference/android/widget/Chronometer.html Nov 02 08:27:10 please join #android-os for custom rom development Nov 02 08:33:22 hi, I have a problem Nov 02 08:33:29 ah, I see. Thanks JakeWharton! Nov 02 08:33:47 please join #android-os for custom rom development Nov 02 08:34:03 I have a custom view, that I want to scroll at a specific rate, but I can't seem to get it to scroll at the rate I want Nov 02 08:36:22 OERIAS: we heard you Nov 02 08:37:28 http://pastebin.ws/96w1tc Nov 02 08:38:43 it scrolls either too fast or too slow, or scroll infinitely fast Nov 02 08:53:34 This woman made 180 websites in 180 days to learn web development. http://jenniferdewalt.com/ I'm thinking of doing something similar to get me motivated to learn android programming. Maybe 30 android apps in 30 days. Nov 02 08:54:06 an app a day Nov 02 08:54:21 you'd have a load of buggy apps at the start Nov 02 08:57:02 Well, that's fine. And they would be simple anyway. Nov 02 09:04:28 an app a day keeps the doctor away ;) Nov 02 09:07:02 oddalot why not an app an hour ? Nov 02 09:07:24 shoot higher :) Nov 02 09:09:34 what does "attaching/detaching a view to a window" mean exactly? Nov 02 09:12:43 anything less than 2 weeks for any decent software is ludicrous Nov 02 09:17:21 * Mavrik hides his weekend hack projects. Nov 02 09:21:23 YO bros Nov 02 09:21:55 can anyone help me with building from source. Nov 02 09:22:31 Essentially. my device (SM-T700 Samsung Galaxy Tab S) is pretty new and there are limited rom options Nov 02 09:23:20 Cm has been built and I have cloned everything i can regarding vendor files, but when i try to build, it searches through the blobs and is missing a bunch of shit Nov 02 09:23:41 we really need to change the channel name to #app-dev Nov 02 09:23:53 sorry Nov 02 09:23:59 thought i was in the right place Nov 02 09:24:07 no one reads the header :) Nov 02 09:24:33 indeed Nov 02 09:30:47 ah, my Google-Fu skills need some polishing. It looks like the RecyclerListener is what I've been looking for this whole time! Nov 02 09:33:16 so, anyone got ideas about my question? Nov 02 09:36:50 herpderphurr: a view attaches when its given a parent anchored to the decor view Nov 02 09:36:56 detaches is the opposite Nov 02 09:37:25 the decor view is the root view attached to a window (which is usually managed by an activity) Nov 02 11:04:20 hi all Nov 02 11:04:34 anyone can tall me something about Intel XDK? Nov 02 11:14:04 what about it? Nov 02 11:19:02 opinions, pros, cons Nov 02 11:20:07 "it's not android" is a relevant answer to all three questions :) Nov 02 11:21:39 Does it work best/only for Intel devices? Nov 02 11:21:59 Considering icc and Embree... it seems like something they'd do. Nov 02 11:47:07 dshad14: I suggest you google. There are twenty eight million articles out there with just that kind of fuzzy stuff.... Nov 02 11:47:25 Guess it would take a while for 5.0 to get rooted? Nov 02 11:47:26 how do i add alpha to a give RGB int value? Nov 02 11:48:00 Thank god I just remembered that it will be new and unrooted and I should put off installing it when it comes out for my nexus 7 Nov 02 11:48:23 cliffreich_: I'd do it for each component individually. Nov 02 11:48:35 i cant, it's dynamic stuff Nov 02 11:48:50 cliffreich_: Context? Nov 02 11:52:33 firelegend: whats this to do with android dev? What do you mean by rooted in this instance? You can still enable development options. Nov 02 11:52:54 nvm i did it Nov 02 12:02:49 hi everyone. What is the right tool to edit/view program layout without compilation every layout changes ? Nov 02 12:03:12 It's too hard to deploy every time you change layout and see changes on real device Nov 02 12:03:50 RusAlex do you need a real device? with genymotion is pretty fast Nov 02 12:03:58 but you still have to compile everything Nov 02 12:05:09 yes get a fast pc and genymotion / android-x86 Nov 02 12:05:45 so there is no way to edit it "on-device"? Nov 02 12:07:09 RusAlex: Similar to https://play.google.com/store/apps/details?id=com.aide.designer ? Nov 02 12:07:23 I don't think you want that... Nov 02 12:08:14 yep do not want WYSIWYG Nov 02 12:08:35 RusAlex: Otherwise, IntelliJ offers a realtime preview for layouts. Nov 02 12:08:48 so still googling and looking for right way of developing. You can write code fast when you use TDD. But how to previes layout. Nov 02 12:12:52 flan3002: hm... yes android studio also has what I want Nov 02 12:12:56 layout preview Nov 02 12:13:35 can anyone help me with my question? http://stackoverflow.com/q/26698869/150851 Nov 02 12:19:37 I'm trying to send an instance of an interface to one of my services. Should I extend the service to Serializable or Parcelable? Nov 02 12:21:02 propagandhi is a local service or in a separated process? Nov 02 12:22:19 kozko: local service Nov 02 12:22:48 then you can just get the instance of the service once it's binded Nov 02 12:23:05 and call functions on the service passing the instance Nov 02 12:23:55 kozko: the thing is, the service should be calling a method in the activity after something happens there Nov 02 12:24:24 you could use a event bus or a local broadcast Nov 02 12:24:53 and the activity could just register for a concrete event Nov 02 12:25:00 ugh yes Nov 02 12:25:08 kozko: perfect. thanks Nov 02 12:25:08 propagandhi, use eventbus for that kind of thing Nov 02 12:25:09 or events Nov 02 12:25:28 don't call stuff directly or you'll be in a world of hurt when it comes to memory leaks and configuration change events Nov 02 12:25:31 recenty i'm more used to use rx-android Nov 02 12:26:21 hmm, I use both, I don't think Rx fixes the problem of delivering events over components Nov 02 12:26:23 unless I missed something Nov 02 12:28:19 you guys = life savers. Didn't realize I'd put myself in real sh*t trying to do that Nov 02 12:31:30 Hi Nov 02 12:31:45 Allo!/ Nov 02 12:32:53 I have a very big image and I want to display it in an activity in my app, but I want to keep it full size and make it so the user can move it around by dragging (similar to how you do in google maps) ... Does anyone know how i could do this? Nov 02 12:33:38 did they move where the sdk tools are placed? I have redownloaed a few times, and 23.0.5 is still no where to be found in sdk/build-tools Nov 02 12:34:11 looking for which one specifically Pieces028_ Nov 02 12:34:45 Tool or version number? Nov 02 12:35:01 The tool.. adb? Nov 02 12:35:37 I'm just looking for 23.0.5 because gradle keeps saying it can't find it. Nov 02 12:36:26 Have you ran the util to download the packages? Nov 02 12:36:36 AFter installing the sdk? Nov 02 12:37:09 I have sdk\build-tools\android-4.4W Nov 02 12:37:32 is there any way to change the textcolor from an entire layout (programatically)? doing it to each element doesnt look good Nov 02 12:37:43 That's for android wear. Nov 02 12:37:48 :) Nov 02 12:38:03 Thats all I have installed ;) Nov 02 12:38:04 antisaint: and yeah, I have deleted and reinstalled like 4 times. Nov 02 12:39:41 So you have installed via sdk manager... hmmmmm... Nov 02 12:40:00 i cant use styles as the color is dynamic... :/ Nov 02 12:40:56 pieces029_ Try to look sdk\tools Nov 02 12:43:19 Here is the error message if I try to download through AS Nov 02 12:43:21 gnoring unknown package filter 'build-tools-23.0.5'Warning: The package filter removed all packages. There is nothing to install Please consider trying to update again without a package filter. Nov 02 12:51:39 what do you have checked on the bottom of the sdk manager? Nov 02 14:02:34 rgr:in the context of android there is only one meaning to the word root, gaining root access to the device as user root. I am rather surprised you did not assume this first. Nov 02 15:01:39 Hi, anyone ever had "resolve host "graph.facebook.com": No address associated with hostname" ? I don't even use facebook 0_o Nov 02 15:02:05 Nindustries, where did you see this message? Nov 02 15:02:13 in logcat Nov 02 15:02:29 I tried adding the google game thingy in my android project but it didnt work out, so I removed it Nov 02 15:02:35 And now I cant even start my app Nov 02 15:02:49 hmm Nov 02 15:02:50 " Nov 02 15:02:50 Could not load class (org.apache.tools.ant.taskdefs.repository.MavenRepository) for type mavenrepository" Nov 02 15:02:55 I dont use mavenrepo? Nov 02 15:04:07 Ah wait Nov 02 15:07:18 For some reason it's still in my build.xml Nov 02 15:07:54 nvm, fixed it :) Nov 02 15:50:47 How can I copy all the internal storage on my phone to my PC? Nov 02 15:52:14 Hi, Im trying to use google map v2 but the text ;: android:name="com.google.android.gms.maps.MapFragment" can not get resolved Nov 02 15:52:27 why is that? im following the developer site Nov 02 15:54:04 got the answer Nov 02 15:54:05 thanks Nov 02 15:54:31 you're welcome Nov 02 16:00:22 Hello guys. I have an HTC Desire 601 cellphone, I had it repaired but I see it's not working with the network we have in my country. I need its custom ROM. May you please help me find the original/stock ROM? Nov 02 16:01:32 Mohsen_Hassani: see topic Nov 02 16:02:40 danijoo, Is there a channel related to my question? Nov 02 16:02:59 see topic again. Nov 02 16:03:05 Mohsen_Hassani: needrom.com might help Nov 02 16:03:19 "root/custom ROMs, head to #android-root" Nov 02 16:03:52 danijoo, thanks you, and I'm sorry for not being careful about it. :) Nov 02 16:09:01 man why did they had to screw up the avd manager like this Nov 02 16:09:09 can't change the screen size anymore Nov 02 16:09:14 so the emulator window is HUGE Nov 02 16:12:28 Hi Nov 02 16:12:56 Guys, I try to use a dependency but it tell me that it failed to find Error:Failed to find: com.google.android.gms:play-services:4.0.+ Nov 02 16:12:56 Open File
Open in Project Structure dialog Nov 02 16:15:19 show your gradle file Nov 02 16:16:10 also you should upgrade to 6.1.+ Nov 02 16:17:57 anyone here? Nov 02 16:18:08 shan17j: wrong channel Nov 02 16:18:23 anyone here? Nov 02 16:18:24 danijoo, http://pastebin.com/5W3b03kr Nov 02 16:18:38 in fact, there isn't really a right channel for building the Android OS Nov 02 16:19:06 danijoo, I just installed Google play services. still nothing happens Nov 02 16:19:33 watch your versions. Nov 02 16:19:39 compile 'com.google.android.gms:play-services:21.0.+' Nov 02 16:19:52 it says in the sdk manager that it is 21 Nov 02 16:19:53 play-services max version is 6.1 Nov 02 16:20:08 no it doesnt Nov 02 16:20:29 revision it says sorry Nov 02 16:20:34 :) Nov 02 16:20:41 change that to 6.1.+ Nov 02 16:20:45 that will do the job Nov 02 16:21:05 Error:Failed to find: com.google.android.gms:play-services:6.1.+ Nov 02 16:21:05 Open File
Open in Project Structure dialog Nov 02 16:22:51 hm thats weird Nov 02 16:23:09 I use android studio Nov 02 16:23:35 in eclipse there is a import then extended android project and then you import the stuff I gues Nov 02 16:23:42 so it shows in the tutorial videos Nov 02 16:24:08 dunno. been ages since i used eclipse Nov 02 16:24:19 same for android studio ^^ Nov 02 16:24:42 what do you use? Nov 02 16:24:46 intellij Nov 02 16:24:58 cost money? Nov 02 16:25:14 theres a free and a premium version Nov 02 16:25:25 AS is derived from intellij Nov 02 16:25:29 yes Nov 02 16:25:40 anyway. you dunno what I should do now? Nov 02 16:25:47 if you take intellj and strip everything off that you dont need for android, you get AS :) Nov 02 16:25:50 nope Nov 02 16:28:38 hmm thanks anyway Nov 02 16:31:33 danijoo, here is the info about my google services Nov 02 16:31:33 http://pastebin.com/g1eCQGez Nov 02 16:31:42 so it shold be right to use 6.1+ Nov 02 16:47:43 danijoo, the problem is that you should have android repository installed too Nov 02 16:47:47 I guess Nov 02 17:06:06 how do i actually not use the hamburger/arrow drawer animation? im trying to pass a drawable to the actionbardrawertoggle, but that constructor says it doesnt work :( Nov 02 17:12:57 drinfernoo: which android version Nov 02 17:13:42 for the new android lollipop (and AppCompat support) the drawer is already build in Nov 02 17:14:04 so for ActionBarDrawerToggle from lollipop and support.v7 the constructor changed Nov 02 17:14:20 im using the constructor from support.v7 Nov 02 17:14:49 the v7 constructor dont need a drawable Nov 02 17:15:11 it is ActionBarDrawerToggle(context, drawer, idOfString1, idOfString2) Nov 02 17:15:35 oh excuse me Nov 02 17:15:40 i had the wrong api open lol Nov 02 17:16:02 so how do i turn off the animation? if thats "not the material spec" Nov 02 17:17:03 Would anyone have any suggestions on how I can reverse engineer an APK file? I'm having some issues using apktools :( Nov 02 17:18:00 drinfernoo: which anymation? Nov 02 17:18:09 the change from burger to arrow? Nov 02 17:18:54 Samiejg: thats not specific enough to help you Nov 02 17:20:03 ahh ok well. I'm decompile an app using apktool, and when I recompile (even without making changes), the app does not work. It installs but then when I open the app, it goes to a blank black screen Nov 02 17:20:48 oh well so your problem is in recompiling, not decompiling Nov 02 17:21:05 and I cant/wont help you with that because it sounds suspicious to me ;) Nov 02 17:21:22 are paths case sensitive under the android OS? Nov 02 17:21:42 are they under linux? Nov 02 17:21:46 yes Nov 02 17:21:52 what do you mean by suspicious lol but it might be recompiling, who knows. Maybe it's not decompiling all the files that it's supposed to. Nov 02 17:21:55 thats your answer :) Nov 02 17:22:08 although andoird might do something to adjust it :) Nov 02 17:22:11 but thanks Nov 02 17:23:00 Samiejg: im struggling to think of a legitimate reason to need to decompile and apk.. i'm sure danijoo is as well :P Nov 02 17:23:34 what is so crazy about decompiling an apk? That's like saying.. why root your phone? Nov 02 17:23:58 exactly. while there might be some reason to decompile and look into it (for learning, research whatever), i cant think of a legitimate reason to recompile it Nov 02 17:23:58 Samiejg: okay, so why are you decompiling your apk? Nov 02 17:24:19 the reason behind this usually is to replace ads with own ads and a new key to steal :p Nov 02 17:27:29 danijoo yeah Nov 02 17:27:44 sorrhit a dead spot Nov 02 17:27:49 mh Nov 02 17:28:05 no idea how to do this in material design Nov 02 17:28:57 so is there no way to just pass a drawable now? Nov 02 17:29:39 i cant see one in the api :/ Nov 02 17:29:49 maybe there is something in styles/themes xml Nov 02 17:29:50 no idea Nov 02 17:31:36 what else does v7.ActionBarDrawerToggle have over v4? Nov 02 17:32:03 nothing. its just the new toggle for material design Nov 02 17:32:36 damn i forgot this... after a view1 is gone and view2 need the fill that empty space... i just need to view2.setLayoutParams as match_parent, right? Nov 02 17:32:36 they (aka google) seem to not want us to customize it Nov 02 17:33:20 damn google isnt working with this vpn Nov 02 17:33:31 cliffreich__: yeah. View.GONE is completly out of the view, not only invisible. so if another view is on MATCH_PARENT it should increase in size Nov 02 17:33:49 but dont mistake it with View.INVISIBLE Nov 02 17:34:39 a vpn blocking google. where do you live? north korea? Nov 02 17:34:40 ok, trying now Nov 02 17:36:10 heheh no, but its a russian vpn i have for free and for some strange it'll sometimes die with a ERR_CONNECTION_RESET Nov 02 17:36:58 i guess ill switch vpn :^) Nov 02 17:39:59 you have free vpn Nov 02 17:40:07 do they inject ads cliffreich__ Nov 02 17:41:00 nah it's a not known and unpopular vpn. mine recently expired :S Nov 02 17:42:48 ok Nov 02 17:43:01 ill setup a pvn using a cloud server or something Nov 02 17:43:05 so getting/buying it again? Nov 02 17:43:13 in russia Nov 02 17:43:51 i wont buy vpns, ill use a droplet as vnp, probably. have droplets but no money for vpn :S Nov 02 17:45:45 hehehe Nov 02 17:49:54 hi folks Nov 02 17:50:43 I need to connect two AVDs to each other. Do anybody knows the adb command? I googled and stackoverflow’ed but without any success. :( Nov 02 17:54:48 connect doesnt say much.. Nov 02 17:55:15 could mean anything Nov 02 17:55:39 danijoo now im really confused, because i just used v4 instead, and got a persistent arrow, no burger Nov 02 17:56:17 i followed this guys recommendation http://stackoverflow.com/questions/26434504/how-to-implement-drawerarrowtoggle-from-android-appcompat-v7-21-library/26447144#26447144 Nov 02 17:56:30 and changed my styles, but same result Nov 02 17:57:06 never tried to style that arrow sorry Nov 02 17:57:26 danijoo: I mean I wanna connect my adb phone with my and wear :) Nov 02 17:57:39 like adb forward …. Nov 02 18:04:02 So I've started using Android Studio and wondered if anyone knows how to take numerical user input and store it as a variable? Nov 02 18:05:04 https://plus.google.com/+TorNorbye/posts/eHsStybrrBf Nov 02 18:05:07 just saying Nov 02 18:05:11 this is awesome! Nov 02 18:05:59 Nirvash: String input = mTextView.getText().toString(); Nov 02 18:06:36 int numericalInput = Integer.parseInt(input) :) Nov 02 18:07:01 hmmm Nov 02 18:07:03 yes Nov 02 18:07:04 thepoosh / danijoo: I may be thinking of this process too graphically... where would I define that exactly? Nov 02 18:07:20 in your java class holding the TextView Nov 02 18:07:24 Nirvash: did you do the tutorials on android? Nov 02 18:07:27 MainActivity.java, correct? Nov 02 18:07:28 you should learn the basics Nov 02 18:07:35 ^ this Nov 02 18:07:40 Agreed... I learn by doing, but couldn't find any decent tutorials Nov 02 18:07:51 Am I not looking hard enough? Nov 02 18:08:01 no Nov 02 18:08:04 you are not Nov 02 18:08:18 10-4 will continue to look Nov 02 18:08:34 Nivag: https://developer.android.com/training/index.html Nov 02 18:08:37 ups sorry Nov 02 18:08:39 Nirvash: Nov 02 18:09:06 but before looking into it, learn java Nov 02 18:09:12 >_< I missed the forrest for the trees Nov 02 18:09:15 that too Nov 02 18:21:35 hi, I'm not sure in which channel to ask, since there is no Android-Hardware-channel. I have a android-board with a GPS-Receiver, which is connected via UART. In Terminal, I can see incoming NMEA-Data on /dev/ttyS3 (UART-Interface 3 on the board). But how to tell Android to search on this interface for GPS-Data? Nov 02 18:22:48 geifawkes: try XDA Nov 02 18:22:52 So essentially, Android Studio designs it, but the entire functionality is determined in Java, correct? Nov 02 18:23:05 Nirvash: welcome to android dev Nov 02 18:23:05 danijoo: I think I've seen that one! :-) Good Morning! (being about 7:20 am here in New Zealand) Nov 02 18:23:37 thepoosh: Sorry for my ignorance, I'm trying to learn Nov 02 18:23:42 mislink sorry ^^ Nov 02 18:23:44 ;) Nov 02 18:23:54 hopefully didnt woke u up Nov 02 18:24:34 danijoo: no worries, I gathered as much. :-) Nov 02 18:25:32 did you see the new gradle feature? Nov 02 18:25:37 danijoo: not fully awake yet, been up just over 30 minutes, but only had one coffee so far... Nov 02 18:26:41 awesome gradle update Nov 02 18:27:10 yep Nov 02 18:27:22 I'm so happy Nov 02 18:27:35 waiting to see how much we can shrink our app with this Nov 02 18:27:53 ill check right now Nov 02 18:28:36 in case you guys are not aware (just posted this now) Nov 02 18:28:36 https://plus.google.com/116539451797396019960/posts/eHsStybrrBf Nov 02 18:28:37 better than proguard ? ? Nov 02 18:28:58 proguard doesn't check for resources Nov 02 18:29:00 just code Nov 02 18:29:21 it removes unused classes and methods Nov 02 18:29:30 and makes getters inline calls Nov 02 18:30:42 i think ill wait some months until this is bugfree... ^^ Nov 02 18:32:33 chicken Nov 02 18:32:34 danijoo: So basically, if I have a field called "number": using your code it would be int numbervariable = Integer.parseInt(number)? Nov 02 18:32:56 Nirvash: please learn java before asking questions here.. Nov 02 18:32:58 Nirvash: you need my code as well Nov 02 18:37:37 i'm assuming if i want to have a placeholder imageView before the user presses a button to play a video in its place Nov 02 18:37:51 the way to not do it is have a imageview thn hide it and show the videoview Nov 02 18:38:03 is there a better way to do this? Nov 02 18:38:40 Ravenheart: you could have them both in the same layout and use setVisibility(View.GONE/VISIBLE) Nov 02 18:39:02 good idea Nov 02 18:39:15 then i'll have to apply the layout settings only on the linearlayout Nov 02 18:49:30 thepoosh: do you know how this shrinkResources magic works arround resources that are required by name at runtime? Nov 02 18:49:41 ? Nov 02 18:49:49 getResources.getIdentifier() .. Nov 02 18:52:21 shrinkResources true removes unused resources. but how does this know what resources might be required at runtime.. Nov 02 18:53:33 ask the guy on the G+ post Nov 02 18:53:48 yeah. I thought you might have an idea :) Nov 02 18:54:06 ill take this as google-magic. Nov 02 18:59:04 So designing the form does absolutely nothing. You still have to define text fields and buttons, listeners, etc. in java? Nov 02 18:59:17 yup Nov 02 18:59:56 Wow, for something as simple as I want this is a bit overengineered it seems Nov 02 18:59:58 =/ Nov 02 19:00:22 the xml file is just a scaffold that the code uses to create a layout (when you call setContentView() ) Nov 02 19:01:21 * Nirvash wants #android-dev-babysteps Nov 02 19:01:41 Nirvash... You have any books? Nov 02 19:02:47 can you play videos on the emulator? Nov 02 19:02:59 nope Nov 02 19:03:01 antisaint: I know some basic programming, but it's just a matter of getting into it and making it work Nov 02 19:03:18 Pm me ill get you some books Nov 02 19:03:19 I literally need 5 inputs, one concatenation, and one phone call. That's it Nov 02 19:12:04 Anyone in the mood to write a simple app? And by simple I mean dead simple. Nov 02 19:12:15 pretaining to? Nov 02 19:13:42 It would just need to turn on the loudspeaker automatically every time a phone call is initiated, but not the other things, like keeping the screen on. Nov 02 19:14:53 My dad has a One S and with every update the phone speaker gets quieter and quieter and I can't for the life of me find a radio that gets it back to proper volume. So now he's had to resort to turning the loudspeaker on for phone calls, but with the screen on, his face keeps messing around with the touchscreen. Nov 02 19:15:28 I've tried every possible app in the play store, nothing really works properly. Nov 02 19:15:35 Sounds like proxy sensor could be messed up there. Nov 02 19:15:44 Code you ask for: Nov 02 19:15:45 final Handler mHandler = new Handler(); Nov 02 19:15:45 mHandler.postDelayed(new Runnable() { Nov 02 19:15:45 @Override Nov 02 19:15:45 public void run() { Nov 02 19:15:45 audioManager.setMode(AudioManager.MODE_IN_CALL); Nov 02 19:15:45 audioManager.setSpeakerphoneOn(true); Nov 02 19:15:46 MainActivity.shouldTurnSpeakerOn = false; Nov 02 19:15:46 MainActivity.shouldTurnSpeakerOff = true; Nov 02 19:15:47 Log.d("incoming_call","speaker_on"); Nov 02 19:15:48 } Nov 02 19:15:48 }, 500); Nov 02 19:15:53 oh my god Nov 02 19:16:00 No, the proxy sensor works just fine. Nov 02 19:16:15 antisaint: thats how you get in hell.. Nov 02 19:16:21 :) Nov 02 19:16:28 What have you done Nov 02 19:16:35 Broken everything Nov 02 19:16:39 * Darklust cries silently Nov 02 19:16:44 Borken all the things. Nov 02 19:17:15 So... anyone up to it? Just giving me the code is like giving a hungry man an instruction manual for an oven. Nov 02 19:17:33 In android 4.1 and more when you make a call the phone turn off the speaker phone automatically. So What you need to do is to add the speakerphone on in the reciever that listens for the call being made when the state is "offHook" and even put a 0.5 second delayed to turn on the speaker like that Nov 02 19:17:38 ;) Nov 02 19:17:43 Teaching him to fish is a better analogy :] Nov 02 19:17:57 Yes, but I've tried learning how to fish. Nov 02 19:17:59 I just can't do it. Nov 02 19:18:09 I've been trying since the days of Eclair. Nov 02 19:18:15 My brain just isn't wired for it. Nov 02 19:18:36 Hi everyone,I wrote up a blog post on How to compile AOSP using docker.Check it out, you can have your own ROM by the end of the day :) http://goo.gl/67CmFN Nov 02 19:18:41 A delay wouldn't be an issue. Nov 02 19:19:05 lol Jobs Nov 02 19:20:58 huh, already updated to 0.9 and gradle 0.14.0 and it says minifyEnabled not found Nov 02 19:21:06 * cliffreich__ yolo Nov 02 19:22:03 seems like minify is just rename... Renamed a few properties to make things more consistent. Nov 02 19:22:03 BuildType.runProguard -> minifyEnabled Nov 02 19:22:38 yep Nov 02 19:22:45 only this resource minimization is new Nov 02 19:27:39 how is AS 0.9 and gradle 0.14.0 behaving generally ? Nov 02 19:27:51 i thought i'd wait a little :) Nov 02 19:28:53 IceBone: Hmm.. I started programming when Mighty Mainframes ruled the world, I ventured forth with decks of 80 column cards and armoured myself in fanfold printout, delve into small devices with over a thousand tomes more memory & processing power which use multithreading... To be a software developer is for ever to learn new paradigms, and finding new ways to provv how stupid oneself is. ... Nov 02 19:28:54 ...It is not for the faint of heart, nor for those who want to retain their sanity! Nov 02 19:29:47 Which is why I'd rather offer a few beers to a someone without their sanity for what I'm sure is a very trivial app. Nov 02 19:30:09 g00s after 1 min, all good Nov 02 19:38:35 Sanity is overrated. Dev'ing rules! Nov 02 19:40:31 IceBone I'll do it for 25 million bucks Nov 02 19:40:42 I'll give you 10. Nov 02 19:44:33 10 million it is! Nov 02 19:44:42 Nivag: ironically you'd probably be better off writing mainframe code right now, since all the big iron shops are losing knowledge like mad but aren't terribly interested in getting off iron, either. Nov 02 19:44:59 oh wow Nov 02 19:45:15 my 6.1mb app is now 4.1 Nov 02 19:46:02 dragorn otoh, some shops are keeping the mainframe HW but switching to linux workloads Nov 02 19:47:15 dragorn: I last programmed a mainframe in the late 70's, ancient I am Nov 02 19:47:53 every time my buddy tried to show me his mainframe stuff my head exploded :) Nov 02 19:48:11 its a world where time runs backwards, you see the wrong thing in the mirror, etc Nov 02 19:48:21 atomic particles undecay Nov 02 19:48:31 black holes spew stuff out Nov 02 19:48:43 g00s: Yeah, the first year IBM offered Linux on their mainframes, they sold about 15% more mainframes that year than they had expected too! Nov 02 19:49:01 g00s: yeah; that's what I did for a long time; i was the first person outside of big blue to run z-linux :P (pre-z; so; linux/390 i guess) Nov 02 19:49:59 holy shit lol. i tried to run the release build and seems like it removed even important appcompat xml files so it won run Nov 02 19:50:03 google pls Nov 02 19:50:17 cliffreich__ lol Nov 02 19:52:18 dragorn: remember JCL, and having to specify the block size of any file you wanted to write? And the fact that different disks had different optimum block sizes (blocks could not span tracks)! Youngsters , these days... :-) Nov 02 19:52:39 Nivag: I don't date to the 70s but I've dealt with a lot of gear that did. My wife works for IBM maintaining the installers for the development toolkits for z/OS driver dev :P Nov 02 19:53:31 Nivag: I fortunately avoided MOST of JCL because we were a VM shop; pre-dated dynamic LPAR and PRISM. We demoted MVS to its own VM and I tried not to talk to them. They were weird. Nov 02 19:55:01 Nivag: I had the touch of death; I crashed the firmware on a Shark twice, in different ways. Never killed a 3390 tho. Nov 02 19:55:31 dragorn: I once worked on a project which used a 4GL called PROGRESS, and 1o years later my wife worked on the same project for a while and saw some of my documentation! Nov 02 19:57:21 Al systems have their quirks, in 10 years people will think present day Android dev is so quaint... and did you REALLY have to fit into less than a Terrabyte of Memory??? Nov 02 19:57:39 o_o Nov 02 19:57:55 lol no joke Nov 02 19:58:20 I don't know, we've plagued when it comes to performance on these devices Nov 02 19:58:21 10 years and ssstorage is 1/100 of the price it was Nov 02 19:58:55 The difference between the snapdragons now and a multi-hexa-penta-google-core processor won't mean crap for fluidity Nov 02 19:58:59 aargs. Okay. Nobody wants to work with android wear and android emulators to develop wear apps. :/ Nov 02 19:59:42 User-facing perception of progress can't get better in my opinion Nov 02 20:00:42 I remember when people talked about the cost of one KB of of memory! And a Mainframe with 1 MB controlled a thousand banking terminals using a single 2 MHz processor - compare that to the least powerful smart phone you can buy now!!! Nov 02 20:02:09 You must be older than god Nov 02 20:02:24 Now Mainframes are much more powerful and lurk in secret lairs... Nov 02 20:02:55 Nivag:Nokia 1100? Nov 02 20:04:27 Darklust: which one? Nov 02 20:06:37 firelegend: I did program an IBM 1130 with a massive 16KB of core memory, that beast would be too long to fit in my office - and my wife could complain even more about the electricity bills! Nov 02 20:08:37 Now I'd better get back to work on my first Android App, so I can earn enough to pay for the electricity bills and other things, rather than reminisce about the 'good old days'! Nov 02 20:08:58 Nivag:Did you ever expect computers would be like this today, back then? Nov 02 20:09:05 no Nov 02 20:09:12 where 8 gigs of ram aren't enough Nov 02 20:09:19 and where people try to push their chips past 5ghz Nov 02 20:09:32 & 32 seems a little tight at times Nov 02 20:10:55 Though in 1982 I did predict that most computers would be running at about 1% busy, and would be heavily networked. Nov 02 20:12:13 If I wanted to create some kind of die-rolling animation (whether 2D or 3D), is that doable without third-party frameworks? I'm clueless about graphics. Nov 02 20:12:22 Even something simple. Nov 02 20:12:46 Nivag:What is your app about, roughly? Nov 02 20:13:32 firelegend: do you have sufficient security clearance? Nov 02 20:13:56 I'll have you know I've served under Obama Nov 02 20:13:59 Reminds me of Half Life. :) Nov 02 20:14:00 I have 300 confirmed kills Nov 02 20:14:08 Half-Life* Nov 02 20:14:10 * Nivag chuckle Nov 02 20:14:29 working for a hostile power disqualifies you! Nov 02 20:14:46 :-) Nov 02 20:21:38 firelegend: Highly paid people (minimum wage) go around to people's houses testing children's eyesight, but too many children get unnecessarily referred to hospital for further checkups. This prototype is to help improve the process, and will be used to evaluate a number of different tests. It will also hopefully eliminate any reporting of nonexistent testing (a small minority, could we... Nov 02 20:21:39 ...say, be a lot more honest). Nov 02 20:22:07 include le eyefloater test Nov 02 20:22:15 >I have tons. Nov 02 20:24:22 firelegend: I am a mere developer, there is a senior lecturer who is coordinating it as part of herb research. What is this 'eyefloater test'? Nov 02 20:24:35 herb ==> her Nov 02 20:24:42 I'll have you know we devs are the master race. Nov 02 20:25:53 firelegend: sheesh, don't let the users know, they will get upset and have all sorts of complexes... Nov 02 20:28:00 Nivag have you seen this ? http://www.gizmag.com/smart-vision-labs-svone-iphone-eye-test-kit/34015/ Nov 02 20:29:01 will new pictures be added to the back of the media store? Nov 02 20:29:46 I want to be able to check if new pictures have been added since the last time I cycled through it Nov 02 20:32:28 g00s: no, but my App records the data & does not do the test itself Nov 02 20:37:01 32GB of RAM and I'm using 1.7GB of swap space - mind you this session has been up 14 days. My dev box also runs squid & is the gateway to the internet for the household. Nov 02 20:37:21 i onlt have 4G ram :) Nov 02 20:37:45 g00s:Hey, I started with 2 on my current rig. Nov 02 20:37:53 thanks to bitcoin I now have 8 Nov 02 20:37:59 :O Nov 02 20:39:35 Try developing enterprise Java on 512MB, took 17 minutes to make a trivial change and run a test using JBoss! Upgrading to 1GB cut the time to about 5 minutes. About ten years ago. Now that would probably take about 30 seconds. Nov 02 20:40:11 enterprise and java do not generally go together Nov 02 20:40:22 it's disabled on my computer :| Nov 02 20:41:17 where have you been??? 16 cores and a terabyte of RAM is not uncommon for JEE systems Nov 02 20:42:00 our hpux boxes were 4 cores 16G and did JEE fine Nov 02 20:42:10 not sure what you guys are doing wrong :) Nov 02 20:44:23 http://wildfly.org I have a JEE project which is currently on hold, but for which 16GB would probably be more than sufficient in production Nov 02 20:44:24 Nivag:Any other language would be faster and use less ram :) Nov 02 20:44:35 I like turtles...err, C. Nov 02 20:44:58 the turtles part was a joke btw ;) Nov 02 20:48:24 firelegend: No. JEE JIT is fearsome, and an AppServer like WildFly is very good at pooling resources. At the level I'm talking about (in terms of complexity & volume of processing), Java out performs C++ systems. In a few years, if C++ get similar frameworks, then this might change - gcc 5 is likely to get JIT functionality. Nov 02 20:50:13 outperf...what? Nov 02 20:50:25 I doubt a VM can beat pure x86 instructions Nov 02 20:51:23 firelegend: I have used C quite a bit, and had a lot of fun teaching it to experienced programers - getting paid to do so,m was also very nice! Nov 02 20:52:31 firelegend: If they're doing the same thing, they cannot be beat, but they don't usually. Nov 02 20:53:00 A JIT converts interpreted Java to native machine code using run time profiling, and can inline functions that are at the end of a long chain of object references Nov 02 20:54:41 But of course... you can optimize far better with C/C++/Rust. Data locality anc cache hits, as well as stack allocation and static function calls (no vtable dereference) can go a long way. Nov 02 20:59:32 James Gosling found that C/C++ projects spent about half the time chasing memory leaks & dangling pointers, Java eliminates that. The elapsed time to develop sophisticated systems in Java is less than than for C++. Also it is not just about language, it is about frameworks and other supporting infrastructure. Why do you think Google went with Java, rather than C++ for Android Apps? For... Nov 02 20:59:33 ...small programs, with really experienced programmers, than C++ is probably better Nov 02 21:02:40 I seem to remember reading about a study finding that C# code was, in some cases, JITted to far faster machine code than the equivalent C++ code. I don't recall the details, but I think a big factor was that the JITter can figure out which code is called frequently (e.g., in a loop) and which is not. Nov 02 21:03:01 In 10 to 20 years, C++ or something else, might well take over from Java at the Enterprise level. Remember COBOL is still going strong, even though it is not as visible as when I started programming! Nov 02 21:03:20 Nivag: Sometimes it's not about development speed. I read a recent article about Minecraft (yeah...), and all I could think was along the lines of "If you have to optimize away Javas features in this way, it's the wrong language for the job.". Nov 02 21:03:23 I hope C++ dies. It's such a mess. Nov 02 21:03:33 TacticalJoke: Gave Rust a try? :P Nov 02 21:03:54 Not yet. Read about it. It looks nice. :) Nov 02 21:04:45 It does. Not sure about that C# thing though. I can't imagine how knowing the method-execution frequency helps. Nov 02 21:04:47 I'm so glad Google picked something like Java over something like C++. Nov 02 21:04:49 TacticalJoke: I suspect not, gcc is now written using C++, and there are repeated discussions about rewriting PostgreSQl in C++. Nov 02 21:06:01 TacticalJoke: There are so many warts though... I'd have liked a generic API and generic runtime, able to run compilation output of as many languages as possible (NekoVM, just more low-level). Nov 02 21:06:02 flan3002: is the method worth inlining, or applying more advanced optimisation techniques Nov 02 21:06:35 Yeah, it'd be cool if we had a simple choice of language. Nov 02 21:06:36 Nivag: Was that an answer or a question? Nov 02 21:07:08 Sorry, I'm enjoying this discussion, but I MUST go do some ACTUAL work!!! :-( Nov 02 21:07:29 Hi folks, is there any dev around that want to take a opensource project under his wings ? Nov 02 21:07:41 What project are you talking of? Nov 02 21:07:53 flan3002: was the reason knowing frequency of usage is important Nov 02 21:07:53 I'm working on a open source project CAST.IO which is a service with provider plugins that provides content to be streamed to Chromecast's Nov 02 21:08:25 I want to put my time into the service part and want to load the android client on someone else's shoulder :) Nov 02 21:08:34 More information here: https://github.com/hean01/castio Nov 02 21:08:55 Oh, not my sort of thing, but good luck! ^^ Nov 02 21:09:18 The android app should resamble something like NetFlix Nov 02 21:09:25 :) NP Nov 02 21:09:36 I like the idea of ahead-of-time compilation in Android. Nov 02 21:09:43 I'm guessing that's pretty much the best of all worlds. Nov 02 21:10:41 TacticalJoke: Depends. AOT by the dev or during installation? Nov 02 21:11:28 During installation, I mean Nov 02 21:11:31 TacticalJoke: One thing I'd consider okay would be to upload an intermediate format to Google Play, which would then compile it for each architecture, but that'd lock us to Google even more. Nov 02 21:11:39 I believe that Lollipop uses AOT by default now. Nov 02 21:11:43 It does. Nov 02 21:12:02 TacticalJoke i think Martin Fowler wrote this for you http://martinfowler.com/bliki/SacrificialArchitecture.html Nov 02 21:12:35 g00s: Lol. I'll check it out. Nov 02 21:12:54 "Essentially it means accepting now that in a few years time you'll (hopefully) need to throw away what you're currently building." True. Something to bear in mind. Nov 02 21:15:58 Good article. Makes a lot of sense. Nov 02 21:20:30 I'm watching a documentary about people who claim to have magical powers (e.g., "psychics", people who think they can move things with their minds, etc.). It occurred to me that the closest thing we have to magic is technology, and the closest thing we have to magicians is creators of technology. Nov 02 21:20:37 Then I Alt+Tabbed to Eclipse and felt like a wizard. Nov 02 21:21:31 TacticalJoke clearly you don't know any of the xmen Nov 02 21:25:00 anyone used google inbox? got some nice animations Nov 02 21:25:32 Hi everybody Nov 02 21:26:05 I'm trying to use ImageLoader from Volley lib but I'm getting an error saying volley imageLoader must be invoked from the main thread? Nov 02 21:26:19 Are you invoking it from the main thread? Nov 02 21:27:17 TacticalJoke, here's my class http://pastebin.com/p3Efbqq6 Nov 02 21:27:35 it throws that exception on line 82 Nov 02 21:28:33 TacticalJoke, I'm creating an instant of that class in my SplashScreen in the onCreate function Nov 02 21:28:49 oh gawd ... every time i read that word i cringe Nov 02 21:30:01 bankai_au, hahaha Nov 02 21:30:36 TacticalJoke, any hint ? Nov 02 21:30:53 wathek at least if you use a splash screen, put skull trumpet in it Nov 02 21:31:08 wathek show your logcat Nov 02 21:31:20 and maybe the splash screen code Nov 02 21:32:24 g00s: i go for the dancing baby myself ... Nov 02 21:32:49 hehe Nov 02 21:33:02 MikeWallaceDev, http://pastebin.com/0xgjjBKZ Nov 02 21:33:43 You're creating a team in an AsyncTask... Nov 02 21:33:52 boom. Nov 02 21:34:31 MikeWallaceDev, yes Nov 02 21:34:47 Hi Nov 02 21:34:53 there should be beginner guides on how to read stacktraces. Nov 02 21:34:54 I know. You don't have to say yes :D Nov 02 21:34:59 hahaha Nov 02 21:35:38 Im using the code on google dev but still cant make the map work: http://pastebin.com/GbmxH0TY Nov 02 21:35:49 MikeWallaceDev, you know what I don't understand is that you see in the Team Constructor when I call processData from the else section it works well Nov 02 21:35:55 danijoo, in this case it's not very hard, the error message says what the problem is... Nov 02 21:36:09 peyam: doesn't appear?crashes? is black? wrong location? gotta give a bit more information ... Nov 02 21:36:14 crash Nov 02 21:36:27 *sighs* Nov 02 21:36:29 Bankai, It just crashes Nov 02 21:36:55 MikeWallaceDev: yes but people seem to not read it at all. Nov 02 21:36:56 wathek, anytime that you create a Team in a thread, it will crash Nov 02 21:37:22 "must be called from main thread" Nov 02 21:37:52 bankai_au, do you have any idea how I fix it? Nov 02 21:38:04 MikeWallaceDev, nope it works when I create Team and the processData method is called from line 35 Nov 02 21:38:05 wathek, you should also look at your design. Your Team seems to be doing a lot of things... In my opinion it should just be a POJO Nov 02 21:38:26 Wathek, no, it doesn't :) Not if it is created in a Thread. Nov 02 21:38:46 wathek, an AsyncTask is a Thread Nov 02 21:38:49 peyam: have you got a stack trace or something ? Nov 02 21:39:26 whatever you do in doInBackground() will not be executed on the main thread Nov 02 21:39:53 MikeWallaceDev, I'm running the same code I added false in the if in line 14 to force calling processData in line 35 and I have no error Nov 02 21:40:14 wathek: did you read the stacktrace? Nov 02 21:40:42 danijoo, yes Nov 02 21:40:52 what do you think does it mean? Nov 02 21:41:14 wathek, the code in the else is in a JSonResponse, running on the main thread Nov 02 21:41:25 oh ok Nov 02 21:43:13 Neat. A blog wrote an article on my Android app, but it's in German and I can't understand a word of it! http://www.kuketz-blog.de/network-log-android-ohne-google-teil5/ Nov 02 21:43:32 hahaha Nov 02 21:43:38 MikeWallaceDev, any suggestion what I can do please ? Nov 02 21:43:48 pragma-: lemme read it Nov 02 21:43:49 wathek about what? Nov 02 21:44:20 MikeWallaceDev, AsyncTask Nov 02 21:45:13 I found your error, told you what the problem is... Go figure it out buddy. That's what being a programmer is :) Nov 02 21:45:14 pragma-: all positive ;) Nov 02 21:45:56 MikeWallaceDev, haha ok :p Nov 02 21:46:05 MikeWallaceDev, thank you man ;) Nov 02 21:46:24 this article is part of a series about privacy and how to secure your phone Nov 02 21:46:55 You're welcome. The biggest help that I can give you is this: learn about threads, and learn about separation of concerns. Your Team object is doing work that it should not be doing. Nov 02 21:47:19 ok Nov 02 21:49:36 I'm reading up on a Adapter, is it possible to create and adapter that fills items when requested ? Nov 02 21:50:07 I want a listview that queries 5 items from a backing service, then on scroll to end it would query a few more... Nov 02 21:50:24 would a adapter accomplish such thing ? ^ Nov 02 21:51:27 dinamic: use cursors Nov 02 21:51:35 dinamic, an Adapter does fill it's items only when needed Nov 02 21:51:49 I'm assumed a cursor Nov 02 21:52:43 look at this screen format: http://www.gsmarena.com/blackberry_passport-pictures-6457.php Nov 02 21:52:54 a horror for every layout :D Nov 02 21:52:56 Ah nice.. missed that one.. ill implement a curser for my datafetcher and user CurserAdapter Nov 02 21:52:59 ok, I think I see where you are going with this.. Look into "infinite scrolling" Nov 02 21:53:10 ^ very correct Nov 02 21:53:49 https://github.com/codepath/android_guides/wiki/Endless-Scrolling-with-AdapterViews Nov 02 22:02:50 bankai_au, I dont know what a track sake is Nov 02 22:02:51 :( Nov 02 22:02:55 bankai_au, im newbie Nov 02 22:05:46 no matter how many times I see these animatins of Material ... Nov 02 22:05:48 http://4.bp.blogspot.com/-mvS6XxdSUIY/VE6ohdtKOuI/AAAAAAAAA8M/2YTcch1jNL8/s1600/layering.gif Nov 02 22:05:58 i think, what the fuck is that doing ... Nov 02 22:06:12 thats just retarded Nov 02 22:06:22 showing depth? Nov 02 22:06:55 whatitis- its showing what happens when scrolling Nov 02 22:07:18 according to some designer's idea of magic paper :) Nov 02 22:08:08 its like designers can't get away with wagging their tails in our faces with skeu so they went this route Nov 02 22:10:16 seems the skew is to be able to properly demonstrate their idea. harder to do it with forward facing Nov 02 22:10:33 just reported a malicious chrome extension Nov 02 22:10:56 congrats Nov 02 22:11:14 i meant skeuomorphism Nov 02 22:11:48 is that the organic thing? Nov 02 22:13:07 any android xmpp chat app creation tutorials? Nov 02 22:13:18 i see extremely outdated tutorials. doesn't seem like theres anything new Nov 02 22:13:40 supay that may be the internets telling you another one is not necessary Nov 02 22:14:11 g00s: im doing it to learn about using libraries, apis and implementing listviews etc.. Nov 02 22:14:14 i think it would be a good college project Nov 02 22:18:04 hello, i am trying to use the android platform tools from windows 8 with a nexus 10 tablet but adb shows the device either as offline or unauthorized, can anyone tell me how i can make that work? Nov 02 22:18:21 hello, i am trying to use the android platform tools from windows 8 with a nexus 10 tablet but adb shows the device either as offline or unauthorized, can anyone tell me how i can make that work? Nov 02 22:18:43 woah, was that a glitch in the matrix ? Nov 02 22:19:01 sorry :/ Nov 02 22:19:37 what does adb devices show Nov 02 22:19:50 do you have installed (if needed) usb drivers for nexus Nov 02 22:20:14 i have, through 'SDK Manager.exe' Nov 02 22:20:19 MikeWallaceDev, dude I'm stuck :( Nov 02 22:20:32 adb devices shows the serial and 'unauthorized' Nov 02 22:20:37 how do i access EditText from some layout file? Nov 02 22:21:01 g00s: any tutorials? Nov 02 22:21:10 supay no idea Nov 02 22:21:15 hm :( Nov 02 22:21:18 the device is currently connected as media device, if i switch to camera device it wont get recognized at all Nov 02 22:21:33 i cant imagine following a tutorial for a chat application has anything to do with college level work Nov 02 22:22:42 your prof probably doesn't want you to follow a tutorial, and probably expects something a bit meatier Nov 02 22:23:17 XniX23 simple, by reading the docs :) Nov 02 22:23:43 g00s: meatier? Nov 02 22:23:59 more interesting , harder work Nov 02 22:24:07 theyd give me 10/10 if i copy pasted some C++ bank application code from off the internet Nov 02 22:24:13 geniack, when you enabled usb debugging and plugged to pc, did you authorize the pc from device? Nov 02 22:24:14 but thats for your prof to decide Nov 02 22:24:21 wathek, of course you're stuck buddy. You have to learn threading and separation of concern. So give yourself a few days to learn, it takes time. Nov 02 22:24:25 oh wait, i understand your confusion g00s Nov 02 22:24:29 let me clarify.. im from India. Nov 02 22:25:56 lol Nov 02 22:26:54 yea Nov 02 22:27:10 Ashiren: i revoked authorizations, replugged, authorization windows popped up, working now Nov 02 22:36:15 ADT on Eclipse version Mars Milestone 2 (4.5.0M2) is not very well working like debugging on emulator, also sometime app on emulator is not starting. Anyone has the same problem? Nov 02 22:42:27 seems a milestone would be more for testing. do they have a community setup for it, or have you tried #eclipse? Nov 02 22:44:16 whatitis-: ok thanks, I will go to there Nov 02 22:44:42 PLEASE anybody can look at my code and tell me why it does not work ;( http://pastebin.com/S4m7uzXC Nov 02 22:46:04 whats the error? Nov 02 22:48:37 whatitis-, it says can not cast android.app.fragment to com.google.android.gms.maps.SupportMapFragment Nov 02 22:50:48 maybe you need support fragment instead of native. but maps isnt something ive dealt with. what does supportmapfragment extend? Nov 02 22:51:30 it extends support.v4.app.Fragment Nov 02 22:51:49 change your import peyam Nov 02 22:52:40 danijoo, shoudl I import support.v4.app.Fragme? Nov 02 22:52:47 yes Nov 02 22:53:20 and then? Nov 02 22:53:22 nothing happens Nov 02 22:53:56 Error:(9, 22) error: package support.v4.app does not exist Nov 02 22:54:37 well its ndroid.support.v4.app.Fragment Nov 02 22:54:44 android.support.v4.app.Fragment Nov 02 22:54:46 of course.. Nov 02 22:55:21 TacticalJoke, hi! Nov 02 22:55:38 Really stupid question, but Google cannot help me: Nov 02 22:55:53 How to add values to Number array ( Number[])? Nov 02 22:56:15 I'm using androidplot for graph Nov 02 22:56:24 it requires Number array Nov 02 22:56:46 the thing is, I don't know how to add any new nember to it Nov 02 22:56:46 intialiaze your array, add value in a preallocated index Nov 02 22:56:56 I have database Nov 02 22:57:05 whatitis, I can do this: Nov 02 22:57:28 for (Pritisak current : list) { Nov 02 22:57:28 vrednostiSis.add(current.getSis()); Nov 02 22:57:28 vrednostiDia.add(current.getDia());} Nov 02 22:57:48 vrednostiSis and ...Dia are ArrayList vrednostiDia = new ArrayList(); Nov 02 22:57:58 should pastebin Nov 02 22:57:59 both Arraylist Nov 02 22:58:03 sorry Nov 02 22:58:08 danijoo, didnt work Nov 02 22:58:16 alexa! Nov 02 22:58:17 include your array and lists Nov 02 22:58:18 You're back. Nov 02 22:58:22 I am Nov 02 22:58:26 :D Nov 02 22:58:29 and I have little problem :( Nov 02 22:58:34 http://pastebin.com/0Q4FDrLT danijoo Nov 02 22:58:35 ^ Nov 02 22:59:10 it's this code: Nov 02 22:59:10 http://paste.ubuntu.com/8794794/ Nov 02 22:59:12 peyam: you are still using the native fragment and not support fragment Nov 02 22:59:25 supay watcn out for https://news.ycombinator.com/item?id=8545502 Nov 02 22:59:25 remove android.app.Fragment in line 22 Nov 02 22:59:39 g00s: checking it out Nov 02 22:59:40 yes but when I delete it an other class complain about it dan Nov 02 23:00:05 g00s: rofl ;p thank you very much Nov 02 23:00:09 the part I need is either adding new values to Number[] or converting ArrayList to Number[] Nov 02 23:00:32 Which part are you stuck on, alexa? Nov 02 23:00:43 supay i worked with Infosys & Wipro for years; i have stories :) Nov 02 23:00:58 g00s: you gotta tell me about, pm? Nov 02 23:01:11 danijoo, look at line 52 http://pastebin.com/DUUDHFMs Nov 02 23:01:15 TacticalJoke, the library I'm using works with some class that needs Number[] Nov 02 23:01:17 my mum is pushing me to join Infosys. i have no interest. i need insider information Nov 02 23:01:31 supay mostly from the POV of the client; we often didn't get to see what happened in the kitchen if you know what i mean Nov 02 23:01:48 peyam: show a stacktrace Nov 02 23:02:00 peyam you may need support manager Nov 02 23:02:11 SimpleXYSeries(Number[], Number[], String) Nov 02 23:02:11 where? whatitis- Nov 02 23:02:21 g00s: oh, okay.. Nov 02 23:02:25 danijoo,wait Nov 02 23:02:30 everywhere you are using fragmentmanager Nov 02 23:02:42 guys, if I do File file = new File(getActivity().getCacheDir(), "mapfile"); will it overwrite the file if it already exists as well as create it if it doesn't? Nov 02 23:02:56 Tee_Pee, File object does nothing. Nov 02 23:03:09 Tee_Pee, it's just a data structure pointing to a file Nov 02 23:03:24 alexa: You want to convert an ArrayList into a Number[]? Nov 02 23:03:30 So, I have a database and I know how to load all the values from database to ArrayList, but I can't use Integer array cause this library works with Number[] array only Nov 02 23:03:33 what happens with it after is dependant on other methods. Nov 02 23:03:42 TacticalJoke, Yes :) Nov 02 23:03:46 and see what whatitis- said. you need to change every occurence of FragmentManager to SupportFragmentManager as well as every occurence of android.app.Fragment to ndroid.support.v4.app.Fragment Nov 02 23:04:09 I think you can simply say "Number[] numbers = list.toArray(new Integer[0]);". Nov 02 23:04:25 Not sure, thoguh. Never used Number. Nov 02 23:04:27 though* Nov 02 23:04:51 danijoo, http://paste.ubuntu.com/8794858/ Nov 02 23:04:55 TacticalJoke: better use list.toArray(new Integer[list.size()]); Nov 02 23:05:10 danijoo: Is it better, though? :) Nov 02 23:05:29 It's harder to read and whether it performs better it highly questionable. Nov 02 23:05:35 yeah. if you create an array that is to small it will drop it and create a new one on its one Nov 02 23:05:36 own Nov 02 23:05:39 so its more work Nov 02 23:06:05 But creating a zero-length array is either almost zero work or zero work (if it gets optimized away, which I'm not sure about). Nov 02 23:06:34 whereas "list" = Int[] (integer array) Nov 02 23:06:35 ? Nov 02 23:06:37 peyam: what is this. Nov 02 23:06:54 danijoo, stracksomething you wanted? Nov 02 23:06:54 List list = new ArrayList<>(); Nov 02 23:06:56 TacticalJoke: it does not get optimized away Nov 02 23:07:19 peyam: yes but no stacktrace that is related to your problem Nov 02 23:07:30 think tacticaljoke is right with [0], as it is just giving it a type? Nov 02 23:07:34 if you run your broken app, it will crash showing you a trace in logcat. thats what i wanted Nov 02 23:07:39 danijoo, Can I just describe wha tthe problem is? Nov 02 23:07:44 ahaaa okej Nov 02 23:07:48 you did already Nov 02 23:07:49 I think readability trumps such microoptimizations. Nov 02 23:08:00 TacticalJoke: always depends on where you do it ;) Nov 02 23:08:03 whatitis-, nah, he's just pointlessly doing an allocation. Nov 02 23:08:04 danijoo, Error:(52, 24) error: incompatible types: Karta cannot be converted to Fragment Nov 02 23:08:13 whatitis-, those are expensive in tight loop no matter how small. Nov 02 23:08:21 if this is in a games main loop, you might get problems. I agree it doesnt matter in an onCreate thougj Nov 02 23:08:32 peyam: I wanted a full trace, not just one line Nov 02 23:08:37 but anyways, i have to go now Nov 02 23:08:39 One could extract this into a static method (as I did the other day, in fact). Nov 02 23:08:48 danijoo, I dont know what a trac stuff is Nov 02 23:08:48 Collections.toStringArray, or something. Nov 02 23:08:49 Mavrik, the .toArray? Nov 02 23:08:57 TacticalJoke, can you help me our sir? Nov 02 23:09:44 You're getting a stack overflow? Nov 02 23:10:26 TacticalJoke, this is my file. error at line 53 : http://paste.ubuntu.com/8794946/ and here is the class Karta : http://paste.ubuntu.com/8794952/ Nov 02 23:10:47 with this new Integer[0] you are creating an object that is never used Nov 02 23:10:48 TacticalJoke, the error is : Error:(52, 24) error: incompatible types: Karta cannot be converted to Fragment Nov 02 23:11:00 thats bad and object initialization is pretty expensive Nov 02 23:11:27 peyam, inkarta, you are still referencing native fragmentmanager? Nov 02 23:11:37 so you might not notice this if its called once, but in a main loop of a game or in a 1000x loop its pretty noticeable Nov 02 23:11:37 Inkarta 95. Nov 02 23:11:58 whatitis-, what should I write? Nov 02 23:12:27 you are wanting support for fragment and the manager I thought? Nov 02 23:12:28 TacticalJoke: I gave up on him because he cant provide proper stack trace and I have to go, but If you want to help it seems to be because he messed arround with Fragment + supportFragment Nov 02 23:12:32 instead of sticking to one of it Nov 02 23:12:45 he need supportfragment because of supportMapFragment. Nov 02 23:12:51 or he just has messed up XML Nov 02 23:12:54 whatitis-, you mean istead of get FragmentManager I should have getSupportFragmentManager? in that case it turns red Nov 02 23:12:57 im out. gn8 folks :) Nov 02 23:13:11 I see. Nov 02 23:13:12 Later. Nov 02 23:13:39 alexa: Number is a superclass of Integer, BTW. Nov 02 23:13:48 It makes me crazy Nov 02 23:14:09 TacticalJoke, I've written the code, now I'll try it on tablet ;) Nov 02 23:14:24 superclass --> I'm still not familiar with that Nov 02 23:14:36 Yes, you should be using getSupportFragmentManager(). Nov 02 23:14:45 alexa: Parent class. Nov 02 23:15:13 I fixed it Nov 02 23:15:22 peyam: As danijoo said, you can't mix "android.support.v4.app.Fragment" and "android.app.Fragment". Nov 02 23:15:46 in the other class I made a a android.support.v4.app.Fragment karta; and then karta=new karta() Nov 02 23:15:46 *sigh* isn't basic OOP a standard college course anymore? Nov 02 23:19:43 TacticalJoke, it works!!! Nov 02 23:20:31 it doesn sais anything about errors but it doesnt show the map Nov 02 23:20:42 thanks! Nov 02 23:20:59 No worries. You should probably learn Java. lol Nov 02 23:21:14 Depending on how long they're getting you programming for. Nov 02 23:23:17 TacticalJoke, you ever figure out your setRetainInstance issue? Nov 02 23:23:46 Which one? The fact that view data wasn't being retained with setRetainInstance(true)? Nov 02 23:24:09 think it was your onCreateDialog Nov 02 23:25:50 Okay. I came to the conclusion that the framework retains View contents for pretty much all Views by calling View.onSaveInstanceState, as long as we're *not* retaining the fragment. I'm not sure whether it's possible to manually invoke this functionality when we *are* retaining the fragment. Nov 02 23:25:52 seems onCreateDialog is a wrapper for onCreateView. when using setRetainInstance set true in onCreate, onCreate is called once, but onCreateView is always recalled on config change Nov 02 23:26:05 Yeah, onCreateDialog is called every time, too. Nov 02 23:26:57 which makes sense, but the what ifs on who will retain state is iffy, but the views will always have tobe reassociated Nov 02 23:27:07 I also found out that you have to take steps for TextViews to have their values retained: you need to set android:freezesText (I think). Nov 02 23:28:16 Yeah, the views themselves don't get retained, even with setRetainInstance(true). They always need to be recreated. (As far as I could tell.) Nov 02 23:28:23 I just assume noone will retain state, and in onCreateView reassociate, then fill with previous state kept in instance variable Nov 02 23:28:31 But the view data gets retained if setRetainInstance(true) hasn't been called. Nov 02 23:28:39 but instance of fragment is kept Nov 02 23:28:56 only ui gets reattatched Nov 02 23:29:03 The system should retain stuff such as an EditText's text and cursor position. Nov 02 23:29:07 But it doesn't retain every little thing. Nov 02 23:29:43 but if a new layout is loaded, itd be best to keep instance data to set onCreateView Nov 02 23:29:43 If you look at View.onSaveInstanceState and stuff like (I think) EditText.onSaveInstanceState, you can verify this for each one. Nov 02 23:30:09 whats the name of that library - its like spotight or something- that lets you highlight elements of your ui for a first time user Nov 02 23:30:27 showcase? Nov 02 23:32:33 tactical things such as adapters and such ill create in onCreate, but data for a textview ill keep an instance variable, on first create of fragment ill have static data to fill views, as they change, when new config I keep same code in onCreateView but since instance of fragment is kept itll load with last saved value Nov 02 23:32:44 It makes me crazy soon Nov 02 23:33:11 Maybe I need to sleep Nov 02 23:33:12 Yeah, that should work fine. Nov 02 23:33:20 anyone here used mapsforge? Nov 02 23:33:34 I guess it's only really stuff the user can edit that you need to worry about retaining. Nov 02 23:33:40 Such as an EditText's text. Nov 02 23:33:50 (Outside of adapters and such, I mean.) Nov 02 23:34:21 took me a minute to figure it out. but basically onCreateView is necessary on new config, but just findView and set with an instance variable that stays alive life of fragment Nov 02 23:34:33 yea Nov 02 23:35:30 and with setRetain fragment lives passed config chanve Nov 02 23:35:33 change Nov 02 23:35:49 but you have to recreate ui elements Nov 02 23:35:53 Right. Nov 02 23:37:12 no need for static and such, thats why you can have a headless data fragment with setRetain as ui doesnt matter but life of fragment isnt affected Nov 02 23:38:37 anywho just curious on your status of it :) Nov 02 23:38:47 was* Nov 02 23:38:56 Yeah, no need for statics. I think I just prefer statics in general. Nov 02 23:39:03 But people vary a lot here. Nov 02 23:40:03 singletons can be useful etc, but static in a fragment to retain data isnt needed. just setRetainInstance&use instance members Nov 02 23:40:19 One thing I'm not sure about, though, is cases where the Activity is destroyed but the process is not killed. I think that can happen. In that case, is the fragment still retained? Nov 02 23:40:48 where it can get tricky is using Switches and onchangedlisteners with config change Nov 02 23:41:00 but there are ways around that Nov 02 23:41:07 When I make the Reddit client, I'm gonna make the holder of the "download thread" task a static totally outside of the Activity/Fragment lifecycle. Nov 02 23:41:13 a static object* Nov 02 23:41:37 The Activity/Fragment will pull notifications from it. Nov 02 23:42:22 if its destoyed with retaininstance the fragment has a different lifecycle, but the fragment would get onDestroy if not config change Nov 02 23:42:29 Something like "if (App.getDownloadTaskManager.hasPendingData()) { Foo foo = App.getDownloadTaskManager.getPendingData(); }". Nov 02 23:42:36 getDownloadTaskManager() * Nov 02 23:42:54 Okay. Nov 02 23:43:19 think in activity you can override or call a method that tells if it is a config change Nov 02 23:44:15 isChangingConfigurations () Nov 02 23:44:35 Yeah, my client will have to do that in onDestroy or something. Nov 02 23:44:53 onStop Nov 02 23:45:39 or atleast thats what docs say Nov 02 23:47:10 I was thinking of making the Activity unregister from the "download manager" in onStop/onDestroy, and reregister in onCreate. Nov 02 23:47:24 It'll also pull any in-the-meantime completed downloads in onCreate. Nov 02 23:47:27 So no data is ever lost. Nov 02 23:47:45 Either the download manager is pushing to us, or we're pulling from it. Nov 02 23:48:38 This might even be useful for when the user navigates away from a thread and then quickly returns to it. It could still be downloading. Nov 02 23:48:46 (A Reddit thread.) Nov 02 23:48:47 you said bout a background thread, can use a service outside your activity Nov 02 23:49:05 Yeah, I was thinking of that. Nov 02 23:49:20 Either that or a manually managed threadpool in my app. Nov 02 23:50:05 they are pretty easy to implement and start/bind. if you are wanting a more, go dl this then dl this then this etc, can check out intentservice Nov 02 23:50:41 you can pool those based on id of tasks, etc Nov 02 23:51:30 service seems more keep around a bit, intentservice is hey I may have 1 task or 1000, run til all submitted completed Nov 02 23:52:20 I see. Nov 02 23:59:53 bummer, can't use dynamic version for buildToolsVersion Nov 03 00:00:48 21.1.+ should be pretty safe Nov 03 00:02:50 seems legit enough, unless by dynamic you just always want latest installed Nov 03 00:12:18 hi Nov 03 00:16:42 just wanting chitchat, or have ? Nov 03 00:29:14 holy shit, Fuzix OS runs on a Z80 :D Nov 03 00:29:38 which chevy is that Nov 03 00:29:57 When writing a setFoo method, what naming do you use? I usually use something like "setName(String value)", but I see that Android uses "setName(String name)". Nov 03 00:30:07 Leeds http://pressurenet.io/blog/typhoon-neoguri/?pac Nov 03 00:30:08 ("value" versus "name".) Nov 03 00:30:29 TacticalJoke make it descriptive Nov 03 00:30:44 Is "name" more descriptive than "value" in the above? I'm trying to decide. Nov 03 00:30:55 if its a name vs value Nov 03 00:31:02 what is it? Nov 03 00:31:10 We're setting the "name" property of the object. Nov 03 00:31:21 TacticalJoke stop splitting hairs! Nov 03 00:31:29 then do name, as value doesnt represent a name Nov 03 00:31:36 setHairs(HairType.SPLIT); Nov 03 00:31:41 unless value is the name :) Nov 03 00:32:01 Wait, that should be "setHairType(HairType.SPLIT);". Nov 03 00:32:31 True, 'value' is rather generic. Nov 03 00:32:34 basically if you are giving it a name, why use value, unless valueName Nov 03 00:32:36 I think I got that from my C# days. Nov 03 00:32:56 In C#, the (hidden) argument passed to a property was named 'value'. Nov 03 00:34:35 just keep it descriptive and keep out types Nov 03 00:35:36 whatitis-: BTW, I refactored that BaseAdapter.getView override: http://pastebin.com/twFf60PW :D Nov 03 00:35:45 The third conditional wasn't even needed. Nov 03 00:36:21 :) Nov 03 00:36:28 inflateLayout and findTextView are extracted methods. Nov 03 00:37:58 I wasnt hatin on ya when said checking 3 times null, just trying to get across it wasnt fully necessary Nov 03 00:38:48 Does anyone have any thoughts/suggestions on how to update a persistent notification action icons/text? I'm using NotificationCompat. I have two notifications that have a start/stop button that I change depending on the state of a service. I have two notifications and if every time there's an update I call new NotificationCompat.Builder they can swap order and flash Nov 03 00:38:49 Yeah. The first draft checked for null only once, but I felt that it hid the logic a little. Nov 03 00:39:37 I'd like to just update each notification text and change the state of the icon without them constantly swapping order Nov 03 00:40:20 I'm able to update the text by reusing the notification instances, but I'm stuck on how to update the addAction icons Nov 03 00:40:42 main thing to understand though in getView is logic should be kept to minimum. you have a large list and scroll, every if/else, or even set X based on whatever should all be predetermined before getView Nov 03 00:41:15 naughty instructions? Nov 03 00:41:44 porten you use an id to update Nov 03 00:42:16 step one, lube step 2 insert.... Nov 03 00:42:30 whatitis-: That's what I've been doing, let me post some code Nov 03 00:42:41 hey, I am trying to get my maps api release key, however after running my certificate through the keytool and successfully geting a sha1 when I get my key from the API website it doesnt show the label "with certificate" and when i generate an apk with this new key the maps don't load. anyone got an idea what i could be doing wrong? Nov 03 00:44:18 TacticalJoke, I have adapters with 20x the code you have. ive dealt with many situations. use multiple view type counts if necessary and keep ALL logic out of getView Nov 03 00:45:09 guess not all as if view type == etc, but focus on having detail predetermined Nov 03 00:47:51 whatitis-: http://pastebin.com/yNBB7hyt Nov 03 00:49:33 whatitis-: on subsequent calls i'm able to update the contentText, but I would also like to update the addAction depending on the state of booleans, without the notification order changing, which will happen if I create new instances of the notifications Nov 03 00:49:39 porten are notificationone and two related? Nov 03 00:50:04 whatitis-: no Nov 03 00:50:09 you have 2 seperate notifications there, did you mention that? Nov 03 00:50:36 whatitis-: yes, two separate notifications are present Nov 03 00:50:37 updating a notification based on id updates such... Nov 03 00:51:12 but seems you failed to mention... Nov 03 00:51:24 Only if I create new instances of the notification, if I reuse them the addAction will continually append new action icons etc Nov 03 00:51:48 whatitis-: failed to mention what? Nov 03 00:51:54 what does docs say about changing actions? Nov 03 00:52:05 multiple notifications Nov 03 00:52:55 what if you tested creating w actions, destroy then create new w new actions? Nov 03 00:53:12 does anyone here use osmdroid with android studio? Nov 03 00:53:21 im not well versed in updating actions Nov 03 00:53:39 but seems as long as have id, should be able to change Nov 03 00:54:13 nm saw you said if recreating... Nov 03 00:54:30 that maybe what you have todo, if docs say Nov 03 00:54:46 whatitis-: ok, thanks for the help. I can create new notifications, it would be easier if I can update the addAction similar to how I can setContentText Nov 03 00:57:44 youll have to check the docs, I recently tried a tutorial that added actions, but those actions only appeared if I wasnt usb debugging, otherwise it just showed notification minus actions. Nov 03 00:58:09 coulda been a bug with my galaxy nexus, but it discouraged me :) Nov 03 01:03:57 w0rd Nov 03 01:04:41 looks painful Nov 03 01:12:12 g00s what do you mean dynamic version? like +? Nov 03 01:21:12 Morning. If I were to attempt to combine two ArrayLists (containing data from two different datasources, however I wanted to display the difference between the items using either an arrow > or a location marker in a ListItem... what could I do to achieve this? I can use Collections.addAll but I lose the reference between the two lists Nov 03 01:21:28 Can anyone help me with figuring out why I am getting an error when a user presses cancel on the game services login? Nov 03 01:22:35 NPE? Nov 03 01:23:25 I hate those NPE's ;) Nov 03 01:23:56 not a NPE Nov 03 01:23:59 let me get the error Nov 03 01:24:42 Fall: You want to compare two ArrayLists, item by item, and mark (in one list or both lists) when there is a difference between two items? Nov 03 01:26:52 The dialog says "Unknown issue with Google Play services. Nov 03 01:26:54 " Nov 03 01:27:21 Log says E/GooglePlayServicesUtil﹕ Unexpected error code Nov 03 01:27:55 informative... Nov 03 01:28:02 yea it is awesome.. Nov 03 01:28:12 is there supposed to be code to catch the cancel? Nov 03 01:28:23 TacticalJoke: I want to display the sum of the items, however display a different icon based on it's origin list. Nov 03 01:28:32 i.e. geo location results, previous search results. Nov 03 01:28:55 gopirate: maybe you could analyze how other apps did Nov 03 01:29:53 gattuso: good point. I told myself that 3 hours ago but forgot Nov 03 01:29:56 thanks Nov 03 01:30:18 I gave up and went home... told myself to check examples as i was packing up Nov 03 01:31:42 Fall, you can create a list of custom objects, and in those objects define granular values to debate on Nov 03 01:34:18 whatitis-: yeah, I think I'm going to check that path out... see how we go Nov 03 01:34:26 TacticalJoke, whatitis- thank you for your assistance Nov 03 01:35:32 hey, I am trying to get my maps api release key, however after running my certificate through the keytool and successfully geting a sha1 when I get my key from the API website it doesnt show the label "with certificate" and when i generate an apk with this new key the maps don't load. anyone got an idea what i could be doing wrong? Nov 03 01:43:51 hangul, huh? what errors you getting? Nov 03 01:45:13 Fall, you capable of creating your own custom objects? once you get that the specific attributes you need are easy Nov 03 01:56:59 does anyone have an idea why I'm getting this error? http://pastebin.com/gdRtA5NS Nov 03 01:58:10 I hate subreddits that don't make it clear what they're about. :/ Nov 03 01:58:22 Googling to figure out what /r/ifttt is about. Nov 03 01:58:44 Oh, "If This Then That", a phone app. Nov 03 02:00:14 ifttt has been around for a while on the web... Nov 03 02:00:38 tee_pee, seems your duplicating Nov 03 02:01:46 Yeah, but most people randomly stumbling upon /r/ifttt won't know what it is. Nov 03 02:02:22 TacticalJoke, its all about douche interwebs acrynoms, but probably should expect using reddit :) Nov 03 02:03:35 its just a world wide subculture, hard to master Nov 03 02:31:19 question about asyncTask Nov 03 02:31:52 Im trying to use the JSONParser to grab some jsonObject from an API Nov 03 02:32:12 and the app is not liking what im doing Nov 03 02:32:26 public class getProfile extends AsyncTask { Nov 03 02:32:26 @Override Nov 03 02:32:26 protected Void doInBackground(Void... arg0) { Nov 03 02:32:26 JSONParser jParser = new JSONParser(); Nov 03 02:32:26 Nov 03 02:33:09 Lawl. Nov 03 02:34:08 lol got kicked for flooding Nov 03 02:34:09 fizz did yoy learn? Nov 03 02:34:18 pastebin Nov 03 02:34:31 that's right totally forgot it .. Nov 03 02:34:52 also, paste error then code Nov 03 02:35:14 okay Nov 03 02:38:52 http://pastebin.com/Gjsbk3ra Nov 03 02:39:07 JacobTabak yeah ( + ) Nov 03 02:39:14 aye aye Nov 03 02:39:27 issue with AsyncTask Nov 03 02:41:17 Leeds did you see that link i sent you a few minutes ago ? Nov 03 02:41:23 well, a little while ago Nov 03 02:41:26 pretty interesting Nov 03 02:41:39 whatitis- would you please take a look at the problem? Nov 03 02:42:06 xD pretty sure it's a stupid issue since i'm new to the android dev Nov 03 02:43:57 dat feeling when you forget to set linearlayout orientation and 10 mins later.... realize it Nov 03 02:44:12 lol Nov 03 02:44:22 hey JacobTabak Nov 03 02:44:35 do you have a min to take a look at my issue please? Nov 03 02:44:50 maybe Nov 03 02:44:53 http://pastebin.com/Gjsbk3ra Nov 03 02:45:09 yes its straightforward Nov 03 02:45:12 let me find you a link that will explain it Nov 03 02:45:15 the error is straightforward - Nov 03 02:45:23 Only the original thread that created a view hierarchy can touch its views. Nov 03 02:45:42 hmm not following Nov 03 02:45:52 oh Nov 03 02:45:54 oh Nov 03 02:45:54 http://developer.android.com/guide/components/processes-and-threads.html control+F for "Using AsyncTask" Nov 03 02:45:57 read those 3 paragraphs Nov 03 02:46:00 it should explain it Nov 03 02:46:22 btw, good pastebin, made it easy to help you :) Nov 03 02:46:30 Thank you :) Nov 03 02:46:39 and thank you for your helpo Nov 03 02:46:40 Does anyone know which function is called when a user presses the cancel button on the game services login? Nov 03 02:46:41 help * Nov 03 02:48:18 E/GooglePlayServicesUtil﹕ Unexpected error code isn't helping me :( Nov 03 02:49:26 hey guys anyone know the equilvalent of getSystemService ? Cannot make a static reference to the non-static method getSystemService(String) from the type ContextWrapper Nov 03 02:53:03 JacobTabak that make sense. To update the UI i have to implement onPostExectue(). Does that mean I can still store the respones into local virables inside doInBackground() and then have them located and updated in the postExecture()? Nov 03 02:53:13 jareddlc: I think you need a Context. Nov 03 02:53:25 doInBackground() has a return value Nov 03 02:53:29 that value is passed into onPostExecute() Nov 03 02:53:34 as a method parameter Nov 03 02:53:48 so you shouldnt' need to store them, just fetch them and then return them Nov 03 02:54:03 you know how asynctask has 3 generic type parameters, Nov 03 02:54:37 yeah i think i mest up my function is static Nov 03 02:54:45 oh nice. so the result of the doInBackground() is the paramter result? Nov 03 02:54:53 lol sorry im very retarded at this Nov 03 02:54:58 jareddlc: Why is it static? Nov 03 02:55:02 yeah so its not the simplest concept Nov 03 02:55:09 when you create an asynctask, you have to pass in 3 types Nov 03 02:55:13 you can generally ignore progress Nov 03 02:55:28 my preferenceFragment calls into it Nov 03 02:55:38 still getting hang of services Nov 03 02:55:42 and im testing things out Nov 03 02:55:48 but i think im going about it wrong way Nov 03 02:55:56 so if you had an asynctask that takes a string, passes that string to a webservice, and returns a List, your async task would look like this: new AsyncTask Nov 03 02:56:17 doInBackground(String... params) and onPostExecute(List result) Nov 03 02:56:41 got it! thank you **** ENDING LOGGING AT Mon Nov 03 03:00:00 2014