**** BEGIN LOGGING AT Fri Aug 09 02:59:59 2013 Aug 09 03:12:07 anyone here good w/ zxing Aug 09 03:14:45 used it a bit but i's a bit of a pain Aug 09 03:15:14 the viewfinder is super small on the s4 Aug 09 03:15:19 cant figure out how to enlargen it Aug 09 03:15:29 made a gadget that could transmit and receive between 2 phones with the front facing cameras Aug 09 03:16:07 surley you can make the surface any size you want? Aug 09 03:16:44 in fact, if i remember rightly, the ZXing stuff has nothing to do with the camera Aug 09 03:17:04 you just give it a pixel array Aug 09 03:18:01 alex_PP: presumably this is the reference scanner client Aug 09 03:18:48 i suppose it is Aug 09 03:24:24 acidjazz, fo you mean the whole viewfinder is small, or just the non-grey area? Aug 09 03:25:12 if it's the whole thing, check your layout, if it's the grey bit, check https://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/camera/CameraManager.java#205 there Aug 09 04:07:00 best android development book? Aug 09 04:09:15 now, probably big nerd Aug 09 04:12:57 huh? Aug 09 04:15:34 http://www.amazon.com/Android-Programming-Ranch-Guide-Guides/dp/0321804333 Aug 09 04:16:01 that's your fav? Aug 09 04:16:17 i liked reto Aug 09 04:16:32 those are your best bets Aug 09 04:42:36 g00s, and if you could only pick one of those two Aug 09 04:42:37 ? Aug 09 04:43:02 hm Aug 09 04:43:11 reto was more encyclopedic Aug 09 04:43:15 boring as hell too Aug 09 04:43:46 both will be out of date when android 5 comes around, presumably october ish Aug 09 04:43:57 i mean, i have no idea when android 5 will be out ... Aug 09 04:44:03 just guessing before the holidays Aug 09 04:45:06 but the majority of people won't be using android 5, so is that even relevant? Aug 09 04:45:08 nerd is probably easier / gentler Aug 09 04:45:18 do books teach for backwards compatibility? Aug 09 04:45:40 g00s, I'm coming from a webdev (python/js) background, btw Aug 09 04:48:03 Will android 5 require 2 gb of ram Aug 09 04:48:25 that would be insane Aug 09 04:49:31 i net there will be profiles Aug 09 04:49:45 *bet Aug 09 04:50:40 Well glad my tablet has 2gb of ram even tho i keep getting shit because its hp Aug 09 05:07:30 so g00s, were you telling me that nerd is gonna be outdated shortly? Aug 09 05:07:38 because android 5 books will be relevant for android 4 development? Aug 09 05:08:00 raj try the online docs first, if they fall short go for a book maybe Aug 09 05:08:09 where are the online docs? Aug 09 05:08:25 developer.android.com Aug 09 05:15:17 ah, thank you sir Aug 09 05:15:20 didn't know that existed Aug 09 05:16:02 aqui? http://developer.android.com/training/index.html Aug 09 05:16:11 sure Aug 09 05:16:13 that's the "online book" Aug 09 05:16:14 ? Aug 09 05:16:32 oh, no there is no online book; its just a tut Aug 09 05:17:07 After completing this, will I likely need more? Aug 09 05:17:20 or will I just be able to use the API from there? Aug 09 05:21:16 I'm trying to figure out how to verify if a phone number is an exact match for a contact. right now, it seems to ignore country codes and any other data appended before the country-specific phone number Aug 09 05:21:28 https://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup.html Aug 09 05:21:44 tried doing it with this lookup on the phone number Aug 09 05:22:23 is there a way to get the phone number in a canonical state so that i can't compare whether or not it is truely the same number? Aug 09 05:24:31 it only happens if the contact does not have a country code Aug 09 05:25:01 maybe the real issue is that the phone doesn't seem to detect the current country code and take it into account in the contact lookup Aug 09 05:26:57 Can i redraw an Activity without it crashing, calling it's onCreate() method again from a button click because i'm toggling fullscreen? Aug 09 05:28:19 BullShark: You can certanly redraw an activity, yet calling onCreate is probably a really bad idea.... Aug 09 05:31:34 it looks like even teh built-in messaging app has this problem Aug 09 05:32:08 if a contact doesn't have a country code, arbitrary characters can be prepended to the phone number and the lookup is still successful Aug 09 05:32:57 gavilan2 -> what about calling setListAdapter() again on button click which is called the first time from my onCreate()? Aug 09 05:33:03 it's crashing my app Aug 09 05:33:19 why do you want to redraw? Aug 09 05:33:33 gavilan2 -> toggling fullscreen on and off Aug 09 05:33:58 and what changes when that happens? Aug 09 05:34:36 gavilan2 -> doesn't make it that far. the code ive added causes the app to crash as soon as that activity is reached. Aug 09 05:35:00 BullShark: What about steping thorugh the code, and seeing where it crashes? Aug 09 05:35:05 what exception do you get? Aug 09 05:36:40 nn08-09 05:05:00.972: E/AndroidRuntime(331): android.util.AndroidRuntimeException: requestFeature() must be called before adding content Aug 09 05:38:32 gavilan2 -> http://vpaste.net/9zzmo Aug 09 05:40:05 gavilan2 -> the problem is that if i set the activity to fullscreen without the option to bring it out of fullscreen, the options menu will never be accessible Aug 09 06:49:51 Hey guys. I have a question about call recording. When i start current project, i use simple activity with buttons "start record", "stop record", and all was working fine, my calls were recorded. Now i have a service, which use same methods. It's start recording, when call start, and was crashed on the end of call, with "stop failed: -1007". In service i can record only downlink or uplink voice. Anybody have same problem? Aug 09 07:01:08 Well well, what do you know! With at least the emulator API 18 Google image, Play Services and GCM seems to work fine. Would have thought that to be worthy of an announcement.. If it follows the pattern of GCM, it will also work with API level 17, but not anything lower. Aug 09 07:15:31 Confirmed, Google Play services works on emulator Google images 17+. Aug 09 07:20:50 cool :) Aug 09 07:25:10 This line Integer position = Integer.parseInt(videos_queued.getAll().keySet().toArray()[0]); : is giving this error: The method parseInt(String) in the type Integer is not applicable for the arguments (Object) Aug 09 07:27:05 Hi all, I have a FragmentActivity where i put all my Fragments in one Framelayout. Ex: FragmentA with a listview (list of custom objects). If i close my app, the app crashes when I open it again. Does somebody know a good tutorial how to handle the lifecycle? Aug 09 07:27:16 @eblieb toArray is probably returning an array of objects, you need a string in there Aug 09 07:29:38 petter: it should be an array of strings, representing the string keys of the sharedPreferences. Aug 09 07:29:47 petter: how can I make this explicit? Aug 09 07:30:40 This works but damn java is ugly Aug 09 07:30:41 Integer position = Integer.parseInt((String)videos_queued.getAll().keySet().toArray()[0]); Aug 09 07:30:46 benlieb: you can cast .toArray()[0] to a string? Aug 09 07:30:49 exactly Aug 09 07:32:02 check what's the return type of that keySet().toArray(), if it's Object[] then yeah, you need to cast it. Aug 09 07:42:26 Other question: I have a fragment: ItemDetailsFragment which contains a GoogleMapFragment (inside a framelayout). If i click on a button to add a new Fragment to the screen. The GoogleMapFragment is still visible (above the new fragment), how can i fix this? Aug 09 07:48:54 Hey guys, quick question, if I want to set the movement method of a textivew within a widget using RemoteViews, how would I go about doing that? myRemoteView.setInt() doesn't work since the last argument is a ScrollingMovementMethod and you can't set movemement method. Anything I can try? Aug 09 08:03:02 Does somebody know a solution for this situation (make it works in one acitivy)? http://stackoverflow.com/questions/15370624/mapfragment-and-camera-seem-to-interfere-with-each-other-in-the-same-activity Aug 09 08:05:08 FrancescoV, does that mean you have camera over maps? Aug 09 08:07:23 FragmentA contains a map, i add FragmentB (camera full screen) and then the map is above the camera preview Aug 09 08:12:43 Mavrik, if you think there's a solution to handle it in one activity, let me know but I think it's better to create a new activity for my camerapreview. (currently I'm using only 2 activities: 1= login 2: fragmentActivity which contains all parts of the app) Aug 09 08:19:57 FrancescoV, you're having problems because both are using SurfaceView Aug 09 08:20:10 FrancescoV, try setting setZOrderOnTop on one to false, and true on another Aug 09 08:28:27 Mavrik, on which object must is execute this method? / how can i get the surfecaview of my supportmapfragment? Aug 09 08:28:37 on the surfaceview Aug 09 08:28:48 and I have no idea, check the source Aug 09 08:41:36 Mavrik: can't find the surfaceview from the supportmapfragment but if i set it on my camerapreview (true), it works --> TNX! Aug 09 08:42:57 :) Aug 09 08:49:29 hey ... what in Unity3D causes the app to require permission for Phone calls / Read phone status and identity Aug 09 08:49:37 is it reading of the System deviceUniqueIdentifier? Aug 09 08:55:37 Excuse me. Does anyone know a "Push-Service" which is similar to gcm and not used by Google? It must be free, own implementation and unlimited push. I checked pushwoosh which looks great but it uses GCM as base :S Aug 09 08:56:30 Has anyone had a chance to mess with notificationlistenerservice? Aug 09 08:57:20 Ive found some examples. but when i try to implement it, it simply doesnt hear anything. anyone have any tips? Aug 09 09:00:54 misterli: Well, there's SMS. In reality, if you're looking for something that is bundled with the device, you're left with what the device already has. Google has GCM. Others may have alternatives, but I bet GCM will be most common. Aug 09 09:05:51 misterli, Urban Airship? Aug 09 09:06:08 even though, you're just really optimistic thinking someone will run such infrastructure for free Aug 09 09:07:36 misterli: are you opposed to GCM because you don't like (relying on) Google, or for technical reasons? Aug 09 09:17:28 Is there a way to filter the bluetooth devices list by the protocols that my app support (i.e. printers)? any ideas? Aug 09 09:19:57 What's the smart way to cache twitter profile images for my twitter based app? Aug 09 09:21:03 I'm thinking that I could use an IntentService to download them and save them to external storage, then save their location to my DB and notify my Provider that there is new info Aug 09 09:23:09 hmm anyone ever had R not generate with no reason at all, my res dont show any errors etc, i literally swapped a png image, then it started, i swapped back and it still wont generate Aug 09 09:23:35 Ankhwatcher check out android universal image loader Aug 09 09:23:41 Ankhwatcher: If it's for displaying in a listview, use volley, UniversalImageLoader or similar, that do lazy loading and automatic caching. No need to make that up yourself unless you have to, which you may have to. Aug 09 09:24:03 okay cool Aug 09 09:24:16 ive wasted so much time with this R nonsense Aug 09 09:24:19 Gaz`: I have had that, over and over Aug 09 09:24:32 like 99% of the time theres a clear reason Aug 09 09:24:34 Gaz`: yep, been there Aug 09 09:24:38 Eclipse? Aug 09 09:24:47 but this time none, even if i view the ENTIRE list of issues, they are ALL just r cant be imported Aug 09 09:24:50 eclipse yes Aug 09 09:24:55 and even the new adt/eclipse Aug 09 09:25:19 It hasn't happen to me ONCE, using Gradle (which AS also use). Sounds like ADT support is dropping fast. Aug 09 09:25:22 was literally compiling a few mins ago Aug 09 09:25:45 these unexplainable ones i only started getting in the last 2 days Aug 09 09:25:59 clean=>delete gen folder=>restart eclipse=>switch to Android Studio=>switch to intelliJ=>switch to linux=>move house Aug 09 09:26:04 I think the gradle plugin had a similar issue a few releases ago, but it was fixed within a couple of days IIRC. Aug 09 09:26:29 lol...! Aug 09 09:27:02 could it simply be i dont have the right api version installed Aug 09 09:27:19 oh no cause its happening in the eclipse it was worign in ten mins ago Aug 09 09:27:21 wtf Aug 09 09:27:31 Gaz`: I recommend giving up and going to get drunk Aug 09 09:27:39 I doubt API version has anything to do with such build issues. Aug 09 09:27:42 i will definitely do that in about 5 hrs Aug 09 09:27:55 Gaz`: fix project properties=>change android version=>re-add dependancies=>move house Aug 09 09:27:58 but i could be invoicing if i can get this crap to work Aug 09 09:28:13 beer o'clock is only 30 minutes away... Aug 09 09:28:25 11am is beer o'clock? Aug 09 09:28:25 weirdest bit is if i reload eclipse, first compile is fine Aug 09 09:28:34 i didnt get up til 230pm leeds :) Aug 09 09:28:46 and what difference does that make, laddie? :) Aug 09 09:28:51 teehee Aug 09 09:29:22 now im scared to clean the proj Aug 09 09:29:25 as i know it will break it Aug 09 09:30:12 So the Android Universal Image Loader comes highly recommended, right? Aug 09 09:30:44 Has worked great on one of my projects. Aug 09 09:30:57 android studio makes me very hesitant to add new dependancies to my project Aug 09 09:31:19 Ankhwatcher: Do it in the build.gradle file. The GUI stuff is often messed up. Aug 09 09:31:24 'cause the configuration is such a damn mess Aug 09 09:31:53 kjeldahl: yeah I'm never sure if I should do it just in build.gradle or everywhere or wtf? Aug 09 09:32:59 Whatever AS tries to do with it's GUI _IS_ modifying the gradle.build file. Idea has it's own notion of a project, in addition to gradle stuff, similar to Eclipse. I would stick to the build.gradle file for now if you can. Things are moving fast. Aug 09 09:35:04 and guess what both my nexus ones are basically dead, power button broke on each, one wont read sd cards, one wont read sim cards, screens on both almost dont work Aug 09 09:36:39 and the htc flyer is stuck in an infinate loop of rebooting Aug 09 09:36:57 android meltdown in my household Aug 09 09:37:53 Ankhwatcher im using it right now, id not say its highly recommended purely because a) i had to implement my own sypport for internal storage loading, and b) the way it works is by flushing and reloading so sometimes u see a progress bar as it loads the image which i find annoying Aug 09 09:38:13 but apart from that its much nicer than trying to make your own, Aug 09 09:41:41 found my prob, and this is WEIRD, when i change the image src on an imageview, "xmlns:android="http://schemas.android.com/apk/res/android" gets randomly inserted in the xml somewhere Aug 09 09:41:54 Gaz`: Are you talking about UniversalImageLoader? That supports internal storage loading just fine at my end, using content:// links I believe. Aug 09 09:42:16 kjeldahl, hmmm i tried it yesterday and it said you must implement this yourself Aug 09 09:42:43 String imageUri = "content://media/external/audio/albumart/13"; // from content provider Aug 09 09:42:51 is that internal??? Aug 09 09:42:58 if it is im a dumb idiot Aug 09 09:43:08 Rly? Look under "Acceptable URIs examples" at https://github.com/nostra13/Android-Universal-Image-Loader Aug 09 09:43:10 i thought it was something more funky Aug 09 09:43:21 i guess it is yeh Aug 09 09:43:23 lol.... Aug 09 09:43:28 file://, content://, assets://, drawable:// .. what else do you need? Aug 09 09:43:41 i didntrealise content:// was for internal storage Aug 09 09:43:53 Well, it's for a content provider. Aug 09 09:44:02 not quite suer what that means really Aug 09 09:44:14 i mean can i load files from my internal storage using that Aug 09 09:44:20 or only from like a camera album Aug 09 09:44:30 Sounds like you're looking for file:// Aug 09 09:44:39 no, internal Aug 09 09:46:17 I like how they have built an "image loader with sources" jar so you can get the tooltips Aug 09 09:46:28 that's really handy Aug 09 09:48:46 By the way my AS shows this everytime I start it up, it persists until I click on it: http://picpaste.com/0sq2nBvb.png Aug 09 09:49:01 anyone know what it's on about? Aug 09 09:49:33 Gaz`: You mean you can not use a file:// to access internal storage in your app? Aug 09 09:50:57 So to integrate this image loader into my code I should override setViewImage in my custom SimpleCursorAdapter, right? Aug 09 09:51:26 Ankhwatcher: Yes, use the UIL function to load image into resource given the proper id. Aug 09 09:51:30 no u cant kjeldahl, as far as i know Aug 09 09:51:37 file:// is for sd card etc Aug 09 09:51:49 is the best way to send messages from my services to activities using a Broadcast Reciever? Aug 09 09:55:18 Gaz`: Sounds weird. I really do not know, but I thought that file URIs should work in general, provided you have access to the file. Of course you can not share file URIs pointing to internal storage to other apps because they do not have access, but that's what content providers are for (if needed). Or you could use external/shareable storage instead and pass file uris to those. Aug 09 09:55:55 Leeds, Mavrik, kjeldahl. I want to use Push-services before 2.2 and at least on devices which has no google stuff installed (Playstore, ...) like in China where it's not available Aug 09 09:56:49 misterli: Good luck! :-) Aug 09 09:57:21 No idea about "similar" push-serviceS? Playstore does nothing then keeping a connection / or connect by delay and check for new stuff, isnt it? Aug 09 09:58:06 misterli: Honestly, unless they have some packaged component to handle push, it's not gonna work until you get your software on it. When you do, longpoll or do whatever you need to "simulate" push. Aug 09 09:58:29 hmpf Aug 09 09:59:40 It's not that hard, but it requires some infrastructure (a server to queue messages etc). Aug 09 10:00:01 This shouldnt be a problem. Well, is there no "Free" solution available? It must only fit on android-systems Aug 09 10:00:20 urban seems to be expensive. Ive about 100.000 devices which uses about 1mil pushes/month Aug 09 10:02:50 Gaz`: Regarding file URIs, you've tried absolute versus relative? file:/// versus file:// ? Aug 09 10:08:12 misterli: You could look at some of the freely available solutions with Android support.. RabbitMQ+Android at least shows something, I'm sure there are more. But running your own servers IS work... Aug 09 10:08:24 freely available MESSAGING solutions I meant. Aug 09 10:08:44 And worst case add your own heartbeat signalling to them if not already supported. Aug 09 10:13:47 wtf Aug 09 10:13:50 this is confusing Aug 09 10:14:10 how do I initialise ImageLoader? Aug 09 10:15:07 oh wait, I get it Aug 09 10:15:20 I use ImageLoader.getInstance(); Aug 09 10:24:11 kjeldahl Gaz`: any idea why I would be getting this error message? java.lang.NoClassDefFoundError: com.nostra13.universalimageloader.core.DisplayImageOptions$Builder Aug 09 10:24:34 the code compiles happily but this happens on execution Aug 09 10:25:19 This is the line of code it is crashing on: displayImageOptions = new DisplayImageOptions.Builder().showImageOnFail(R.drawable.ic_launcher).build(); Aug 09 10:30:05 yay! it's working Aug 09 10:30:12 Ankhwatcher: Make sure the lib gets "compiled in" (included in your project), and copied in... GREAT! Aug 09 10:30:16 gotta run Aug 09 10:30:18 * kjeldahl runs off Aug 09 10:30:27 ... I just dumped the displayimageoptions bit altogether Aug 09 10:30:34 I still don't know what it's problem was Aug 09 10:31:15 these twitter profile images are really low-rez Aug 09 10:42:14 lol, now I'm reading through all of the different options for getting profile image urls in twitter: profile, bigger profile, mini profile, original profile Aug 09 10:42:28 then there is banner color and banner image... Aug 09 10:43:18 I think it's a travesty they didn't compress the twitter profile images to 150 bytes Aug 09 10:43:31 touche Aug 09 10:45:30 Gaz` and kjeldahl thanks a lot guys. You turned something that would have taken all day and been done so-so into something really cool that took an hour and 20 minutes Aug 09 10:53:07 I wish the logcat viewer in AS would let me choose which devices logcat I'm looking at Aug 09 11:13:00 hey guys how do I get a Handler I created in an activity into a service so I can send a message to it and have it change something on my UI? Aug 09 11:16:41 Link Aug 09 11:17:31 Linkandzelda: you create messenger with a reference to that callback handler and pass it to the service through an intent Aug 09 11:17:45 ... well at least that's what I did with my IntentService Aug 09 11:21:14 For making a Dialog with a custom layout, is it better to just start a new Activity? Aug 09 11:25:04 thanks Ankhwatcher will give it a go Aug 09 11:30:55 hi , can i know how can i put a password protection to my app from being uninstalled ? Aug 09 11:32:18 how to access the other app uninstalling with code ? Aug 09 11:38:16 p_l can you help in this case ? Aug 09 11:39:38 offjack: hmm... Maybe if you install it as DeviceAdmin, but I am not sure that's going to go well most of the time Aug 09 11:40:08 Restricted Profiles can be used to stop a specific user from uninstalling the app, I think, but it's 4.3+ only Aug 09 11:43:01 there are some weird tricks, of course, and if you have Superuser access you can do some interesting stuff, iirc Aug 09 11:46:01 p_l sorry i was disconnected from the IRC , can you please help again :( Aug 09 11:46:42 offjack: hmm... Maybe if you install it as DeviceAdmin, but I am not sure that's going to go well most of the time < p_l > Restricted Profiles can be used to stop a specific user from uninstalling the app, I think, but it's 4.3+ only < p_l > there are some weird tricks, of course, and if you have Superuser access you can do some interesting stuff, iirc Aug 09 11:46:46 i have a app named SMS lock which prevent apps from being uninstalled in my 2.2 version of android without password Aug 09 11:48:13 I haven't looked very deep into it. In the end, you can always pull an APK and decompile it to learn its secrets (well, depends on country - I can :D) Aug 09 11:48:36 hig guys, do you know some starter android development kits? hardware? i would like to choose one and buy it. I saw one from texas instruments, its a great peace but it doesnt have compass and gps, only accelerometer Aug 09 11:49:02 offjack: possibly something interesting is doable by processing certain intents Aug 09 11:50:31 k great Aug 09 11:52:04 I have a LoginActivity, then a HomeFragmentActivity with a Fragment where the the user can be switched --> again loginactivity but how can i handle it that the user clicks "other user" --> LoginAcitivy and ignore back (back to SwitchUserFragment/ HomeFragmentActivity)? Aug 09 11:56:07 Hi wrote an open gl shader emulator but I am getting banding. I think this is because I am adding the colours for each light per pixel. Does anyone know how to avoid this? http://imgur.com/24oVPFB Aug 09 11:56:51 Anthy: I think this is not necessarily the best channel to ask :D Aug 09 11:57:00 (Notice the diffuse from the 2 lights doesn't mix correctly and produces a dark band) All I am doing is summing the colours up Aug 09 11:57:27 p_1 maybe opengl? I dont know I am writing shaders for Android Aug 09 11:58:00 Anthy: well, you're emulating shaders, right? So rather an opengl-related or similar channel Aug 09 11:58:11 I'll try opengl then tnx Aug 09 11:58:20 Though you can try badgering Chainfire when he is there ;) Aug 09 11:59:44 :) Aug 09 12:05:02 Ankhwatcher: got any code I can look at? seems to be more complex than it should be and mine doesnt work xD Aug 09 12:06:44 sorry bud, I've left the house,so i cant Aug 09 12:07:14 damn im annoyed that google doesnt have "working" examples Aug 09 12:07:25 they say I can use a LocalServive Aug 09 12:08:05 what does your service do? Aug 09 12:08:56 it applies a file operation inside a new thread Aug 09 12:09:22 ive setup a handler inside it so that the messages can be sent back outside (but still within the service) to call a Toast Aug 09 12:09:43 however I want to make it go back to the activity that started it so I can close the activity once the operation finished Aug 09 12:10:06 ? Aug 09 12:10:24 why leave the activity running? Aug 09 12:10:53 couldn't you just do this with a thread? Aug 09 12:10:56 becuase it shows a spinning gear to show the operation is happening Aug 09 12:11:05 can 2 childs of a listview have the same tag? and set a click event on both? Aug 09 12:11:07 so you're saying no need for a service? Aug 09 12:11:07 ah Aug 09 12:11:19 thats a possibility Aug 09 12:11:35 I thought that all "operations" without the UI should have a service and a thread Aug 09 12:12:13 well itcseems a little unnecissary, unless you are calling from lots of different activities Aug 09 12:12:49 well 2 activities actually call this Aug 09 12:12:51 Why does Android Studio keep telling me about API levels even though I included the support library? Aug 09 12:12:53 but only 1 has a UI Aug 09 12:13:33 zyngawow: what do you mean? Aug 09 12:13:37 zyngawow: what messages does it say and for what code Aug 09 12:19:00 Leeds, no beer yet? Aug 09 12:19:19 Gaz`: no - having salad and turkey Aug 09 12:19:25 softy Aug 09 12:19:30 u on a diet? Aug 09 12:19:57 u were certainly thinnner than them moomins Aug 09 12:20:06 hehe Aug 09 12:23:51 Hi, is there any way to get a storage volume's UUID? Aug 09 12:28:25 Ankhwatcher: can I pass a handler via an Intent? then I could just send messages like that from my service :) Aug 09 12:38:52 sometimes i just cant get a button clickable.. Aug 09 12:38:55 wtf is up with that Aug 09 13:00:40 If I populate a webview with some html and there is a link in this html, does anyone know how to keep it in the webview rather than opening it in a browser application? Aug 09 13:12:12 Hello. I have a question regarding the notification api in android 4.3 Aug 09 13:13:14 Is there a way for an app to detect whether notifications are enabled for that app (so we can notify the user to enable it)? Aug 09 13:20:22 Just don't show annoying notifications, then the user wont disable them Aug 09 13:29:35 Hello good people, I wonder if someone can help me? I would like to control an Android device remotely through a webinterface, I would like to do things such as start apps as you could do through ssh. Could anyone suggest anything, I thought maybe something like a client in javascript but nothing close to straightforward is jumping out Aug 09 13:30:50 I'm hoping for a simple cross platform page I can serve from the device Aug 09 13:31:15 well, depends how far do you want to do the control Aug 09 13:31:23 without root, don't expect to have remote desktop :) Aug 09 13:31:30 atm just start a program Aug 09 13:31:38 Actually, I was referring to the Android 4.3 addition, where an app can listen for and manage notifications, using http://developer.android.com/reference/android/service/notification/NotificationListenerService.html Aug 09 13:31:39 the device is rooted Aug 09 13:31:56 I can use ssh remotely with putty Aug 09 13:34:12 so the same sort of thing from a web interface Aug 09 13:35:21 One way to check is to send a notification and check whether it is caught by the listener but that seems like a workaround. Aug 09 13:35:49 everything does atm.. :/ Aug 09 13:36:28 i thought I could just roll a ssh client in javascript but that also appears to be "wishful" thinking Aug 09 13:41:41 how can you close your app instead of going to the previous activity? (don't want to go back to my login activity)? Aug 09 13:45:29 finish will go back to the previous activity, right? Aug 09 13:46:09 Right Aug 09 13:50:23 I can go to the homescreen with an intent, but when i start the app again, i go back to the LoginActivity instead of my last active activity Aug 09 13:51:00 FrancescoV: In your LoginActivity call finish() after you started your intent for the next Activity Aug 09 13:54:33 xor42: sounds great but now i have this: LoginActivity --> start FragmentActivity (finish(); after) then i click back --> homescreen. Open app with "last active app" --> loginactivity Aug 09 13:54:51 must there be something extra in my manifest file mayble? Aug 09 13:55:07 I have a tab navigation (using ActionBar) that has two tabs. Each tab fragment is a list fragment that uses a Loader (support library listfragment, I am ignoring the FragmentTransaction passed as a parameter to Tab Listener methods, and using the support library's FragmentTransaction instead). Aug 09 13:55:30 It works fine, but when I change the orientation of the device, I see the empty text for both the lists, even though, cursor.getCount() returns a non-zero value inside onLoadFinished() Aug 09 13:55:46 xor42: first i'll try something else, could be another problem Aug 09 13:56:32 FrancescoV: Launch your main activity. If the user is not logged in, start the login activity.. Aug 09 14:01:21 is it because I'm simply detaching and attaching the listfragments? Aug 09 14:02:53 SimonVt, found it, without going to my mainactivity. If i would go to the homescreen , I override the onbackpressend and I start an intent with action_main.... and do not execute super.onBackPressed(); Aug 09 14:03:46 What if they reboot, launching would show the login activity again Aug 09 14:03:46 i'll try replacing it instead Aug 09 14:04:58 Or if they just kill your app Aug 09 14:05:25 e.g. by swiping it off recent apps Aug 09 14:06:14 If they kill your app, how can you skill the login without username/password (not auto login for safety) Aug 09 14:06:57 It's for a business app, not a social app so I thinkt your solution should be used for social apps and mine for better security Aug 09 14:07:52 ps: it isn't the best secure way but it's not user friendly to ask password even if they push the back button one time more than they need Aug 09 14:09:45 You're basically faking auto-login with your approach Aug 09 14:10:33 I recommend storing the user's password in a file called passwd.txt on the SD card Aug 09 14:10:44 I don't need auto-login, i only need to remember the user names. Aug 09 14:12:50 You want the user to log in because auto-login is unsafe, but you don't want them to log in if they leave your app Aug 09 14:13:02 Does not compute Aug 09 14:13:20 cached credentials? Aug 09 14:13:34 i'd say hashed credentials Aug 09 14:13:57 non-reversable Aug 09 14:14:07 If your phone is always in your pocket and you click home and open it in 1 minute, why should you ask for the password again? time wasted. The password will be asked always on tablet (ex. at the cash desk) Aug 09 14:14:25 that way it's unique to that user and session but not stored in plain text Aug 09 14:15:03 Because staying logged in after the user has left your app is unsafe Aug 09 14:15:12 Anyone could take the phone and start using the app Aug 09 14:15:16 Can't have that Aug 09 14:15:31 sure if you're making a banking app Aug 09 14:16:10 if you force people to log in every single time for something less than financial/personal security then people won't use it Aug 09 14:16:28 true but i'm checking out something like this after reopening app. Faster than typing your secure pass http://www.welivesecurity.com/wp-content/media_files/AndroidUnlockScreen.png Aug 09 14:19:20 hi. I have embedded videos in my webview. and when i select a video to play it just keeps buffering forever. why is that happening? Aug 09 14:24:59 Does anyone know what the line is that runs down the middle of Android Studio? Aug 09 14:25:12 Down the middle of the Editor that is Aug 09 14:25:25 At least it runs down the middle on a 27" screen Aug 09 14:25:41 Max line length Aug 09 14:26:15 Why does it default to a set size rather than changing to my screen size :( Aug 09 14:26:54 Also it doesn't seems to be max line lenght SimonVT, at least I can type past it Aug 09 14:27:07 which is what makes it really really awkward Aug 09 14:27:19 It's for when you use the formatter Aug 09 14:28:16 superlinux-hp: are you on Jelly Bean? Aug 09 14:28:23 Many projects define a code style that must be followed Aug 09 14:28:29 This includes max line length Aug 09 14:28:40 You can change it in preferences if you want Aug 09 14:28:42 Or just not use the formatter Aug 09 14:29:13 Napalm|afk, I have Android 4.0.4 Aug 09 14:29:37 its a Samsung S galaxy Duos Aug 09 14:30:42 superlinux-hp: look at the WebSettings#setAllow* functions Aug 09 14:31:10 ok Aug 09 14:33:15 Also is there a way to turn on color coating for LogCat in Android Studio? Aug 09 14:35:35 Found it. Editor > Colors and Fonts > Android LogCat Aug 09 14:43:22 guys, how can I define an inner/inline broadcast reciever for an activity, register it, then send it an intent from my service? Aug 09 14:46:51 am I supposed to restart the loader on orientation change? my list fragment shows the empty text when I rotate my device Aug 09 14:47:24 even though the cursor has a getCount() > 0 Aug 09 14:48:39 If it shows the empty text then you either haven't set your adapter or you didn't pass the cursor to the adapter Aug 09 14:49:44 SimonVT, do I need to reset the adapter on resume? let me try that Aug 09 14:50:09 to be more clear I have this for my reciever http://pastebin.com/aqDpz2hG and when I try and access it from my service I get this http://pastebin.com/UYiWadKM Aug 09 14:50:19 Eh, your adapter is destroyed with your fragment Aug 09 14:51:11 i'm setting the adapter onActivityCreated Aug 09 14:51:42 so it's only being called when the activity is recreated, not when the fragment is recreated Aug 09 14:54:15 So you don't know if you're setting the adapter or passing the cursor to the adapter Aug 09 14:59:27 SimonVT, what is the right place to set the adapter in a listfragment? Aug 09 15:00:45 Why do accents show weird on my app? For example, ó for ó Aug 09 15:00:50 this is so frustrating, i'm away from home and using a huge dongle, I need to disconnect from the internet every time I need to test some code on my device. the emulator is kinda slow. Aug 09 15:01:03 zyngawow: broken UTF-8 handling Aug 09 15:01:35 p_l, and how do I fix it? Aug 09 15:01:59 zyngawow: somewhere in the process someone used Latin-1 (iso8859-1) to decode UTF-8, saving the result as UTF-8 Aug 09 15:02:14 you need to find where it happened, and fix it Aug 09 15:02:19 items.add(new Product("Chuletón", getCategoryByNumber(2))); Aug 09 15:02:22 That's where I add it Aug 09 15:03:05 run with debugger and check what happens? Maybe you'll need to specify something somewhere Aug 09 15:03:33 If I use 'com.android.support:support-v4:18.0.0' in my build.gradle, do I still need to include my android-support-v4.jar Aug 09 15:05:21 SimonVT, in my code, I was setting the empty text right after I set the list adapter. how come it's able to show the empty text but not the list data? Aug 09 15:05:50 Because the adapter has no data Aug 09 15:05:54 Or it's null, who knows Aug 09 15:06:02 p_l, some how the Product constructor gets it without the accent Aug 09 15:06:07 SimonVT, but I used log cat to output the count of cursor Aug 09 15:06:13 it has a non zero value Aug 09 15:06:36 And you do this from your adapter? Aug 09 15:06:38 inside onLoadFinished(), cursor.getCount() returns 68, which is the number of rows being shown before the orientation change Aug 09 15:07:04 i'm calling _adapter.swapCursor(cursor); inside onLoadFinished() Aug 09 15:07:07 zyngawow: then it's some detail in how the strings got encoded by javac Aug 09 15:07:10 sulaiman: The layout of your listview may be the issue Aug 09 15:07:56 zyngawow: is your source file itself in UTF-8? Aug 09 15:08:00 nseidm1, i'm using the default layout that comes with the listfragment Aug 09 15:08:13 i'm not overriding onCreateView() Aug 09 15:08:18 zyngawow: in compiler settings, configure it to use UTF-8 (-encoding utf-8 on cmdline to javac) Aug 09 15:08:26 p_l, ok, thanks :) Aug 09 15:08:42 then the layout of your views returned by getView in the adapter may be the issue Aug 09 15:09:11 Is anyone going to do this? https://developer.amazon.com/sdk/mobileads.html Aug 09 15:09:25 nseidm1, or maybe the viewGroup in the containing activity I am putting the fragments in? Aug 09 15:09:44 nseidm1, but it works fine before the orientation change Aug 09 15:10:34 on orientation change the loader will hit onFinishedLoad again, is the loader setup right? Aug 09 15:10:46 yes Aug 09 15:10:46 if you are using an adapter to populate a list whose rows contain numberpickers, would it make sense to make the adapter an onchangedlistener for each numberpicker? Aug 09 15:10:56 or the fragment? Aug 09 15:11:00 can somebody help me how i can found to change the style for a spinner like the api demos? Aug 09 15:12:25 SimonVT, I just noticed that i am facing the same issue in a separate tabbed navigation app I created with just textviews. Aug 09 15:12:36 The tabs work fine, except when I change the orientation Aug 09 15:12:50 then the last textview remains on the screen no matter which tab I select Aug 09 15:14:53 p_l, changing the Android Studio encoding to ISO-something and adding that param to javac didnt work Aug 09 15:19:36 SimonVT, I have a linear layout in my containing activity's layout (android:id="@+id/selectableGroup") that I am using to put my fragments in my tab listener. Aug 09 15:20:01 zyngawow: no no, you need to have both the source and javac set to use UTF-8 Aug 09 15:20:57 p_l, tried that too Aug 09 15:21:29 is nobody able to help me? Aug 09 15:22:03 Linkandzelda, what did you ask for help? Aug 09 15:22:04 I'm going to be updating the calendar within my app, are there any apps that have pretty gnarly calendar implementations? Aug 09 15:22:10 the calendar is a schedule in my case Aug 09 15:22:50 sulaiman: I have a service that I need to send a message back to the calling activity once it finishes and then close the activity Aug 09 15:23:08 I've tried using a broadcast reciever in an inner class but that never gets called Aug 09 15:23:16 I cant work out how to use handlers or messengers Aug 09 15:23:44 zyngawow: then no idea Aug 09 15:24:06 maybe you can get around that by loading it from somewhere else, or explicitly setting encoding somewhere Aug 09 15:24:17 after all, Java's internals aren't UTF-8 either Aug 09 15:24:20 Linkandzelda, i am not sure, but have you looked into bound services? Aug 09 15:24:36 sulaiman: I tried to but never understood it or got anything to work Aug 09 15:25:25 cant find any working examples Aug 09 15:25:31 and Im at a total loss Aug 09 15:25:50 its just one thing after another when all I want is a simple thing >_< Aug 09 15:25:53 can you change the color of the line and triangle of a spinner? Aug 09 15:26:16 Linkandzelda, did you try http://developer.android.com/guide/components/bound-services.html Aug 09 15:37:40 checked that out, but it seems to talk mostly about talking to the service where I want the service to talk to the activity Aug 09 15:38:14 is there like a onCalledServiceStopped()? xD Aug 09 15:38:23 that would be sooooo damn useful Aug 09 15:42:53 SimonVT, my intuition was right! I replaced my linear layout with android.R.id.content as the placeholder for my fragments Aug 09 15:43:20 now when I change the orientation, I see both the populated list and the empty text view. I don't know what's going on Aug 09 15:51:52 How do I get my APK file? Aug 09 15:52:00 This is my first android project. Aug 09 15:52:04 benlieb, check your bin folder Aug 09 15:52:06 it's running in the emulator Aug 09 15:52:43 sulaiman: is that file regenerated with every delay to emulator? Aug 09 15:52:52 *deploy* Aug 09 15:53:07 i think whenever you build your code Aug 09 15:53:44 you can generate your apk file from command line too ( ant build ) Aug 09 15:54:02 sulaiman: tnx! Aug 09 15:54:16 ant debug** Aug 09 15:54:46 but you might need to generate the build.xml file Aug 09 15:57:52 I'm using eclipse, so i think that is all done Aug 09 15:58:09 for me Aug 09 15:58:34 The modify date on the file seems to suggest it was generated at last build. Aug 09 16:00:17 sulaiman: I've tried https://github.com/commonsguy/cw-android/tree/master/Service/Downloader using this example with passing the messager with handler to the service, nothing happens ;-; Aug 09 16:05:52 if you have a layout-land directory will those layouts be used automatically when the orientation is changed? or do you need to change them yourself in onorientationchanged? Aug 09 16:06:08 hey guys can I set more then one alarm using the same alarm manager? Aug 09 16:07:43 mmathis, you don't need to do it yourself. It should pick the right layout. Aug 09 16:11:09 mmk, I figured ty Aug 09 16:11:26 anyone here not having problems using his old publisher ids with the new admob? Aug 09 16:16:33 mmathis: depends if you override onConfigurationChanged in the manifest Aug 09 16:16:41 by default, yes Aug 09 16:23:31 nseidm1, I used android.R.id.content as the placeholder for my fragments in my tabbed navigation, as a result of which, my lists are populated on orientation change, however, it also shows the empty text in the background. Aug 09 16:23:41 what may be the cause? Aug 09 16:24:40 navetz: yes you can set as many as you like Aug 09 16:25:31 sulaiman, fragment added to the fragmentmanager are re-created on orientation change.. Do you handle that? Aug 09 16:26:02 sounds like you're doubling up on the fragment Aug 09 16:26:47 snooplsm: thanks Aug 09 16:38:23 if you set an alarm manager to go off at 830 am and it's 3pm, will it go off at 830 am the next day? Aug 09 16:39:23 You don't set alarms to go off at 830 am Aug 09 16:39:38 You set alarms to go off at a specific time and date, or after a defined amount of time Aug 09 16:41:56 SimonVT: ah okay gotcha Aug 09 16:42:09 you making an alarm clock? Aug 09 16:42:23 you give it a long (since epoch). Aug 09 16:44:48 Hey, I'm trying to upload a 65MB file to a server in my app. I use chunked transfer encoding so I won't get an OOM with HttpConnection. Aug 09 16:45:00 The upload starts, but after a few KB, suddenly stops. Aug 09 16:45:08 What could be the reason for that? Aug 09 16:45:49 snooplsm: Not an alarm clock. I'm making a image viewer that has an option to notify users of new images (up to 5 times a day). Each time a new image is ready for viewing the alarm manager goes off and creates a notification. Aug 09 16:46:11 SimonVT, I wrapped the code in onActivityCreated() incised if(savedStateIntance == null), i'll try it out now Aug 09 16:46:17 Also, is chunked the right way to go? Aug 09 16:48:25 why would you get an OOM? Aug 09 16:48:35 Hey guys, I'm getting an error when I do startActivity(intent) to start a class that extends PreferenceFragment. Apparently it cannot be cast to Android.app.activity Aug 09 16:48:46 CocoStorm: ..... Aug 09 16:48:48 HttpConnection buffers the data so it can set the Content-Length header. Buffering 65MB leads to an OOM. Aug 09 16:48:49 Srsly? Aug 09 16:48:51 lol Aug 09 16:48:51 it should only be reading like 5-10kb at a time Aug 09 16:49:13 If I use PreferenceActivity, code is depreceted Aug 09 16:49:19 snooplsm: The while loop does, the HttpConnection apparently doesn't from what I've read. Aug 09 16:49:30 addPreferenceFromResource() Aug 09 16:49:33 Against all logic, PreferenceFragment is a Fragment Aug 09 16:49:36 Not an Activity Aug 09 16:49:43 SimonVT, So what do i do here :S Aug 09 16:49:50 then set the content-length yourself Aug 09 16:49:57 You still show PreferenceFragments in PreferenceActivity Aug 09 16:50:09 snooplsm: I do not know the content-length. Aug 09 16:50:31 File.length() Aug 09 16:50:37 SimonVT, if I have PreferenceActivity and I use addPreferencesFromResource() it says it deprecated Aug 09 16:50:42 setDoOutput(true); Aug 09 16:51:01 https://developer.android.com/guide/topics/ui/settings.html#PreferenceHeaders Aug 09 16:51:05 If you have many preferences Aug 09 16:51:07 getOutputStream(); while(read) { outputStream.write(buf,0,readLength); Aug 09 16:51:11 soemthing along those lines Aug 09 16:51:25 If you don't, who cares if it's deprecated.. You only have a single list of preferences anwyay Aug 09 16:51:26 also this question is probably better answered in ##java Aug 09 16:51:36 That is not the complete length from what I've gathered. A multipart post request includes all the headers etc, BOUNDARY thingies etc. Aug 09 16:52:00 You should also be able to use PreferenceFragment like any other Fragment if you wish Aug 09 16:52:03 no Aug 09 16:52:04 SimonVT, Hmm, okay so I should use the deprecated code and that's fine Aug 09 16:52:31 I don't have many preferences Aug 09 16:52:32 snooplsm: I use the http-requests library. I do not do any of these things myself. Funny things is, I set up a local proxy on my desktop to sniff the Headers etc. It works when I go through the proxy, doesn't if I don't. Aug 09 16:52:38 So I don't think I need headers Aug 09 16:52:42 So I set up a proxy for debugging, but it works when I debug... Aug 09 16:52:50 You could also consider just showing your preferences in a Dialog Aug 09 16:53:10 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Aug 09 16:53:37 Or just using a regular activity where you add your PreferenceFragment Aug 09 16:53:46 SimonVT, Yeah I used to have a drop down menu with a list of preferences and clicking them would bring up a popup which displays on/off Aug 09 16:54:17 I think having a separate activity would be cleaner though Aug 09 16:55:22 snooplsm: I don't see entity-body defined anywhere. Aug 09 16:55:24 SimonVT, So there's no real alternative to the deprecated method? Aug 09 16:55:44 The alternative is a regular activity with a preferencefragment Aug 09 16:55:52 ah Aug 09 16:55:57 How do I clear the stack of my application when I navigate from A to B then to C. I tried adding CLEAR_ON_TOP and ACTIVITY_NEW_STACK flags to the intent that starts C, but I still can go back to B then to A. Aug 09 16:55:57 are you doing a form post? Aug 09 16:56:28 Just remember that if you don't have a lot of preferences, it might not look good having a full screen activity on tablets Aug 09 16:56:28 the body is the content that follows your headers separated by two line breaks Aug 09 16:56:39 Could use the DialogWhenLarge themes in that case Aug 09 16:57:10 SimonVT, ah true Aug 09 16:57:18 thanks SimonVT Aug 09 16:57:23 will look into that Aug 09 16:57:56 I'm doing a multipart POST upload, yes. Aug 09 16:58:49 So yes, multipart/form-data Aug 09 16:59:15 just use httpclient then :-) Aug 09 16:59:20 and there is a plugin for multipart Aug 09 16:59:38 I use https://github.com/kevinsawicki/http-request/ already Aug 09 17:00:20 Convenient API. I'm not sure if _I'm_ doing anything wrong. Because as I mentioned, going through a proxy to sniff the request, it works just fine. Aug 09 17:06:03 Has anyone heard of phones custom skin on Android overriding the dialogs Aug 09 17:06:12 In my case the Huawei Fusion 2 Aug 09 17:06:39 you mean, anyone heard of oems messing things up ? :P Aug 09 17:07:10 g00s: Exactly, just in this certain circumstance Aug 09 17:07:32 g00s: Regarding Play Store Services in emulators; yes, I confirmed it works in API 17+ (Google API images), and not below. Aug 09 17:07:59 Pre-holo they themed everything Aug 09 17:08:15 kjeldahl oh cool, so no hackery involved ? Aug 09 17:08:42 Do apps usually override styles for Dialog, EditText, TextView etc to have a consistent look across devices, platform versions etc? Aug 09 17:09:13 Nope Aug 09 17:09:46 Ok, because in older versions of HTC Sense EditTexts are HUGE, messing with the layout. Compared to AOSP Holo. Aug 09 17:10:20 I'd have thought it's part of a good Theme to deliver a unique design, even when following the Design Guidelines. Aug 09 17:13:07 I can follow the 48dp rythm all I want if device themes mess it up anyway :\ Aug 09 17:13:21 You can do it if you want to, but it's not something apps usually do Aug 09 17:13:33 but the rythm is gonna get u Aug 09 17:13:54 The design guidelines really only apply to holo Aug 09 17:14:31 Not even big ones like Facebook, Twitter or GMail on 4.x? Aug 09 17:14:52 I'd assume Google Maps looks pretty much the same on all 4.x devices. Aug 09 17:15:02 Also YouTube Aug 09 17:15:09 CTs compatable devices must support Holo Aug 09 17:15:16 CTs? Aug 09 17:28:02 Hey guys I have a problem. So I have my main activity which when created, an edit text immediately gains focus from requestFocus(). When I go to the preference page however, the keyboard still shows. Aug 09 17:28:38 I've tried using et.clearFocus() in onPause() and onStop() but it doesn't seem to work. Aug 09 17:29:04 I am puzzled. Now I set OkHttp as the HTTP Client for http-requests and it works. Aug 09 17:29:05 * hackkitten points a LED light on the ground in front of g00s~ Aug 09 17:29:06 Magic Aug 09 17:29:15 hey hackkitten Aug 09 17:29:25 JakeWharton: You guys are wizards! Aug 09 17:29:52 woot Aug 09 17:30:00 glad whatever you're doing worked Aug 09 17:30:23 I still wish I could find out why it doesn't work with the default HTTP Client, even on 4.3 (where I'd think any bugs would be gone by now) Aug 09 17:30:33 hi g00s :D Aug 09 17:31:02 g00s: No hackery, straight up images, just pushed my apk, logged in using the accountpicker from the play services api, and everything works identical as on the device. Aug 09 17:31:13 Heh, I'm trying to upload a big file using Transfer-Encoding: chunked. Didn't work with plain http-requests. Fired up Charled Proxy to debug. Through the Proxy it works. Without the proxy: no dice. Aug 09 17:31:26 kjeldahl i wish the x86 images had that :( Aug 09 17:31:26 Now I threw in OkHttp and out of nowhere, it works. Aug 09 17:31:48 * g00s wants his cake and eat it too Aug 09 17:31:55 * hackkitten hands g00s two cakes Aug 09 17:32:01 So much for using logging levels properly... "Error #200: Your project was uploaded successfully!" Aug 09 17:32:05 g00s: Yeah, those lack everything. Aug 09 17:32:19 HTTP 200 ttly is an error! Aug 09 17:32:34 so fuck it, maybe i need to use the arm emu again Aug 09 17:32:40 uhoh Aug 09 17:32:43 wanted to add maps Aug 09 17:32:49 * hackkitten pokes at the 100 MHz SoC :3 Aug 09 17:33:01 10KhZ :| Aug 09 17:33:06 KHz Aug 09 17:33:13 g00s: It's not too bad for the stuff I'm doing at least, but I've only done simple stuff so far. No maps or heavy calculation/animation. Aug 09 17:33:28 heh Aug 09 17:33:29 maybe if i restrict it to 100 x 100 pixels Aug 09 17:33:37 * hackkitten hugs her 4.3 device Aug 09 17:33:43 JakeWharton: Oh, btw. Coming to .eu this year for a conference? Aug 09 17:33:51 devoxx hopefully Aug 09 17:34:00 hopefull? Aug 09 17:34:03 +y Aug 09 17:34:07 haven't heard back yet Aug 09 17:34:13 i submitted two talks Aug 09 17:34:45 If you're accepted (which should be a no-brainer, really), will you announce it on Twitter? Aug 09 17:35:05 The one in November/Belgium? Aug 09 17:35:11 i thought only celebrities used twitter ? Aug 09 17:35:20 >implying Jake isn't Aug 09 17:35:25 yeah once i know Aug 09 17:36:04 <3 Aug 09 17:36:17 g00s: kittehs use it too :D Aug 09 17:45:57 Im editing a layout with a bunch of gone viewa Aug 09 17:46:08 s Aug 09 17:46:27 Is there any rasy way to make them apprear while developing? Aug 09 17:47:27 i always thought it would have been cool if the widget stuff had some sort of visitor ability () Aug 09 17:47:36 so you could inspect a tag and do something, or move on Aug 09 17:48:11 you could do it yourself by walking the tree Aug 09 17:57:52 JakeWharton: It seems the production server has problems with SPDY once about 35MB are uploaded (not sure where that limit comes from). It exits with INVALID_STREAM coming from SpdyDataOutputStream. Aug 09 17:58:05 I guess .setTransports() with http1.1 is the way to go? Aug 09 17:58:18 (I do not have direct control over the server) Aug 09 17:58:38 yeah that will disable SPDY but it's a shame to do that when the server has support for it Aug 09 17:59:15 Jesse knows more about the SPDY implementation and protocol than I do. You could file a bug with as much data as possible and maybe he'd be able to help. Aug 09 17:59:37 Ok, thanks. Aug 09 18:02:46 what does the &= and the |= operators mean in android java? Aug 09 18:03:21 The same as in non-android Java. Aug 09 18:03:39 or c++ Aug 09 18:03:43 is it possible to open a dialog fragment from a button click in a dialog fragment? Aug 09 18:03:49 is it bitwise? Aug 09 18:04:10 foo &= bar; is the same as foo = foo & bar; Aug 09 18:04:20 Bitwise, yes. Aug 09 18:04:35 csterling123: yes Aug 09 18:04:57 esibehr- thanks. i thought so, but for some reason my new fragment isnt opening Aug 09 18:05:09 at least i know it *should* work Aug 09 18:05:35 Yeah, I've done it before, works the same as the first one you open. Aug 09 18:05:53 ha! my app disagrees Aug 09 18:09:26 Hey guys quick question, how would one update a widget on a button click? I've tried starting a service with an intent but not dice. Aug 09 18:13:03 A button click from the widget? Aug 09 18:13:41 just request an app widget update with new remote views Aug 09 18:13:56 hello Aug 09 18:14:00 and the widget button should point to a service pending intent Aug 09 18:14:27 Do not cancel current when registering Aug 09 18:14:32 dont wanna start a os fight, but can anyone tell me if there is an iOS channel? Aug 09 18:14:39 I'm trying to figure out how I can "listen" to getevent inside of an application Aug 09 18:14:43 try #ios? Aug 09 18:14:56 thedoginthewok, you don't Aug 09 18:15:03 why not? Aug 09 18:15:14 you can exec the command and process it's output stream Aug 09 18:15:17 pfn: how would you do that? Aug 09 18:15:26 that's exactly what I want pfn Aug 09 18:15:31 #ios: Mode lock : +instf ##namespace Aug 09 18:16:05 what I currently have is this Aug 09 18:16:07 ollienx, I just wanted explained what you need to-do, I'm not going to handhold you through all the api calls Aug 09 18:16:14 PendingIntent refreshPendingIntent = PendingIntent.getService(topContext, 0, refreshIntent, 0); Aug 09 18:16:14 views.setOnClickPendingIntent(R.id.refreshButton,refreshPendingIntent); Aug 09 18:16:16 ok fair enough Aug 09 18:16:16 s/wanted// Aug 09 18:16:32 stupid autocorrect Aug 09 18:17:33 also, make sure your widget service is ready before tapping buttons Aug 09 18:17:56 gotcha Aug 09 18:17:56 thanks Aug 09 18:18:02 use a different loading views vs loaded views from the provider Aug 09 18:18:16 I'm sorry what? Aug 09 18:18:21 if you click before it's done loading, you'll get nobreaponse Aug 09 18:18:32 no response Aug 09 18:19:35 specify a different loading layout in your widget xml vs your providers loaded callback Aug 09 18:21:20 ok, got it. thanks. Aug 09 18:26:11 so i'm playing around with a simple widget, its built of a textview, and an imageview. when you tap the image, the number in the textview increments. works fine for a while, then it stops working, from what i've read its because the id of the widget changes, how can i account for this? Aug 09 18:26:42 eppo: in your onUpdate() are you looping through every widget id? Aug 09 18:27:01 yes i am. Aug 09 18:27:24 hmm Aug 09 18:28:18 is onupdate fired if the widget is destroyed and started again? Aug 09 18:28:25 yes Aug 09 18:28:28 I think Aug 09 18:32:31 is there a way to add a listener to another adapter's notifydatasetchanged? Aug 09 18:32:39 How would you improve this sort method? http://pastebin.com/2rxCKRC8 Aug 09 18:36:11 zyngawow: Looks good to me.. But ... (1) I'm still learning this. (2) I might be crazy from staring at Java code.. LOL Aug 09 18:36:32 Bleeptech, seems too long for me... Aug 09 18:36:52 you consider 20 lines long? Aug 09 18:40:18 SimonVT, nseidm1: I figured it out! Aug 09 18:40:42 onActiivityCreated was being multiple times due to my mistake in the tab listener Aug 09 18:41:30 zyngawow: Eek,, WTH Did I do wrong? I'm at >500 lines after subtracting comments and still ~200 lines short to make this work... Aug 09 18:41:31 I was always creating a new a fragment instead of attaching an existing one because of an if statement that was never being executed Aug 09 18:42:01 ollienx, for that simple method.. yes Aug 09 18:42:09 Bleeptech, :3 Aug 09 18:42:30 I'm getting a no empty constructor exception, but I do have an empty constructor, heres the full stacktrace. http://pastebin.com/JKRZSUDu and this is my constructor. Anyone know what I'm doing wrong? public UpdateService(){} Aug 09 18:44:18 Is it a static class? Aug 09 18:47:55 I have a layout that I want to display either A) 4 linear layouts or B) A textview. I toggle them within the same layout by visibility. Whenever I want the TextView only the outer ScrollView must have fillViewport set to True in order to be centered on the page. This however causes only 1 of the 4 linear layouts to be visible in situation A. Setting fillViewport back to false will uncenter the TextView on the page, but show all 4 LinearLayout Aug 09 18:47:55 s. http://pastebin.com/rQq4ytgb Aug 09 18:49:08 Tried just setting gravity? Aug 09 18:49:18 Oh I think I need the 4 LinearLayouts height to be wrap_content Aug 09 18:49:44 hi Aug 09 18:49:58 SimonVT: Gravity won't do it because the TextView is in a LinearLayout which won't stretch to fit the screen Aug 09 18:50:51 Yeah, so have the linearlayout center the textview Aug 09 18:51:35 The LinearLayout won't stretch to fit the screen height when inside of a ScrollView Aug 09 18:51:36 I have boot.img, system.img and etc for SP flash tool. I have imported it to android kitchen, made some changes and got the output zip. how could I flash it to the phone, its a MTK phone and there is no recovery mode Aug 09 18:51:53 Okay setting the height of the 4 LinearLayouts to be wrap_content fixed it Aug 09 18:51:53 It will if you use fillviewport Aug 09 18:52:56 SimonVT: Yes which I wanted, but it was causing issues with my LinearLayouts which was my problem. Aug 09 19:01:24 i want to thank all the beta testers for their hard work http://www.theverge.com/2013/8/9/4605382/nexus-7-suffering-faulty-gps-google-investigating Aug 09 19:05:03 SimonVT sorry my internet died, no it is not a static class. Should it be? Aug 09 19:07:03 zyngawow, improve it by using guava and transformations/foreach Aug 09 19:07:27 also, combine both for (Items) loops into 1 Aug 09 19:09:14 g00s, you know, you don't have to be a prick about it Aug 09 19:16:07 and you know what, I never use the gps on my nexus 7, so to me, it's completely irrelevant Aug 09 19:16:16 not to mention, it's always spot on for me Aug 09 19:16:17 * pfn shrugs Aug 09 19:16:26 pfn a few weeks ago, someone asked if i would get the new n7, i said i would after people beta tested it. its not my fault consumers find this stuff Aug 09 19:16:57 sure, but your attitude about this is completely terrible by your remarks Aug 09 19:17:57 * pfn wouldn't trade in his n7 for anything right now in any case Aug 09 19:18:29 maybe I haven't noticed any gps issues because I've rebooted it fairly regularly because of the dexopt bug and re-installing Aug 09 19:18:44 does december show up in Calendar ? Aug 09 19:18:58 i mean seriously, google needs to change their testing culture here Aug 09 19:20:25 pfn, I have never used that (guava and transformations/foreach). Do you know any good links that explain them? Aug 09 19:20:43 and then the clipboard listener bug Aug 09 19:21:19 bugs happen Aug 09 19:21:23 regardless of the amount of testing Aug 09 19:21:30 some bugs ship anyway Aug 09 19:21:34 because of scheduling Aug 09 19:21:39 it's the nature of software development Aug 09 19:21:42 well, i hope its not like the older samsung gps bugs Aug 09 19:21:44 releases are never bugfree Aug 09 19:21:54 regressions should be extremely rare Aug 09 19:22:11 zyngawow, no, any sort of functional programming primer Aug 09 19:23:31 g00s, products with a large consumer base see more attention, that's all it is Aug 09 19:25:15 g00s, as for gradle bugs... well, first, you're an early adopter, second, it's barely even beta, but rather an early preview, your bitching and moaning really is out of place Aug 09 19:25:44 we're not talking about gradle Aug 09 19:25:53 if i want to return to the activity one level below the current activity...what would i search in the API reference guide to find the method? Aug 09 19:26:07 yeah, but your mention of "google needing to re-evaluate their qa" does relate to the android gradle plugin Aug 09 19:26:17 because you spend a fair amount of time bitching about google's qa of that piece of code as well Aug 09 19:26:42 so that factors largely into your comments on google qa Aug 09 19:27:18 it just seems to be google's android team doesn't have a well institutionalized qa function Aug 09 19:27:27 Guys, any idea why this encryption / decryption works sometimes, but doesn't work sometimes? I'm using the same code on android and in j2se. http://pastebin.com/cKvrXW7z Aug 09 19:27:31 of course, you can't test quality into a product Aug 09 19:27:34 which is the other problem Aug 09 19:27:46 Xerixe, be specific Aug 09 19:28:31 as in, sometimes the bytes encrypted by the android app cant be decrypted by the java application. Aug 09 19:28:38 be more specific Aug 09 19:29:16 Hi guys, I'ld like to ask your opinions on a problem I'm dealing with. Aug 09 19:29:17 In my app, I'm downloading a JSON of 1MB with 2600 items and parsing them into Java objects. On my emulator with Android 2.3 (heap size 16MB), I get an OutOfMemoryException. Should I use a stream-based json parser like Gson, or is the rest of my app just using too much memory? Aug 09 19:29:19 for that matter, are ciphers thread safe? Aug 09 19:29:28 if not, threading may play into this Aug 09 19:29:47 wouterP, I'd say a stream-based parser is a good idea for large documents Aug 09 19:30:09 wouterP, also, take a heapdump to see what's eating memory to be certain Aug 09 19:30:46 hmm, is there a way to encrypt and decrypt in a way it will always return the same encrypted/decrypted bytes for a value. that's what i'm looking for. but i can't seem to do that. Aug 09 19:31:00 Xerixe, that's what you have now, basically Aug 09 19:31:10 but it doesnt unfortunately Aug 09 19:31:13 Xerixe, but if you're using it concurrently, you'll likely be corrupting data Aug 09 19:31:33 simple, write a test case with some test vectors Aug 09 19:31:39 your input should always match your output Aug 09 19:31:53 rather, should always be consistent Aug 09 19:31:55 Hm, so basically, it's threading then? Aug 09 19:32:03 pfn: do you think gson is a good idea then? On first sight, it's not that easy to use Aug 09 19:32:04 Xerixe, maybe, I don't know if you are threading Aug 09 19:32:11 wouterP, gson is very easy to use Aug 09 19:32:35 at least in its typical deserialization mode Aug 09 19:32:47 the application is multithreaded, but the same cipher is used for all threads Aug 09 19:32:58 then it's likely because of threading Aug 09 19:33:07 is it cpu heavy to keep re-initing a cipher? Aug 09 19:33:15 not particularly Aug 09 19:34:13 even if there's a chance it has to be reinitialized at 100x/s? Aug 09 19:34:34 then use a threadlocal cache of it Aug 09 19:34:51 in any case, use a profiler/trace function to see what eats up cpu in practice Aug 09 19:34:57 then you can make a decision about it Aug 09 19:35:05 hmm, okay. thanks a bunch! Aug 09 19:37:01 I have boot.img, system.img and etc for SP flash tool. I have imported it to android kitchen, made some changes and got the output zip. how could I flash it to the phone, its a MTK phone and there is no recovery mode Aug 09 19:38:34 #android-root Aug 09 19:38:44 pfn: I got this error: Expected BEGIN_OBJECT but was NAME at line 1 column 3 Aug 09 19:38:45 I'm using this JSON http://goo.gl/BpCXUD , with this code https://gist.github.com/wpinnoo/6196514 Aug 09 19:38:49 Any idea what I could be doing wrong? Aug 09 19:39:18 is there a way to set a default padding/margin between all children in a linearlayout? Aug 09 19:40:06 oh nvm Aug 09 19:40:13 just had to look a little harder Aug 09 19:41:37 God I fucking love my Das Keyboard Aug 09 19:42:01 mechanical keyboards are pretty great Aug 09 19:47:02 wouterP: I don't think you should be using JsonReader with gson.. Isn't any reason to at least.. And you certainly shouldn't call beginObject Aug 09 19:48:42 SimonVT: I recently read that on https://sites.google.com/site/gson/streaming (the JsonReader) Aug 09 19:49:21 and because the 'array' in my json is the value of "IVAGO-Stratenlijst", I thought I'ld have to use beginObject instead of beginArray, but I may be wrong Aug 09 19:50:50 wouterP do you control the service, or is this somebody else's sevice ? Aug 09 19:51:10 So, I tried making an emulator to test the app I made in Android Studio (called it HelloWorld) and I tried to start it up but I keep getting this message: Aug 09 19:51:13 DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.techkid6.helloworld" Aug 09 19:51:17 Device is not ready. Waiting for 20 sec. Aug 09 19:51:29 g00s: unfortunately, the JSON is not mine, I'm just using it Aug 09 19:54:21 SimonVT: you where right. Removing beginObject did solve the problem. Thanks all !! Aug 09 19:54:33 were * Aug 09 20:02:06 techkid6: Do you have a device plugged in? Is it set up for USB debugging? Aug 09 20:23:10 ian_ford: its an emulator Aug 09 20:24:14 :( whenever my phone is in landscape and I try to replace a fragment, it just puts the new fragment on top of it Aug 09 20:25:05 techkid6: Is your debug configuration set up properly? Aug 09 20:25:54 I don't know... how would I check this? Aug 09 20:32:34 oh... so that's why you check if the savedinstance is null Aug 09 20:32:39 how about that Aug 09 20:58:11 i'm really liking sublime more and more. i like ST, vim, and emacs equally, but ST just has great 'mini-IDE' support for stuff like projects without having to use crap like ctags Aug 09 20:58:25 great for browsing the iosched code Aug 09 20:58:51 click on file, it shows, click on another, it replaces the existing - so tabs don't start multiplying Aug 09 20:58:59 double click really opens the file Aug 09 21:00:11 hrm i should give it a try. i use android studio for my projects, but browse AOSP code all the time just using terminal + vim Aug 09 21:00:48 yeah, i use ack / Ag and vim too to browse AOSP too Aug 09 21:00:59 ugh, too much Aug 09 21:01:34 yeah, i have it on an SSD so ag is nice and fast Aug 09 21:01:39 still a huge project to search through though Aug 09 21:01:53 I usually git grep Aug 09 21:01:56 lots of git grep Aug 09 21:01:58 if they go out of business, who cares, it will be sad - but i've gotten productive with it in less than 10 minutes Aug 09 21:02:00 g00s/kevinb: I'm using emacs with ggtags and the GNU Global (gtags) package. On any class, press M-. and it jumps to the Android source code. Aug 09 21:02:29 any ideas why I get "invalid resource directory name: /blah/blah/res/values-w480dp" when running apktool build? Apktool v1.4.3, aapt 0.2 Aug 09 21:02:34 i briefly tried to setup ctags but still resorted to using ag Aug 09 21:02:42 But I agree, it should be easier to set up. Aug 09 21:03:10 kjeldahl hah, i'm looking to set up my emacs using this http://paradigmx.net/blog/2013/04/01/clojure-toolchain-reloaded/ for clojure Aug 09 21:03:50 rebuilding the indexes is kinda lame (using ctags/ cscope) is there any inotify project that does it automatically ? Aug 09 21:04:23 Ok, just in case anybody haven't seen it yet, here's my setup: https://github.com/mariusk/android-with-emacs Aug 09 21:05:16 kjeldahl :D Aug 09 21:05:49 g00s: Are you going to use Clojure for apps, or just the backends? Aug 09 21:05:56 backends Aug 09 21:06:22 is there another way to make an apk debuggable without having to repackage it? Aug 09 21:06:27 clojure runtime needs to start up in less than 10 minutes on android to be useful Aug 09 21:06:47 g00s: Makes sense. I'm split between node.js/Clojure/Go already. All my backends suck, and will remain to do so until I have moderate success. THEN I'll rewrite. ;-) Aug 09 21:06:58 (on the backends I mean) Aug 09 21:07:18 go is a nobrainer, deploy apps on appengine Aug 09 21:07:18 i'm curious about Go Aug 09 21:07:23 can you call setRepeating on the same alarm manager more then once? Aug 09 21:07:25 instant scaling Aug 09 21:07:42 * pfn & Aug 09 21:07:52 i'm not so sure about the whole node.js thing Aug 09 21:08:04 or do you have to create a new alarm manager for each alarm you want to set Aug 09 21:08:25 I think the Go language looks like crap (compared to the elegance of the lispy stuff), but it gets the job done efficiently, and seem to have great Google backing. Aug 09 21:08:45 And great concurrency primitives. Aug 09 21:10:31 kjeldahl yeah, i was considering a toy project to implement a mqtt broker in go, but mosquitto is good enough - not sure what point it would serve Aug 09 21:10:47 beside educational Aug 09 21:11:53 Yeah, that's always the tradeoff. It ususally has to be A LOT better to make up for the cost of learning something new. Aug 09 21:13:02 kjeldahl i'm using mosquitto as a replacement for logcat atm; i send my logs via mqtt Aug 09 21:14:35 whats nice is i can also send command back to the mqtt client (which is the andoid app). i was using guava eventbus but replaced that with an in-proc like eventbus thats works closely with the mqtt broker Aug 09 21:15:28 i'd open source more stuff but dont feel like dealing with headaches of supporting it, maybe i will put it on github. my weekend project is this android gradle plugin to rasterize my inkscape stuff Aug 09 21:16:19 sound great, I'm not quite there yet. Aug 09 21:16:48 me neither :P Aug 09 21:16:57 re Aug 09 21:20:22 * kjeldahl heads off to catch up on some sleeping. Aug 09 21:20:29 gnight Aug 09 21:20:41 nite all Aug 09 21:22:38 any ideas why I get "invalid resource directory name: /blah/blah/res/values-w480dp" when running apktool build? Apktool v1.4.3, aapt 0.21 Aug 09 21:23:00 aapt 0.2 not 0.21 Aug 09 21:34:29 because you need a newer version of apktool and/or aapt? Aug 09 21:38:06 lies Aug 09 22:06:31 I'm sorry folks but being that English is not my 1st nor 2nd language i don't know how to properly search for stuff i'd like to make. Can you please give me a tips maybe ? -> I'd like to make an app for our custom CMS. Aug 09 22:07:39 create a mobile-web version of the CMS Aug 09 22:07:52 this isn't the sort of thing that lends itself well to a native app Aug 09 22:08:33 today is one of these days... Aug 09 22:09:55 g00s, dear god ... why didn't i think of that already ... that way we'll not be tied to only android platform :x Aug 09 22:09:59 thanks :$ Aug 09 22:11:28 whats wrong rallat Aug 09 22:11:47 shigeru: fires everywhere :) Aug 09 22:12:16 x_x Aug 09 22:12:26 this code is on fire bumbumbum Aug 09 22:13:53 Who do I talk to about instagram API? (Particularly all I want to display is display a single user's feed) Aug 09 22:18:05 Hey guys, I'm trying to make a holo light theme for my app so users can switch between light and dark. I'm having issues with the actionbar.. The text app title doesn't appear ( I assume it's text is in black instead of white) and the custom gradient I've made for it doesn't appear either? http://pastebin.com/tWR3tWke Aug 09 22:19:57 Hello, Aug 09 22:25:57 Anyone? Aug 09 22:26:00 :) Aug 09 22:26:49 test Aug 09 22:26:52 sweet <3 Aug 09 22:27:52 Well yeah, the text is black with a light theme Aug 09 22:29:45 oh Aug 09 22:29:59 When the background is light it kinda has to be Aug 09 22:31:36 SimonVT, I was looking at the bottom of this http://developer.android.com/design/style/themes.html So where would I set the textcolor Aug 09 22:32:10 You'd use the DarkActionBar theme if you want a dark action bar Aug 09 22:33:31 i have a glsurfaceview on an activity running a game, but when i switch activities and go back, the game state is re-initialized Aug 09 22:33:41 how can i save the previous state? Aug 09 22:34:26 i was messing around with onPause() but i think i dont know enough to solve this Aug 09 22:37:20 SimonVT, I've changed the theme to Holo.Light.DarkActionBar but it still is black Aug 09 22:38:30 No, DarkActionBar has a dark background and white text Aug 09 22:39:23 SimonVT, For the Action bar right? that's what I want Aug 09 22:39:27 but the text is still black for some reason Aug 09 22:40:13 Why the hell, instagram needs an OAuth token to get your own media? Aug 09 22:40:34 Yes, for the action bar Aug 09 22:40:43 test Aug 09 22:40:53 If the text is still black, then you're doing it wrong Aug 09 22:41:31 SimonVT, Haha, I know I just can't figure out what, been at it for about 2 hours :'( Aug 09 22:45:06 I'll just leave this here in case someone can get it http://pastebin.com/wVipnN0m Aug 09 22:48:26