**** BEGIN LOGGING AT Mon Apr 20 02:59:58 2015 Apr 20 03:01:01 because of the way android is focused around sending to updates to gplay is it worthwhile to implement continuous delivery on an android project Apr 20 03:01:30 or is it better to focus on a more traditional release model? Apr 20 03:02:28 mrfu maybe you will like http://stablekernel.com/blog/deploying-google-play-continuous-delivery-android-part-4/ Apr 20 03:05:41 the only bad thing about the gplay alpha/beta system is it requires users to be clever enough to follow directions Apr 20 03:05:47 thanks g00s, that was a good article Apr 20 03:05:49 the number of users who do not is... unsurprising Apr 20 03:06:05 i'll check out the linked posts there too, we are currently using travis Apr 20 03:06:16 looks like he has one on their CI stuff Apr 20 03:07:01 dragorn using gplay alpha/beta, do you recommend google-groups or google+ ? Apr 20 03:07:21 g00s, i didn't know it worked w/ groups. I think i started using it right at the beginning when it was g+ only Apr 20 03:07:23 i'm finding shockingly little discussion around continuous integration on android unfortunately Apr 20 03:11:04 yeah ... seems like it could be *a lot* easier - just get rid of groups all together, if its a private alpa/beta Google Play should show 'Request invite' which i could take care of in my console Apr 20 03:12:11 i hope ellie powers has lots of good news at i/o ... Apr 20 03:13:23 otoh i guess its nice with group communication Apr 20 03:14:41 * g00s wonders when google groups will shut down, i can't see how its making google money Apr 20 03:15:56 g00s, i figured it was a symptom of "thou shalt g+" Apr 20 03:32:40 g+, twitter, facebook ... 'stuff I've never used' :p Apr 20 03:33:07 * capella is an anti-social luddite :) Apr 20 03:33:52 * capella goes back to his silent b/w film Apr 20 03:46:39 capella: hear hear Apr 20 04:48:18 Have anyone Android 2.2 (API 7 or 8) and want to help testing my app ? (I want to check old Android compatibility, but I don't have specified device) Apr 20 04:49:55 wait for the attacks ... Apr 20 04:50:06 not Apr 20 04:50:56 My app is open-source, one question: Maps API support Android 2.2+ ? Apr 20 04:51:56 Narzew: just use an emulator Apr 20 04:52:57 better grab those froyo emus while you can, seems they are the last one on the list Apr 20 04:54:00 I should download whole Android API8 package or only emulator is needed ? Apr 20 05:07:00 @Narzew - Just download the SDK Platform Apr 20 05:07:30 For api 8, use the SDK manager in Eclipse/Android Studio Apr 20 05:10:03 wow ! i just noticed this --- you can't download honeycomb from the SDK manager (9, 11-14) are missing Apr 20 05:10:15 RIP HC :) Apr 20 05:10:52 what's honeycomb? Apr 20 05:10:59 14 is ics Apr 20 05:11:13 but it was only ever on the Galaxy nexus Apr 20 05:11:14 and 9 is GB, i was just pointing out Apr 20 05:11:22 g00s: more like good riddance, HC :) Apr 20 05:11:48 JesusFreke :D Apr 20 05:12:09 the windows ME of android Apr 20 05:24:42 "Columbia Engineering Professor Invents Video Camera that Runs without a Battery" wow Apr 20 05:25:33 but wasnt how the first video cameras operated? Apr 20 05:25:47 by spinning the handle Apr 20 05:26:27 it will be great for phones someday, the camera will help charge the phone Apr 20 05:26:46 which it does is combine two types of diode. Apr 20 05:27:07 so its a solar cell mixed with a light sensor Apr 20 05:27:18 obvious in hindsight :) Apr 20 05:27:25 Chainfire http://www.gizmag.com/camlet-mount-dslr-smartphone-tablet/37066/ Apr 20 05:29:02 man as is so slow i can barely useit its like the days of 2400 baud Apr 20 05:29:31 you've bumped up the heap size? Apr 20 05:29:35 300 baud... we just talked about this Apr 20 05:29:53 its not bad until you use VNC over 300 baud :) Apr 20 05:30:06 yeah Apr 20 05:30:17 but like i delete a line and the mouse staggers for a second Apr 20 05:30:27 or intellisense takes 3 seconds to pop up and everything hangs will it does Apr 20 05:30:43 with my 2009 mbp, i'll often type ahead of the cursor. its pretty bad Apr 20 05:30:58 and then i won't see anything, so i stop typing Apr 20 05:31:01 and then it catches up Apr 20 05:31:06 weird. I've never had any performance issues Apr 20 05:31:40 JesusFreke you probably have a better machine tho :) Apr 20 05:31:57 it only got this bad after updating to 1.3 Apr 20 05:32:01 err 1.2 ver 3 Apr 20 05:32:16 but i have finally put down the mediaplayer Apr 20 05:32:56 lasserix emotionally scarred from it ? Apr 20 05:33:23 a little but it feels like finally getting laid after being teased by a girlfriend for weeks Apr 20 05:33:36 finally can sleep peacefully tonight Apr 20 05:33:43 ah so you got it working ? Apr 20 05:33:51 yeah everything is done with it Apr 20 05:34:13 and its set up so when i have to implement the other videoplayer thingy it'll be very easy to subclass and just ad the extra overlay infop Apr 20 05:35:05 rxjava would have made it easier i gota spend some time workign with that, had to add debounce logic to a couple of the things Apr 20 06:24:09 "Two men in Tulsa, Okla. were hospitalized on Friday after stabbing each other in a fight over the superiority of iPhones versus Android devices" Apr 20 06:26:07 it's the modern ford vs chevy Apr 20 06:26:53 that's silly Apr 20 06:27:01 I wouldn't stab iphone users! Apr 20 06:27:37 I have slightly more self control than that Apr 20 06:28:30 whats the android fan going to do when the nurse stops by with an iPad Apr 20 06:29:31 stab the nurse? Apr 20 06:30:03 g00s: hahah Apr 20 06:30:17 physicians use iPads in hospitals heh Apr 20 06:31:06 ipads are used everywhere official... android has a massive PR issue D: Apr 20 06:31:28 android tablets have a massive software issue Apr 20 06:31:54 google had a great tablet ui and then scrapped it in 4.2 :P Apr 20 06:31:58 i think it is just esier to develop official for ipad cause no fragmentation Apr 20 06:32:22 there are also alliances apple has with IBM, and using watson in healthcare, etc Apr 20 06:33:03 but apple spend a lot of money in 2011 timeframe going after certain sectors, medical was one Apr 20 06:34:20 it's a smart move... go after the industries that are very slow to change tech-wise Apr 20 06:34:30 I guess all the hospitals have ipads and windows xp now Apr 20 06:35:04 https://www-03.ibm.com/press/us/en/pressrelease/46580.wss Apr 20 06:35:48 "IBM and Apple will expand their partnership with IBM Watson Health Cloud to provide a secure cloud platform and analytics for Apple's HealthKit and ResearchKit. This will support health data entered by customers in iOS apps and also arm medical researchers with a secure, open data storage solution with access to IBM's most sophisticated data analytics capabilities" Apr 20 06:36:10 lol "open platform" Apr 20 06:36:55 healthkit is on githubhealthkit is open source Apr 20 06:37:45 oops - not on github Apr 20 06:39:41 ok, researchkit is open source. i don't know the difference between the 2 frameworks though Apr 20 06:40:04 * lizzie shrugs Apr 20 06:40:08 well ok Apr 20 06:40:14 so is there an android version? Apr 20 06:42:27 https://github.com/researchkit/researchkit Apr 20 06:42:38 lizzie you'll have to start one ! Apr 20 06:43:05 08:31:54 google had a great tablet ui and then scrapped it in 4.2 :P Apr 20 06:43:08 exactly Apr 20 06:43:16 I remember ICS on my old tablet Apr 20 06:43:20 but I have to make the world's best podcast program! Apr 20 06:43:40 nyuszika7h what did they change ? Apr 20 06:43:49 nyuszika7h: know how I weaned myself off tabletui? I got a rom with a pie menu and banished the navbar Apr 20 06:44:20 g00s: there is lots of wasted screen space in landscape mode on settings, for one Apr 20 06:44:45 lizzie: I got used to the new UI pretty fast, but it's annoying sometimes Apr 20 06:45:03 have to go now Apr 20 06:45:07 nyuszika7h: I can't stand having 2 ever-present software bars Apr 20 06:45:15 huge amount of wasted screen space Apr 20 06:48:17 Hi all Apr 20 06:48:45 Am I alone thinking that dagger is kind of intrusive when you are unit testing your classes? Apr 20 06:49:33 It's almost as if you're thrusting a dagger in them. Apr 20 06:50:19 Papipo: How so? Apr 20 06:50:43 Well, several solutions come to my mind Apr 20 06:50:54 but out of the box, injection just won't work Apr 20 06:50:59 for example Apr 20 06:51:09 (Using dagger 2 here) Apr 20 06:51:34 if I use field injection, when calling component().inject(this), I get a NullPointerException Apr 20 06:51:58 because the component hasn't been initialised (the App onCreate method never runs when unit testing) Apr 20 06:52:28 A solution is to initialise the component on the component() method itself, lazily Apr 20 06:52:34 Then do your injection somewhere else Apr 20 06:52:36 but then on each call to component() there is a null check Apr 20 06:53:20 so you mean that I should modify my application structure to fit unit testing on it? Apr 20 06:53:23 You need a component, at runtime it's coming from your app, for tests, it comes from somewhere else Apr 20 06:53:32 well Apr 20 06:53:42 in the class under test I call App.component().inject(this) Apr 20 06:53:48 instead of that, what I am supposed to do Apr 20 06:54:05 Well, I guess I can have some sort of Graph class Apr 20 06:54:11 Set up your component in your @BeforeClass for example Apr 20 06:54:32 so App should have a setter for the component? Apr 20 06:54:39 just for testing? Apr 20 06:56:34 Hey guys how I have 1 grid layout and it has 2 relative layouts. I trying to make the two relatives to be side by side using weights http://pastebin.com/izHxA8mM but its not working... what I doing wrong? Apr 20 07:01:41 anyone please? I trying for hours :) Apr 20 07:02:44 I have ended up creating a static class just to hold the component, and it can be initialised from anywhere Apr 20 07:02:58 way better than doing it directly on the App class Apr 20 07:04:53 Papipo maybe check out some open source apps using dagger Apr 20 07:05:33 many have a debug variant which has its own graph, but they use it for instrumentation testing Apr 20 07:05:47 I haven't seen any with a "test" graph Apr 20 07:07:49 Almis90, what's your minSDK? Apr 20 07:08:30 layout_columnWeight is API21 only, if that's all your layout, why not use a linearlayout instead of gridlayout? Apr 20 07:13:28 iprime yes its 21 Apr 20 07:13:57 ipme not this is just example I will also use imageview and maybe another textview Apr 20 07:16:01 I trying to do tiles like windows phone http://blog.tinydeal.com/wp-content/uploads/2012/07/xl_Microsoft_Windows_Phone_8_s.jpg Apr 20 07:16:55 Almis90 you'll want to use a dedicated view for that, there are a few Apr 20 07:17:48 uh oh, windows on android :) Apr 20 07:18:18 Almis90, if it has to be dynamic you could look into creating a custom layout manager for a recyclerview Apr 20 07:19:40 from scratch its pretty difficult, to get the moving / resizing Apr 20 07:19:59 I think gridlayout is the simplest solution, it will not be dynamic, they cant move them Apr 20 07:20:54 I just want 3x2 table and the second row to have columspan 2 Apr 20 07:21:53 hm, i thought it was on here but can't find it Apr 20 07:21:55 https://android-arsenal.com/free Apr 20 07:23:33 Almis90 see the libs inthe section of https://android-arsenal.com/details/1/187 Apr 20 07:24:28 g00s wow thank you for the link, this and the AsymmetricGridView its maybe what I need. Apr 20 07:32:15 lizzie: expanded desktop Apr 20 07:32:27 I find pie controls annoying Apr 20 07:32:36 aw I like them Apr 20 07:32:51 they're hard to use Apr 20 07:33:10 easy to accidentally select something elsr Apr 20 07:33:12 *else Apr 20 07:33:56 hey guys Apr 20 07:35:40 I have a simple app that uses the DrawerLayout. I wanted to make user able to switch between the screens but couldn't find how to use activities with the same DrawerLayout. Apr 20 07:36:23 My solution is to add 3 layouts for the main view and hide 2 of them to display only the current Apr 20 07:36:27 is it very hacky? Apr 20 07:41:03 hmm? Apr 20 07:41:10 any1 alive? =] Apr 20 07:43:10 Anyone have advice on mediaplayer throttling seek? Apr 20 07:43:17 guess i shoudl debounce that too Apr 20 07:45:45 feedback time. I've made an activity animation. It basically creates a bitmap from a view draw cache and parse it to the new activity where it then puts in on top of the existing layout. From there I can use it as a mask by simply cutting it and animating it. Apr 20 07:46:25 but since it creates a bitmap, it does come with a good amount of overhead. Nothing the GC can't handle, but still quite some peaks. Is there a better way of doing this? Apr 20 07:47:52 hTmlDP, use fragments Apr 20 07:48:15 iprime: well, what about FroYo then? Apr 20 07:48:22 iprime: +any good tutorial? Apr 20 07:48:43 iprime: does it handle the back key automatically Apr 20 07:49:00 hTmlDP, no idea about tuts, back key: sorta Apr 20 07:51:00 I'm writing an app (as an exercise) to load photos from phone in a "gallery". The main activity gets the thumbnails from MediaStore, while the detail activity loads the clicked image + some metadata with a custom content provider. So far so good! But, the course requires I add an AsyncTask, but I'm not sure what I could have it do. Any suggestions? Remember, it's a course prerequsite to include an AsyncTask Apr 20 07:52:10 I'm not loading any content from the web. Just reading the pics from the phone, and getting/setting some meta data (EXIF tags) on a single image. Apr 20 07:56:01 What about "refreshing" the MediaStore (thumbnails)? If I take a photo w/camera while my app is running, I notice that the new photo is not automatically added to the gallery Apr 20 07:56:51 so, I could perhaps periodically refresh the MediaStore (if that makes sense). Otherwise, I guess I should really use broadcast intents to achieve this; have my app listen for events fired by the camera... Apr 20 07:59:15 joakimk_, read the info about the thumbs in an asynctask Apr 20 07:59:23 uoi can register a content observer Apr 20 08:00:59 iprime: could you please elaborate? :) What info do you mean? Apr 20 08:02:20 lasserix: so, I'd register a content observer to the "root uri", MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI ? Apr 20 08:02:48 i mean where you query and iterate over the result, this should preferably happen off the main thread Apr 20 08:05:03 iprime: I see what you're saying. Very new to Android programming, so please bear with me ;) What I'm doing now, is to have my fragment load the thumbnails in onCreateLoader, i.e. with a CursorLoader. Does that, then, happen on or off the main thread? Apr 20 08:05:55 oh Apr 20 08:06:02 so you're good Apr 20 08:06:10 :D Apr 20 08:06:29 you're too good for that course... Apr 20 08:07:27 hehe, I'm following the outline we worked through for the course app. Applying stuff to my app. So can't take too much credit! But I have learned to do things the right way, apparently :) Apr 20 08:08:10 joakimk_: yeah, then when it triggers you need to restart your loader Apr 20 08:08:17 but I still lack an AsyncTask for my app, formally at least. I'm trying to find some task it can do, but it's not so easy. Apr 20 08:08:29 the loader is a specialized async task Apr 20 08:08:45 lasserix: thanks! Still, what about doing it the odd way, and have a manual refresh tucked away in an asynctask? ;-) Apr 20 08:08:45 i think it even starts an async task under the hood Apr 20 08:08:51 yeah? Apr 20 08:08:56 not 100% sure Apr 20 08:09:11 joakimk_: a cursor loader is an async task with more specialized callbacks Apr 20 08:09:16 I see :) Apr 20 08:09:28 instead of doInBackground -- the cursor part is that, then onPostExectures is finished/cancelled Apr 20 08:09:49 still, the course requires me to implement either a SyncAdapter, IntentService, or AsyncTask... Apr 20 08:10:02 if you want a async task to use, make your imageviews lazy async Apr 20 08:10:06 explicitly so, not "just" implicit (in the cursor loader) Apr 20 08:10:57 please note, I need something *simple* for my asynctask -- preferrably something only loosely coupled to the app as it is now. Deadline approaching ;) Apr 20 08:11:47 so, is it possible to have a "refresh" menu item trigger an asynctask to reload the thumbnails? Apr 20 08:11:50 add such that you pick an image and then do something to the bitmap Apr 20 08:11:57 joakimk_: your loader already does that Apr 20 08:12:13 you should ask if the loader qualifies as an async task since it is one Apr 20 08:12:17 but, I took a new photo with the camera, while my app was running, and the new pic did not appear ... Apr 20 08:12:23 I see :) Apr 20 08:12:33 it is even more complicated than one Apr 20 08:12:44 yeah you need to register the content observer Apr 20 08:12:54 aha Apr 20 08:13:16 requiering with an async task would defeat the point of the loader Apr 20 08:13:32 sure! Apr 20 08:13:35 you could implement your own content observer Apr 20 08:13:39 as an aync task if you wanted Apr 20 08:13:49 basically just do a query on mediastore, count number of images Apr 20 08:13:54 see if that changes Apr 20 08:14:01 you might need to also look at a version number since Apr 20 08:14:06 add + delete = same number Apr 20 08:14:16 then if there is a change (you can return boolean for async task) Apr 20 08:14:21 you can refresh your loader Apr 20 08:15:12 so when you start fire off an async task that: queries mediastore for images, grabbing all primary keys and date taken Apr 20 08:15:14 Does anyone know the name of the Android Studio plugin that prompts you with hotkeys to use when you manually do something? Apr 20 08:15:27 then when the user takes a pic, you can fire off another one and compare the two lists, if there is a change, refresh your loader Apr 20 08:16:26 key promotor Apr 20 08:16:28 liuwenhao: Apr 20 08:17:03 Thank you lasserix Apr 20 08:17:16 is it worth using? it looks good Apr 20 08:17:33 lasserix: thanks! Looking into it now :) Apr 20 08:18:05 joakimk_: that's a bit complicated though, you might be better off with like doing a dummy upload to a server of a chosen pic Apr 20 08:19:09 lasserix: hm! That's s good idea! Apr 20 08:20:29 Anyone know a good IRC channel for developing chrome plugins? It's something i am interested in Apr 20 08:20:57 i found #chromium but wondering if there is any more Apr 20 08:22:33 nevermind, found it. It's #chromium-extensions Apr 20 08:22:51 still, maybe I'm thinking of a simpler approach. Wouldn't doInbackground() just query the MediaStore -> count. Then, onPostExecute() could just trigger restartLoader() Apr 20 08:22:51 ? Apr 20 08:23:02 if count != count_mem, that is Apr 20 08:23:09 What is it with TouchListeners recieving TOUCH_UP with no corresponding TOUCH_DOWN? Apr 20 08:23:26 Since I can't use "localhost" to connect to a running local server from an emulator or connected device, what's the best way to configure this so it doesn't have to be changed? Apr 20 08:23:42 lasserix: I'll post a paste, perhaps you could take a quick look? Apr 20 08:23:56 joakimk_: sure but what happens if the user takes a picture and deletes a picture? Apr 20 08:24:26 lasserix: doesn't have to be perfect. Just have to include an asynctask... sorry for the less-than-great motivation here Apr 20 08:24:48 but, of course, I could improve the logic for when data actually has changed, yes :) Apr 20 08:25:22 but this would be including an asynctask, with at least *some* reasonable functionality Apr 20 08:25:55 as mentioned the loader is an async task Apr 20 08:26:01 What is the minimum version of Android you would recommend supporting for a new app? Apr 20 08:26:14 yeah, but I'm not implementing that async task myself... Apr 20 08:26:24 not arguing with you, but you see the point? :) Apr 20 08:26:51 sure Apr 20 08:29:47 although theres still 5% 2.3.x devices, screw them Apr 20 08:29:59 start with android 4.0.x Apr 20 08:30:26 Every time I implement OnTouchListener, I get random ass ACTION_UP's Apr 20 08:32:48 I would just buffer out the erroneous ones but without any corresponding action down, It's too f@&*ed up Apr 20 08:46:26 lasserix: you still here? :) Apr 20 08:46:30 please have a look at http://pastebin.com/FTdG8Tj7 Apr 20 08:47:44 note, it's a bit quick, and I messed up the "signature" on the AsyncTask. Essentially, it should take no parameter (Void), but doInbackground() should return an Integer, right? And onPostExecute() should return a Boolean? Apr 20 08:48:22 as I recall, it's onPostExecute() which is returned upon calling execute() ? Apr 20 08:48:43 umm columncount? Apr 20 08:49:06 sorry! but you see what I'm aiming for :) Apr 20 08:49:24 all that matters is the params and what you return unless you want a proress callback Apr 20 08:49:26 getCount :) Apr 20 08:49:57 you should probably pass in the content resolver instead of setting context as a class member Apr 20 08:50:11 if that method took 10 seconds to complete and the user exited the app it would leak the context Apr 20 08:50:19 so pass content resolver as your param Apr 20 08:50:22 ok Apr 20 08:50:26 as param to execute, then? Apr 20 08:50:42 yeah Apr 20 08:51:43 then that becomes a parameter to doInBackground() ? What's the appropriate signature then? doInBackground(ContentResolver... params) ? Apr 20 08:52:02 plus I'll do Cursor c = params[0].query(baseUri, null, null, null, null); Apr 20 08:52:04 proabbly dont remember Apr 20 08:52:12 Can someone think of a reason why a drawable would have a black background on one device, while it doesn't on all others? Apr 20 08:52:40 lasserix: then the signature becomes, AsyncTask Apr 20 08:53:04 Syzygy: the others are racist Apr 20 08:53:31 Apr 20 08:53:41 unless you want the number back Apr 20 08:53:47 very helpfull Apr 20 08:54:07 but requires that doInBackground() returns boolean? Apr 20 08:54:23 what is actually returned back to fragment's execute() call? Apr 20 08:55:02 I mean, execute() calls doInBackground(), but what about onPostExecute()? Which function in asynctask is actually returned back on execute() ? Apr 20 08:55:07 onpostexecute shouldn't return anything Apr 20 08:55:11 yeah? Apr 20 08:55:27 its not a future Apr 20 08:55:28 so I don't need it at all Apr 20 08:55:31 its an async task Apr 20 08:55:59 http://developer.android.com/reference/android/os/AsyncTask.html Apr 20 08:57:08 you would call a method in your activity Apr 20 08:57:13 or do a callback via an interface Apr 20 09:03:38 Is this the only way to get the emulator talk to a local server? http://bartinger.at/inject-dynamic-host-ip-address-with-gradle/ Apr 20 09:09:47 lasserix: can you help me with the callback from the asynctask? I can update the post Apr 20 09:10:39 lasserix: is it "easier" (neater?) to have the AsyncTask inside the fragment.java file (subclass)? Apr 20 09:12:27 lasserix: http://pastebin.com/K4NFVY4V Apr 20 09:14:03 I have a bug where I set an xml drawable as a background to an image tile and on a single phone (samsung galaxy s 2), parts that should be transparent turn black. https://drive.google.com/file/d/0BzvuJcxKrZ_PZ0dDN0NVdUk0ZGM/view?usp=sharing http://pastebin.com/tXAnFCCN Any idea what might cause that? Apr 20 09:14:13 so "refresh" menu invokes (starts) execute(). No return value, obviously. Then, I need a method in the fragment, say manualRefreshLoader(), which the asynctask can call if and when it decides the loader needs to be reset? Apr 20 09:14:29 Hey all Apr 20 09:14:57 Is there a constant for the keycode for the keyboard arrow keys? Apr 20 09:15:50 If I google, I find lots of java results saying to use KeyEvent.VK_UP but android doesn't seem to have this Apr 20 09:17:02 g00s> that's a lot of DSLR Controller screenshots, lol Apr 20 09:18:01 johnflux: try KeyEvent.KEYCODE_blah Apr 20 09:18:36 KEYCODE_DPAD Apr 20 09:19:24 Ashiren: I saw that but wasn't sure.. okay I'll use that, thanks Apr 20 09:19:48 Ashiren: can I just send that event to an activity, if I want simulate the user pressing it? Apr 20 09:20:56 dunno Apr 20 09:22:11 well you could invoke activity's onKeyDown(keycode, event) with your keycode and event manually Apr 20 09:23:00 * johnflux nods Apr 20 09:25:02 johnflux, why dont you send the keydown event to the actual receiver? Apr 20 09:25:10 i.e the view with the listener attached Apr 20 09:27:57 danijoo: hmm, not sure what you mean. I have a fragment which looks like a remote control. If the user presses an arrow button on the virtual remote control, I want to send that to whatever has focus Apr 20 09:28:15 at least, I think that's what I want to do :-) Apr 20 09:28:59 i mean instead of sending a keycode, you could do myArrowButton.performClick() Apr 20 09:30:34 danijoo: ah, well I want to send the arrow keycodes to a gridview, for example Apr 20 09:30:55 danijoo: so that you can use the virtual remote control arrow buttons, to control which item in a grid view is selected Apr 20 09:39:59 I may be having a brain fart here, but how does a non-static inner class hold static fields in MediaRecorder.AudioSource -> http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html Apr 20 09:42:15 huh Apr 20 09:42:31 static is static Apr 20 09:42:54 Especially when the JLS itself forbids it -> http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.1.3 Apr 20 09:44:04 well they are finals? Apr 20 09:44:11 you can declare final Apr 20 09:44:54 itwenty: your link says: static final int x = 3; // OK: compile-time constant Apr 20 09:45:19 Oh..ok. As I said, I was having a brain fart =] Apr 20 09:46:50 itwenty: interesting though - I didn't know this Apr 20 09:49:16 Hmm..I notice that accessing MediaRecorder.AudioSource.DEFAULT works fine from a Java class, but gives an "Unresolved Reference" error in a Kotlin class Apr 20 09:49:43 Maybe I should carry this over to kotlin IRC Apr 20 10:07:34 is there a way to copy one intent extra to another intent? Apr 20 10:09:16 got it Intent.putExtras(oldIntent); Apr 20 10:09:35 yeah. or manually if you ony want a subset. Apr 20 10:15:19 hello Apr 20 10:15:33 is there any irc channel or mail list for android volley librarry ? Apr 20 10:15:53 I dont think so Apr 20 10:16:54 um ok thanks. Apr 20 10:17:23 you can ask here if its android development related :) Apr 20 10:17:34 can I get from getIntent if it was launched for result? Apr 20 10:18:07 SneakerXZ, only if you set a flag for it Apr 20 10:18:18 (afaik) Apr 20 10:19:19 yes i am developing an android app, i am using volley library for loading remote images Apr 20 10:19:24 but there is a problem with cache Apr 20 10:19:34 is there any volley user here ? Apr 20 10:19:50 bcursor, you want to load an image from a website and put it into an imageview? Apr 20 10:20:00 yes i am using networkimageview Apr 20 10:20:10 but somehow the cache is erased Apr 20 10:20:22 when my activity restarted for memory issues Apr 20 10:20:47 my activity try to load images from remote server, however these url adresses already in cache so it should get them from memory Apr 20 10:21:13 but it tries to load them from remote server again, and i am getting volley out of memory exception Apr 20 10:21:45 are you using a LruCache? Apr 20 10:21:59 there are two caches i think, one cache for general volley queue another cache for lrucache for images Apr 20 10:22:03 yes i am using lrucache Apr 20 10:22:46 im not really familiar with volley but i think the general queue cache will only be used when the correct cache headers are set server side Apr 20 10:23:03 oh ok Apr 20 10:23:13 thanks Apr 20 10:23:14 and for the lrucache: this is a memory cache and does not cache to disk. so if your app gets destroyed because of memory, the images are lost Apr 20 10:23:51 i suggest you to look into one of those libraries for image loading: Picasso, glide, fresco Apr 20 10:24:01 with them you dont have to manage memory at all. Apr 20 10:24:42 for example Picasso is simply: Picasso.with(context).load(url).into(myImageView) Apr 20 10:24:51 and it takes care of all caching on memory and disk Apr 20 10:25:00 +1 for Picasso Apr 20 10:25:01 ok i will look them Apr 20 10:25:08 thanks a lot Apr 20 10:25:11 yw Apr 20 10:42:13 danijoo: there is getCallingActivity Apr 20 10:42:31 danijoo: really helfpul so I can customize the flow Apr 20 10:42:51 do you know if it is possible to copy categories of intent? or do I need to iterate over it? Apr 20 10:43:04 SneakerXZ, but getCallingActivity does not indicate if the activity is called for result Apr 20 10:43:20 its just the name of the previous activity Apr 20 10:43:26 danijoo: no Apr 20 10:43:27 http://stackoverflow.com/questions/16753657/check-if-activity-has-been-called-for-result Apr 20 10:43:36 oh ok. nvm then :) Apr 20 10:44:16 what do you mean with category Apr 20 10:45:38 hi. there's a way on API 17 to totally remove the action bar and the navigation bar? I've found a solution to that, but after the user taps the screen they appears again Apr 20 10:46:02 fortunatly not. Apr 20 10:46:17 why fortunatly? Apr 20 10:46:40 because users dont want to get locked in your app. Apr 20 10:46:52 LucaS05, appcompat + toolbar Apr 20 10:47:25 status bar and navigation buttons will always reappear on tap Apr 20 10:47:31 danijoo: sorry, i've to mention that i need the app to stay in a "kiosk-mode" Apr 20 10:48:09 knapper_tech: what's that? Apr 20 10:49:59 LucaS05, there is a little hack you can do Apr 20 10:50:34 add a service that periodically checks if user starts another app Apr 20 10:50:45 if this happens, quickly start the kiosk app again Apr 20 10:51:14 i think thats all you can do if you dont want to recompile android Apr 20 10:52:00 danijoo: good! but the problem about the action bar is resolved by the kiosk mode, not by the service Apr 20 10:52:20 Is it possible to put 2 horizontal sliding recyclerView grids inside a vertical scrolling ScrollView? (because of some fubar design requirement.) Apr 20 10:52:23 well the actionbar can easily removed via styles.xml Apr 20 10:52:28 LucaS05: Use an MDM supported by the vendor of the device, or compile custom rom, or use 5.0 and screen pinning (needs manual work) Apr 20 10:52:34 just not the statusbar Apr 20 10:52:55 You can't do "kiosk mode" with "normal" application (i.e. without support from MDM) Apr 20 10:53:18 danijoo: sorry i was meaning the status bar Apr 20 10:53:21 claint, holy.... what are you trying to do there? Apr 20 10:53:45 p_l: what's an MDM? Apr 20 10:54:10 Mobile Device Management, for example AirWatch from VMware, etc. Apr 20 10:54:17 p_l: my device supports only 4.2 Apr 20 10:54:25 stuff that integrates with custom vendor SDKs like Samsung Knox Apr 20 10:54:55 danijoo: some fubar design that some "expert UI designer" came up with. Apr 20 10:55:32 guys, my app make a call, but, how to return to my app, after call ends? Apr 20 10:56:16 p_l: do you have some resources about that? Apr 20 10:56:22 do I need to bind to call end event and move my activity foreground? Apr 20 10:56:43 Or is there a simple solution Apr 20 10:56:51 LucaS05: google for MDM and their features, for example VMware AirWatch Apr 20 10:57:44 is there any way for the service to return something to the Activity? Apr 20 10:58:17 Venus_Mars, bind to it Apr 20 10:58:20 or use a bus Apr 20 10:58:34 p_l: so with an MDM is possible to customize android for hiding the status bar and the navigation bar? Apr 20 10:58:48 i want to understand the context Apr 20 10:58:52 LucaS05: it' Apr 20 10:58:57 It's possible to make a Apr 20 10:58:57 Venus_Mars, or broadcasts Apr 20 10:59:03 kiosk mode device Apr 20 10:59:18 * p_l worked with that, but can't recommend the crappy MDM we ended up with Apr 20 11:01:05 in the mainActivity.. i have a method searchOffers() Apr 20 11:01:16 in that method I am trying to startService Apr 20 11:01:20 offerService Apr 20 11:01:42 and how should the method searchOffers get a return value from the offerService? Apr 20 11:02:06 p_l: hence, it's not a perfect solution Apr 20 11:02:13 Venus_Mars, it wont get one Apr 20 11:02:23 what about a custom rom? Apr 20 11:02:24 you have to do it asynchron Apr 20 11:02:49 LucaS05: no, the MDM we ended up on the cheap was crap Apr 20 11:03:10 but the vendor SDK allowed the MDM to do what you wanted, which is also what we wanted Apr 20 11:03:22 danijoo: thanks. Apr 20 11:03:47 p_l: by that you mean, having control on the device and on the actions on it Apr 20 11:03:52 yes Apr 20 11:04:08 including making the app work in kiosk mode without the bars etc. Apr 20 11:04:18 in a way that prevented escape Apr 20 11:04:20 p_l: oh! ok Apr 20 11:04:24 good Apr 20 11:04:43 p_l: why yours was crap? Apr 20 11:05:06 LucaS05: A cheap PHP crap that was hard to use, install, manage, etc. Apr 20 11:05:33 the actual opoeration was done by vendor code on device, but this communicated the policies to it Apr 20 11:05:53 I pushed back then for AirWatch, iirc, but it was more expensive Apr 20 11:06:05 i understand. Mine is a plain java android application Apr 20 11:06:58 LucaS05: MDMs are usually composed of a server and an APK that hooks to special, device-specific APIs from vendors Apr 20 11:07:41 The server part was horrible in the stuff we ended up with, the device agent wasn't much better. The actual "work" was done by libraries included in Samsung's ROM that were called by the device agent Apr 20 11:08:06 things like "only this app can be run by user, you can't switch to another, SystemUI must be hidden" Apr 20 11:09:16 is it possible to finish two last activities? not just one? Apr 20 11:09:28 p_l: i think is the perfect solution, theoretically at least Apr 20 11:09:45 AirWatch isn't free anyway ;) Apr 20 11:10:12 LucaS05: it's specifically designed for what you described among other things (we used it with Galaxy Tabs in museum), but capabilities of devices and MDMs vary :) Apr 20 11:10:36 Lambas Apr 20 11:10:52 that Kotlin doc mentions "Lambas" :P Apr 20 11:11:32 At least it wasn't Lamas Apr 20 11:12:18 yea Apr 20 11:12:29 Lamba in Arabic means light bulb Apr 20 11:12:41 p_l: this is my device http://bit.ly/1bjWM4K Apr 20 11:13:36 LucaS05: It might not have any management APIs :( Apr 20 11:13:54 who buys that stuff Apr 20 11:13:57 so strange Apr 20 11:14:23 Odaym: stingy rich people Apr 20 11:14:36 just get N7 Apr 20 11:14:45 why would you settle for anything else I dont understand Apr 20 11:14:59 but alas, it's a fact of life Apr 20 11:16:19 Odaym: too late, they've buyed 7 of these Apr 20 11:17:11 i'm simply making this app for them after they've purchased those good tablets Apr 20 11:18:35 your company Apr 20 11:19:04 Odaym: not my company, i'm doing some freelance work now Apr 20 11:19:24 ah cool Apr 20 11:20:49 why do you do freelance? Apr 20 11:21:03 Odaym: cause i'm studying :) Apr 20 11:21:05 all because you dont want someone telling you what to do? Apr 20 11:21:19 and when you're graduated you will go into a company? Apr 20 11:21:59 Odaym: and also that! i will try to get into a company, but i think it will not last so long Apr 20 11:22:41 I will try to make a living from my projects Apr 20 11:24:06 p_l: so mdms depend on the device model? (AirWarch seems to be pretty general) Apr 20 11:25:00 LucaS05: they depend on extra features baked into ROMs that are not part of AOSP Apr 20 11:25:59 p_l: so why that device model could be a problem? Apr 20 11:26:48 LucaS05: because it probably has barely-ported AOSP loaded without any MDM support Apr 20 11:27:07 I'd check with vendor if they have anything Apr 20 11:29:59 Can someone help me with this? Let me know if there is any missing info, thanks: https://gist.github.com/Papipo/6237fef6d67ebd3847e7 Apr 20 11:32:28 p_l: what you mean with "check with vendor" ? Apr 20 11:32:38 aks to mediacom?! :) Apr 20 11:32:42 ask* Apr 20 11:33:18 heya Apr 20 11:33:37 has anyone tried sending KEYCODE_APP_SWITCH programatically? Apr 20 11:33:58 I want to bring up the recent app screen Apr 20 11:34:19 I tried using dispatchKeyEvent but it does not seem to work Apr 20 11:35:27 baldgeek, have you tried googleing it? :) Apr 20 11:35:37 yes :) Apr 20 11:35:43 otherwise I wouldn't be here :) Apr 20 11:36:02 ok I can see added value from what Mediacom provide, they have devices with colors and whatnot Apr 20 11:36:05 i just did the same and had a result as #1 in google.. Apr 20 11:36:06 pretty cool I would buy from there Apr 20 11:36:27 ok, my google fu is lame today... what did you search danijoo? Apr 20 11:36:47 android recent apps programmatically ;) Apr 20 11:37:17 yup.. read that too Apr 20 11:37:28 I got the snippet that does it via reflection working.. Apr 20 11:37:36 then you already know the answer to your question :) Apr 20 11:37:50 I was hoping for something simpler since KEYCODE_APP_SWITCH exists Apr 20 11:38:24 Odaym: yes, they're good as a nokia 6630 Apr 20 11:38:29 maybe because system apps are possible to use it. hm Apr 20 11:39:01 well cool Apr 20 11:39:12 I usually just underestimate everything Apr 20 11:39:15 and idolize one thing Apr 20 11:39:39 and it works it I force the keycode via "adb shell input keyevent 187" too Apr 20 11:40:32 Odaym: don't ever underestimate shit :) Anyway if i can't user mdm i'm pretty locked Apr 20 11:40:49 use* Apr 20 11:42:08 hey, i used a library i found on git and i decided to import it as project so i can extend it a bit, but now some of the custom attributes can't be found (takes the default value instead of the values i used ) Apr 20 11:42:14 what can cause this? Apr 20 11:43:34 nevermind Apr 20 11:43:44 so danijoo: basically the 2 methods in that stackoverflow link are the only ways you think? Apr 20 11:43:54 p_l: is possible with a custom rom hiding the status and navigation bar? Apr 20 11:43:55 i think Apr 20 11:44:10 id use the reflection but be sure to wrap it in a try/catch Apr 20 11:44:58 yup.. I wrapped it in a try/catch.. I'm just worried about it breaking in a future release, since I'm asking code that is not "officially documented" Apr 20 11:45:55 thats what the try/catch is for Apr 20 11:46:21 you never know what happens ^^. It could break in next 5.x release Apr 20 11:46:27 well, yea :).. the app won't crash, but it won't work as intended Apr 20 11:46:38 it could even be already broken for some chinese devices, you never know.. Apr 20 11:50:31 why is the installed app name appear like "@0x7f040000" instead of "Wild Oranges" ? Apr 20 11:51:53 appear where? Apr 20 11:53:12 danijoo: on the device its installed in Apr 20 11:54:43 danijoo: on the emulator it shows "Wild Oranges" , but on the device the app name is "@0x7f040000" Apr 20 11:55:02 seems like your reference is wrong Apr 20 11:55:22 it shows the hex pointer to the actual string i guess Apr 20 11:55:23 danijoo: what reference? Apr 20 11:55:59 danijoo: then how can i fix this ? Apr 20 11:56:07 somewhere in your apk system generated something like static int app_name = 0x12367183 Apr 20 11:56:12 and that value points to the string Apr 20 11:56:32 and you print the int, not the string it points to Apr 20 11:57:13 danijoo: but why does it show the correct name in the emulator then ? Apr 20 11:57:51 if its int it points to Apr 20 11:58:13 try clean rebuild Apr 20 11:58:54 danijoo: already did that many times , nothing changed Apr 20 11:59:16 show some code/xml them Apr 20 11:59:19 then Apr 20 12:00:04 which xml? Apr 20 12:01:02 if its the appname thats wrong, the manifest Apr 20 12:01:47 good advice Apr 20 12:02:26 danijoo: ok here is the AndroidManifest.xml http://pastebin.com/jp8e6AZk Apr 20 12:04:45 looks valid Apr 20 12:05:36 danijoo: then maybe its Blackberry 10 android runtime that is the issue Apr 20 12:05:54 oh well. if you said that first... Apr 20 12:06:23 danijoo: yeah i guess :) , thanks Apr 20 12:23:52 did anyone experience a problem where an app crashes after connecting debugger? I have multiple devices and it happens only one device and without debugger it works flawlessly Apr 20 12:29:39 maybe a fucked up device? Apr 20 12:29:45 is it a major brand? Apr 20 12:41:30 Hi everyone, I'm still having my issue with overlapping fragments, seems like someone else got it with Google samples : http://goo.gl/pWAZCZ Apr 20 12:41:40 danijoo: it is Nexus 4 with Lollipop Apr 20 12:42:11 oh ok. i had no problem with this device when i had it Apr 20 12:42:14 Sounds like the swipeview animation affects the fragment replacement what shall I do to prevent this ? Apr 20 12:44:28 is there a way to finish all activities and deliver result? finishAffinity does not allow to deliver result Apr 20 13:00:05 is there a way to see if a device received a push? Apr 20 13:00:13 without using broadcast receiver Apr 20 13:00:23 I just want to see incoming pushes to device Apr 20 13:00:59 not w/o broadcast receiver Apr 20 13:01:39 because I am not receiveing pushes Apr 20 13:01:50 and I dont know if a problem is on server on in device Apr 20 13:02:08 look at the error code from gcm Apr 20 13:02:16 where can I see it? Apr 20 13:02:23 I am using external service to send pushes Apr 20 13:02:31 is there a tool to send a push directly? Apr 20 13:02:35 look at their status messages Apr 20 13:02:38 without using external services? Apr 20 13:02:56 google has nothing like direct pushes Apr 20 13:03:21 that is not what I mean Apr 20 13:03:28 I mean like bash tool where I would project id and device id Apr 20 13:03:32 and push would be sent Apr 20 13:04:20 i dont know what service you are using Apr 20 13:04:21 SneakerXZ: https://github.com/geeknam/python-gcm ? Apr 20 13:04:25 with gcm u can do that, yes Apr 20 13:04:34 I am using gcm Apr 20 13:04:40 blusky: it looks like what I want :) Apr 20 13:05:43 SneakerXZ: there is also some curl one liner on GCM doc Apr 20 13:06:00 blusky: really? have a link? Apr 20 13:06:03 would be best Apr 20 13:06:53 https://developer.android.com/google/gcm/http.html Apr 20 13:07:11 blusky: awesome Apr 20 13:07:18 I was looking for something like that and I could not find it :) Apr 20 13:07:29 bit imho, if you want to script it, i would rather use python-gcm Apr 20 13:07:39 even for test purpose Apr 20 13:07:43 (python shell is awesome) Apr 20 13:08:17 Hello folks! Apr 20 13:08:18 I am having an issue here when I try to view ListView button under Composite menu on Eclipse, it is just not showing. Could someone help me please? Apr 20 13:08:45 blusky: Yeah, if I will want to do something more complex then yes Apr 20 13:08:50 but this should be enough for now Apr 20 13:09:34 ok (: Apr 20 13:11:48 although thanks :) Apr 20 13:13:30 is anybody using SearchView together with ActionBarActivity and android.support.v7.app.ActionBarActivity Apr 20 13:13:37 _ Apr 20 13:13:41 yep Apr 20 13:14:28 danijoo, yep what? Apr 20 13:14:42 somebody is doing it Apr 20 13:16:08 and your single free question is used now Apr 20 13:16:34 danijoo: :) Apr 20 13:22:17 So if I get the name of an image file and base 64 encode it Apr 20 13:22:35 I can use that image later by decoding the base64? Apr 20 13:22:39 Is that how that works Apr 20 13:22:52 what do you want to base64 encode ? file name, or file content ? Apr 20 13:23:12 So im trying to save an image to remote DB Apr 20 13:23:24 I read that you have to get the image and encode it to base64 Apr 20 13:23:30 don't do that :D Apr 20 13:23:36 what kind of DB ? Apr 20 13:23:41 MYSQL Apr 20 13:23:47 don't do that Apr 20 13:23:57 Ok, what do you reccomend? Apr 20 13:24:01 upload it somewhere else, and just save the URL in the DB Apr 20 13:24:14 like to imgur? Apr 20 13:24:31 what do you have at your disposal ? Apr 20 13:24:37 What do you mean Apr 20 13:24:43 I have a server Apr 20 13:24:53 dedicated server, vps, amazon ? Apr 20 13:25:00 shared :/ Apr 20 13:25:15 Just for now, gonna migrate to VPS soon Apr 20 13:25:21 drose379> like to imgur? Apr 20 13:25:23 Waiting for my subscription to run out Apr 20 13:25:26 please tell me this was a joke ^^ Apr 20 13:25:31 you should estimate your needed storage space and bandwith usage Apr 20 13:25:50 Ok, I could upload the image to my server though right? Apr 20 13:25:54 and just upload it with a simple HTTP Upload on your API Apr 20 13:26:09 yup, that's waht you want to do Apr 20 13:26:09 Thats what I dont know how to do Apr 20 13:26:17 but don't store it on the database, store it on filesystem Apr 20 13:26:30 Right, just store a reference to the filesystem in the Database Apr 20 13:26:33 on page 9 of this document https://cdn.parleys.com/p/52a753b9e4b0e619540cc4a9/52a4d07e053a0_1386532526168.pdf are the getters and setters omitted for brevity or are they not written because you can access them with the '.' ? Apr 20 13:26:34 Correct? Apr 20 13:26:58 it depends how you want users to retrieve the picture Apr 20 13:27:12 Ill be dynamically retriving, the users dont decide Apr 20 13:27:19 Odaym, you should ask those questions in kotlin Apr 20 13:27:22 #kotlin Apr 20 13:27:24 a cheap architecture would be to retrieve the picture on the same service as the API is Apr 20 13:27:32 yea I figured after I asked Apr 20 13:27:33 a better architecture would be on separate server Apr 20 13:27:55 (static files and dynamique API are not supposed to be on the same location... for ressource usage / limitation / requirement) Apr 20 13:28:06 Blusky how would I get the file from the users filesystem on the android device to my server filesystem Apr 20 13:28:13 I know a http request Apr 20 13:28:14 and in kotlin, you typically dont use getValue() setValue(). Apr 20 13:28:37 drose379: what is your API's technology ? Apr 20 13:28:47 php Apr 20 13:29:01 you can upload pictures in a dedicated virtual host Apr 20 13:29:15 But how do I get the pic from the android device Apr 20 13:29:19 header("Location: myOtherVhost.com/{id}.jpg"); Apr 20 13:29:36 I need to get the file name from the android device? Apr 20 13:29:39 or include, or file_get_contents, or just an url, ... Apr 20 13:29:45 the API will provide it Apr 20 13:30:13 in your database, you store reference (FS or URL), and give a way to the user a retrieve the picture from that Apr 20 13:30:19 Anyone upgrade to android 5.1 yet just want to know if good one to upgrade to. Apr 20 13:30:29 i mean is it stable. Apr 20 13:30:32 Im using an intent to get the picture from the android device right now using an intent Apr 20 13:30:50 perlsyntax, stable enouigh for google to release it into the wild ;) Apr 20 13:30:51 But it just gives me the location of the image on the users device, not the file name which is what I need Apr 20 13:31:10 ooh, you want to know how to upload a file from android toward a server ? Apr 20 13:31:15 Yes haha Apr 20 13:31:26 do you use OkHttp ? Apr 20 13:31:28 im using it since a month or so and it seems to be fine Apr 20 13:31:32 danijoo,i thought people where have prob with old android 5.0 Apr 20 13:31:34 yes I do blusky Apr 20 13:31:38 :) Apr 20 13:32:00 drose379: https://github.com/square/okhttp/wiki/Recipes "Posting a File" Apr 20 13:32:21 Ok, but what about getting the file from the device Apr 20 13:32:47 File file = new File("myFile"); Apr 20 13:32:52 hey guys, what do ya'll think about tracking upload views Apr 20 13:32:56 should one also track the views the upload has received from the uploaders? Apr 20 13:33:19 what about getting "MyFile" Apr 20 13:33:33 I don't know. It depends the file you want to upload ? Apr 20 13:34:21 I need to get the file Apr 20 13:34:25 Its an image file Apr 20 13:34:32 I create a chooser intent Apr 20 13:34:36 The user picks a image Apr 20 13:34:43 I need to get the img file from that Apr 20 13:34:43 http://stackoverflow.com/questions/24298629/android-intent-pick-image-from-gallery Apr 20 13:34:53 Thanks Apr 20 13:35:04 Uri selectedImageUri = data.getData(); ==> File file= new File(selectedImageUri); Apr 20 13:35:14 just adapt it for okhttp :) Apr 20 13:35:29 beautiful, thanks Apr 20 13:37:01 perlsyntax, there is always a small amount of users having problems with everything :p Apr 20 13:37:22 I didnt had any problems with 5.0 and dont have any with 5.1 Apr 20 13:37:27 maybe im lucky :) Apr 20 13:38:52 notifyDataSetChange triggers view refresh, if you back (old fragment appears) while it is triggered the current fragment is refreshed and put in front of the oldfragment… Apr 20 13:39:02 is there any way to fix this behavior please ? Apr 20 13:40:02 randomStuffWithoutContext Apr 20 13:40:51 blusky I cannot pass a Uri into the File constructor Apr 20 13:41:18 drose379: use filePath (in stackoverflow link) Apr 20 13:41:23 But wait Apr 20 13:41:28 File does accept a URI Apr 20 13:41:32 but I have a Uri Apr 20 13:41:36 Apparently there is a difference Apr 20 13:41:49 try selectedImageUri.getPath() Apr 20 13:41:59 and throw that into file? Apr 20 13:42:02 danijoo: http://stackoverflow.com/questions/29253846/replacing-fragment-does-not-work-properly-while-swiperefresh-is-running Apr 20 13:42:24 Yeah that works, ill Log file.toString and see what I get Apr 20 13:43:06 I have no idea what "toString" does to a File, probably just a reference ID Apr 20 13:43:14 you won't see a lot Apr 20 13:43:27 maybe just the object id Apr 20 13:43:38 Ok, Im trying to think of how I can test if it works before changing my whole API around it Apr 20 13:43:39 like RandomClassObject.toString() Apr 20 13:43:50 danijoo: that's what I meant by "probably just a reference ID" Apr 20 13:44:06 ah ok :) Apr 20 13:48:57 Hey all. Is it possible to intercept/filter the Video Input Stream when recording video in Android (using MediaRecorder)? As far as I can tell by the API/Sources the whole process of capturing+compressing+writing is short-circuited in native/non-public parts and I can not get access to the actual video frames while recording. Apr 20 13:49:53 blusky this is what the file.toString returned: Apr 20 13:49:58 "/external/images/media/695" Apr 20 13:50:00 Doesnt seem right Apr 20 13:51:53 isnt that the file uri? Apr 20 13:52:08 Yeah it is Apr 20 13:52:30 I thought it would have a .jpg or .png ending though Apr 20 13:52:36 Not the local URI Apr 20 13:52:46 in linux/ubuntu we can write kernel code, and run them by insmod, Apr 20 13:52:47 how can i write kernel code for android, and how to deploy them? Apr 20 13:52:52 no. uri arent the path to a file Apr 20 13:52:56 is there exist any complete book for this? Apr 20 13:53:02 they are just pointers for the media manager Apr 20 13:53:11 danijoo so why do you think my File.toString() returned the URI Apr 20 13:53:29 because /external/images/media/number looks like the uri Apr 20 13:53:40 But shouldnt it be a file Apr 20 13:54:13 can someone tell me name of books about "Android Kernel Architecture" or "Android Kernel Programming Apr 20 13:54:20 an uri is not a filepath drose379 Apr 20 13:54:32 I know danijoo Apr 20 13:54:37 What im asking is Apr 20 13:54:48 anyone? Apr 20 13:54:54 I passed imgUri.getPath() to the constructor of the file Apr 20 13:55:01 Why is the file.toString() returning a URI Apr 20 13:55:28 what do you expect it to return? Apr 20 13:55:45 A file name maybe Apr 20 13:55:53 i mean. why shoudnt toString() return the uri Apr 20 13:55:58 drose379: The URI is not a file. Apr 20 13:56:15 I know, im trying to create a file from the Uri Apr 20 13:56:17 if you want the file name, there is File#getName() Apr 20 13:56:37 Ill try that Apr 20 13:56:41 dont try to use getString() if you are not sure what it returns :) Apr 20 13:56:58 Yeah Apr 20 13:58:24 danijoo file.getName gives me 694 Apr 20 13:58:39 drose379: why should it ends with ".jpg" or ".png" ? Apr 20 13:58:47 maybe it's the file you pickd Apr 20 13:59:08 Because im picking an image file Apr 20 13:59:12 and ? Apr 20 13:59:20 Hi! Apr 20 13:59:21 Dont they have those types of endings Apr 20 13:59:46 if its an image made with android camera,it should end with jpg i think Apr 20 14:00:29 drose379: is there any "getSize" methods ? Apr 20 14:00:35 On file? Apr 20 14:00:37 yup Apr 20 14:00:45 No Apr 20 14:00:46 what would be the reason why logcat is not working? Apr 20 14:00:50 (don't have my IDE in front of me right now :D) Apr 20 14:00:58 No prob blusky Apr 20 14:01:02 I just wanna make sure this is working Apr 20 14:01:04 SneakerXZ: USB cable not plugged ? Apr 20 14:01:12 I am debugging Apr 20 14:01:17 I just dont see my process Apr 20 14:01:34 drose379: file.length() Apr 20 14:01:46 try to get this value Apr 20 14:01:52 I have an issue I was hoping to get some help with, googling around did not help .. I have a RelativeLayout that has visibility set to GONE, upon a button click I set it to visible then animate it .. my issue is the animation itself is sluggish on a real device (HTC M7) but somewhat smoother on the emulator .. Apr 20 14:02:28 the RelativeLayout has a background PNG and 4 ImageButtons in it Apr 20 14:02:33 Ok, how big should an img file be? Apr 20 14:02:55 2ko <-> 5mo ? Apr 20 14:03:08 you should be the one to know the size of the selected image Apr 20 14:03:23 true haha Apr 20 14:03:47 between 1 byte and the size of your sdcard i guess :p Apr 20 14:03:48 drose379: Are you sure you're handling a file:///... URI? Apr 20 14:04:06 what do you mean Apr 20 14:04:16 No, I have a Uri Apr 20 14:04:18 Not a URI Apr 20 14:04:27 drose379: Whatever. what is it's protocol? Apr 20 14:04:51 drose379: getScheme() that is Apr 20 14:04:52 The img.length is giving me 0 Apr 20 14:05:01 So its not working correctly Apr 20 14:06:25 Hmm Apr 20 14:07:13 pastebin your intent start and result handling Apr 20 14:08:09 blusky http://pastie.org/10103334 Apr 20 14:11:14 see anything blusky Apr 20 14:12:37 drose379: you hsould sheck resultCode, what is the purpose of imgUriString ? Apr 20 14:12:45 but I don't see anything wrong :/ Apr 20 14:13:05 try more debugging, loggin all variable, I don't know :/ Apr 20 14:13:15 Thanks for looking Apr 20 14:13:34 The URI string was going to be saved to DB, to be retrived later. But then I realized that wouldnt work Apr 20 14:13:42 Cause its only on the local device Apr 20 14:17:14 drose379: This does not return a File. It returns an Uri, that is not the file itself. Use Context.getContentResolver().openInputStream(Uri) Apr 20 14:17:32 drose379: IIRC… Apr 20 14:21:50 Lachezar that will return a file? Apr 20 14:23:33 That returns an inputStream Apr 20 14:23:40 Then i Need to go to a file from there Apr 20 14:25:48 Lachezar is there a way to go from InputStream to file? Apr 20 14:27:38 How dumb of an idea would it be to create my own QR-style barcode implementation, if I have one week deadline to make scanning working? Looking at OpenCV atm Apr 20 14:27:56 drose379: This dies not select a File, it selects a Resource. It may even be remote (like in Picasa or whatever). Apr 20 14:28:10 Hey guys, is it possible to initiate GoogleSphere app from my app and then have it return data just to my app? Apr 20 14:28:18 drose379: If you want a file: download the resource to a file in your application's storage. Apr 20 14:29:01 dimitrovskif: In light of the ZXing Barcode Scanner application: very dumb. Apr 20 14:29:21 So I need to use this resource to download the image Lachezar? Apr 20 14:29:28 drose379: Pretty much yes. Apr 20 14:29:34 Lachezar: The point is, my team wants unique code - because it's not general purpose and should not look like it's scannable Apr 20 14:29:58 Lachezar: Unique pattern/look, I mean. Apr 20 14:30:06 Lachezar any idea where I can find some info on that Apr 20 14:30:34 drose379: The InputStream should be sufficient for you. What more do you need? Apr 20 14:30:43 dimitrovskif, encrypt it :) Apr 20 14:31:00 iprime: How do you mean? I Apr 20 14:31:06 Downloading the image using the input stream Apr 20 14:31:10 then making a file from it Apr 20 14:31:27 dimitrovskif, encode your QR text, even if someone reads it they wouldn't be able to decrypt it Apr 20 14:31:29 dimitrovskif: Well... There are projects you could learn from. But the task requires significant knowledge in image processing and manipulation. Apr 20 14:31:39 iprime: Oh, yeah that's my last resort Apr 20 14:32:02 Lachezar: Definitely, and I don't have any... Apr 20 14:32:15 My matrix/projection knowledge is scarce Apr 20 14:33:04 iprime: Lachezar: Snapchat gave $5M for creating their own barcode :( Apr 20 14:33:07 drose379: Context.openFileOutput(String) + Context.getContentResolver().openInputStream(Uri) Apr 20 14:33:53 dimitrovskif, i'll do it for $4m :D Apr 20 14:33:53 heres what I have Lachezar Apr 20 14:33:56 "InputStream input = getActivity().getContentResolver().openInputStream(imgUri);" Apr 20 14:34:17 Now I need to take that, get the bytes from it? Apr 20 14:34:33 Would I be possible to call Google Camera app from my app? Apr 20 14:34:42 drose379: Copying from InputStream to an OutputStream is a generic task. Apr 20 14:34:53 android_sandwich: Yes Apr 20 14:35:16 Im a bit confused Lachezar Apr 20 14:35:28 Lachezar: Can I ask it to return data just to my app and not to the Gallery. Apr 20 14:36:05 android_sandwich: No. You do not do that.Instead you create a World-Writable empty file and request that the image is stored in that file. Apr 20 14:36:28 Hi, I've got a question, just starting playing with Android Apr 20 14:36:47 I wonder why 1) People are using Gradle at all 2) You need 2 projects, one into the other Apr 20 14:37:22 Lachezar: oh ok. Would I pass the file location as extra to the intent starting Google Camera? Apr 20 14:37:45 android_sandwich: Check MediaStore.EXTRA_OUTPUT Apr 20 14:38:34 Lachezar: ok. Thanks for your help :) Apr 20 14:41:26 Anyone? Apr 20 14:41:43 Ribesg, let me google that for you: http://www.drdobbs.com/jvm/why-build-your-java-projects-with-gradle/240168608 Apr 20 14:42:15 j Apr 20 14:42:16 Ribesg: I do not use Graddle. I use Eclipse SDK. Apr 20 14:42:44 Lachezar, you're still using some build process though Apr 20 14:43:02 thebishop: Eclipse compilation. Apr 20 14:43:11 I find it EXTREMELY slow compared to Maven, and I don't understand why you need so many files Apr 20 14:43:23 Don't get me wrong, I hate XML Apr 20 14:43:33 thebishop: right-click: export signed... Apr 20 14:43:58 why not gradle?! Apr 20 14:45:02 Anyway, why all projects I can find are actually 2 Gradle projects? An app project inside a "top" project? Apr 20 14:45:12 Is it mandatory? Apr 20 14:45:22 thebishop: I was looking at the maven pluign for Android, but since ADK is not available on *BSD (our build server) I gave up. Apr 20 14:46:09 The way I would go would be Maven Polyglot with either a pom.yml or pom.groovy, but Maven Polyglot isn't supported by IntelliJ IDEA yet Apr 20 14:48:27 Ribesg: Since Google decided to base the AIDE on IDEA many things have been replaced to handle IDEA better, I suppose that might be the reason to push for Graddle. But I have no idea about IDEA, I don't use it. Apr 20 14:49:08 IDEA handles Maven better than Gradle afaik Apr 20 14:50:11 then you dont know much Apr 20 14:50:13 Ribesg: I couldn't tell. Maybe Graddle is better when it comes to mixing Java (Android) and C (Native)? Apr 20 14:50:19 Gradle uses Maven Apr 20 14:50:26 gradle uses maven repos Apr 20 14:50:27 not maven Apr 20 14:50:57 pfn: doesn't it essentially call maven code for that (integrating with it thusly)? Apr 20 14:51:03 p_l, no Apr 20 14:51:27 gradle's dependency management was written as a nih kind of thing Apr 20 14:52:08 mhm Apr 20 14:52:38 it's pretty well written, in terms of performance, as I understand it, though Apr 20 15:09:54 nih? Apr 20 15:10:47 not invented here Apr 20 15:10:51 NIH: Not Intended to Help Apr 20 15:12:58 how do I get extra data that was passed into push? Apr 20 15:13:19 how can i change rounded imageview's border color by clicking the gridview item ? Apr 20 15:14:12 sci-fic: Using a state-selector Apr 20 15:24:57 yiati:this does nothing, do i miss something ? http://paste.ubuntu.com/10856599/ Apr 20 15:25:57 Hi guys, I'm developing for Android Cardboard with Unity 4.6 , and I'm having some trouble exporting the project and run it from Android Studio 1.1, I was wondering if I could find some help here Apr 20 15:27:54 sci-fic: Is that sci-fic: http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList Apr 20 15:29:02 ops sorry i forgot to tell you , im using 2 shapes llike that one of is green and other is grey Apr 20 15:29:06 and they are in selector Apr 20 15:29:08 like this Apr 20 15:29:38 http://paste.ubuntu.com/10856621/ Apr 20 15:31:45 why would including the viewpagerindicator library in my gradle file cause all references to getChildFragmentManager() to not be able to be resolved? Apr 20 15:32:20 sci-fic: "android:state_pressed="true"" Apr 20 15:33:02 letme try Apr 20 15:33:14 sci-fic: http://stackoverflow.com/questions/13634259/explanation-of-state-activated-state-selected-state-pressed-state-focused-for Apr 20 15:39:02 yiati:it didnt work thanks anyway Apr 20 15:39:31 sci-fic: Okay there's probably more, but you definitely needed that Apr 20 15:40:45 yiati:http://paste.ubuntu.com/10856684/ this is what i use completely Apr 20 15:42:54 sci-fic: You should add the names of the files. It is not visible whether you're using the selector's ID for the ImageView's src. Apr 20 15:44:03 could you tell me that my xml files are correct ? if so i'll have a look for another solutions Apr 20 15:47:34 Lachezar and yiati thanks for help this xml worked for me http://stackoverflow.com/questions/3263611/border-for-an-image-view-in-android Apr 20 16:09:17 is there a quick way to create model from db query result? Apr 20 16:09:18 wrong channel sorry Apr 20 16:12:29 does anyone know cordova here? Apr 20 16:16:46 good night all Apr 20 16:23:10 what is .p12 extension file Apr 20 16:23:11 ? Apr 20 16:23:44 as i need to integrate with android app how can i achieve this Apr 20 16:24:24 it's a specifically encoded asymmetric keypair Apr 20 16:24:50 what;'s the use of this file Apr 20 16:24:52 http://en.wikipedia.org/wiki/PKCS_12 Apr 20 16:25:03 might be for security Apr 20 16:25:10 it's used to, usually, encrypt traffic between client and server Apr 20 16:25:26 it's a container for certificate, keys & stuff Apr 20 16:26:30 where i need to put in my android app Apr 20 16:26:48 I have never heard about this file in android Apr 20 16:27:03 as i google and found some stuff aout it Apr 20 16:27:43 in order to communicate with wsdl based server ho can iachieve the communication using this Apr 20 16:28:54 min2: may be painful, read about pinned cerrts Apr 20 16:29:04 you will probably have to do some conversions Apr 20 16:29:20 i have worked with rest never with wsdl Apr 20 16:29:43 its going to be tuff for me Apr 20 16:31:59 two separate issues Apr 20 16:33:04 as someone else said, pkcs12 is a container for x509 certs Apr 20 16:33:29 i assume you were given a cert chain for this wsdl service Apr 20 16:34:23 no i got a .p12 file with some password Apr 20 16:34:45 with one endpoint url Apr 20 16:36:25 very first i thnk i need to trust the certificate am i right Apr 20 16:47:01 How to use .p12 certificate on Android? Apr 20 16:47:34 there is no such answer, and the password you mentionned is probably used to protect the p12 content Apr 20 16:48:15 yes i also got the password Apr 20 16:48:23 for this .p12 file Apr 20 16:52:02 with android gradle plug-in 1.1.3, is JUnit testing supported for library projects? I am successful getting the app to have JUnit tests running, but only if i change the library projects to use "apply plugin: 'com.android.application' do the unit tests run. Apr 20 17:12:18 I have an intent-filter that launches my app on certain events. Is there a way to ignore it once my app starts so I can just update my UI and not relaunch the app? Apr 20 17:12:55 cobar, that depends on activity launch mode Apr 20 17:14:01 Mavrik: what do you mean? My action is MAIN and category is LAUNCHER Apr 20 17:32:35 is it possible to use android.webkit in non-android java code? Apr 20 17:33:15 I can only imagine it would be... difficult Apr 20 17:33:18 i know there is a javafx.web but the api isn't cool Apr 20 17:33:43 JesusFreke: i dont know anything about android... but... it's not like i could the android.webkit jars and use them? Apr 20 17:34:06 dimadima: the majority of it is implemented as a shared library Apr 20 17:34:19 and it's likely to depend on a lot of android specific things, if I were guessing Apr 20 17:34:35 that exist only in the android runtime? Apr 20 17:36:30 "android specific", yes Apr 20 17:40:20 JesusFreke: thank you Apr 20 17:40:31 the android rendering system, etc Apr 20 17:41:21 now you could look at something like krypton, which is a custom implementation of an android web view using it's own chromium source, and maybe write your own chromium wrapper for pure java. No clue. That rapidly gets out of scope of android dev, but if you're determined, look there Apr 20 17:43:05 thank you dragorn Apr 20 17:43:38 i know there is javafx.scene.web.WebView/Engine but the android version lets you intercept resource requests Apr 20 17:43:43 like for css/imgs Apr 20 17:44:28 well, this is new... : id = message = date_time = is_read = is_synced = status = msg_type =local_date=image_path= image_name = ""; Apr 20 17:46:50 there is some variable to keep screen on while video is playing or am i being delusional? Apr 20 17:47:10 wake lock Apr 20 17:47:29 but you're also delusional :D Apr 20 17:50:32 how can i remove previous gps stored location details. does reboot temoves previous location ? Apr 20 17:51:09 Hi Apr 20 17:51:20 good evening Apr 20 17:51:24 I have a project. Can anyone do it as a paid one? http://pastebin.com/UJ9J8xVx Apr 20 17:51:52 Voyage: no advertising (see topic) :) Apr 20 17:53:43 ok. is the above said possible? Apr 20 17:55:47 Ashiren, JesusFreke ? Apr 20 18:03:39 MikeWallaceDev: setKeepScreenOn Apr 20 18:03:43 preferably to wake lock Apr 20 18:04:03 cool. Apr 20 18:04:06 I'm old school. Apr 20 18:04:17 I wear Vans, and use wake locks :D Apr 20 18:05:34 IS call recording possible in android? Apr 20 18:08:43 can we bloody record calls? Apr 20 18:09:38 I'm loading images on the phone onto a GridView, using a CursorLoader and adapter class. For fun, I've set up an AsyncTask which simply checks the number of thumbnails in MediaStore.Images.Thumbnails, and returns to fragment (in callback) such that fragment can trigger a reload/refresh of the CursorLoader if there are new images. But I can't get it to work. Is getLoaderManager().restartLoader(LOADER_ID, null, this); not the way t Apr 20 18:10:05 AFAIK call recording is still erratic Apr 20 18:10:44 and one-sided at most. its not officially supported, just there might be api for some devices Apr 20 18:11:37 for example http://stackoverflow.com/questions/14728615/audiosource-voice-call-not-working-in-android-4-0-but-working-in-android-2-3 Apr 20 18:21:06 is it possible to use different weight familys of roboto out of the box? Apr 20 18:23:34 I am new to android dev. I am using Android studio and i have a few questions. !. I have a TextClock in my view and in the design it shows the time, in the emulator its blank? Apr 20 18:25:03 maybe it needs hareware acceleration Apr 20 18:25:36 ok, second question Apr 20 18:25:37 have you tried real device Apr 20 18:26:10 I am using a linear layout horizontal, and gravity doesn't seem to work. I have a button, text and a button and i want left, center and right align Apr 20 18:26:37 I have set the gravity on them as such but they are all left aligned Apr 20 18:26:57 try layout_gravity Apr 20 18:27:05 but for linearLayout, try also weight Apr 20 18:27:16 ok Apr 20 18:27:33 lasserix: hello again :) I've got the AsyncTask to "check" MediaStore working, with callback to fragment. But it seems I can't easily restart/refresh the CursorLoader... I tried getLoaderManager().restartLoader(LOADER_ID, null, this); but nothing seems to happen. Apr 20 18:28:01 microhaxo: "gravity" = "gravity of the contents of this view". "layout_gravity" = "view's position in parent" Apr 20 18:28:42 microhaxo: e.g. "gravity=right" on a textview means right-aligned text. "layout_gravity=right" means the textview _itself_ is on the right side of the parent. Apr 20 18:28:44 joakimk_: i have no idea, i haven't used loaders in like 2 years Apr 20 18:29:20 can I have CTION_IMAGE_CAPTURE_SECURE return data to my app even if the device is not secured? Apr 20 18:29:26 getLoaderManager().restartLoader() ? Apr 20 18:29:32 lasserix: gotcha :) It really makes no big difference. The purpose was to *have* an AsyncTask in my project, doesn't really need to *do* anything useful ;) Apr 20 18:29:41 Is there a good android-job board for posting work requests? Apr 20 18:29:56 lasserix: yeah, that's what I'm trying... Apr 20 18:30:31 The weight worked Apr 20 18:30:44 however it changed the height of my buttons to be distorted a bit. Apr 20 18:31:38 joakimk_: whats your loader code look like? Apr 20 18:33:23 are you using a cursoradapter? Apr 20 18:33:37 fixed it, ala bootstrap style. Set sum to 12. Apr 20 18:34:04 Ok another question. In my designer i dont have a settings toolbar, but in the emulator there is a settings toolbar that is at the top. How do i disabled? Apr 20 18:34:32 microhaxo, never trust the designer ;) Apr 20 18:34:59 Right, how do i get rid of it? Apr 20 18:35:24 microhaxo: http://developer.android.com/guide/topics/ui/actionbar.html Apr 20 18:35:50 thanks Apr 20 18:36:24 microhaxo: make sure your designer is using your style Apr 20 18:36:28 lasserix: here' Apr 20 18:36:40 lasserix: here's my fragment and asynctask: http://pastebin.com/hPJTHVbk Apr 20 18:37:31 lasserix: so, yes, I'm using an adapter -- I'll update the paste Apr 20 18:37:49 a cursor adapter or a base adapter? Apr 20 18:37:57 apparently you have to handle them differently Apr 20 18:39:49 lasserix: It's a CursorAdapter... Apr 20 18:41:10 does anyone used ACTION_IMAGE_CAPTURE_SECURE intent? Apr 20 18:41:26 Has* Apr 20 18:41:34 joakimk_: does your async refresh task report any changes ever? Apr 20 18:41:40 so, when I click "refresh" in the menu, I can see the restartLoader() method is invoked. But the UI (GridView/adapter) does not update. I have to open another gallery app on the phone -- which loads the new photos -- and then switch back to my app. Then it works Apr 20 18:41:48 no Apr 20 18:42:09 oh then the task is probably broken but your loader loagic is correct (or seems so) Apr 20 18:42:48 ahh Apr 20 18:42:57 your async task logic is wrong Apr 20 18:43:01 yeah? Apr 20 18:43:32 http://pastebin.com/xTv1DSbv Apr 20 18:43:46 do in background returns to onpostexecute Apr 20 18:44:25 thats how it is supposed to work --you're not supposed to save a field from the class and use it like that Apr 20 18:44:36 because doinbackground happens on another thread than the main thread Apr 20 18:44:41 I see :) Apr 20 18:45:14 onPostExecute occurs on the main thread, so i'm not sure but that may be the cause of it, but anyways thats how you are supposed to set it up Apr 20 18:45:15 ok i'm starting my first open source project in kotlin, LTFB Apr 20 18:45:39 joakimk_: tho that may not be it, you should investigate whether you get a different count number, ever in doinbackground Apr 20 18:45:48 fwiw that works in AsyncTask. synchronization elsewhere guarantees fields set in doInBackground are safely usable in onPostExecute Apr 20 18:46:04 oh you can do that? Apr 20 18:46:23 well apparently you can do that but that's not how you are supposed to set up the async task Apr 20 18:46:31 "Reports Suggest 2013 Nexus 7 Units Are Failing At An Alarming Rate, Not Likely A Result Of Firmware Updates" Apr 20 18:46:33 oh shit ! Apr 20 18:46:42 groxx you mean synchronization by you or by the async task internal? Apr 20 18:47:07 g00s someone put a kill date in them? Apr 20 18:47:10 lasserix: I'm thinking, in the fragment on the onOptionsItemSelected() "refresh" handle, what if I just always call restartLoader() directly -- as a test? I won't even have to start the AsyncTask, or check the image count. Just call restartLoader() every time. Apr 20 18:47:15 g00s: I'm glad I didn't update to lollipoo Apr 20 18:47:18 lasserix: async task internals. see "memory observability" in the docs: http://developer.android.com/reference/android/os/AsyncTask.html Apr 20 18:47:28 If that still doesn't refresh the UI, then something is wrong Apr 20 18:47:44 groxx ahh ok, well he is doing this for review so i wanted to point out the way you are suppose to wire it together Apr 20 18:47:45 though now that I look at it again, it claims it's safe in onProgressUpdated, which I find questionable. Apr 20 18:47:48 I'm thinking it's not the AsyncTask; it's something in the fragment. Something with the CursorLoader Apr 20 18:47:51 joakimk_: yeah you can Apr 20 18:48:09 yeah. either way, returning is more obviously-correct Apr 20 18:48:11 " Asus is asking most customers to pay between $150 and $200 for repairs", lol Apr 20 18:48:17 joakimk_: does your doinbackground log report any differences ever? Apr 20 18:49:20 i bet it is because you are querying thumbnails Apr 20 18:49:39 My Nexus 4 died as well. The flash memory they used in the original runs is terrible and not made to last. I think Nexus 7 has the same problem Apr 20 18:49:41 i dont know if a thumbnail is generated automatically when you take a picture with a start activity for result Apr 20 18:49:54 lasserix: yeah? haha! I'll try images :D Apr 20 18:50:04 hence the cursor count of thumbnails will not change... but inspect whether your cursor count changes ever Apr 20 18:50:12 befofre blaming your fragment.loader logic Apr 20 18:50:41 liuwenhao: that's true for the 2012 Nexus 7, not the 2013 Apr 20 18:51:01 ahh Apr 20 18:51:07 Is there a horizontal listview in android? Apr 20 18:51:11 nope. The image count is unchanged, until I activate (or switch to) another gallery app Apr 20 18:51:22 only then is the count +1 Apr 20 18:51:41 (I'm taking a new photo with the camera while my app is running. that's my test) Apr 20 18:51:55 2012 N7 had bad flash or flash controller; but the issues people are seeing with 2013 indicate flash could be cuplit again Apr 20 18:52:00 microhaxo: hm. there may not be. maybe take a look at https://github.com/lucasr/twoway-view ? older versions of that are based on ListView too. Apr 20 18:52:11 That seems ridiculour Apr 20 18:52:14 so, the asynctask queries a stale mediastore. And restarting the loader does not help, neither. Apr 20 18:52:15 ridiculous Apr 20 18:53:07 lasserix: so I guess it's something of a catch-22; I have to refresh the mediastore (somehow) in order to get the count, to determine whether to... refresh the mediastore :-P Apr 20 18:53:17 microhaxo: you'll be saying that a lot if you keep using listview, and try to do apparently-abnormal things like rotate your phone :) Apr 20 18:53:22 joakimk_: yeah Apr 20 18:53:31 or rotate your layout* Apr 20 18:53:37 or: I'm not ever "refreshing the mediastore", right? At best, I'm refreshing my cursorloader :) Apr 20 18:53:49 guess that's the real problem Apr 20 18:53:54 Huh.. Apr 20 18:53:59 when these kinds of problems happen (even though, its a budget $200 device) - its still nexus - i wonder if I spend more money on a higher end device, will the same things happen Apr 20 18:54:09 Ok so how do i use that library twoway with android studio? Apr 20 18:54:39 I think I'll leave this. There must be some way to get it working, but, in any case, I now have an asynctask in my project. Thanks for all your help, lasserix! Apr 20 18:54:47 microhaxo: there are gradle instructions in the readme. beyond that, it's "just" a custom view. Apr 20 18:55:10 groxx, i am 100% new to android dev. I come from IOS/Windows Phone dev. Apr 20 18:55:23 microhaxo: use it in your xml like Apr 20 18:55:32 ok Apr 20 18:56:00 microhaxo: k. add the "compile 'a:b:c'" line to your app/build.gradle file, inside the "dependencies { ... }" container. Apr 20 18:56:21 There is a "gradlew.bat file included with src Apr 20 18:56:26 will that compile it for me? Apr 20 18:57:03 k, adding the lines Apr 20 18:57:09 that would be for building the project yourself. if you're using the "compile '...'" line in dependencies, it'll do all that for you. Apr 20 18:58:11 man, i tell you what. Developing for Windows phone is like 100X friendlier. Apr 20 18:58:24 simple nuget package and im done. Apr 20 18:58:24 lol Apr 20 18:59:29 hi Apr 20 18:59:48 i am trying to process images Apr 20 18:59:49 this is how MS will win, by doing the developing for you Apr 20 18:59:58 but i am always getting out of memory exception Apr 20 19:00:19 i am making thumbnails to avoid this problem Apr 20 19:00:25 i am working with thumnails Apr 20 19:00:37 should i call recycle method for every bitmap object? Apr 20 19:00:56 is there any documentation about this stuff Apr 20 19:01:08 neither volley nor picasso can automatically solve the problem Apr 20 19:01:50 bcursor: I have the same problem Apr 20 19:02:16 For retrofit is there a simple way to fix json-gson-pojo conversion if its throwing an error due to "" trying to parse as a double? Apr 20 19:02:33 shmooz: any solution ? Apr 20 19:02:46 lasserix: what would you expect to happen? Apr 20 19:03:00 an empty string is not a valid number Apr 20 19:03:31 not expecting anything just wondering if there is a simple way of fixing it Apr 20 19:03:40 bcursor: probably not the same, but similar, mine is scanning thumbnails from gallery and every third time I launch the app on my gingerbread phone it crashes with out of memory error Apr 20 19:03:53 there's nothing broken so I don't know what you mean by "fix" Apr 20 19:03:56 but it doesn't crash on other devices Apr 20 19:04:13 what behavior do you want? Apr 20 19:04:23 JakeWharton: prevent retrofit from throwing an error, sorry Apr 20 19:04:38 Then stop feeding it bogus data? Apr 20 19:04:44 thanks jaana Apr 20 19:04:54 that didn't occur to me Apr 20 19:05:01 schmooz: this drive me crazy. it is very hard to debug that problem. Apr 20 19:05:16 lasserix, I imagine your pojo is expecting a double when it should be expecting a string. Apr 20 19:05:21 Override that behavior so it converts it to 0 Apr 20 19:05:25 schmooz: i am working with thumbnails they are very small files like 200 kb approx Apr 20 19:05:27 yea i got that Apr 20 19:05:35 lasserix: If you are super desperate jav has an awesome ability to catch thrown exceptions Apr 20 19:05:37 ok so you want it to be 0 Apr 20 19:05:41 schmooz: why a 200 kb file casus memory to crash Apr 20 19:05:41 that's the behavior you want Apr 20 19:05:43 s/jav/Java/ Apr 20 19:05:56 bcursor: I think my problem is more when extracting album art from mp3 and other music files though Apr 20 19:06:15 along with scanning all the other things as well Apr 20 19:06:17 annotate the field with @JsonAdapter and write a TypeAdapter that accepts an empty string and sets 0 or otherwise delegates to normal double parsing Apr 20 19:08:07 bcursor: http://developer.android.com/training/displaying-bitmaps/index.html Apr 20 19:08:20 JakeWharton: do you have code example? Apr 20 19:08:23 I added https://github.com/lucasr/twoway-view via gradle method Apr 20 19:08:30 but it doesn't show up in the ui as a choice? Apr 20 19:08:36 is it manual entry only? Apr 20 19:08:44 microhaxo: it won't. built-ins only in the UI, sadly Apr 20 19:08:46 lasserix: https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/annotations/JsonAdapter.html Apr 20 19:08:51 ok Apr 20 19:08:52 thanks Apr 20 19:09:46 lasserix, another example: http://stackoverflow.com/questions/6014674/gson-custom-deseralizer-for-one-variable-in-an-object Apr 20 19:09:47 JakeWharton: do i have to register the type adapter somewhere? Apr 20 19:09:53 no Apr 20 19:09:54 *somewhere in the restadapter Apr 20 19:10:03 ok thanks Apr 20 19:14:20 btw, how do I properly combine two retrofit request into one? they both return the same object but no the same fields. It's like I want to union two sets Apr 20 19:14:31 s/request/requests/ Apr 20 19:15:19 this is new - when i search for an app in Play, the app's card no longer shows rating ? Apr 20 19:16:39 g00s: can't reproduce Apr 20 19:16:48 from the web Apr 20 19:17:00 g00s: checked both Apr 20 19:17:21 maybe they are a/b testing us heh Apr 20 19:17:34 yep, or rolling out Apr 20 19:18:01 if (user.equals("g00s")) { screwWithG00s(); } Apr 20 19:18:25 yeah, if i search for an app - the results do not have ratings Apr 20 19:18:52 maybe google wants the advertising signal > rating signal on purchasing decision Apr 20 19:19:18 ss? Apr 20 19:22:33 icedp, if you are using rxjava, you could use Observable.zip(request1, request2) Apr 20 19:22:41 Are floats always read as doubles? Apr 20 19:22:56 *I have all floats in my pojo but the retrofit says the gson error is with parsing a double Apr 20 19:24:40 lasserix: json (usually?) has only doubles Apr 20 19:24:46 json has "number" Apr 20 19:25:01 which is double Apr 20 19:25:14 maybe in java Apr 20 19:25:29 not sure where that would be standardized Apr 20 19:25:39 don't ppl pretty much use double for everything now, in java? Apr 20 19:26:21 http://spacetelescope.github.io/understanding-json-schema/reference/numeric.html#number Apr 20 19:26:30 I’m a bit confused as to how I’m supposed to supply my image resources for an Android TV layout. The developer guide says to provide resources for 1080p TVs, but it’s not clear how I’m supposed to do this using either -wXXXdp or -*dpi resource folders Apr 20 19:26:31 seems each json converter can choose what to do Apr 20 19:35:22 so even if i define float in my pojo json will try to parse it as a double? Apr 20 19:36:59 wish it would tell me what is throwing the error not just "" Apr 20 19:40:00 lasserix, why float? Apr 20 19:40:28 no reason Apr 20 19:40:32 just had them as floats Apr 20 19:41:01 i have no doubles in the pojo but retrofit says the error is trying to parse "" as a double so am i correct in assuming it is parsing a double and casting as float? Apr 20 19:41:59 does the stacktrace have a line number in the GSON project to reference? Apr 20 19:43:40 oh i am getting a different error now http://pastebin.com/hUrNBQhG Apr 20 19:43:43 so, can someone explain why images in my res/drawable folder need to be lower case? Apr 20 19:45:37 probably so the development could be OS-independent Apr 20 19:45:52 I believe it's using this TypeAdapter https://code.google.com/p/google-gson/source/browse/trunk/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java#272 which takes a double and casts it to a float Apr 20 19:46:51 microhaxo: because. sadly, that's the only reason, and it's true for every res/... file. Apr 20 19:47:22 quinnjn: I'm not using Rx and it seems to be a lot for just a single thing. maybe I should use it for next project Apr 20 19:47:50 icedp, yeah i recently started a new project and thought to learn rxjava. So nice once you understand the basics. Apr 20 19:55:22 So Apr 20 19:55:29 how do i hit breakpoints using the emulator? Apr 20 19:55:36 Android studio? Apr 20 19:56:31 same as regular phone ? Apr 20 19:58:44 microhaxo: you need to run your project in debug mode Apr 20 19:59:10 I don't think the annotation is working Apr 20 19:59:16 microhaxo: adb will spawn the process and then attach to it in the emulator to allow remote debugging Apr 20 19:59:35 I have an activity with launchmode=singletop, when i get a notification i open this activity using pendingintent and then in onnewintent i clear the notication, the problem is when i start a new activity from the singletop activity and i get a notification when i click the onnewintent function isn't called Apr 20 19:59:37 what can cause this? Apr 20 19:59:40 ahh nm it is Apr 20 20:00:45 thx Apr 20 20:01:30 microhaxo: it works the same way as debugging on a physical device Apr 20 20:06:52 anyone? Apr 20 20:07:25 microhaxo: put a breakpoint, click the "debug" button instead of "run". or, if the app is already running, there's an "attach to process" button also in the top toolbar that'll let you debug "later". Apr 20 20:10:02 Is there any quick way to get some pictures (JPEG files) onto the disk image file for an emulator in Android Studio? Apr 20 20:10:37 I've tried downloading photos using the web browser app (in the emulator), but that almost never works + it takes for eeeveeeeeeerrrr :( Apr 20 20:11:44 since the emulator re-uses the same disk image file every time I start that same emulator, the disk image is stored somewhere on my computer. Can I mount it in Windows, and just copy 100 photos onto it? Apr 20 20:13:05 say I'm making an camera real-time effect app. I'm able to display processed image on camera preview with the help of GLSL which I know sufficiently. However I can't process the camera image with GLSL since max texture size on phones is usually much lower then camera resolution e.g. 2048x2048 or even 1024x1024. Some apps seem just to save low-resolution surface screenshot and that's all. Which I don't Apr 20 20:13:07 thinks is acceptable. So it looks like I should either use OpenCL or RenderScript and I can't even find reliable information on what devices are supported Apr 20 20:13:09 dont know about window but you can mount it in linux Apr 20 20:14:25 joakimk_: start up the android device monitor, and you can browse the emulator's files, and push/pull whatever you want. just add them to the pictures folder, it should auto-detect them. Apr 20 20:16:06 joakimk_: bah. though it looks like it's not going to let you do a folder, just individual files. then `adb push /sdcard/pictures/` is probably your best bet, since I think that'll push folders with no problem. Apr 20 20:16:51 groxx: but where is that command prompt? :) Apr 20 20:17:46 joakimk_: whatever command prompt you normally use on your computer. win+R -> "cmd" -> enter for windows (or powershell), terminal.app for osx, whatever for Unixes. Apr 20 20:17:48 "Terminal", inside Android Studio? Apr 20 20:17:54 that could work too, yeah Apr 20 20:18:49 aha! but then, in cmd.exe, I first have to "cd" to the disk image file on my computer? Apr 20 20:18:57 before using adb? Apr 20 20:19:20 you'll want to start the emulator first, then you can `adb` from anywhere. Apr 20 20:20:19 ok, so I fire up the Nexus 9 emulator in the background, then CD to some images on my PC and use ADB to copy them onto the emulator, specifically to /sdcard/pictures? Apr 20 20:20:52 yep Apr 20 20:21:41 the /sdcard/pictures/ folder is just a spot that'll get automagically detected, so they'll appear in your gallery. Apr 20 20:23:46 groxx: 'adb' is not recognized as an internal or external command Apr 20 20:23:57 I'll try same, from prompt inside Android Studio Apr 20 20:24:08 ugh. apparently some devices ignore "windowSoftInputMode=adjustResize" when they're in landscape. because that wasn't an _important_ flag or anything, obviously. Apr 20 20:24:44 So ah Apr 20 20:24:46 joakimk_: ah. I forget how to make commands available globally in cmd.exe :| Apr 20 20:24:51 why cant i set a listviews background to a color? Apr 20 20:24:59 same error in Android Studio Apr 20 20:27:06 joakimk_: http://forum.xda-developers.com/showthread.php?t=1161779 Apr 20 20:27:57 joakimk_: or http://forum.xda-developers.com/showthread.php?t=2141817 (step 5, expand the two hidden contents) Apr 20 20:28:48 or http://stackoverflow.com/questions/13285670/how-to-add-android-tools-dir-to-windows-7-path is a bit more concise Apr 20 20:32:01 is your operating system a goat? Apr 20 20:32:16 g00s: indeed it is. Apr 20 20:32:36 I gaze deeply into the goat's eyes to log into IRC Apr 20 20:34:25 A reference to http://developer.android.com/reference/android/os/UserManager.html#isUserAGoat() ? Apr 20 20:35:11 Also lollipop was awesome enough to bring us the ability to "automatically identify goats using advanced goat recognition technology." Apr 20 20:36:33 it is pretty advanced Apr 20 20:37:08 kitkat, not advanced: http://androidxref.com/4.4.4_r1/xref/frameworks/base/core/java/android/os/UserManager.java#204 Apr 20 20:37:28 lollipop, using the technology of the FUTURE, to give you goat recognition TODAY: http://androidxref.com/5.1.0_r1/xref/frameworks/base/core/java/android/os/UserManager.java#478 Apr 20 20:39:57 Hey:D Apr 20 20:49:09 Hey Any droid devs in need of hosting or web work? Apr 20 21:01:34 woa when did goat simulator get an android port? Apr 20 21:01:40 must only run on top-end tablets Apr 20 21:13:32 is there a short form for "debugging"? Apr 20 21:15:23 dbg Apr 20 21:15:32 yes, that works! Apr 20 21:16:05 \o/ Apr 20 21:18:47 Will setting @JsonAdapter(DoubleErrorCatcher.class) work on @Expose private List ? Apr 20 21:22:28 no Apr 20 21:33:53 Whats best practice for starting activity from within a view? Apr 20 21:33:57 pass it back to the activity? Apr 20 21:34:21 getContext().startActivity doesn't work? Apr 20 21:35:24 I mean, once this new activity is started. Does it matter where it was started from? Apr 20 21:36:11 the view in the calling activity would be referring to its context (which is probably the activity it's in) to start this new activity (lasserix ) Apr 20 21:38:19 Afzal, I think he's not asking for the code ;) Apr 20 21:38:19 view no have startactivity for result Apr 20 21:38:29 lasserix, depending on what the view does Apr 20 21:38:39 lasserix, but I prefer to use the listener approach to be consistent Apr 20 21:38:45 and make it less coupled Apr 20 21:38:58 so many damn listeners Apr 20 21:39:00 setOnFobityFobbedListener( () -> { startActivity ... } ) Apr 20 21:39:37 does anyone know where i can find the source code of really well designed apps? Apr 20 21:44:42 anyone using Google Fit? Apr 20 21:45:05 Android Studio is eating up all my disk space... I'm using the emulator, and restarting it many times over, and now I think A.S. has eaten up ~5GB on C:\ Apr 20 21:45:17 surely this can be freed up? :) Apr 20 21:46:32 joakimk_: you think? Apr 20 21:46:39 joakimk_: plus caching is good Apr 20 21:47:05 Pwnies: https://github.com/JakeWharton/u2020 Apr 20 21:50:20 how can i find all string urls and add href tags to them? Apr 20 21:51:36 joroci: http://unixhelp.ed.ac.uk/CGI/man-cgi?grep Apr 20 21:52:27 joroci: sorry wrong command, http://unixhelp.ed.ac.uk/CGI/man-cgi?sed Apr 20 21:52:52 combine sed with find, http://unixhelp.ed.ac.uk/CGI/man-cgi?find Apr 20 21:53:24 joroci, what is your source holding urls? a text block? HTML? Apr 20 21:53:42 http://unix.stackexchange.com/a/112024/104332 Apr 20 21:54:12 the source is text user enters Apr 20 21:55:16 sorry wasn't clear enough Apr 20 21:58:35 quinnjn? Apr 20 22:04:36 joroci: So you want to find all string urls in user input programatically? Apr 20 22:05:11 What could a user input that would contain urls that you need to parse out? Apr 20 22:05:57 joroci: do you want to linkify them, or actually generate their text ? Apr 20 22:06:45 Is it possible to make an app that only stores settings and what not on the device and the code be remotely ? Apr 20 22:08:36 hdx Apr 20 22:08:40 yes Apr 20 22:09:15 i want linkify but linkify doesn't work for me, i want to the acutal text i store in the object to change Apr 20 22:09:42 how so? Apr 20 22:09:54 the return string remain the same Apr 20 22:10:17 i tried it with spannablestring Apr 20 22:11:50 if you getText(), you'll get an Editable, which will contain the linkified spans. as long as you don't toString() it, they'll stay around. Apr 20 22:13:34 is there a way to convert it to a string and keep the linkified urs? Apr 20 22:13:36 urls Apr 20 22:17:25 joroci: you can step through the spans and do it by hand. but why do you want to convert it to a string? is it going to be sent over the internet or something? Apr 20 22:17:51 ronkrt: yes. it's called chrome ;) Apr 20 22:19:16 yea i save it Apr 20 22:19:22 to a db Apr 20 22:19:44 no idea why Apr 20 22:19:45 joroci: I've never tried, but perhaps Html.toHtml(SpannedString) will work? Apr 20 22:20:13 i'll give it a try Apr 20 22:25:37 The action icons in my Toolbar aren't vertically centered in landscape for all API versions, and in portrait for APIs 14-20, what can I do to fix that? Apr 20 22:25:58 groxx it worked but not as expected Apr 20 22:26:07 i think Apr 20 22:26:28 cr5315 play with minHeight Apr 20 22:26:49 they are also vertically centered inside the minHeight from my experience Apr 20 22:27:12 I'm using android:minHeight="?android:actionBarSize" Apr 20 22:27:24 joroci use linkify? Apr 20 22:27:28 http://pastebin.com/eEaF2wEj Apr 20 22:27:34 is this what linkify suppose to do? Apr 20 22:28:16 or is it the Html.toHtml? Apr 20 22:28:18 joroci holy hell, is that what it does? should be one right? Apr 20 22:28:59 cr5315 that's 56dp if I'm not mistaken. If your landscpae toolbar is taller than that, then they wouldn't center Apr 20 22:29:09 -landscape Apr 20 22:29:38 joroci: lol, that certainly looks like it got confused Apr 20 22:29:56 how do i see the getText value without to string? Apr 20 22:30:09 I love how "com" is nderlined, but nothing else is Apr 20 22:30:26 "see the getText value without toString"? Apr 20 22:30:45 joroci it returns a CharSequence sooo... put that in a spannable string? Apr 20 22:31:43 it returns a spannablestringbuilde Apr 20 22:31:58 has anyone had any luck using a galaxy s5 with android studio? Apr 20 22:32:02 okay so build a spannable string with that? Apr 20 22:32:22 Hi all, I have a problem with an xml drawable not seeming to recognize a button that is disabled. The default state for the button in the layout is android:enabled="false" but I never get the grey rectangle. Once I programmatically enable the button, I get the expected red rectangle. xml drawable code: http://fpaste.org/213578/14295690/ Apr 20 22:32:36 i did Apr 20 22:32:43 no hrefs just the url Apr 20 22:33:00 I set layout_height to ?android:actionBarSize and that fixed it for landscape on API 22, but portrait on API 21 is still off Apr 20 22:33:29 And landscape on 21 too Apr 20 22:33:29 cr5315 screenshot? Apr 20 22:33:33 I have a .data file, which is just a sqllite file. I want to load this up in my app, and query it. Does anyone have any suggestions for going about this? Apr 20 22:33:47 Afzal, http://i.gyazo.com/fa4540dec0bfeaa88b6d485e15456af5.png Apr 20 22:34:49 hmm Apr 20 22:35:15 Afzal, I've got to go for now, I'll be back in like 20some minutes Apr 20 22:35:18 ok Apr 20 22:37:25 cr5315: btw it looks to high for landscape. I'm using values as Material design suggests - only 48dp for phone landscape Apr 20 22:37:52 cr5315: should be centered then Apr 20 22:38:48 Is there a way to guarantee a child cannot cause its parent to resize? Apr 20 22:43:50 lasserix: override onMeasure? Apr 20 22:44:00 lasserix: why? Apr 20 22:45:34 man, I'm having one hell of a time getting the emulator to dump an hprof Apr 20 22:45:50 lasserix: fix the parent size Apr 20 22:49:31 i have to use an ad sdk that takes your videoview and does it own stuff to it Apr 20 22:49:34 including cause it to resize Apr 20 22:49:39 *and its parent Apr 20 22:49:42 so i want to prevent this Apr 20 22:50:45 sorry, didn't realize I password protected the paste, open paste of xml code: http://ur1.ca/k7u63 Apr 20 22:53:42 snowinferno|work: there is no default state in your xml. just edit the last item to has only :drawable attr Apr 20 22:54:45 icedp: but the red rectangle shows up for other buttons using the same drawable when they default in the layout to enabled, why is it only a problem when trying to use it for a disabled button"? Apr 20 22:57:13 icedp: I changed the state_enabled="true" line to exclude the state_enabled piece which has the same effect as your suggestion, no change in what is shown for either enabled or disabled buttons using the xml drawable Apr 20 22:57:41 Wow Apr 20 22:57:49 Android Studio undo and redo is totally broken Apr 20 22:57:52 My code is all messed up Apr 20 22:58:20 Thank you AS! https://i.imgur.com/PQUULt2.png Apr 20 22:58:31 Wow are you fucking kidding me Apr 20 22:59:48 It drinks sometimes. Apr 20 23:01:56 at this point it's probably beyond "sometimes" and well into the "abuses drink" realm Apr 20 23:03:35 TacticalJoke nobody liked my AS workflow Apr 20 23:03:57 I saw that. lol Apr 20 23:04:13 That subreddit is hard to predict. Apr 20 23:04:16 those guys have no sense of humor Apr 20 23:06:42 g00s lol where is your workflow? Apr 20 23:07:23 http://www.reddit.com/r/androiddev/comments/337hqr/what_is_your_typical_android_workflow/cqiabdj Apr 20 23:07:34 g00s: is it: "rm -rf /Applications/Android\ Studio.app && brew install vim && vim MyApplication.java" ? Apr 20 23:07:39 g00s's workflow leverages the power of Gradle. Apr 20 23:07:49 groxx :D haha Apr 20 23:07:53 lol Apr 20 23:08:02 emacs & eclipse for me Apr 20 23:08:09 burn the witch! Apr 20 23:08:29 nano & netbeans ! Apr 20 23:08:34 I don't get why people keep downvoting a comment. Apr 20 23:08:38 Like, damn, the horse is already dead. Apr 20 23:08:45 ^^ haha Apr 20 23:08:52 cat and dd! Apr 20 23:09:23 at some point i need to give cedet a serious look: http://cedet.sourceforge.net/ Apr 20 23:09:32 see how it compares to mainstream IDEs Apr 20 23:09:34 with that web page Apr 20 23:09:35 no Apr 20 23:09:47 bankai_: https://31.media.tumblr.com/tumblr_lkbikrgJxn1qdo7yb.png Apr 20 23:10:16 most hardcorest coding flow ever Apr 20 23:10:36 That library for canceling toasts. Ugh. Apr 20 23:10:53 myke: is that like "emacs for eclipse fans"? Apr 20 23:11:35 groxx: emacs has a ton of add-ons, there's separate project managers, gdb integration has been around for decades at this point, etc Apr 20 23:12:09 meanwhile eclipse still crashes less than infrequently when using edit boxes too much Apr 20 23:12:21 yeah, but it doesn't yet have a "we ported Eclipse to emacs-lisp, and wrote a jvm so you can run plugins" add-on, I think? Apr 20 23:12:41 http://eclim.org/ has integration with emacs too, iirc Apr 20 23:12:43 haven't tried tho Apr 20 23:13:58 myke: wowzer. is that for people trying to do android dev on a netbook or something? Apr 20 23:14:53 i have an older core2duo laptop and AS is rough Apr 20 23:14:58 eclim looked really cool; i wish you could run eclipse headless though Apr 20 23:15:07 seems like full eclipse still has to be running Apr 20 23:15:17 yeah it's more eclipse remote control Apr 20 23:15:23 g00s: isn't that one of the modes they mention? Apr 20 23:15:27 myke my MBP is core2, its bad Apr 20 23:15:51 does anyone know what might cause me to be unable to run am or pm over adb? Apr 20 23:15:59 i already set up a workflow where i run emacs on a remote server and use ssh forwardings to allow gradle, etc access to adb running on my laptop Apr 20 23:16:11 so can connect to a real device here and do compiling on a fast remote server Apr 20 23:16:12 I just get, ABORTED Apr 20 23:16:46 to me that's the biggest drawback of a graphical IDE, it forces your dev box to be the one you're sitting at Apr 20 23:17:07 seems kinda antiquated with cloud everything else Apr 20 23:17:14 groxx hm. myke is 'headless instance of eclipse" now, without the GUI running ? Apr 20 23:17:35 g00s: i haven't tried eclim Apr 20 23:17:58 myke: no more than does. VNC is a thing. Apr 20 23:18:31 yeah and you can forward X11 connections, but both those solutions are a bit grotty Apr 20 23:18:35 it's just higher bandwidth :) Apr 20 23:19:55 I'm actually kinda curious what an efficient browser-based IDE would perform like. typed arrays are memory efficient and performant, helper libs could be emscripten'd to asm.js, etc. Apr 20 23:20:11 might ultimately be less overhead than Java D: Apr 20 23:20:16 doesn't mozilla have a web based ide ? Apr 20 23:20:19 i thought eclipse did too Apr 20 23:20:25 i'd be surprised if there weren't cloud-based ides around Apr 20 23:20:30 there are a variety Apr 20 23:21:00 i've spent enough years in emacs that having to switch to another code editor would be a significant drawback Apr 20 23:21:18 but as far as I've seen, none are _really_ sophisticated. they're all just syntax highlighting + trivial autocomplete (if any), no real plugins or anything. Apr 20 23:21:50 plus, why not a javascript-based javac? Apr 20 23:22:04 slower than javac, but doesn't require installing java. Apr 20 23:25:35 is there a reason PM or AM would only work as a superuser? Apr 20 23:26:36 glicholas_, you're running some command under it that needs system privs, presumably Apr 20 23:27:01 dragorn: I'm just using install Apr 20 23:28:56 it also fails if I run it with no options Apr 20 23:31:34 Is Handler from the MainLooper is the same as runOnUiThread? Apr 20 23:38:54 Afzal: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/app/Activity.java#5282 Apr 20 23:40:03 TacticalJoke that looks like the Activity keeps a reference to the UI Thread Apr 20 23:40:06 but this http://developer.android.com/reference/android/os/Looper.html#getMainLooper() Apr 20 23:40:14 says this looper is from the main thread of the app Apr 20 23:40:40 Got distracted by the fact that AS doesn't show me android source anymore, instead tries to decompile android.jar >_< Apr 20 23:42:28 Afzal: not quite. runOnUiThread will run _immediately_ if you're already on the main thread. if you post to a handler, it's _always_ asynchronous. Apr 20 23:44:51 I see Apr 20 23:45:10 thanks Apr 21 00:45:03 hmm, found a neat bug if you have multiple foreground services Apr 21 00:45:23 yay bugs! Apr 21 00:45:53 I've done that. what's the bug? I might have to make changes :| Apr 21 00:45:54 if you have 2 foreground services, and start one with a notification id, and then start a second foreground service with the same notification id, if you subsequently stop the 2nd foreground service, the first service remains a foreground service while at the same time not having a foreground notification Apr 21 00:46:14 lol Apr 21 00:46:18 (goes along the lines of people who want to have foreground services without having a notification icon indicating that it's actually foreground) Apr 21 00:46:24 so basically the null-notification trick is still around Apr 21 00:46:28 pretty much Apr 21 00:46:47 I was wondering wtf my foreground notification went... I was using the same notification id in my different services Apr 21 00:47:19 I can't tell if I should say "submit a bugreport?" or "use it for nefarious deeds / release a library" Apr 21 00:47:27 hello Apr 21 00:47:31 i am learning android development Apr 21 00:47:46 does anyone have any relatively simple projects i can create? Apr 21 00:47:53 groxx, the correct answer is to submit a bug report Apr 21 00:47:55 but I'm too lazy Apr 21 00:48:11 pfn: ah. good point. Apr 21 00:48:14 * groxx goes for coffee Apr 21 00:49:42 https://github.com/pfn/keepshare/commit/2e89c185e27df6f1a1b3bc485f320fcfb381581d Apr 21 00:49:42 meh Apr 21 00:49:46 aspire: A calculator. Apr 21 00:50:07 i made something very similar to that actually Apr 21 00:50:35 it was a counting program with a edit text at the top and a 'count' button Apr 21 00:50:46 when you press the count button it adds the number inside the edit text to a total Apr 21 00:50:50 What would you like to make/ Apr 21 00:50:51 and displays the total in a label below Apr 21 00:51:03 well, i'd like to make something that involves fundamental android concepts Apr 21 00:51:19 time to publish a new version of keepshare soon... I need to troll for customers, boooo Apr 21 00:52:07 ahh it feels good to undermine the contraints of an sdk Apr 21 00:52:33 TacticalJoke id like to make a series of projects that cover all the fundamentals in android development Apr 21 00:52:40 perhaps one concept per project Apr 21 00:55:39 aspire: Is your ultimate goal simply to learn Android? Or is it to make a particular app? Apr 21 00:55:47 learn android Apr 21 00:56:01 stop gabbering and start coding Apr 21 00:56:10 sure, coding what Apr 21 00:56:35 Hmm, I'm not sure. My only goal is to make one Android app. :D So my task is simply to become an expert on everything related to that app. Apr 21 00:56:58 mhm Apr 21 00:57:07 well what im doing right now is im making an app that lets you keep track of notes Apr 21 00:58:28 it will use sqlite to store the notes Apr 21 00:58:38 aspire: One thing I can suggest, though, is the language Kotlin. It has the potential to overtake Java as *the* Android language. Apr 21 00:58:43 Though it's pre-1.0 so far and predictions are hard. Apr 21 00:58:58 If you simply enjoy programming, it's worth looking at. Apr 21 00:59:19 mhmm Apr 21 00:59:25 well heres my plan with android development Apr 21 00:59:36 i intend to learn everything i need to about android dev in preparation for writing a series of apps Apr 21 00:59:46 i dont know what those apps will do but Apr 21 00:59:57 i figure if i know fundamentals i can do whatever Apr 21 01:00:02 i dont plan on doing game development Apr 21 01:00:04 the notes app i use really stinks, so good Apr 21 01:00:16 aspire: IMO, it's better to just make the final apps (whatever they are). Apr 21 01:00:16 you know there's collections of small apps that showcase different android concepts, yea? Apr 21 01:00:25 "i intend to learn everything i need to about android dev in preparation for writing a series of apps" the problem with this is you're in an endless while loop Apr 21 01:00:28 You can spend years "learning Android" and not really achieving much. Apr 21 01:00:31 since what you really want is a do while loop Apr 21 01:00:39 do (code) while (learning) code Apr 21 01:00:42 Nice, lasserix. :) Apr 21 01:00:55 aspire: https://github.com/aporter/coursera-android/tree/master/Examples Apr 21 01:00:56 TacticalJoke Apr 21 01:01:06 It's also very hard to learn all of Android without a definite direction. Apr 21 01:01:16 surely some of the concepts in my final apps will be present in my smaller apps Apr 21 01:01:23 and i would prefer the best way of doing it Apr 21 01:01:24 and oo myke Apr 21 01:01:27 Yeah, but how much time will you spend? Three years? Apr 21 01:01:32 By then, you could've made an awesome app. Apr 21 01:01:40 also a lot of apps tie in tightly with other components Apr 21 01:01:47 Your thinking almost seems to assume that you have unlimited time. Apr 21 01:01:50 for example most anything that communicates with a server Apr 21 01:02:13 mhm TacticalJoke Apr 21 01:02:20 so you need to make the whole system at once...even simple Spring demos often launch a tomcat server Apr 21 01:02:29 Even if you have unlimited time for Android development, you could get bored of it after a few years. Apr 21 01:03:23 mhmm Apr 21 01:03:30 another thing is that i have an android development course next semester Apr 21 01:03:31 Or you might meet some woman, who takes your mind away from programming. Apr 21 01:03:36 and i want to be knowledgeable Apr 21 01:03:38 Women are the enemy of hobby programming. Apr 21 01:03:57 btw TacticalJoke kotlin looks a lot like scala Apr 21 01:03:59 judging from these demos lol Apr 21 01:04:46 kotlin's a really simple java++ Apr 21 01:05:26 I'm guessing that Kotlin's syntax is inspired by Scala's (as well as Java's, C#'s, Pascal's, etc.). Apr 21 01:05:36 But they are different beneath the skin. Apr 21 01:06:41 i prefer scala to kotlin based on wat im seeing Apr 21 01:07:15 From what I read, Kotlin is way more suitable for Android development. Apr 21 01:08:18 multidex has really opened android up to using any language Apr 21 01:08:21 Here's a rationale for using Kotlin for Android development: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/ Apr 21 01:13:09 "Java 10 will push Optional onto the stack, but we'll all be dead before Android sees that." Apr 21 01:13:43 Someone should make an Android-development-quotes book. :D Apr 21 01:14:32 It'd be like one of those philosophy books that leave the reader feeling suicidal. Apr 21 01:19:41 does gson handle simple enums out of the box? Apr 21 01:25:33 aspire: Kotlin is like a super simplified version of Scala Apr 21 01:38:08 TacticalJoke lol Apr 21 01:38:21 Appendix A: Goos-isms Apr 21 01:43:03 AS 1.2 RC0 - i guess i should try this one Apr 21 01:43:45 Not RC1? Weird. Apr 21 01:45:21 I kinda cringe when RMS says "Freedom 0", "Freedom 1", etc. Surely he would know that the 0-based system is about offsets, not indices. Apr 21 01:46:34 (So it's either "Freedom 1" or "The freedom that is 0 from the beginning".) Apr 21 01:47:36 CedricBeust yeah, seems like it Apr 21 01:47:40 either way i still prefer scala heh Apr 21 01:47:53 Though I guess you could make the case that "Freedom 0" is a way of saying "... 0 from the beginning", but it'd be a weird way of talking. Apr 21 01:48:33 aspire: Knock yourself out, report back on your experiences, although I have a guess what you'll say :) Apr 21 01:48:55 ive used scala many times, no regrets : ) Apr 21 01:49:00 i was turned on by all of the cool stuff Apr 21 01:49:08 Have you used Scala for Android programming? Apr 21 01:49:11 aspire: Yes but you haven't used Scala on Android... Apr 21 01:49:16 Learn you will. Apr 21 01:49:19 o... Apr 21 01:49:23 can you even use scala for android?? Apr 21 01:49:29 im new to android Apr 21 01:49:41 pfn can help you with that Apr 21 01:49:48 The road is pretty steep, just be ready Apr 21 01:50:11 wow link to tutorial or something? Apr 21 01:50:53 not very steep Apr 21 01:51:00 but it does require a good understanding of java to begin with Apr 21 01:51:16 ugh, I hate forgetting i"m in the wrong terminal window and hitting run Apr 21 01:51:23 run the wrong project... Apr 21 01:51:33 pfn: You just need to pay attention Apr 21 01:51:34 ls -l Apr 21 01:51:38 oh shit Apr 21 01:52:35 ok whatever im just going to use java Apr 21 01:52:42 ok so im writing an app that lets you add/remove/modify notes Apr 21 01:52:49 aspire: It's a reasonable decision to learn Apr 21 01:52:50 now im aware that fragments exist but heres what i have in mind Apr 21 01:53:07 NotesActivity - holds the listview of notes (as well as the add notes button) Apr 21 01:53:30 aspire: I recommend to make your activity as empty as possible and put all your UI logic in your fragment Apr 21 01:53:32 aspire: You can easily switch to Kotlin later, if it turns out to be successful after 1.0. Apr 21 01:53:38 then again, if you're a FP god, scala would come pretty easily on android as well Apr 21 01:53:51 coursera has some good functional and reactive courses Apr 21 01:53:53 in scala Apr 21 01:53:58 DeleteNoteActivity - when the delete note menu item is pressed (via long press on list view) Apr 21 01:54:05 Kotlin and Java files can exist (and interoperate) side by side in Android Studio. Apr 21 01:54:09 NoteActivity - used for creating/editing notes Apr 21 01:54:16 CedricBeust mhmm Apr 21 01:54:17 aspire: Doesn't sound like deleting a note would warrant a full activity of its own Apr 21 01:54:51 perhaps CedricBeust but im still learning and i want to learn how to pass data between activities Apr 21 01:55:01 Alright Apr 21 01:55:26 all the delete activity will hold is the note title, the note text, and a delete button at the very bottom Apr 21 01:55:28 Overly attached note: "You're just gonna delete me like that? After all that we've been through. I can't believe it'd end like this." Apr 21 01:55:29 kind of like a confirmation Apr 21 01:55:42 lol Apr 21 01:55:54 ok so CedricBeust should i be using fragments instead of activities? Apr 21 01:56:10 aspire: Like I said, put your GUI logic in fragments Apr 21 01:56:26 so the fragments dont have a ui or? Apr 21 01:58:03 should i be using a listfragment for the list of notes? Apr 21 01:58:37 You could also use ListView directly or RecyclerView (which is basically ListView 2.0). Apr 21 01:59:03 Though the latter doesn't support some ListView stuff (such as dividers) by default. Apr 21 01:59:15 ListView 2.0: now with more boilerplate! comes disassembled! Apr 21 01:59:20 :D Apr 21 01:59:21 mhmmm Apr 21 01:59:47 it's not quite win/win. but overall I like it better :) Apr 21 01:59:54 http://i.ytimg.com/vi/OoCySqneJno/maxresdefault.jpg im kind of aiming for this Apr 21 02:00:02 in terms of how i want my notes to be displayed in the list Apr 21 02:00:13 except instead of a star ill have an edit and remove icon Apr 21 02:00:24 oh no, not another note taking app ... denied ! Apr 21 02:00:30 im learning :( Apr 21 02:00:40 android.graphics.Rect is mutable, isn't it... Apr 21 02:00:45 its like playing stairway to heaven at Guitar Center Apr 21 02:00:47 I just spent a few hours trying to track down this bug... Apr 21 02:01:04 errr Apr 21 02:01:12 g00s: :D Apr 21 02:01:16 well i figure i can figure out how a few things work Apr 21 02:01:19 ill be using sqlite to store the notes Apr 21 02:01:23 oh god... Apr 21 02:01:28 unless you can suggest another? Apr 21 02:01:38 aspire: How about a Twitter client that doesn't suck? Apr 21 02:01:41 Android needs one of those. Apr 21 02:01:54 i dont even have a twitter account Apr 21 02:02:00 fml Apr 21 02:02:06 so im ruling that out as an option but something i kind of want to do is Apr 21 02:02:09 pfn: yep Apr 21 02:02:09 fml fml fml Apr 21 02:02:17 for my capstone project i want to write a chatroom (sort of) Apr 21 02:02:21 with a desktop app and an android app Apr 21 02:02:25 pfn did your 2013 n7 blow up? i hear those are bricking these days Apr 21 02:02:30 aspire, that's a *lot* of work. Apr 21 02:02:33 g00s, it still runs fine Apr 21 02:02:36 aspire: isn't that called IRC ? :P Apr 21 02:02:41 eh, mine will be different Apr 21 02:02:43 on the bright side, my bug is now fixed... Apr 21 02:02:45 And who's gonna use it? Apr 21 02:02:55 TacticalJoke likely no one, its for my capstone project Apr 21 02:03:23 - controlsInset = insets; Apr 21 02:03:23 + controlsInset = new Rect(insets); Apr 21 02:03:24 how about a combination of irc and instant messenger Apr 21 02:03:26 * pfn grumbles Apr 21 02:03:41 so imagine if all of the users in this channel had an actual profile Apr 21 02:03:48 profile pics included Apr 21 02:03:52 I dunno; I feel weird when people make pointless stuff just because. Why not make something awesome? :D Apr 21 02:03:58 pfn: ha Apr 21 02:04:12 well, it is school related so Apr 21 02:04:19 If nobody made anything unless it's awesome, nobody would be making anything at all Apr 21 02:04:31 pfn: I had a facepalm like that a while ago, with getImageMatrix() + lots of matrix tweaking and animations Apr 21 02:04:43 CedricBeust: but! everything would be awesome. Apr 21 02:04:56 the app store would be browse-able. Apr 21 02:04:58 groxx: So... the empty set Apr 21 02:05:27 this does not falsify my statement :) Apr 21 02:05:40 everything would also be unicorns, obv. Apr 21 02:08:06 yeah, here we go again : just went to play.google.com, searched for something, and none of the results show ratings Apr 21 02:09:04 I'm not seeing ratings in the result list in my web browser. Apr 21 02:10:51 RC0 isn't mentioned here yet: http://tools.android.com/recent Apr 21 02:11:00 Did you try it, g00s? Apr 21 02:11:07 Not sure whether to wait. :| Apr 21 02:11:08 yeah, i still have the same problem Apr 21 02:14:34 Hey, drose379. Apr 21 02:15:23 al, so the new RC0 starts up and does a gradle sync right away ... i think thats is normal Apr 21 02:15:41 but there is a notification saying 'gradle sync in progress' ... which won't go away Apr 21 02:16:03 i cant make it go away anyhow Apr 21 02:16:06 Has anyone here ever created a Chooser intent to let the user choose an image Apr 21 02:16:17 And then gotten the file from that and uploaded it to an API Apr 21 02:20:07 drose379: that doesn't make sense Apr 21 02:21:32 uploading an image to an API Apr 21 02:21:34 Whats up TacticalJoke Apr 21 02:21:51 shmooz why not Apr 21 02:22:24 API's are not flicker Apr 21 02:22:38 I need to give the file to my API which saves it to my server Apr 21 02:23:16 you mean like middleware Apr 21 02:23:33 Well before I worry about that, I need to create the image file from the Uri Apr 21 02:23:52 Im trying to pass the Uri into the new File constructor, but File() only takes URI and not Uri Apr 21 02:24:04 you can scan for all existing images on device using MediaStore Apr 21 02:24:32 Ok so far I just have intent.getData() that gives me a Uri Apr 21 02:24:34 and get the uri that way Apr 21 02:24:42 So i should look into MediaStore? Apr 21 02:25:08 you will be uploading images that exist on device or the net ? Apr 21 02:25:33 They are from the devices filesystem Apr 21 02:25:50 if on device then yes you can use MediaStore to find them Apr 21 02:26:09 Can i still use the Intent chooser to allow the user to select a photo Apr 21 02:26:37 probably Apr 21 02:26:51 don't ask me how Apr 21 02:27:40 how are you going to find and display the images in the first place ? Apr 21 02:28:12 Intent does that Apr 21 02:28:25 Intent.createChooser() Apr 21 02:42:21 why would UDP multicasting work differently across android versions ? Apr 21 02:43:06 i wonder if this dev just had problems from various carriers, or if it was a network stack problem Apr 21 02:45:59 So a bitmap is a file type right? Apr 21 02:47:38 no Apr 21 02:47:58 in android a bitmap is an uncompressed in-memory representation of your image Apr 21 02:49:24 Can I go from bitmap to regular file, to upload to web server Apr 21 02:51:15 not sure how that helps but i guess so Apr 21 02:51:56 Can I upload the bitmap to the serve? **** ENDING LOGGING AT Tue Apr 21 02:59:58 2015