**** BEGIN LOGGING AT Fri May 23 03:00:01 2014 May 23 03:00:06 It's put together like a pack of monkeys threw shit at it May 23 03:00:09 an evil mind.. May 23 03:00:46 (or somebody that want to encourage you to use intellij / AS ) :p May 23 03:01:44 actionscrpt? May 23 03:01:48 script May 23 03:02:16 android studio May 23 03:02:26 jkin ;-) May 23 03:02:40 :) May 23 03:07:02 eclipse is shit, everyone knows that -- surely this is no surprise to you May 23 03:13:19 and still they tell you to use it in computer science courses at university :/ May 23 03:13:24 at least here in germany May 23 03:18:39 Hi all. I have a problem, each time I try and build a test of my game, and send it to my Kindle Fire HDX 8.9, the "assets" folder resets to how it was when I first started the project, and the app crashes because all the sprites, sound, files, etc. that I need aren't there. May 23 03:20:50 bankai_au that thing that gordon posted shows eclipse was still the leader :P May 23 03:21:27 so what ... May 23 03:21:52 CTCB: what are you building it with? May 23 03:21:53 i read an article a few years ago talking about popularly and quality, i wish i could find it, i think you'd enjoy it May 23 03:21:53 who cares :D May 23 03:22:37 Leeds: cocos2d 3.1 May 23 03:23:00 Leeds: On Eclipse (Android 4.4) May 23 03:23:05 obviously that's some IDE I've never heard of... oh, Eclipse May 23 03:24:06 I'm pretty sure that however bad it might be, deleting all assets at build time isn't a common bug with eclipse May 23 03:25:24 Leeds: It's not really deleting them, just resetting it to what it started with. May 23 03:25:40 Which is a Template .png file and a font file. May 23 03:26:04 what i thought weird about gordon's slides was next jvm language to learn: 47% scala, 31% groovy, 12% clojure May 23 03:26:15 i'm surprised groovy was there at all May 23 03:45:06 What's a good way to tell whats crashing an app when the log isn't clear May 23 03:45:12 I get this ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2110 May 23 03:45:28 But that's in the activity class along with everything else in the stack dump May 23 03:48:11 pastebin the full stacktrace May 23 03:48:37 http://pastebin.com/iP2g16G0 May 23 03:49:25 It occurs when the user goes from the signin activity to the main activity May 23 03:53:45 i don't think that's the full ST May 23 03:55:03 Sorry try this http://pastebin.com/YPriQnyV May 23 03:57:13 can't see any reference to any code you've written May 23 03:57:42 i see flurry stuff May 23 03:58:55 is flurry replacing the default exception handler ? May 23 04:00:13 " Flurry installs an uncaught exception handler and registers for signals" May 23 04:00:15 so there you go May 23 04:01:03 I'm picking up a project from a developer that quit May 23 04:01:14 wow. just booted my shittab for first time for while May 23 04:01:15 I'm not sure what Flurry si but I'll ook thank you May 23 04:01:16 dang ... May 23 04:01:19 14% power left lol May 23 04:01:22 your exception is probably waiting in the analytics console :D May 23 04:01:30 analytics console? May 23 04:01:31 sigh May 23 04:01:36 networkonmainthreadexception! May 23 04:01:52 great camelcase, thanks bankai_au .... May 23 04:14:23 This was the wrong week to learn Android programming... May 23 04:19:16 chrome 35 has improvements in touch support May 23 04:19:17 HMM May 23 04:22:32 "Google is reportedly developing a tablet with sensors that can capture precise 3D images" May 23 04:22:44 "Google is said to plan to produce about 4,000 prototype tablets starting next month, ahead of its annual developer conference." May 23 04:22:52 ha, there is your free i/o toy :) May 23 04:23:59 mm whiskey makes the debug go smoother :) May 23 04:25:18 Are there some prerequisite apks required google play services, I get an unknown error code when installing it? May 23 04:25:28 required by* May 23 04:25:56 it requires NSA.apk May 23 04:26:43 the whole google play services thing is wrapped into the phone when the firmware is built. there is no (supported) way to add it later May 23 04:27:06 #android-root is a better place to ask if you're trying to hack it into another rom or something; we're appdev here May 23 04:27:15 mkay May 23 04:27:33 ah, i thought you were pointing the user to Play for an update and got some error May 23 04:28:22 I'm actually trying to get google play services onto a 2.3 tablet that didn't come with the market (which I've since fixed) because apparently 1/2 of googles apps seem to require it now May 23 04:29:10 yeah, thats android-root kinda stuff May 23 04:29:19 Thanks May 23 04:39:33 gah i hate the back button, one of the worst features ever May 23 04:40:03 in gmail, switching between elements via nav drawer and then pressing back goes to a previous page May 23 04:40:26 g00s: I don't think those will be for Google IO. They have a phone version of them already and it's a very limited release. They are basically mapping the interriors of buildings to setup 3D advertisments for Google Glass May 23 04:40:29 in youtube, its completely different May 23 04:40:44 But they are also charging companies to do it May 23 04:40:51 petecouture ah, k May 23 04:41:24 They are having issues with it I hear. Stores with a lot of window glare apparently messup the sensors. May 23 04:43:03 hey, which channel is for android source code? May 23 04:43:19 maybe cyanogenmod ? May 23 04:44:15 in theory #android, in practice none May 23 04:46:26 there isn't enough traffic to maintain a channel - and if there was, it would mostly be drive-by newbies asking the same questions, which means the few experts who might waste their time hanging around IRC would get bored and not bother answering... May 23 04:46:49 apparently cyanogenmod doesnt support this May 23 04:47:17 I am getting a external/iptables/extensions/../include/linux/netfilter_ipv4/ipt_ECN.h:13:37: fatal error: linux/netfilter/xt_DSCP.h: No such file or directory May 23 04:47:18 #include May 23 04:47:23 error while building the source code May 23 04:47:31 not sure where to even begin May 23 04:48:27 the folder has both xt_DSCP.h and xt_dscp.h May 23 04:52:08 hmm, under arm those 2 files are missing May 23 04:52:22 don't care, wrong channel May 23 04:55:44 Leeds: Hey I resemble that remark... ;-) May 23 05:16:01 lame; EXTRA_RSSI for bluetooth only sent for ACTION_FOUND? May 23 05:25:59 Leeds i just found an answer to a question posted here during office hours; remember that ? May 23 06:56:55 Does anyone know any (above board) tricks to get your game into 'related' a bit more? My game was turning up for about a week (and got a bump) but then 'fell out' of it =/ May 23 07:00:23 i'm styling a seekbar and to prevent the thumb to be cut off, i tried to set android:paddingLeft and android:paddingRight to half the thumb width but it doesn't work. If i set android:padding it works but adds the padding on top and bottom too. It seems like the padding(Left|Right|Top|Bottom) do not work at all. What could be wrong? May 23 07:45:16 is there an easy way to have my drawer layout consume touch events while dragging it? there is an openGL view beneath it and i shouldn't get a touch event if its my drawer being pulled... May 23 07:46:36 Hi all, little Java question. I have List myList and List selectedList, Now I need to fill the selectedList with all false/true values and size of selectedList == size of myList, is there an easy way to do this? without a loop May 23 07:49:51 Boolean[] selected = new Boolean[myList.size()]; Arrats.fill(selected, false); Arrays.asList(selected) May 23 07:50:33 everything else would require a loop in java May 23 07:53:16 using SearchView, how can i pass an extra value to the contentprovider's .query() uri? May 23 07:57:51 If I use a database in my app, do I need to open it again for each newly spawned activity, or is there something that will let me save database handles and such across activity boundaries? May 23 07:58:05 tsp singelotns May 23 07:58:08 singeltons* May 23 07:59:29 danijoo: thanks! but not possible with a List ? Because I also need Collection.swap function (only for List) May 23 08:00:06 my code snippets creates a List May 23 08:00:35 ok, see it now, thanks May 23 08:03:50 hello May 23 08:03:52 https://developer.android.com/design/patterns/app-structure.html#details May 23 08:04:00 does android have a specific layout alredy for this? May 23 08:04:26 for the contact details area (obviously with your own headers and subheadings etc) May 23 08:04:43 LinearLayout?? May 23 08:04:54 thats a simple imageview with some editTexts in a scrollview May 23 08:05:57 FrancescoV, considered giving MyObject a boolean selected value? May 23 08:06:08 yes i know that May 23 08:06:29 but ive seen so many apps doing that May 23 08:06:31 was wondering if like May 23 08:06:39 layouts already exist for it May 23 08:06:58 layouts like linearlayout? May 23 08:07:05 alex_PP, was thinking about that too but the value isn't related to the object, only to do something with ListView items May 23 08:07:22 FrancescoV: whats wrong with looping over your first list? May 23 08:08:07 danijoo, there's nothing wrong with it, was just wondering if it is possible without a loop May 23 08:08:30 I'd be tempted to have a SelectableMyObject extends MyObject May 23 08:09:19 alex_PP: idd, also possible May 23 08:10:29 any idea why ART runtime would drain more battery than dalvik on my device? thought its supposed to be the other way around May 23 08:13:32 why do you expect it to use less battery? May 23 08:13:55 benchmarks say ART drains slightly more May 23 08:14:17 shouldnt precompiling use less cpu? May 23 08:14:37 oh i thought we're talking about idleing May 23 08:14:51 no this is operating time May 23 08:15:18 in all cases the difference shouldnt be more than 1-2% May 23 08:16:02 i had about 30 minutes of screen/op time and lost 6 percent...far from normal as this phone usually does ~10% per hour May 23 08:21:18 can my contentprovider get destroyed? May 23 08:36:29 Hmm so regarding my earlier error. I removed Flurry and still get an issue. Here's the stack: http://pastebin.com/upmyt7Cd May 23 08:37:09 Does anyone see anything that might be a cause? The stack dump is really weak May 23 09:06:44 hey guys May 23 09:06:49 i got a general java question May 23 09:07:07 what is the diference between .this and simply this? May 23 09:07:18 inside the class with that name May 23 09:07:50 How to get the "Top Developer" badge? May 23 09:08:09 jvrodrigues, it's the same May 23 09:08:38 .this is used when "this" points to something else (e.g. you're inside an anonyimous or internal class) May 23 09:08:52 I see May 23 09:08:59 because without the classname it won't compile May 23 09:09:04 well May 23 09:09:14 :) May 23 09:09:20 and is that context diferent from the getApplicationContext()_ May 23 09:09:25 paste the code snippet into pastebin May 23 09:10:14 Im looking at this coed May 23 09:10:15 https://www.youtube.com/watch?v=YCHNAi9kJI4 May 23 09:10:23 and trying to recreate it in my own app May 23 09:10:32 but the context thingy is still something that eludes me May 23 09:12:37 jvrodrigues: have you considered using a library for this task? i.e. https://github.com/nhaarman/ListViewAnimations May 23 09:13:16 I have a ListView and want to create this: animation for list item index change (example: itemX is at position 10 --> animate it to position0), any suggestions? May 23 09:14:38 rayo yes i have but i have to interconnect this feature with a few others to achieve my goal, so i cant just be using it as a library as i would have to override pretty much all the methos May 23 09:14:43 and more than that May 23 09:14:51 there are methods i have to merge between several classes May 23 09:14:57 so... May 23 09:17:15 FrancescoV, https://www.youtube.com/watch?v=NH_ZESqlLNE have fun May 23 09:18:37 FrancescoV: maybe this library is enough for you: https://github.com/nhaarman/ListViewAnimations , it has some reordering animations May 23 09:27:55 jvrodrigues: ok, will check it out May 23 09:28:24 royo: seen this too, but not real an re-order animation in the lib May 23 09:29:08 FrancescoV, do you want automated reordering or just user input ordering May 23 09:29:09 _ May 23 09:29:16 ? May 23 09:29:21 automated May 23 09:29:27 I already have an drag-drop May 23 09:29:33 but need automated too May 23 09:42:48 oh May 23 09:42:54 then i-m guessing you would have to implement May 23 09:43:20 Is there any way to let my own app to replace the home screen so when on boot it will directly show my app? May 23 09:43:54 How can I get the Top Developer mark in Google Play? May 23 09:44:10 preferably without customizing the android build May 23 09:46:02 Binbo you can set your app as the default launcher May 23 09:46:34 MalekAlrwily: how? I dont want the selection dialog to appear May 23 09:47:10 this is for internal use. Not consumer app. Rooted. May 23 09:47:27 Binbo So, use the Alert Window May 23 09:48:24 Binbo read about it May 23 09:49:15 MalekAlrwily: what is the keyword for searching ? =p May 23 09:50:08 Basically, on boot i just want the my app to automatically run without the home screen appear first. May 23 09:51:13 I dont have the skills to customize my android so I wonder if I can do anything on user level May 23 09:53:46 Binbo, no you cannot hijack users home screen without his permission. May 23 09:54:35 Binbo search about Android SYSTEM_ALERT_WINDOW May 23 09:54:37 Mavrik : this is my own device. Rooted. Mini-PC. May 23 09:54:49 click "use always" on the launcher then. May 23 09:55:17 Mavrik : its been disabled. May 23 09:55:35 MalekAlrwily: Thanks! I will take a look on that May 23 09:55:47 Binbo yw May 23 10:38:39 How should my "POJO" model class look like for this response: {"status": "OK", "data": [{"level": 9.5}, {"level": 22.0}]} ? Thath i can put as callback for retrofit this model May 23 10:42:01 String status; ArrayList data; May 23 10:42:09 DataObject: float level; May 23 10:42:29 So 2 separate clases? May 23 10:48:09 can i have a ontouchlistener and an ontouch event working side by side_ May 23 10:48:21 or should i just pick one and do everything inside that one May 23 10:53:14 How does the "Back" button work behind the scene? The fragment in parent activity is recreated if I click "Up" button by not when clicking the "Back" button in the child activity. I have tried 3 different ways, none working http://pastebin.com/RrNspTab May 23 10:54:35 Manifest - http://pastebin.com/4mJpkQkz May 23 10:54:57 <_cypha> I try to add a name.so library in /libs/armeabi/ and load it with System.loadLibrary("libname"); in my code and i keep getting an UnsatisfiedLinkException. Any ideas? The code is from another open source project and it seems to work for them. Do I have to have the ndk installed? Or maybe set something in eclipse? May 23 10:58:11 Hmmm why is retrofit catching me this exception i dont realy get it: retrofit.RetrofitError:retrofit.converter.ConversionException:com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 May 23 11:00:52 * capella mixed emotions ... Sprint just pushed me their 4.4 upgrade ... now I do the Kies & reroot & reinstall whatever fusses routine again May 23 11:01:54 capella: which device? May 23 11:02:34 sorry to wrong tab ... ;) ... US GS3 is the answer though May 23 11:03:38 hi! what is the difference between two methods of loading dex files - DexClassLoader and DexFile? why there are two interface for same purpose? is there any other opportunity to load a dex file? May 23 11:03:54 good thing I've got a windows boot partition May 23 11:08:51 <_cypha> I checked the apk and the .so file is added inside in lib/armeabi but the linker is searching in a "vendor/lib" or system/lib May 23 11:42:39 if there a way to check if the list is scrolling_ May 23 11:42:56 like listview.isScrolling(); May 23 11:43:03 a boolean that returns true or false May 23 11:45:01 nvm got it May 23 11:46:45 I want a textview that takes the whole width of the parent and then besides a button. What I have now is that the textview via match_parent comes overlaps the button... May 23 11:49:05 do you want them sidebyside in a horizontal way_ May 23 11:49:22 or one on top of the other in a vertical way? May 23 11:50:17 horizontal way :) May 23 11:50:27 like message apps May 23 11:50:35 they have a msg box and then a little send button the side May 23 11:50:45 use weightSum May 23 11:51:14 thanks :) forgot about that May 23 11:51:18 :) May 23 11:52:29 Or you could put them both in a RelativeLayout, pin the textview to the parent left, pin the button to the parent right, wrap_content on the button, then textview is leftOf the button. May 23 12:35:13 I want to create a quiz app, and I want to track how many time the user takes to answer each question. Where in the docs can I read about saving the user state when he switches to another app, things like that? May 23 12:36:12 SidFerreira: you want NSUserDefaults May 23 12:36:42 https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSUserDefaults_Class/Reference/Reference.html May 23 12:37:05 oops, ha, wrong platform May 23 12:37:08 sorry May 23 12:37:08 lol May 23 12:37:17 I'll keep the link anyway May 23 12:37:18 one second I’ll get the Android equiv May 23 12:38:03 I mean, I dunno how to identify if user left the app (pressing home button for instance) May 23 12:38:11 In Android it is SharedPreferences May 23 12:38:24 http://developer.android.com/reference/android/content/SharedPreferences.html May 23 12:38:29 now you have it for both! :) May 23 12:38:48 for an endless GridView whose items contain images - would you run out of memory eventually? May 23 12:38:52 you mean left your app complely? May 23 12:40:06 I'd think recycling would avoid that - unless it's different than listview May 23 12:40:43 magnusMTB: well, let's say that I started a quiz with 40 questions. and then I decided to see the mail I just received. I need to keep info about what I was answering (some apps loses this) when user come back. May 23 12:40:57 SidFerreira: read http://developer.android.com/training/basics/activity-lifecycle/index.html about the lifetime of an activity, you get pausing and stopping events May 23 12:41:11 capella: what about the underlying adapter? that adapter keeps on growing without limit May 23 12:41:39 rayo: Indeed that's what I was looking for... just didn't knew the words :) I was expecting something like sleep and wake up May 23 12:41:47 ah, well, theoretically scrolling forever might do it then :p May 23 12:42:45 I haven't inspected the class source May 23 12:42:49 SidFerreira: also look at destroy depending on how often you want to save off the user info. Pausing could happen a lot during the runtime of your app. May 23 12:44:52 good to know May 23 12:55:02 hi guys May 23 12:55:06 may i know the interpretation of "top" command in android? May 23 12:55:10 *page May 23 12:55:20 I didn't see the man page May 23 12:55:27 can anyone help me ? May 23 13:04:20 html5 games performance in webviews :/ May 23 13:16:20 Other than the resolution, how else can I optimize an image for putting up as a background for an activity? May 23 13:18:32 what kind of optimization? loading speed or size? May 23 13:18:46 more toward loading speed. May 23 13:19:10 loading in an async task might help May 23 13:20:03 It like, when the images are in the background few things like dialogs and spinners start slowly on mid-end phones.I have reduced the resolution and used JPEG wherever possible. May 23 13:20:18 THe image itself loads pretty fast May 23 13:20:36 but it hinders the performance of the overlaying views. May 23 13:20:51 How do I disable abort on 9 patch errors in gradle? May 23 13:20:55 lintOptions { abortOnError false } doesn't help May 23 13:21:56 Hi May 23 13:22:02 why the hell jpeg? May 23 13:22:13 I have two ListFragments in an activity. However they scroll individually. How can I make them scroll as one list? May 23 13:22:19 They have their own adapters and row views. I just want them to scroll as one big list. May 23 13:22:27 what's the channel for ios dev? May 23 13:22:33 it was on StackOverflow, I tried it, but it didnt work anyways, same performance May 23 13:23:03 zmax maybe you could add a litener that listens to scroll of each other May 23 13:23:17 WantToCode: I would stick with png, May 23 13:23:27 and dont forget to PNGOUT all images May 23 13:23:38 For PNG it was a mix response, "are automatically compressed when building", use "PngOptimizer", use "PngQuant" May 23 13:23:58 hehe and now one more contender, danijoo May 23 13:24:02 : D May 23 13:24:28 well i think its the same name for the same implementation :) May 23 13:24:47 maybe with a compression difference of a few byte/kilobyte May 23 13:24:55 ok, then its alright. I'll try PNGOUT. Thanks. :) May 23 13:25:17 pngout only if you like your terminal :p May 23 13:25:30 the ui versions are crappy (my geeky opinion) May 23 13:26:31 Right now, I have reduced the image resolutions to approx mdpi - 400x600, xhdpi - 600x 800, according to the ratios given in the docs. May 23 13:27:02 but it kinda wonders me that background is lagging.. May 23 13:27:21 did you set it with android:background on a layout view or by styles.xml May 23 13:28:05 I am using a library. It is a moving background Ken Burns effect :( May 23 13:28:27 like a dynamic background? May 23 13:28:55 let me give you an example May 23 13:29:30 such a long link - https://camo.githubusercontent.com/64d61cde0875bcfb1636821b2a121af56cc0ecca/687474703a2f2f7777772e70696374757265736861636b2e75732f696d616765732f31353532365f4b656e4275726e73566965772e676966 May 23 13:30:26 Over this I have a gridview http://puu.sh/8XN80.png May 23 13:31:15 hm. no experience with this :/ May 23 13:31:20 these are like bookmarks/shortcut and the last element is "Add New" kind of thing http://puu.sh/8XNbq.png May 23 13:32:08 All I can do is to reduce size of images. Next I'll look into the library's source code. Thanks danijoo May 23 13:39:09 danijoo: I’m thinking some container to hold both lists? I need them to behave as two lists. May 23 13:44:29 does anyone know how dagger implements singletons? May 23 13:45:10 shekibobo: what do you mean by that? May 23 13:45:27 dagger leaves it up to you to actually build the singleton, it just tracks it and injects it May 23 13:45:57 well, if I have a method @Provides @Singleton public MySingleton provideMySingleton() {...} May 23 13:46:23 my assumption is that dagger will only ever build one of it ever and continue to use the one I build there May 23 13:47:03 correct. May 23 13:47:16 and it's threadsafe? May 23 13:47:35 I think so? Don't hold me to that one. May 23 13:47:36 shekibobo: it's on per graph. not necessarily ever. May 23 13:47:43 right May 23 13:47:55 one* not on. Sorry May 23 13:48:23 so, when I look up how to write a singleton, there are about a million *wrong* or at least *non-threadsafe* ways of doing it, and from what I can tell, no real concrete correct way of doing it May 23 13:48:43 so my question is what method dagger uses to provide a singleton May 23 13:49:55 shekibobo: Don't quote me on this. But the singleton stuff might be handled at a lower level than dagger. @Singleton is a jsr-330 annotation. not a dagger annotation. May 23 13:50:05 hmm May 23 13:51:28 good catch, I didn't see that that was part of javax.inject May 23 13:54:32 I'm using the drag- drop sort lib, is it possible to disable drag-drop for some items? May 23 13:56:02 is there an easy way to play a youube vid with the youtube api using the url, not just the id May 23 13:56:10 like something bult in that gets me the id from the url May 23 13:57:09 the id used to just be the end of the URL? May 23 14:00:53 kurtisnelson: well there are many ways I can do it - e.g. regex or something like urlparse for java May 23 14:01:13 but was wondering if there is something that "just works" May 23 14:01:14 urlparse is probably the "right" way May 23 14:01:31 yeah, think that's what im going to do eventually May 23 14:30:30 I have a list (A , B, C), using Collections.swap(mylist, 2, 0) knowing swapt(list, from, to), the result is (C, B, A), which function should I use to get (C, A, B) ? Other words, change index of item and index of items between are +1 May 23 14:30:53 I know my question isn't clear but don't know how to say it to understand easily ;) May 23 14:33:51 Why not put your items in an array May 23 14:34:00 and then just swap them? May 23 14:34:15 dunno if i fully understood your question though May 23 14:35:15 list = (A, B, C, D, E) , then swap(list, 4, 0, result = (E, B, C, D, A). But I need (E, A, B, C , D) May 23 14:35:28 and I need to use a list for other functions May 23 14:38:34 FrancescoV, so you just want to remove an item May 23 14:38:36 and insert it. May 23 14:38:41 .remove(), .insert() May 23 14:40:12 Mavrik, thanks! idd, don't know why I haven't seen it on my own :( I just need to add it again with passing the index May 23 14:40:23 mhm :) May 23 14:41:13 is there a nice, easy to use library that streams mp3 from url May 23 14:41:32 as far as i can see, everyone on stackoverflow hacks their own... May 23 14:54:51 are there any nice opensource UI libraries for android? May 23 15:03:52 jaynewstrom: so I've got this thing "working" May 23 15:03:58 Awesome! May 23 15:04:05 but one onGlobalLayout call isn't enough to let things settle May 23 15:04:07 I wouldn't say nice, but there are thousands. May 23 15:04:36 so now we are going to try and figure out when the target we are positioning on is done-ish laying out May 23 15:04:56 onGlobalLayout isn't ideal that's for sure. If you can, I would just create a view subclass, and override onSizeChanged. and do that work there. May 23 15:08:48 yeah so that would be better except that we target all kinds of different views May 23 15:09:05 other coworking is proposing we do a custom framelayout, and at the end of onLayout do all the positioning May 23 15:09:20 but my counterpoint there is a child can invalidate itself and we'd never ffind out May 23 15:11:10 I'm trying to load libraries from a local maven repository with gradle, but for some reasons my libraries can not be found. May 23 15:12:51 maven { url '../libs' } is the reference to the library, I try to access the individual library like this: compile 'com.google.android:gcm:1.0.2' May 23 15:13:28 and the file is: ..\myproject\libs\com\google\android\gcm\1.0.2\gcm-1.0.2.jar May 23 15:19:04 Why not just do "compile files('libs/*.jar')" May 23 15:19:39 kurtisnelson: you could always do a combined approach as well. if a view implements an interface have a callback that tells you when it's done. if it doesn't use the onGlobalLayout. that way you would only have to fix the ones that don't always work May 23 15:38:50 When using navigation drawers, in on item click is it ok to just ".replace" the exisiting ListFragment with its new instance? The activity class - http://pastebin.com/S0XkUpU6 May 23 15:38:54 I have read at many places to create a different fragment classes for different navigation drawer list item, but it not feasible at the moment. May 23 16:29:07 Where can I look up the native parts of the MediaPlayer class? May 23 16:29:23 AndroidXRef? May 23 16:31:26 Is there any kind of graphical tools that allows you to edit dimensions across multiple screen sizes all on one page May 23 16:35:11 No yiati, there is not tool like that May 23 16:35:18 go home you're drunk May 23 16:42:27 I mean incidentally yes, go home, you are drunk May 23 16:42:37 but I'm sure someone could write that tool. May 23 16:42:43 platzhirsch: download the android sources. May 23 16:43:08 source.android.com May 23 16:43:31 lov: thanks man, although AndroidXRef is quite nice, but on my fs I could run grep May 23 16:48:41 DateUtils.formatDateRange gives NPE while replacing fragment through nav drawer quickly. This happens if I select second nav item fragment while first item fragment is loading. StackTrace & Code Snippet - http://pastebin.com/UF8bJwtd May 23 16:50:54 platzhirsch: yeah, it's really nice to be able to just directly rummage through. May 23 16:51:24 lov: are you being sarcastically? May 23 16:51:38 Haven't heard the word rummage yet, I really like the semantic May 23 16:51:39 no, I'm being serious May 23 16:51:52 WantToCode: OK, good to know, thanks for sharing. May 23 16:51:58 (^^ see, that was sarcastic.) May 23 16:52:26 lol lov, but why? :( May 23 16:53:20 why what? May 23 16:53:31 why do I not care that you don't cache the context locally and use it? May 23 16:53:46 You just need A context, not the activity context; you can just cache the application context in your fragment. May 23 16:54:22 though if you're running into the problem where your activity reference is just kind of pooing out in the middle of whatever you're doing, you may have deeper problems. May 23 16:57:00 Thank you very much and please calm down. I was thinking, it is caused because in DateUtils.java at line 823, eclipse is showing FORMAT_24HOUR, FORMAT_12HOUR are deprecated. May 23 16:57:15 and sorry it was too idiotic of me. May 23 16:59:21 deprecated arguments wouldn't cause an NPE May 23 16:59:26 $5 says that your activity reference is null. May 23 16:59:40 (if they did cause an NPE, you should file a bug!) May 23 17:00:30 Ok Thank you. May 23 17:01:30 you're welcome :) May 23 17:03:19 Now if I include DateUtils.FORMAT_12HOUR in the formatDateTime flags directly, it is not crashing! May 23 17:04:06 I'll also try to find if context is null. May 23 17:06:23 For more reference: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.2_r1/android/text/format/DateFormat.java?av=f#131 May 23 17:06:40 your context is almost certainly null. May 23 17:07:44 Thanks for the link. I'll take a look at the context then. I supposed getActivity() is best way to get context in a Fragment. May 23 17:07:58 it generally is! May 23 17:08:09 however, it sounds like your code is being called at a time when the fragment is not attached to an activity. May 23 17:08:56 It maybe so because as I said earlier it happens only if I change the fragments quickly. May 23 17:10:39 Why would getActivity() return null anyway? May 23 17:10:45 yup it is. Log.d(TAG, getActivity() == null); returns true at that time May 23 17:11:35 because your fragment isn't properly attached at that point? May 23 17:12:00 lov, it's not returning it for me, I just saw people day to always check getActivity for null May 23 17:12:42 I added Log.d in onAttach and it is called May 23 17:15:10 what's the best way to have a sqlite inside the app? May 23 17:19:10 lov autrilla here is the flow from all the stages - http://pastebin.com/b9V3Ui80 All stages are called May 23 17:21:29 Should I use activity transmitted in onAttach? May 23 17:21:32 SimonVT, you don't inject context with your Application, right? May 23 17:24:30 MediaPlayer which is running in its own thread and should be kept even if the app moves into the background. What would you say shoul I use? Service which launches a thread, IntentService which loops at the end of onHandle, just a vanilla thread with event bus...? May 23 17:26:21 you need to use a service May 23 17:26:45 most likely a foreground service May 23 17:31:28 Hey guys I'm trying to implement the new RemoteController api, which has been introduced with kitkat. everything's working as it should. problem is though that the NotificationListenerService I'm using needs to implement RemoteController.OnUpdateListener, which obviously isn't available on android 4.3 devices. so the result is, that my app works fine on every device <=API1 and >=API19, but crashes on API18 May 23 17:31:40 Any suggestions on how I could resolve this crash? May 23 17:32:07 Is there any way to exclude a service in my AndroidManifest on certain API levels? in my case API 18 ? May 23 17:32:45 "that my app works fine on every device <=API17 and >=API19, but crashes on API18" May 23 17:33:48 MrMaffen: I think that would be going about it wrong May 23 17:34:03 you could just on service start check the BUILD and abort appropriately. May 23 17:34:29 ^^ May 23 17:34:39 There's no way to specify in the manifest "only provide this for API level foo" May 23 17:34:47 kurtisnelson: yea that was my first thought, the problem is though that the RemoteController API requires me to implement RemoteController.OnUpdateListener May 23 17:34:57 and therefore I can't check the build version May 23 17:34:58 Now, that said May 23 17:35:12 you can, and indeed should, be checking the build level for backwards compat May 23 17:35:19 see the d.android.com article about Backwards Compatibility May 23 17:35:24 I'm implementing a custom view. In the activity that uses this view, I need to set onClick and onLong click (onLongClick to delete the view). In the view class, I have a gesture detector to do animations (like darkon on long click and flash on single click and move onfling). Am I doing this correctly? Should I be separating gesture detection like this? How can I stop onLongClick from becoming onFling and vice-versa? May 23 17:35:45 MrMaffen: as long as you abort things before those happen, you'll be ok. May 23 17:35:48 lov: yea my question is. where should I check the build version? the app crashes right away, because the interface my service is implementing is not available May 23 17:35:57 basically, you can use your remote controller for API level 18 as long as you judiciously engineer your code to handle the case of OnUpdateListener not being available, and working another way. May 23 17:36:00 in th eonCreate of the service May 23 17:36:09 or before the service even happens May 23 17:36:13 MrMaffen: when you say that the app "crashes right away" May 23 17:36:23 the service is being started by an intent send by the system May 23 17:36:24 Do you mean when you attempt to register your service for something? May 23 17:36:33 or do you mean at some android level before you're given control? May 23 17:36:39 and I register my app for this system intent in my AndroidManifest May 23 17:36:45 lov: the latter May 23 17:36:50 what's your stacktrace look like? May 23 17:37:02 classnotfound or something similar May 23 17:37:12 .... hum. May 23 17:37:29 That should have stopped being a problem a while back. May 23 17:37:36 ? May 23 17:37:42 Well, there's nothing you can't solve with another layer of abstraction! May 23 17:37:50 kurtisnelson: the service implements the interface. it crashes before it even calls onCreate May 23 17:37:58 I don't understand why ListView dragging doesn't work for me, with the code from DevBytes :/ May 23 17:38:00 Instead of making your service implement the callback, create a new class that implements that callback, and have your service use that May 23 17:38:16 or, better yet, have a class that implements the relevant callbacks minus the OnUpdateListener May 23 17:38:17 yep, just do callbacks all the way down May 23 17:38:18 lov: yea true, I could use two NotificationListenerServices May 23 17:38:24 then have a subclass of that which does so as well May 23 17:38:34 and have your service choose the correct class to instanciate at runtime May 23 17:38:47 make sure you have a ManagerManagerListener and you'll be javaing right. May 23 17:38:54 You forgot Factory May 23 17:38:56 and Stragegy May 23 17:38:58 *strategy May 23 17:39:10 lov: can't do that because the RemoteController api requires me to pass a NotificationListenerService which implements OnUpdateListener .. it has to extend NotificationListneerService AND implement the listener May 23 17:39:51 then sounds like for the service listed in the manifest, it just needs to check the system and then launch a secondary service May 23 17:40:30 yea :S May 23 17:40:34 seems ugly though :D May 23 17:40:44 but if there's no other way, I'll go this route May 23 17:41:07 it sounds ugly but sane May 23 17:41:11 just like all of android May 23 17:41:30 kurtisnelson: haha May 23 17:42:31 Wait. May 23 17:42:41 How are you even registering on API level 18, if the register method isn't availble till 19? May 23 17:42:55 lov: it's being ignored in the manifest May 23 17:43:04 I don't ever get the intent May 23 17:43:10 No, that's not what I'm asking. May 23 17:43:17 I'm asking "how are you calling http://developer.android.com/reference/android/media/AudioManager.html#registerRemoteController(android.media.RemoteController) at API level 18" May 23 17:43:38 ah sry I misread API level 18 for <=18 May 23 17:43:41 lov: I don't May 23 17:44:07 but the intent is being sent by the system and after that my service is being started May 23 17:44:27 and then crashes ... May 23 17:44:44 lov: http://forum.xda-developers.com/showthread.php?p=48702254 May 23 17:44:45 what's the component I have to add in order to draw on it? May 23 17:44:51 here's basically what I've implemented so far May 23 17:44:59 ImageView? May 23 17:45:18 lov: or if you prefer code https://github.com/DrBreen/RemoteControllerExample/blob/master/src/com/woodblockwithoutco/remotecontrollerexample/RemoteControlService.java May 23 17:45:26 and the manifest https://github.com/DrBreen/RemoteControllerExample/blob/master/AndroidManifest.xml May 23 17:45:46 works like a charm on kitkat, is being ignored on <18 May 23 17:45:48 and crashes on 18 May 23 17:46:01 I wonder why you even get the intent on <18 May 23 17:46:09 * lov shrugs May 23 17:46:19 I'm asuming that there's a way to do it, and I'm not sure what it is offhand. May 23 17:46:21 kurtisnelson: lov: RemoteController has been introduced with kitkat, while NotificationListenerService has been introduced with 4.3 May 23 17:46:22 sorry! May 23 17:46:33 lov: np at all :) thanks for taking the time May 23 17:47:22 Hi, I got a library which works on URI from sd card how would i make it work for URL's what would be the easiest way out please help May 23 17:48:20 its audio player, if you have some audio streaming library please suggest thank you May 23 17:49:55 I'm implementing a custom view. In the activity that uses this view, I need to set onClick and onLong click (onLongClick to delete the view). In the view class, I have a gesture detector to do animations (like darkon on long click and flash on single click and move onfling). Am I doing this correctly? Should I be separating gesture detection like this? How can I stop onLongClick from becoming onFling and vice-versa? May 23 17:50:51 lov: is it ok if I do context = getActivity(); in onActivityCreated and use it? because that is working. Should I make it context = null in onDetach if it would cause leak? May 23 17:51:25 WantToCode: Java is managed, there is a garbage collector, I don't think you even need to think about memory leaks May 23 17:51:28 it's not ok May 23 17:51:36 just use getActivity May 23 17:51:36 pfn: talking to May 23 17:51:38 ? May 23 17:51:41 oh May 23 17:51:59 and yes, you always need to think about memory leaks May 23 17:52:14 the whole issue is that getActivty is not working. it is giving null. will this method lead to leaks? May 23 17:52:32 if it's giving null, you're calling it at the wrong time May 23 17:53:07 call it in onCreate() ? May 23 17:53:08 if you set it to null on detach, then you'll hit the same issue May 23 17:53:24 pfn: http://pastebin.com/b9V3Ui80 I am calling it after onActivityCreated May 23 17:54:34 presumably after being detached as well May 23 17:55:40 notice the gap in timestamps May 23 17:59:02 Do ListViews get OnItemLongClick events if the items have clickable Views, such as ImageButtons? May 23 17:59:26 Hi all, has anyone used the AppCompat navigation drawer on an HTC 4.4 device? May 23 17:59:59 @autrilla, if there are clickable views, they will generally intercept the clicks from the user before they get to the list item May 23 18:00:20 omniuni, if clicked outside of it? May 23 18:00:56 it depends somewhat. i've had clickable items that don't cause the list item listeners to not be attached, and some that do May 23 18:01:19 i think it has to do with what type of click listener is registered on the button May 23 18:01:28 Hmmm, but the onClick event on the ListView is called May 23 18:01:46 onItemLongClick() May 23 18:02:51 what kind of view are you using for your list item? May 23 18:03:07 (relativelayout, linearlayout, etc) May 23 18:03:22 autrilla: I think, (I am not sure), you would need to use onInterceptTouchEvent in some way. I just remember it from the page http://developer.android.com/training/gestures/viewgroup.html Have not used it May 23 18:03:39 relative May 23 18:03:53 But the method is called :/ May 23 18:03:54 yep, i think that's where i ran into this before too May 23 18:04:11 and @WantToCode I remember spending about an hour trying that in every conceivable way May 23 18:06:55 @autrilla, the long click is being called now? May 23 18:07:06 It was before May 23 18:07:09 And it is now May 23 18:07:20 But the ListView for some reason doesn't handle the dragging May 23 18:07:39 ah, ok May 23 18:07:46 kurtisnelson: lov: the two service method doesn't work either :S because the NotificationListenerService has to be directly bound to a system intent listener in my AndroidManifest :( May 23 18:08:06 @autrilla, what kind of dragging are you trying to do? May 23 18:08:26 if I just pass it through another NotificationListenerService, the actual service doesn't receive any messages May 23 18:08:30 omniuni, ListView cell dragging, for reordering May 23 18:08:37 My code is pretty much copied from DevButes May 23 18:08:41 DevBytes* May 23 18:13:39 @autrilla, I'm sorry, I thought you were experiencing a different problem. have you tried removing the longclick listener from the list items? it may be interfering with the rest of the code May 23 18:14:19 (if it's using something else to let you drag them, i mean) May 23 18:14:22 I'm going to try triggering the dragging when a grip is longpressed May 23 18:14:57 gotcha. yeah it's possible that the list item is grabbing the longclick before it's passed to the handle May 23 18:17:08 you might even be able to do something kind of tricky like getting the listener from the list item and assigning it to the grip directly May 23 18:18:16 but i haven't played with that particular code, so it's just a guess May 23 18:30:20 Hey! Anyone here use Titanium? May 23 18:32:45 autrilla: I had utilised Gesture listener for a scrollview to check for a up scroll. The pseudocode I have prepared for you may work in some way.http://pastebin.com/GgSykrAv I am not sure if it would always return true in line 6 May 23 18:36:19 Nothing, there must be something wrong with DevBytes' code and mine May 23 18:38:20 all I can suggest is to look into onInterceptTouchEvent, because it is the procedure to solve touch event conflicts between viewgroups May 23 18:39:31 It's not a touch conflict May 23 19:06:32 how do I draw a simple line in a linear layout? May 23 19:12:12 sdaq: Programmatically, you could create a new TextView, and set its background to a colour, and its height to 1px May 23 19:12:27 MarkyC: thanks May 23 19:16:49 Greetings fellow androids, I have an Activity which uses a FragmentPagerAdapter to provide a tabbed interface. Each tab has an associated Fragment, containing a ListView that I use to display the data I'm fetching. If this fetch fails, I would like to show the user an "Empty State" where they can click a button to refresh. What is the best way of doing this? It might help to know that there... May 23 19:16:50 hey, im trying to start another activity from the navigation drawer, therefore i have put an intent and start activity in my onSectionAttached of my MainActivity, which implements the navigation drawer. Well, if I open the item the app keeps crashing May 23 19:16:51 ...are about 10 tabs, each performing a different request. I'd like to be able to reuse this Empty State May 23 19:17:34 alt0r: Can you post the Exception from the debugger? May 23 19:17:42 im thinking i might be starting the new activity in the wrong place May 23 19:18:26 05-23 20:47:24.758: E/AndroidRuntime(32158): java.lang.RuntimeException: Unable to start activity ComponentInfo{tuilm.isa_swp/tuilm.isa_swp.LoginActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f080008 for fragment PlaceholderFragment{2be5df30 #1 id=0x7f080008} May 23 19:18:55 Sounds like you're trying to inflate a View in PlaceholderFragment that doesn't exist May 23 19:20:04 alt0r: PlaceholderFragment is the boilerplate code the IDE gives you, so maybe you deleted/renamed the layout file May 23 19:24:04 I'm going to shorten my earlier question: Does anyone have an example for implementing Empty States/Empty Views on Android? May 23 19:25:03 ListView#setEmptyView May 23 19:25:50 When an touch event occurs. If my custom view has an onClick listener (attached by the activity) and a gesturedetector, which one do events flow to first? What about onTouchEvent defined in the view? Is that before all of them? May 23 19:26:15 pfn, are you here? May 23 19:26:18 SimonVT: Figures Android would have something that awesome in the API. Thanks May 23 19:28:21 SimonVT, oh, didn't know about that. I was manually checking if the List was empty. Duh. May 23 19:28:41 MarkyC: layout file is still there May 23 19:29:01 alt0r: Try Build > Clean May 23 19:29:52 And double check that the R.layout.whatever you use in PlaceholderFragment does indeed exist at res/layout/whatever.xml May 23 19:31:12 alt0r: You're trying to add PlaceholderFragment into a view that doesn't exist in the Activity May 23 19:32:18 deadmund: OnClickListener is implemented in View#onTouchEvent.. So it's called whenever you call super.onTouchEvent May 23 19:33:04 SimonVT: thank you, I've been trying to get longClick and onFling working together for a long time now! May 23 19:33:09 SimonVT: That makes sense. May 23 19:34:47 OnTouchListener is called before onTouchEvent.. Other listeners are called from onTouchEvent May 23 19:35:23 SimonVT: Thanks, I'm not changing onTouchListener May 23 19:35:38 Can I post my code and ask a question?? May 23 19:36:05 If you pastebin it, yes May 23 19:36:43 Does anyone have any example of documented code for ListView item reordering? May 23 19:37:23 Activity Class: http://pastebin.com/90S5UzPv relevant section is storeTmpAsTrack on line 115. (pasting more...) May 23 19:38:01 View Class: http://pastebin.com/8ievihdk relevant section is onTouchEvent on line 185. May 23 19:38:26 The problem right now is, everything works fine, except if I fling, onLongClick is fired at the end of the fling May 23 19:39:12 Which is weird, cause my fling listener returns true when there is a fling, so super.onTouchEvent() should not be called (in the view class) when there is a fling. May 23 19:42:16 Any help would be awesome :) May 23 19:42:21 A runnable is posted on the DOWN event that triggers a long click after X milliseconds May 23 19:42:31 SimonVT: a-ha! May 23 19:42:39 So since you let it handle some events at the beginning, you need to send it a cancel event May 23 19:43:16 SimonVT: possible, could u have a look at my code? http://pastebin.com/2S1tYbUH this is party of mainactivity May 23 19:43:30 SimonVT: so, in onFling I need to run somethread.cancel() But I don't have a reference to that runnable thread right? May 23 19:43:55 Something like MotionEvent newEvent = MotionEvent.obtain(origEvent); newEvent.setAction(MotionEvent.ACTION_CANCEL); super.onTouchEvent(newEvent) May 23 19:44:09 SimonVT: Or, should I re-structure onTouchEvent better? All I really want is onLongClick and onFling working in conjunction right? May 23 19:44:17 when case: 8 in oncetionattached is opened, app crashes May 23 19:44:17 SimonVT: I see. May 23 19:46:43 SimonVT: The onDown that triggers the runnable, is the same onDown that triggers the onFling. For fling, there has to be some subsequent events that follow with different x / y. For long click, the subsequent events need to not be "UP" May 23 19:47:21 SimonVT: Anyway, the originating event is the same of onLongClick and onFling, so if I call setAction(ACTION_CANCEL) both onFling and onLongClick will no longer have an initial event and will both be canceled. Right? May 23 19:47:57 SimonVT: I guess I can do this, in the onFling listener, after the event has been processed? But if the user does a very long / slow fling, the longclick may fire before the fling is over May 23 19:50:02 alt0r: Your issue is in LoginActivity May 23 19:50:15 Why is onLongClick allowing movement anyway? It seems that there will be a down event, several move events, and then an up event. If the time between down and up is long enough, this is a long click. If there is movement events, this is not a longClick (or a short click) regardless of duration May 23 19:50:32 onLongClick doesn't allow movement May 23 19:50:41 But it needs to know about MOVE events for it to cancel it May 23 19:51:04 SimonVT: oh!, I'm not passing it the move events cause of my if(!r1) May 23 19:51:06 Once your flinglistener starts handling touch events, you no longer pass motionevents to the superclass May 23 19:51:09 Yes May 23 19:51:21 That's why you need to pass it a cancel event once your flinglistener takes over May 23 19:52:26 SimonVT: I put this: e1.setAction(MotionEvent.ACTION_CANCEL); in onFling on line 209. It did not solve the problem. May 23 19:52:36 the docs say e1 is the original event May 23 19:52:39 Anyone here used Titanium for development? May 23 19:52:46 Handle it in your onTouchEvent May 23 19:52:53 SimonVT: ok May 23 19:53:51 So I need to do a HttpRequest and cannot run this on the UI thread. What is the best way to handle this? Using AsyncTask? What is the best way to communicate this back to the main/UI thread? I find using listener creates kind of messy code, threadwise. is there some way to push it to the threads msg queue or something? What is the best pattern to handle this? May 23 19:57:55 SimonVT: what am i doing wrong in loginactivity? think its still pretty the generated by sdk standard file May 23 19:58:02 SimonVT: I did this but it isn't correct: http://pastebin.com/jnuq9iML Am I misunderstanding you? Is there not a better supported way to handle onLongClick and have a fling listener on the same view? May 23 19:58:38 SimonVT: It seems I'm implementing what GestureDetector is supposed to do for me (keep track of the state of the gesture based on the event types that flow in). May 23 19:59:40 Cancel it once it's a fling May 23 20:00:01 alt0r: You're trying to add a fragment to a view that doesn't exist May 23 20:01:09 SimonVT: To be clear, after I know there is a fling (r1 is true) I need to put cancel on that event and let it flow into super.onTouchEvent(). May 23 20:01:25 Yes, that's when you no longer pass touch events to the superclass May 23 20:03:44 SimonVT: the view is the layout .xml file of the fragment? May 23 20:04:16 I'm using a custom array adapter to fill my listview. Each row of the listview has a clickable imageview that needs to change its image when clicked (im using setTag() to get this behavior). Im reusing views, so when I click an icon in a single row, other icons in other rows are updated too. How can I update just one of them? May 23 20:05:23 SimonVT: got it! works great! thank you! :) May 23 20:06:42 alt0r: You're trying to add a fragment into a view that has a certain id.. FragmentManager tries to find a view with that id, it can't find any, it throws an exception May 23 20:07:39 Either make sure you have a view with that id, or don't try to add fragments to it May 23 20:08:36 Birk_: It only affects other rows if you're not properly updating all view data (that includes properties for certain rows that you set as a tag) in Adapter#getView May 23 20:10:05 So I need to do a HttpRequest and cannot run this on the UI thread. What is the best way to handle this? Using AsyncTask? What is the best way to communicate this back to the main/UI thread? I find using listener creates kind of messy code, threadwise. is there some way to push it to the threads msg queue or something? What is the best pattern to handle this? May 23 20:11:43 ptrtoptr, github, eventbus or otto May 23 20:11:45 :) May 23 20:15:19 preciate it! May 23 20:16:40 github? May 23 20:17:03 ah May 23 20:22:05 hi May 23 20:26:53 Anyone know a good tutorial for a custom drawer menu... specifically not (or in addition to) the main activity's one? May 23 20:31:19 SimonVT: i have setContentView(R.layout.activity_login); in my oncreate of loginactivity and activity_login.xml in resources, what am i missing? May 23 20:35:19 otto vs eventbus, which is better? May 23 20:35:29 for what? they are different May 23 20:36:44 eventbus claims they are faster but that's stupid because a) registration is so quick it doesn't matter and b) their API suffers because of it May 23 20:37:17 they also try to be more than a simple event bus with a bunch of threading crap that I don't necessarily think should be a bus's responsibility but some people like May 23 20:39:42 has anyone had any experience with the AppCompat sliding drawer on HTC devices? May 23 20:40:52 OmniUni: Just checked one that I made on HTC device -- no problems there. May 23 20:41:03 hello i have an ARM exe copied from asset to internal data, now trying to run it and having problems. anyone do something like this? May 23 20:41:21 greymalkin: what device and Android version? May 23 20:41:39 I don't know... the owner just walked out the door. May 23 20:41:49 lasserix: yes, i've done it with tcpdump May 23 20:41:49 The one with the speakers in front. May 23 20:42:04 greymalkin: no performance issues? May 23 20:42:13 Nope, it's smoother than my GNex May 23 20:42:52 strange. for some reason HTC 4.4 ONLY is causing it to run at about a frame a second for me May 23 20:43:00 can you use custom views in the Android Studio view builder? i.e. https://github.com/vinc3m1/RoundedImageView May 23 20:43:11 I got errors when I tried to use it in the layout builder May 23 20:43:26 I've tested on other devices from Android 2.3 up to 4.4.2 on my Moto x and none have the performance problem May 23 20:44:49 skeibobo: you can add them and work with them in the XML, but they may not preview. in order for the preview to work, there are a a few other things the library author has to do. most of them don't. May 23 20:45:31 *shekibobo May 23 20:46:29 greymalkin: were you using the setup that AndroidStudio gives by default or were you using a different one? May 23 20:46:55 OmniUni: I don't use Android Studio, so, no. May 23 20:48:00 OmniUni: happen to have a link or guide on the "other things"? May 23 20:49:05 OmniUni was there any trick, i mean did you copy tcpdump into your app or just ran it off the os? May 23 20:50:49 lasserix: i copied it out, did a chmod to make it executable, and then ran it using exec May 23 20:51:18 which command did you use chmod ? May 23 20:51:42 and what file path did you use in the exec /data/data/appname/files/executabletarget? May 23 20:59:19 lasserix: IIRC, i first got the app directory and copied the file into the default app storage area May 23 20:59:33 final HttpResponse responseCopy= response; //Does that copy the object? If not, how do I copy an object? May 23 20:59:42 omni yeah i did that May 23 20:59:55 lasserix: this was an app that used root though, so once i had the path, i just used the regular linux chmod on it May 23 21:00:09 JakeWharton: isnt the threading the whole point? May 23 21:00:19 not at all May 23 21:00:31 it's decoupling event consumers from event producers May 23 21:00:34 greymalkin: turns out the issue is tied to a specific app as well as a specific phone. i tried a second app and it worked fine May 23 21:00:47 ahh yeah i have rooted phone, but the demo is probably going to use non-rooted and i read that as long as you have it in the internal app space you don't need root to do it May 23 21:01:27 lasserix: that may be the case, just chmod +x like you would from a linux command line May 23 21:03:24 ptrtoptr: I believe you'll need a "new" keyword or Java will use a pointer May 23 21:04:20 ptrtoptr: you probably don't have to worry about that though, just a suspicion, but it's likely that the scope you're working with is inside a function that will have a new response each time May 23 21:04:52 ptrtoptr: and the final key word will cause java to keep the pointer to the original object May 23 21:10:48 greymalkin: have you ever encountered a particular thing that would cause a dramatic slowdown on HTC devices? May 23 21:11:12 why don't you profile it? May 23 21:13:00 Mavrik: pardon my noobishness, but how so? May 23 21:14:10 i have seen wonderful breakdowns of what functions ar taking longer and so on, but i haven't been able to find anywhere in DDMS where this shows May 23 21:14:42 OmniUni, http://developer.android.com/tools/debugging/index.html May 23 21:14:50 left menu May 23 21:15:06 and this: http://www.curious-creature.org/docs/android-performance-case-study-1.html May 23 21:16:40 OmniUni: No, I have not noticed much difference between HTC or others except for the "hardware" menu button. May 23 21:17:37 greymalkin: well, i guess i'll just count my blessings that the app that actually needs to run smoothly does for now May 23 21:18:18 Mavrik: thanks! the article in particular should be very helpful May 23 21:26:17 How can we display HTML in a TextView *inside the layout file*? android:text doesn't seem to do it, even after wrapping the HTML in CDATA May 23 21:42:02 you can't May 23 21:49:31 How do I get the instance of the Fragment here: newGame.setOnClickListener( new OnClickListener() May 23 21:49:32 { @Override public void onClick( View arg0 ) HttpRequestHandler handler = new HttpRequestHandler( (IHttpRequestHandlerListener) MainMenuFragment.class ); May 23 21:51:44 I am in MainmenuFragment which creates a listener amd in the listener in onClick I want to get the fragment instance... May 23 22:00:17 when i poll my users whether they would like dropbox or google drive support; pretty much everyone says dropbox. anyone else have the same experience ? May 23 22:02:23 g00s, dropbox has hugely larger market share May 23 22:02:30 mostly because the sync tools for google drive are shit May 23 22:05:12 Mavrik ok thanks, one fella asked for box/box.com or something, any experience with that one ? May 23 22:05:26 I've seen it. May 23 22:05:28 but that's about it May 23 22:05:41 heh, me too - so many of these things May 23 22:24:58 how can I get the instance of the file/class I am in? May 23 22:27:12 just swapped out ~1k lines of sqlite-related code with sharedpreferences May 23 22:27:14 thank god May 23 22:28:45 Hey so I am trying to cross-platform my android app. Its just a simple utility app and I was wondering if I could get some opinions on what would be best practice in transferring my app to ios. I know I will have to completely redevelop it but I was wondering if I should try to make the ios app look exactly the same as my android app or adopt some of the ios design patterns and just keep the same functions. If I need to make i May 23 22:29:06 you know of any libraries to add android-like user interface elements into the app. May 23 22:30:25 sorry my question might not 100% relate to the topic but didn't know where else to ask May 23 22:31:09 zymaster: you should probably use ios design patterns May 23 22:32:40 Mango_Man: Alright I'll probably do that people should hopefully still be able to identify it as the same app, it will be easier for me, and it will hopefully be more familiar to the users. Thanks May 23 22:33:29 If I want to create a game that can reach a large number of Android Devices, which is the best Minimum API / Android Version to target? Android 2.2 / API 18? May 23 22:35:32 CTCB: You should use the minimum possible sdk that you can support and still allow your game to run. If you need really modern features developing for only 4.0 or higher might work but you will gain a fairly larger audience if you develop for 2.2 May 23 22:36:09 zymaster: Which features will I lost by targeting 2.2 and up? May 23 22:36:30 *lose May 23 22:38:30 CTCB: Check out http://goo.gl/xKW6zU for a list of features with each version but know that for some features there are good official support libraries that will allow you to run newer features on older devices. I would start developing for 2.2 and if you find theres a feature you absolutely need in only later versions you can just change your minimum required sdk May 23 22:50:24 Does anyone know what encryption will be used when connecting to a RFCOMM server socket via BluetoothDevice's method createRfcommSocketToServiceRecord ? I was not able to find any decent information on what encryption is used in Bluetooth, much less in RFCOMM. May 23 22:58:46 Hello guys, i started to develop and app , but rigth now i stuck on a big problem, and even ppl i know who develop andorid doesnt found the problem. I want to querry from my db and when i pull the db and try the querry with a SQL programm it works but in the code i never get results when i use the where inside May 23 22:59:02 i can querry for somethink like SELECT * from DB May 23 22:59:16 also raw querys and with selection args doesnt work as well May 23 22:59:39 if anybody could spend some time to watch on my code i whould be very happy cause i dont find a solution for hours May 23 23:00:14 Oran: that's not enough detail to answer your question May 23 23:00:52 when i 'flick away an app from the "alt-tab" mode, is it possible to catch that event? May 23 23:01:13 your app will be torn down May 23 23:01:26 funkbox: what u need to know ? May 23 23:01:30 yea but not my Process that i made with ProcessBuilder May 23 23:01:44 it is there still as a zombie May 23 23:02:32 shall i copy some lines to paste bin ? May 23 23:03:33 is there a call back for the app tear down May 23 23:05:13 Oran: don't use sqlite May 23 23:05:24 it's a mess May 23 23:05:57 question, i'm looking at http://developer.android.com/reference/android/content/AsyncTaskLoader.html May 23 23:05:58 btw, what percentage of android phones out there would you say are non-arm May 23 23:06:00 ? May 23 23:06:19 nevermind, i figured out the answer May 23 23:06:27 Mango_Man: what is the altenative to sqllite? May 23 23:06:36 Oran: sharedpreferences May 23 23:06:44 or json May 23 23:07:32 ive guess this wont suit me, ive need a lot of information which lays on an web server May 23 23:07:53 its not about tiny app intern values May 23 23:08:31 Oran your device might have the sqlite3 command to access the file to test queries May 23 23:08:57 rigth now i just use android studio May 23 23:09:20 but when i pull it and use the sql sw on my machine it works like supposed to May 23 23:09:57 ive thred raw query as well as different kind of notations as well as i let the db created with static final strings which i use to build a querry May 23 23:10:12 (created inside the app= May 23 23:10:31 and as i said the querry it self orks when i dotn use any kind of where May 23 23:10:48 SELECT * FROM db ORDERD BY whatever May 23 23:10:52 works May 23 23:11:15 but as soon as i try to use anykind of WHERE i get nothink May 23 23:11:39 Oran also, if its a pure sql question, you can try #sqlite May 23 23:11:52 i guess its not as i said it works with sql May 23 23:12:02 when i use the same querry in the code it doesnt May 23 23:12:04 ok. just reading back ... May 23 23:12:17 maybe something is not being escaped right, etc May 23 23:12:19 Oran, "Select * from dbName where CONDITION ORDER BY columnName" May 23 23:12:32 condition should come before order by. May 23 23:13:00 sry it was just an esample i wrote by hand in the irc client May 23 23:13:16 i can paste some querry i tryed but i also deleted a lot of stuff i tryed May 23 23:14:24 if it helps May 23 23:14:36 sure. ;P May 23 23:14:45 give me a row it should match as well. May 23 23:14:52 but as i said i tryed it with sql software and also i asked some friends to do, and it works everywhere May 23 23:15:06 just not in your app? May 23 23:15:19 allright guys, apparently there is an Activity.onStop() that you can ovverride May 23 23:15:26 no they tryed it with sql software to fire the querrys i did May 23 23:15:28 but dont forget to call super.onStop()! May 23 23:15:29 with my db May 23 23:15:49 your db is a sqlite db? May 23 23:16:13 you each owe me 1.224 x 10e-9 bitcoins pls May 23 23:16:56 nick9998: I own unlucky.co.in, you owe me that plus, do not pass go, do not collect $200 go directly to jail. May 23 23:18:09 Fenny: the e was for euler's constant May 23 23:18:57 Fenny: May 23 23:18:58 the table is called rezepte and looks like this: _id|RezepteID|RezeptName|RezeptBeschreibung 1|1|Curry|gelbes curry hmmm What ive tryed: (alot stuff but deleted a lot of my try already) 1: String[] selectionArgs = {"%Curry%"}; Cursor cursor = db.rawQuery("select * from rezepte where RezeptName='Curry'",null); 2: String[] selectionArgs = {"Curry"}; Cursor cursor = db.rawQuery("SELECT * FROM rezepte WHERE RezeptName=?",s May 23 23:19:00 ups May 23 23:19:18 http://pastebin.com/mScg7738 May 23 23:19:28 Apparently items within an XML layout cannot reference things that are defined further down in the layout? May 23 23:20:32 Like, layout_below="@id/some_id_defined_after_this_xml_block" -- but the layout renderer in android studio displayed it properly. May 23 23:20:49 Oran: And the same code with just "select * from rezepte" works? May 23 23:20:59 yes May 23 23:21:11 and u can put stuff for * as well May 23 23:21:14 and it works May 23 23:21:40 ive u change the WHERE to somethink which is not a column ive get an error May 23 23:21:50 so iam pretty sure the columnnames are correct May 23 23:22:09 hmm, try "select * from rezepte where RezeptName like='%urr%'" May 23 23:22:14 tell me if that works. May 23 23:22:44 but with no = May 23 23:22:48 hmm, try "select * from rezepte where RezeptName like '%urr%'" May 23 23:23:32 what does "getActivity().runOnUiThread( new Runnable() " do if you are already running on the u thread? May 23 23:23:48 bankai_au http://digg.com/video/its-friday-so-heres-ten-bulldogs-on-treadmills May 23 23:24:40 highcup reference with @+id May 23 23:25:29 Also does it work if you query: "select * from rezepte where RezepteID = 1" ? May 23 23:25:57 how do i get external IP address from java like a cool guy May 23 23:26:01 Fenny: the like query doesnet worked May 23 23:26:02 g00s: thanks, now the file's not in weird order :P May 23 23:26:07 and i try the id query now May 23 23:26:27 but at least i dont want to query by name, i want to query by id finally but for now it dont care May 23 23:26:54 nevermind found it!!! May 23 23:27:35 btw ive got an " i cant change CHmod" "error, but i belive its cuase my sql software changed the riths to rw - rw - rw from rw - rw - --- May 23 23:27:53 Fenny: the id query doesnt worked as well May 23 23:28:56 very strange. May 23 23:30:02 how are your initializing db? May 23 23:32:26 in my first few tryes ive let the app create it, than i added some tables by notebook and the table rith now was created by the app code it self May 23 23:36:21 shit man now Process.destroy() isn't working for me May 23 23:37:10 i wonder if my process isn't ignoring signals... May 23 23:39:24 any idear Fenny May 23 23:40:07 Hmm, let me look at the db code in one of my apps. May 23 23:40:16 Nothing that you are doing looks wrong to me off hand. May 23 23:41:47 same goes for me May 23 23:41:59 and as i said i also asked some other ppl May 23 23:42:18 but i nearly start cryed about this crap May 23 23:42:24 Cursor cursor = db.query(TABLE_SONGS, new String[] { KEY_NAME, KEY_ID, KEY_DURATION, KEY_FLAGS, KEY_HASLOWBITRATE, KEY_ISVERIFIED, KEY_POPULARITY,KEY_ARTISTNAME,KEY_ARTISTID, KEY_ALBUMNAME, KEY_ALBUMID, KEY_YEAR, KEY_COVERARTFILENAME, KEY_TRACKNUM, KEY_AVGDAILYWEIGHT, KEY_NUMPLAYSMONTH}, KEY_ID + "=?", new String[] { id }, null, null, null, null); May 23 23:42:33 That is my query to search by id. May 23 23:43:27 ive tryed somethink like this but i will build a querry liek this May 23 23:43:37 just gimme a scound May 23 23:47:08 I am trying to run a arm exe, copied from assests into internal file space. but i get permiession denied when running process p = runtime.getruntime().exe(...file) May 23 23:47:31 (i have both set chmod to 777 and setexecutable(true) May 23 23:47:44 lasserix i don't think you can do it, May 23 23:47:50 maybe copy to /tmp or something :) May 23 23:47:55 ? May 23 23:48:02 exe don't work on sdcard May 23 23:48:08 right May 23 23:48:16 it is supposed to work in internal app space like local or something May 23 23:48:26 right, /tmp isn't on sdcard O.o May 23 23:48:34 yeah .. i dunno May 23 23:48:44 i tried that with sqlite3 command, didn't work out May 23 23:48:55 copy the app from your assets to your datadir + "/bin" May 23 23:49:10 it will work from there bro May 23 23:49:42 Fenny: http://pastebin.com/EypPgXRW May 23 23:49:47 doesnt work as well May 23 23:50:19 Try this: db.query("rezepte", new String[] {"RezepteID"}, "RezeptName=?", new String[] {"Curry"}, null, null, null, null); May 23 23:54:00 nick in eclipse or in code? May 23 23:54:08 Oran: are you making a cooking app? May 23 23:54:20 more or less ;) May 23 23:54:31 lasserix: you have to get your data dir path from the context at runtime May 23 23:54:32 me too :D May 23 23:54:37 :D May 23 23:54:45 then you make a folder "bin/" in there if it doesn't exist May 23 23:54:48 nick9998: yeah i do but i was use data/data/files May 23 23:55:16 dont understand sorry May 23 23:55:34 i can show u can example May 23 23:55:48 yeah if you can May 23 23:56:03 Fenny: nope doesnt worked May 23 23:57:47 lasserix: http://pastebin.com/vtTh3b4H May 23 23:57:53 it is from my project May 23 23:58:19 an asset binary named huntd-arm is copied to data/data/x/bin May 23 23:58:46 Oran: Hmm... May 24 00:01:06 Well this is my hacked together DB manager code, Oran: https://gist.github.com/FennyFatal/e9b821aafe100029038c May 24 00:01:14 Not sure if it will help you or now. May 24 00:01:18 *not May 24 00:01:46 let me take a look May 24 00:01:48 huntd-arm is squelching signals.. suspicion confirmed...gosh May 24 00:10:16 Fenny: it looks quite similiar to my May 24 00:11:39 i can show u what i got iv u want May 24 00:15:47 sure. May 24 00:16:01 nick9998: hey thanks, boss pulled me out of the room will take a look, thanks May 24 00:17:20 nick9998: the original binaries are in your asset folder? May 24 00:17:51 ahh yeah i see, May 24 00:17:52 cool May 24 00:18:20 Fenny if u think it helps i can show u my db manager code May 24 00:18:42 sure Oran. May 24 00:25:58 i think actually it was forking now May 24 00:36:07 g00s: any rooting experience? May 24 00:36:28 g00s: not here ??? :o May 24 01:06:37 friday night coding is the best May 24 01:11:48 Got pointed here by #android. Quick question about applications. When installed to an (encrypted) SD card, is all of their associated data kept in the same location? Further, do I have to worry about some content being cached elsewhere? May 24 01:11:53 nice my pixelart livewallpaper is live May 24 01:13:04 nice doggie May 24 01:13:24 how long did that take you May 24 01:14:34 woof! May 24 01:16:06 anyone have any roms for LG Optimus F6 May 24 01:17:17 #android-root May 24 01:17:35 im on ther too May 24 01:17:36 oh already there and asked May 24 01:27:23 i needed to kill my classes.dex after adding some stuff to the layouts,otherwise my app would crash. May 24 01:27:26 is it normal? May 24 01:34:21 how do you assign hex values to enums in java? May 24 01:34:34 my stackoverflow skills are failing me atm May 24 01:35:35 oh i need a constructor May 24 01:35:36 weird May 24 01:38:13 Mango_Man: not sure i follow May 24 01:38:53 nick9998: like, when the values in the enum have hex values May 24 01:39:12 you'd need a private constructor so you can say Top(0x4) or something May 24 01:39:32 ah ok May 24 02:50:13 OK, so I start activity A, which has a list view. From A, I start B. While in B, I change orientation. Now, when I go back to A, all of my list view entries are duplicated. Any tips on what I may be overlooking here? May 24 02:50:52 hey, only one of my activities gets the onDestroy event, the first activity.. is it normal? May 24 02:51:18 qkzoo1978: what kind of adapter are you using for your listview? May 24 02:51:43 Notbryant, a custom list view with view holder May 24 02:51:46 Hello Question was wonder anything with Camera API experience… camera works except if i leave it say flat on the table "where it'll show black" the preview won't update after that but i can take a picture and it'll work and then resume... May 24 02:52:48 qkzoo1978: I'm not really sure what it might be, especially if it only happens when changing orientation May 24 02:52:54 Notbryant err custom list view adapter. May 24 02:53:58 Notbryant, and only if changing orientation in another activity. I can change the orientation on the activity with the listview over and over again and it doesn't happen. May 24 02:54:42 When it shows the duplicates, I can change orientation and it cleans itself up. May 24 02:57:45 I'm just confused, because the first line of the routine that populates the list view is rowitems.clear(), which wipes out tje arraylist from which the views are created. May 24 02:58:54 The only thing I could think of would be, when the child activity is rotated, it is recreated and its parent is either recreated or just has something funky done to it May 24 02:59:17 but that's a very vague thought and, like you said, it should clear everything out **** ENDING LOGGING AT Sat May 24 02:59:58 2014