**** BEGIN LOGGING AT Tue Apr 15 02:59:59 2014 Apr 15 03:29:18 hi boys can someone please point me to an opensource code for creating android text and images based book? Apr 15 03:31:01 is ti posible to register sensorevent lisetner in non UI thread and show data in UI thread? Apr 15 03:32:11 :JakeWharton it is reagarding U2020’s ui/gallery. How to reuse it, if need to create an other (similar) gallery list but with different REST request? Apr 15 03:32:33 i don't understand the question Apr 15 03:34:13 I have “listing ad” where all ads will be displayed (right now it uses ui/gallery widjet). However, I need to create similar one for “My Ads”. Apr 15 03:35:25 where only particular person’s ads will be displayed in the same way as “listing ad” Apr 15 03:36:02 hi slani did u get a reply for UI stuff? Apr 15 03:36:26 just re-use the same view and adapter but back it with different data Apr 15 03:37:20 hi boys can someone please point me to an opensource code for creating android text and images based book? not a reader but a book? Apr 15 03:39:33 :JakeWharton yes, GalleryAdapter, GalleryItemView, can reuse, however, GalleryView is very coupled. You mean, I can create MyAdView and use GalleryAdapter & GalleryItemView? Apr 15 03:39:54 yeah Apr 15 03:42:20 :JakeWharton so, if I am not wrong, can I say GalleryView does more like Module in this case? Apr 15 03:46:11 I had this code working properly before- it would take gps details and send them to server from an onClick. since i've added more to the activtiy, it won't send the gps details properly, longitude and latitude both show as 0. I believe this is because you're not supposed to do network tasks on main thread which is fair enough but doesnt explain why it worked before. if i take away the network details a toast will display the detai Apr 15 03:46:20 i've only been testing this on the main activity again because i've tried to move it to a service with a new thread but my server is still receiving 0.0 as the co-ordinates..any ideas?. http://pastebin.com/8TLQHJPu Apr 15 03:49:56 :JakeWharton sorry, please, discart my last question. Thank you :) Apr 15 03:57:56 any open source book out there? Apr 15 04:27:08 Hi guys any idea what is error (1, -2147483648) after recording a video and you try to play or preview it? Apr 15 04:37:53 anyone followed this tutorial? http://developer.android.com/guide/topics/media/camera.html Apr 15 04:39:03 sounds like over/underflow of a signed variable Apr 15 04:39:56 shmooz: your talking to me? Apr 15 04:40:08 androidnewb: yeah just guessed Apr 15 04:41:06 shmooz: you mean thats why I get the error code I just pasted? Apr 15 04:41:19 maybe Apr 15 04:41:34 ok, thanks though Apr 15 04:41:53 are you decrementing some int ? Apr 15 04:42:58 shmooz: I don’t really know, I just follow the tutorial on the android dev. website and try to preview the video I recorded Apr 15 04:45:06 this is my code: http://pastebin.com/F7HGH7r3 , I don’t if anyone would read it Apr 15 04:45:10 if I'm runing SensorEventListener in new Thread, how can I show data in UI thread? Apr 15 04:50:43 * g00s wonders if anyone here has tried μJavaActors on android Apr 15 04:50:49 http://www.ibm.com/developerworks/java/library/j-javaactors/index.html Apr 15 04:59:52 mSensorManager.registerListener(this, accelerometer,SensorManager.SENSOR_DELAY_UI, ) Apr 15 05:00:00 soory Apr 15 05:24:02 Hi all, what is the best way to communicate with a JSON API, like sending post request to the server, receiving JSON response and parsing those. By best I mean easy too :) thanks in advance Apr 15 05:26:40 meadhikari people like okhttp/retrofit/gson Apr 15 05:27:43 g00s, thanks a lot Apr 15 05:28:29 high, i'm having a library project and an app project, both build fine, but the app doesn't run on the phone....crashes with "java.lang.NoClassDefFoundError: .R$id"... Apr 15 05:29:08 i've read http://tools.android.com/recent/dealingwithdependenciesinandroidprojects Apr 15 05:29:33 it says "Note that app projects can still import the R classes from referenced Library Projects ..." Apr 15 05:29:46 but it doesn't say how i can trigger that... Apr 15 05:29:55 OxFEEDBACC is this from eclipse ? Apr 15 05:30:21 it also says it's not necessary, but when i enter the resource in the app, it isn't recognized either... Apr 15 05:30:36 nope, g00s, i use kate + zsh as my ide :-) Apr 15 05:30:45 ok, what build system tho Apr 15 05:30:54 ant Apr 15 05:31:00 linux Apr 15 05:31:25 hm, k. don't remember much about how ant worked with lib projects, sorry Apr 15 05:31:32 use gradle ;) Apr 15 05:31:48 in next life for sure :-D Apr 15 05:32:31 i bet google ditches it soon Apr 15 05:33:44 how can i manually add the class to the jar? there must be a way to do that, not? Apr 15 05:53:11 hi, so i'm trying to implement up navigation for an activity that's been called from a fragment, but I can't seem to find out how to get the fragment manager from the fragment activity Apr 15 05:53:17 does anybody know? Apr 15 06:00:42 k, got it (jar uf) Apr 15 06:01:03 ? Apr 15 06:02:56 that was not about your question, something15525 Apr 15 06:04:05 OxFEEDBACC alright thanks Apr 15 06:06:45 something15525, did you look at FragmentActivity.getSupportFragmentManager() ? Apr 15 06:07:13 OxFEEDBACC, i'm using the framework one Apr 15 06:08:10 so would i just call FragmentActivity.getFragmentManager in the activity? How do I specify the fragment activity that I came from and grab it's fragmentmanager in that activity? Apr 15 06:08:57 as of SDK level 19, there is only 1 class named FragmentActivity, and that is android.support.v4.app.FragmentActivity Apr 15 06:09:21 sorry, I don't think I'm saying this correctly Apr 15 06:09:36 the framework version of getFragmentManager() is just in Activity Apr 15 06:09:55 but how would I specify that instance of the Activity and get it's fragmentmanager? Apr 15 06:09:56 whatever you say, there is not FragmentActivity.getFragmentManager Apr 15 06:10:32 so i think you should just look at the FragmentActivity reference and find getSupportFragmentManager() Apr 15 06:10:43 I'm not talking about FragmentActivity, I misspoke Apr 15 06:11:00 OxFEEDBACC, http://developer.android.com/reference/android/app/Fragment.html Apr 15 06:11:08 A Fragment is a piece of an application's user interface or behavior that can be placed in an Activity. Interaction with fragments is done through FragmentManager, which can be obtained via Activity.getFragmentManager() and Fragment.getFragmentManager(). Apr 15 06:11:16 k, that's different... Apr 15 06:11:39 yayaya, i can read it myself... Apr 15 06:12:00 and that's actually the answer to your question... Apr 15 06:12:00 right, so I have an onClickListener that adds the current fragment to the backstack after sending an intent to the Activity to start Apr 15 06:12:30 but when I call getFragmentManager in the Activity, it's empty Apr 15 06:12:39 which is because it's not the right context Apr 15 06:12:44 i'm pretty sure Apr 15 06:13:11 so i'm wondering how I would get the fragmentmanager from the fragment I sent the intent from Apr 15 06:13:31 which is the fragmentmanager I added the current fragment to and that I need to pop off of the backstack Apr 15 06:13:42 no idea then... didn't use fragments in my stuff... Apr 15 06:14:08 ah, alright. well thanks anyways :) Apr 15 06:14:37 no worries... i like to help if i can... Apr 15 06:15:12 well i just don't get why when I do try to do as it says in the doc it doesn't work Apr 15 06:15:28 I'm trying to do this OxFEEDBACC Apr 15 06:15:41 FragmentManager fm = ActivityName.getSupportManager(); Apr 15 06:16:01 ActivityName can also be FragmentName Apr 15 06:16:04 i'm assuming Apr 15 06:16:08 i tried both and they didn't work Apr 15 06:16:15 i don't even know whether or not a FragmentManager is automatically set up if you're using a fragment... Apr 15 06:16:47 maybe you need to instantiate one yourself? (but unlikely, to be honest) Apr 15 06:17:20 the FragmentManager is automatically set up Apr 15 06:17:22 BUT Apr 15 06:17:30 it is only in the context of the current activity Apr 15 06:17:41 IE if you launch another activity, another fragmentmanager is created Apr 15 06:17:45 hence my issue Apr 15 06:18:10 you can access the current context by this when your listener is a method of that context, not? Apr 15 06:18:31 oh, i start to get it... Apr 15 06:18:37 whoa lol, you lost me there Apr 15 06:18:51 sorry... Apr 15 06:18:59 no worries, can you explain? Apr 15 06:19:35 k, you have a context, in which you set up a fragment... the manager is created automatically... Apr 15 06:19:56 then you set up a new context, in which you want to use the very same fragment? Apr 15 06:20:30 i'd guess you had to pass some info to the new context... but as i said, i never did fragments, so i can barely know... Apr 15 06:20:41 well that's kind of right Apr 15 06:20:51 I have a fragment that has a list of items Apr 15 06:21:06 when I click on an item, it launches an activity that displays more information about that item Apr 15 06:21:24 then when I click on the up navigation button, i want it to go back to that fragment Apr 15 06:21:29 just like the back button does Apr 15 06:22:45 ain't it sufficient to just close the new activity? Apr 15 06:23:09 yeah lol i guess that would be sufficient Apr 15 06:23:17 hmm Apr 15 06:24:19 gonna try just calling finish and see what happens Apr 15 06:25:08 oh hell yeah lol Apr 15 06:25:11 that fixed it :D Apr 15 06:25:17 i really appreciate it OxFEEDBACC Apr 15 06:25:36 such an easy fix lol Apr 15 06:25:42 and I couldn't even see it :/ Apr 15 06:25:47 well, the point is that you're wasting resources this way, if you click on the next item in the fragment... Apr 15 06:26:04 because the new activity must be set up from scratch, if i got that right... Apr 15 06:26:10 wasting resources doing what? Apr 15 06:26:14 calling finish? Apr 15 06:26:54 there should be some way to pass the old context/activity and switch back to that.... or, you mentioned some stack already... to use that to switch back... Apr 15 06:28:04 yeah hmm Apr 15 06:28:23 well i mean depending on what is clicked it has a whole different data set, so I think it would need to be recreated each time Apr 15 06:28:27 unless i'm just doing it wrong Apr 15 06:29:15 well, no idea... you can keep your quick fix first... at least it runs... maybe you find a better solution later... Apr 15 06:32:55 yeah Apr 15 06:32:55 thanks man Apr 15 06:33:09 no worries... it's all part of the service :-D Apr 15 06:45:35 Nilium hm, Sketch 3 is out Apr 15 06:45:50 may have jumped for it if 2.x wasn't so buggy Apr 15 06:48:02 What's Sketch? Apr 15 06:48:25 that alternative to inkscape / Ai Apr 15 06:54:19 hi.. i'm trying to change the layout of a preference by setWidgetLayoutResource inside onPreferenceClick... but the view is not updated immediately? how can i force an update to that particular preference? Apr 15 06:54:20 thanks Apr 15 06:57:00 hey, how can i have a shadow under actionbar when i enable windowActionBarOverlay in theme? Apr 15 07:10:26 omid8bimo: add a windowContentOverlay to your theme Apr 15 07:10:50 this is my theme: Apr 15 07:10:51 Apr 15 07:10:59 * omid8bimo sorry for pasting here! Apr 15 07:13:53 omid8bimo also , there is a bug related to that Apr 15 07:14:10 https://code.google.com/p/android/issues/detail?id=58280 Apr 15 07:14:49 hmm! could be my issue! i have windowContentOverlay set to true, i have shadow in kitkat but no shadow in 4.1 Apr 15 07:15:12 windowContentOverlay isn't a boolean Apr 15 07:15:27 it should be a reference to a drawable Apr 15 07:15:41 Grr. Anyone familiar with OpenGL ES ? Apr 15 07:16:45 JakeWharton: ok. let me try that Apr 15 07:19:37 Guessing not. Apr 15 07:20:04 Is there an OpenGL specific Android channel? Apr 15 07:20:50 KittenKoder: no, you can either ask here, or ask in any opengl channel Apr 15 07:21:14 timroes i saw your g+ post today about darcula colors messed up in AS ;) Apr 15 07:21:29 glad to know i'm not the only one Apr 15 07:21:33 The x and y coordinates are switched for the tutorial app. : I I can't figure out why, but I can't find anyone with the same problem on Google. Apr 15 07:21:53 g00s: it's getting worse and worse, one release ago, it was just one dialog, and now it became somehow even more Apr 15 07:22:02 I don't know what they are doing that they break all the color codes :) Apr 15 07:22:20 hm Apr 15 07:24:59 i guess they don't use darcula :) Apr 15 07:25:34 i like the light theme during the day; the AA on fonts seems crisper on my mac - at night though its painful, so i switch to darcula Apr 15 07:26:06 Darcula rules! Apr 15 07:26:11 okay that is also kind of.. Apr 15 07:26:12 crazy? Apr 15 07:26:50 :D Apr 15 07:27:02 the lighter theme is better when there is glare Apr 15 07:27:06 Alright, I guess I may have to reinvent the wheel. >.< Seems it's something in the Matrix maths. Apr 15 07:27:14 darker theme, too much glare - if you don't have matte LCD Apr 15 07:27:20 ah right yeah :) Apr 15 07:27:23 (and the wrong conditions) Apr 15 07:27:27 sorry I have a good notebook, so i always use dracula :P Apr 15 07:28:48 My tablet looks awesome in darkness. Apr 15 07:30:52 I do wish more apps would use the system theme. Exception being games, of course. Apr 15 07:33:31 morning Apr 15 07:35:23 new nexus 7 tablet will likely be released for summer, isn't it? Apr 15 07:35:58 When a triangle that has the correct coordinates points left or right instead of up … something is messed up here. Apr 15 07:36:34 likely, yes... Apr 15 07:37:50 maybe it will be LG N7 Apr 15 07:38:11 btw, where is the Play Edition S5? Apr 15 07:40:17 no announcement of that Apr 15 07:45:20 I'm totally stuck on this issue: http://stackoverflow.com/questions/23031095/part-of-custom-android-view-for-ime-being-cut-off Apr 15 07:45:37 And it doesn't seems that anybody in SO can figure it out. Apr 15 07:45:43 Help is much appreciated! Apr 15 08:16:04 I've made a custom View which I'm using from an Activity. How do I give the data, the Activity receives from Intent, to the custom View? Setting it in its constructor seems impossible as the custom view is instantiated from the Activity's XML. Apr 15 08:19:02 customView.setData(data) from Activity's onCreate()? Apr 15 08:19:25 why would it be different than any other view ? Apr 15 08:20:22 can someone explain what the hell context is for? When I need to pass it to a class... eg the SQLite class... do I use getActivity() or getApplicationContext() ? Apr 15 08:21:17 nebby to understand what a context does, look at its methods :) Apr 15 08:21:59 nebby, it describes your app's environment Apr 15 08:22:13 it's a... context. same as in java servlets Apr 15 08:23:01 nebby http://www.doubleencore.com/2013/06/context/ Apr 15 08:23:30 cheers, I'll give that a read Apr 15 08:24:00 keep in the back of your mind: there are different kinds and (2) you can leak them Apr 15 08:26:47 mhm Apr 15 08:38:39 It's strange, the Java and Android have one thing. Apr 15 08:38:47 Grr. Apr 15 08:39:09 It's strange, the Java and Android have one thing over complicated, but both are different things. Apr 15 08:40:08 hi guys can you help me ? i ave a problem http://stackoverflow.com/questions/23077824/listview-dosent-work-order Apr 15 08:40:18 have* Apr 15 08:40:25 Java Swing is excessively complex. Android it's … erm … I'll find out what it is, there has to be something. Apr 15 08:43:20 XML Apr 15 08:43:30 roxdragon: You will need a custom sort object and iterator, I believe. Unless the Android adapter is suppose to have the method in it Apr 15 08:43:39 roxdragon , thats the kind of SO post which has ruined the whole damn site Apr 15 08:44:11 "i'm having a problem, here is my code, fix it!" Apr 15 08:44:12 XML is actually easier for writing GUIs and it's not required in Android. :P Apr 15 08:46:38 uhm... i have order flights... if i put a System.out.println in code.. it's ok but in listview no Apr 15 08:46:55 its not a problem with listview, or adapters - so don't say "listview order doesn't work" Apr 15 08:46:57 flights are changed Apr 15 08:47:06 the flights are changed Apr 15 08:47:12 its obviously your logic thats messed up Apr 15 08:47:13 holy shit, I don't know why the hell getInstrumentation().getUiAutomation().takeScreenshot() is obtaining a completely black bitmap Apr 15 08:47:19 so fix it :) Apr 15 08:48:04 robotium can't take a complete screenshot of the app when a dialog is focused, it only gets a picture of that isolated dialog Apr 15 08:48:13 hi Apr 15 08:48:29 is there a way to detect the saveMode in >=4.1 ? Apr 15 08:50:45 Gah, I went and got distracted with OpenGL again when I need to finish learning more of the basics first. Apr 15 08:51:10 Is there a way of applying a different state_pressed color system wide? Apr 15 08:51:26 Ankhwatcher: use styles. Apr 15 08:52:05 I'm using Google Maps and I want my info windows to flash green when they are pressed, I'd like to do the same for the myLocation button that GoogleMaps draws Apr 15 08:52:30 KittenKoder: yes exactly, using styles Apr 15 08:52:46 What style element would I change to accomplish this? Apr 15 08:53:29 Extend a theme then set that style for the theme of the application in the manifest. Apr 15 08:53:45 ... Apr 15 08:54:16 That's the only way I know to do it. Apr 15 08:54:17 lol Apr 15 08:54:19 yes that is how you apply a theme Apr 15 08:54:43 I'm still a noob with android GUI. Apr 15 08:54:50 but what part of that theme would I apply a custom selector to to change the color of these elements Apr 15 08:56:26 Oh, that I don't have a clue. lol Apr 15 08:56:58 I was starting to get that impression Apr 15 08:58:09 I need to learn about save states now. I got enough of the rest figured out for now. Apr 15 08:58:09 the hard part in styles is trying to guess what you have to change to accomplish what you want. Although I'm not sure the GoogleMap is even stylable Apr 15 08:58:36 So far it's been the same as the widget class. Apr 15 08:58:40 Is there a way to play custom sounds with Notifications? I've been trying for a while now but all I can get working are the phones default sounds. Apr 15 08:58:54 Saving state isn't that hard, you just add some stuff into the outState in OnSaveInstanceState() Apr 15 08:59:35 Syzygy: I don't see why not, are your sounds in the correct format? Apr 15 08:59:43 mp3 Apr 15 08:59:57 in res/raw Apr 15 09:00:49 Woot, most of OpenGL ES is the same as OpenGL … ironically. Apr 15 09:02:06 why ironically? Apr 15 09:02:31 Someone said they were very different. Apr 15 09:03:04 Does android still only support openGL ES 2? Apr 15 09:03:14 But after looking over the APIs … it's pe Apr 15 09:03:21 pretty much the same. Apr 15 09:03:24 gah Apr 15 09:03:37 almost use to this keyboard layout. Apr 15 09:03:47 maybe it's based on a pre openGL 3.0 version Apr 15 09:04:14 ES 1 is still available. Apr 15 09:04:15 because there were major changes between openGL 2.x and 3.0 Apr 15 09:04:20 Just not recommended. Apr 15 09:04:56 OpenGL 3 is more streamlined and in line with game consoles. Apr 15 09:06:21 Too bad my old OpenGL libs are not compatible though. Had some wicked shaders. Apr 15 09:07:39 I can use the shaders and recreate the rendering methods, but that will take longer than just starting from scratch. Apr 15 09:35:36 how populate a custom listview with arrayList? Apr 15 09:42:47 roxdragon, arrayadapter check the examples Apr 15 09:46:10 Time to set a Gir wallpaper … I'm in that kind of splodey mood. Apr 15 09:46:26 i was the turkey all along? Apr 15 09:47:51 Can I be a mongoose? Apr 15 09:49:56 Just set my alarm and notifications to some of his clips too! I freaking love tablets. It's a PC that you can carry with one hand. Apr 15 09:50:52 Someone page me! Apr 15 09:56:39 Hello, is there a way for me to know when a scrollview has been scrolled (changed position) without extending ScrollView ? Apr 15 09:58:18 I need to get notified when the user scrolled all the way down... Apr 15 10:03:33 Check for listener interfaces associated with the ScrollView, I haven't done one yet, but that's what they usually use. Apr 15 10:03:38 aviran: you could probably look at GestureListener http://stackoverflow.com/questions/9719741/android-ongesturelistener-and-ontouchlistner Apr 15 10:03:59 CallumTaylor: doing it as we speak :) thanks! Apr 15 10:04:00 and just call getScrollY in the onScroll method to see if you're at the end Apr 15 10:14:37 How can I force a listview to expand to show all elements? Is there an xml tag for that? Apr 15 10:31:53 Ankhwatcher, no there is not Apr 15 10:35:23 If I need to copy an external database, is ResultSet => Object => DAO => Local SQLite the right way to do it ? Apr 15 10:36:55 external sqlite db ? Apr 15 10:40:54 g00s: nope, a MSSQL DB Apr 15 10:41:12 using JDBC Apr 15 10:42:11 you aren't going to use JDBC Apr 15 10:42:37 unless this is LAN only Apr 15 10:42:53 is there a way to run sql query on a content provider? Apr 15 10:43:01 and you've already determined android JDBC support is sufficient, which it probably isn't Apr 15 10:43:27 lemonxah not really an ad-hoc query that i can think of, no Apr 15 10:43:33 :/ Apr 15 10:43:36 i thought as much Apr 15 10:43:49 content providers suck very deeply Apr 15 10:44:08 its not bad Apr 15 10:44:33 i mean its not the worst Apr 15 10:44:34 g00s: :/ well, it suits me quite well for know Apr 15 10:44:58 there was an epic critique back in 2010 by somebody on android-dev, flawless argument Apr 15 10:45:22 Bouska so you have JDBC working right now to MSSQL ? Apr 15 10:45:26 g00s: I need to create a webservice to retrieve the data ? Apr 15 10:45:27 (from android) ? Apr 15 10:46:39 lemonxah https://groups.google.com/d/topic/android-developers/DZKvtmflpLc/discussion Apr 15 10:47:42 g00s: i did not test yet on Android :/ Apr 15 10:47:53 Bouska i'll save you the trouble :) Apr 15 10:49:19 g00s: arf, so I should use a webservice ? Apr 15 10:49:37 yeah Apr 15 10:49:55 g00s, most of those issues we have overcome by having custom joins and stuff .. although comiled sql performance yes big problem Apr 15 10:50:24 lemonxah how did you overcome the custom joins ? Apr 15 10:50:34 g00s: because remote SQL request seemed to be easy to use, although it felt a bit dirty Apr 15 10:50:36 if the provider doesn't support it, i didnt' think it was possible Apr 15 10:50:48 Bouska again, LAN or WAN ? Apr 15 10:51:27 g00s: definitely WAN Apr 15 10:51:34 maybe WP better choice :D Apr 15 10:51:40 I would liek to throw an exception in the doInBackground() method of my AsyncTask, but since I'm overriding doInBackground(), I cannot throw my own exceptions :-( Any idea on that? Apr 15 10:51:49 Bouska well, WAN isn't going to work with JDBC, just forget it Apr 15 10:52:03 wget learn rxjava ;) Apr 15 10:52:52 hi Apr 15 10:53:00 that's your answer to everything :P Apr 15 10:53:03 g00s: Haaha, functional programming? No! ;-) Apr 15 10:53:04 wget see http://slides.com/yaroslavheriatovych/frponandroid -- skip the retrolamda part though ;) Apr 15 10:53:28 bankai_au he said he needed to signal an error from the bg :) Apr 15 10:53:34 g00s the custom joins are easy . if you specify the "table" in the query Apr 15 10:53:41 thats when i prescribe not using asynctask Apr 15 10:53:49 you can have this "Contacts join messages on blah" as your table Apr 15 10:53:57 so that part is easy Apr 15 10:54:16 what does AUDIO_INPUT_FLAG_FAST denied by client mean ? Apr 15 10:54:28 is that any permission issue in manifest ? Apr 15 10:54:33 g00s: Btw, thanks for your link. I'm gonna read that after lunchtime. o/ Apr 15 10:54:57 wget don't forget to scroll down, its a weird 4-way dpad control Apr 15 10:55:05 hi Apr 15 10:55:47 i want know search in string is faster or search in list Apr 15 10:55:49 anyone ? Apr 15 10:56:17 molavy what ? Apr 15 10:56:50 for example , i have this "a b c" and character a Apr 15 10:57:16 i can use this "a b c".contains("a") Apr 15 10:57:39 and can use ["a","b","c"].contains("a") Apr 15 10:57:52 g00s: Indeed, otherwise, it would be too short ;-) Apr 15 10:58:00 which one has best performance Apr 15 10:58:28 i would go with string.contains() Apr 15 10:59:55 g00s: so , search in string is faster than search in List Apr 15 10:59:58 yes? Apr 15 11:00:24 i'm guessing. its iterating through an array vs traversing pointers to nodes and doing == on each object Apr 15 11:00:45 or .equals() Apr 15 11:01:54 lemonxah i've written a few providers, but they have been simple. every industrial strength one i have seen, from aosp like contacts, is so damn ugly - its like being goatse'd Apr 15 11:02:25 g00s, i just read that article and spoke with someone that works here awell and we have compiled queries and custom joins Apr 15 11:02:34 the URI api doesn't give you that Apr 15 11:03:07 the contacts content provider is ugly agreed i dont like at all Apr 15 11:03:11 but it doesn't have to be ugly Apr 15 11:03:19 what do you use instead of content providers? Apr 15 11:03:39 atm i only use providers; but i'm switching some stuff to mvstore Apr 15 11:03:44 we have a pretty decent industial strength one :) Apr 15 11:03:55 * lemonxah googling mvstore Apr 15 11:04:20 but if you want other people to integrate with your app, better use plain provider Apr 15 11:04:29 and thats the problem, its just lipstick on sqlite Apr 15 11:04:47 using another abstraction requires writing your own cursors, etc Apr 15 11:04:57 and matrixcursor sucks Apr 15 11:05:10 you can use a provider to stream data Apr 15 11:05:17 so you could implement a protocol on top of one Apr 15 11:05:21 Is there some delay before android sql inserted rows are visible? I have code that inserts whole bunch of rows in a loop. Right after that it calls function that uses that data. Function gets called but I get nothing. If I wait 50ms before calling function however there is no trouble. Apr 15 11:05:34 and the ,call() thing is OK for chucking bundles around Apr 15 11:05:43 the fact that contentproviders and contentresolvers allow me to integrate with listviews pretty well is a bonus Apr 15 11:05:54 cause most of the app is just a bunch of listviews Apr 15 11:06:06 chat screens and contacts are all listviews Apr 15 11:06:16 and those cursors keeps position on rotate and that Apr 15 11:07:00 and uri notification like when there is new data the ui will update itself is another bonus Apr 15 11:07:24 oh yeah, cursorloader is fine Apr 15 11:07:45 not just cursor loaders but contentobservers Apr 15 11:07:54 those are just listeners Apr 15 11:07:56 its the closest built in way to do data binding Apr 15 11:08:20 lemonxah you use scala right ? Apr 15 11:08:25 yes i know so some screens we just use the cursorloaders but on others like the contacts screen that has a search / filter option Apr 15 11:08:27 yes g00s Apr 15 11:08:43 i'm surprised someone as sophisticated as you hasn't dispensed with all that crap ;) Apr 15 11:08:52 lol i want to believe me Apr 15 11:09:02 the codebase at work is 95% java Apr 15 11:09:13 and i have only recently got the go ahead to start converting to scala Apr 15 11:09:31 became the team technical lead a week ago Apr 15 11:09:42 so if i had my way i would be using object dbs Apr 15 11:12:07 i dont like relational databases Apr 15 11:12:24 plus .. i am not sophisticated at all .. i am the dumbest developer i know Apr 15 11:12:26 :) Apr 15 11:13:08 arents object dbs just relational dbs with fancy wrappers :P Apr 15 11:13:54 what’s the best way to make a simple, repeating timer that can repeatedly call a method? Apr 15 11:14:05 can be turned on and off, too Apr 15 11:14:17 /quit Apr 15 11:14:31 ultra- Handler? Apr 15 11:14:37 is it? ok Apr 15 11:14:37 sendMessageDelayed or whatever Apr 15 11:14:49 plays nice with the UI? Apr 15 11:14:57 for under 1 minute, sure. once you get to around 5 minutes, then maybe alarm manager … maybe Apr 15 11:14:58 ultra- while your app is running, handler.postXXX functions, outside of app, see AlarmManager Apr 15 11:15:45 ok i’ll google them, thanks Apr 15 11:16:54 there is an app to check if openssl on handset is vulnerable to heartbleed Apr 15 11:17:31 i actually pulled it off already using a Timer, but that’s for a method that doesn’t update the UI… when i tried it for updating the UI, android didn’t like it Apr 15 11:17:51 thats because it uses another thread Apr 15 11:17:57 yeah Apr 15 11:32:18 i have a layout 3 deep, linearlayoutA > scrollview > linearlayoutB. when i click on linB, i want the event to be passed to linA. how can i do this? scrollview seems to eat the event Apr 15 11:33:32 osxorgate: ScrollView is suppose to eat it unless you customize it. Apr 15 11:38:26 so, this handler will update the UI once a second during the lifetime of the app… so i need AlarmManager for that or can i use a Timer? Apr 15 11:38:37 Anyone every managed to have a gap between ExpandableListView groups, but not children? Adding multiple ExpandableListView's is not really an option, as this messes up scrolling. I have some code that *almost* works, except that seemingly random gaps are added between children when there is enough children for them to fill up more than the available screensize, and you scroll through them. Code: http://pastebin.com/mhQnFd5z Apr 15 11:39:10 oh actually once every 150 MS, but i don’t think that matters much Apr 15 11:40:20 for something that fast, use a timer or handler, not alarmmanager Apr 15 11:40:43 150ms is kinda agressive Apr 15 11:44:35 Chainfire going to I/O ? Apr 15 11:44:52 i dont see any sessions listed on the website; i think they should do that before registration Apr 15 11:44:55 g00s if I can score a ticket, yeah Apr 15 11:52:31 g00s why, you know its going to be about new developments and an oppertunity to network a bit with peers Apr 15 11:53:38 I'd say that at the expensive it takes to go there, the _exact_ amount of sessions that are going to be interesting isn't that big a factor for deciding to go Apr 15 11:54:22 Chainfire i suppose. since the sessions are on youtube i guess they aren't really that important Apr 15 11:54:30 yeah Apr 15 11:54:38 for some reason i'd like to know what sessions i'd attend though Apr 15 11:54:40 you go there to talk to people having sessions not for sessions themselves :) Apr 15 11:54:50 you can't go to all of them anyway Apr 15 11:54:50 if nothing interested me, maybe i wouldn't go Apr 15 11:55:02 attending sessions is overrated Apr 15 11:55:02 yeah Apr 15 11:55:23 with all their PhD's Google is remarkably retarded in placing the right sessions in the right rooms with enough space for the interest Apr 15 11:55:39 unless you want to iPhone-release-queue the room, that is Apr 15 11:55:55 Chainfire, or... you know... making live wifi multiplayer demo in a room with 6000 people each having 3 wifi devices :P Apr 15 11:58:22 i guess one reason i'd like to go to I.O would be to get some insight into what google's future plans and vision was for android; but they never seem to divulge that Apr 15 11:58:34 they'll never tell you officialy Apr 15 11:58:42 but there's alot of stuff to know unofficialy :) Apr 15 11:59:11 basically the main reason to go is to actually talk to engineers of parts of Android (or other Google systems) that are giving you trouble or interest you Apr 15 11:59:26 Mavrik yeah, that would be useful indeed Apr 15 12:00:17 it would be awesome to take my laptop and pick an engineer's brain for say 20 minutes Apr 15 12:00:30 all those unanswered questions :) Apr 15 12:00:39 "should i really be doing it this way :)" Apr 15 12:00:51 and hope you're asking something they can actually answer Apr 15 12:00:52 mhm :) Apr 15 12:01:12 so no bugs, no feature requests, no future stuff Apr 15 12:01:33 heh, last year there was like 6 people asking Chet how to do listview animations :P Apr 15 12:02:05 didn't he eventually do a devbyte on that ? Apr 15 12:02:11 it's debatable whether or not that is the best use of Chet's time... :) Apr 15 12:02:16 but really, that stuff is not at all obvious to me from the docs Apr 15 12:02:39 g00s, they did the talk next day Apr 15 12:03:06 i'm also kind of surprised, in 2014, i still haven't seen any hardcore android "rich gui" book Apr 15 12:03:16 Chainfire, hmm, I dunno, the talk afterwards was pretty useful, most people really wouldn't think of the view observer trickery Apr 15 12:03:17 there are a few on custom things here and there, but nothing very serious Apr 15 12:15:46 hey guys, i have a php app, and i want to develop a simple android app to login and see the php page.. how can i do that? Is there any basic tutorial to handle that? Apr 15 12:30:12 hello, is there any email list about android develop Apr 15 12:37:54 Hi, How to get the CAPTCHA from WebView and show it to user? Apr 15 12:42:44 guys, please, i've made a login screen on MIT App inventor. How can i parse vars (post method) to a web component? Apr 15 12:52:02 hello, I am trying to use MediaRecorder to record from microphone... I am getting IllegalStateException on mediarecorder.play() Apr 15 12:52:04 any ideas why? Apr 15 13:04:00 Where can we see the logs of this channel? Apr 15 13:07:36 Not sure. Apr 15 13:22:31 Forgive my ignorance, but does the ProgressBar widget not have an "onProgressChangedListener", or anything of the like? Apr 15 13:29:28 any solutions? Apr 15 13:30:35 Talking to me? Apr 15 13:31:13 Anthaas: you generally tell the ProgressBar what progress it has, rather than the other way around Apr 15 13:33:50 frankdoyle: I understand that, but I was going to throw an event when the progress changes. Rather than having this code in one place it would have been good to have it in a logical place. Apr 15 13:33:56 I'll just whack it in a function. haha Apr 15 13:34:11 Thanks anyway Apr 15 13:38:00 guys, i have a problem... my app loads a webpage, but it won't get the height... Apr 15 13:51:06 Anthaas: SeekBar has an OnProgressChanged listener http://developer.android.com/reference/android/widget/SeekBar.OnSeekBarChangeListener.html Apr 15 13:52:49 I need some advice on how to do this: I'm given a map, I display all Strings in a list, The user clicks one string and I want to do something with the object. So far I have diplayed everything as a list and attached an onItemClickListener. Apr 15 13:53:02 Could you give the list item a hidden "string" which you then read in your click listener, and then you do a get(string) on your map. But this seems like a very ugly way to do it Apr 15 14:01:12 My pending intent doesn't seem to work on a notification on the galaxy nexus 4, it works on all other phones I tried it on. any idea why that could be? Apr 15 14:01:15 Eric_Loves_You: Thanks! Apr 15 14:01:50 Blonde moment - what is the Intent flag which says that the activity being launched becomes the only activity on the history stack Apr 15 14:10:38 I'm trying to run a native function in my Activity, that uses the network IO. I had been running this on the Main Thread, and had a target SDK low enough that the network on main thread error wasn't firing. Apr 15 14:11:04 Now I'm trying to upgrade the app, and run the native function through a custom AsyncTask. Apr 15 14:12:17 I have the native function a public member of the Activity, but I cannot seem to run it in the scope of the AsyncTask. Apr 15 14:12:54 Is there a standard way of passing in a pointer of the main activity to do this? Apr 15 14:14:21 Jonathan_Eyre: you could just put the native code in its own class and instantiate it in the network thread Apr 15 14:15:00 Jonathan_Eyre: and just avoid the whole issue Apr 15 14:15:20 Jonathan_Eyre: also network io should probably be done in a service, to be honest, otherwise rotating the device will break your connection Apr 15 14:16:46 hi Apr 15 14:17:20 what permission tells me when another app is lauched? Apr 15 14:17:25 i have this title of my feed Turismo na Tr\u00edplice Fronteira – Puerto Iguazu , but when i put it in my TextView i the – is showed, how i can solve this? Apr 15 14:18:36 can an app know when any other app is launched? which permission allows that? Apr 15 14:19:15 is there a broadcast event or something to listen for? Apr 15 14:21:34 mylord: perhaps this provides some help: http://developer.android.com/training/basics/intents/index.html Apr 15 14:22:57 Pro9: thx, but I think my need is broader: whenever any app A starts (such as any game), I want my app B to be able to listen for that even, without A doing anything special. Apr 15 14:23:53 closest i’ve found is getRunningTasks Apr 15 14:24:00 but that requires polling.. Apr 15 14:25:04 mylord: I havn't done much "app interaction", but perhaps someone else have an idea on how it can be done Apr 15 14:25:32 that looks shady tbh :) Apr 15 14:25:45 HeyzApp seems to do it, and it’s not shady Apr 15 14:26:04 I’m also looking to see how to draw over other games, like HeyzApp does Apr 15 14:26:43 *Heyzap* Apr 15 14:44:40 Is there a huge difference between iOS and android? I have quite a bit of experience with C and C++ but not obj-c Apr 15 14:45:14 jonc: HUGE Apr 15 14:49:25 completely different Apr 15 14:49:33 the only similarity is that they are mobile platforms Apr 15 14:50:46 gotcha Apr 15 14:50:56 from what I've seen obj-c is not nice Apr 15 14:51:13 it's not bad Apr 15 14:51:44 Obj-C is quite nice, IMO (I'd prefer it over C++), but I don't do iOS (or Apple at all) Apr 15 14:52:07 objc is weird-looking first but the API is great Apr 15 14:52:21 pretty much what p_l said Apr 15 14:52:29 the syntax is awkward, but the language itself is decent Apr 15 14:52:52 the lack of nulls is a pretty decent fix for null pointer crashes Apr 15 14:53:06 Java is hand-holding, obj-c is on a rail. You can only do so much in either, but in my limited experience obj-c does a whole lot more under the hood. Whether that is good or bad is up to the developer. Apr 15 14:53:41 "on a rail" sounds very much like handholding Apr 15 14:54:14 the big difference between iOS and Android is that iOS is essentially OSX with some libs changed, your apps behave like normal desktop applications. Android meanwhile is full of asynchronicity, components, independent activations etc. :) Apr 15 14:54:40 and actually supports (and depends on) variable screen sizes etc. Apr 15 14:54:45 jonc: try Qt. C++ for all your platforms Apr 15 14:55:34 i just wish obj-c had real namespaces :( Apr 15 14:55:40 NSfffuuuu Apr 15 14:55:49 Scorp1us: and probably "not fitting well on all your platforms" ;) Apr 15 14:55:52 I work on the movile team here as the sole Android dev. The iOS people complain about a lot of stuff. Apr 15 14:56:07 p_l: not in my experience. it does extremely well. Apr 15 14:56:16 p_l, there are however huge warts in Apple ObjC libs which you wouldn't expect coming from ANdroid Apr 15 14:56:23 like whole Bitmap processing API is C and awful Apr 15 14:56:24 Scorp1us, #android-dev is full of complainers, too Apr 15 14:56:45 Scorp1us, we used out all our energy complaining about Android Apr 15 14:56:51 now we just suffer in silence :P Apr 15 14:56:51 That's not to say there aren't rough corners, but they have have the same appraoch for over 10 years now. Apr 15 14:57:10 Scorp1us: Yes, but in my experience, "cross platform" leads people to the idea of "let's not adapt the UI to other platforms" -> crap Apr 15 14:57:18 The iOS, android and WinRT support is new, expect some gotchas Apr 15 14:57:38 p_l: that's not the tack that Qt takes Apr 15 14:57:52 I complain about android constantly as well. Apr 15 14:58:02 I complain less about Qt. Apr 15 14:58:09 Scorp1us: it's not an issue of the library itself, it's an issue of people using them Apr 15 14:58:30 http://pastie.org/9082359 how to make EditText’s layout_width fill entire space, but doens’t cover Button? Apr 15 14:58:39 take PhoneGap and the like, which led to a bunch of apps in Market that looked like poor clones of iOS... because they left UI and interaction unchanged Apr 15 14:58:43 iOS same some wicked cool apis that are missing from android though Apr 15 14:58:52 p_l: well, there in is an ideological problem. A toolkit won't help you if you have the wrong strategy Apr 15 14:59:21 and iOS users buy stuff Apr 15 14:59:23 heh Apr 15 14:59:44 Scorp1us: interestingly enough, I once nearly got out an app that had all business logic portable (mostly ISO C99), which would leave only the UI written for specific OS Apr 15 15:00:39 hmm Apr 15 15:00:44 what kind of app? Apr 15 15:00:54 most of the major apps work that way Apr 15 15:00:57 Mavrik: file transfer application Apr 15 15:01:01 Rovio's angry birds for example Apr 15 15:01:20 kamol: switch the edittext to left of button with width match_parent & button alignParentRight=true Apr 15 15:01:26 Mavrik: the C part would do all of the heavy lifting (crypto, network etc.) while the UI part would just integrate it with OS Apr 15 15:01:36 mhm Apr 15 15:01:49 C can get very tedious for some types of business logic tho Apr 15 15:02:11 C can get very dangerous for security related functions ;) Apr 15 15:02:17 HI Apr 15 15:02:24 how i can transforn – to "-" ? Apr 15 15:02:45 g00s: well, heartbleed could have affected us... though not too much :P Apr 15 15:03:03 (yes, we had openssl...) Apr 15 15:04:02 canvs2321-: awesome! tq! Apr 15 15:05:17 p_l check this out http://www.androidpolice.com/2014/04/11/new-app-bluebox-heartbleed-scanner-might-help-you-discover-openssl-vulnerabilities-on-your-device-but-its-just-guessing/ Apr 15 15:05:39 kamol: np, that do what you wanted? Apr 15 15:07:09 Yeah, we are doing a project here and it should be wrapping up in another month or 2 Apr 15 15:07:30 and they want to do it in iOS also (I am the sole android dev on this project), so they want me to learn iOS also Apr 15 15:07:45 you'll love it Apr 15 15:08:10 time isn't an issue (contract that has over a year left), but budget is, so they were unsure if they wanted to contract someone Apr 15 15:08:11 guys please solve my problem :( Apr 15 15:08:26 I do hate that I will have to use a mac though Apr 15 15:11:16 since it will essentially be cloning our android app over (with a slightly different UI), I think the time to learn + the saved time from understanding what is needed will be about equal Apr 15 15:11:28 jonc depends on what apis you'll need. could take a few months just to get core data down Apr 15 15:11:54 Nothing spectacular really Apr 15 15:11:56 well, few months maybe exaggeration, but Apr 15 15:12:00 Is is possible to import JakeWharton/ActionBarSherlock through gradle rather than copying in the source, and still extend a theme with Theme.Sherlock.*. I am having issues getting my project switched over from internal source to using the maven repo, and I'm not sure if I'm just wasting my time. Apr 15 15:12:24 a lot of the app is just data crunching. I'll use gps, bluetooth (prebuilt library that handles the connections already) Apr 15 15:12:36 yiati, easy, use the aar Apr 15 15:12:39 networking, and sqlite Apr 15 15:12:52 pfn: Yep I am using "compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'" Apr 15 15:12:52 look at AFNetworking Apr 15 15:13:02 yiati, then you're done Apr 15 15:13:27 jonc yeah, i actually prefer the c interface to sqlite over the android java shit Apr 15 15:13:39 I like Core Data Apr 15 15:13:58 once it's working properly, it takes the pain out of ORM Apr 15 15:14:13 pfn: I thought so too, but I am getting this whenever I try to build. "error: Error retrieving parent for item: No resource foudn that matches the given name 'Theme.Sherlock.Light.Dialog'" Apr 15 15:14:18 jonc bluetooth low energy, or something else ? Apr 15 15:14:28 g00s, yes BLE Apr 15 15:14:41 yeah, their bt stack actually works too Apr 15 15:14:44 pfn: which I wasn't getting with the actual source code moments ago Apr 15 15:14:49 * pfn shrugs Apr 15 15:14:51 haha yeah, androids is pretty shitty Apr 15 15:16:04 I'm not terribly worried about learning it. I've really only been doing android for about a year now Apr 15 15:16:25 its easier now with ARC Apr 15 15:17:02 hi Apr 15 15:17:20 Any recommendations on what free QR library is best to use? Apr 15 15:18:16 etsy's androidstaggeredgrid is so buggy omg Apr 15 15:18:29 g00s: fun fact: a Thinkpad x230 sounds like a turboprop plane once you disable fan speed governor Apr 15 15:18:33 so ARC is kind of like a mini garbage collector? Apr 15 15:18:36 Quacked: https://github.com/zxing/zxing Apr 15 15:18:47 smart pointers essentially? Apr 15 15:18:55 jonc: smart pointers are something different Apr 15 15:19:08 however, reference counting does "count" as GC, of sorts Apr 15 15:19:38 Reading some stuff that http://zbar.sourceforge.net/ is better than zxing Apr 15 15:20:00 smart pointers keep track of how many usages and remove when zero usages? Apr 15 15:20:30 so it's removed that part and moved it into a basic GC system? Apr 15 15:21:23 jonc: no, smart pointers is iirc using one of the abominations of C++ to attach extra behaviours, which *can* be used to implement automated reference counting (notice the acronym :>) Apr 15 15:22:55 You're right, it's meant to allow for things like reference counting but also allows other things Apr 15 15:26:33 jonc also, nicely, iOS has a few great books. Apr 15 15:26:52 kochran, sadun probably get you 90% there Apr 15 15:27:21 I was just going to use google and jump into the ios dev irc channel Apr 15 15:27:46 i like their docs, most available as pdf. Apr 15 15:27:54 iphonedev is good too Apr 15 15:28:36 I learn best by doing, so what I'll probably do is work on making a small app with some of the features we will need just to learn Apr 15 15:28:50 then start a new project and pull things in while cleaning it up Apr 15 15:29:04 I wonder if there's any momentum in doing haskell on ios Apr 15 15:29:43 that'd be interesting Apr 15 15:29:46 http://www.haskell.org/haskellwiki/IPhone Apr 15 15:29:47 hmm Apr 15 15:29:51 tempting Apr 15 15:30:09 there's a lot of interest in doing haskell on android Apr 15 15:30:22 from what i've read on #haskell and random github repos Apr 15 15:33:04 no good language bindings for either Apr 15 15:33:08 * pfn cross off the list for now Apr 15 15:33:48 in Android Studio, where is the best spot to make chnges to an Activity on Create? I am trying to setVisibility on some buttons when the app starts... not working Apr 15 15:34:08 IDE has nothing to do with it Apr 15 15:35:09 pfn: was that comment to me? Apr 15 15:35:10 jonc ask bankai_au what he thinks about reactive cocoa :) Apr 15 15:35:20 IrishGringo, yes Apr 15 15:36:32 yea.. the IDE has nothing to do with it, except that the template for Intents and Fragments is diff than Eclipse... so I thought there may be a specific class for startup? Apr 15 15:36:50 the answer is to write code Apr 15 15:36:52 not use templates Apr 15 15:36:58 can i use the layout inflater provided by omCeate() to inflate my other layouts or should it only be used for the activity parent ? Apr 15 15:37:14 If you're setting visibility at the app start why not set it in XML instead of in java? Apr 15 15:39:31 layout inflater isn't given by onCreate Apr 15 15:40:51 pfn i mean onCreateView() soz Apr 15 15:41:17 you can use it for anything Apr 15 15:41:26 ok cool Apr 15 15:41:50 thanks Apr 15 15:43:33 Ankhwatcher: Normally I would set that in the XML, but I have some situations that I want to set when the fragment displays Apr 15 15:44:06 Can I ask for help with android studio in here? Apr 15 15:44:14 how i can transforn – to "-" ? Apr 15 15:44:37 IrishGringo: well try in onViewCreated Apr 15 15:45:01 sdeinum: yes but we're not guaranteeing an answer Apr 15 15:45:21 hah no worries Apr 15 15:45:32 has anyone successfully changed the daemon's idle timeout setting? Apr 15 15:45:46 im confused as to why they only set it for 1 minute Apr 15 15:45:55 and the gradle.properties file doesn't seem to let me override it Apr 15 15:50:05 hey guys Apr 15 15:50:19 anybody using mit app inventor? Apr 15 15:51:26 i've added a webviewer, and i want to run the text2speech on it Apr 15 15:52:23 :/ Apr 15 15:53:02 t0th_-: check out Html.fromHtml(str); Apr 15 15:54:47 THANKS Apr 15 15:56:55 Any Retrofit users here? Curious what is the best way to send a String[] array in a request body to a web service from my android client. (http://stackoverflow.com/q/23087561/1747491) Apr 15 15:57:38 mattblang: in what request format? Apr 15 15:58:04 JSON, proto, form encoded, multipart? Apr 15 15:58:26 t0th_-, "–".substring(2).substring(0,end) to Char Apr 15 15:59:33 hmm, guess not Apr 15 16:00:00 oh, I guess that is right Apr 15 16:00:04 stupid windows Apr 15 16:00:08 scala> "–".drop(2).dropRight(1).toInt.toChar Apr 15 16:00:08 res0: Char = Apr 15 16:00:15 what? Apr 15 16:03:15 chicken butt Apr 15 16:03:40 how can i create something like this.... https://code.google.com/p/ebookdroid-fontpacks/downloads/list Apr 15 16:03:49 how can i create ebookdroid for example Apr 15 16:03:59 huh Apr 15 16:04:00 Please help... how can i build ebook self for students on android phones... actually, i'm the process but i need more light sir Apr 15 16:04:42 pfn??? Apr 15 16:05:32 JakeWharton hmm, I'm not sure exactly. The web service is defined in Spring as public void fooWebService(@RequestBody String[] ids). I think the default request type is GET. Apr 15 16:05:50 yes...with android language Apr 15 16:06:38 mattblang: the type of request you want to make will change the answer to the question Apr 15 16:06:46 so it's hard to answer without knowing more Apr 15 16:09:26 JakeWharton got it, sorry. application/json Apr 15 16:09:53 then just send a json list Apr 15 16:10:23 stupid question? Apr 15 16:12:42 answered Apr 15 16:13:37 JakeWharton pfn okay, so I was manually making a JSONArray type, and sending jsonArray.toString(). Let me try just sending the List and letting Retrofit do it Apr 15 16:13:54 yep. Retrofit does the work for you. Apr 15 16:14:01 org.json.* is a train wreck, steer clear! Apr 15 16:17:02 if anyone's using picasso: how would you set a placeholder image that is the same size as the image about to be loaded in? Apr 15 16:17:35 Mango_Man, The only way I could figure out to do it was to set the minWidth minHeight, maxWidth, maxHeight. Apr 15 16:18:29 Mango_Man, Strangely when you stick a bitmap that's the same dimensions as the image you're loading in ImageView as a placeholder, they aren't rendered the same dimensions. Apr 15 16:19:27 TheDracle: hmm, that's weird. i will try the min/max suggestion though, thanks! Apr 15 16:21:32 Mango_Man, I also did '.resize(800,600).centerCrop().into((ImageView)findViewById(R.id.userImage)); Apr 15 16:22:24 JakeWharton perfect! thanks a lot Apr 15 16:22:44 ooh, that sounds good - "normalizing" the image size before loading it in Apr 15 16:23:25 TheDracle: use butterknife for the ids! :) Apr 15 16:23:43 Mango_Man, I'll look it up :0 I've not programming for Android in like, 3 years :) Apr 15 16:23:59 Mango_Man, It's good to see there are some standard libraries being made around its ugliness. Apr 15 16:24:20 Ahem, programmed. Apr 15 16:26:51 shmooz: works, thanls Apr 15 16:26:53 thanks Apr 15 16:27:03 TheDracle on that note, using Retrofit with OrmLite has provided access to http web services, json deserialization, and persistance using only POJOs and a little setup. Pretty freakin sweet. Apr 15 16:27:56 I'll need to look at that.. How does it do JSON deserialization with POJOs? Apr 15 16:28:15 Do you have to provide like, a Java object that matches the fields in the JSON record? Apr 15 16:28:48 TheDracle yup. in my case all of my sql columns are named the same as well, so I use the same POJO for both. Apr 15 16:29:10 Hm, it would be cool if it could generate the class template somehow. Apr 15 16:29:23 TheDracle: It uses Gson Apr 15 16:29:44 there are webapps which will generate POJOs for you (though they're not hard to generate in an IDE) Apr 15 16:30:14 JakeWharton TheDracle yeah, just have to define the variables and with Android Studio you can Generate -> getters and setters Apr 15 16:30:32 Android Studio is also pretty sweet Apr 15 16:31:07 Yeah, I'm using Android Studio, major improvement on Eclipse. Apr 15 16:31:07 it is. built on the back of giants so it's hard to do wrong. Apr 15 16:32:45 So, I'm using Gson, but with Map Apr 15 16:33:04 And it's basically deserializing to primitives and strings. Apr 15 16:33:22 yawn Apr 15 16:33:27 Yeah, it sucks :p Apr 15 16:33:29 Lol. Apr 15 16:33:36 I'd like to dump it into an object. Apr 15 16:33:50 I suppose this is what OrmLite does? Apr 15 16:34:00 what Apr 15 16:34:11 don't use Map. Apr 15 16:34:18 just use intellij idea, it's a major improvement on android studio ;) Apr 15 16:34:20 Yeah.. The library I'm using does it. Apr 15 16:34:27 But I can change it to do something more sane. Apr 15 16:34:43 Zharf: they're the same exact thing Apr 15 16:35:02 JakeWharton, hardly, android studio's crap Apr 15 16:35:13 they are literally the same exact thing Apr 15 16:35:23 Zharf yeah, I'm gonna have to disagree with you there. Android Studio is built on the intelliJ community edition I believe Apr 15 16:35:26 they're like two snakes eating each other Apr 15 16:35:45 I know that, but android studio is still crap Apr 15 16:35:54 and so is your argument, unsurprising Apr 15 16:36:10 they're like an ouroboros Apr 15 16:36:13 google's crap has polluted intellij idea too though Apr 15 16:36:24 android support plugin is crashing every day Apr 15 16:36:40 so file bugs Apr 15 16:36:44 I do Apr 15 16:36:56 but google only produces crap, there's no way around it Apr 15 16:37:12 fix it yourself, it's open source Apr 15 16:37:15 idea was better in 12 series Apr 15 16:37:41 use vim Apr 15 16:37:46 I do! Apr 15 16:38:04 Amen JakeWharton Apr 15 16:38:15 i just joined. i wish i knew what the question to the `use vim` answer was Apr 15 16:38:36 birbeck, it's the answer to the question of life Apr 15 16:39:07 then what does 34 answer to if vim is "the answer" :-( Apr 15 16:40:05 JakeWharton, if there's a way to make android studio work with "old" style directory structures without it moving stuff around and messing everything up for git repos, then I *might* recommend it to someone who's only doing android dev, but from my limited exposure to it, I don't have an answer to that question Apr 15 16:40:19 the only other crap I see from it is the crap they bring into IDEA itself Apr 15 16:40:34 you have a problem with the directory structure? Apr 15 16:41:24 actually, i don't care. i'm going to work Apr 15 16:41:26 I don't want to use gradle, I don't want to change the way other IDEs in my working environments work Apr 15 16:42:09 I wouldn't use android studio anyway, but some other people tend to try it and keep asking me how to make it work with my projects Apr 15 16:42:18 it's just crap that it wants to change the entire project structure Apr 15 16:42:37 I don't think I've ever found an IDE that doesn't have some opinion on directory structure. Apr 15 16:42:47 Or at least, have some intrinsic build system internal to it. Apr 15 16:43:04 TheDracle, I haven't seen one before that enforced one on me Apr 15 16:43:04 Eclipse is a beast when it comes to slicing apart directories, and having secret requirements on where directories need to be located. Apr 15 16:43:25 What are you using which isn't enforcing some kind of directory structure? Apr 15 16:43:27 I can configure all that as I like in IDEA Apr 15 16:44:04 importing into android studio moves stuff around a *lot* Apr 15 16:44:11 which is just retarded Apr 15 16:44:28 Yeah, maybe IDEA is pretty good at letting you be flexible with that. Apr 15 16:44:38 It's the gradle build stuff that causes it. Apr 15 16:44:58 It sort of has implicit paths for where everything has to go. Not a big issue if you're starting the project from scratch. Apr 15 16:45:02 I don't see why it's forcing gradle crap on people Apr 15 16:45:07 But, I can see it sucking. Apr 15 16:45:15 sure, but I'm not starting projects from scratch Apr 15 16:45:27 Well, just because they need to choose something for building. And choosing convention over configuration is a design pattern afterall. Apr 15 16:45:37 and gradle's really too much effort for the "gain", maven is much nicer ;) Apr 15 16:45:47 I'd prefer a convention. The issue is it's a new convention, and the old lack of convention conflicts with it. Apr 15 16:46:11 Zharf TheDracle I very much prefer conventions Apr 15 16:46:16 I've found it to be way nicer than what I was used to using before. Admittedly maven is great for dependencies. Apr 15 16:46:23 the thing is, IDEA is perfectly capable of handling it Apr 15 16:46:37 but they stripped it apart and mutilated it to be unable to do it Apr 15 16:46:57 it's limited, it's crap Apr 15 16:47:02 I think they're just trying to provide a conventional environment. It's not necessarily a bad thing. Apr 15 16:47:10 It keeps people's fingers out of the wrong part of the cookie jar. Apr 15 16:47:21 This is a major part of the success of frameworks like ruby on rails. Apr 15 16:47:22 like what Apr 15 16:47:42 ruby is crap even if it's on rails or not ;) Apr 15 16:47:46 Like, changing your directory structure and build system entirely, and then when you try to work with other third party projects, it's totally different and you have to relearn everything from scratch. Apr 15 16:47:53 Oookay.. Apr 15 16:48:01 You're clearly more opinion than substance. Apr 15 16:48:06 I was talking about keeping fingers out of something Apr 15 16:48:21 why does it matter what people touch or not touch? Apr 15 16:48:36 If you've ever had to maintain a majorly large project in the field- you'd know. Apr 15 16:48:54 You have to figure out a subset of things to support, and make things you don't support possible, but difficult. Apr 15 16:48:58 * jasta grabs the popcorn Apr 15 16:49:08 please do tell me Apr 15 16:49:35 As in, if you have users that can go down non-predetermined paths, the number of possible issues you have to support quickly goes out of control. Apr 15 16:49:47 If you try to control the paths, and make a simple true path, it becomes much simpler, and easier to support. Apr 15 16:49:53 all these issues were already supported! Apr 15 16:49:59 Nothing is stopping you from downloading, and using IntelliJ. Apr 15 16:50:18 I don't see Google/Android supporting much of any opinion for how things are developed. Apr 15 16:50:25 Zharf: what is your specific concern? perhaps i can help Apr 15 16:50:27 It was a collection of lose documentation, mostly around Eclipse. Apr 15 16:50:33 And to be honest, a total mess. Apr 15 16:50:40 I am, I even pay for it just because it's so good, I'm arguing against android studio because I don't see why anyone anywhere would ever want to use it Apr 15 16:51:08 Zharf: I gave it a whirl myself for a while and switched back to IntelliJ simply because I couldn't notice anything at all it did better for me. Apr 15 16:51:18 This is a major step in the right direction in at least providing a basic platform so that everyone is working within the same set of issues. Apr 15 16:51:22 Hi! Don't know if I'm asking this at the right place but: I'm about to start developing a new app, and in this app I want to save data with SQLite. Recently I took a course in databases at my university, and I remember him saying that a primary key should never be chosen as an auto incremented integer. However, in all tutorials regarding Android and SQLite, all objects has such a primary key. Why? Apr 15 16:51:44 TheDracle, well google certainly is good at producing issues Apr 15 16:51:46 *him being the teacher of the course Apr 15 16:52:01 sjrp: Your memory is hardly a technical justification. Auto increment primary keys are very efficient in SQLite and a convenient practice. Apr 15 16:52:54 Zharf, Also, producing loads of free source code, and IP, that burgeons startups and makes things possible that would have been impossible on a limited budget possible. Apr 15 16:52:59 It comes with a lot of trade off, admittedly. Apr 15 16:53:13 what's "burgeon" Apr 15 16:53:16 jasta: In this course, he said that a key for an object should (if possible) consist of data that acually has to do with the object, instead of some random number. Like for example if you want to store a person, his/her social security number would be an appropriate key. Apr 15 16:53:19 I'm using gclient/svn, and the monstrosity of the google build system on a regular basis. Apr 15 16:53:21 My guess is that your professor was overstating a rule, or you simply misunderstood/misremembered it. i can think of no reason why auto increment primary keys is a bad design in sqlite. Apr 15 16:53:38 sjrp: that is the stupidest thing i've ever heard. Apr 15 16:53:57 (...regarding identifiers for relational database rows in an abstract sense) Apr 15 16:54:02 * Zharf checked dictionary Apr 15 16:54:05 I hear Google has a wonderful tool with which you could look that up. Apr 15 16:54:38 sjrp: depending on external identifiers is a great way to create limitations and bias in your data that will require painful refactoring of schema and code to extend later. Apr 15 16:54:41 terrible, terrible idea. Apr 15 16:54:47 google *had* wonderful tools almost 10 years ago, they don't anymore Apr 15 16:55:23 it's all just pieces of crap that we have to live with because their status is too big for anyone to handle Apr 15 16:57:06 jasta: okay. I'll just stick to auto incremented integers for all objects then. But it's rather strange since we didn't do this even once during the entire course. In some lab, for example, we were to model a scheduling system for lectures in a school. Then a Room was identified by its name (since the room names were unique), and not an integer id Apr 15 16:57:42 jasta: note that we were not using SQLite, but Oracles SQL. Apr 15 16:58:39 jasta: to sum it up the teacher said that if you're able to find a "natural key" for an object that's always going to be unique, use that instead of just assigning random integers Apr 15 16:58:56 jasta: the course litterature said the same thing Apr 15 16:59:05 sjrp: doesn't matter what technology you're using, coupling your unique keys to externally defined data is a very bad idea. Apr 15 16:59:19 what if, for instance, you wanted to internationalize this system that used US social security # as the primary key? what a freaking nightmare. Apr 15 17:00:10 btw, using random to mean an opaque number is terribly misleading. please stop doing that. Apr 15 17:00:36 huh? rarely is having an autoincrement id a bad idea for a key Apr 15 17:00:42 it only fails in clustered systems Apr 15 17:01:00 at worst, it's redundant with another unique piece of data Apr 15 17:01:24 maybe "key" as in a restful identifier Apr 15 17:01:48 ping Chainfire if you have a sec? Apr 15 17:01:49 jasta: I see how that could get really bad. The teacher mentioned that in the current industry almost all dbs use auto incremented ids for their objects but that HE thought that natural keys was better. I see now that this was REALLY his personal opinion and not the opinion of the masses ;) Apr 15 17:02:26 natural key is "better" for restful queries with urls and shit, but aside from that Apr 15 17:02:26 no Apr 15 17:03:19 anyway, as a good example of a natural key that's bad, email addresses Apr 15 17:03:31 what are you gonna do when they change their email address; painful updates Apr 15 17:04:39 Ok. Thank you guys for your help. Sorry if my question came out wrong or weird or offending, but using natural keys was what I and 120 other persons learned during this 7 week course. I had a feeling that the teacher tried to learn us stuff that wasn't really standard, but his own way of doing things. Apr 15 17:05:02 And you just confirmed it ;) Apr 15 17:08:04 It's all about UUIDs now Apr 15 17:20:58 i have a bar-like view with two image buttons on each side and then one centered text button in the middle. I want that TextView to stay centered, sizeToFit so that the touch area doesn't extend off beyond the text, and also ensure that it doesn't overlap the image buttons on the side (so give it a dynamic max width). Is there a good way to do this in XML? https://gist.github.com/scelis/ff68c783794ba6fbfc62 Apr 15 17:21:36 Has anyone here used the facebook API and can tell me why my location is not shared in newStatusUpdateRequest(Session, String, GraphPlace, List, Callback)? this is how the GraphPlace looks in my debugger: https://www.dropbox.com/s/1lyp2l41v58om3w/geoLocationsharing.png Apr 15 17:21:44 everything else is shared Apr 15 17:40:38 TheDracle, using uuid is expensive, storage and bandwidth Apr 15 17:40:46 and painful from a typing perspectiver Apr 15 17:40:57 it's really good if you're in a high volume clustered environment Apr 15 17:49:13 hey guys; i'm using eclipse to develop my android app, and i chose the holo.light theme Apr 15 17:49:27 but for some reason, my actionbar stays dark, which looks terrible with my app icon. any ideas how i could fix this? Apr 15 17:49:49 when i look at styles.xml, my appbasetheme is theme.appcompat.light Apr 15 17:51:53 JakeWharton: there are _tickets_ for your talk, dude Apr 15 17:52:06 granted they're free, but... Apr 15 18:00:51 hi Apr 15 18:02:00 I have a simple hello world app, consisting of an XML based layout, and a main class that sets the layout in onCreate() Apr 15 18:02:39 that is right out of "android create project" Apr 15 18:03:17 and I get an unexpected close Apr 15 18:05:11 pastebin your code Apr 15 18:07:11 Hi! I have a layout with an image on the left, and a scrollview on the right Apr 15 18:07:29 I want the scroll view to scroll if people scroll on thne image on the left, which is actually outside the scroll view Apr 15 18:07:41 is there any way to make the image send the "touch" events that it doesn't handle to the scroll view? Apr 15 18:07:55 (Note: the image itself responds to an onclick/ontouch event) Apr 15 18:18:33 wtf is the IO registration link Apr 15 18:18:39 help page talks all about it, but no link Apr 15 18:20:48 oh, opens at 4pm Apr 15 18:20:52 I thought it opened at 5am Apr 15 18:22:05 Cursor cursor = db.query(true, "plaque", new String[]{"_id"}, "_id = ?", new String[]{plaque.getId()}, null,null,null,null); Apr 15 18:22:17 What is wrong with this? Im getting java.lang.IllegalArgumentException: the bind value at index 1 is null Apr 15 18:23:35 plaque.getId() returns null Apr 15 18:24:52 pfn, what if you try String.valueOf(...) Apr 15 18:25:01 inside the string array Apr 15 18:25:10 makes no difference Apr 15 18:25:15 well, you'd get "null" as a string perhaps Apr 15 18:25:19 but likely what you don't want anyway Apr 15 18:25:33 layout/main.xml: http://paste.debian.net/93919/ Apr 15 18:25:48 GyrosGeier, read logcat, fix Apr 15 18:25:51 main source: http://paste.debian.net/93920/ Apr 15 18:25:54 read logcat Apr 15 18:25:55 fix Apr 15 18:26:08 okay Apr 15 18:30:02 oh wow pfn yeah Apr 15 18:30:09 completely overlooked that lol Apr 15 18:30:09 thanks Apr 15 18:31:46 how do I get a linear layout's width? I'm in an oncreate in an activity that it is used in Apr 15 18:32:31 its after setContentView(R.layout.activity_detail); Apr 15 18:34:31 What is the generally accepted way of making a list of fragments? Apr 15 18:34:40 (or any kind of "detailed" list) Apr 15 18:35:50 A list view Apr 15 18:35:55 ListView Apr 15 18:36:32 Scorp1us: Thanks, will check out the docs. Apr 15 18:40:12 its what it is designed to do. Apr 15 18:58:23 hmm Apr 15 18:58:30 it says that my icon is corrupt Apr 15 18:58:59 but the icon is even shown Apr 15 19:01:56 ah Apr 15 19:02:01 that's not the root cause Apr 15 19:02:02 W/ResourceType( 2135): Bad XML block: header size 18254 or total size 169478669 is larger than data size 647 Apr 15 19:02:08 that one smells fishy Apr 15 19:14:46 How to get a drawable from ImageReader? Apr 15 19:16:57 Hi all. if I call notifyDataSetChanged() in my ArrayAdapter, in what method in my list fragment do I refresh the array list ... ? Apr 15 19:24:13 I can't see where one is supposed to update the array that a list is using Apr 15 19:33:20 The backing array is updated when you insert or delete an item from the list Apr 15 19:36:22 when one of the list items is updated I need to change the entire array. where do you think would be the best place to do that? Apr 15 19:38:26 Sugarat: I'm not sure I understand the question Apr 15 19:39:26 arrayadapter is the stupidest creation ever Apr 15 19:39:33 that should have never gone into framework Apr 15 19:39:46 it only supports the most trivial of use-cases Apr 15 19:40:20 I've got a list of folders in the filesystem. I'm trying to make it so when I click on one of these folders, my entire list is changed, as the list should then show the subfolders. The problem I have is that I'm not clear on how to update the list contents. I've got a clickListener, but how does that signal up to my fragment that it needs to update the array that the list uses ? Apr 15 19:40:22 its one of those pieces of code you replace 12 seconds after you write it :P Apr 15 19:40:22 Hey guys. Im developing an app that have a "filter button" that dynamically adds a new view to the current linear layout at index 0. The problem is that the layout gets messed up trying to fit the screen when I add the new filters view. There is a way to enable the scroll instead of trying to fit the screen ? Apr 15 19:40:58 Sugarat: that's what notifyDataSetChanged is for Apr 15 19:41:36 Birk: wrap it in a ScrollView? Apr 15 19:42:23 notbryant: I get that it's meant for that, but I don't get where I should now update my array. the array is made in the fragment,not the adapter where the click listener is created Apr 15 19:42:48 how do I get the click listener to signal to the fragment that it needs to recreate the array ? Apr 15 19:42:51 notbryant: Ill try. Do you think I can add the ScrollView in the xml as a parent of the linearlayout and enable it just when I add the new view? Apr 15 19:43:56 Sugarat: so the click listener is not inside of the fragment, then? Apr 15 19:44:05 I have a PreferenceScreen in a PreferenceScreen and I'm trying to update the summary of a ListPreference in the sub-PreferenceScreen, but the OnPreferenceChangeListener I have set isn't getting the changes from the sub-PreferenceScreen. How do I listen for those changes? Apr 15 19:44:44 no, the click listener is currently defined within the adapter Apr 15 19:44:51 how can i have two layouts swap with an animation of sliding off the screen and new one on ? Apr 15 19:45:07 like the one replaces the currently inflated one Apr 15 19:45:17 wait....why would you put the click listener in the adapter? Apr 15 19:46:07 Birk: I doubt it. The whole point of a ScrollView is that it scrolls if it needs to. If everything fits on the screen, there is no need to disable it, and if stuff doesn't fit, you're gonna have a bad time Apr 15 19:46:15 notbryant: many examples have shown me to do that. Is it better to put it into the fragment? Apr 15 19:46:18 I'm using a custom adapter Apr 15 19:46:40 Sugarat, can u show me one of these examples ? Apr 15 19:46:59 Blitzed: not right now I'm afraid.. I lost track of them Apr 15 19:47:17 Sugarat: I dunno, it could be ok, just seems kind of weird. And, if it is inside the adapter, why can't you just call like tell it to update itself? Apr 15 19:47:27 I'm struggling with the idea that if I put the listener in the fragment, how is it attached to each row in the list? Apr 15 19:47:37 they instructed that the listener be defined inside the adapter ? Apr 15 19:47:59 ohhhh, ok Apr 15 19:48:02 yeah, so that each row gets a listener Apr 15 19:48:08 so it's a listener on an item inside of a row Apr 15 19:48:28 you can just find the view outside after uv set the adapter tho Apr 15 19:48:31 when I have done this in the past, I use one adapter and do some hocus pocus to assign each one to it Apr 15 19:48:41 not sure if that is the correct way to do it Apr 15 19:48:54 <-im Apr 15 19:49:01 dont ask me Apr 15 19:49:27 notbryant: the hocus locus part is what I need I suspect!! Apr 15 19:49:33 i meant assign the listener to the listview Apr 15 19:49:35 Sugarat: the only other thing I could think of would be, when the adapter is created, I assume you are passing in an instance of the fragment/activity Apr 15 19:49:42 yup Apr 15 19:49:56 so then you could do myFragment.updateList() Apr 15 19:50:00 or what have you Apr 15 19:50:02 I need that click listener to send a signal up to the fragment Apr 15 19:50:06 hmm Apr 15 19:50:09 use a callback Apr 15 19:50:32 that's all I would know how to do it Apr 15 19:50:52 Sugarat: or, if you wanted to do it in the way that I was describing, define the listener inside the fragment Apr 15 19:51:07 in the adapter getView, I see that uses a ViewGroup called parent. That's the fragment> Apr 15 19:51:08 ? Apr 15 19:51:15 then assign each one to it using setOnClickListener(myFragment.getClickListener()) Apr 15 19:52:01 I do not think so....I don't think that Fragment extends ViewGroup Apr 15 19:52:04 is the adapter not for a list view ? Apr 15 19:52:07 but you already have a reference to your fragment, right? Apr 15 19:52:57 I'm defining the click listener inside the getView method of the adapter. getView takes: int position, final View convertView, ViewGroup parent Apr 15 19:53:36 right... Apr 15 19:54:15 so lets say there's a method updateList() in the fragment, how do I call that from this click listener definition in the getView method of the adapter..? Apr 15 19:54:32 Sugarat, so you adapter implements onClickListener? Apr 15 19:55:12 Sugarat: when the adapter is created, store the Fragment variable as class variable, i.e. 'myFragment' Apr 15 19:55:25 then, inside getView, call myFragment.updateList() Apr 15 19:55:30 http://pastebin.com/YMzfmz0i Apr 15 19:56:36 sorry, I'm not clear.. the adapter is created with: FolderAdapter adapter = new FolderAdapter(this.getActivity(), R.layout.listview_item_row, folders.toArray(new Folder[0])); Apr 15 19:56:54 the first parameter is the fragment then I'm guessing Apr 15 19:57:05 Why can't I find any documentation on ArrayAdapter::getView(int position, View convertView, ViewGroup parent) Apr 15 19:57:11 no its the Activity Apr 15 19:57:22 ah I see. FolderAdapter does store the context in it's own local variable Apr 15 19:57:28 this = fragment , this.getActivity() = activity Apr 15 19:57:32 hold on Apr 15 19:57:57 The docs for that function are just.. empty.. https://developer.android.com/reference/android/widget/ArrayAdapter.html#getView%28int,%20android.view.View,%20android.view.ViewGroup%29 Apr 15 19:58:06 Sugarat: http://pastebin.com/MxYqSKrt Apr 15 19:59:38 that's about as clear as I can make the way I would solve it... Apr 15 20:00:05 and I'm not an expert Java programmer so I don't know if that's a good way to actually do it Apr 15 20:00:11 notbryant: I've just got to have my dinner then I'll study that. Thanks a lot for your help. I'll be back in a short while. Cheers Apr 15 20:00:18 Sugarat: np Apr 15 20:00:34 Angelo, it's defined in the Adapter interface Apr 15 20:00:55 SimonVT: Is that why it's not displayed on the ArrayAdapter docs? Apr 15 20:01:26 Ah.. so it's here. https://developer.android.com/reference/android/widget/Adapter.html#getView%28int,%20android.view.View,%20android.view.ViewGroup%29 Apr 15 20:13:24 Does anyone know if its possible to create something like plugins for apps? (e.g. plugins that can be downloaded from a certain URL and loaded/used within the app)? Apr 15 20:14:22 Anyone here able to help me with LocationListener? I have an app I have developed where LocationListener will stop reporting GPS points. Apr 15 20:14:45 It will stop and start. Apr 15 20:14:56 electronica: That's normal and expected. Apr 15 20:15:09 Why is that? Apr 15 20:15:32 electronica: Because acquiring a GPS fix takes a lot of battery and there's a lot of environmental factors that can interfere with GPS signal. Apr 15 20:18:31 There is a way to put a view on top of another one and push the bottom one to the bottom of the screen without trying to rearrange the layout? (just a part of the view visible) Apr 15 20:18:36 Is there anything logging I can do to give me an idea why I'm not getting any points? Apr 15 20:18:42 notbryant: I'm passing in the fragment now, but the IDE says it cannot resolve the method (i.e.: callingFragment.method() ) Apr 15 20:19:05 I mean, I'll get points fine for 20 minutes. It will stop for 3 minutes, and then pick back up. Apr 15 20:19:09 in the adapter constructor I pass in the Fragment and save it locally in the adapter Apr 15 20:20:40 Been trying to solve this for a little while now. Basically trying to mimic the scaling handle in photoshop. http://stackoverflow.com/questions/23092178/how-to-scale-a-view-in-android-using-a-handle Apr 15 20:27:56 hm Apr 15 20:27:57 Sugarat: ohh, ok hold on Apr 15 20:28:44 in an AccountAuthenticator, is there a difference between "add account" and "configure"? Apr 15 20:30:05 or is "add account" just a creation, followed by "configure"? Apr 15 20:33:22 notbryant: okie dokie Apr 15 20:35:34 will LayoutParams.screenBrightness = 0; turn off the screen completely or just dim it? Apr 15 20:36:53 Sugarat: I assume you are extending Fragment? Apr 15 20:37:09 ListFragment Apr 15 20:37:55 notbryant: that is to say, my PickerFragment class extends ListFragment, yeah Apr 15 20:39:35 hi Apr 15 20:39:54 how i can make a screencast like a demo with my app? Apr 15 20:40:02 i need record my app to put the video in youtube Apr 15 20:40:42 adb screenrecord Apr 15 20:40:48 max 30 secs Apr 15 20:42:58 thanks Apr 15 20:51:27 arghh why doesn't this IDE see the calling fragments method Apr 15 20:51:30 this is stoopid Apr 15 20:52:24 whoopsie.. would help if it wasn't private :-) Apr 15 20:52:40 notbryant: all sorted, thanks :) Apr 15 20:52:51 Sugarat: np Apr 15 20:53:57 I am trying to switch over an internal project to build with a maven import. I have removed the local import from my settings.gradle, I have removed the local import line from my root build.gradle, and have added in the gralde maven import "compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.1'". It seems to be building fine now, but everytime I re-build the project the local folder keeps getting recreated with nothing but a Apr 15 20:53:57 n iml file in ti Apr 15 20:59:37 I am now able to call a method in my ListFragment to update the array list in that fragment. it then calls notifyDataSetChanged, but the list does not get updated Apr 15 20:59:50 nothing changes Apr 15 21:04:23 So, I'm wondering why they decided to go the OpenSL route with the AppRTCDemo. Apr 15 21:04:43 It seems like, it records at 16Khz, and causes the echo cancelation stuff to go a bit nutty. Apr 15 21:05:11 And the OpenSL module seems to be only partially implemented. I'm looking at integrating a bluetooth speaker/microphone. Apr 15 21:05:33 If it's just for performance reasons, I imagine I could find a more efficient data path to the JNI based microphone stuff- and use it instead. Apr 15 21:06:24 I'm trying to disable opensl in the current trunk, but the resulting library crashes. Apr 15 21:10:10 so if I call notifyDataSetChanged on my custom adapter, the list should magically update itself.. ? Apr 15 21:10:14 it's not. ugh Apr 15 21:30:02 ehm, hello (again) guys Apr 15 21:30:05 23:03:02 < Klapo> one simple question, does logcat contain any personal / sensitive data? or it's clean, and we can post them to anybody? Apr 15 21:30:47 If an app logs personal/sensitive data, then it would contain just that Apr 15 21:39:44 Hi. If not using eclipse or android studio for android dev, how would I go about developing an android app. Say I don't have an IDE. (I'm just curious) Apr 15 21:40:30 With notepad and a command line build tool Apr 15 21:41:00 SimonVT, any tutorial on that? Apr 15 21:41:23 Gradle would be the obvious choice, http://tools.android.com/tech-docs/new-build-system/user-guide Apr 15 21:41:51 Thanks. Apr 15 21:42:43 It's really just for curiosity. I did close to none android development. I just got curious how things are like if you don't use that whole set of features in the eclipse plugin. Apr 15 21:47:54 You do it with gradle or maven. I really like maven. Apr 15 21:48:16 SimonVT: hmm, can I restrict it to system applications only? like camera.apk etc.. Apr 15 21:50:41 freeone3000, Sure. Apr 15 21:50:42 But those tools will at some point use something else. Apr 15 21:50:42 put some files in some folders, etc, etc... I was looking for that part. Apr 15 21:55:02 I have a PreferenceScreen in a PreferenceScreen and I'm trying to update the summary of a ListPreference in the sub-PreferenceScreen, but the OnPreferenceChangeListener I have set isn't getting the changes from the sub-PreferenceScreen. How do I listen for those changes? Apr 15 22:07:13 JakeWharton wow. so I transitioned over to Retrofit. I started noticing the issue some people have noted about POST requests causing an EOF error only on the first try on pre 4.4. I decided to .setClient to OKClient. The search request I was doing is over 50 percent faster. I put the current build on a Nexus, up to another Nexus with the old build. The difference is approx 2 sec vs 5 sec respectivly! That is nuts. How is that? Apr 15 22:09:37 OkHttp is just a better client Apr 15 22:11:18 especially if you're on a more recent version. there's some really efficient buffering mechanisms internally Apr 15 22:14:03 JakeWharton that is freakin awesome. I'm so glad I ran into that issue with the Android HTTPClient through Retrofit now, since it caused me to switch to OK. I had previously been using DefaultHttpClient from apache. I do remember noting in the past that the same request seemed so much faster on iOS, but I never investigated. Apr 15 22:22:51 hi guys there is anyone? Apr 15 22:24:16 What is a good place to learn android dev? But I was looking for someone better than the android tutorials that you find reading the android docs... Apr 15 22:24:51 Better in the sense of being more complete, and detailed. I'm not so interested in get an app working in the first 10min of learning. Apr 15 22:29:17 phao, i don't know if videos are your thing but i found a guy on youtube very helpful with a lot of topics. he usually gives a technical explanation followed by a programming one. https://www.youtube.com/user/slidenerd Apr 15 22:29:43 thanks. Apr 15 22:29:56 I'll look into it. Apr 15 22:30:04 phao: maybe lynda.com but it costs money Apr 15 22:30:57 Ok. Apr 15 22:31:04 Are lynda.com stuff good? Apr 15 22:31:45 I've tried one of their 3d studio max tuts it was great Apr 15 22:32:23 way back when Apr 15 22:36:20 I can't create a new device with AVD Apr 15 22:36:27 clicking OK does nothing Apr 15 22:36:40 I read about this bug in stack overflow Apr 15 22:36:43 but couldn't solve it Apr 15 23:07:22 If I'm using AutoValue for my POJOs, is there way to point Gson to the factory methods to create the POJO's, other than registering a TypeAdapter for each class? Apr 15 23:09:01 Hello, I would like to record audio in a format and encoder that can be used in both Android and iOS and has a small file size. Any suggestions? Apr 15 23:09:19 nebby: MP3 Apr 15 23:09:36 *maybe* AAC Apr 15 23:09:48 all the rest will drop compatibility with something Apr 15 23:11:20 Do you know for examplw what what's app uses? Apr 15 23:16:50 nebby, probably some kind of voice codec Apr 15 23:20:06 nebby, http://developer.android.com/guide/appendix/media-formats.html and http://goo.gl/P5blvU Apr 15 23:22:01 nebby: if you're looking at that level, you can probably bring custom codecs anyway Apr 15 23:22:40 I guess that would be best Apr 15 23:23:19 For now though, I'll just create the android prototype using an inbuilt Android codec, so just wondering out of those which is ideal for low file size/ Apr 15 23:24:30 aac tends to be better quality at lower bitrates, nebby. depends what kind of audio you're looking to record though, music or voice Apr 15 23:24:55 voice Apr 15 23:25:53 then there's codecs like speex, but they're not supported by default Apr 15 23:30:31 okay, cool, but until I use a custom one, you recommend aac? Apr 15 23:30:58 yeah, that'll work on both iOS and Android Apr 15 23:31:45 okay. AAC LC seems to be the only one that comes up Apr 15 23:32:06 sorry AAC_ADTS Apr 15 23:32:16 in eclipse Apr 15 23:37:23 does the container format matter? AAC_ADTS MPEG_4? etc Apr 16 00:01:29 nebby, AAC_ADTS is Android 4.1+ Apr 16 00:12:41 wow, just got a segfault in logcat Apr 16 00:12:45 you don't see that everyday Apr 16 00:12:46 Ok, why would an async task get past a constructor and then hang. Never gets to doInBackground Apr 16 00:13:10 caused by what, Mango_Man ? Apr 16 00:13:22 Niblek: maybe your log filters are off? Apr 16 00:13:36 Niblek: assuming you're looking at asynctask logs Apr 16 00:14:10 leslie: E/Corkscrew﹕ unrecognized DW_CFA_* instruction: 0x10 Apr 16 00:14:16 whatever that means Apr 16 00:14:30 Niblek: did you execute? Apr 16 00:14:38 ah, genymotion, Mango_Man ? Apr 16 00:14:41 yes Apr 16 00:14:47 leslie: yep Apr 16 00:14:57 Niblek: can you show some code? Apr 16 00:15:06 The log is working, since I can see the output from the constructor Apr 16 00:15:18 sure, sec. Apr 16 00:19:38 I can't create a new device with AVD Apr 16 00:19:44 clicking OK does nothing Apr 16 00:19:49 I read about this bug in stack overflow Apr 16 00:20:00 but couldn't solve it Apr 16 00:20:12 ajoul: use genymotion Apr 16 00:20:26 It didn't paste well into pastie, my tabs are all messed up. gimme a min Apr 16 00:25:19 It's still not pretty, but: http://pastie.org/9083477 Apr 16 00:26:27 calling with String MyResult = new GetPage("http://www.google.com", httpclient).get(); Apr 16 00:27:08 Niblek don't call get Apr 16 00:27:11 call execute Apr 16 00:27:36 Ahh crap, I can't believe I didn't catch that one >_< Apr 16 00:27:51 I thought I was doing .execute().get() >_< Apr 16 00:27:59 don't call get at all Apr 16 00:29:23 I don't have a callback in place yet to get the result Apr 16 00:29:36 that's why I'm using .get (until I know it's working) Apr 16 00:33:40 yep, that was it. It's returning the html. Although not correctly Apr 16 00:34:46 My convertStreamToString logs the correct html line by line, but when it returns the entire page as a string it's truncated. Apr 16 00:42:55 How can I get android's tts to distinguish between lives as in "he lives" and lives as in "he has 9 lives"? Apr 16 00:45:58 hm, i'm trying to make a enum called Units, but can't come up with any decent naming convention for its constants. Like evaporation rate can be lb/ft^2/hr … wth to call that :| Apr 16 00:48:33 EnglishEvaporationUnits??? Apr 16 00:49:11 making a conversion app, g00s ? Apr 16 00:49:36 no, just metadata for a xively feed; they have Unit / Unit name / Unit symbol Apr 16 00:50:18 could just change / to Per, ^2 to Squared Apr 16 00:50:18 ahh, right Apr 16 00:56:40 darn, so you can't use retained fragments and onsaveinstancestate at the same time Apr 16 01:01:01 Mango_Man really? seems weird. if the enclosing activity dies i would think you would need it Apr 16 01:03:33 When using MediaRecorder, do I have to use External Storage, or will internal be fine? Apr 16 01:04:15 I'm using Environment.getExternalStorageDirectory().getAbsolutePath() to get the external path, how would I get the internal path? Apr 16 01:05:00 g00s: nvm, the issue was something else entirely Apr 16 01:06:35 if i save a fragment's position in onSaveInstanceState, swap that fragment out for another fragment, and later swap the original fragment back in and restore the original fragment's, why is it that the position resets to 0? Apr 16 01:07:05 *the original fragment's state Apr 16 01:08:33 strangely, onSaveInstanceState works on rotation, but not when the fragment is swapped out and swapped back in later Apr 16 01:11:52 Mango_Man onSiS isn't really a hook for use like that afaik Apr 16 01:27:14 I'm using Environment.getExternalStorageDirectory().getAbsolutePath() to get the external path, what is the equivalent for the internal path? Apr 16 01:29:00 nebby: context.getFilesDir(...) and friends Apr 16 01:29:25 that returns a FIle? but the external one returns a String Apr 16 01:31:21 so? Apr 16 01:31:24 The external one returns a File as well.. Then you get the path from that File Apr 16 01:31:38 gridView.setSelected() doesn't actually set selected wtf Apr 16 01:33:36 Hmm, for storing audio files, for which I don't expect to store permanently... but maybe a few days, should I use external or internal? Apr 16 01:35:35 nebby: internal i guess, if you don't want to share it Apr 16 01:37:26 I thought that external is app specific too? Apr 16 01:57:59 :( this is a depressing bug hunt, why is so hard to save the current position in a gridview Apr 16 02:01:31 JesusFreke there ? Apr 16 02:04:37 getting a very strange error. i have created an app, published it to google play as alpha (signed), downloaded it from google play, and it works. now today, i have fixed a bug in this app, republished the new apk to google, now when i download it again from the store, i am unable to open it. immediately upon opening, it closes. the only error appearing in the debugger is "permissoin denial: get/set setting for user asks to run as user -2 but is calling from Apr 16 02:04:41 what did i do to break this? Apr 16 02:05:23 before installing from google play, i uninstalled the debug version from my phone Apr 16 02:05:28 cleared all cache and data Apr 16 02:06:42 zpr does your app do any weird stuff like require root, exec run-as, etc ? Apr 16 02:07:03 g00s: nothing like that Apr 16 02:07:27 uninstall the app Apr 16 02:07:33 oh, you did Apr 16 02:07:43 now there are weird errors in logcat: system dir 0: /system/app/, system dir 1: /vendor/app/ Apr 16 02:07:47 yeah i hope .. you didn't run into /that/ bug Apr 16 02:08:11 seems like once in a while, it becomes impossible to install / update an app without renaming the package Apr 16 02:08:27 g00s: in this update, i added google play services Apr 16 02:08:30 i thought it only happened on a samsung device Apr 16 02:08:39 g00s: ... i am using a samsung devices. Apr 16 02:09:27 'ive restarted my phone and eclipse multiple times, and updated everything on eclipse Apr 16 02:09:52 there are a *TON* of errors being printed in logcat whenever i touch my phone Apr 16 02:10:35 could proguard be the culprit? Apr 16 02:10:36 unfiltered logcat can be terrifying ;) seems like everything is always blowing up eh Apr 16 02:10:48 its filtered to show only error level messages.. this is daunting Apr 16 02:11:42 g00s: the interesting thing, is if i delete the google play version from my phone, then install via eclipse, it works fine. Apr 16 02:12:24 (doing so warns me the signature is different so i know the apk on google play has the proper non-debug sig) Apr 16 02:14:38 not sure … actually never tried installing my own app from Play Apr 16 02:15:26 you'll go blind Apr 16 02:17:49 huh, so gridview position is saved automatically, and you don't have to deal with rotations Apr 16 02:18:04 but it fails with fragment swapping Apr 16 02:18:36 g00s: this app is crashing for all of my alpha testers (none of them had the debug version installed). does this offer any insight? Apr 16 02:19:50 hm, well in that case since the change is you added play service, i think somehow that didn't go right Apr 16 02:21:07 i added play service, and proguard Apr 16 02:21:16 ok, will do some investigating. thank you Apr 16 02:31:28 g00s: removing proguard remedied the issue. Apr 16 02:31:48 interesting, maybe play services requires some proguard flags Apr 16 02:32:10 i generally dislike proguard, just another thing to break :) Apr 16 02:33:43 heh, i am using an ad provider, and they required i add roughly 200 lines to the proguard properties in order for it to work Apr 16 02:33:58 so it is tough to say who is the culprit -- but removing proguard remedies the situation. Apr 16 02:34:02 who's going to reverse my lame app anyway............ Apr 16 02:34:24 proguard's kind of annoying, but I do like how you can use it to strip out the Log calls in release builds :) Apr 16 02:34:50 yah, who's gonna install it either. If it's worth installing, it's worth fixing. Apr 16 02:35:26 proguard is alright, g00s, but I usually run it without obfuscation Apr 16 02:35:29 Pinhole: are you suggesting i should fix this instead of removing proguard? it seems like a bug in proguard, if anything Apr 16 02:35:57 there doesn't seem to be a way to debug it Apr 16 02:36:27 no, I was suggesting that if someone see fit to install it, then they might see fit to reverse engineer it to fix something they don't like (like ads) Apr 16 02:36:56 ahh Apr 16 02:37:57 well, if someone takes the time to reverse my app to remove the ads, i will simply be flattered they went through the time and effort to do that because they enjoy my app so much, but would rather not support me by neither viewing ads nor paying $0.99 for the ad-free version. Apr 16 02:38:53 i doubt this will constitute a large portion of android users however Apr 16 02:40:24 a commendable attitude zpr Apr 16 02:42:52 canvs2321: yes, that what I wanted :) tq! Apr 16 02:43:35 orientation changes are the bane of my existence Apr 16 02:43:42 asdfaskdjfklasdf Apr 16 02:49:43 hello all Apr 16 02:49:59 is there a way to use a light-weight off-line version of voice recognizer? Apr 16 02:51:45 QubeZ: probably not, since i imagine that requires some server heavy lifting Apr 16 02:52:35 QubeZ: this looks like something though: http://stackoverflow.com/questions/10991442/voice-recognition-without-internet-in-android Apr 16 02:52:59 thanks will peek at that **** ENDING LOGGING AT Wed Apr 16 02:59:58 2014