**** BEGIN LOGGING AT Tue May 19 02:59:59 2015 May 19 03:00:10 not directly May 19 03:00:35 although I would imagine there's a decent amount of overlap May 19 03:02:25 well one difference, is that this irc channel is actually UP most of the time, unlike reddit May 19 03:02:26 thea mount of reddit links spammed here it's easy to mistake this for a subreddit :) May 19 03:06:49 well I only ask because the subreddit /r/android_dev is private May 19 03:07:01 was wondering if someone in here could help with that ;-) May 19 03:07:17 http://reddit.com/r/androiddev May 19 03:10:11 woa! May 19 03:10:27 i just defined a custom view with some static text programatically added...and it's showing up in the layout editor May 19 03:10:55 savor it while it works May 19 03:11:04 because it probably won't, tomorroe May 19 03:11:56 haha May 19 03:12:02 i'm still using eclipse... May 19 03:12:16 can change colors too May 19 03:12:19 that's just freaky May 19 03:12:39 i guess the layout editor is actually running those views May 19 03:12:47 can't see how that might go horribly wrong... May 19 03:13:24 of course it already crashes all the time anyway so probably not much different May 19 03:13:41 myke: yeah, that's basically what it does. check out the stack traces when it fails :) May 19 03:19:17 Panasonic! wow, forgot they're still around May 19 03:22:03 How do widgets add themselves to the home screen after exiting the configuration activity for the first time? Any resources someone can link me? May 19 03:22:50 myke +1 for eclipse development May 19 03:23:03 Appwidgets I mean May 19 03:23:48 aah is thei AS? May 19 03:23:59 *is this AS* stoneder May 19 03:24:17 AS? May 19 03:27:10 stoneder: I think that's handled by the launcher, though I've never really looked into it closely May 19 03:28:13 Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse May 19 03:28:57 That's what I kept reading, people say it's impossible but I see many widgets do that on my device. May 19 03:29:12 myke: it's kinda cool, but I hate sprinkling that around my code :( May 19 03:29:59 stoneder: they're probably saying it's impossible for *you*, as a widget creator, to do that yourself. launchers can do whatever they like. May 19 03:30:41 stoneder, are you stoned on #math or #programming? i forget which May 19 03:30:52 groxx, right that's what I mean, still wish I knew why other widgets can do it while mine cannot May 19 03:31:11 wagonboi, no lol that's my bro May 19 03:31:35 oh ok. i wanted to talk to him then i saw you May 19 03:33:03 stoneder: followed the instructions here yet? http://developer.android.com/guide/topics/appwidgets/index.html#Configuring May 19 03:34:22 For the most part. I have a habit of skimming over important stuff on the official documentation May 19 03:37:23 anyone have experience on making textureview rounded? May 19 03:37:34 since you have no access to draw or onDraw, they are final May 19 03:52:37 hi May 19 03:55:41 I have an edittext with inside hashtag, #mytweet. is there some method to avoid that user delete this hashtag ? May 19 03:57:28 devuser: text watcher could re-add it if they delete it (I'd make it a single Spannable) May 19 03:58:07 groxx, i know but if user delete part of hashtag this is confused May 19 03:58:39 which is why it should be a single "thing", rather than a series of letters. Spans will let you do that. May 19 03:59:28 Spans? May 19 04:01:03 e.g. http://blog.stylingandroid.com/introduction-to-spans/ May 19 04:01:36 metadata inside text, basically May 19 04:01:52 but you can make it behave and draw differently May 19 04:03:11 someone here did a presentation on it recently, I think? I forget who it was, maybe MikeWallaceDev (offline, at the moment) May 19 04:04:06 ok May 19 04:04:15 spannable is solution May 19 04:04:39 i don't understand how creare word #mytweet one only block May 19 04:08:22 hm. it'll have to be a subclass of http://developer.android.com/reference/android/text/style/MetricAffectingSpan.html but it seems ReplacementSpan is abstract. May 19 04:08:47 Not specifically android related, but anyone in here pretty well knowledged in online video including mpeg dash? don't know who else to ask aside from my android devs May 19 04:09:46 devuser: or at least, I lean towards just drawing it custom, wrapping a single character. really simple behavioral logic then. not sure if there's a simpler way... May 19 04:10:28 devuser: i can't easily Google for stuff right now. look around, there's a moderate amount of material about how to use spans May 19 04:13:10 sk8rjess: depends on what the question is. will android reliably play it: nope. baseline h.264 is probably your best bet. May 19 04:14:05 I'm trying to find the most secure all around solution. May 19 04:14:28 secure? May 19 04:16:25 From being downloaded. Like I said, not specifically android related. One of our media websites hosts all our videos on encoding.com and recently we were told a normal user was able to download all of our media. I'm trying to find a quick solution as I start dev on a dash player/solution May 19 04:16:41 anything with a DRM extension is probably equivalent, since you can't really do anything if someone bypasses it. that'll protect all the legal instances, your you'll never prevent all the illegal ones. May 19 04:17:05 typing on mobile is hard :| May 19 04:19:35 I thought about doing HLS. Unfortunately our hosting doesn't support encrypted HLS as of right now but a normal HLS would be harder for an average user to get ahold of. Problem is I was notified about 2 hours ago one of our clients wants to meet with us early AM and discuss what we have came up with for a solution but he thinks it'll be done tomorrow. People don't understand development takes time. May 19 04:22:20 sk8rjess: heh, yeah, I hear ya. unfortunately I think you're quite a bit out of my depth. mostly I've been on the other side, finding ways around not-quite-drm. typically it's very easy. May 19 04:22:48 See, that's my issue too haha. I've always been one to go after it, not prevent it. May 19 04:23:06 e.g. rtmpdump is trivial, and handles a lot of Flash methods, which seem to be considered a "more secure" option May 19 04:24:02 most of our android video was rtmp. IMO that's one of the easiest to get May 19 04:24:21 helps that rtmpdump is so good :) May 19 04:24:34 very much! May 19 04:25:16 oh boy, depending on the customer, and things that were downloaded, and damages ... could turn out very bad May 19 04:25:26 like, we'll see you in court bad May 19 04:26:23 only thing I can really offer is semi-intelligent rubber-ducking, I'm afraid. e.g. dash, as a standard, seems likely to be even easier than rtmp to scrape (if not now, eventually), unless you can go the DRM route. May 19 04:26:24 No, not that far into it. No damages as it was our own content was was downloaded. Just a precautios customer - which is perfectly reasonable. May 19 04:29:22 sk8rjess: not sure how much it'll help, but AFAIK the biggest chunk of complex media code is https://developer.android.com/guide/topics/media/exoplayer.html May 19 04:29:50 g00s_: was it you who poked at that a while back? or someone else? May 19 04:30:03 irccloud needs a search :| May 19 04:30:09 i think lasserix May 19 04:30:48 ¯\_(ツ)_/¯ doesn't ring any stronger, but could be. May 19 04:30:56 That's good info since earlier i started the barebones of a new app May 19 04:32:14 sk8rjess: a bit of googling suggests http://developer.sonymobile.com/2015/02/02/easy-mpeg-dash-streaming-with-multimedia-for-android-library-open-source/ may also be interesting, though dunno. May 19 04:33:07 I lean towards free/open source, because I can use it for side projects. for work, a paid option might end up better, but I don't know where to look. May 19 04:34:11 * g00s_ hands groxx v8 May 19 04:35:05 no! no veggies! May 19 04:36:44 "If you don't eat your veggies you can't have any cake. How can you have any cake if you don't eat your veggies?" May 19 04:36:58 the cake is a lie anyway May 19 04:37:51 also: irrational. carrot cake requires veggies, which must not be eaten. I am increasing the odds of cake. May 19 04:38:26 pudding, however, requires meat. May 19 04:42:51 groxx, i think only romainguy knows how to fix this May 19 04:42:58 Veiled The Wall references on the channel now... May 19 04:43:04 it took me entire day, and i cant get anything done May 19 04:43:21 CedricBeust: ikr? what have we become D: May 19 04:43:53 I'm not even much of a Pink Floyd May 19 04:43:55 fan May 19 04:44:59 at least I managed to hijack it with Portal May 19 04:45:38 or maybe u can blame g00s for setting that one up May 19 04:45:50 holy cow, i found his code May 19 04:45:52 ;) May 19 04:46:19 s/u/i/ and I think that might be the smallest regex I've ever written in this channel May 19 04:46:47 meetoman: the RG has a method to do this? May 19 04:48:31 no, but i found his code to overwrite the draw May 19 04:48:33 http://pastebin.com/J4uDgrZ8 May 19 04:49:45 ah. let me know if that works, that looks like normal texture view drawing to me (camera preview isn't normal) May 19 04:50:16 I've got to handle gingerbread, so I haven't tried with texture view. possibly there are more options. May 19 04:51:58 in happier, entirely unrelated news: http://www.rockpapershotgun.com/2015/05/17/minecraft-most-watched-game-on-youtube May 19 04:53:09 sometimes the world gives me hope, though I know it's misguided. I'd rather have something about creating things being the most popular than something about destroying/killing. May 19 04:58:10 groxx, that doesn't work since the codec does not allow you to lockcanvas() May 19 04:58:20 decoder can not init May 19 04:59:42 camera might be blocking lockCanvas, but it's a problem either way, yeah May 19 05:08:45 Sorry was AFK but thanks groxx and g00s_ for the info May 19 05:10:49 groxx, no matter what I do, lockCanvas is always empty May 19 05:10:54 always null, i mean May 19 05:15:46 very stupid question I have a SamSung galazy 3. model SCHi535 android version installed on phone is 4.3 . I am trying to run an example program from android studio with min SDK of 19. Its not working... I am trying to figure out NFC... but no joy so far.... Should I be getting a newer samsung gal phone for devel? May 19 05:16:24 <_rm> api level 19 == 4.4, right? May 19 05:16:34 <_rm> so i don't think that's gonna work on your phone May 19 05:16:40 <_rm> unless you update its os May 19 05:17:19 yea... I believe you are correct... not able to update for some reason... May 19 05:17:29 thus my quesiton. but I am novice May 19 05:18:35 I get "Software updates temporarily unavailable May 19 05:18:44 frm about phone section... May 19 05:18:54 is there another way to update the phone? May 19 05:19:23 I am so stuck :( May 19 05:19:32 <_rm> maybe, if you find a firmware update somewhere May 19 05:26:13 g00s: about nrf ble module, do you know the time interval for data transferring to server? May 19 05:27:17 bhans the connection interval ? May 19 05:28:08 I mean, like when I get the data from the peripheral to my phone May 19 05:28:17 do you have any idea how much time do it need? May 19 05:29:00 g00s, are you good with textureview? May 19 05:29:11 it depends on the connection interval. on 5.0 you have some control over that, but below 5.0 its up to the peripheral May 19 05:29:20 meetoman no May 19 05:29:27 I see.. May 19 05:29:31 Thanks g00s_ May 19 05:29:35 np May 19 05:35:34 I think other than romain guy, nobody else can get a round corner on a textureview May 19 05:35:55 i went through source code a couple of times, and there is no way I can get anywhere near Canvas to do some modifications with codec still running :| May 19 05:38:21 well, It appears that my samsung s3 gal has the latest firmware... May 19 05:39:26 so I am guessing that I am stuck with SDK 18... May 19 05:39:41 thus, is it time to get a newer phone for development...? May 19 05:39:49 I am trying to do NFC stuff... May 19 05:39:53 new to android May 19 05:40:02 and which devel phone shold I get? May 19 05:41:48 it's not necessarily a good idea to have a new device for dev... most of your users probably don't have a new device May 19 05:42:02 that said, an S3 is quite an old device :) May 19 05:43:19 <_rm> i usually test with a crappy old samsung tablet running 4.4 and an intel asus tablet running 4.2 May 19 05:43:37 <_rm> if something works well on the samsung, it probably works well on other, better devices too :) May 19 05:44:10 i hope this pans out http://www.washingtonpost.com/world/national-security/tech-giants-urge-obama-to-resist-backdoors-into-encrypted-communications/2015/05/18/11781b4a-fd69-11e4-833c-a2de05b6b2a4_story.html May 19 05:46:57 s4 seems like a failrly cheap phone on ebay... May 19 05:47:02 S5 is not to bad either May 19 05:47:10 <_rm> there's a bunch of cheap, new phones too May 19 05:49:07 _rm: sugestions? I want to buy one on line May 19 05:49:21 <_rm> you could check out the oneplus one May 19 05:49:39 meetoman: if you control the drawing, you can set it as not-opaque and just not draw to done pixels, and voila. arbitrary transparency. that's not hard to do. with camera output...... May 19 05:50:15 IrishGringo what is cheap ? moto G has good reviews May 19 05:50:56 IrishGringo http://www.theverge.com/2015/5/14/8601993/best-cheap-smartphone-2015-android-motorola-samsung-htc May 19 05:50:57 G is quite decent. or E if small is not a bad thing. May 19 05:52:48 Moto G is an ATT phone.... I need a samsung device May 19 05:52:58 huh ? May 19 05:53:01 argh May 19 05:53:28 well.. I mean gsm... I do not see a CDMA phone for sale. May 19 05:53:32 but still looking May 19 05:53:54 double-argh May 19 05:56:16 did you notice that the OnePlus One has a 4K video camera? May 19 05:56:42 meh May 19 05:57:45 <_rm> wait, did they raise its price May 19 06:03:11 has anyone done NFC stuff with android here? May 19 06:04:16 only as a user May 19 06:06:34 It's on my next project I believe May 19 06:07:28 NFC is meh May 19 06:07:30 I know that doesn't help you now, but I don't know. May 19 06:08:41 This GS3 has NFC... I have read NFC tags with it.... May 19 06:08:58 but I cant seem to find example code todo NFC May 19 06:09:06 IrishGringo: simple file transfer, that's it. May 19 06:09:37 I'm actually an iPHONE developer... I do not do much ANDROID.. learning May 19 06:11:03 OK May 19 06:11:23 IrishGringo... May 19 06:11:25 I do May 19 06:11:51 Tricknology: you have done NFC stuff? May 19 06:11:54 only real NFC code I know of is http://codebutler.github.io/farebot/ May 19 06:11:54 NFCAdapter is pretty simple. Just set uri's and invoke a beam http://developer.android.com/reference/android/nfc/NfcAdapter.html May 19 06:12:08 The question is... do you accept Android as your overlord as iOS has failed in providing you the API to do NFC stuff? May 19 06:12:14 jk yeah May 19 06:12:19 I fawks wit it May 19 06:12:37 Tricknology: I've already made the requisite sacrifices, I might as well go all the way May 19 06:12:56 I've implemented some NFC communication, was fairly trivial although the decoding the payload required some trial/error May 19 06:13:00 I am trying to read miFare tags... May 19 06:13:09 heh ok May 19 06:13:17 I assume that is an NFC trick... they are ISO 14443a May 19 06:13:17 also took me a while to realize the phones must be put back to back to initiate anything May 19 06:13:17 dot dot dot May 19 06:13:19 got docs? May 19 06:13:20 as in... very close May 19 06:13:47 intimate May 19 06:13:53 NFCA May 19 06:13:54 https://github.com/ikarus23/MifareClassicTool ? May 19 06:14:07 damn teh google is strong May 19 06:14:14 there are a handful of mifare NFC readers out there, iirc May 19 06:14:27 what do you want to do? probably a better q May 19 06:15:31 I want to read mifare block 0 record it... May 19 06:15:39 simple as that for right now... May 19 06:15:55 IrishGringo, you are about to exhaust your quota of dots per channel May 19 06:16:00 follow the android guides for listening to mifare tags May 19 06:16:17 have you gotten that far? May 19 06:16:42 I just started today May 19 06:16:56 ok welley well May 19 06:16:56 and its already after 2 am... May 19 06:17:05 i dont have code just laying around May 19 06:17:09 ok no more dots May 19 06:17:16 so you;re going to have to get some sleep and try again maybe tomorrow May 19 06:17:22 buuut May 19 06:17:41 the jyst if it is.. register an intent with a list of trusted tech, NFCA being one of them May 19 06:17:45 listen to the tags May 19 06:17:48 ??? May 19 06:17:49 profit May 19 06:18:09 transcieve(bytes[]) May 19 06:18:14 would help if you have docs May 19 06:18:18 for mifare May 19 06:18:28 meh, just use the accelerometer to detect a "knock" against another device, and then display random data as "received" May 19 06:18:42 other techs have more stringent guidelines that make it easier to work your way around May 19 06:18:54 gl, hf. goodnight May 19 06:19:40 i did spend a couple hours last week trying out the nxp mifareLite SDK. The light version is free, but the normal version is paid. I think that I should learn the normal way first. May 19 06:27:53 I refuse to believe NFC is something that requires using any external libs May 19 06:30:13 wakelock: I agree except for a couple of issues. to change Block 0 on chinese Magic cards requires a patched libnfc-nxp May 19 06:44:34 I feel tempted to answer that animation issue from yesterday May 19 06:44:42 but the answer's out there May 19 06:45:45 Is there any free way of getting the outdoor temperature in app? May 19 06:46:21 well any weather app does that May 19 06:48:07 jutsi here is one api https://github.com/survivingwithandroid/WeatherLib May 19 06:52:26 morning boys, anyone aware of a Android Studio color blind scheme? I've been Googling a lot but haven't come out with a nice one yet. I've also tried to create one my self, it was a disaster May 19 06:53:20 just go black on white? May 19 06:53:37 oh, nvm May 19 06:54:27 Odaym: When you developed for BLE connectivity, what was your peripheral device? May 19 06:54:45 should work, but is there no website i can just send a call to and get weather data in return? May 19 06:55:06 this one bhans http://roadietuner.com/ May 19 06:56:38 Odaym: excellent May 19 06:56:57 excrement May 19 06:57:00 lol May 19 06:57:04 lol May 19 06:57:06 they sound so similar May 19 06:58:08 Odaym: Once paired, no need to pair again? May 19 06:58:18 well they don't pair they connect May 19 06:58:21 you connect every time May 19 06:59:02 Odaym: I see.. by it's UUID eh? May 19 06:59:09 its* May 19 06:59:18 yea May 19 07:00:17 Odaym: for example, I have 3 peripherals, once I fire up my app, it can automatically connect? May 19 07:00:34 to whoever gets the chance first, yea May 19 07:00:43 I have never dealt with more than one device at a time though May 19 07:01:03 Ok, cool.. thanks a lot! ^_^ May 19 07:01:33 I wouldn't thank just yet May 19 07:01:50 ok, thanks a lot May 19 07:01:52 lol May 19 07:02:10 still in theory stage? :P May 19 07:02:46 peripherals are not yet here.. can't do anything yet :-/ May 19 07:03:18 Odaym lol, back in '97 i asked my dept head at uni if I could do that for senior design project. he didn't recommend it :D May 19 07:03:55 so i went the boring route of neuro-fuzzy realtime ball balancing thing :( May 19 07:04:15 it wasn't always like that, it started off as box almost 5 times larger than that thing May 19 07:04:55 hard work to make it, you have to know a lot of....things... May 19 07:04:57 lol May 19 07:05:14 well we are not electrical engineering anyway May 19 07:05:47 i was CE so i had enough electrical / dsp background at the time May 19 07:05:58 but yeah, i forgot all the dsp stuff :( May 19 07:06:10 dsp was needed in the app part May 19 07:06:12 which is, far mor einteresting than android ... i should get back into it May 19 07:06:25 I still have the code for it ;D May 19 07:06:54 anyhow i don't play guitar any more May 19 07:07:10 Hello. I just tried to run a new project (xabber-android: a xmpp chat app) but I am getting this error when I try to run it from android studio: https://gist.github.com/vedant1811/e7ad6304132694587165 May 19 07:12:45 vedu are you sure your /usr/lib/jvm/java-8-oracle/bin/java is ok ? May 19 07:41:47 Hello! I want to get framework.jar from android 5.1 but it looks like file /system/framework/framework.jar is empty (doesn't contain classes.dex). Where i can find framework.jar on android 5.1 rom? May 19 08:07:53 can you use layout-land / layout-port with for example layout-sw600dp? May 19 08:07:59 also how will it work? May 19 08:09:11 i need quick java help for android May 19 08:09:27 I might be a little sleep deprived, but what do you mean jutsi ? May 19 08:10:27 well you can define your own layout for landscape mode, i.e remove a picture thats too big, but you can also define a custom layout for wider devices. How do these two layout configs fit with each other? May 19 08:11:18 like will the layout-land and layout-port also apply for devices that use the layout-sw600dp? May 19 08:15:37 jutsi, if they fit the layout constraint that is layout-sw600dp May 19 08:16:15 huh? May 19 08:16:16 I would assume so yes, I'm not entirely sure about what would overwrite what though. However I haven't tested it specifically May 19 08:16:22 ah May 19 08:16:33 i guess i better dig up a big device then :) May 19 08:16:51 I mean a device can be both landscape and 600p May 19 08:16:53 sw * May 19 08:21:33 hi May 19 08:23:21 I'm extremely new to any android kernel modifications and I wanted to enable zram. On stock kernel swap works fine but there is no zram. After my modifications swap and zram cause the device to reboot, any ideas? May 19 08:24:42 hey, retrofit guy is here? May 19 08:24:48 is it JakeWharton May 19 08:32:25 that one is just a mockup of him May 19 08:32:34 the actual person doesn't come here May 19 08:40:19 can you do like sw600dp-port? May 19 08:40:25 and sw600dp-land? May 19 08:45:10 I have set `sourceCompatibility JavaVersion.VERSION_1_7` in build.gradle but still android studio compiles with java 8 and fails to run May 19 08:47:28 Why do my buttons get centered when the viewport is too big to be scrollable? If its scrollable they snap to top (as they should) but when it becomes too big they go dead center of the screen May 19 08:53:16 Does Retrofit handles JSONArray correctly? I receive a different data in the server. JSONArray becomes a JSONObject with "values" JSONArray inside it. http://pastebin.com/Wyn7pvHp May 19 08:54:19 {keywords=["repair","mobile"] changes to {"keywords":{"values":["repair","mobile"]} May 19 08:55:50 {keywords=["repair","mobile"] is not a valid json. May 19 08:56:28 this is a part of it that changes.. May 19 08:56:47 This contains the full stuff http://pastebin.com/Wyn7pvHp May 19 08:56:51 danijoo i solved my overriding of default behaviour regarding the backstack of the fragments :D May 19 08:57:29 turns out i was using getActivity( ).getContext() when i should've just made a reference to the rootView and gotten the context from it May 19 08:57:29 whats the full input json May 19 08:57:50 jutsi, :) May 19 08:57:56 {keywords=["repair","mobile"], latitude=12.99, longitude=76.99, time=null, notes=null, checklist=null, completed=false, userId=103783828853414130934_300} May 19 08:58:06 WantToCode, your input is not a valid json May 19 08:58:38 im still getting some strange behaviour though.. if i press the back button on the device, it will remember my last position, however if i press the back button on the actionbar it will go back to fragment 1 May 19 08:58:38 This is the string representation of the model that I am posting May 19 08:58:48 you cant expect retrofit to give a valid output if your input is bad May 19 08:59:03 make it a valid json before posting May 19 08:59:24 I am posting a model directly, doesnt it use GSON to convert it to json? May 19 08:59:39 I dont know May 19 08:59:42 void submitTask(@Path("user_id") String userId, @Body TaskItem taskItem, Callback cb); May 19 09:00:24 valid json has the key words in paranthesis and uses : instead of = May 19 09:01:19 The data I have pasted is not a json, it is a string representation of the object May 19 09:01:56 retrofit cant convert a string representation of random format into json May 19 09:04:55 Hi, i am trying to make a partition back-up app. But the problem i am faceing is that phones use diff partitions for data/system/etc. How do i find the get the app to find the data partition ? May 19 09:05:27 WantToCode: Is that the only JSON you are parsing? I would just use org.json instead of adding a dependency. May 19 09:06:31 gson is added automatically by retrofit afaik May 19 09:07:04 Nightwalkerkg, #android-root might know more about that May 19 09:07:12 we usually dont deal with things like partitions in here May 19 09:07:31 What I am doing is just creating a TaskItem model object in which "keywords" is a JSONArray datatype, and posting it using @Body TaskItem taskItem. I am not converting anything. May 19 09:07:52 WantToCode, can you show the code of TaskItem? May 19 09:08:00 Hello! I want to get framework.jar from android 5.1 but it looks like file /system/framework/framework.jar is empty (doesn't contain classes.dex). Where i can find framework.jar? May 19 09:08:44 WantToCode, and the part where you set the deserializer for TaskItem May 19 09:09:00 WantToCode: you can configure the mapper that retrofit uses May 19 09:09:19 I guess thats the part he's missing May 19 09:10:52 where is a good tutorial how to use httpurlconnection? May 19 09:11:05 wi2th best practices for json May 19 09:12:04 Nick-S, best practive for json is to not use httpurlconnection May 19 09:12:23 use a library May 19 09:15:06 danijoo, vedu, surf2b1, This is the way I am posting. http://pastebin.com/1C8RHtgn May 19 09:17:15 TaskItem is this - http://pastebin.com/v04Uc9rN May 19 09:17:52 write a custom deserializer May 19 09:18:02 and add it to retrofit May 19 09:18:39 Hi, I have a LinearLayout in which I am dynamically adding around 10 - 12 fragments. The activity take few seconds to load and choreographer logs a message saying skipped frames. I tried loading few fragments via Runnable which makes activity load fast enough but then the UI freezes for a while. I am pretty new to android, what is the correct approach to handle this performance issue? May 19 09:19:46 WantToCode: please use gist, or pastie. you will have show more code, and your exact error May 19 09:20:36 advy, 1) you cant use tasks if your stuff is gui related. May 19 09:20:53 can you please post the part of code where you add the fragments? May 19 09:22:12 danijoo, vedu, I used gson to convert the object to json before posting, and it messed up the conversion. So i would need to write a custom deserializer. Thanks May 19 09:24:18 danijoo: you dont need to but since you refuse to paste code its better you do that May 19 09:24:39 vedu, huh? May 19 09:24:47 wrong name? ^^ May 19 09:24:51 sorry . yeah :) May 19 09:25:07 WantToCode: you dont need to but since you refuse to paste code its better you do that May 19 09:25:53 why would you need to write a custom desirasdasdiaisdjua May 19 09:26:29 I am lazy to paste code :P Have to delete lot of lines while doing it... Let me try with custom desirasdasdiaisdjua, and if that doesnt work ill come back to eat your head May 19 09:26:31 just parse the object correctly and if you want to send it over elsewhere, use Parceler library to send it as a parcelable, easy wrap() unwrap() May 19 09:27:05 good morning Odaym May 19 09:27:08 cause no such thing as "messed up the conversion", you know how the object being received will look like, parse it accordingly May 19 09:27:11 hi dan May 19 09:27:49 he want to http post it, not parcel/send between activities May 19 09:28:00 ahh it is good night here -_- May 19 09:28:05 Im doing things like that since yesterday May 19 09:28:14 so easy with okhttp May 19 09:28:17 I did it before it was cool! May 19 09:28:47 I haven't slept more than 6 hours in the past 3 days May 19 09:28:50 wew May 19 09:29:35 :/ May 19 09:29:39 AS used to create a folder bases on project name. Not it doesn't do that. Anyone noticed that May 19 09:29:44 yea it feels strange May 19 09:29:56 danijoo: http://pastie.org/private/tkn4yt5gbmpfixzwbmeog I have divided entire page into multiple folds and I have a separate transaction for each fold. May 19 09:29:58 Creating backend for the first time here. When a design guy goes to backend, apocalypse is bound to happen :P May 19 09:30:18 does anyone know what this means? May 19 09:30:22 it still does donniezazen, you just have to select Project from the dropdown at the top of the menu where the project is sitting May 19 09:30:24 /tmp/ccIrvAdb.s:196: Warning: swp{b} use is deprecated for ARMv6 and ARMv7 May 19 09:30:40 I need an opinion, what do you think about the fact that inside drawable folder you can't create sub-folders to organize your files? May 19 09:30:43 you have Project - Packages - Scratches - Android - Project Files etc... May 19 09:30:43 I'm trying to build in zram and swap on a android kernel May 19 09:31:03 advy, if you have multiple fragment transaction, you should put them all in the sam transaction and only commit once May 19 09:31:10 that will speed the things up May 19 09:31:34 danijoo: tried that as well. Same issue May 19 09:31:35 icemanbp, it sucks, but its not a major drawback May 19 09:31:35 Odaym: I am creating a new project. May 19 09:31:55 then how you know it didn't create a folder based on project name? May 19 09:31:58 like you asked above May 19 09:32:09 if you are still in the process of creating it May 19 09:35:22 Odaym: lol because i am created several projects to make sure i am not making mistake May 19 09:35:38 then how is what I said not wrong May 19 09:35:55 try it on one of the previously created projects May 19 09:36:03 advy, why are u putting two fragments in the same container? May 19 09:36:03 what is the problem? May 19 09:36:16 Odaym: I have come to conclusion that if you change location then it won't change the folder name. May 19 09:36:20 advy, i.e line 11 and 14 both use R.id.company_information_container May 19 09:36:37 come to conclusion? there are things that you can look at to know what is happening when you create the project :P May 19 09:36:39 its not analysis May 19 09:37:32 danijoo: Is there a better way to handle this? May 19 09:37:55 advy, it makes no sense to put 2 fragments in the same container. one will overlay the other and you will only see one. May 19 09:38:19 or what are you trying to do with that? May 19 09:39:02 danijoo: I was just trying things, so I made the container as linearlayout with vertical orientation so everthing gets stacked below each other May 19 09:39:47 advy, oh... thats not how fragments work May 19 09:39:56 Otherwise I will have to make different frameLayouts for each and every fragments May 19 09:40:02 Odaym: I want all new projects to be in a folder but if default location is not that folder and you change that then it the project name won't affect folder name. May 19 09:40:04 if you add a fragment to a container, it will fill the whole container May 19 09:40:17 they wont stack. it ignores what container it is and just use it completly May 19 09:40:39 you NEED those framelayouts for each and every fragment May 19 09:42:51 I wish AS had a play store integration. would be so nice to be able to publish from within AS or see clickable stacktraces from crashes May 19 09:43:30 danijoo: Strangely it seems to be working with linear layout. Anyways I will move to separate FrameLayouts for every fragments. But is this approach of adding so many fragments to an activity correct. Is there any better way to achieve this May 19 09:43:33 oh yea that would be nice May 19 09:44:22 advy, hard to tell. I dont know what you layout looks like, but usually you dont use more than a handful of fragments in a single activity May 19 09:44:28 most often its only 1 or 2 May 19 09:46:44 if you show a sketch of what layout you are trying to archive, we might can give you some tips :) May 19 09:47:43 danijoo: All the fragments look completely different from each other, So I cannot make it into a listView/RecyclerView. Couldn’t think of anyother approach to go about this issue which made me add so many fragments into one activity. May 19 09:48:18 advy, a list can still hold unique views May 19 09:48:22 Hello. I just tried to run a new project (xabber-android: a xmpp chat app) but I am getting this error when I try to run it from android studio: https://gist.github.com/vedant1811/e7ad6304132694587165 May 19 09:48:26 for recyclerview this is pretty common May 19 09:49:00 or to make it really simple. use a scrollview and use views instead of fragments May 19 09:49:11 custom compound views May 19 09:49:54 you can publish updates to amazon via sftp lol May 19 09:51:34 danijoo: Do you mean implementing getItemViewType() and defining all fragments as different views ? May 19 09:51:43 advy, yup May 19 09:52:16 if you have unique views just let getItemViewType return the position and it will not recycle anything May 19 09:52:29 on httpurlconnection, when can i start writing to output stream? May 19 09:54:01 vedu: I don't know for sure, but when I got that error message in Eclipse years ago it was because I surpassed the dex method limit of 65k. "finished with non-zero exit value 1". This looks similar: http://stackoverflow.com/questions/29045129 May 19 09:54:51 the dex limit error message looks different May 19 09:55:14 isnt there some stacktrace ? maybe a few lines above that? May 19 09:55:56 danijoo: probably now. I think it did that before. Maybe I'm wrong and I'm just over tired. 3 AM here May 19 09:56:12 yeah it might have changed May 19 10:00:13 danijoo: That will require a bit of refactor. I will try this approach as well. Thanks May 19 10:00:22 good luck :) May 19 10:25:58 guys, after android 21, what can I use instead of FragmentBreadCrumbs May 19 10:30:00 did they deprecate breadcrumbs? May 19 10:30:27 they did :o May 19 10:33:03 this can't be real man, I want to start a new project and I need a bazillion things just as foundation May 19 10:33:12 what are executors and what is handler in android anyway May 19 10:33:24 why is better/different than async task for network acrtivities? May 19 10:33:28 icemanbp, I guess they want you to stick with the material design patterns May 19 10:33:37 or implement your own (like they also deprecated tabs) May 19 10:34:01 Nick-S, different is an IntentService May 19 10:34:14 A pizza is different too May 19 10:34:21 ?! May 19 10:34:35 google them May 19 10:34:39 i mean if i do network activity on asynctask and its fine why does okhttp for example uses executors? May 19 10:34:41 24 years software engineer May 19 10:34:41 only thing I've used breadcrumbs for is my filebrowser... but there it's actually useful too :p May 19 10:34:42 i did May 19 10:34:54 Odaym?! May 19 10:34:58 Nick-S, okhttp also run in a seperate task May 19 10:35:01 on the other hand you can still use it, or if you're concerned just copy the source from android May 19 10:35:37 just a random fact about myself Nick-S May 19 10:35:52 Odaym: hmm May 19 10:35:56 okhttp isn't android specific May 19 10:36:07 asynctask and handlers are May 19 10:36:09 i thought you are mocking me for having 24 years of expirience and not googling instead of asking May 19 10:36:19 Nick-S, dont be lazy. Nobody here will explain you what a class is if you dont want to read the docs May 19 10:36:20 nah May 19 10:36:26 I respect others May 19 10:36:27 ya thats true actually i was thinking retrofit executors May 19 10:36:27 (and yes, im mocking you for not googling) May 19 10:36:48 danijoo: i read the sources not the docs :) i know these libraries quite will May 19 10:36:49 well May 19 10:37:02 Nick-S AsyncTask dead with the activity that called them May 19 10:37:23 icemanbp: its ok my context is a service May 19 10:37:24 icemanbp, not true :o May 19 10:37:34 icemanbp: thats actually true, its not true May 19 10:37:42 its not not true May 19 10:37:51 the fact that it's true is untrue May 19 10:37:55 it depends on how you implement them May 19 10:39:36 ok, http://stackoverflow.com/questions/5226080/if-an-activity-is-killed-does-the-asynctask-live-on May 19 10:39:49 danijoo it's right May 19 10:39:54 Nick-S, Executor is just some class that executes tasks and a handler is kinda like a queue for runnables for a specific thread May 19 10:40:13 but I rembember that difference between asynctask and intentservice is this... May 19 10:40:13 icemanbp, thats not true. seriously May 19 10:40:20 danijoo: whew! thats the spirit! May 19 10:40:20 dude that isn't true May 19 10:40:28 that's the whole point of asynctask's dangers May 19 10:40:34 is that it lives on, Im pretty sure May 19 10:40:37 you can implement an asynctask to be tied to activity, but you can also implement it correctly May 19 10:40:41 i am looking at the implementation of asynctask https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/AsyncTask.java May 19 10:41:04 you can leak stuff with "rogue" asynctasks May 19 10:41:13 http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ May 19 10:41:14 I want to disable (grey out) a button until a condition is met and then enable it. Have tried with both setEnabled() and setClicked() but it does not work. setClicked() make the button unclickable which is good, but not greyed out. May 19 10:41:15 see that May 19 10:41:26 if something not dies with its activity, its not neccassary a leak May 19 10:41:30 * Zharf hardly ever uses asynctask... May 19 10:41:35 it could be though ;) May 19 10:42:03 Odaym, thanks Odaym. i was just looking for that, too :) May 19 10:42:04 it uses FutureTask May 19 10:43:01 it uses Thread May 19 10:43:28 theres no hidden magic in that :) May 19 10:45:48 it just encapsulates the practice of calling the thread and handling the response back in the calling threaed May 19 10:45:56 yep May 19 10:47:10 i am writing an sdk and i prefer not to use any external libs, how should i implement asynchronous network requests? May 19 10:47:50 <_rm> our solution was to write our own wrapper download queue+wrapper for HttpURLConnection May 19 10:48:09 <_rm> which may have been slightly overkill but oh well May 19 10:48:23 Nick-S, NIH-syndrome? May 19 10:48:40 !? May 19 10:48:54 you are writing an SDK? May 19 10:48:59 ya May 19 10:49:05 for whom? May 19 10:49:08 <_rm> call me crazy but when integrating a library, i prefer one that doesn't have a dozen dependencies May 19 10:49:43 for clients May 19 10:49:48 call me crazy but when I integrate a library i want it to work :p May 19 10:49:54 nice May 19 10:50:10 what language they gonna be in? May 19 10:50:15 the ..things in the SDK May 19 10:50:18 <_rm> sure, and it's not like there's a guarantee of that with other libraries as well :) May 19 10:50:19 my client claims that his volley calls are clashing with my retrofit calls May 19 10:50:26 Odaym: java? android? May 19 10:50:34 you gonna write them again?? May 19 10:50:39 but they might be well tested at time May 19 10:50:42 Odaym: i already did May 19 10:51:05 thats why i just wrapped my httpurlconnection calls in AsyncTask May 19 10:51:17 but i would prefer to have event bus but thats another dependency May 19 10:51:40 call it Mandroid May 19 10:51:46 cause you are a man and you don't rely on others May 19 10:52:02 the description would be "Android, again." May 19 10:54:10 i wanna rely on others May 19 10:54:14 NO! May 19 10:54:20 I mean yea sure you can May 19 10:54:35 i wanna have it working May 19 10:54:37 Guys if I set getCount in a baseadapter to return 2 May 19 10:54:39 dont use httpurlconnection. write your own implementation May 19 10:54:43 Would that cause getView() to be called 3 times? May 19 10:54:44 with sockets! May 19 10:54:45 Or 2 times? May 19 10:54:51 2 times drose379 May 19 10:54:53 Cause 0->1->2 May 19 10:54:53 are you guys being funny ? May 19 10:54:55 Ok, cool May 19 10:55:03 its not funny, i am serious here May 19 10:55:03 drose379, you cant know May 19 10:55:08 I cant know? May 19 10:55:11 oh no no you can't know of course May 19 10:55:12 could be called 7 times May 19 10:55:15 but I mean how many items you will see is 2 May 19 10:55:20 yes May 19 10:55:21 Well yeah I know that May 19 10:55:30 It gets called a lot for other reason, right? May 19 10:55:33 yea May 19 10:55:34 recycling May 19 10:55:39 <_rm> Nick-S: we use httpurlconnection, running on a background thread May 19 10:55:42 yeah. like recycling, measuring, redrawing May 19 10:55:48 Right, but it will get called twicxe to pull from my List<> May 19 10:55:58 and thats what I need to worry about May 19 10:55:58 _rm : just a nifty simple new Thread().run? May 19 10:56:10 .start you mean? May 19 10:56:12 getCount() = 2 means, you will later see 2 items if thats what you want to know May 19 10:56:21 <_rm> Nick-S: basically. this uses executors May 19 10:56:23 not more and not less May 19 10:56:30 Perfect,thanks May 19 10:56:38 Odaym : 10x 24 years expirience :) my mind is toasted after 27 May 19 10:56:45 and that getView will be called with either 0 or 1 as position param May 19 10:56:47 but who counts May 19 10:57:04 you really been programming for 24 years? May 19 10:57:10 _rm: how do you use the executors? May 19 10:57:17 Hi, I have a weird problem I can't figure out. My Fragment implements a Custom Listener to listen to changes in the Database. I am assigning the Fragment as teh Listener in the Datasource but hte moment I have changes in the DB I get a nullpointerex. cause the Listenre doesnt exists Oo May 19 10:57:25 you are not 10x May 19 10:57:26 please May 19 10:57:35 who me? May 19 10:57:41 hi agin May 19 10:57:43 *again May 19 10:57:46 yea May 19 10:57:51 byt89, do you know what a cursor is? :) May 19 10:58:05 How do I get the android kernel build to put all kernel modules in one location? May 19 10:58:06 yup, actually more... May 19 10:58:29 Odaym: what makes you think not? May 19 10:58:32 danijoo: Using a cursor looked like to much, as I am just interested in the change of one value. But yeah... probably the better solutin May 19 10:58:36 because I don't believe in the concept May 19 10:58:43 byt89, http://imgur.com/jacoj May 19 10:58:46 i've been on irc since 1996 May 19 10:58:58 how good you are is purely a matter of effort, so this genius programmer, 10x programmer, I don't believe in them May 19 10:59:01 we cant help without code + stacks May 19 11:02:02 <_rm> Nick-S: we create single thread executors, and then execute runnables on them :) May 19 11:02:30 10x programmers? May 19 11:18:20 Nick-S: a valley myth May 19 11:24:36 !? May 19 11:34:46 true, p_l May 19 11:34:49 bullshit theory May 19 11:40:52 What do you think is the value of experience then, Odaym? May 19 11:41:31 Or what factor do you think there is between novice and expert if this value is not 10x? May 19 11:41:47 let's just stop saying 10x May 19 11:41:53 there is only experienced and not experienced May 19 11:42:25 theres also over 9000 May 19 11:44:09 what does 10x mean? May 19 11:47:16 meaning 10 * ( your skill ) May 19 11:47:19 he is 10 times better than you are May 19 11:48:32 there are people 100 times better than I am but it doesn't mean that they haven't been doing it for a proportionately longer time than I have May 19 11:48:56 barq: the 10x wasn't applied to experience, though May 19 11:49:02 hey guys, anyone around with much experience with Google Plus login and the joys of getting access tokens thereafter? May 19 11:49:39 on our game, we need an access token from a ‘service’ for Amazon Cognito authentication, and ‘web’ for GameSparks authentication May 19 11:49:41 no one ever said that the 10x is just there as a property of the person :P May 19 11:49:55 so maybe they don't mean it, but people surely understand it that way and like to think it May 19 11:49:59 and I’m currently hitting an issue with “NEED_PERMISSION” when asking for the web access token May 19 11:50:03 that this person is just better, he was just born better May 19 11:51:19 seaders, you might need one with 10x experience for that :/ May 19 11:51:25 not sure if theres one in here May 19 11:51:37 I’ll settle for a 7.5er May 19 11:51:42 ha May 19 11:51:53 man, I get what Google are trying to do with their access token stuffs May 19 11:51:58 im -1 when its about Google plus May 19 11:52:12 but really and truly, we’re allowing logins from Facebook, Twitter, LinkedIn and GameCenter May 19 11:52:28 and without doubt, there’s 10x issues from Google Plus as the rest put together May 19 11:52:42 Really?> May 19 11:52:45 yup May 19 11:52:46 I've found G+ to be the easiest. May 19 11:52:49 is building from an ssd noticeably faster then hdd? May 19 11:52:52 yea i have it here implemented May 19 11:52:54 it was easy May 19 11:53:15 it’s the key issues, and the linkage of services in the dev console May 19 11:53:18 The stupidest thing about authenticating with G+ is trying to use the button they provide haha May 19 11:53:23 YES May 19 11:53:28 that's the most stupid task about it May 19 11:53:31 for when *all* you want is a simple access token May 19 11:53:39 I get if you’re doing something more complicated May 19 11:53:46 lol ^^ May 19 11:53:54 so the 10x is a case by case standard then? May 19 11:53:58 Odaym: Have you compared the G+ button with Facebook? The G+ button is actually a view holding a view which has an image which you see. The button is actually bigger than the image haha May 19 11:53:58 that you may want to have fine control over access May 19 11:54:11 Twitter’s answer to the button May 19 11:54:16 was to create one on the fly May 19 11:54:20 attach listeners to it May 19 11:54:24 and simulate a press May 19 11:54:32 jutsi, ofc. being a 10x programmer doesnt mean im a 10x cook! May 19 11:54:33 so… G+ aren’t alone in that crazy ass thinking May 19 11:54:43 I never resorted to their own drawables to make the button May 19 11:54:47 same May 19 11:54:53 you were able to get around it May 19 11:54:59 but via… odd means May 19 11:55:01 ah well May 19 11:55:02 I tried once and abandoned it because of the 9patched drawables being 9patched incorrectly! May 19 11:55:09 haha May 19 11:55:11 danijoo no like, you can be 10x me, but Odaym might be 10x you, hence 100x me May 19 11:55:15 TWWWWWWitter May 19 11:55:19 you just plug it in AS, refuses it because of missing margins May 19 11:55:31 jutsi, maybe its a logarithmic scale though! May 19 11:55:37 Odaym: Oh of course, but once I saw it was there and got so infuriated at the stupidity of it I made it my mission to use the bloody thing and make it look just as Facebook's button! May 19 11:55:40 I ended up just using padding hahhaa May 19 11:55:49 yea jutsi but some people make it seem like it's just the nature of some programmer to be better May 19 11:55:50 YES! May 19 11:56:00 as if they just are better at programming, or born to code May 19 11:56:02 or shit like that May 19 11:56:10 How the f*** can Google provide a Button that their own IDE doesn't bloody recognise?! May 19 11:56:12 meh.. a programmer is only as good as the project :) May 19 11:56:14 I urinate on such theories May 19 11:56:21 <_rm> have any of you had any weird scaling issues with WebView on api level 21+? May 19 11:56:37 well darn, compiled the kernel with seemingly no errors but somehow I killed touch support May 19 11:56:42 _rm scaling? May 19 11:56:48 nothing responds May 19 11:57:02 <_rm> jutsi: yeah. sometimes pages render tiny content, sometimes the size that i expect May 19 11:57:05 anywho, for these access tokens, I need to get one from “"oauth2:server:client_id:" + sWebId + ":api_scope:" + Plus.SCOPE_PLUS_LOGIN” May 19 11:57:10 <_rm> but only on 21+ May 19 11:57:12 and one from "audience:server:client_id:" + sServiceId May 19 11:57:29 the audience one (for Amazon) is fine May 19 11:57:37 I actually judge a lot of technical people on their ability to speak to people who are not as knowledgeable as them, and their ability to make them understand. If they get pissed off and act as if programming is some secret society that only those in the know get into, and get all elitist, then they can go swivel. May 19 11:57:51 the oauth2 one (for GameSparks) throws up a NeedPermission exception May 19 11:58:10 despite me creating the APIClient, and going through the login with May 19 11:58:11 _rm renders them tiny, as in the webview shrinks in size or the webview is "zoomed out"? May 19 11:58:11 new GoogleApiClient.Builder( GetActivity() ) May 19 11:58:13 .addConnectionCallbacks( GetGPLogin() ) May 19 11:58:14 .addOnConnectionFailedListener( GetGPLogin() ) May 19 11:58:14 .addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN) May 19 11:58:23 <_rm> jutsi: zoomed out May 19 11:58:35 I would have thought the Plus.SCOPE_PLUS_LOGIN would have been covered by adding that scope at login May 19 11:58:41 <_rm> jutsi: i seem to be getting onScaleChanged callbacks. 2.0 -> 0.5 May 19 11:58:57 <_rm> wonder what's triggering that May 19 11:59:56 _rm does the content fit the screen or does it zoom way out ? May 19 12:00:22 seaders: I have a working version at home. May 19 12:00:31 seaders: I can help you if you havent got it sorted in a few hours? May 19 12:00:44 I’d never refuse help! May 19 12:01:02 you could try setting inital scale May 19 12:01:05 would love to just overall have a better understanding of what is happening here, and what’s not getting covered by the initial login May 19 12:01:22 might it be down to the “Bundle appActivities" May 19 12:01:24 <_rm> jutsi: it does fit the screen May 19 12:01:32 they’re really not explained at all May 19 12:01:35 <_rm> gotta see if there's a way to tell it to never scale its content May 19 12:01:59 _rm you can set inital scale. That way you'll always have the same scale :) May 19 12:02:11 <_rm> ok, i'll give that a go May 19 12:05:46 <_rm> well, it half-worked :) May 19 12:05:52 hello May 19 12:06:50 i'm in a bit of a hurry here and I really need to generate APK in android studio really quick but it keeps yelling at me to avoid using non default constructors in fragments,, is there a way to ignore this and generate apk without rewriting the code? May 19 12:08:13 quick other question, actually May 19 12:08:21 what’s the best adb logger you guys use? May 19 12:08:46 I still go back to Eclipse’s (while I’m doing the actual work in bloody Android Studio...) May 19 12:15:43 I' May 19 12:18:14 CursorLoader loads a GridView using a CursorAdapter. I've got two layout types, depending on a specific data field (in the cursor). Now, when data (cursor) changes, I've got a ContentObserver to automatically update the UI (i.e., update a TextView). But, if the data field determining the layout type changes, how can I automatically go from layout type 1 to layout type 2 (for that specific data item in the grid)? May 19 12:19:43 I mean, "minor changes" are updated just fine in the UI, such as the contents of TextViews etc. But if I change something such that I should use layout 2 on that cursor position, is it possible for this to happen automatically? May 19 12:21:07 The layout types, for each "row" of data in the cursor, is correctly set during app start. The Grid is filled with layout 1, layout 2 etc. But, this is only updated when I *restart* the app... May 19 12:22:48 is this layout part of the list or just a viewgroup holding textviews etc May 19 12:23:10 danijoo: hi, danijoo :) May 19 12:23:25 moin May 19 12:23:45 sorry, I didn't quite get your question... May 19 12:24:02 let me rephrase? May 19 12:24:26 the layout that should change May 19 12:24:32 is that layout part of a list or a single frame May 19 12:25:25 the layout which should change -- the gridview -- is the sole thing in a fragment's UI May 19 12:25:46 so, I'm populating the GridView with two types of "items"; A.xml and B.xml May 19 12:26:10 a fragment... hm. you can either make the fragment replace itself with anotherfragment that uses B instead of A, or you could change the content view of the current fragment May 19 12:26:43 but, thing is, it's just a single cell of the gridview that I want to update May 19 12:27:07 oh well. May 19 12:27:26 just call notifyDataSetChanged on the gridview and it will redraw all views May 19 12:27:49 you see, I can click on each cell to edit it in a new fragment. If I make a "minor change", I only want to update say a TextView in the cell. That works already :) But, if I make a "major change", I want the cell to switch from A.xml to B.xml May 19 12:27:51 that should redraw the grid with the new data May 19 12:28:01 I do do that May 19 12:28:04 already ;) May 19 12:28:11 and it works? May 19 12:28:16 minor changes => text updates itself May 19 12:28:17 yes May 19 12:28:37 but the style (layout) only goes from A to B if I restart the app May 19 12:29:06 so it seems the CursorLoader/Adapter only associates "view type" (A or B) at init -- in newView() May 19 12:29:11 or something May 19 12:29:37 is newView() called when the TextView etc are updated? What I call "minor changes"? May 19 12:29:44 (sorry for the hopeless terminology) May 19 12:31:45 CursorAdapter.newView() does something like this: int layoutId = (cursor.getString(0).equals("A")) ? R.layout.grid_item_A : R.layout.grid_item_B); View view = LayoutInflater.from(context).inflate(layoutId, parent, false); May 19 12:33:09 so, bindView() sets text in the TextViews etc. That's updated just fine, so I'm assuming bindView() is called on data change. But, I guess this is my question; is newView() called, too? May 19 12:33:31 joakimk_, no May 19 12:33:40 because it's only newView() which determines the correct layout for each cell... May 19 12:33:49 views get recycled everytime and only bindView is called May 19 12:33:50 so that makes sense, then? May 19 12:33:51 hm.. May 19 12:33:58 Is there a way to make a textview Listen to changes in a database? May 19 12:34:07 textual content is updated, but never the layout May 19 12:34:31 (not as a general rule, but in my case this is what's happening) right? May 19 12:34:43 joakimk_, you can try the following: override the method CursorAdapter#getViewTypeCount() May 19 12:34:46 let it return 2 May 19 12:34:57 I'm doing that :) May 19 12:35:00 already May 19 12:35:12 then override getItemViewType(int position). that should return different numbers for different layout May 19 12:35:20 aha May 19 12:35:24 and in newView() inflate the correct layout depending on what that returns May 19 12:35:38 im not sure if this works with cursoradapter though May 19 12:35:43 oh. mh May 19 12:35:45 :/ May 19 12:35:58 I skipped getItemViewType() however! May 19 12:36:07 thats the problem :) May 19 12:36:09 maybe May 19 12:36:10 gotcha! May 19 12:36:17 I'll try that! May 19 12:36:37 getItemViewType is what the adapter calls to determine if layout 1 or 2 should be passed to bindview :) May 19 12:37:08 but... I skipped that, because: May 19 12:37:49 getItemViewType() only takes *position* as parameter, but I need a specific field from the cursor (cursor.getString(i)) to determine A or B May 19 12:38:10 can I implement getItemViewType(int position, string AorB) ? May 19 12:38:17 guess that won't @Override May 19 12:38:41 how can I determine A/B using the position alone? May 19 12:38:59 maybe I should make the cursor a member object? May 19 12:39:17 so getItemViewType(int position) could check mCursor.getString(0) ? May 19 12:39:26 no it must be int position May 19 12:39:36 yeah May 19 12:39:43 but you can get the item from the cursor in that method May 19 12:39:47 and check that May 19 12:40:01 move cursor to correct position and get the string May 19 12:40:19 but (sorry for the silly question) but getItemViewType(int) doesn't "have" the cursor......? May 19 12:40:22 (blush) May 19 12:40:26 member object? May 19 12:40:44 no idea. i never used that approach together with cursoradapter :/ May 19 12:41:13 a bit more hacky approach would be to let the view that newView() returns hold both views May 19 12:41:20 and in bindView you make one of them invisible :p May 19 12:43:31 yeah...! Still... maybe it's really "not possible" to change the layout programmatically like this? May 19 12:44:05 it'd mean to "re-inflate" layout May 19 12:44:11 is that even a thing? May 19 12:44:35 its a bit hard to to this because usually a cursor iterates over items that are the same May 19 12:44:42 and are represented in the same way May 19 12:44:46 yeah, either it's A or B May 19 12:45:04 yeah and usually you have A in a different table then B because they differ May 19 12:45:06 it's odd though, if it's not possible/supported May 19 12:45:11 and therfor different cursors and different lists :) May 19 12:45:23 if you want to work against that, you have to hack it :p May 19 12:45:41 specifically, what I have is two types of grid items. A = image+text, B = image+frame + text May 19 12:45:43 you see? May 19 12:45:53 in both cases, you can "easily" change the text (caption) May 19 12:46:10 joakimk_, i'd just use one layout that contains the frame May 19 12:46:11 but, in some cases, you also set a frame around the image+text May 19 12:46:23 how so? May 19 12:46:31 and call frame.setVisibility(View.GONE) if its A and setVisibility(View.VISIBLE) when its B May 19 12:46:34 in onBindView May 19 12:46:49 i think thats the easiest way May 19 12:46:49 on the frame.... frame itself May 19 12:46:54 in bindView? May 19 12:47:18 yea something like view.findViewById(R.id.id_of_the_frame).setVisibility(....) May 19 12:47:21 in bindView May 19 12:47:38 that way you can change its visiblity depending on if its A or B in bindView May 19 12:47:56 actually, only difference between A and B is android:background on the containing LinearLayout May 19 12:48:03 I'll post A.xml and B.xml May 19 12:48:05 paste May 19 12:49:29 danijoo: please see http://pastebin.com/xLbifHnG May 19 12:49:52 note android:background on LinearLayout -- that's it. B has it; A does *not* have it May 19 12:50:28 so maybe I could just have one layout -- say A, without the background -- and then, in bindView(), just set the background if datafield=="B" May 19 12:50:32 ? May 19 12:50:47 yeah that should work May 19 12:54:11 hello May 19 12:55:49 danijoo: one thing though? In B.xml, I do . How do I set the background programmatically, in bindView()? May 19 12:55:59 I've got a reference to the LinearLayout, like this: May 19 12:56:24 LinearLayout ll = (LinearLayout) view.findViewById(R.id.grid_item); May 19 12:56:49 and I thought I'd do something like this: ll.setBackground(R.drawable.polaroid); May 19 12:56:51 ll.setBackroundDrawable(mContext.getResources.getDrawable(R.drawable.polaroid)) May 19 12:56:59 aha May 19 12:57:01 thanks! May 19 12:57:26 yw :) May 19 13:00:14 is #android-dev the right place to ask questions about android game development or is there another channel for that? May 19 13:00:38 depends on how you dev May 19 13:00:53 care to elaborate? May 19 13:00:57 if you are using unity3d, you might use their channel May 19 13:01:30 libgdx also have their own channel May 19 13:01:42 danijoo: that was awesome advice! Thanks a bunch! I guess having two layouts was the wrong approach for this. Maybe it's *possible* to switch/re-inflate, but your approach is so much easier :D May 19 13:01:46 if its android specific, go ahead and ask :) May 19 13:01:57 joakimk_, you are welcome :) May 19 13:02:19 works like a charm :) May 19 13:02:21 ok, doing research atm, so i guess the most relevant question to ask is do i need to use those external libs for it or can i do it purely through java? May 19 13:03:03 jutsi, you can do it without any external libs, but it will be a lot harder May 19 13:03:23 i suggest you to have a look at libgdx. its also pure java but makes it a lot easier May 19 13:03:23 danijoo are there any advantages to doing it without external libs? May 19 13:04:23 jutsi, you learn alot about android and its cusiosities when doing it without a lib. Not sure if thats an advantage though :D May 19 13:04:37 Looks like getWidth()/getHeight() returns the value in pixels, do I need to convert them to dp by using getDisplayMetrics().density? May 19 13:04:51 shoerain, if you need them in dp, yes May 19 13:05:03 but nearly every java function needs px as params anyways May 19 13:05:40 what about things like unity and gamesalad? May 19 13:06:06 never tried gamesalad but I really enjoyed unity wenn i used it. never released something with it though May 19 13:06:37 the main advantage is that you dont need to know a lot about openGL (you need that if you do it on your own or with libgdx) May 19 13:06:47 and you can quickly get nice results with unity May 19 13:07:09 I'd suggest it if you just have a good game idea and want to release it ASAP May 19 13:07:34 does anyone know what this means while compiling a android kernel? "objcopy: '.ihex': No such file" May 19 13:07:45 is this safe to ignore? May 19 13:07:51 ok. I made some games with java (not android) and even a simple 2d platformer had A LOT of work needing to be done. I'm considering gamesalad as a more "easy" way to make games May 19 13:08:21 though i'll probably end up spending more time learning the damn thing than making games May 19 13:10:04 yeah. thats the thing that unity is great for May 19 13:10:10 it removes all those code May 19 13:10:22 and all you need to do is point and click and a bit of scripting May 19 13:10:33 anyone? May 19 13:10:55 ShapeShifter499, nobody here compiles kernels May 19 13:11:02 thats android application development channel May 19 13:11:09 danijoo: oh May 19 13:11:27 ShapeShifter499, try #android-root May 19 13:11:34 if you have lots of time May 19 13:11:43 they only answer once a day :/ May 19 13:11:43 danijoo: hmm, sorry then May 19 13:12:10 lol -dev sounded like the best place but I guess this is for developing things to run on android huh? May 19 13:12:31 exactly May 19 13:12:40 we write apps in here :) May 19 13:12:48 Hello May 19 13:13:31 danijoo: alrighty :) I'll go hit up #android-root then May 19 13:13:34 SimonVT: when I run my project on travis-ci, it tries to build my release version, and needs the signing configs. However, that isn't included in my source control anywhere. Do you know how I can provide that file or otherwise work around that requirement? May 19 13:14:07 danijoo: atm I have nothing but time :p May 19 13:14:46 What is the recommended way to use custom fonts in Android? I've been using https://github.com/chrisjenx/Calligraphy but it seems it doesn't refit text to the assigned area (View) May 19 13:16:17 shekibobo, what task are you running in genymotion? May 19 13:16:37 shekibobo, here's what I do: https://github.com/SimonVT/cathode/blob/master/cathode/build.gradle#L134 May 19 13:16:47 That method is defined further up May 19 13:17:21 And then https://github.com/SimonVT/cathode/blob/master/.travis.yml#L7 May 19 13:17:28 Can anyone tell me now? May 19 13:18:09 SimonVT, shekibobo mine looks a bit simpler :o https://gist.github.com/danijoo/2f7d50dc3cd394fc9e39 May 19 13:20:32 <_rm> guh this dumb webview scale issue only happens on tablets running 5.1 it seems May 19 13:21:02 _rm they updated the webview for 5.1 May 19 13:21:10 _rm they updated the webview for 5.1 so you should be happy May 19 13:21:19 <_rm> well, i'm not :) May 19 13:21:30 <_rm> since it changes the content's scale without asking me May 19 13:21:52 _rm check if they maybe deprecated some webview methods? May 19 13:22:44 <_rm> doesn't seem that way May 19 13:23:04 <_rm> mostly i'd just like to know what triggers the scale change May 19 13:23:08 <_rm> and how to counteract that May 19 13:24:06 hi i have problem with fragment tabs, I have a nav drawer which loads the fragment inside the home activity , now one of my fragment needs two tabs so i am using FragmentTabHost with viewpager, so when i navigate to my fragment with two tabs its switch properly. Now the problem starts, when i switch to another list in the drawer and back to the fragment with two drawer then it get stick, i cannot swipe between fragment May 19 13:24:56 *tabs May 19 13:25:22 _rm maybe view the stacktrace? May 19 13:26:23 <_rm> in the callback? good idea, i'll try that May 19 13:26:26 How to REFLOW text inside a TextView? May 19 13:26:28 what's the difference between check, test, connectedCheck, connectedAndroidTest? May 19 13:29:07 nm, I think I found it May 19 13:29:29 https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide May 19 13:39:44 How to REFLOW text inside a TextView? May 19 13:49:17 reflow? May 19 13:58:28 put it in the oven? May 19 13:59:29 he wants to do plastic mold injection May 19 14:02:10 danijoo I have separated paragraphs by typing „/n”s into the text after each full stop „.” in the TextView. So problem is that depending on device DPI the sentences' last lines have only few words instead of including the words from the next paragraph so it looks like a square May 19 14:04:51 hm I have to admit I don't understand what do you mean May 19 14:05:06 wakelock ok I'll try to explain better May 19 14:11:09 wakelock last lines of text blocks don't have enough words to fill TextView width. I want the last lines to take words from next line (from next textblock) to fill TextView width. May 19 14:12:52 I guess a screenshot would help greatly in this case May 19 14:14:05 wakelock ok then please wait ~minute May 19 14:15:29 you mean you want justify textView? May 19 14:15:51 guess we'll see what he means May 19 14:16:51 ravilov would know, shame he's never around anymore, he was the BEST May 19 14:17:02 please wait image is upload May 19 14:17:32 it's totally expected that if text size changes, the number of lines and where they break will depending on the size May 19 14:17:40 will, May 19 14:18:56 see: http://i.j2.io/PLYP.png May 19 14:19:22 VnM, I miss him too May 19 14:19:38 ppklomPolak: https://github.com/bluejamesbond/TextJustify-Android May 19 14:19:50 (this is just a scratch layout for testing) May 19 14:19:53 bad scrapping May 19 14:21:40 xgearx thanks I'm testing the demo app now May 19 14:24:30 sorry justify text is not what I want May 19 14:24:36 xgearx sorry justify text is not what I want May 19 14:24:53 np May 19 14:26:07 hi i have some problem with tabs + viewpager inside fragment and i am using nav Drawer May 19 14:29:11 xgearx maybe you at least know the proper name for what im trying to do. Please see http://i.j2.io/PLYP.png has first textblock end with „Projekt RED”. Next textblock starts with „it was released for” […]. How to join these two so the screen width is full? May 19 14:30:20 the closes thing is called text justification May 19 14:30:24 ppklomPolak: remove space ? May 19 14:30:58 or this is two separate views? May 19 14:31:08 you might also want to look at https://github.com/grantland/android-autofittextview May 19 14:31:14 xgearx I would but I need the text to be separted into textblocks May 19 14:31:27 xgearx one view only it is May 19 14:32:30 oh, now i totally don't understand what you want) May 19 14:33:17 the blocks to be perfectly filled with text May 19 14:33:51 so they are rectangkle shaped and not whatvere else shape May 19 14:34:17 that's actually pretty hard to get May 19 14:39:42 wakelock ok I'll just write the text on image sthen May 19 14:39:55 and fuck android textviews since now May 19 14:40:45 http://i.j2.io/PLYP.png May 19 14:50:02 I set my app to open up from a browseable link, but when I am running it in the emulator it “opens” the app inside the browser, if I look at running apps, it shows the main activity of my app, but the browser title bar. Is there a way to use a link to open the app as “itself” ? May 19 15:00:48 yes May 19 15:04:24 danijoo: I appreciate your brevity, but in the spirit of usefullness, can you expand on that thought? May 19 15:04:56 BooeyOH, https://developer.android.com/training/app-indexing/deep-linking.html May 19 15:09:34 danijoo I did all that and it works, except that it opens “in” the browser instead of launching my app, would I leave out the Default category to do that? May 19 15:09:50 how can an app be in the browser? May 19 15:09:55 that doesnt make much sense. May 19 15:11:31 exactly my thoughts! May 19 15:11:45 can you post a screenshot? May 19 15:12:01 yeah, getting that now May 19 15:16:21 https://www.dropbox.com/s/c3g3s3q4h17g8qk/Screenshot%202015-05-19%2011.16.12.png?dl=0 May 19 15:17:15 so the “browser” one was what happened when I clicked on the link in the browser to open my app May 19 15:17:24 the other one is my app opened through the launcher May 19 15:17:25 JakeWharton: can something provided from singleton scope be injected into the graph of something at a lesser scope, like @ActivityScope? May 19 15:17:35 Dagger2 May 19 15:19:15 does anyone know how I can access this screen with an intent? May 19 15:19:16 http://prntscr.com/770034 May 19 15:19:24 for any app I know the packagename of May 19 15:19:47 BooeyOH, thats strange.. Oo May 19 15:19:58 are you sure its not a website that just looks like your app> May 19 15:20:14 e.g. can a dependency in an @ApplicationScope module depend on a @Singleton dependency? May 19 15:21:11 danijoo, yes, it is the app, going to try something else, I am wondering if the action_view is “supposed” to work like that. Also wondering if it is something strange with the emulator, so I will test it on nexus 5….. May 19 15:21:28 danijoo, i know you certainly can, i don't know what it is offhand. I think it lives in the settings app if you wanted to dig into aosp May 19 15:21:49 shekibobo: yes May 19 15:23:42 JakeWharton: Any idea why I would be getting a compiler error saying it can't find a @Provides method for the resource in an @ActivityScope module when it's being provided in my ApplicationModule as a @Singleton? May 19 15:24:24 does the activity component depend on the application one? May 19 15:24:27 dragorn, already found it. thanks :) May 19 15:24:39 Sure does May 19 15:25:23 danijoo, it worked like I expected on the phone, so maybe it is something with the emulator browser, or chrome ??? May 19 15:25:36 no idea. May 19 15:26:23 shekibobo: not sure then. should work from what I remember. May 19 15:41:13 JakeWharton: The ActivityComponent shouldn't extend ApplicationComponent, right? just include it as a dependency in the @Component args May 19 15:41:21 right May 19 15:42:54 I have a theory May 19 15:44:39 you should submit it for scientific review May 19 15:45:10 danijoo, in case you were curious, it happens on my nexus 5 using dolphin browser too May 19 15:45:27 *it = opens app “in” browser instaed of separately May 19 15:45:35 BooeyOH, seems to be a browser issue then. maybe some dont handle the intent properly May 19 15:45:39 is it somehow possible to get a 'preview' of the android android app i'd be building with the current gradle script? (containing versionCode, versionName, app name etc) May 19 15:45:48 but a browser _cant_ open your app internaly May 19 15:45:56 it must be some website looking like your app May 19 15:46:09 It's the app-within-an-app thing from yesterday. :D May 19 15:46:18 TacticalJoke, I thought the same xDD May 19 15:46:44 danijoo, that is the weird thing, when I clicked the link, it asked if I wanted to open it using my dev or prod version of the app, I chose dev and it opened it with the dolphin toolbar May 19 15:47:20 really strange May 19 15:47:22 so it is my app, not a website, not sure why though, going to try a custom intent action instead of “action_view" May 19 15:47:32 appception May 19 15:48:16 android 5(.1?) introduced these awesome notification-bar menus where you (for example) choose a bluetooth device or a wifi network without going to the settings app. is it possible to have something like that in my app? my app needs GPS and i _hate_ sending the user to the settings menu May 19 15:50:38 pretty sure you could do the same in previous android releases just as easily. however gps was always considered "special" in terms of security and no app can turn it on and off at will on its own May 19 15:51:06 fancy42, I think your app needs system permission to change some of this stuff May 19 15:51:31 hello all May 19 15:52:03 i was hoping that android introduced some kind of overlay. like you get with in-app purchases. just dialog that the OS lies over my app and the user needs to approve of the GPS enabling May 19 15:52:15 not that i know May 19 15:52:33 this pull down thing is built into the android rom May 19 15:52:46 some of those settings can be access from within apps, but not all of them May 19 15:54:18 on google play my app supports android 2.2+, what will happen if i remove old android support and put minimum as 4.0.3? old uses will not get the update any more right? or they will find some error message? May 19 15:54:31 any one did so. whats your experience. May 19 15:55:15 t2mkn, you can keep the old apk together with the new one. then 4.x users will get the updated versions and 2.x users will get the old one May 19 15:55:36 if you remove the old one, 2.x users will not find your app in the play store. It wont be listed for thenm May 19 15:56:19 humm, but how to keep the old apk. any thing like that in their? May 19 15:56:33 you add the new one and dont remove the old :o May 19 15:56:39 just like that May 19 15:58:01 danijoo: all previous versions are their in store. new one has minimum support from 4.0, its in manifest u can say. so this is ok. right? May 19 15:58:04 t2mkn, it looks like this: http://prntscr.com/770g3w May 19 15:58:05 I've had that happen, it simply offers no more updates May 19 15:58:16 t2mkn, yep May 19 15:58:17 even removes the app from "my apps" May 19 15:58:34 if I uninstall I cannot reinstall from play store May 19 15:58:39 in the screen all phone that support the features get version 210, the rest will get 152 May 19 15:58:43 (that is if you DON'T keep the old apk) May 19 15:59:13 got that. thanks. danijoo wakelock May 19 15:59:26 I had to make that step once, too May 19 15:59:35 2 month later I decided to remove 2.3 completly May 19 15:59:44 danijoo, bastard! May 19 15:59:45 :p May 19 15:59:49 because there was no growth in userbase for that particular app. no reason to support it then May 19 16:00:13 there are still about 10k users having it installed though May 19 16:00:14 sure there's reason! it's because you love your stable 2.3 userbase ;) May 19 16:00:40 JakeWharton: I wasn't making the required dependencies available to subcomponents, i.e. they weren't defined on the ApplicationGraph May 19 16:00:58 wakelock, but not if you have to support code changes for both and cant update your server backend because of 2.3 May 19 16:01:19 shekibobo: ah. you can use subcomponents for that May 19 16:01:41 i am still getting users for 2.2 2.3.3 and upto 2.3.7. almost 100+ new downlods every day. May 19 16:01:54 t2mkn, and how much for 4.x? May 19 16:01:56 but yes, they never go for pro to support me May 19 16:02:01 then if you actually "like" your users, you do your best, which usually means removing certain features from the 2.3 release but still making updates for it May 19 16:02:08 JakeWharton: is that different from having a component depending on another component? May 19 16:02:12 yes May 19 16:02:17 danijoo: for 4.x+ its like 1k+ May 19 16:02:27 wakelock, if you are a single person, its sometimes hard to do both May 19 16:02:36 danijoo, true that May 19 16:02:38 shekibobo: http://google.github.io/dagger/api/2.0/dagger/Component.html scroll May 19 16:02:47 you have to choose if its worth the time to make an extra version for a small amount of users May 19 16:03:03 t2mkn, after a while the 2.3 userbase will stabilize at a certain number, at that point it is up to you to decide if they're worth it or not going forward May 19 16:03:41 t2mkn, I'd support that, too. But for me it was like ~1500 installs per day and only about 20-30 of that for 2.x May 19 16:04:05 wakelock: i want them to stabilize :P but waiting since 1 year. lol. but its growing always. May 19 16:04:19 well... lucky you :p May 19 16:04:30 so what you people think. should i remove support for older android. i cant use new features of android if i keep supporting them. May 19 16:05:02 sure you can, this is where you hone your workaround-making skills ;) May 19 16:05:15 don't ask us what we think, it is entirely up to yu May 19 16:05:17 you* May 19 16:05:22 t2mkn, if 1/10 of your userbase is from 2.x as you said. I would keep them. Either with a seperate version of with lots of code hacks May 19 16:05:52 if you say they never support you and buy premium, the answer depends on if you want to make money with it or just be the nice guy :p May 19 16:06:50 * wakelock wishes devs in here would use somewhat similar names/nicks as they have on the play store May 19 16:06:57 hummm.... i think i was nice to them since a long time. May 19 16:06:57 a businessman would drop the 10% if they only pay like 2% May 19 16:06:58 :P May 19 16:07:33 it's probably easier to never support 2.x than to drop support May 19 16:07:57 dragorn, soon enough people will say the same for 4.x May 19 16:08:22 hehe but that time i had to support, because they ware paying. its 3 years now. u can understand. May 19 16:09:03 arround 100+ active users are their in paid version. thats making me think. May 19 16:09:16 dragorn, not that easy when your app started while 2.x was at 50% marketshare ;) May 19 16:09:42 t2mkn, let me tell you, I was quite pissed when I bought Tapatalk only for them to decide to offer the release I paid for for free and then drop support for me May 19 16:09:48 we'll soon only support 4.0+ May 19 16:10:11 a framework we need won't let us do it differently -_- May 19 16:10:22 that's bull May 19 16:10:25 I cant wait to set the 5.x switch :x May 19 16:10:26 there is always appcompat May 19 16:10:30 i started when 4.0.2 launced. so was supporting 2.2 that time. May 19 16:11:09 appcompat is not offering everything May 19 16:11:10 wakelock: appcompat has no support for some features. thats why. i need to do it this way. May 19 16:11:15 it doesnt even have a progressdialog! :D May 19 16:11:15 wakelock, it's a map rendering framework. i'm not entirely sure what you mean with 'theres appcompat' but i don't think we can make it compatible ourselves May 19 16:11:27 ok fiiiine May 19 16:11:35 YES, there are some things you can't do with appcompat May 19 16:11:37 happy now?? May 19 16:11:41 :D a little May 19 16:11:47 ^^ May 19 16:11:47 but it overall still sucks :D May 19 16:12:06 i'd also love to blacklist all samsung devices May 19 16:12:10 but then again if you develop stuff with 3d map rendering, the user experience is shitty on old devices anyway May 19 16:12:10 not possible unfortunatly May 19 16:12:17 why? May 19 16:12:26 danijoo, er... progressdialog is a part of the base framework since API 1 :p May 19 16:12:36 why not possible or why I want that May 19 16:12:47 wakelock, I mean a material designed appcompat version May 19 16:12:56 oh psh May 19 16:12:59 theres an AppCompatAlertDialog but no Progressdialog May 19 16:13:19 (yes I now its just a custom view one liner to create one on my own ;) ) May 19 16:13:25 froyo was the best looking android anyway May 19 16:13:27 * wakelock hides May 19 16:13:59 the 90th called, they want their design back... May 19 16:14:32 froyo is not '90s, it's timeless! May 19 16:15:04 Is it possible and easy to wrap a ViewGroup rather than subclass it? (I currently have a ViewGroup subclass and I'd like to use composition rather than inheritance, because my class is intended to be a self-contained View.) May 19 16:15:17 As far as I can tell, it's not, but I haven't done this kinda thing much May 19 16:15:26 lets talk about android 1.0 http://cdn.cnet.com.au/story_media/339323434/android-history_2.jpg May 19 16:15:27 :D May 19 16:15:52 you can wrap it in another ViewGroup descendant May 19 16:15:56 nothing else makes sense May 19 16:16:08 this ugly pull down menu bar.. May 19 16:16:14 pull up* May 19 16:16:15 android 1.0 :O May 19 16:16:17 nothing else can be added to the view hierarchy as a child view holder May 19 16:16:42 Okay, thanks. Confirms what I was thinking. May 19 16:16:42 danijoo, that's a G1, I still have (and love) that device! May 19 16:17:03 I guess the issue here is that I don't want my view to have methods such as "addView", but it seems there's no way around this. May 19 16:17:08 danijoo, also, that is *not* android 1.0 May 19 16:17:12 Other than `throw new NotSupportedException();` stuff. May 19 16:17:17 Or whatever it's called. May 19 16:17:18 that is android 1.5. big difference ;) May 19 16:17:33 OperationNotSupportedException* May 19 16:17:44 just throw NPE, for kicks :p May 19 16:18:10 wakelock, how you know. the home screen looked identical for 1.0 and 1.5 May 19 16:18:16 if an Activity and a Fragment within it both require a Cursor from a ContentResolver, what's the best way to handle this? Simply have both the Activity and Fragment run the query separately, or somehow share the Cursor? May 19 16:18:26 Also, does anyone know what LinearLayoutCompat is? Should I be using this in code rather than LinearLayout? May 19 16:18:29 stop loving old android :P its time to think for 6.0 the name has anounced. May 19 16:18:35 I want to publish a code on github, i use android-studio but i don't want my github repo has anyhting to know about the fact i use android-studio. Any Idea on how to do that? May 19 16:18:39 I looked at the code, and they look very similar. May 19 16:18:40 wakelock, i think NPE is not misleading enough. rather some httperror or something May 19 16:18:45 android 6.0 - native kotlin support May 19 16:18:48 danijoo, I know, trust me ;) May 19 16:18:50 thats what i want to hear May 19 16:19:01 danijoo: that would be too good May 19 16:19:05 danijoo: :D May 19 16:19:23 What's not native about Kotlin support? May 19 16:19:26 TacticalJoke, Android automatically uses appcompat version of every view if it needs appcompat versions May 19 16:19:27 Schoumi: add .idea/ and *.iml to your .gitiginore file May 19 16:19:29 Hmm, there's this: https://developer.android.com/reference/android/support/v7/widget/LinearLayoutCompat.html May 19 16:19:34 danijoo: what is that native kotline support May 19 16:19:38 if you want to subclass, you should use the appcompat version May 19 16:19:50 LinearLayoutCompat probably keeps some bugs in behavior that were fixed later on May 19 16:20:03 this is going to sound very stupid, probably May 19 16:20:09 probably shouldn't need it unless your layout depends on them May 19 16:20:17 ReScO, it does May 19 16:20:18 wakelock, thats not the reason May 19 16:20:25 no? May 19 16:20:30 see what i wrote May 19 16:20:43 ah I see May 19 16:20:53 danijoo: As far as I can tell, it doesn't do this with LinearLayout: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/internal/app/TintViewInflater.java#78 May 19 16:21:14 but how do i create a timer that runs back from 60 to 0 and is adjustable while running? May 19 16:21:19 Wait, that seems to be the wrong file. Hmm. May 19 16:21:20 TacticalJoke, read the part about widgets: https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/ May 19 16:21:40 ReScO, adjustable in what way? May 19 16:21:46 i'm using a ListFragment in an activity, and need to set and clear the indeterminate progress indicator on the fragment using setListShown(). However, you cannot use setListShown until the content view is populated, and the LoaderManager calls LoaderReset in some cases before the content view is done inflating, causing an error. How do I check the status of the content view to so I don't trigger this exception? May 19 16:22:03 oh wait. wrong link May 19 16:22:05 Mavrik: adjusting the time remaining May 19 16:22:18 TacticalJoke, there you go May 19 16:22:19 http://android-developers.blogspot.co.uk/2015/04/android-support-library-221.html May 19 16:22:36 ReScO, remember start time in milliseconds, and have a variable for "totaltime" May 19 16:22:39 "The ability to tint widgets automatically when using AppCompat is incredibly helpful in keeping strong branding and consistency throughout your app. This is done automatically when inflating layouts - replacing Button with AppCompatButton, TextView with AppCompatTextView, etc. to ensure that each could support tinting." May 19 16:22:56 Yeah, but does that apply to LinearLayout? I'm not sure. May 19 16:22:56 ReScO, threads and alarms I guess May 19 16:23:04 TacticalJoke, I think so May 19 16:23:04 I know it applies to Spinner, TextView, etc. May 19 16:23:05 then post a runnable every 1 sec to update the displayed timer according to "totaltime - (currenttime - starttime)" May 19 16:23:14 no need to complicate :) May 19 16:23:37 oh I just saw the source you posted May 19 16:23:38 mh May 19 16:23:54 zerowaitstate: findViewById and if it fails, you haven't inflated yet? May 19 16:24:19 but this is not appcompat May 19 16:24:29 this is TintTextView etc. never seen thosse May 19 16:24:33 Mavrik: so if i'd send a time from my server, it can set the time left on the client, right? May 19 16:25:06 ReScO, yes, the important bit is that you remember start time and full runtime May 19 16:25:09 Yeah, I'm confused about that. Hmm. May 19 16:25:13 and then on each "tick" calculate how much is left May 19 16:25:21 zerowaitstate, layout is not inflated in onCreate and onCreateView. You have to wait until onActivityCreated to access it and should put all your code that could end in a layout change to this callback May 19 16:25:24 that way you can freely adjust time remaining and it'll keep the code simple May 19 16:26:22 burntcookie90: hum i don't want to force people who want to use my app to deal only with gradle. If they want use ant or another tool they don't need to do many changes May 19 16:27:19 Schoumi,gitignore those files May 19 16:27:57 Schoumi: gitignore gradle/ build.gradle settings.gradle gradle.properties...etc May 19 16:28:22 Schoumi: but this means that your cloner will have to take the time to write their own build files May 19 16:28:26 gradle/ gradle.* *.gradle for short :p May 19 16:28:45 I think his point was not to remove gradle stuff but to add other options May 19 16:28:54 if you have gradle added, AS guys can simple use it and the 5 remaining eclipse guys on earth have to fiddle manually May 19 16:29:03 danijoo: Schoumi, this May 19 16:29:04 if you dont have gradle added, everyone will have to fiddle with it May 19 16:29:06 like Android.mk, .project etc May 19 16:29:16 so its an easy decision May 19 16:29:51 danijoo, man, you are *so* discriminative... May 19 16:30:07 if he wants to invest into supporting non-gradle people, then let him May 19 16:30:17 but he doest May 19 16:30:31 it doesnt matter for non-gradle people if there is a gradle file or not May 19 16:30:38 they have to manually setup anyways May 19 16:30:58 wakelock: why make it hard for everyone, make it easy for the majority and let the outliers handle their situation May 19 16:31:10 especially if you want to get contributions May 19 16:31:28 make it as easy as possible for people to dive in and work May 19 16:31:30 burntcookie90, you're missing the point too May 19 16:31:35 if you had to choose to save a few or save non, you chose to save none to "support" the few that would be unsaved anyways? ^^ May 19 16:31:53 will a Fragment's getLoaderManager return the Activity's LoaderManager? May 19 16:31:55 thats a weird point of view May 19 16:32:04 the way I understood him he doesn't want to drop gradle but to *add* others. surely it's not making it difficult for you fancy gradle people to have to ignore some files :p May 19 16:32:34 wakelock: right, so leave the gradle files and let people who want other build systems add it May 19 16:32:54 i don't think it's a project maintainer's job to maintain alternate build systems May 19 16:32:59 or, leave gradle files and *you* as an author add other build systems May 19 16:33:01 why? because you care May 19 16:33:46 the dev's job is whatever the dev wants to take on May 19 16:33:46 dafuq are you talking about May 19 16:33:59 Any build system will gladly grab compiled .JAR file May 19 16:34:03 danijoo: I declared and checked its class at run time (`linearLayout.getClass().getName()`) and it showed "android.widget.LinearLayout". ;o May 19 16:34:07 danijoo: burntcookie90 wakelock thx May 19 16:34:16 So gawd knows what LinearLayoutCompat is all about. Maybe a future thing? May 19 16:34:17 So leave build.gradle files in and let others consume .JARs May 19 16:34:30 Wasting people's time to ignore that file is just... dumb. May 19 16:34:33 TacticalJoke, maybe. May 19 16:34:41 maybe he doesn't want to deal with prebuilt jars? :p May 19 16:34:56 what prebuilt chars? May 19 16:34:56 i'll let gradle in it May 19 16:35:00 ./gradlew assemble May 19 16:35:11 there, you have a JAR you can use with ant, maven May 19 16:35:35 TacticalJoke, have you glanced over AppCompatLinearLayout to see what it actually does different to LinearLayout? May 19 16:36:04 I said nothing about compiling/building jars, but about dealing with them May 19 16:36:11 but eh May 19 16:36:23 Yeah, I glanced. LinearLayoutCompat looks very similar to LinearLayout. May 19 16:36:37 Looks like a copy-and-paste job (but I didn't look deeply). May 19 16:36:59 TacticalJoke, compat version has delimiters and some other themeable stuff May 19 16:38:16 Ah. I guess LinearLayoutCompat is older than I thought. (I had assumed it was added recently.) May 19 16:39:01 maybe its the support version for android 1.5 or sth May 19 16:41:24 1.0 :p May 19 16:42:06 I also found this: http://stackoverflow.com/questions/26513244/what-is-linearlayoutcompat-in-appcompat-v7 May 19 16:43:59 so its compatfeatures for a version that doesnt have a market share anymore May 19 16:44:37 Yah, seems so. May 19 16:46:07 Hmm. Running setActionView on a MenuItem seems to break the click listener, but setting a MenuItem.OnMenuItemClickListener doesn't work either. Anyone know what I'm missing? May 19 16:57:21 SimonVT: trying to run on sys-img-armeabi-v7a-android-22, app can't be installed on the device: com.android.ddmlib.ShellCommandUnresponsiveException May 19 16:57:28 Any thoughts? May 19 16:58:28 .travis.yml https://gist.github.com/shekibobo/db7faef2a0187939b72d May 19 16:59:04 Anyone use robolectric? I'm curious how to drive the activity lifecycle between onDestroy() and onCreate(), would it be something like: http://sprunge.us/RMYP?java ? May 19 16:59:31 Because I get an IllegalStateException: "no activity" when calling controller.create() May 19 17:42:52 gey huys May 19 17:43:02 ActionBarActivity has been depricated. but the templates in AS 1.2.11 still uses it... I am newby, so so any comments? May 19 17:44:11 The templates haven't been updated yet. May 19 17:46:37 I seem to have forgotten what you call the skewing of a view either to the left or to the right while preserving the middle part May 19 17:46:47 tilt May 19 17:46:48 I think May 19 17:47:20 nah its just rotate May 19 17:47:40 Hey all - Having some issues with Bitmaps & OpenGL SurfaceViews. Been stuck on this for a day and a half now. I'm trying to grab the bitmap of the surface view (via .getDrawingCache()) - I have drawingCache enabled in an earlier method. The result always turns up black May 19 17:47:54 Yet the surface renders correctly May 19 17:48:32 The 'result' is being turned into a bytearray pushed to TokBox SDK to represent video May 19 17:49:20 hey everyone May 19 17:58:25 tjbiddle, surfaceview is not a view as others and does NOT have a drawing cache May 19 17:58:46 it's just a proxy for a GPU allocated surface and most rendering stuff will not work on it May 19 17:59:05 I want to get a new development phone... replace my samsung Gal 3... And I want it to work on CDMA, verizon... any sugestions on what to get? what not to get? May 19 17:59:32 Mavrik: Well that explains the constant black image. Hm, well it's definitely having things render on it. I should state it's a GL2SurfaceView - not sure if different May 19 18:00:04 Yeah - looks like SurfaceView and GLSurfaceView are different. Does that change anything? May 19 18:00:14 IrishGringo lol, you are still asking that :D May 19 18:00:32 tjbiddle, a bit. May 19 18:00:32 g00s: yea... went to bed last night before picking a device May 19 18:00:33 ok so you can't work at Thumbtack May 19 18:00:36 cause you suck May 19 18:00:38 good phone ... verizon = 0 May 19 18:00:41 come back, 1 year! May 19 18:00:54 tjbiddle, but nothing in your terms, because even that one doesn't have a drawingcache May 19 18:01:04 IrishGringo: looks like the nexus 5 has/had cdma. might be able to find one of those. May 19 18:01:07 both are working directly with GPU without Java code inbetween May 19 18:01:14 IrishGringo ask pfn, he had vz. i think he likes is moto X May 19 18:01:16 lol May 19 18:01:29 Buying a Verizon phone for development probably wins for dumb ideas May 19 18:01:34 Mavrik: Hm. So is there any way to get the image data from it? May 19 18:01:37 yeah, all the recent motorolas are quite good. looks like only the X has cdma though. May 19 18:01:47 Nexus 6 May 19 18:01:53 If I were to buy a new device, my primary concern would be whether it's a good day-to-day device. May 19 18:02:10 Mavrik: arguably that's a nexus device :) May 19 18:02:12 App development would be secondary. :D May 19 18:02:20 groxx, not really May 19 18:02:29 I am mostly an iPHONE developer, and I have some versizon interests... so for political interests, I need to stick with versizon May 19 18:02:40 groxx, as soon as you want to root it to get better profiling stats, or wireless adb or some other useful tools it gets really fun May 19 18:02:42 Mavrik: Actually I don't think that's entirely true. Because if I take the bitmap that getDrawingCache gives me, and I compress it to a PNG I won't get a black image - and instead will get something that looks corrupted; but I'll see a bit of what should be there (Like a small tiled version scrolling across of what it should be) May 19 18:02:58 tjbiddle, I'm not sure what's not clear May 19 18:03:11 you can't frigging get content of a hardware screen surface buffer via drawing cache May 19 18:03:17 Mavrik: by "fun" you mean "not easy", or "you can do a lot of fun things"? I've had zero problems with wireless adb May 19 18:03:28 because those views DO NOT use a rendering pipeline that goes past the drawing cache May 19 18:03:45 IrishGringo i have some VZ interests too - interested in never using them again XD May 19 18:04:08 Mavrik: How does that explain the scenario when I compress to a PNG though? May 19 18:04:09 heh, same here. plus avoiding CDMA makes your life a lot easier. May 19 18:04:15 pfn: rumor has it that you have some verizon android comments I am shopping for a new android development phone... thoughts? May 19 18:04:32 tjbiddle, how does getting non-initialized drawing cache result in corrupted garbage? May 19 18:04:40 basic workings of machine RAM. May 19 18:04:51 g00s: never again... any reason why? I was having trouble with a verizon tablet one time... kept returning to non debug mode. May 19 18:05:10 IrishGringo i terminated my contract after 2 years and they kept billing me May 19 18:05:26 they just fucking suck! May 19 18:05:32 Funnest experience with Verizon phones was when one refused to power on without calling home to VZW May 19 18:05:38 and the nearest CDMA network was 4000km away May 19 18:05:44 Mavrik lol May 19 18:06:03 luckly their shitty boot wizard had a bug that could crash it May 19 18:06:06 and let me bypass that May 19 18:06:33 I hate using TypeArray. Code ends up so verbose. May 19 18:06:38 TypedArray* May 19 18:07:00 g00s: yea... Sprint rep did something similar to me... I was just asking about phones a couple years ago... the bitch asks for my number... and just releases it... Then Sprint sent me several new phones and billed me. amazing. May 19 18:07:26 nexus 6? May 19 18:08:20 VZW lets you activate N6 right? May 19 18:08:30 pfn... ok I'll go shopping for a nexus 6.. what about the X ? May 19 18:09:57 nexus 6 = very expensive May 19 18:10:16 same price more or less May 19 18:10:18 sure, X is good too May 19 18:10:51 i was orig thinking samsung gal 4 or 5... May 19 18:11:00 O.o May 19 18:11:02 I want to do some NFC stuff... May 19 18:11:10 in what world is SGS cheaper than nexus? May 19 18:11:49 the first nexus phones I saw were all in the 700 range May 19 18:11:57 so I will keep looking May 19 18:13:57 Mavrik: well, N6 is pricey than SGS4 in many places May 19 18:14:51 hmm, yeah, you're right, 4 is rather oldish now May 19 18:15:29 N6 is just plain pricey, too May 19 18:15:53 anyone who’s done G+ login, ever have the situation where, after logging in and out without a problem for 10-20 times while debugging, you’re no longer able to login with that account? May 19 18:16:04 details: http://stackoverflow.com/questions/30328949/while-testing-the-login-flow-of-google-plus-my-account-seems-to-get-invalidated May 19 18:16:10 sold in the specific country can be also problematic May 19 18:16:19 I am just trying to NFC... but my phone is to old for the demo apps I'm looking at... May 19 18:17:16 also, dunno about SGS, but Nexus phones won't work with Mifare May 19 18:17:33 I have an SCH-i535 now... and its old... wtf... seems like I just got it. May 19 18:18:09 I can get SGC i535 to do mifare... have been doing it for a while. May 19 18:18:54 you know you're getting desperate when your googling starts to include ".... not working" May 19 18:18:55 haha May 19 18:18:55 but there is a new SDK from nxp out called mifarelite... which is free... but not clear how to use. May 19 18:20:58 says "Note that TypedArray objects are a shared resource and must be recycled after use", but a couple of people in here have said that it's not necessary to call TypedArray.recycle in the constructor of a custom View. Which is correct? May 19 18:21:35 Also, is try..finally necessary there? May 19 18:23:11 I should've linked to this: http://developer.android.com/training/custom-views/create-view.html#applyattr May 19 18:24:01 So I'm having a look at using Anvil with Android development, https://github.com/zserge/anvil. The syntax used for lambda functions almost looks like java 8, which normally wouldn't work with Android. What am I missing? May 19 18:24:13 I'm doing the sensible thing and saying `finally { array.recycle(); }`, but I wonder whether it's needed. May 19 18:25:39 kjeldahl are you reading the kotlin version :P May 19 18:25:55 kjeldahl also if you like that checkout out anko May 19 18:26:33 g00s: TextView.class isn't Kotlin AFAIK. Yes, I'm also looking at anko and kotlin, but one step at the time. Baby steps... May 19 18:26:34 kjeldahl: it’s kotlin. You could also be reading a project using retrolambda May 19 18:26:49 Ah, retrolambda is probably it, thanks. May 19 18:27:29 and between that and AS folding code with lambda notations, it’s hard not to be exposed to lambdas, even on android May 19 18:28:49 lambda? May 19 18:28:58 is this a girl you meet at an advanced stage of android dev? May 19 18:29:41 she is bug free and bug eyed May 19 18:29:59 .. and she doesn't have a name. May 19 18:30:16 i woudnt trust people without names May 19 18:30:22 lol yes cause lambda :P May 19 18:30:33 she always tilts her head and spreads her legs as she walks May 19 18:30:38 I wonder how many women are Android programmers. May 19 18:30:54 I think ravilov is a woman May 19 18:30:54 One of the best I know is a woman... May 19 18:30:57 she'd be walking like λ May 19 18:31:11 at least he always insults me when I do anti women jokes May 19 18:31:26 he/she/it May 19 18:31:36 he/she/it/λ May 19 18:34:00 ya know... it would figure. I finally publicly push a thing a couple days ago which uses the trace viewer, and today Google updates Chrome in a way that breaks it. https://code.google.com/p/chromium/issues/detail?id=468468 May 19 18:34:17 I love my new monitor setup. 9:16 vertical screen is so nice for coding May 19 18:34:31 ADB is pissing me off. Anyone else having problems where ADB just doesn't connect, for no reason? The OS sees the device, Stetho sees the device, the device says it's connected. But ADB, no. Does't see it. May 19 18:35:26 I made the animation just look google keep, HA May 19 18:35:34 cant get it to run so smoothly though May 19 18:35:45 ah ok it did May 19 18:35:45 danijoo, my favorite setup was one vert + one horiz... that was nice. I have 3 horiz now, still not as good for the actual code. May 19 18:36:08 they need to straighten out before finishing the rotation so you feel they already stabilised May 19 18:36:14 its a god damn science May 19 18:36:23 aint nobody got time for that indeed May 19 18:37:10 Best coding setup. iMac 5K, close up (can't see pixels anyway). Screen becomes HUGE! May 19 18:37:29 and now I wont need that handler to postDelayed the animation since the animation is starting from the very bottom and not visible if it already has a headstart May 19 18:37:31 ganios May 19 18:37:35 Which allows for a tiny font of course. May 19 18:38:02 nope, untrue what I said May 19 18:38:05 ill just go May 19 18:38:10 MikeWallaceDev, yeah I have 1 vert and 1 horizontal now too May 19 18:38:12 MikeWallaceDev: not for quite a while (see if you have any tools updates?). done the `adb kill-server` + `adb devices` song and dance yet? May 19 18:38:22 I have a third one, but the desk is to small :) May 19 18:38:39 MikeWallaceDev: ah, you did a presentation on Spannable right? happen to have a recording of that anywhere? May 19 18:38:39 but the vertical one is really awesome for strings.xml or something like that on one screen May 19 18:38:39 I've danced, I've pranced, I've romanced. May 19 18:39:04 danijoo, mine is to small to vertical! (I have a book shelf) May 19 18:44:15 I just love vertical for the code, I like having a lot of context May 19 18:45:12 Kotlin is good for that. :) Way less scrolling. May 19 18:45:17 :D May 19 18:47:38 is it a bad UX practice add a button to return to the main activity? May 19 18:47:52 unless its in a navigation drawer, yea May 19 18:48:26 for example, and SAT/GRE test May 19 18:48:28 ventura: An "up" button at the top left (in the app bar) to return to the logical parent is the typical thing. May 19 18:48:32 I got a weird problem May 19 18:48:37 s/logical/hierarchical/ May 19 18:49:04 I'm trying to interact with the "com.android.systemui.statusbar.policy.Clock" class May 19 18:49:23 in the source the adk installed om my pc it extends TextView May 19 18:49:40 but it doest when I check it on my phone using reflection May 19 18:50:03 was this changed recently? May 19 18:50:51 It extends TextView in `master`: https://android.googlesource.com/platform/frameworks/base/+/master/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java May 19 18:51:51 Having said that, I have no idea what you're doing or whether it's wise. :D May 19 18:52:15 trying out XPosed May 19 18:53:38 reflection tells me there is a method "updateClockView(TextView)" in there, but I can't find that in the source either... May 19 18:54:59 Flaghacker: unless you're running a stock-AOSP-style nexus build or something, it could be modifications by carrier / oem. May 19 18:55:54 Would the manufacturers change the clock code? May 19 18:56:12 And I'm also running cyanogenmod May 19 18:56:28 but I couldn't find any Clock stuff in their source... May 19 18:56:28 if it's the easiest way to add branding, possibly. May 19 18:57:03 Flaghacker, that seems incredibly internal... proceed with extreme caution May 19 18:57:29 groxx, what's "branding"? May 19 18:57:38 Anyone who has experience with code coverage tools here? May 19 18:57:48 wakelock, yea I'm only loggins class names and super classses for now May 19 18:57:50 Flaghacker: like adding an AT&T logo or something May 19 18:58:09 obviously value-adds in all cases. May 19 18:58:13 groxx, there's no logo in the clock on my phone... May 19 18:58:33 just saying as an example :) yes, I can see reasons carriers / etc would modify things like that. May 19 18:58:39 you asked if a manufacturer would modify it May 19 18:58:41 ah ok May 19 18:58:48 the answer is obviously "yes, why not" May 19 18:59:04 _bad_ reasons, but they're not known for making exclusively good decisions. May 19 19:00:45 I can't think of a single case wher manufacturer/vendor/operator modifying the firmware ended up in actual improvements May 19 19:00:54 usually ends with degradations and bloat May 19 19:01:30 So does anybody have any experience with anvil vs anko in real projects? I've become pretty fond of "react"-style GUI components, and anvil feels a bit like that. anko looks more like just replacing xml with a real language and creating GUI views in code, which I also like. Difficult choices. May 19 19:02:08 Odaym, TacticalJoke: you answer 10 questions, and than and activity with the grade. should i put a button to return to the main activity or use the soft back button? May 19 19:02:26 i vote for the soft back button May 19 19:02:47 just have to explain “why” to the designer May 19 19:03:49 you dont vote for these things May 19 19:03:53 you read design guidelines May 19 19:04:04 ventura: What does the activity you're going back to contain? May 19 19:04:51 TacticalJoke: uhmm… it could contain a list of all SATs since the begining of time May 19 19:05:01 ventura: design guidelines (and therefore a large number of android apps) suggest soft back button, and _maybe_ a "home"-style button in the top left of the action-bar (if you have one), acting as the "up" navigation. May 19 19:05:22 but this isn't iOS. don't add superfluous back buttons. May 19 19:05:56 in RX, if i have mySubject.timeout(2 seconds), and no observables are emitted, does it still time out? or does it have to be time between 2 emitted observables ? May 19 19:08:10 groxx: thx May 19 19:08:44 rx 1.0.11, some interesting bugfixes May 19 19:09:04 Odaym: reading the guidelines, would be back button May 19 19:09:57 Odaym: thx too May 19 19:14:17 final result! 95% of the time, it works every time https://dl.dropboxusercontent.com/u/19390574/Layout_animation_everytime.mp4 May 19 19:16:00 how do I make a hot observable always provide the last generated value when a client subscribes? May 19 19:16:50 thats BehaviorSubject right ? May 19 19:17:02 where is adq May 19 19:17:08 bpe May 19 19:17:13 see vid if you like :) May 19 19:17:25 dang May 19 19:17:47 I've never seen anyone spend this much time on something so irrelevant such as animations May 19 19:18:01 they are really supposed to be cherry on top and not devour your entire dev time May 19 19:18:03 g00s, thanks May 19 19:18:14 dude, things need time May 19 19:18:23 wasted time, this May 19 19:19:04 alright, I'm with you May 19 19:19:15 say you want to implement an animation X, and you know that animations are a cherry on top May 19 19:19:20 and X doesn't quite work like you wanted it to May 19 19:19:22 what do you do? May 19 19:20:44 either implement a different animation, or forget about animating that May 19 19:20:52 functionality above all May 19 19:20:53 ok, graet May 19 19:21:00 what about some sort of functionality that you would like to have May 19 19:21:03 and let's call it Y May 19 19:21:09 and Y doesn't quite work like you want it to May 19 19:21:10 functionallity is an ugly woman May 19 19:21:33 but in this case, no one can see what the functionality is doing, the end result will be the same for the user but you wanted some way to do it with and that way didnt work May 19 19:21:41 I'd do my best to figure it out, but it might end up on back burner eventually May 19 19:22:08 ok, so which feature do you pick and stick out with until it works exactly like you want it to? May 19 19:22:17 who is the GOD feature that you are willing to spend time on? May 19 19:22:24 Odaym: I wish I had this feature implemented here. May 19 19:22:39 the one the app is all about May 19 19:22:49 and say that one didnt work like you wanted to exactly May 19 19:22:58 it did work, but not exactly like you wanted it May 19 19:23:17 all around you are going to end up with mediocre result because you put in mediocre effort May 19 19:23:20 I would like to tether other devices to my phone while it's running an openvpn client. Apparently this has been disabled for security reasons, is there an easy way to enable this, if so would it be in /platform/system/netd ? May 19 19:23:28 problem is even tho its cherry on top polish is 99% of what makes an impression May 19 19:23:33 exactly May 19 19:23:38 how you do one thing is how you do everything May 19 19:23:55 lasserix, that's exactly the idea behind all microsoft software May 19 19:24:01 NO man May 19 19:24:04 well they fail at it if it is May 19 19:24:07 that's the idea behind caring about what you do May 19 19:24:07 Poll anybody? Who is using Kotlin already? anko? RxAndroid/NotRxAndroid? May 19 19:24:08 make it look good, care not what it actually does May 19 19:24:15 i didn't say look good May 19 19:24:21 and i didn't say over functionality May 19 19:24:22 you have to do that to everything about it, be it functionality or UI May 19 19:24:28 they all NEED TIME May 19 19:24:32 i said, polish the cherry on top is 99% of the impression May 19 19:24:47 you start taking shortcuts somewhere, you will take shortcuts everywhere May 19 19:24:56 not that fcnality doesn't matter or anything, but what people will remeber? not how "functional" your app is May 19 19:25:03 Odaym, I'm just saying, if you're spending this much time on an ANIMATION, then that sends the signal that all your functionality is done and ready. is it? May 19 19:25:12 it is.. May 19 19:25:18 then that's fine May 19 19:25:27 I admit I wasn't aware May 19 19:25:41 it's not about taking shortcuts anywhere, it's about prioritizing May 19 19:25:43 it would also be fine if it isn't done, the important thing is to remember not to spend too much time on something because you are afraid of finishing May 19 19:26:06 cause fear of finishing things will make you spend time on things that dont matter May 19 19:26:16 um okay May 19 19:26:22 never said I'm afraid of finishing? May 19 19:26:29 I finished many apps in fact May 19 19:26:34 I'm afraid of never finishing. ;| May 19 19:26:39 we're talking about the generality that you're talking about May 19 19:26:41 not you specifically May 19 19:26:48 Is software ever really finished, though? May 19 19:26:57 the fact that things that dont seem to matter, dont deserve as much time May 19 19:27:07 it's true though May 19 19:27:11 that is the essence of prioritizing May 19 19:27:23 its finished when you for one reason r another never have to touch it again May 19 19:27:24 prioritising is the rule of course May 19 19:27:46 they say "finished" software is dead software. personally, I disagree May 19 19:28:11 at work I dont do this May 19 19:28:16 Can you give an example of finished software that isn't dead? May 19 19:28:19 at work they dont require this May 19 19:28:20 lol May 19 19:28:21 Just curious of what you're thinking. May 19 19:28:38 solitaire May 19 19:29:05 plus regardless of the feature, when you are spending a lot of time on it, you will inevitably learn a bazillion things that others who didnt want to spend the time doing will not know May 19 19:30:18 next time you are here wakelock and you want to implement something like that, who you gonna ask? :D May 19 19:30:20 haha May 19 19:30:36 Anybody use qpython/sl4a? Or is this channel just for java/C development? May 19 19:30:46 mainly this channel is for C May 19 19:30:52 eh, nothing comes to mind right now, at least not globally/generally. but I personally happily and actively use many apps that are no longer maintained May 19 19:31:03 for example, ADW launcher May 19 19:31:12 I even bought the EX version May 19 19:31:16 Odaym, ghostbusters? May 19 19:31:23 who you gonna call! May 19 19:31:35 well, good night May 19 19:31:50 talk about anticlimax May 19 19:32:06 akk: not exclusive to java/c May 19 19:32:49 but largely java/c, with some alternative weirdos thrown in (hi scala, kotlin etc) May 19 19:33:02 I have a python script that needs to write to a directory on the (external) SD card. Worked in 2.3 but I just got a kitkat phone. May 19 19:33:10 I thought the NDK was about C++, not C? May 19 19:33:26 Maybe I just need to hack the phone to allow writing to the SD card, but I was wondering if there was another way. May 19 19:33:40 C/C++ May 19 19:33:43 eh, c/c++, same diff May 19 19:34:23 akk, the SL4A apk would need to be updated due to more restricting permissions in KK May 19 19:34:24 I'm not sure I understand that notion. They are completely different languages. :) May 19 19:34:31 It's kinda incidental that C++ tries to be highly C-compatible. May 19 19:34:54 NDK contains both a C and a C++ compiler May 19 19:35:28 admittedly it is much easier to interface with android via C++, but you can do C too if you really want May 19 19:41:52 https://gist.github.com/pfn/b25e35ccb62389f7bff8 May 19 19:41:56 hmm, not as nice as I'd like it to look May 19 19:43:18 well, it's scala :p May 19 19:43:33 wakelock, it'd be much worse in java May 19 19:43:34 so yeah May 19 19:43:46 color me unimpressed with your statement May 19 19:43:55 I'm getting this on travis-ci even with ADB_INSTALL_TIMEOUT=12 :app:connectedAndroidTestDebug May 19 19:43:55 07:42:18 E/1836824550: null May 19 19:43:55 com.android.ddmlib.ShellCommandUnresponsiveException May 19 19:44:23 Does anyone have any experience with code coverage tools like emma or jacoco? May 19 19:44:45 anyone have an idea how I might fix that? gist for .travis.yml https://gist.github.com/shekibobo/db7faef2a0187939b72d May 19 19:48:17 sescoto: Meta-questions don't get answers. May 19 19:48:52 Sometimes I wish we had a bot. (But then I remember how they use it in ##java and realise it's great that we don't have a bot.) May 19 19:49:34 is there a way to access the logs online somewhere? May 19 19:50:00 huh? May 19 19:50:44 another channel I used to be on uses botbot.me. It'd be something like https://botbot.me/freenode/android-dev/ May 19 19:51:14 example channel: https://botbot.me/freenode/activeadmin/ May 19 19:52:56 accessing logs online would kind of imply a logging bot in here May 19 19:53:00 there are no bots in here May 19 19:53:52 Ok well I’m trying to get code coverage for the app after manual testing it and I’ve been searching on how to make this possible. Googling has led me to instructions with Jacoco or Emma but they all use Ant builds. So my question is if anyone has had success with what i’m trying to do but with gradle? May 19 19:55:12 I've not really done much CC stuff, but I know that the latest version of Android Studio has CC built in (no idea what it's using behind the scenes). May 19 19:56:26 Hmm, i’ll look into it. May 19 19:57:02 If you have a unit-test directory, you can right-click and choose 'Run with coverage' (or whatever it is). May 19 19:59:20 well, or someone's running an irc client / bouncer that also logs, and puts it up online. e.g. I can download all my logs via irccloud. May 19 20:00:12 groxx, if you do that I'll just call you a bot, just so I'd be right :p May 19 20:00:59 Note that there are logs of this channel: and . May 19 20:02:21 hi, does anyone know of a good tutorial site where i can find a tut that explains how to use an existing database to search queries May 19 20:02:38 cant find any good ones.. May 19 20:03:10 I guess it's someone doing exactly what groxx mentioned May 19 20:04:36 lol May 19 20:05:21 DarkChaoz: sqlite.org ? May 19 20:05:23 DarkChaoz: how about sqlite-asset-helper? May 19 20:07:38 yeah im using sqlite database.. May 19 20:07:53 tryna find a tut though on how to use existing database and query it May 19 20:07:55 of course you are May 19 20:08:04 (using sqlite) May 19 20:08:52 `sqlite3 file.db` -> write sql. May 19 20:10:18 my file extension is .sqlite May 19 20:11:21 Hello, any android studio devs here? I´m trying to find out how to generate a uml class diagram of my project. are there any plugins for that? May 19 20:12:12 file extension means virtually nothing May 19 20:12:46 HSaka: s73v3r was looking for something kinda similar. it seems that's a feature of the ultimate edition of IntelliJ, but apparently not AS, and I don't know if they found anything after I stopped looking. May 19 20:13:15 there is a 30 day demo of Ultimate Edition that you can download May 19 20:13:18 btw sqlite3 command tool accepts sql as an argument e.g. sqlite3 file.db "select * from ....." -- useful for scripting May 19 20:13:23 wtf, I'm doing subscribeOn(mainThread) yet my subscription still gets run on a background thread May 19 20:13:38 However, I haven’t been able to get it to do the diagram of the whole project. Just one class at a time May 19 20:14:24 oh that sucks..s73v3r, what did you do then? Did it manually? May 19 20:14:30 i haven't May 19 20:14:51 okey May 19 20:14:56 there’s apparently a plugin or two that works if you’re on windows, but I’m not May 19 20:15:00 behaviorsubject's onNext is directly coupled to my observer's onNext, why May 19 20:15:24 s73v3r, I´m not on windows either. May 19 20:15:50 it just seems like this is just not something that Android developers want to do May 19 20:16:31 damn.. so the plugin only generate 1 class at the time in the uml May 19 20:16:58 well i'll continue to google for tuts since no one is providing any May 19 20:17:01 thanks anyway May 19 20:18:29 sub = DatabaseSaveService.saving.subscribeOn(mainThread).subscribe(...) -- wtf May 19 20:18:52 oh, observeOn May 19 20:18:54 meh May 19 20:19:15 ok, apparently you can generate a diagram for an entire package at once May 19 20:19:23 in Ultimate Edition May 19 20:20:07 What’s the best practice for passing back multiple values from RxJava + Retrofit? Let’s say I want to save the query parameters for later down the chain. It seems insane to create a custom tuple for each step. May 19 20:20:32 Pair,Pair> ! May 19 20:20:39 fucking java :p May 19 20:20:51 pfn this is good to read http://www.grahamlea.com/2014/07/rxjava-threading-examples/ May 19 20:20:56 groxx: That’s what I was afraid of. May 19 20:21:17 tbh I just make custom tuples. it's The Java Way™. May 19 20:21:40 groxx, or just use a language that has tuples to begin with :p May 19 20:21:44 more readable than Pair's ".first" and ".second", or the equivalent of a generic tuple / etc. May 19 20:22:27 why not pojo then May 19 20:22:29 doesn't fix the readability problem. easy-to-create value-type-like Struct-things do help to have, but in Java that's just an every-field-is-final Class. May 19 20:23:21 g00s, https://gist.github.com/pfn/b25e35ccb62389f7bff8 reasonable enough... May 19 20:23:26 I’m fine with the custom tuple if it’s only one step, but in a long chain it starts to get unreadable. May 19 20:23:47 colintheshots: long chain? like, tuple containing tuple containing tuple? May 19 20:23:48 s73v3r, I guess I will try and do it. It´s worth a shot May 19 20:24:29 Hello please I have problem with spinner. It is showing only arrow and it is not clickable May 19 20:24:35 this is my code http://pastebin.com/jYPkXteb May 19 20:28:37 I really dont know how to fix it May 19 20:29:22 groxx: I guess. The toughest part is fitting it all into chained, flatMapped Retrofit calls. May 19 20:29:43 ah. that I haven't done, not familiar with difficulties :) May 19 20:42:15 It seems what I need is some way to pass parameters through Retrofit Observable calls. May 19 20:42:44 Anyone got a recomendation for a drag n drop and swippable list view implementation? May 19 20:43:14 There’s a DevByte from a couple years ago that does this May 19 20:43:30 maybe not the swiping part, but definitely the Drag n Drop part May 19 20:43:54 yeah but it is old and pre- drag n drop api May 19 20:43:59 wondering if there is something newer May 19 20:44:17 Are you talking about RecyclerView or ListView? May 19 20:45:20 either May 19 20:46:10 you don’t need the api if the item isn’t leaving the listview or recyclerview May 19 20:46:37 i know but i was hoping it made it easier than having to do things manually May 19 20:46:48 its till a pita May 19 20:47:20 yeah. I was able to get most of it done in an afternoon, but it was kinda frustrating May 19 20:47:26 you still need to copy a view into an imageview float it around a framelayout, etc May 19 20:47:30 please how to make working spinner, I have tried many tutorials May 19 20:47:50 g00s into an image view?!/ May 19 20:47:53 you can use the OverlayView, but I found that to be a pain, so I went the old way of using an imageview May 19 20:47:59 that seems unecessary, just use an arbitrary view May 19 20:48:19 you can just do listview row -> bitmap -> floating view background May 19 20:48:33 actually you don't use a view at all you can use onPreDraw or whatever May 19 20:49:12 i am just wondering if advanced recycler view is the way to go if anyone has used it May 19 20:49:35 i haven’t used it, but it seemed to have things in order May 19 20:49:41 and it does do everything you want May 19 20:49:53 yeah for the most part May 19 21:05:21 Hey guys, I’ve a plugin that I pass a function wrapped as an Android runnable down to the java side May 19 21:05:35 when it comes back up, I keep getting threading / placement errors May 19 21:05:43 “FindObjectsOfType can only be called from the main thread” and the like May 19 21:06:14 do I have to set a flag to check on a next Update() call, or is there another way I can get back to the correct thread from where I am? May 19 21:08:10 seaders, runOnUiThread might be what you want May 19 21:08:23 and that conveniently takes a runnable May 19 21:08:54 that’s the Java side May 19 21:09:02 I’m talking about when we come back to Unity May 19 21:09:13 after Java’s had it’s dirty ways with the game May 19 21:09:22 (Google Plus login, to be specific) May 19 21:09:24 oh. didn't see anything about unity in there. Never used it, sorry. May 19 21:09:54 jays, really sorry, I’m in the wrong channel here, meant to be in #unity3d May 19 21:10:06 ha! happens. you were close. :) May 19 21:10:58 I've had that happen too many times May 19 21:11:14 just curious, does anyone happen to know of a good example of passing a bundle from an Activity to a FragmentActivity, and then to a Fragment? May 19 21:11:15 at least I didn’t ask about an iOS plugin and some extern C calls here... May 19 21:11:22 I’d have been hung out to dry May 19 21:11:34 thanks for the advice anyway, dragorn, appreciated! May 19 21:12:08 dougg: what is specifically your question? May 19 21:12:37 seaders, I had to write my own thread dispatcher on Unity side to deal with that thread stupidity May 19 21:12:41 New to Android dev here, for new apps should we be using the support libraries? I'm a little confused as to their points May 19 21:13:02 ResidentBiscuit, pretty much any app will have at least support-v4 in it, material support libs as well May 19 21:13:51 Mavrik: Ah so running support v7 is no big deal then? It just gives me a strange feeling, using different classes and what not May 19 21:14:05 Mavrik, yeah I got ahold of $UnityThreading which has UnityThreadDispatcher which claimed to deal with a load of that, but it actually (like oh so many Unity plugins) introduced just as many problems as it claimed to fix. Oh joy! May 19 21:14:54 seaders, yeah, basically remember - Android UI stuff has to be called on Android main thread and pretty much any unity stuff has to be called on unity main thread May 19 21:14:57 those threads aren't the same. May 19 21:15:03 ResidentBiscuit, why? May 19 21:15:06 hey guys May 19 21:15:56 Mavrik: Need to extend AppCompatActivity instead of just Activity just feels awkward. It's probably just ignorance on my part May 19 21:16:11 I am making an app where the user can upload photos. Right now I am using MediaStore.ACTION_IMAGE_CAPTURE to take a photo, but I want the user to also be able to upload from their gallery if they like, within the same camera interface. is there a way to do that? May 19 21:16:43 add a share intent into your app May 19 21:16:52 lasserix: 'fraid I haven't narrowed it down to specifics yet,. I used to have an activity pass a bundle to another activity just fine, but then I want that bundle to a fragment and I'm getting a nullpointer exception. I was just wondering if anyone had some similar setup they were proud of I could learn off of May 19 21:17:21 canvs2321 share camera? sorry May 19 21:17:26 I'll continue looking around dev docs and github though May 19 21:17:45 no share intent that camera can call to use for your app, as you haven't said where to upload, guessing it's specific to your app May 19 21:17:57 dougg are you using setArguements getArguements in your fragment? May 19 21:18:46 liftedbronco: use startActivityForResult to pick from gallery, or use intent filter to share of type image types May 19 21:19:16 that way when the user clicks share by... in the gallery your app will appear in the list starting the same activity that startforresult would come back to with the picked image May 19 21:19:26 ^ May 19 21:20:22 err May 19 21:20:48 this is what I ahve right nwo May 19 21:20:48 http://hastebin.com/ximirapifi.java May 19 21:20:55 I am using startforresult May 19 21:22:15 isnt there like a MediaStore.ACTION_IMAGE_GALLERY_CAPTURE May 19 21:22:21 I apologize I am new to android dev May 19 21:23:24 if your using Zamarin for Android, rebuild your apps with 5.1, some stupidity was going on in previous versions http://seclists.org/fulldisclosure/2015/May/78 May 19 21:25:30 ugh you have call addheader before setadapter May 19 21:25:47 another reason to stay away from Yamarin May 19 21:26:32 lasserix: yeah, it's a fantastic subtle "requirement" May 19 21:27:20 seriousily what a pain May 19 21:28:29 and you cant even call like listview.getHeader() May 19 21:29:38 I think you can get it from the adapter? May 19 21:30:29 ? May 19 21:31:30 well, the reason you need it is it wraps the adapter in a header/footer adapter of some kind May 19 21:31:40 s/need it/need to call it before setAdapter/ May 19 21:32:06 how do I add a click handler to my button ? May 19 21:32:30 just add it to your button, and use state list for the different shapes May 19 21:32:30 groxx i cant seem to figure out how to get a handle on it,a nd what's even better is once you add a header its height is there forever even if you call setGone on its visibility May 19 21:32:33 urgh May 19 21:33:14 lasserix: lol, that's awesome, I've never tried to do that :) May 19 21:33:17 lasserix listview or recyclerview ? May 19 21:33:19 canvs2321-, sorry I started earlier today in android dev, how do I do that :) ? Link ? May 19 21:33:27 I've largely abandoned header/footer, and I just use multiple view types :| May 19 21:33:28 look up state lists May 19 21:33:39 ok thanks May 19 21:34:10 it will give you options to set drawables(shapes) for different states, pressed/focused/disabled/default etc... May 19 21:34:25 then you set the background of your button to that list May 19 21:34:36 i dont understand it, list of things are pretty much the bread & butter of so many UIs, one would think google would make those apis convenient since they are used so much ... May 19 21:34:37 lasserix: yes to setArguments and getArguments, but I see where I might have gone wrong now. thanks! May 19 21:35:20 for example, i would expect something like cwac-merge to be built-in basically May 19 21:35:27 charlie_sanders, and click handler is different that setting the background of a button May 19 21:35:29 Yeah, the addHeaderView/addFooterView thing isn't great. May 19 21:35:36 I see that you are talking about headers, im trying to create a sticky header with a recyclerview. But cant really get my head around it May 19 21:35:36 Especially with the bugs it has. ;| May 19 21:35:41 s/it has/they have/ May 19 21:35:52 brnslpy, g00s is your man May 19 21:36:21 groxx i have a listview with three adapters depending on toolbar click, and in one of those, if there are matching (text search) i need to show the header May 19 21:36:28 then and only hten May 19 21:37:14 multiple view types isn't too hard, and you can just hide / remove the header row when it's not needed May 19 21:37:17 is the header part of the data? May 19 21:37:30 if so just use the getViewType or whatever it is called May 19 21:37:44 no May 19 21:37:51 Yeah, you can just set a flag in the data source for the ListView, and then call notifyDataSetChanged and have the adapter show/hide the header as appropriate. May 19 21:37:52 if not, then just put a view about your list May 19 21:38:00 or abandon the whole "only the adapter is different" concept, and use different view containers. then you can just add a header view that exists outside the list. May 19 21:38:04 above* May 19 21:38:09 yeah May 19 21:38:15 its just that listview header is a pita May 19 21:38:18 why? May 19 21:38:38 because it's a half-baked concept that's now forever part of the standard library? May 19 21:38:43 and then i release something to the client May 19 21:38:56 and look like an idiot because (a i didn't test it enough) but b such a pita May 19 21:39:58 If you look at the code for addHeaderView, it's an absolute mess. May 19 21:40:07 Especially where it had a bug (before 4.4, I think). May 19 21:40:55 This: https://code.google.com/p/android/issues/detail?id=12870 May 19 21:42:30 Hi -- I'm having trouble writing to external storage from a java app. May 19 21:43:08 I read a file in /mnt/extSdCard/Android/data/com.mydomain.myappname then try to delete it, but deleting it fails. May 19 21:43:34 My reading of https://source.android.com/devices/storage/index.html makes it look like that's supposed to work. May 19 21:43:46 fails is very vague May 19 21:44:16 Another dumb question, I need to use ZXing QR library in my app, where do I put the jar ? Or how do I add libraries to my project using android studio May 19 21:44:50 make a folder called libs in your module May 19 21:45:15 Sorry -- I don't have detailed exception reporting in my app. I'm assuming the delete() call failed. May 19 21:45:21 in your project view, select your module should be OriginalFolderName->app(thisis the module)-> create directory May 19 21:45:28 call it libs, drag and drop your library jar into libs May 19 21:45:34 then right click on it and say "Make as library" May 19 21:45:58 thanks! May 19 21:46:04 akk then do you know if it is? May 19 21:46:34 All I know at this point that it calls delete() and the file doesn't disappear. And it worked under Android 2.3 May 19 21:46:57 so I'm assuming it's the new KitKat permissions, and the problem is how I'm naming the directory May 19 21:47:05 or some related hoop I need to jump through for KitKat. May 19 21:48:31 TacticalJoke somtimes i think android is the result of some cold war plot of rissia to mire western tech in years of shit and mediocrity May 19 21:48:37 haha May 19 21:49:08 Oh, hmm: that directory is owned by root, where the other dirs /mnt/extSdCard/Android/data are owned by a variety of generated names like u0_a49. May 19 21:49:12 akk you doing it from native side tho? May 19 21:49:17 try using a file in your app directory May 19 21:49:21 Sorry, I should have said: this is from java. May 19 21:49:23 where you dont need permissions to verify May 19 21:49:32 akk, you are only allowed to write to /sdcard and your apps folder May 19 21:49:32 What makes my jaw hit the floor is that so much code has basic programming errors. There are loads of methods that are just copy-pastes of sibling methods with slight changes, for example. May 19 21:49:57 danijoo: I am trying to use an apps folder on the external SD card. May 19 21:49:59 There'll be a 10-line method with two almost-identical 10-line methods next to it (with a tiny change in each). Are you kidding me? May 19 21:50:20 I wonder if I just need to chown it to ... something. How do I figure out the user corresponding to my app? May 19 21:50:45 probably not how to fix this problem May 19 21:50:53 what does your method look like? May 19 21:51:26 akk, run your app and look at ps May 19 21:51:35 it'll show under which user it's running May 19 21:51:38 (I know that there are cases where they do this for run-time efficiency, but the ones I'm thinking of probably don't answer to this description.) May 19 21:52:09 Mavrik: Excellent! That found it ... now I'll see if that was the problem. May 19 21:52:19 And yes, that was probably the problem :P May 19 21:52:20 TacticalJoke: underslept underpaid overfed interns? May 19 21:52:47 Nope, just standard large software project. May 19 21:52:47 Pfft, adb won't let me chown. :( May 19 21:52:48 :) May 19 21:53:10 akk, yeah, that's a root thing, even though I have no idea how you managed to create app data folder with wrong permissions :) May 19 21:53:15 probably not how to fix this problem May 19 21:53:17 large software project with people inexperienced with large software projects May 19 21:53:38 "My First big Project" May 19 21:53:39 yeah they are called interns? May 19 21:53:40 Mavrik: I had 6 Gb of data to copy to the card, so I removed it from the phone and wrote to it from a computer. May 19 21:53:49 g00s, nope, just large software project. May 19 21:54:08 akk, ah, figures, use root shell to fix it May 19 21:54:31 Mavrik: I just spent about an hour and a half googling for how to root a GS4 running 4.4.4 and came up pretty empty. :( May 19 21:54:51 Apparently the upgrade to 4.4.4 broke nearly all the rooters. May 19 21:55:00 GS4? May 19 21:55:04 galaxy s4 May 19 21:55:09 ah May 19 21:55:13 Can't help you there :/ May 19 21:55:21 kingo root? May 19 21:55:32 That needs windows, right? May 19 21:55:35 but there is #android-root May 19 21:55:38 My test SGS4 is on 5.0.1 or somethin May 19 21:55:47 I asked there but nobody seemed to be around who knew. May 19 21:55:59 akk so take it to a bestbuy or library and use theirs? May 19 21:56:11 http://blog.laptopmag.com/how-to-root-the-samsung-galaxy-s4 May 19 21:56:25 motochopper? May 19 21:57:31 That seems to be from 2013 so I'm not super optimistic; all the other exploits I found that are more than 6 months old apparently no longer work. May 19 21:57:38 ah May 19 21:57:43 borrow someones pc? May 19 21:58:04 I'm not sure I actually know anybody around here who uses windows. May 19 21:58:27 my gs4 is running 511 May 19 21:58:32 you live in a genius bar? May 19 21:58:40 Hmm, don't GS4s have unlocked bootloaders? May 19 21:58:50 akk if you ask around in #android-root im sure someone will help you May 19 21:58:54 nope May 19 21:59:07 you have to root and install cwm May 19 21:59:10 lasserix: I'll try asking again in a bit; asked maybe half an hour ago and got nothing. May 19 21:59:24 ask gdrc here he seems to want to help May 19 21:59:56 yes before going to sleep May 19 22:00:27 I can't believe how hard it is under kitkat to get an app to write to a directory on an sd card. May 19 22:00:38 I have spent the entire day on this so far without finding a solution. May 19 22:01:12 writing to sdcard is easy, it's trying to write to app protected storage of sdcard? May 19 22:01:13 there isn't any May 19 22:01:34 there's no solutions to writing to a random external secondary directory May 19 22:01:40 canvs2321-: I'd be happy if I could find *anywhere* on the SD card I could write to. May 19 22:01:55 you can write to getExternalDataDir() and getExternalCacheDir() May 19 22:02:06 and other getExternal() things if they're mapped to SD card May 19 22:02:10 bah, that's pretty simple, you kept implying /sdcard/.android/com.package.blabla May 19 22:02:22 just give permissions to app and do it May 19 22:02:42 getExternalStorage May 19 22:02:56 Mavrik is staying towards app specific, but seems you don't care May 19 22:02:57 canvs2321-, he has secondary storage, not primary May 19 22:03:18 getExternalStorage will probably mostly map to the internal flash, not SD card on those phones May 19 22:03:25 but there's nothing much you can do about it until API 21 May 19 22:03:32 ah doesn he know the differnece? May 19 22:04:04 she, btw, and I would like to keep the data on the external sd card if possible. May 19 22:04:21 But I'm not sure it would be any easier on the internal storage. May 19 22:04:29 you are saying external sd card as something physical, are you saying you have that, or just mounting your device you get sdcard? May 19 22:04:37 not sure you can w/o newer devices May 19 22:04:45 cause as mavrik has said sdcard can be internal May 19 22:05:00 canvs2321-: A micro-sd card inserted into the device, which android calls "external" and mounts at /mnt/extSdCard. May 19 22:05:07 well there is internal/external in terms of android and internal/external in terms of physical May 19 22:05:10 ah, ok May 19 22:05:38 then you have to find that physical sdcard, there are a bunch of SO about it May 19 22:05:51 *sigh* May 19 22:05:51 it gets tricky, but is doable, if that's what you want May 19 22:05:56 For the third time. May 19 22:05:58 IT IS NOT POSSIBLE. May 19 22:06:05 YOU CANNOT WRITE TO SD CARD ON KITKAT. May 19 22:06:20 Even in a directory specific to the app? May 19 22:06:20 TELL PEOPLE TO UPDATE THEIR PHONES OR THROW THEM IN THE GARBAGE IF THEY CANNOT. May 19 22:06:24 then why do kitkat devices provide it? May 19 22:06:31 If getExternalStorageDir() doesn't map there, no. May 19 22:06:49 not relying on API but recursion May 19 22:07:03 if you know your end game, you aren't stuck May 19 22:07:39 getExternalStorageDirectory() on Android 2.x mapped to the internal storage (despite the name). Has that changed in KitKat? May 19 22:07:41 akk, what you CAN do, is query the newer getExternalCacheDirs() and getExternalFilesDirs() May 19 22:07:49 some of those DO map to external card and can be written to May 19 22:07:55 Everything doesn't have to be stuck to libraries and stuff other people make for you. if there is a will there is a way May 19 22:07:57 if, of course, Samsung mapped them. May 19 22:08:11 Yeah, I was going to try that but it will unfortunately require my redesigning my build environment, so I haven't tried it yet. May 19 22:08:25 (because of where I have SDKs of various versions installed, it's a mess) May 19 22:08:29 akk what are you making if you aren't nda'd? May 19 22:09:01 lasserix: This is an RSS feed reader that I've been using for years, but on KitKat it can't delete feeds after I've read them. May 19 22:09:22 lasserix: It reads the feeds just fine in /mnt/extSdCard/wherever, just can't delete them. May 19 22:09:47 then msg that dev, is this not your app? May 19 22:10:01 akk can you write there? May 19 22:10:03 That's why I didn't think getExternalFilesDirs() necessarily mattered; I'm reading the directory just fine. May 19 22:10:08 lasserix: No, that's the problem. May 19 22:10:12 and reads feeds should be more of live stuff, sdcard should be stored May 19 22:10:34 canvs2321-: This is my app, and I didn't understand your second line. May 19 22:10:47 http://stackoverflow.com/questions/27330884/android-4-4-2-not-deleting-files May 19 22:10:59 the RSS Feeds are fed directly to your external sd storage? May 19 22:11:00 as of 4.4 you can't delete other apps external files May 19 22:12:13 akk is this just for yourself or are you planning onr eleasing this app? May 19 22:12:28 This is just for myself. It's open source but only one or two people besides myself use it. May 19 22:12:43 you can http://technofaq.org/posts/2014/04/fixing-external-sd-card-write-issue-on-android-kitkat/ May 19 22:12:49 Method 1 May 19 22:13:00 oh but you need root sorry May 19 22:13:19 if this is your app, and your data reaches an external sd location, then you have the power to remove it. But seems you are just jumping on code you have no clue about May 19 22:13:28 ay May 19 22:14:11 i'll drop the mic here, and leave :) May 19 22:14:25 canvs2321-: You can insult me all you want but I'm still not clear what you're trying to say. May 19 22:14:38 akk lets see your code May 19 22:15:33 lasserix: It's unfortunately kinda long; there's a tarball at http://shallowsky.com/software/FeedViewer/ May 19 22:15:40 huh, i never heard of resValue until now May 19 22:15:51 unfortunately I don't have it in github because I never succeeded in getting eclipse to work with version-controlled files May 19 22:16:02 well do it from the command line May 19 22:16:09 though I'm hoping to get it building under gradle at some point. May 19 22:16:09 dont use the wonky editor plugins May 19 22:16:16 ahh thats what he means May 19 22:16:23 you are trying to refit an existing code base May 19 22:16:38 can you show the code that actually deletes the file? May 19 22:17:15 lolwut http://vickychijwani.me/java-8-method-references/ May 19 22:17:32 how can i tell what the latest support version / gradle version is so i can update my builds and ? May 19 22:17:35 lasserix: It's in maybeDelete(), around line 750 or so. May 19 22:18:12 is there something of the likes of Editable for spinners? May 19 22:18:40 well you should look at your logcat or whatever May 19 22:18:44 its going to say tehres some problem May 19 22:19:05 g00s, man it really pisses me off when people talk about stuff they don't get May 19 22:19:06 :) May 19 22:19:14 he's not talking about Java 8 May 19 22:19:36 He's talking about a hacky library which hacks his bytecode from Java 8 source to Java 6 bytecode and then kicks him the nuts. May 19 22:19:37 Mavrik so in Java8, is this true or not : obj::method != obj::method May 19 22:19:46 g00s, he doesn't have Java 8 May 19 22:19:49 he has retrolambda May 19 22:19:56 hehe May 19 22:20:04 which hacks Java 8 bytecode to insert anonymous classes where lambdas / references should be May 19 22:20:06 TIL there is a guy called Vicky. May 19 22:20:16 which of course then makes that a problem May 19 22:20:22 because new anonymous object is created every time May 19 22:23:29 so a row with like | title [d]| where [d] is drag handle, is having like | X | title..| sufficient to show that swipe is removal? May 19 22:23:37 Generally speaking, is there any harm in using the same LayoutParams object for multiple views? (It seems to work, and I can't see any potential problems in View.java, but who knows.) May 19 22:23:39 maybe i should go into #java and ask them :P May 19 22:23:40 and to undo should i leave it as a row with a snackbar to undo? May 19 22:23:48 lol g00s May 19 22:23:51 g00s, and yes, in Java 8 it's true May 19 22:23:55 TacticalJoke: ive had problems if you change anything May 19 22:23:57 but not in Java 6 with retrolambda :P May 19 22:24:02 lasserix: Yah. I was just testing that. May 19 22:24:16 In my case, nothing needs to change, so I'm assuming I'm safe. May 19 22:24:24 (Doing this to avoid unnecessary allocations in a ListView, basically.) May 19 22:24:42 Mavrik so in oracle java 8, you are saying obj::method != obj::method May 19 22:25:29 that seems implicit with retrolambda? it's just how it works. May 19 22:25:30 g00s, no. May 19 22:25:36 g00s, aren't you reading? May 19 22:25:55 in java 8 obj::method == obj::method May 19 22:26:05 in code mangled by retrolambda, it isn't May 19 22:26:13 ok May 19 22:26:39 when i read this https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html May 19 22:26:41 That article is strange. May 19 22:26:54 "they are compact, easy-to-read lambda expressions for methods that already have a name." May 19 22:27:09 i'm readinf a method reference is a lambda then May 19 22:27:10 Surely he knows that Retrolambda isn't part of Java 8. May 19 22:27:37 oh well, i'll owrry about it when there is java 8 :D May 19 22:29:31 Later, that article states "you can use a method reference instead of a lambda expression". May 19 22:29:42 Yeah, stuff like this is why we haven't adopted Retrolambda on the bigger commercial projects yet. May 19 22:29:43 Ha! Just found the solution: rebooting. May 19 22:29:51 And also "The method reference Person::compareByAge is semantically the same as the lambda expression (a, b) -> Person.compareByAge(a, b)". May 19 22:29:58 Can someone help me? I am trying to load an image dynamically into an ImageView inside a CardView inside a RecycleView. How can i do that? my CardViewAdapter is like that: http://pastebin.com/eZuK4A7F May 19 22:29:58 Debugging implementation bugs is painful :/ May 19 22:30:07 It occurred to me that the fat filesystem on that SD card didn't have any file ownership built in, May 19 22:30:23 so the root ownership must have been something KitKat was generating. May 19 22:30:26 I don't think a method reference could qualify as a lambda expression. May 19 22:30:39 akk, ahh, yeah, that makes sense. May 19 22:30:40 And if I rebooted, it might make the ownership right based on the directory name. May 19 22:30:43 the problem is, i can't get the necessary data to load the image in the CardViewHolder, and on the onBindViewHolder i can't access the View May 19 22:30:48 I think, by usual definitions, all lambda expressions are anonymous/unnamed/whatever. May 19 22:30:50 Which apparently it did. *whew* May 19 22:30:53 TacticalJoke, IIRC even on J8 JVM, the method references are just lambdas May 19 22:31:14 styler2go: well line 45 is kinda f-cked May 19 22:31:19 use the same bytecode op May 19 22:31:22 you inflate a view item then return a new one May 19 22:31:31 oh nm May 19 22:31:41 So I still have the problem of getting the feeds into that directory, but at least the viewer can delete them after reading. May 19 22:31:45 styler2go: another problem: the viewholder will be used for multiple positions, as you scroll. you may be writing position 5's image into position 23, while 23 is loading.. May 19 22:32:14 so how could i possibly do that? May 19 22:32:15 styler2go: also putting your lazy holder in new is wrong, you want it in bind May 19 22:32:34 then when you bind, cancel any pending UI callbacks (still route it to your cache) May 19 22:32:46 and start another task to retreive (check cache, if null then source it) May 19 22:32:53 styler2go: generally, I'd say "just find views in the constructor" + have a method to start loading, which you call in onBindViewHolder, and when you call it, also cancel the old one. May 19 22:32:58 lasserix: chache what? May 19 22:33:08 the bitmap or whatever returns from your async task May 19 22:33:14 because for instance, if they start scrolling May 19 22:33:16 i have that function already May 19 22:33:20 you will have a hundred instances fire off May 19 22:33:25 see line 66 May 19 22:33:26 yeah so in bindview cancel any task May 19 22:33:28 start a new one May 19 22:33:29 styler2go: alternatively, some libraries like Picasso will do that "view is getting reused" logic for you, and Picasso also has an in-memory cache so the next time you view it will be quick. May 19 22:33:32 it loads from chache May 19 22:33:33 not in create May 19 22:33:54 groxx: think it comes out to the same if you just cache it May 19 22:34:01 it does, yeah May 19 22:34:03 largely May 19 22:34:09 so where should i load the images lasserix? May 19 22:34:12 instead of putting the view into the loader just but the loader into the view and swap the target May 19 22:34:12 if not in the create? May 19 22:34:15 bind May 19 22:34:24 you cancel any pending, and call load May 19 22:34:26 in onBind, not onCreate. if you have 100 views but only 5 visible at a time, you'll only get onCreate called 5x. May 19 22:34:42 which is why your data isn't showing up May 19 22:34:43 how do I stop the adb log from scrolling ? I need to freeze it in place May 19 22:34:50 muahahahahaha May 19 22:34:52 impossible! May 19 22:34:53 charlie_sanders: click in it, then scroll up May 19 22:34:54 in android studio i mean May 19 22:35:00 charlie_sanders: don't even try May 19 22:35:03 i dont undertsnad what you mean, i am sorry May 19 22:35:04 it'll just make you cry May 19 22:35:09 its like herding cats charlie_sanders May 19 22:35:12 styler2go: you have a lazy load task right? May 19 22:35:14 Yeah, in AS you can just click someone other than the last line and it'll pause. May 19 22:35:14 lol cats :) May 19 22:35:15 sadness :( May 19 22:35:26 lazy load task? o.o May 19 22:35:33 Or you can click the Scroll buton. May 19 22:35:34 lazy cat task loading May 19 22:35:35 button* May 19 22:35:54 what is this? May 19 22:35:58 is there a way to let lint force remove all checks? May 19 22:37:11 Does anyone know, i have like 1000 checks with lint, is there some way i can just "confirm all" ? May 19 22:37:36 ooooh i think i got it May 19 22:38:13 lasserix: You want to remove all lint warnings/errors in AS? May 19 22:41:42 has anyone used zxing in their android project ? May 19 22:41:50 no i want them to automatically fix May 19 22:41:57 since there are a few thousand May 19 22:43:12 lasserix: analyze -> code cleanup, maybe? May 19 22:43:52 charlie_sanders: If you're doing a survey: I think so -- someone was talking about it in here the other day. :) May 19 22:43:56 this looks so much better than monkeyrunner http://www.gizmag.com/yirego-drumi-foot-powered-washer/37586/ May 19 22:44:11 inser phone, stomp ! May 19 22:44:21 TacticalJoke, I'm trying to get it working, seems insanely difficult May 19 22:44:33 JesusFreke when i do analyze, i get like 3500 items :D May 19 22:44:38 lasserix: i changed my create to this: http://pastebin.com/nS2CbREP now it won't break down, but it also still has no values in my fields (details) May 19 22:44:58 styler2go: May 19 22:45:06 not not _NOT_ not not not not not not not not May 19 22:45:08 not not not not May 19 22:45:09 in createview May 19 22:45:12 in bind view May 19 22:45:14 BIND VIEW May 19 22:45:18 line 11 May 19 22:45:20 in BIND VIEW May 19 22:45:21 but.. i can't get access to the view in there? May 19 22:45:23 so you're saying I should do it in create view, right? May 19 22:45:26 :p May 19 22:45:57 what is the first arguement of onBindViewHolder? May 19 22:46:30 lasserix: there is a right-click-on-inspection-category -> "fix" May 19 22:46:43 i suggest you adding the task as a tag in one of the views May 19 22:46:43 not sure how many have that, but e.g. the "x could be final" one does. May 19 22:46:49 or just add it to your cardviewholder May 19 22:46:51 public void onBindViewHolder(CardViewHolder cardView, int i) { May 19 22:46:56 and see if it is null, if it is not null May 19 22:46:58 cancel it May 19 22:47:03 and set it to null May 19 22:47:07 then start a new task May 19 22:47:14 styler2go: well there you go! May 19 22:47:24 its right there! the first arguement of the method! May 19 22:47:34 how can i get the view out of it? May 19 22:47:41 I'm gonna change all my ListView layout stuff from XML to Java. I love XML for activity layouts and stuff, but it just seems so wasteful and pointless for ListView children. May 19 22:47:55 i only have some very limited functions May 19 22:48:16 styler2go: what are you talking about? May 19 22:48:21 styler2go: plus anything you can build. you can save the view that gets passed to the viewholder. you can get holder.image to get the imageview. anything. May 19 22:48:29 usually i can do something like findViewById May 19 22:48:36 you already did it May 19 22:48:41 in the constructor you fool May 19 22:48:53 but hwo do i get access to the view in the onBind then? May 19 22:49:03 I also like the idea of getting rid of awful stuff such as this: titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, array.getDimensionPixelSize(R.styleable.PostSummaryView_titleTextSize, 0)); May 19 22:49:07 its the first f-cking parameter! May 19 22:49:11 i can't get the imageView in there! May 19 22:49:16 how should i? May 19 22:49:17 you idiot May 19 22:49:25 change your protected May 19 22:49:30 to package private May 19 22:49:32 and voila May 19 22:49:40 cardViewHolder.vImage May 19 22:49:43 its right there May 19 22:50:11 sorry you maybe you are ripping off someone else's code or something and i had way to much caffiene eearlier May 19 22:50:34 but you seriousily are frustrating if you think that cardView.vImage is somehow available May 19 22:50:48 and as i said, you probably want to add a reference to the task in your cardviewholder May 19 22:50:56 i think i just oversee so much stuff now becaus ei am workign on this for a logn time now May 19 22:51:51 So, my app is crashing when I try to show a custom dialog from an AppCompatActivity. Just calling, newItemDialog.show(getSupportFragmentManager(), "new_item") and I get an exception stating newFeature must be called before adding content May 19 22:52:55 styler2go: where do you get id from? May 19 22:53:04 TacticalJoke: how does moving from xml to java get rid of style attributes in code? May 19 22:53:15 styler2go: something like this http://pastebin.com/NQMr5YTW May 19 22:53:18 it's still saying it's null.. now it seems like it doesnt veen get the params i am sending it :'( May 19 22:53:20 you want to remvoe that anoynmous callback May 19 22:53:29 and a callback that you pass to the async task May 19 22:53:30 groxx: I'd avoid them entirely. I'd just put the attribute values in my custom View[Group] code. May 19 22:53:42 Then I get a nice, self-contained View. :) May 19 22:53:50 my task is already async, lasserix :o May 19 22:54:03 Well, not the values, but a reference to them (e.g., `R.dimen.foo_text_size`). May 19 22:54:24 which in onPostExecute, if (!isCancelled()) callback.onFinished(Bitmap b, id); } May 19 22:54:28 TacticalJoke: so, basically, a `style="the_style"` in a constructor. May 19 22:54:59 since otherwise I would think `android:textSize="@dimen/titleTextSize"` is simpler May 19 22:55:08 styler2go: you dont get it May 19 22:55:15 ah, wait, that's a custom styleable. May 19 22:55:57 oooh. i think I get it now. the goal is to get rid of TypedArray use? May 19 22:56:01 Yeah, it's `custom:titleTextSize="@dimen/whatever"`. May 19 22:56:01 Right. May 19 22:56:10 And the attrs. May 19 22:56:15 lasserix: yeah, seems like it.. May 19 22:56:25 TacticalJoke: yeah. tbh, outside of a library project, they seem massively over-complicated May 19 22:56:35 TacticalJoke what kind of crazy did you cook up May 19 22:56:35 for reusable libraries they make perfect sense. May 19 22:56:38 Yeah, I kinda hate using custom attrs. May 19 22:56:45 g00s: lol May 19 22:56:48 TacticalJoke blog post ! May 19 22:56:48 It's fairly simple, but it's annoying. May 19 22:57:14 I often think that. We (who do Android stuff every day) should keep blogs about the crazy adventures we go on. May 19 22:57:35 what if... we could make an annotation processor that generates TypedArray parsing code for you, and gives you `ary.textSize.toDp()` ? May 19 22:57:37 TacticalJoke it would be great if they were in some great big wiki, that could get upvoted and semantic markup May 19 22:57:53 "Today, I had an exception every time I tried to show a dialog. Not sure if it actually happened or if it was an adverse effect of the acid I dropped before doing my Android programming today." May 19 22:58:06 or maybe not _annotation_, but I forget what options you have in javac for generating code outside of those. May 19 22:58:06 groxx: That'd be cool. May 19 23:00:32 hi May 19 23:00:55 Actually, now that I think about it, my point wasn't that great: I'd still have to use `context.getResources().getDimensionPixelSize(R.id.whatever)` (instead of `array.getDimensionPixelSize(R.styleable.ViewName_whatever)`). May 19 23:01:02 if dropping acid java is definatly not the language you want to be using May 19 23:01:13 bad trip ? May 19 23:01:15 especially if you use rainbowdrops May 19 23:01:22 But at least I'd avoid `try..finally { array.recycle(); }`, so I've got that going for me. May 19 23:01:31 lasserix: Imagine C++. ;o May 19 23:01:39 might not be so bad May 19 23:01:47 you could internalize the syntax as glyphs May 19 23:01:48 Anyone in here aroun the L.A. area? curious about meetups May 19 23:02:04 java is just way too much boilerplate and verbose for it to be a fluid organic expirence May 19 23:02:15 2nded May 19 23:03:06 I hate Java's verbosity, but I like its simplicity. I think it's better than the criticism it gets. May 19 23:03:19 C++, on the other hand, is a language which is not criticised anywhere near enough, if you ask me. :D May 19 23:03:35 C++ deserves to be burned at the stakes for the misery it has visited upon programmers. May 19 23:03:58 And I believe the opposite :) May 19 23:04:21 i don't get this-,- May 19 23:04:25 guys, in AS when I type Observable.me ... I get a popup window with all the possible suggestions. I can move a cursor around to select one, but then nothing happens. In eclipse, it would create the skeleton based on that selection. what am i missing ? May 19 23:04:42 I think they just haven't implemented that in IntelliJ. May 19 23:04:48 I've tried, googled, etc. May 19 23:05:12 g00s you have to wait until you get the { ... May 19 23:05:20 which means you are typing the wrong prefix May 19 23:05:41 no i am typing the right prefix, the options are shown in the popup. May 19 23:05:44 So, my app is crashing when I try to show a custom dialog from an AppCompatActivity. Just calling, newItemDialog.show(getSupportFragmentManager(), "new_item") and I get an exception stating newFeature must be called before adding content May 19 23:05:50 take a screenshot? May 19 23:05:54 and i can cursor around, and press enter on one but then nothing happens May 19 23:06:09 this only fails for rx stuff? May 19 23:06:59 lasserix: It's a feature Eclipse has but not IntelliJ. May 19 23:07:02 It's a really cool feature, in fact. May 19 23:07:07 Saves typing. May 19 23:07:11 +1 eclipse May 19 23:07:25 TacticalJoke: Java is simple but not easy :) May 19 23:07:33 Eclipse alumni represent! May 19 23:07:44 I’m still in the Eclipse school professionally May 19 23:08:04 :( :) :( :) May 19 23:08:09 lasserix http://i.imgur.com/L3jb5r1.png May 19 23:08:11 it’s Aladeen May 19 23:08:12 You need to graduate to AS. May 19 23:08:28 need to take a day at work to really learn AS May 19 23:08:34 no time for that now :/ May 19 23:08:36 MikeWallaceDev: before I again forget the thing! Spannable presentation: haveth thou a recording? May 19 23:08:46 I waseth wondering about that, too. May 19 23:08:46 g00s: well I just type in brackets of merge() new Ob..... and press enter May 19 23:08:52 g00s: lol May 19 23:08:52 so tryign to do it with freelance.. but it’s just making those projects take longer :/ May 19 23:08:58 I waseth wondering about that, too... May 19 23:09:08 I saw JW's and JW's talk. Was great. May 19 23:09:21 MikeWallaceDev: I tried to find one yesterday, failed miserably. but that could be because the mobile sites were craptastic. May 19 23:09:22 I've only seen one video come out so far.. The keynote May 19 23:09:33 There really isn’t that much to learn when it comes to AS May 19 23:09:49 groxx what are you lolling about :D May 19 23:09:49 Plot twist: the talk never happened. May 19 23:09:59 :D May 19 23:10:09 icedp there is no 'new' however May 19 23:10:13 Extra twist: MikeWallaceDev doesn't exist. May 19 23:10:16 You're actually all in my Matrix. There is no talk. May 19 23:10:18 g00s: the huge number of identical-except-for-number-of-arguments-/-types options May 19 23:10:24 icedp its a fluent interface May 19 23:10:32 when writing a sqlite create table statement in android how do i make a column accept null value? May 19 23:10:46 don't say not null :) May 19 23:11:05 ResidentBiscuit: I'm not finding anything in Google and, to be honest, I'm too lazy to try it. Can you post your entire Activity? May 19 23:11:32 hert: accept null is default, except to primary key May 19 23:11:34 g00s: seems to imply they might be missing a more usable option. unless it's just not possible in java, because e.g. they'd need to accept `Observable... tN` where each entry's type becomes some part of the next entry's type. (I think you can't specify that?) May 19 23:11:55 eclipse lets you do that May 19 23:12:04 hert: if you don’t want null, you mark it as “NOT NULL” May 19 23:12:05 g00s's screenshot reminds me of what happens when I press Ctrl+P if I'm using AssertJ. May 19 23:12:08 the cursor jumpts to each type parameter, like you are filling out a form May 19 23:12:10 i say that but no change, clean the project recent deleted from device but sill getting same error about not null constraint fail May 19 23:12:36 Yeah, you can Tab through them. May 19 23:12:38 man i miss eclipse :( May 19 23:13:06 I mean like ` method(O ab, O bc, O cd, etc)` -> ` method(O... o)` May 19 23:13:45 s3v3r, of course there is. I have to learn a new IDE. Things aren’t where I expect them! May 19 23:14:00 even if it just put the stuff there with ??? and let me change it, that would be an improvement May 19 23:14:24 lots of times it’s like: ok how do I do “xyz” -> Google for 30 mins.. “ Damn I could have done this before" May 19 23:14:27 in eclipse May 19 23:16:15 I prefer AS to Eclipse for Android, though. May 19 23:16:41 only tangentially android related, but: does anyone know of a reasonable way to build an LRU cache inside sqlite? I'm hoping there's something nicer than "when you get a row, manually increment a count-column for that row" May 19 23:16:50 I just wish AS would get better Alt+Enter stuff (like Eclipse's Ctrl+1), this "insert method parameter names" thing, real incremental building with Gradle, tool windows with consistently place Close buttons, etc. May 19 23:16:58 placed* May 19 23:17:23 I just want the Android tab-thing to stop forcing itself into view just because I hit "run" :| May 19 23:17:29 Also, if Gradle could stop being slow, that'd be cool. May 19 23:18:06 groxx: Run > Edit Configurations > app > LogCat > Show logcat automatically. May 19 23:18:54 TacticalJoke: already unchecked. still pops up every time May 19 23:18:58 move it May 19 23:18:59 pin it May 19 23:19:01 dock it May 19 23:19:23 or, well, the run thing pops up too. and other things, seemingly randomly, when I'm trying to _read code_ or _write code_. May 19 23:19:32 yeah May 19 23:19:37 TacticalJoke: I'm not really sure what's going on, https://gist.github.com/ResidentBiscuit/b1b0916c8fc0a819b0fb May 19 23:20:33 is that eeyore ? http://digg.com/video/river-of-helpful-sheep-are-happy-to-trim-your-hedges May 19 23:20:40 lasserix: that sequence needs to end with "work it" May 19 23:20:44 groxx: Oh, sorry, you're right. Forgot that the Run tool window still shows. ;| May 19 23:21:39 watch closely at 0:35 May 19 23:22:00 JesusFreke aren't you supposed to be in there somewhere ... May 19 23:22:52 herding on unicycle :) May 19 23:23:10 ResidentBiscuit: And the error goes away if you remove that DialogFragment.show call? May 19 23:24:42 does android studio create a .apk file ? May 19 23:25:08 charlie_sanders: when you run the appropriate command, yeah. if you've actually told it to "run", you'll have one in app/build/outputs/apk May 19 23:25:33 groxx, ahha thank you May 19 23:27:38 g00s: This is the kinda thing: https://youtrack.jetbrains.com/issue/WI-18621 May 19 23:27:40 Though that's PHPStorm. May 19 23:27:48 PhpStorm* May 19 23:28:34 And here's a video of Eclipse doing this: https://youtrack.jetbrains.com/_persistent/TabInEclipse.mp4?file=74-181623&v=0&c=true May 19 23:28:37 Oh, man, I miss that. :D May 19 23:29:47 TacticalJoke i thought something like IntelliJ would have that, being the best IDE on the planet May 19 23:29:53 just assumed i was doing it wrong May 19 23:30:02 <_genuser_> stupid verizon nameservers. May 19 23:30:02 Here's the Java one: https://youtrack.jetbrains.com/issue/IDEA-128690 May 19 23:30:38 shit :( May 19 23:30:43 may as well use vim May 19 23:30:46 Oops, this: https://youtrack.jetbrains.com/issue/IDEABKL-5496 May 19 23:30:58 <_genuser_> g00s: vim? you abandoning AS? May 19 23:31:29 Reported in 2008. May 19 23:31:36 TacticalJoke did you read the comments? they are basically saying its not a good idea, make a plugin lol May 19 23:31:42 that plugin is called eclipse :D May 19 23:31:45 Yeah. lol May 19 23:31:54 They don't know what they're missing! May 19 23:32:14 Pressing Ctrl+P over and over is tedious. May 19 23:34:53 <_genuser_> man, I'm rasslin with bootstrap to put together a simple UI for my app. May 19 23:35:32 What is bootstrap? May 19 23:36:48 <_genuser_> it's a UI framework by twitter. help you put together a decent UI quite fast. May 19 23:37:01 <_genuser_> the UI is on par with all the "shmancy" websites you see out there today. May 19 23:37:13 Ah. May 19 23:38:09 <_genuser_> basically, I know html/css. I'm comfortable sitting there and using documentation to have a html5/css2/3 website but hooking up all teh css myself would take forever. And the color matching, argh. May 19 23:38:27 <_genuser_> with bootstrap, you just use the existing css classes. And if you want change, just get a different theme. May 19 23:38:31 _genuser_: why use a webview for your app? May 19 23:39:37 <_genuser_> surf2b1: it's going to be a proper web interface. May 19 23:40:03 man, that lady that killed that google exec http://bigstory.ap.org/article/a53f4de452b24025af09deb46a910240/prostitute-pleads-guilty-overdose-death-google-exec May 19 23:40:19 <_genuser_> surf2b1: sused from the desktop. not something stuck in a webview on an activity. May 19 23:40:20 wouldn't let that person anywhere near me May 19 23:40:48 <_genuser_> wait, prostitute kills a customer? how is he going to come back? Or refer others? May 19 23:42:04 <_genuser_> g00s: oh she looks disturbed May 19 23:42:14 should have been in mad max May 19 23:52:22 http://www.fiercedeveloper.com/story/ab-testing-google-play-some-thoughts-big-rumor-swirling-around-io-2015/2015-05-19 May 19 23:53:08 I'd like to see alpha/beta testing on there. May 19 23:54:35 without neededing google+ or groups ... May 19 23:54:52 Or maybe that's the other A/B testing. May 19 23:55:30 only new A/B testing I've seen mentioned / rumored is experimenting on the store pages themselves, e.g. swapping descriptions, screenshots, etc May 19 23:57:28 hey all... super new to any dev stuff, was wondering how I use something that sends to javascript and use that in other parts of my app via android studio.. May 19 23:57:35 namely http://nexusosc.com/api/#nexusui-api this api May 19 23:57:48 so i can easily set that to "send to js" May 19 23:58:25 i guess mainly where does "js" go? and how could I use it to control functions in a library May 19 23:58:55 RevertToType: http://developer.android.com/guide/webapps/webview.html there's a "using javascript" section, for both sending commands to and receiving from a webview May 19 23:59:13 Mavrik: Thanks for pointing me in the right direction on the SurfaceView/OpenGL stuff. Managed to get a bitmap generated from the GL10 object May 19 23:59:18 sweet Im using webview already.. I just didn't know how to get it "out" May 20 00:09:39 RevertToType what are you doing? May 20 00:09:46 I was just working with WebView and JS injection May 20 00:10:38 i'm using that javascript library to ideally control a puredata patch via libpd for android ... May 20 00:11:19 you know JS? May 20 00:11:24 g00s, is this ab testing tool for google play true? May 20 00:11:26 you can create a JS interface in your Android code May 20 00:11:30 i can fake it May 20 00:11:35 hahaha good enough May 20 00:11:37 :V May 20 00:11:47 I have a link for you.. sec May 20 00:11:58 https://docs.google.com/presentation/d/1SDUIMYhOU79pVYrSgd0dXZ0pkqZjyhBXe7jeFmyuk80/edit#slide=id.g97a4117c_05 May 20 00:11:59 tadaaaaa May 20 00:12:11 slides 5, 6, and 7 May 20 00:12:24 maybe 8 too May 20 00:12:58 Using a JavaScript library in an Android app? May 20 00:13:06 I don;t see why not.. May 20 00:13:19 you would just create js files and inject those May 20 00:13:26 into a webview May 20 00:13:45 exactly... that nexusosc just looks REALLY clean for ui stuff May 20 00:13:47 hi May 20 00:13:59 and i'm kinda in love with it cause i can fix/change the ui really easy May 20 00:14:00 havn’t played with it at all May 20 00:14:05 but that sounds nice May 20 00:14:10 “musical instruments” May 20 00:14:15 are you doing synth design by any chance? May 20 00:14:21 hi pippijin May 20 00:14:22 it's just now figuring out how to get "this knob is turning" to get into android and whatnot May 20 00:14:26 tricknology: yeah... May 20 00:14:30 cool May 20 00:14:35 android create project --target android-22 --path hello --package com.hello.world --activity HelloActivity --gradle --gradle-version 1.1.1 May 20 00:14:37 I know a guy from here who is also doing synth design May 20 00:14:40 is this correct? May 20 00:14:50 I would like to get into it but I don’t have time May 20 00:14:50 trying to kinda consolidate my 3 programs doing one into -> mobile apps/whatnot cause why not May 20 00:14:56 if I do this, and then do ./gradlew, I get > Could not create plugin of type 'AppPlugin'. May 20 00:14:58 Using JavaScript via a WebView in an Android app just makes me sadpanda. May 20 00:15:05 synths are easy... you just gotta remember it's all voltages/maths May 20 00:15:16 cool. May 20 00:15:20 ping me if you have any questions May 20 00:15:22 sine wave + maths = theremin sounds May 20 00:15:26 cool thank you much! May 20 00:15:34 so how similar is android development to programming in a corperate enviorment if at all? anyone know? May 20 00:15:54 DadFoundMy, depends on the job really May 20 00:16:02 some places are chill AF May 20 00:16:09 some make you take a day off if you’re late May 20 00:16:17 some alow you to work remotely May 20 00:16:33 project sharing becomes a thing.. git/svn May 20 00:16:50 i don’t see why it would be any different, if you’re doing android development for a corporate environment May 20 00:17:17 androdi development == programming ? May 20 00:17:59 isn't it really compartmentalized too? May 20 00:18:05 like someone's doing all the UI stuffs May 20 00:18:11 heh not here… May 20 00:18:13 but generally yes May 20 00:18:26 some places have 20 android devs May 20 00:18:30 seemed to be the nonsense at my last gig despite me not being a dev.. i was the hardware chimp May 20 00:18:30 idk i guess im picturing stereotypical corperate development as just completely specifications over specifications. not including andorid dev btw May 20 00:18:35 working on 1 app.. some do UI, some do libs May 20 00:18:59 is "android create project" broken? May 20 00:19:38 i keep second guessing myself on wether i want to go to school for computer science :/ I like android dev but dont think i would be able to keep myself sane doing ti my entire life May 20 00:19:49 DadFoundMy: What are the other choices? May 20 00:19:51 and im not sure if i would like stereotypical corperate development May 20 00:20:17 DadFoundMy: up to you, but forget the stereotypical environment May 20 00:20:24 that’s what kept me from pursuing CS or SE May 20 00:20:26 TacticalJoke: im not really sure. Pre-law, IT, maybe not go at all May 20 00:20:30 instead i did Chemical Engineering May 20 00:20:47 as soon as I graduated I got a job as an Android Dev May 20 00:21:00 Kinda wishing I went for CS May 20 00:21:24 but if you could get that job without it why get a cs degree? May 20 00:21:33 because it would make my job easier May 20 00:21:34 i dont think android dev is that involved that you need a cs degree May 20 00:21:38 no no May 20 00:21:43 but there are little things here and there May 20 00:21:46 i guess once you get farther in May 20 00:21:57 like stuff I should have learned in assembly takes time for me to look up May 20 00:22:02 like the concept of “endianness” killed me May 20 00:22:27 good thing i live in america where i have to decide this now, and if i choose wrong i will have wasted 200k :/ May 20 00:22:30 so stressful May 20 00:22:41 and I kind of move around.. liek right now I’m not even doing Android, I’m writing Python and PHP May 20 00:22:58 jesus what school? May 20 00:23:16 most american schools these days including room and board May 20 00:23:16 lots of private ones hit that for a full degree May 20 00:23:24 even state schools May 20 00:23:29 full _bachelors_, I should clarify May 20 00:24:07 The cheapest school on my list right now is Ohio State which is still like 30k+ a year without extra expenses May 20 00:24:08 oh yeah I forgot about housing May 20 00:24:13 and thats with scholarship money May 20 00:24:39 even better when you waste cash on a humanities degree :/ May 20 00:24:50 * RevertToType weeps May 20 00:24:51 RevertToType: ouch was that you? May 20 00:24:53 my school was mostly free (scholarships and grants) I only took loans for housing and living expenses May 20 00:25:03 tricknology: where? May 20 00:25:04 Sorry :( May 20 00:25:14 a University of California campus May 20 00:25:21 which uc? May 20 00:25:32 im at csuci myself May 20 00:25:36 Riverside May 20 00:25:52 oh nice, familiar with Mt San Jacinto college? May 20 00:25:58 heard of it, not familiar May 20 00:26:11 before i said it's a shame i dont live in america. I lied, its a shame i live in america and not california haha May 20 00:26:14 but I spent some time in SB, so I’m familiar with CSUCI May 20 00:26:31 pretty impossible to get into UC schools out of state, and even if you do you dont really get the benifits of being in state May 20 00:26:32 well.. I also went to school rather late May 20 00:26:37 after 24 you get all sorts of perks May 20 00:26:47 like what tricknology ? May 20 00:26:59 still going to a UC school as a cali resisdent vs going to a new jersey state school is insane May 20 00:27:06 transfer to a CC first, 1 year and 1 day and you get CA residency May 20 00:27:15 cali is top class education and can be basiclly free at the right place May 20 00:27:32 tricknology: not a bad plan May 20 00:27:37 quick android question: can someone point me in a direction that lets me create a service with an app May 20 00:27:47 IMO california CC's are top notch May 20 00:27:49 wagonboi: I got a grant for continuing education, a cal-grant, UCR grant May 20 00:27:58 similar to the email app i suppose: you can still receive emails when the app is closed May 20 00:28:00 some fellowships for reserch May 20 00:28:06 but the service somehow interacts with the app? May 20 00:28:19 my host father in china went to cc in california. he is insanely wealthy in china now so must be pretty good haha May 20 00:28:19 I gotta run guys, meeting May 20 00:28:22 might be back on later May 20 00:28:27 see ya tricknology May 20 00:28:28 tricknology: seeya May 20 00:29:50 i've taken a look at http://developer.android.com/reference/android/app/Service.html but this doesn't mention anything about an app or layouts May 20 00:30:28 that’s because services have nothing to do with layouts May 20 00:30:43 i've noticed May 20 00:31:01 i just wanna have a service that interacts with my app May 20 00:31:58 intent May 20 00:32:01 laterrrrr May 20 00:32:03 so like when you open the app - the service is started and sends info to the app May 20 00:32:49 am i also correct in assuming that the app can interact with the service too? May 20 00:36:22 * RevertToType drools on herself staring at android studio May 20 00:36:37 massive respect to all of you folks who have a clue May 20 00:39:00 CedricBeust rxjava question; i am "merging" 2 observables: (1) PublishSubject that never completes and (2) another PublishSubject which are parser errors. I'd like the result to be the first of whichever emits first. Now #2 is emitting T2s which represent errors, not onErrors itself. So would you map those to Notification ? May 20 00:39:49 the result of the merge should have normal rxjava semantics; either a result or onError May 20 00:39:50 g00s: combineLatest? May 20 00:40:04 CedricBeust combineLatest requires both things to have emitted May 20 00:40:43 so if there are no emissions from #2, because there are no parser errors, the combineLatest(1,2) would be empty May 20 00:41:58 i guess the main thing is that i'm wrapping a legacy API with callbacks for results, and one for errors May 20 00:42:24 so i have to get those errors into the observables May 20 00:42:35 not sure if i should manually create Notifications myself May 20 00:42:38 http://developer.android.com/guide/components/bound-services.html just a quick question about this tutorial - how does the service send messages to the app? May 20 00:46:42 g00s: maybe fix it by startWith ? May 20 00:50:00 i guess i have to just map these error codes to onErrors May 20 00:51:43 oh look, there is Observable.error(throwable) May 20 00:51:47 \o/ May 20 00:51:48 without using merge at all then May 20 00:52:23 * g00s looks at startWith May 20 00:53:53 man, the rxjava javadoc for Observable causes Chrome to eat up hundreds of megs May 20 00:59:23 which would be impressive, except that Chrome eats up hundreds of megs doing nothing May 20 01:01:32 groxx lol May 20 01:01:48 i'm excited for ff with e10 May 20 01:01:59 and .. somewhat worried it will turn into chrome May 20 01:02:17 but ... hopefully it efficient + they get noscript working May 20 01:02:18 g00s: Right, then it sounds like all you need is a simple merge May 20 01:02:57 Yeah, Observabe.merge( A , B ) .take(1) should work May 20 01:03:03 g00s: haven't read anything about details, but I won't be surprised if they will repeat errors of early chrome... May 20 01:03:06 e10s will be interesting when it stops being _massively_ slower on some sites than non-e10s. but yeah, in principle it's the right thing. May 20 01:04:17 aspire: any way you want May 20 01:04:37 since it is bound you can directly call the methods of the service, or the binder, and if you have a message like registerCallbackAlpha May 20 01:04:41 then there's one way May 20 01:04:56 or you can use the messenger in which you postMessage to it May 20 01:05:27 lasserix, inside the tutorial there is an mMessenger of type Messenger declared in the service class, i assume mMessenger.send(Message) sends a message to my app right? May 20 01:05:42 it will goto the handler you register with the messenger May 20 01:05:48 but that's only if you do IPC May 20 01:06:03 in reality you can directly call on the methods and make it non-serialized classes to to make your life easier May 20 01:06:54 uhhh May 20 01:07:31 sorta new to all of this May 20 01:07:34 IPC? May 20 01:07:58 and so the Messenger declared in service is only for reading from the activity it is bound to? you can't actually write to it? May 20 01:09:12 im not sure i am understanding this correctly lasserix :\ May 20 01:09:36 Messenger is typically only useful for communicating across processes May 20 01:09:49 IPC = Inter-Process Communication May 20 01:10:12 aspire: http://pastebin.com/X3b39pWG May 20 01:10:16 mhmm May 20 01:10:31 ^ yep, that basically May 20 01:10:46 or if you have an event bus of some kind, it might be a good fit for this May 20 01:12:00 aspire i gota run but hopefully that makes sense May 20 01:12:27 mhmm, just to make sure we are on the same page what im trying to do is send/read data from my service to activity as well as send/read data from my activity to my service May 20 01:13:03 o... May 20 01:16:30 oh i think this is starting to make sense May 20 01:16:57 do Fragments share the same Loader as the parent Activity? May 20 01:17:54 dynmeth: I think so. should be able to test it though - try to get the same loader in both, put a log in the 'create' method, see if it appears 2x. May 20 01:18:16 ahh! ok i think i get it May 20 01:18:41 http://stackoverflow.com/q/4300291/1255746 this is extremely helpful May 20 01:20:33 Oh, that thing was about A/B testing and not alpha/beta testing: http://thenextweb.com/dd/2015/05/06/android-developers-may-soon-try-out-varied-app-profiles-on-the-google-play-store/ May 20 01:24:24 yeah A/B just means two variants (of anything) May 20 01:24:41 "Known in the trade as A/B testing, developers will be able to swap out high-profile elements of their app presentations such as color schemes and prices..." prices? woahoa May 20 01:30:20 "It’s been awhile since Android app developers have felt that spark of innovation from Google’s app marketplace" May 20 01:30:42 or spark of innovation .. in the entire ecosystem May 20 01:30:49 but yes, lol May 20 01:31:27 and .. i hope they give us Promo Codes dang it May 20 01:38:58 suppose i was writing an android app - would it be a faster approach to testing if i wrote the core functionality in java and then jarred it when it is functional and use it as a dependency in my android app? May 20 01:39:32 aspire hm read this https://github.com/tehmou/rx-android-architecture May 20 01:39:58 will do although i have no idea what this is :p May 20 01:40:38 i just figure that i will write the core application in java and then when i use it as a dependency in my android app, the ui will just invoke methods and what not May 20 01:41:05 you are thinking about the physical deployment model / physical structure ... May 20 01:41:17 but you should think about the logical structure first May 20 01:41:29 o.. May 20 01:42:07 aspire: You can JVM-unit-test any Java code in an Android app. May 20 01:42:46 I do tend to keep the non-Android stuff away from the Android stuff, but that's just what good design dictates anyway. May 20 01:42:48 oh, right May 20 01:43:24 aspire read over the link ^^ - i read it a few times to make sure i got it May 20 01:43:48 its a good way of thinking about the architecture, all the models, views, presenters and how they are connected May 20 01:44:04 i guess i need to know what rxjava is before i read this May 20 01:44:46 aspire no, only to read their code which is a skeleton / example May 20 01:45:15 oh sure ok May 20 01:45:29 its just easy to use rx for binding properties to view May 20 01:46:13 o... May 20 01:48:40 aspire: To be clear, there's no need to create a Java module in order to make testing easy, since you can test your Android code on the JVM (though if that code touches the Android framework then you might have to mock what it touches). May 20 01:49:43 TacticalJoke, you're right - wasn't even thinking haha May 20 01:49:48 By "Android code" I mean "code within an Android module in Android Studio". May 20 01:52:37 (Though we don't have to couple this notion with a particular IDE -- it just makes things simpler.) May 20 02:10:38 hi, dumb question but where do i see the runtime errors in android studio? i feel like i'm missing a window or something. Trying to find the stacktrace output when my program crashed May 20 02:11:18 you probably have a filter on May 20 02:11:36 Yeah, it's in LogCat (Alt+6 on Windows). May 20 02:11:57 ohhhhhhhh May 20 02:11:58 derp May 20 02:12:06 logcat filtered it out, thanks May 20 02:12:29 happened to me too :p was really frustrating haha May 20 02:17:28 groxx: So Fragments don't share their Parent's LoaderManager May 20 02:17:48 dynmeth: figures :\ May 20 02:17:55 seems like you might want that, but no? May 20 02:19:06 groxx: yeah I would have thought so May 20 02:20:28 anyone know why Retrofit might be throwing exceptions for POST requests without a body? my code suddenly isn't working, and I'm pretty sure I didn't change anything related to that May 20 02:20:48 stacktrace May 20 02:21:43 JakeWharton: http://pastebin.com/iizWGQS1 May 20 02:22:52 GETs are still working fine but my POSTs are all failing with that, even if i reset back to an older build :( May 20 02:23:23 that is OkHttp throwing, FYI May 20 02:23:52 ah, right. haven't really touched OkHttp directly much May 20 02:24:06 yep. that's what Retrofit is for! May 20 02:24:32 are you using the latest Retrofit? 1.9.0? May 20 02:25:00 yes 1.9.0 May 20 02:26:43 Hmm, did this change in 2.3? https://github.com/square/okhttp/blob/master/okhttp/src/main/java/com/squareup/okhttp/Request.java#L244 May 20 02:26:52 I have 2.2, and I see `body = RequestBody.create(null, Util.EMPTY_BYTE_ARRAY);`. May 20 02:27:08 (And my app relies on that. ;o) May 20 02:27:25 hello May 20 02:28:34 https://github.com/square/okhttp/commit/1abba290f5e3e7719ad2dfead2eb45d507ed492c May 20 02:29:40 TacticalJoke: I sure hope you don't mean android 2.2 and 2.3 May 20 02:30:02 Then again, I can just say `builder.method(whatever, new byte[0]);`. May 20 02:30:12 froyo and gingerbread, wow... surprised I still remember their names May 20 02:30:25 retrofit beta versions probably May 20 02:30:38 OkHttp versions. May 20 02:30:48 I still have a bunch of froyo and gingerbread users, according to my developer console. May 20 02:30:50 yeah, that XD May 20 02:31:35 whe you guys develop android apps, do you use the emulator testing and debuging or do you use an actual android device ? May 20 02:31:58 both. May 20 02:32:08 I use devices most of the time. May 20 02:32:12 Via wireless adb. May 20 02:32:25 I use the emulator to test android versions that I do not want to install on a device. May 20 02:32:26 damien5314: Did you update OkHttp recently? May 20 02:33:52 ok May 20 02:33:56 TacticalJoke hmm, I don't think so. I get it through retrofit which has always been 1.9.0 and even when I revert back to an older working build, the calls are now failing May 20 02:33:57 Oops, what I said above was wrong. I'd have to use `builder.method(whatever, RequestBody.create(null, byte[0]);`. May 20 02:34:06 I don't get why the change was made, though. Seemed better before. May 20 02:34:13 is there any specific android device that is suitable for android development ? May 20 02:34:30 hello party people May 20 02:34:47 changing existing api functionality and expectations is evil May 20 02:35:21 haha in what context, pragma- ? May 20 02:35:22 alexi5 no, not really May 20 02:36:02 i was thinking of getting one of those inexpensive blu android phones for development May 20 02:36:12 Omg, my brain is not working. `new byte[0]` and an extra `)`. ;| May 20 02:36:30 alexi5 http://www.theverge.com/2015/5/14/8601993/best-cheap-smartphone-2015-android-motorola-samsung-htc May 20 02:36:31 lol May 20 02:36:37 the blu didn't get such good review May 20 02:36:42 looks nice, thats about it May 20 02:36:49 why harcode your instantization though? May 20 02:37:20 Best phones doesn't have to be cheap May 20 02:37:57 moto ftw May 20 02:38:33 just go to china and buy some $20 octacore phone that comes in a faux-cloth box. just don't look at its /proc/cpuinfo or anything. May 20 02:38:42 er except moto's camera on the n6 May 20 02:39:55 Can we stop targeting for API-15 anytime soon? May 20 02:40:00 LOL May 20 02:40:06 I'm still targeting 11 May 20 02:40:08 https://projectgus.com/2015/05/inside-a-34-dollar-smartphone/ See also https://projectgus.com/2015/05/34-dollar-smartphone-part-ii-teardown/ May 20 02:40:12 :) May 20 02:40:25 Tricknology, what is with the camera? May 20 02:40:36 It's not what I would expect May 20 02:40:38 I have it May 20 02:40:55 The image resolution, for the screen size, is disappointing May 20 02:41:16 darkly contrasted images are somewhat pixelated with no zoom May 20 02:41:24 i think we're going to have to say minSdk = JeyyBean for quite a while May 20 02:41:38 *JellyBean May 20 02:41:49 https://developer.android.com/about/dashboards/index.html?utm_source=suzunone May 20 02:41:52 meh, seems ok to me. although i'm not a photo guy May 20 02:41:54 hmm May 20 02:41:55 still lots of jellybeans :( May 20 02:46:06 damien5314: How is the reddit app going, anyway? May 20 02:46:29 slowed down a bit trying to refactor stuff a lot May 20 02:46:50 use MVP etc May 20 02:47:08 but it's pretty fun overall.. how about yours? May 20 02:47:11 I still haven't done markdown (or whatever it qualifies as) parsing. May 20 02:47:17 Yeah, it's fun. May 20 02:47:34 I use it all day every day. :D May 20 02:47:48 MVP? as in the design pattern? May 20 02:47:48 Even fall asleep reading reddit. May 20 02:47:49 i wanna say there's a library that can either do markdown into an android textview, or html May 20 02:47:59 yeah i use mine too haha May 20 02:48:31 yes model-view-presenter May 20 02:48:32 I guess reddit's markdown is specific to reddit? Can't remember though. May 20 02:48:42 there are some customizations May 20 02:48:43 Things that sound painful like that -- I just try not to think about them until I need to implement them. lol May 20 02:48:50 The key pain might be avoiding too many allocations. May 20 02:49:08 yeah whatever I would implement for something like that, if it works, would be way too slow May 20 02:49:21 i started brainstorming a way to do it one day and almost hurt myself May 20 02:50:46 damien5314: Are you able to trace into the Retrofit source and figure out how it's using OkHttp? May 20 02:50:51 I sometimes debug OkHttp like that. May 20 02:50:56 With breakpoints or whatever. May 20 02:51:58 Or even just middle-click until you get to Request.java. May 20 02:52:01 well, I tried comparing my POST requests from an older codebase to the ones I'm sending now, but somehow they don't work even on the older one May 20 02:52:08 I think it might be emulator-related? May 20 02:52:10 somehow May 20 02:53:39 The best hypothesis I can spin is that it's related to this recent OkHttp change (see the very bottom): https://github.com/square/okhttp/commit/1abba290f5e3e7719ad2dfead2eb45d507ed492c May 20 02:53:44 hi i have to create a list as this https://www.dropbox.com/s/cgrbikrosgn47rb/prod.png?dl=0 May 20 02:54:17 i'd like use recyclerview with GridLayout but every 4 card i have an header May 20 02:55:07 <_genuser_> hey guys, what's up? May 20 02:55:15 TacticalJoke: I never changed my retrofit version though, would I still get an OkHttp update? May 20 02:56:23 Hmm, can't imagine so. May 20 02:56:44 Unless you're using a range in the dependency thing. May 20 02:56:53 In build.gradle. May 20 02:57:23 The + thing. May 20 02:58:38 Okay, the Gradle documentation calls it "dynamic versions". May 20 02:58:44 nah I always update the versions manually May 20 02:59:06 devuser I would use a simple listview/recyclerview if the number of cards is constant always. May 20 02:59:07 <_genuser_> I love getting sidetracked by projects that take so much time/learning that your main project is just ignored for days. May 20 02:59:17 <_genuser_> weeks, lol. gotta quit losing track. May 20 02:59:23 damien5314: Do you have an entry for OkHttp in build.gradle? Just wondering May 20 02:59:35 nope May 20 02:59:41 stetho-okhttp May 20 02:59:45 + comes with a warning that it wont always result in a stable build. :) **** ENDING LOGGING AT Wed May 20 02:59:59 2015