**** BEGIN LOGGING AT Tue Dec 02 02:59:58 2014 Dec 02 03:01:00 seriously, wth is this 'Activity destroy timeout for ActivityRecord' ? Dec 02 03:02:31 ESphynx never saw that before; you get the strangest errors ! Dec 02 03:02:36 I sure do Dec 02 03:03:01 g00s: that happens when I exit the app from my application Dec 02 03:03:29 and then restarting the app from the device will just hang on startup... OnCreate never called. (I have to uninstall/reinstall start the app from ADB) Dec 02 03:03:51 but if I close the app from holding 'recent apps' , remove then I can restart it fine Dec 02 03:04:11 note that both of my threads terminated fine, and that onDestroy() was called and returned! so clearly my app is done closing Dec 02 03:05:37 Interestingly now this also happens on Nexus 10 :| I'm starting to think it's a new problem with the R10 NDK... Dec 02 03:11:50 Google makign errors on example code… wtf. Dec 02 03:12:59 haaaaaaa Dec 02 03:13:16 http://developer.android.com/training/implementing-navigation/nav-drawer.html Dec 02 03:14:16 mDrawerLayout.closeDrawer(mDrawerList); should be mDrawerLayout.closeDrawer(findViewById(R.id.content_frame); Dec 02 03:14:37 #fail Dec 02 03:15:09 but now when I close and open my drawer the onclicklistener breaks.. Dec 02 03:15:13 only listens to clicks once Dec 02 03:15:50 hey I was wondering if I can publish an app on google app store if it doesn't use HTTPS Dec 02 03:16:32 but instead just uses HTTP since the whole SSL / HTTPS thing in android is intentionally guttered to keep people from using cheap / free / self signed certificates Dec 02 03:16:54 your app doesnt use https? Dec 02 03:16:57 for what? Dec 02 03:17:09 for everything, people's passwords, sessions Dec 02 03:17:23 what happens inside your app is your business I believe Dec 02 03:17:34 google wants you to use https for their APIs and publishing apps Dec 02 03:17:40 that’s their https Dec 02 03:18:01 what about my own rest apis Dec 02 03:18:19 but be aware that many (absent minded) people use one password for everything, so if you get breached you could trigger something Dec 02 03:18:25 but no your own apis dont matter Dec 02 03:18:32 That would suck hugely Dec 02 03:18:43 yeah well Dec 02 03:18:54 Im done with ssl Dec 02 03:18:58 at least for android Dec 02 03:19:07 Im considering pgp Dec 02 03:19:12 it’s your call when to use it where Dec 02 03:19:13 gordon_, that's robolectric 1.x Dec 02 03:19:22 ah, that's why Dec 02 03:19:46 ok, will play with it today at night Dec 02 03:19:48 thank you once agian Dec 02 03:19:52 but if I use pgp over http something in the back of my mind google is going to tell me "no use https or we'll remove your app from the market" Dec 02 03:19:53 *again Dec 02 03:20:43 I mean they really should be doing something like that Dec 02 03:22:19 I was hoping someone could tell me what policies they have for stuff like that and if my assumptions that they are going to enforce a policy of "I'll just have to fork out the dough for an ssl certificate that works with their http API" or not are correct Dec 02 03:23:12 I mean it should seem to stand to reason that Dec 02 03:23:17 look at this one sec Dec 02 03:23:29 https://github.com/search?o=desc&p=7&q=%22extends+SSLSocketFactory%22&ref=searchresults&s=indexed&type=Code&utf8=%E2%9C%93 Dec 02 03:23:43 and uh you know ... Dec 02 03:24:21 all of these really useful code samples that seem to have no home because they didn't indicate any import namespaces developer.android.com/training/articles/security-ssl.html Dec 02 03:24:39 this is so intentionally careless Dec 02 03:24:43 how could it not be Dec 02 03:25:19 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference Dec 02 03:25:23 DrawerLayout is so broken Dec 02 03:31:17 wah wah http://pastebin.com/cndejVpw Dec 02 03:31:41 This error is not happening in my code \ Dec 02 03:31:58 Anyone here ever used bootstrap to make the ui of a phonegap application? Dec 02 03:32:38 lots of errors like it.. Dec 02 03:32:39 https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=java.lang.NullPointerException%3A%20Attempt%20to%20invoke%20virtual%20method%20%27android.view.ViewGroup%24LayoutParams%20android.view.View.getLayoutParams()%27%20on%20a%20null%20object%20reference%20drawerlayout Dec 02 03:32:47 I am just following Google’s example and it blows up. Dec 02 03:33:34 whaever. done for the day. Dec 02 03:33:34 gg Dec 02 03:34:40 I'm drawing some squares: so I have an outer rect, with a bunch of inner rects. The problem is that using STROKE the outer lines are clipped (so they appear smaller than the inner lines, even though the stroke is the same). Anyone know of the best way to handle this? Dec 02 03:46:53 hello Dec 02 03:47:06 I am trying to understand how to implement security with broadcast receivers Dec 02 03:48:35 so I have app A and B. in A i have a receiver. In the receiver tag (manifest) I specify an android:permission string. Now B cannot send broadcasts anymore. Cool! So what do I have to do in order for B to send broadcasts to A ? I specified uses-permission tag with android:name set to the same string as the receiver's android:permission but still the broadcasts won't go from B to A - what else has to be done ? Dec 02 03:48:51 sounds like you need to offset the dimensions in the rect cells by 50% of the stroke with. Dec 02 03:52:02 yeah that or use two different paints Dec 02 03:57:38 which drawing program do you guys prefer to edit your .png's and stuff ? Dec 02 03:58:18 shmoon platform? Dec 02 03:58:27 lol shmooz Dec 02 03:58:37 uhm I'm on win 7 Dec 02 03:59:15 lots of good mac apps in this area (pixelmator, acorn, etc) Dec 02 03:59:19 I was editing a .png with transparent background in Paint and the stupid thing loses the transparency when I save it Dec 02 03:59:25 for vector i use inkscape Dec 02 03:59:25 I use inkscape and gimp Dec 02 03:59:33 Carbonflux: easier to just use two paints such that edge stroke width =2x inner, so i dont have to do a bunch of fucking calculations ;p Dec 02 03:59:57 hmm, I used to use gimp Dec 02 04:00:05 g00s, you sound like you're so productive, how many apps have you finished so far? Dec 02 04:00:09 thanks pfn I'll check out inkscape Dec 02 04:00:29 I usually do all of my iconography in inkscape Dec 02 04:00:59 pfn no app ever gets finished :) Dec 02 04:01:06 what is "finished" :D Dec 02 04:01:20 for me it doesn't really matter which program as long as it behaves, I'm editing zoomed in deciding every pixel Dec 02 04:01:40 hmm, I think I'll give the github android app some love maybe Dec 02 04:02:13 g00s, published is a good enough metric Dec 02 04:03:51 I'll probably need another year to finish my first app ;) Dec 02 04:04:22 anyone know if google is planning on enabling keyboards for wear? Dec 02 04:06:20 shmooz i have to throw in the obligatory "ms paint" :D Dec 02 04:06:26 lasserix: good god I hope not Dec 02 04:06:34 shmooz: howcome? Dec 02 04:06:48 g00s: that's what I was using, but how do I make it preserve tranparency ? Dec 02 04:06:50 Leeds: I have a keyboard that works on that size that's why i am asking--minimum is doing it but you have to sideload it Dec 02 04:07:02 shmooz lol ! i was just joking Dec 02 04:07:11 well I like it, it's simple Dec 02 04:07:16 yeah, for free gimp. i used portable gimp it worked OK Dec 02 04:07:18 zoom in, poke the pixels Dec 02 04:07:46 selfie sticks use bluetooth? never knew Dec 02 04:08:12 wut is a selfie stick Dec 02 04:08:31 oh god, al this selfie stuff - i hear the # of plastic surgeries is up so people can look good in selfies Dec 02 04:08:38 losers Dec 02 04:08:40 really Dec 02 04:09:35 http://www.reuters.com/article/2014/11/30/us-life-selfies-surgery-idUSKCN0JD0DT20141130 Dec 02 04:13:12 does anyone know a resource that discusses how quickly you can update a web service from android? Is once per second unrealistic? Dec 02 04:14:20 how to read contacts via adb? Dec 02 04:16:55 ice9: this might work, havent tested it. http://www.droidxforums.com/forum/droid-x-rescue-squad/30987-acquire-contacts-via-adb.html Dec 02 04:18:37 nubnub: that way it's taking a copy of the db file, I don't think that contact syncing work the same way right? Dec 02 04:20:00 i really have no idea how syncing actually works, i just googled it 2 minutes ago. but i seriously doubt that syncing is simply copying databases Dec 02 04:20:38 syncing is usually a complex problem... Dec 02 04:27:48 oi, now even a drone for selfies http://www.gizmag.com/palm-sized-zano-drone-selfies/35013/ Dec 02 04:38:29 http://stackoverflow.com/questions/27239405/googleauthutil-get-access-token-that-will-provide-an-email-address help Dec 02 04:38:49 Reddit's obsession with Stephen Colbert is nauseating. Dec 02 04:42:44 how can i limit the output of 'adb logcat' to data about the app im trying to debug? Dec 02 04:44:28 adb logcat -s "bleh" is the best thing you can do as far as I know Dec 02 04:44:40 so you'd do Log.d ("bleh", "text"); Dec 02 04:44:47 i currently do adb logcat |grep blah Dec 02 04:44:51 same thing basically? Dec 02 04:45:01 no idea Dec 02 04:45:33 wishie look at the docs for logcat Dec 02 05:06:03 /sanit/asni Dec 02 05:06:51 lasserix: hi Dec 02 05:07:44 hello Dec 02 05:14:28 I need a settings option in the action bar for my app. Though I am refering the developer site http://developer.android.com/guide/topics/ui/settings.html#Fragment for help.Things are not clear. Can someone provide me with some example links for settings Dec 02 05:23:15 is it mandatory to have the settings.xml file under the res/xml folder only or it could be res/somexmlfolder Dec 02 05:26:15 if you want to use r.xml.settings .... Dec 02 05:32:01 mandatory Dec 02 05:33:38 Weird how someone would make an app and call it "Yet Another ". Dec 02 05:34:20 "This app sucks." Dec 02 05:34:27 YAYAA Dec 02 05:35:04 Yet Another Yet Another App Dec 02 05:35:42 I was going to call my video/audio player, YAP (Yet Another Player) Dec 02 05:36:05 See, to me, that states "Don't use this; it's no good". :D Dec 02 05:36:13 "You might as well use one of the others." Dec 02 05:36:24 I hope you called it something better. Dec 02 05:36:30 no it's supposed to mean, we need yet another one cause all the previous ones sucked Dec 02 05:37:05 yeah not sure what yet Dec 02 05:37:18 For years, I've named almost all my apps after gemstones. Dec 02 05:37:19 downstream playmate mediator! Dec 02 05:37:37 Confectionary Item Destruction Epic Player. Dec 02 05:38:30 It's easy if you use gem names. Dec 02 05:38:38 Emerald Player Dec 02 05:38:40 Or something. Dec 02 05:38:50 Make it green. Dec 02 05:38:52 why Dec 02 05:38:59 turqoise Dec 02 05:39:39 Or just pick colours. "Blue Player". Dec 02 05:39:43 because people are brainwashed to be attracted to jewelery ? Dec 02 05:39:55 Yeah. Dec 02 05:40:53 if it's good people will put up with a bad name Dec 02 05:40:56 shmooz: Does it support MP4 videos? Dec 02 05:41:00 yes Dec 02 05:41:08 Fewer people will even try it if the name sucks. Dec 02 05:41:10 Naming is *huge*. Dec 02 05:41:17 but I haven't plugged in ffmpeg yet Dec 02 05:42:03 Don't Hate the Player. Dec 02 05:42:03 it uses default VideoView and MediaPlayer for now, which does support mp4 on most android devices like 2.0 and up or something Dec 02 05:42:21 That could actually work. lol Dec 02 05:42:26 As long as someone doesn't have that trademarked. Dec 02 05:42:46 Anyone know of the best library to use for picking files? Dec 02 05:43:12 AeroPlayer, LightningPlayer. I dunno. Dec 02 05:43:16 Something that sounds flashy and good. Dec 02 05:43:27 And is memorable. Dec 02 05:43:32 well I was thinking PlayMate or Play-M8 Dec 02 05:43:42 Not bad, but it sounds like a sex toy. lol Dec 02 05:43:56 yeah, but it doesn't really mean that Dec 02 05:44:16 kids in kindergarden have playmates Dec 02 05:44:26 True. Dec 02 05:44:33 Does someone have that term trademarked, though? Dec 02 05:44:57 there is a kids products in EU that has the name Dec 02 05:45:01 like toys and stuff Dec 02 05:45:11 and the magazine I suppose Dec 02 05:45:37 but no app Dec 02 05:45:47 blue is also the base color of 2014 Dec 02 05:45:49 Cool. Dec 02 05:45:57 Blueplay. Dec 02 05:46:04 ColdPlay Dec 02 05:46:09 :D Dec 02 05:46:32 hi Dec 02 05:47:06 MediaPad. Dec 02 05:47:22 That's a tablet brand. Never mind. Dec 02 05:47:23 Just googled. Dec 02 05:48:01 "MultiPlay" sounds quite good. Dec 02 05:48:05 Mediator Dec 02 05:48:15 Yeah. Dec 02 05:48:46 Mediation. Dec 02 05:49:31 what are you gonna name your Reddit app ? Dec 02 05:49:34 Aqua. Dec 02 05:49:35 lol Dec 02 05:49:41 Reddit Been there Done that! Dec 02 05:49:56 nice Dec 02 05:50:09 Reddit said I can use 'Aqua for Reddit' on the play store. Dec 02 05:50:22 I guess I like the connotation of water, gemstones, and blue-green colours. Dec 02 05:50:35 thats a nice name Dec 02 05:50:40 Thanks. :) Dec 02 05:50:50 I did consider Turquoise, Topaz, etc. Dec 02 05:50:52 representing clarity Dec 02 05:50:56 Yeah. Dec 02 05:51:14 and flow Dec 02 05:51:16 It makes me think of /r/waterporn, too. (SFW.) Dec 02 05:51:32 https://waterporn.reddit.com/ Dec 02 05:51:42 That's pictures of oceans and stuff. Dec 02 05:51:48 not sure if I should click that Dec 02 05:51:57 oh Dec 02 05:52:03 It's kinda like EarthPorn. Dec 02 05:53:53 When are you gonna release, shmooz? Dec 02 05:53:57 I'll try it, for sure. Dec 02 05:54:01 I use MX Player right now. Dec 02 05:54:15 Is it safe to use Intent.GET_CONTENT ? or should i implement some file chooser library? Dec 02 05:54:23 The ads are slightly annoying. Keep getting that "What do you know about sex?!" one. :/ Dec 02 05:54:47 To anyone seeing my phone, it looks kinda dodgy. Dec 02 05:54:53 my app will take long to finish because I gotta link it to all these external media sites and RSS and allow users to create private/public playlists Dec 02 05:55:08 Okay. Dec 02 05:55:20 I'm gonna try to release early with the Reddit thing. Though not too early, I guess. Dec 02 05:56:00 yeah I could release an early version that scans local files and lets you only open a remote URL link like VLC Dec 02 05:56:29 but I wanted to make it more like XBMC or Plex or Roku as well ;) Dec 02 05:56:30 Some people release early and use "Beta" naming, but I'm not a fan of that idea. Dec 02 05:56:34 It seems like an apology. Dec 02 05:57:16 Everything could be defined as a 'beta'. Dec 02 05:57:59 hey Dec 02 05:58:32 Hay. Dec 02 05:58:56 I want to lock a thread until some event occur (onEvent being called), I believe there must be a way with a synchronized or Lock trick but I cannot wrap my hear around Dec 02 05:59:09 TacticalJoke: do you know those adds gets your data from browsing history? :> Dec 02 05:59:19 need some help http://stackoverflow.com/questions/27241604/how-to-set-broadcastreceiver-permissions Dec 02 05:59:21 by lock a thread I meant putting it on hold Dec 02 05:59:34 gordon_: lol Dec 02 05:59:48 I could use a blockingqueue but maybe there is something more gracious Dec 02 06:00:07 Marlinski you could use wait notify :| Dec 02 06:00:13 TacticalJoke: chrome ? ctrl+shift+p ;) Dec 02 06:00:19 or countdownlatch, cyclicbarrier ... Dec 02 06:00:28 g00s: true Dec 02 06:00:35 Marlinski: countdown latch is easy, wait/notify is straight forward. Dec 02 06:00:36 didn't thought of that :] thank you Dec 02 06:01:26 My browser history is pure innocence. Dec 02 06:02:26 the nsa will decide that :) Dec 02 06:02:31 lol Dec 02 06:03:09 TacticalJoke: I'll show you a snapshot apk when it's stable enough to look at again, right now I'm changing it a lot so it's a bit of a mess Dec 02 06:03:12 Joking aside, my history, even at the best of times, must look shady. There are so many NSFW posts on /r/trashy and stuff. Dec 02 06:03:25 shmooz: Okay. :) Dec 02 06:05:03 I might do that with my app. Would be nice to get early feedback. Dec 02 06:13:38 Is it possible to style Text Buttons in android, without using an image button? similar to how you style buttons in CSS to avoid loading images Dec 02 06:15:01 wow, didn't realize i could do Class f = SomeInterface.class; Dec 02 06:16:30 What is the best practice to reject changes in a preferences dialog? I have established a reference change listener (OnSharedPreferenceChangeListener) and try to check and reset the value in there. But the change isn't visable on the UI Dec 02 06:17:40 http://pastebin.com/XK5ReVHU Dec 02 06:20:28 makani what the heck are you trying to do there ? thats crazy Dec 02 06:21:14 you are listening for a key change pref_devset_bt_pairing and in there chaning pref_devset_bt_pairing O.o Dec 02 06:23:27 Hmm well I want to display a dialog that the user needs to confirm to acknolidge the change Dec 02 06:23:52 And if he hits the "negatve" button the preference change should be rejected Dec 02 06:24:24 makani: which UI do you want to see the change at? when you are at the PreferenceActivity or MainActivity ? Dec 02 06:28:29 the preferenceactivity Dec 02 06:34:51 I haven't done that type dialog in preferences but I have done AlertDialogs in MainActivity, in that case you builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { ... and builder.setNegativeButton("No", new DialogInterface.OnClickListener() { ... Dec 02 06:35:55 the dialog is shown correctly. That isn't my problem Dec 02 06:36:28 My problem is that changes can not be rejected or revwerted in OnSharedPreferenceChangeListener Dec 02 06:36:37 At least they are not updated in the UI correctlyt Dec 02 06:36:38 and you put the code that rejects in the NegativeButton .. ? Dec 02 06:37:31 I will try to do this later. For testing I simply changed the preference valaue to a fixed value in my listener Dec 02 06:37:44 http://pastebin.com/XK5ReVHU Dec 02 06:43:34 makani: you can try refreshing the preference activity screen by restarting the activity Dec 02 06:43:57 but that makes it slide in and out on some devices which might look weird Dec 02 06:45:53 makani: add finish(); and startActivity(getIntent()); at the end to test that Dec 02 06:48:19 The problem is, that the preference is also only a fragment. But I will give it a try Dec 02 07:00:39 How can I prevent an onItemClickListener from being called, if I setSelection in a Spinner manually? Dec 02 07:00:58 I tried using animate=false, but it is still being called. Dec 02 07:05:07 barq you probably have to clear the listener, set it, and then restore the listener Dec 02 07:05:13 yeah, lamesauce ! Dec 02 07:05:32 Guys, sorry for offtopic, but just wanted to say: "DAMN man android is awesome1!!!!!" Dec 02 07:06:08 i have class at 9:30....woke up at 07:00 hour just to work on Android for a hour and a half! Dec 02 07:07:10 g00s: I could do that, however, the onClickListener runs after I restore the listener for some reason. Is there a way to block the listener from running if called during a certain code block? Dec 02 07:07:19 Strat if you worke up at 5am i'd say you were hardcore Dec 02 07:07:29 did that in the past Dec 02 07:07:56 Ok Dec 02 07:07:58 but i dont feel like sleeping early in the evening to wake up that early (i instead work to deep in the nights ;)) Dec 02 07:08:00 I found the problem. Dec 02 07:08:15 turns out, clearing permissions won't give you a new access token Dec 02 07:08:36 Does anyone know if access tokens are cached on the server, or on the device? Dec 02 07:08:46 e.g. accessToken = GoogleAuthUtil.getToken(context, accountName, scope); Dec 02 07:11:47 anyone know how I would fix this? http://pastebin.com/0BXRGpLN been trying to all of today, and this is a fairly vanilla Android 5.0 build. Dec 02 07:12:53 How costly is Context.getString? Dec 02 07:13:24 d'oh.... wrong chat.... Dec 02 07:13:39 pretty sure I wanted #cyanogenmod-dev.... Dec 02 07:13:55 that's what I get for trying until nearly midnight. >.< Dec 02 07:14:49 TacticalJoke, just outta curiosity, what're you wanting to do? I know not what that is, but I'm curious as to it would be used for. :) Dec 02 07:15:38 It gets strings defined in a string-resource file. Dec 02 07:15:45 barq just use a flag Dec 02 07:17:53 I need to access string resources in Adapter.getView. It doesn't seem like a great idea to call getString every single time. Dec 02 07:18:08 But giving the strings to the adapter doesn't seem great, either. Dec 02 07:18:16 TacticalJoke: Cache them? Dec 02 07:18:36 why wouldn't it be a good idea ? Dec 02 07:18:41 its normal :D Dec 02 07:18:48 loke: In a global? Dec 02 07:19:00 TacticalJoke: In a member in the adapter Dec 02 07:19:05 Which one is normal? Calling getString in Adapter.getView? Dec 02 07:19:13 TacticalJoke, my rudimentary knowledge of programming seems to say that it wouldn't be too big a hit to performance to do what you're saying Dec 02 07:19:15 I am using a flag. However, if I do editableFlag = false; spinner.setSelection(xyz); button.setEnabled = false; editableFlag = true and the button.onClickListener toggles the button as well, the editableFlag is always true when the onClickListener executes, even though the setEnabled happens before the button status is set. Dec 02 07:19:52 barq: button.setEnabled=false is illegal java code. What language are you using? Dec 02 07:20:12 g00s: I wonder how fast getString really is. Dec 02 07:20:12 loke: Shorthand pseudocode. Dec 02 07:20:16 I guess I could time it. Dec 02 07:20:33 I just don't like the idea of my Adapter.getView override calling this every single time (unless it's really fast). Dec 02 07:21:06 TacticalJoke: Unless you call it a million times, I wouldn't care. Dec 02 07:21:39 Besides, your getView() metod should be reusing views anyway, so I'd expect that they would already be initialised with the appropriate sting values Dec 02 07:21:49 TacticalJoke if you do view.setText(R.id.mystring) what do you think is happenbing? Dec 02 07:22:15 The problem is that the onClickListener executes too late. Is there a way to manipulate the order in which the methods are called? Dec 02 07:22:24 Or, even cleverer, use a RecyclerView Dec 02 07:22:40 loke: I still need to set the text every time, recycled or not. Dec 02 07:22:43 g00s: I know. :p Dec 02 07:23:08 barq: No, but you have misundestood what actually happens. Dec 02 07:23:48 Concurrency issue? Dec 02 07:23:53 barq: When you call a method that affects a view, you are actually placing a request on the event queue to perform this operation. It doesn't happen until later. Dec 02 07:24:04 Any Vogar users run into "Fatal Error: Unable to find package java.lang in classpath or bootclasspath" http://pastebin.com/zZcTL3WN? Dec 02 07:24:11 ok Dec 02 07:24:32 barq: Without knowing much about your prcise issue, you might be able to solve it by simply doing what you want in a job and place that job at the end of the event queue Dec 02 07:25:31 barq: Look up the .postDelayed() method: Dec 02 07:25:32 http://developer.android.com/reference/android/os/Handler.html#postDelayed%28java.lang.Runnable,%20long%29 Dec 02 07:25:58 I have three spinners, and have a reset button. When I click the resetbutton I first setSelection of all three Spinners back to default and then disable another button. This other button has a listener that only makes it enabled when all three spinners have a non-default selection. Dec 02 07:26:21 actually, just .post() is what yuou want Dec 02 07:26:55 I guess it makes most sense to call Context.getString in Adapter.getView. I'll time it, out of interest. Dec 02 07:27:39 barq: yeah I had to do that to get one of my custom spinners to behave Dec 02 07:28:06 post runnable and also setSelection(xyz, true); inside there Dec 02 07:29:12 Then setSelection will be exeucted first? Dec 02 07:29:57 well if I didn't put the true there, when I quick power off screen and on again, the current selection was showing the wrong icon for me Dec 02 07:30:38 even though it had selected the right index, just wasn't displaying inside the selector Dec 02 07:30:45 can someone help me understand how this brodcast receiver permission really works haha Dec 02 07:30:48 i am so stuck Dec 02 07:30:50 and confused Dec 02 07:31:04 What's up with your names? Dec 02 07:31:24 I posted my question on SO if someone could help please http://stackoverflow.com/questions/27241604 Dec 02 07:32:08 my name is just fine thanks Dec 02 07:32:15 * g00s times TacticalJoke timing getString, out of interest Dec 02 07:32:19 * shmooz kicks shmoon in the n Dec 02 07:32:21 :D Dec 02 07:32:33 I can't time it yet; I am falling asleep. Dec 02 07:33:07 shmooz: Are you related to shmoon? Dec 02 07:33:12 no Dec 02 07:33:23 Could've sworn you folks were married or something. Dec 02 07:33:23 Ok Dec 02 07:33:25 nope Dec 02 07:33:41 Someone, tell me what is wrong with my logic, or where I can do better: Dec 02 07:33:43 i am an android beginner Dec 02 07:33:58 me too Dec 02 07:34:10 Is one male and one female? Dec 02 07:34:16 i am male Dec 02 07:34:19 I am male Dec 02 07:34:34 If you're not heterosexual, this could be a fairytale romance. Dec 02 07:34:40 we are the same person in different dimensions Dec 02 07:34:44 :D Dec 02 07:34:46 i am 20 Dec 02 07:34:46 TacticalJoke, help: Dec 02 07:34:52 To authenticate a Google Play user, I can match a user's ID with the Google Play response, after sending a token to Google Play. Dec 02 07:34:53 i am hetero Dec 02 07:34:59 I have no idea, Agamemnus. Sorry. Dec 02 07:35:06 i didn't even say anything? Dec 02 07:35:10 do you have idea about broadcast receivers? Dec 02 07:35:13 Until just now Dec 02 07:35:17 Nope, shmoon. Dec 02 07:35:21 ok Dec 02 07:35:28 TacticalJoke, just tell me if you follow my logic Dec 02 07:35:30 Agamemnus: You said "authenticate a Google Play user", and my brain noped outta there. Dec 02 07:35:38 heh Dec 02 07:36:03 Ok: in the client app, the user gets a token from Google Play after signing in in a secure way. Dec 02 07:36:10 Make sense so far..? Dec 02 07:36:26 That token lets anyone else get some of their user data. Like their name, or ID. Dec 02 07:36:39 recently i remember there was some link on androdi docs saying "ask an expert Dec 02 07:36:41 while (true) { reply("Yes."); } Dec 02 07:36:47 i dont see it anymore, where is it? Dec 02 07:36:50 maybe i could ask ther Dec 02 07:36:57 Come on Dec 02 07:37:04 I need some brain power here Dec 02 07:37:17 Does that make sense, what I just said? Dec 02 07:37:33 I guess so. Dec 02 07:37:47 Ok. Now, the user sends the token and their ID to my server. Dec 02 07:37:48 Bear in mind that you're asking someone who has about a 0.76% understanding of the topic. Dec 02 07:37:51 I guess these guys are doing really well https://xamarin.com/ Dec 02 07:38:16 Then my server asks the Google Play servers what the ID is. If it matches what the user sent, the user is authenticated Dec 02 07:39:13 oh shit Dec 02 07:39:25 And then? Dec 02 07:39:45 What if another app gets an authentication token? Dec 02 07:40:00 then it can hijack the authentication process... Dec 02 07:40:26 Ok, putting that aside for a moment.. Dec 02 07:40:42 So the user's authenticated now, let's assume. Dec 02 07:41:04 The authentication process means that the user gets a little window pop up Dec 02 07:41:23 !paste Dec 02 07:41:25 Asking if they will permit the app to know some stuff about them. Dec 02 07:41:27 ~paste Dec 02 07:41:52 "paste" might be: http://pastebin.com/ Dec 02 07:41:55 That window's title is called "Google+" Dec 02 07:42:04 I'm a slow bot. :[ Dec 02 07:42:10 ok guys i have a better question then Dec 02 07:42:20 whatever string we use in uses-permission, that has to be defined somewhere? Dec 02 07:42:27 using permission tag or something Dec 02 07:42:43 Ok, so here's what's going on that I don't like: Dec 02 07:43:06 To get a list of email addresses, the Google+ permission window pops up. Dec 02 07:43:32 http://pastie.org/private/cefv0r0z6bw9mrdlcgksww I still get the same behavior, the posted bit is executed after the button is disabled, reenabling it. Dec 02 07:43:33 Then, you can get that access token via another method. Dec 02 07:43:57 And that other method requires an email address... and when it gets it, it pops up a "Google" permission window. Dec 02 07:44:04 So I have two permission windows. Dec 02 07:44:07 And I'm pissed. Dec 02 07:46:55 anyone have way to load pdf on activity, i have using docs.google.com but nothing pdf appears, my screen still blank Dec 02 07:51:50 i'm not :( Dec 02 07:58:25 shmooz: Any idea why this is not working? Dec 02 08:00:32 my apps data is populated through parsing json. my users may have my app open for a long period of time. whats the best method to periodically download and parse the json? Dec 02 08:00:46 i already have an asynctask that runs in oncreate of my main activity Dec 02 08:03:53 aaearon: You shouldn't Dec 02 08:04:01 aaearon: Ideally, you shoul;d push data when needed Dec 02 08:11:14 Another attempt: http://pastie.org/private/a2gydmgxqtth5nbszdhrg but the the last statement ist still run before the Runnable bit. Any ideas how I can fix this? Dec 02 08:20:32 barq: you can try posting to the beginning of the queue Dec 02 08:20:35 uaw a 200 ms delay Dec 02 08:20:55 but if you're posting to a separate thread, you should assume the rest of the code will execute first Dec 02 08:21:08 also Dec 02 08:21:15 Handler(Looper.getMainLooper()) Dec 02 08:21:24 to make sure you're attached to main thread since you are Dec 02 08:21:31 altering ui Dec 02 08:24:42 if this is on oncreate then it could be because it has not been laid out so Dec 02 08:27:01 loke unfortunately i am not in control of the json stream so i need to periodically pull it Dec 02 08:27:23 thepoosh: So how could I make sure the setSelection happens before the enabling? Dec 02 08:27:26 ok i figured it out, if anyone wanted to know Dec 02 08:27:37 google play lets me verify a token is for a particular client id Dec 02 08:29:34 postAtFront doesn't change the behavior either. Dec 02 08:31:56 Could I post the second statement as well such that they will run consecutively? Dec 02 08:41:35 aaearon: I'd do the regular pull on a server and then do a push when needed Dec 02 08:41:45 (assuming the updates needing push are somewhat rare) Dec 02 08:55:22 http://stackoverflow.com/questions/27245339/avoiding-multiple-double-two-permission-screens-when-getting-a-token-via-google Dec 02 09:06:31 please star this https://code.google.com/p/play-games-platform/issues/detail?id=202 Dec 02 09:14:15 Agamemnus: idk about you, my app gets the broadcast Dec 02 09:14:25 it was a very interesting bug report Dec 02 09:17:07 i'm setting up the android sdk and now I can't remember Dec 02 09:17:11 do I want java 7 or 8? Dec 02 09:17:35 you want java 6 ;) Dec 02 09:18:06 From Google Play? Dec 02 09:18:26 well i mean the java sdk Dec 02 09:18:41 thepoosh: you get it from Google Play? Dec 02 09:18:48 you can set up java 8 but set language level to java 6 Dec 02 09:18:49 yeah Dec 02 09:19:02 What API version? Dec 02 09:19:11 Someone wrote that it's broken after 16 Dec 02 09:19:13 or something Dec 02 09:19:13 gordon_: remove that smile! RustyShackleford, it's java 6 :( Dec 02 09:19:18 i'm not sure if every java is backwards compatible Dec 02 09:19:24 Agamemnus: my targetSdk is 18 Dec 02 09:19:36 pretty sure it is Dec 02 09:19:37 Hmm. Dec 02 09:19:56 Can you spot anything obvious in my code? Dec 02 09:20:04 didn't look Dec 02 09:20:14 http://stackoverflow.com/questions/27205375/google-play-google-analytics-install-referrer-for-broadcastreceiver-in-2014 Dec 02 09:20:14 all you need to do is register the receiver in the manifest Dec 02 09:20:20 I did Dec 02 09:20:42 are you registering the Analytics receiver, and then hijacking it? Dec 02 09:21:20 I registered a custom receiver.. Dec 02 09:22:08 hi Dec 02 09:22:10 http://pastie.org/private/q4btzu4tt3em95rdawpkbg Dec 02 09:22:13 this is what we do Dec 02 09:22:44 we don;t use cordova and I don't know it Dec 02 09:23:28 thepoosh: android supports java6 on languge level Dec 02 09:23:31 *language Dec 02 09:23:42 ok, 7 on kitkat Dec 02 09:23:47 that's why the sad face was present Dec 02 09:23:51 what is your code inside the xml file? Dec 02 09:24:08 I'm just getting the string wholesale, and parsing it in my Javascript code. Dec 02 09:24:11 cordova is so cool! it can't solve any known problems - but it can drive you mad Dec 02 09:24:31 :D Dec 02 09:24:34 it solves the problem of Java Dec 02 09:24:44 somewhat. Dec 02 09:24:47 what problem? :) Dec 02 09:24:52 That it exists. Dec 02 09:25:10 :S Dec 02 09:25:12 well Dec 02 09:25:22 said someone who's writing javascript Dec 02 09:25:24 maybe M$ will donate C# to google ;) Dec 02 09:25:37 language who was created to move monkeys on the web ;) Dec 02 09:25:48 *which Dec 02 09:25:54 so here's my problem Dec 02 09:26:00 actually, "that"... Dec 02 09:26:04 but I understand. Dec 02 09:26:12 Nexus 7 + Android 5 ... the BT modem dies when tracking iBeacons Dec 02 09:26:13 thanks ! Dec 02 09:26:25 is this a "known" problem? Dec 02 09:26:34 BT modem? Dec 02 09:26:52 modem/chip/hardware Dec 02 09:26:53 Agamemnus: you can use other languge on jvm Dec 02 09:26:55 iBeacons, sounds familiar Dec 02 09:26:58 but cordova.. Dec 02 09:27:04 Agamemnus: http://pastie.org/private/pws6zftv4qf1h2xnknzeua Dec 02 09:27:25 i have to reset BT after a some time to start tracking again Dec 02 09:27:29 no issues on my S3 Dec 02 09:28:00 thepoosh: I see. Interesting. Dec 02 09:28:28 Is the broadcast receiver present on your app when another is installed, or is it present in the app that's being installed? Dec 02 09:31:06 only when my app is installed Dec 02 09:31:13 i mean Dec 02 09:31:20 which is how this API is supposed to be working Dec 02 09:31:35 so the broadcast receiver is on the app that's being installed? Dec 02 09:33:43 ok, let me reinstall again just to make sure Dec 02 09:39:18 maybe the receiver runs before the callback is set. Dec 02 09:47:47 Android beast::: Dec 02 09:48:24 Agamemnus: if you have an analytics broadcastreceiver of sorts you need to make sure it doesn't set the result to RESULT_SUCCESS Dec 02 09:48:36 to allow all the other broadcastreceivers to get it Dec 02 09:58:00 ok sure Dec 02 09:58:26 thanks Dec 02 09:58:27 gnight Dec 02 10:15:19 Hey all! Does anyone know of an Account Manager application for storing username/password to HTTP(S) servers for use in native (non-HTML) applications. Dec 02 10:23:52 Anyone to reuse JSONObjects ? Dec 02 10:24:22 Lachezar: You should avoid saving passwords Dec 02 10:24:26 Due to an API i have to use, I have to use JSONObjects, but because of the data set containing thousands of records, it creates a lot of garbage Dec 02 10:25:40 lasserix_: sucks Dec 02 10:25:49 oh yeah Dec 02 10:25:51 are you generating/parsing in a loop? Dec 02 10:25:51 it sucks Dec 02 10:26:02 im reading contact data Dec 02 10:26:03 is it a large JSONArray? Dec 02 10:26:12 i had to abandon using the array entirely Dec 02 10:26:16 was getting up to 50 mb Dec 02 10:26:16 we reuse JSONObjects when parsing Dec 02 10:26:22 shit Dec 02 10:26:29 nah i have to shove data values into json to submit them to the api Dec 02 10:26:47 worse part is that i have to do two passes, so i need to save the values some how... well Dec 02 10:26:55 that is terrible Dec 02 10:27:02 do you have to do it in a JSONObject>] Dec 02 10:27:04 ? Dec 02 10:27:09 that' Dec 02 10:27:14 s how the API was set up Dec 02 10:27:18 crap Dec 02 10:27:24 and you have no access to the API? Dec 02 10:27:24 i could do a lot of unpaid work and rework it to take bytestream Dec 02 10:27:31 hmmmm Dec 02 10:27:34 hmmmmmm Dec 02 10:27:40 anything i do extra at this point is unpaid :( Dec 02 10:27:42 can you multipart it? Dec 02 10:27:46 ? Dec 02 10:27:49 JSON has no cross-reference. Dec 02 10:28:11 50mb is too large for any API Dec 02 10:28:17 is it a web API? Dec 02 10:28:19 lasserix_: you could do a Object Map + Reference tree Dec 02 10:28:25 local host web server Dec 02 10:28:37 lasserix_: It's frugly but would work out. Dec 02 10:28:51 Lachezar: could you elaborate a little? i do something like that with the trove library already Dec 02 10:29:25 thepoosh: they didn't want to make a different code base, so they forced the api to use their web server wrapper instead of making a proper android sdk Dec 02 10:29:30 hi a question: can i retrieve the manifest of an app before downloading from playstore? Dec 02 10:31:01 lasserix_: If you have control over the protocol you can have one array with non-recursive objects, and manually recreate the tree. Dec 02 10:32:02 lasserix_: otherwise you migh be better off using a lower-level JSON parser and keep an index of read objects, and replace references to equal objects with the same object (similar to readResolve() of Serializable). Dec 02 10:32:25 Lachezar: im not parsing json, just dumping data into jsonobjects to be pushed into the api Dec 02 10:33:19 ie, each row of a sqlite table is created as a jsonobject, the jsonobject gets sent to the local web host Dec 02 10:33:20 lasserix_: Ahh... Than you have no control over the protocol. I'd suggest you put a gzip façade Dec 02 10:33:39 any work i do at this point on updating the api/sdk is totally unpaid Dec 02 10:34:05 so i am trying to do it around that, since this is a edge case (well for large data sets) when it fails Dec 02 10:34:40 lasserix_: I've done similar work: Android<->Server with XML that represents a data-base. JSON was *SHIT* there, as it has no streaming capability :( Dec 02 10:34:47 yep Dec 02 10:35:18 well the fact they didn't want to make a proper android sdk but force their existing restful web wrapper is what's really fucked up. Dec 02 10:35:23 lasserix_: I would suggest: use temporary files, use GZIP on the stream (not very hard to do). Dec 02 10:36:05 i don't control the inside of the protocol so gzip is out unless i can convince ex-coworker to do extra work (not going to happen) Dec 02 10:36:21 and i use temporary files, except it can still grow to 50 mb very quickly Dec 02 10:36:55 lasserix_: A proxy? Servers commonly handle Accept-Encoding and Request-Encoding transparently. Dec 02 10:37:24 i have no control over that end of the code base Dec 02 10:41:58 lasserix_: you could try streaming the JSON by manually pushing data on the stream, not going through the JSON objects. Dec 02 10:42:29 Lachezar: i would but at the end of the day the API only accepts JSONObjects, not a stream Dec 02 10:42:32 lasserix_: since you have no control over the server side you can only mitigate the client side. Dec 02 10:42:40 hmm Dec 02 10:42:55 lasserix_: I was refering to connecting to the REST service directly Dec 02 10:44:11 lasserix_: you have an Android lib (.jar) that does the comms? Dec 02 10:44:24 ? Dec 02 10:44:35 i think we ended up just using HTPConnection Dec 02 10:44:40 HTTPURLConnection Dec 02 10:45:16 the web server/api is actually a raw binary that is started via java.lang.runtime which is really terrible for a host of reasons but... Dec 02 10:45:27 lasserix_: Nice. So you can 'replicate' what the lib is doing, but you may opt NOT to use JSON objects, but rather do JSON streaming on your own. Dec 02 10:47:33 you mean something like the second answer here? http://stackoverflow.com/questions/24060787/sending-utf-8-string-using-httpurlconnection Dec 02 10:49:08 Hi, I'm trying to build an app that plays audio whenever a user touches or releases a button. It works fine when the press and release are apart, but if they're too close together, it appears that MediaPlayer never starts the audio. Dec 02 10:49:29 lasserix_: Well… That one is pretty limited, and is bogus, as it dumps a JSON object on the stream, which FKs up the whole STREAMING idea. Dec 02 10:50:19 lasserix_: Open the stream, wrap it in a Writer, and start writing out row-by-row, column-by-column. Dec 02 10:50:28 ahh i see Dec 02 10:50:30 thanks Dec 02 10:50:58 only problem is it means i have to rewrite a bunch of the API Dec 02 10:50:59 ;p Dec 02 10:51:11 lasserix_: wr.write("{"); wr.write(columnName); wr.write("="); wr.write(cursor.getString(1)); ... Dec 02 10:51:28 right Dec 02 10:51:29 lasserix_: Well… The API should remain unchanged. Dec 02 10:51:40 the API only accepts JSONObject or JSONArrays Dec 02 10:51:59 To ensure thread safety, I used a semaphore. Locking when the onTouch action is received, and releasing in onCompletionListener(). Dec 02 10:52:06 theoretically you can bypass all the API and do the restful calls yourself but they wanted me to use the API to do this stuff Dec 02 10:52:17 lasserix_: you're going to EMULATE JSON arrays and JSON objects by putting the appropriate {} and [] Dec 02 10:52:25 Lachezar: but if everything else fails i will do that i guess Dec 02 10:53:07 However, this seems to have proved my point, since the semaphore completely locks up the app because none of the MediaPlayer listeners are called. Dec 02 10:53:09 lasserix_: Hmm.... Maybe... Then Maybe... You can SUBCLASS the JSON object and do a LAZY loading? Dec 02 10:53:37 h6w: This is BAD on first sight. You're locking in one thread, the listener is in another thread... Dec 02 10:54:26 h6w: Locking and unlocking should happen in the same thread. You probably need an AsyncTask, or a designated Thread, or a Looper, or whatever. Dec 02 10:54:43 Lachezar: I thought so, too, but then how do I stop the UI from running the UP action before the DOWN action if the DOWN action is away playing the audio? Dec 02 10:54:51 you don't have to lock/unlock from same thread Dec 02 10:55:40 h6w you can implement click listener instead of touch listener Dec 02 10:55:42 Can I somehow tell the UI to buffer the actions until I have time to get to them? Dec 02 10:55:42 h6w: 'stop the UI from running' NO NO NO! Dec 02 10:56:41 lasserix_: Why a click listener? I want one audio played on DOWN_ACTION and another on UP_ACTION. Dec 02 10:56:54 h6w: a really good way to kill your app is to block the UI. The 'correct' way would be to create a QUEUE, and QUEUE operations from the UI, and have them executed in another thread. Dec 02 10:57:19 h6w: ahh that's kinda weird, unless its a specific action that is not a click but your original question was making it seem like a click Dec 02 10:57:38 h6w: UI processing MUST be quick. Long-running tasks should be done asynchronously. Dec 02 10:57:59 h6w: here's a way to do an input pipeline http://www.rbgrn.net/content/342-using-input-pipelines-your-android-game Dec 02 10:58:20 are you making a synthesizer? Dec 02 10:59:02 also seems like you might want to use a lower level audio api Dec 02 10:59:07 Lachezar: I understand. I put my playout code in a separate thread, but the semaphore is the problem I see. Dec 02 10:59:43 h6w: why the semaphore? Dec 02 11:01:10 h6w: The UI syncs on the queue for the ADD/PUT/PUSH operation (only), the Async Thread syncs on the Queue for the GET/POP/PEEK operation (only). Dec 02 11:02:02 Lachezar: Because my theory was that using a semaphore would hold the action in a queue until I'd processed it. Instead you're suggesting I create the queue myself and process it in a different thread. Dec 02 11:04:11 h6w: Yes! The UI is processed in a SINGLE thread. Once you block it NO OTHER events are processed! Dec 02 11:05:47 lasserix_: I took a look at the JSONArray class. You *could* subclass it, and override the get(int), put(int, Object){throw Unsupported) and length() anperform a lazy loading there. Dec 02 11:07:35 Lachezar: Hmmm. Which is why the semaphore won't work. As soon as it blocks on acquire() for the second action, the first action (still starting up a player on a separate thread) is blocked from returning to release the semaphore? Dec 02 11:08:54 Just sitting here thinking on how i can make a listview with header Dec 02 11:08:56 Because I'm blocking the whole thread rather than the action? Dec 02 11:09:13 hackable: there exists more than one library for such Dec 02 11:09:18 ListView with different header Dec 02 11:09:26 Lasserix_: Really? Dec 02 11:09:34 can you link me to one? Dec 02 11:09:54 just google Dec 02 11:09:56 there are more than one Dec 02 11:10:36 ok Dec 02 11:10:38 keyword? Dec 02 11:10:48 listview with header library Dec 02 11:11:01 they have sticky header libraries Dec 02 11:11:16 you can roll it on your own with getViewItemTypeCount Dec 02 11:11:33 return two types, disable for type 1 (header) Dec 02 11:11:44 return two different layouts or do whatever you need to Dec 02 11:12:10 adding headers is fairly straight forward -- you just have to implement base adapter override getViewItemType and TypeCount (and probably isEnabled) Dec 02 11:12:57 Hi. If I have two devices connected on adb, one of them is on wifi and the other is on USB, How can I install an APK on the wifi one without disconnecting the USB one and all that should be done using the command "adb" ? Dec 02 11:18:18 Lasserix_: thanks.. i want to write without using library.. Dec 02 11:22:27 Hi. If I have two devices connected on adb, one of them is on wifi and the other is on USB, How can I install an APK on the wifi one without disconnecting the USB one and all that should be done using the command "adb" ? Dec 02 11:22:36 http://pastebin.com/0rxnucum why ImageView cover entire LinearLayout? So, TextViews are not visible? Dec 02 11:34:22 Lachezar: Brilliant! That's exactly what I needed. Thanks! :-D Dec 02 11:35:31 kamol: centerCrop + height=wrap Dec 02 11:37:47 I want to launch an activity and get something back - without using onActivityResult but instead passing an interface or something like that. Is there a safe way to do that without risking weird behaviour? Dec 02 11:38:17 is it your activity? Dec 02 11:38:23 Yep Dec 02 11:38:36 you can use a singleton, broadcast reciever Dec 02 11:38:47 you can't pass an interface Dec 02 11:38:52 at least through an intent Dec 02 11:39:09 you can pass an instance of a class that implements an interface Dec 02 11:39:25 well ofc that is what I want to do Dec 02 11:39:26 =) Dec 02 11:39:31 but why would you? Dec 02 11:39:47 okay, what's the question again then? Dec 02 11:40:01 just use a singelton Dec 02 11:41:15 Let's ignore that android has this nice Account-managing, and just accept that I cannot use that. I want to have some nice interface for my api-s, but sometimes I need to auth, and require input of username & password. Though, I don't want every class that uses the api to have to add the onActivityResult call and stuff, all I want to do is make the call, and get the result asynchronously (sorry for that spelling) Dec 02 11:42:07 singleton that shit Dec 02 11:42:09 use a singleton Dec 02 11:42:32 singleton can register observer, you can push back async result with Dec 02 11:43:14 you don't have to register an observer. You can pass a delegate to your async method calls Dec 02 11:43:32 So, basically the api is the singleton, registers a receiver and when the login succeeds, it sends a bc and the api handles it Dec 02 11:43:34 tomato potato Dec 02 11:43:55 nah lasserix_, it's two different ways to do the same thing =) Dec 02 11:44:21 Phasip: yes Dec 02 11:44:22 delegates are like a c# thing right? ;p not java Dec 02 11:44:24 and c03, what you mean is that I don't need the broadcast, but when login succeeds it just gets the singleton class and calls it Dec 02 11:44:38 lasserix_: listeneres, whatever ;) Dec 02 11:44:50 listener = observer tomato potato Dec 02 11:45:01 lasserix_: the two different things i mean is using an observer pattern versus using a listener for every method call Dec 02 11:45:11 ahh Dec 02 11:45:15 ;) Dec 02 11:45:21 It's 2 different solutions Dec 02 11:45:44 Tomato and potato are two different things as well Dec 02 11:45:46 But I like the observer pattern better, as you also register to calls from elsewhere in the application Dec 02 11:46:07 Thanks guys! I'm not gonna join the tomato discussion. Dec 02 11:46:53 WHAT, veggies versus fruits are up next! Dec 02 11:54:52 Hi there, What are the ways to program andriod apps with C++?Qt is one.Other suggestions? Dec 02 11:58:32 learning java would be a good way :p Dec 02 11:58:56 you can hire someone who knows how Dec 02 11:59:14 hola amigos Dec 02 12:00:18 gyus i need your advice Dec 02 12:00:21 Any good idea how to use an ArrayAdapter to display subclasses of a class differently? Except during instanceof check and then rendering the class? Dec 02 12:00:37 making subclass wrappers Dec 02 12:01:00 each class can have a static instance of its wrapper Dec 02 12:01:01 im working on aplication that is using remote repository (accessed by rest api), should I nake some king of local sotrage ? and just updating this storage (from time2time) ? or should I make plain requests every time i need data ? Dec 02 12:01:09 then you can just do getWrapper.wrap() which returns the view Dec 02 12:01:15 platzhirsch: you must override getViewTypeCount() Dec 02 12:01:20 hi Dec 02 12:01:25 danijoo: oh yes, I am doing that Dec 02 12:01:30 whats is the best way to get my context in my activity? Dec 02 12:01:41 activity is a kind of context Dec 02 12:01:42 danijoo: I mean the getView implementation Dec 02 12:01:49 thanks Dec 02 12:01:57 platzhirsch: each subclass has a static object which has a wrap function which returns the view Dec 02 12:02:11 then you just do getWrapper() (abstract ins uper class) which returns this Dec 02 12:02:12 platzhirsch: if you override getViewTypeCount() and getItemViewType() correctly, the adapter recycles those views independent Dec 02 12:02:16 object, then voila Dec 02 12:02:18 lasserix_: yeah I was wondering about this Dec 02 12:02:28 so you can be sure that the recycled view will be of the desired type Dec 02 12:02:40 I was just a bit reluctant to do that mixing model classes with view implementation details Dec 02 12:02:50 you're not Dec 02 12:03:00 the wrapper is a controller class Dec 02 12:03:00 danijoo: yes, I think otherwise it does not work at all Dec 02 12:03:23 and you can think of model + wrapper = presenter class Dec 02 12:03:32 danijoo:I don't wanna learn Java.:P Dec 02 12:03:35 = presenter pattern, i mean Dec 02 12:04:04 Gforce: then I have bad news for you.. Dec 02 12:04:19 lasserix_: wouldn't that leave me with a wrapper subclass for each of my model subclasses? Dec 02 12:04:31 that's why you make it static Dec 02 12:04:40 just make a static inner class with a static instance Dec 02 12:04:44 danijoo:I guess i can hear that!:( Dec 02 12:04:49 nice cause you can swap it out later easily too Dec 02 12:05:24 lasserix_: sorry I am bit a slow.. the static inner class goes into which class? The parent model class? Dec 02 12:05:49 well it doesn't matter, but if you want your code to be concise, you can throw each wrapper subclass into its respective model class Dec 02 12:05:58 right Dec 02 12:06:00 then make a static instance as a member of the model Dec 02 12:06:10 and add an abstract method getWRapper() on the super model class Dec 02 12:06:18 then in getView you can det view type and do getWRapper.wrap Dec 02 12:06:22 or however Dec 02 12:07:07 The complexity of this is blowing up, retry dialogs have to be done on postexecute and the asynctask has to be rerun Dec 02 12:07:09 platzhirsch: what I usually do is having an interface and multiple viewclasses which work as ViewHolder. then its rather easy to make a list of that interface type and use it in the adapter Dec 02 12:13:34 danijoo: this sounds reasonable Dec 02 12:14:03 platzhirsch: I can give you an example if you want Dec 02 12:14:34 danijoo: I'd love to see if it doesn't cause any work, I think I have a good idea of what you're talking about, but it's sometimes nice to see the quirks of it Dec 02 12:21:00 Assumingly it would be the best that each ViewHolder returns a fully initialized/set View which can then just be returned in getView() Dec 02 12:21:22 platzhirsch: thats how it would look without viewholder, but I think you can get the point from it http://pastebin.com/rfj64z9D Dec 02 12:26:08 danijoo: beautiful, thanks a lot Dec 02 12:26:11 yw Dec 02 12:41:26 If i have a font that is a bit reluctant to work on Android. What can I do? Dec 02 12:43:12 marrrk: persuade it into going along with your plans Dec 02 12:43:28 marrk render via opengl by using texture Dec 02 12:43:35 is it ok to store result of API request in android database and in case that network is not availa use these data instead ? Dec 02 12:43:54 c03: But how? What works best on them? Threatening, bribes, persuasion? Dec 02 12:44:12 marrrk: sexual favours mostly Dec 02 12:44:26 I don't even know its gender. Dec 02 12:44:49 sonicxx: depends on your business logic.. Do you absolutely NEED fresh data? Dec 02 12:44:57 marrrk: come on now, don't be choosy Dec 02 12:45:04 marrk you can just dump all your font characters into a bitmap, then manually piece the words together ;) Dec 02 12:45:28 I thought there could be some tools that fix potential issues with fonts. Dec 02 12:46:17 I like lasserix_'s idea ^^ Dec 02 12:46:40 c03: probably not, I need updetes from time to time only, so should I create local database and store data there ? and if connection is available then update Dec 02 12:47:27 sonicxx: yea, you could let your data have a time-to-live, if it's too old, try and fetch new Dec 02 12:56:08 lasserix_: I probably have to do something like that because there's no SVG support on Android, right? Dec 02 12:56:32 there svg support libraries Dec 02 12:56:37 *is Dec 02 13:00:25 are? Dec 02 13:02:14 yea Dec 02 13:03:00 anyone happen to know where the source code is that generates: W/RTSPSource( 190): Unsupported format. Ignoring track #1. Dec 02 13:03:05 I'd like to have a look at it.... Dec 02 13:04:46 search for it Dec 02 13:05:04 http://stackoverflow.com/questions/449763/where-can-i-browse-android-source-code-on-line Dec 02 13:09:32 danijoo, yeah, I've been trying, but without success... I don't want to download N git repositories just to hunt for it Dec 02 13:09:41 grep Dec 02 13:10:15 grepcode Dec 02 13:11:21 this one works well: http://androidxref.com/source/xref/frameworks/av/media/libmediaplayerservice/nuplayer/RTSPSource.cpp Dec 02 13:14:13 thanks Dec 02 13:14:46 more specifically: http://androidxref.com/5.0.0_r2/xref/frameworks/av/media/libstagefright/rtsp/MyHandler.h#1567 =) Dec 02 13:17:31 yeah, I found it.... that's a nice site... Dec 02 13:18:30 looks like the damn thing does not accept VP8 :-/ Dec 02 13:18:34 http://androidxref.com/4.2_r1/xref/frameworks/av/media/libstagefright/rtsp/APacketSource.cpp Dec 02 13:24:38 hasn't vp8 been supported since 2.3 or something? Dec 02 13:25:04 ah, streamable vp8 is from 4.0. Dec 02 13:28:49 i have this in my receiver's permission tag, android:permission="com.google.android.c2dm.permission.SEND" Dec 02 13:28:58 it is from a sample app that i downloaded. Dec 02 13:29:12 now the receiver gets invoked even when there's no uses-permission with that same string Dec 02 13:29:22 what am i missing as i cannot understand how it works Dec 02 13:29:31 with just a mention in the android:permission of the receiver tag Dec 02 13:29:33 appel1, but looking at that code, it's going to ignore VP8 Dec 02 13:29:41 and no permission or uses-permission with that same exact string Dec 02 13:30:12 davidw: using something other than stagefright for vp8 then? Dec 02 13:31:01 appel1, mmmmm I'm not really the android guy around here... they need to be able to use mediaplayer or something, I think, so as to integrate it into an application Dec 02 13:33:11 davidw: I would've thought that it would just work if you used the MediaPlayer apis. Dec 02 13:33:35 Android version distribution over last 2 years > http://blog.davidecoppola.com/2014/12/02/android-version-distribution-over-time-december-2014-update/ Dec 02 13:34:07 davidw: can it be some kind of container issue? Dec 02 13:44:12 Using android-studio, how do I add an image asset whicn isn't an icon? Dec 02 13:53:20 How can a long in a column be null? Dec 02 13:53:24 is this equivalent to 0? Dec 02 13:54:53 i have animations (objectanimators) in 3 fragments which are in a viewpager. when i swipe back and forth fast it progressively takes a very long time for the fragment to load and animation to load... I am using a FragmentStatePagerAdapter to destroy the fragments when out of view but it's still very very slow Dec 02 14:05:29 http://pastebin.com/0rxnucum why ImageView cover entire LinearLayout? So, TextViews are not visible? Dec 02 14:09:14 hi guys, Im running a custom theme based on the Holo.Light Theme. However my soft keyboard is dark. Is it possible to specify the keyboard to light instead? Dec 02 14:14:30 pangelovski: You want to force a specific keyboard on the user, or do you already use your own? Dec 02 14:18:51 flan3002:i want to force a specific one. Dec 02 14:18:56 https://stackoverflow.com/questions/27251621/custom-ratingbar-styles-only-show-one-dot-other-weird-behavior Dec 02 14:20:42 pangelovski: From a user POV, that's inacceptable in most cases. I don't know how to do that, but why would you need that? Dec 02 14:22:34 http://pastebin.com/0rxnucum why ImageView cover entire LinearLayout? So, TextViews are not visible? Dec 02 14:27:56 kamol Dec 02 14:28:03 centercrop + wrapcontent is not defined Dec 02 14:28:15 if your image is large, it'll take up all available space Dec 02 14:28:46 lasserix_: how to make it so it will not take up all available space? Dec 02 14:28:56 max size Dec 02 14:29:00 use a relative layout Dec 02 14:29:03 different ways Dec 02 14:29:25 it helps if you know what do you want to achieve. Dec 02 14:29:57 lasserix_: I am trying with RelativeLayout already, still cannot get it.. let me try again. Dec 02 14:32:29 lasserix_: can you elaborate “max size in relative layout”? Dec 02 14:34:02 with the nav drawer, do yall generally implement the fast but jerky close animation or the slow but smooth close animation? Dec 02 14:37:53 mattblang, I prefer fast but smooth tbh :P Dec 02 14:38:37 Mavrik lol, would be nice, but it seems like the only way to make it smooth is to let the drawer close first then load a screen Dec 02 14:39:20 mattblang, see on the profiler what's going on the main thread for it to be stuttery Dec 02 14:48:06 mattblang: or load, then close Dec 02 14:49:40 Mavrik its a ListView. I switched to loaders for the backing data. I dont think there is much you can do since the close animation and onCreateView will be competing on the main thread. c03 yeah, you can do that or close then load. either way you are artificially making the close animation slower Dec 02 14:50:04 mattblang, animations don't really compete with anything when they're done right Dec 02 14:50:06 yup Dec 02 14:50:09 they're executed by compositor anyway Dec 02 14:50:17 pick your poison Dec 02 14:50:22 mattblang, so again, check what's going on the main thread when it stutters. Dec 02 15:04:13 i'm trying to hide views in a viewpager when the fragments are not visible.. i override setUserVisibleHint and when the paramter is false I hide the views. This does nothing they are still visible when I swipe back to the fragment Dec 02 15:09:57 Hey! I have a question regarding updating a webview inside a fragment Dec 02 15:11:13 I have a listview inside a fragment (tab) and when I click on a row in the listview, I want to switch tab to another fragment holding a webview, and then pass a URL from the listview to the webview. Dec 02 15:11:16 Is that possible to do? Dec 02 15:12:44 I'm using this in the customAdapter onClick to change tab: fragment0.getActivity().getActionBar().setSelectedNavigationItem(1); Dec 02 15:13:07 But I don't know how to reach the webview inside fragment1 Dec 02 15:27:07 aceus: Shouldn't this functionality be inside the owning activity, not in the fragment? Dec 02 15:27:25 hm Dec 02 15:27:40 How do you mean? Dec 02 15:27:54 That i have public references to the webview from the mainactivity? Dec 02 15:28:01 *a public reference Dec 02 15:35:52 pfn: ok it's working ! sbt + scala + robolectric <3 Dec 02 15:38:43 now nothing stops me from sbt ~ test :D Dec 02 15:38:45 and guard Dec 02 15:45:48 Please help, path.lastIndexOf('/') return null Dec 02 15:47:32 returns null or npe? Dec 02 15:49:00 I have to fetch, store and access large number of images in my app. What is the best practice to do this? Dec 02 15:50:07 lastIndexOf never returns null Dec 02 15:50:16 gordon_, of course, yeah, it's good Dec 02 15:50:43 gordon_, a pity that we can't make scalatest work, but robolectric does lots of magic, and much of its implementation is pretty tied to the default test runner Dec 02 15:50:45 which is pretty annoying Dec 02 15:51:02 gordon_, I wasted a shitton of time rewriting the test runner yesterday, quite painful Dec 02 15:54:07 return null Dec 02 15:54:31 pfn, i'm confuse.. why null? Dec 02 15:54:43 Hi. How is an activity is restored aftern turning the screen off and then on again and unlocking? My activity is controlling a recording service and is not restored after i turn off the screen again, even if it was the last activity active. Dec 02 15:55:11 hackable, it's not Dec 02 15:55:15 hackable, it never returns null Dec 02 15:55:41 really... Dec 02 15:56:16 yes, really Dec 02 15:56:31 throwing a null pointer is a different matter, and that would be caused by path being null Dec 02 15:56:38 learn the difference well Dec 02 15:56:46 use this String path = Uri.decode(mFilePath) them path.lastIndexOf('/') Dec 02 15:57:01 yes... null pointer Dec 02 15:57:08 that the error.. Dec 02 15:57:16 then path is null Dec 02 15:57:17 fix it Dec 02 15:57:23 Caused by: java.lang.NullPointerException Dec 02 15:57:31 freiform: dpends on how the activity is declared, but generally it is onPause() onDestroy() onCreate() onRestore() Dec 02 15:58:21 freiform: the last is onResume(). Writing off-the-top-of-my-head. Dec 02 15:58:38 Lachezar: so teh lifecycle methods are calles on the last active activity in any case? Dec 02 15:59:46 freiform: You mean the top of the activity stack? I think the same methods are called on the activities below, but are not onCreate()-ed and onResume()-ed untill needed. Dec 02 16:01:03 freiform: Jobs that need to be running independent of the UI state are commonly refactored into Service and the UI just controls the Service instance. Dec 02 16:02:53 what is the best way to store large number of images?? Dec 02 16:02:53 freiform: the activity may be declared with 'android:configChanges="orientation"' in which case the activity is NOT re-created when the orientation changes (and the UI is not re-created, just resized). Dec 02 16:03:05 Gaile: cloud? :):):) Dec 02 16:03:09 Lachezar: ah, the problem seems to be in my app. when i turn off the display, onPause() and onStop() get called, after i unlock the phone onRestart() on Start() onStop() and onDestroy(). I probably made an error checking statde-variables. Dec 02 16:03:35 Lachezar Locally. Dec 02 16:03:55 freiform: I admit, that the life-cycle of an activity in response to device configuration changes and on-off cycles sometimes eludes me. Dec 02 16:04:19 Hey, anyone here use robospice? I am having trouble understanding how I should make requests that are sent as posts with json content Dec 02 16:04:44 Gaile: then it's SD Card only (External Storage) Dec 02 16:05:16 please, how can i get path to a file in assest folder Dec 02 16:05:43 Lachezar what if SD card is not present. Dec 02 16:05:43 Lachezar: normally I find it non-critical, but we're trying to implement a robust recording system for non-tech-savvy probands. I find it quite difficult to catch everything that might go wrong. Dec 02 16:07:12 Gaile: Then you're in trouble. Android devices have limited resources. You need to consider that. Dec 02 16:08:02 Wooooo Android dev Dec 02 16:08:43 freiform: Make a service, create it in onCreate() of the Activity. in onStoreNonInstanceState() (or something like that) remember the service instance. In onRestoreNonInstanceState() (or something like that) get the service reference from the store object. Dec 02 16:09:16 Gaile: what do you do on your PC when you have insufficient space for your images? Dec 02 16:10:03 Lachezar: that's basically what we're doing. There's a USB-Audio-Interface involved which causes the most problems (user-wise). Dec 02 16:10:05 freiform: A.K.A. Make a Service to work, and let the Activity be a thin remote-control for the service. Dec 02 16:10:31 freiform: Services are not succeptable to device configuration changes. Dec 02 16:14:50 freiform, I'm a wannabe-musician and I use audio interfaces daily and I can't understand how it could pose a problem to a user -.- Dec 02 16:15:58 but then I often wonder why people have trouble with things, so I guess my views are not useful :p Dec 02 16:40:16 How to check if device storage(internal or external) is about to run out from my app? Dec 02 16:54:18 alaz: you mean cache? Dec 02 16:55:20 no just internal and external storage. And does cache have different meaning in android? Dec 02 16:56:42 alaz, what do you mean "run out from your app"? Dec 02 16:56:44 you have as much external storage as there is room Dec 02 16:56:52 there is no per app size for that Dec 02 16:57:45 for internal storage (i think you actually mean cache), there is as much room as there is left internally, but the system might delete your apps cache whenever it feels like Dec 02 16:59:13 no i mean if storage is about to run out in device, can i get this information in my app?? Dec 02 17:01:48 Hi Dec 02 17:02:33 what should I want to use *two* libraries that require an activity extending a certain class? Dec 02 17:02:48 I can't extend more than one class, and I really want to use both libraries Dec 02 17:03:09 alaz: http://developer.android.com/reference/java/io/File.html#getFreeSpace() Dec 02 17:03:34 Mattx: what libraries? They often provide a second solution for not extending Dec 02 17:03:58 You could also look into the code of one library and make the method calls in your own class Dec 02 17:03:59 Youtube API (YouTubeBaseActivity) Dec 02 17:04:00 danijoo i have to store some large files. so i fear that it may result in out of storage space. i want to prevent this situation but i dont know how can i do that Dec 02 17:04:11 akar: see the link Dec 02 17:04:13 and SherlockFragmentActivity Dec 02 17:04:40 why would anyone still use sherlock? Dec 02 17:05:54 because I feel it's more flexible. I don't like the application having a menu that doesn't move the whole viewport of the app Dec 02 17:06:01 can I do that with the native side menu? Dec 02 17:06:26 https://camo.githubusercontent.com/d500f218033319e9980180b7c1183766fa808ed8/68747470733a2f2f7261772e6769746875622e636f6d2f646d697472792d7a6169747365762f416e64726f6964536964654d656e752f6d61737465722f73637265656e73686f742e6a7067 Dec 02 17:06:30 this is the native way ^ Dec 02 17:06:59 appcompat can do that Dec 02 17:07:00 http://www.haploid.fr/blog/wp-content/uploads/2012/07/facebook_slide_menu_haploid.png Dec 02 17:07:08 this is the way I want the menu ^ Dec 02 17:07:14 appcompat can do that. Dec 02 17:07:37 mot that easy but possible Dec 02 17:07:52 now you see why anyone still use sherlock? :P Dec 02 17:07:57 no Dec 02 17:08:00 appcompat does that easily Dec 02 17:08:03 Toolbar Dec 02 17:08:18 mot that easy but possible ? which one? Dec 02 17:08:41 Mattx: first one is native, second one can be done which some work Dec 02 17:08:55 that's my point. you can do that easily with sherlock Dec 02 17:08:58 that's why I still use it Dec 02 17:09:32 First one is a toolbar above the drawer, second one is a toolbar in the content of the drawer Dec 02 17:09:50 Both easy, and not horribly outdated Dec 02 17:10:12 SimonVT: in the second one the toolbar moves to the right when menu is opend so its a bit more work then just toolbar in content Dec 02 17:10:21 but its really not that hard to write that. Dec 02 17:10:45 No, it's not Dec 02 17:10:52 You can put the Toolbar wherever you want in your layout Dec 02 17:10:56 That's the point of Toolbar Dec 02 17:11:15 yes Dec 02 17:11:22 ok, but even if I remove sherlock. what happens if I need another lib that force me to extend a certain activity class? Dec 02 17:11:38 (I'll remove sherlock anyway, I suppose you're right, it's old...) Dec 02 17:11:39 refactor Dec 02 17:11:40 but the classic behaviour of nav drawer is to overlay everything thats in its content, not to move it to the side Dec 02 17:11:43 i think thats the point Dec 02 17:13:08 how can i position an imageview above/over a viewpager? Dec 02 17:13:16 The classic behavior of the drawer is to move everything to the side. Then google thought "we have to find a way to provide this functionality without getting sued by facebook" Dec 02 17:13:28 And thus the overlaying drawer was born Dec 02 17:13:56 (not really, but moving the content to the side existed way before googles recommendation) Dec 02 17:13:59 MartialLaw: RelativeLayout Dec 02 17:14:24 i am using relativelayout. and it is positioned on top of it but when i go to run it it is below the viewpager Dec 02 17:14:51 LinearLayout Dec 02 17:14:55 weight Dec 02 17:15:26 MartialLaw: the layouts are positioned in the order they are in the xml. if you want the image to be above it you need to put it under the viewpager in xml Dec 02 17:15:42 can robolectric parse the PARENT_ACTIVITY attribute of an activity from the manifest? Dec 02 17:15:46 wait.. do you mean above in z or x axis? Dec 02 17:15:50 it would be a bit of a pain to use LinearLayout at this point Dec 02 17:15:57 danijoo: thank you i will try that right now Dec 02 17:16:33 danijoo: thanks dude Dec 02 17:16:58 NavUtils.getParentActivityIntent(this); seems to be returning null during tests Dec 02 17:17:14 should I ever use the support lib? for instance "android.support.v4.app.FragmentPagerAdapter" Dec 02 17:17:40 I mean, is it normal to use android.support.v4 for some adapters, views, and the like? Dec 02 17:17:46 Mattx: If you go for support, you should use ONLY support lib Dec 02 17:18:04 I can't find the FragmentPagerAdapter outside support Dec 02 17:18:10 because there is no Dec 02 17:18:13 its only in support Dec 02 17:18:15 ok, then I need it Dec 02 17:18:19 ;) Dec 02 17:19:18 but thennnn, in this activity that previously extended sherlock and now extends YoutubeBaseActivity I can't do getSupportFragmentManager() Dec 02 17:19:39 and now everything is crashing, yay! :) Dec 02 17:20:44 Mattx: use a YouTubePlayerFragment instread of the activity Dec 02 17:20:51 then your activity can inherit from whatever you want Dec 02 17:24:23 Anyone familiar with the nav drawer and this error? http://pastebin.com/2txLsK9K Dec 02 17:24:29 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference Dec 02 17:24:45 at android.support.v4.widget.DrawerLayout.onInterceptTouchEvent(DrawerLayout.java:990) Dec 02 17:28:09 Three children in a linear layout. All of equal size. Why doesn't teh first child start all the way to the left? Dec 02 17:28:44 because you dont have the orientation set that way is my bet Dec 02 17:28:50 set the orientation to horizontal? Dec 02 17:29:03 android:orientation="horizontal"> Dec 02 17:29:05 I have that Dec 02 17:29:11 tricknology: see the link in the topic for that Dec 02 17:29:19 oh wait Dec 02 17:29:23 there is a stacktrace :0 Dec 02 17:29:28 then the code ! :P Dec 02 17:29:37 it’s literally the example from google Dec 02 17:29:38 but ok Dec 02 17:29:51 submitting the stack trace to this bug.. it seems common Dec 02 17:30:03 If I could at least preview the stupid design in IntellJ Dec 02 17:30:12 or better yet IntelliJ Dec 02 17:30:12 marrrk: you cant? Oo Dec 02 17:30:41 Either it has some Rendering issue or "Nothing to show". It never works. Dec 02 17:30:50 works ! Dec 02 17:31:05 custom controls ? Dec 02 17:31:06 thats weird. i have no problems at all in intellij Dec 02 17:31:38 if oyu have custom controles you will have problem Dec 02 17:31:48 then you need to check for... Dec 02 17:31:52 isEditable ? Dec 02 17:31:57 what was that method again.. Dec 02 17:32:27 I think this one doesn't even have custom controls. But of course all the others do. Dec 02 17:32:49 so you need to put some sample data to controls Dec 02 17:32:53 https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=77926 Dec 02 17:33:03 Well right now it seems to have followed Jonathan Ive's advice. Dec 02 17:33:21 stole braun design and patent it ? Dec 02 17:33:40 Make it fucking white! Dec 02 17:33:43 View.isInEditMode() Dec 02 17:33:47 I guess is the thing I need Dec 02 17:33:48 hahah Dec 02 17:33:53 yes, that's it Dec 02 17:34:08 "I can replicate this issue fairly frequently." and not given steps to replicate.... well played ! Dec 02 17:34:37 But then there is: "android.support.v7.widget.Toolbar" of course which it doesn't know how to render. Dec 02 17:34:49 marrrk: oh. you have that problem Dec 02 17:34:51 well it’s literally the example Dec 02 17:34:51 update intellij Dec 02 17:34:57 open and close the nav drawer a few times Dec 02 17:35:01 crash Dec 02 17:35:07 tricknology: works fine for me.. Dec 02 17:35:14 I'm on 14.0.1 Dec 02 17:35:25 marrrk: there is one intellij version where all the new ui elements like cardview and toolbar didnt render Dec 02 17:35:46 im not sure if its fixed in the stable version though Dec 02 17:35:57 but im on the newest EAP version and dont have that problem anymore Dec 02 17:36:16 danijoo: intellij cannot render toolbar Dec 02 17:36:25 nor can anroid studio Dec 02 17:36:31 Aha! Dec 02 17:36:38 It is probably really difficult to render. Dec 02 17:36:41 AFAIK Dec 02 17:36:50 I'm getting the EAP now Dec 02 17:37:01 gordon_: want me to do a screenshot? :) Dec 02 17:37:04 you will have to updare gradle plugin too Dec 02 17:37:05 Grr. I will have to change the icon again. Dec 02 17:37:06 danijoo: ye ! Dec 02 17:37:08 *yes Dec 02 17:37:14 I'm not using gradle. Dec 02 17:37:20 Once I strangled to serpents in my gradle. Dec 02 17:38:15 ah Dec 02 17:38:20 so you have fast builds :D Dec 02 17:38:33 i'm sure my builds are slower than yours :) Dec 02 17:38:34 https://www.youtube.com/watch?v=ODQWPI3792g&feature=youtu.be&t=4m08s Dec 02 17:39:08 marrrk: I guess your clean build doest take 5 minutes ;) Dec 02 17:39:18 Or are you running proguard on every debug build? Dec 02 17:39:27 Hmm. Okay you might win. Dec 02 17:39:29 I do Dec 02 17:39:30 I will time it. Dec 02 17:39:51 I think it's about 2 minutes Dec 02 17:40:07 ok let me make it :D Dec 02 17:40:24 danijoo: I would like you to send a screenshot of a rendered toolbar. Dec 02 17:40:45 If I win, it's just because my machine is so fast! :) Dec 02 17:41:12 is there a notifyDataSetChanged for ViewPagerIndicator that doesn't completely recreate tabs? Dec 02 17:41:22 I just want to notify appearance changed, not all data changed Dec 02 17:42:30 calling notifydatasetchanged is incredibly expensive :( Dec 02 17:44:06 le code: http://pastebin.com/jKMmZVPa Dec 02 17:44:43 marrrk, gordon_: http://postimg.org/image/vardjj4cv/ Dec 02 17:46:16 php! Dec 02 17:46:20 I guess I'll rate-limit calls to tabpageindicator.notifydatasetchanged Dec 02 17:47:43 expensive, why? Dec 02 17:48:46 danijoo: nice Dec 02 17:49:03 With my custom view, if I say "someChildView.whatever", I get an NPE in the graphical designer. Dec 02 17:49:17 I have to say "if (!isInEditMode())" to get around this. Dec 02 17:49:18 Weird. Dec 02 17:49:20 3rd party nav cdrawer it is.. Dec 02 17:49:39 gordon_: if its not working for you too, it seems like its just not yet in the stable release Dec 02 17:50:39 danijoo: I downloaded the EAP Dec 02 17:50:41 I am curious Dec 02 17:50:49 danijoo are you on AS and using the nav drawer template? Dec 02 17:51:00 yea said it works for you.. Dec 02 17:51:08 tricknology: im on intellij and I dont use any templates at all Dec 02 17:51:42 now I get Missing styles. Is the correct theme chosen for this layout? Dec 02 17:52:24 Hmm. danijoo do you have theme that inherits from one of the appcompat themes? Dec 02 17:52:42 marrrk: yes Dec 02 17:53:02 btw the issue you face in the stable version is this one, i think: https://code.google.com/p/android/issues/detail?id=77682 Dec 02 17:53:03 And does it have a "toolbarStyle" ? Dec 02 17:53:11 marrrk: nope Dec 02 17:53:26 becasue that's what it's complaining about for me Dec 02 17:53:39 Failed to find style 'toolbarStyle' in current theme Dec 02 17:54:11 I just opened a new project for the screenshot and it worked out of the box without doing any style at all Dec 02 17:54:17 I guess the problem sits deeper, because it doesn't even find @style/Theme.AppCompat.NoActionBar in my themes.xml Dec 02 17:54:22 i just compiled supports libs and added it in xml Dec 02 17:54:34 how can i detect when a edittext is in began edit mode Dec 02 17:55:11 Does anyone here use crashlytics? Dec 02 17:55:14 I think IntelliJ just is overwhelmed and unable to process resources from aar files. Dec 02 17:55:40 pangelovski: textwatcher? Dec 02 17:55:47 eghdk: yes Dec 02 17:56:45 I was wondering if all the data (crash reports) get sent to crashlytics servers (well of course they do right?) and if theres any way for them to just be sent to my servers. I don't want crashlytics to have any personal info potentially. Dec 02 17:57:05 Like, can I install crashlytics on my own server danijoo ? Dec 02 17:57:10 no Dec 02 17:57:31 eghdk: You should be able to do that with ACRA Dec 02 17:57:38 and you should never ever send personal information over crash reportng tools anyways Dec 02 17:57:44 danijoo:i have a single edit text on an activity, and the thing is that the focus is automatically set on the edittext so the cursor is blinking. I want to only show the cursor when the edittext is in edit mode. is this possible? Dec 02 17:58:04 ACRA? Dec 02 17:58:19 pangelovski: thats a known issue. just request the focus on another layout in onCreate Dec 02 17:59:00 eghdk: not AFAIK, at least for the free plan. They may have enterprise solutions for that Dec 02 17:59:05 Oh, restarting Eclipse fixed the NPE in the graphical designer. Dec 02 17:59:09 eghdk: Google it. Dec 02 17:59:19 Restarting Eclipse seems to cure all world issues. Dec 02 17:59:30 How about uninstalling Eclipse? Dec 02 17:59:31 Hey guys, just want to ask which Min API you use for new projects mostly :)? Dec 02 17:59:41 Bugsnag lets you do that on their enterprise plans Dec 02 17:59:42 14 Dec 02 17:59:44 ArcaneWater: I'm using 4.0.3, but many go higher. Dec 02 17:59:53 danijoo:i am. i have an ontouchlistener on a transparent layout and when the user touches it, the edittext should clear the focus. When i click on the layout, the keyboard hides, but the cursor on the edittext is still blinking Dec 02 17:59:53 15 Dec 02 17:59:58 It's mainly because one of my devices is on 4.0.3. :) Dec 02 18:00:03 ArcaneWater: 15 Dec 02 18:00:25 Yeah i was thinking about 15 too hope others wont be disapointed ^^ Dec 02 18:00:31 I think below 15 is rarely a good idea. Dec 02 18:00:37 ^ Dec 02 18:01:14 I'll just forget about this stupid preview stuff. Dec 02 18:01:15 ArcaneWater: <15 is so old now. It's around 10% and dropping. I wouldn't worry about it. Dec 02 18:01:26 <15 means way more development pain and fewer features. Dec 02 18:01:42 but same goes for <21 :p Dec 02 18:01:43 ArcaneWater: Also consider that you probably won't be done with the project in a week. Dec 02 18:01:54 True. lol Dec 02 18:01:57 Just more users. Dec 02 18:01:59 yep Dec 02 18:02:01 Mo' users, mo' problems. Dec 02 18:02:12 marrrk i know :) I am full time android developer ^^ Just considering now because of rewriting :D Dec 02 18:02:17 I can't find ViewPager in support lib v13 but it seems it exists (https://android.googlesource.com/platform/frameworks/support/+/4c2eb6dc16814bc44915d7603d1af465dff0407d/v13/java/android/support/v13/view/ViewPager.java) Dec 02 18:02:19 danijoo, that does not solve my issue. sure i can clear the focus on activity startup but how about when the user is in "edit mode" and then click on the layout. Dec 02 18:02:20 what could be the problem? Dec 02 18:02:45 pangelovski: then it should clear itself.. if you dont do anything really strange.. Dec 02 18:02:45 Three children once went into a LinearLayout. However they all refused to go all the way to the left. What was their reason for it? Dec 02 18:02:46 I'm trying to remove the dependencies to old lib that I was using.. Dec 02 18:03:05 marrrk, layout_gravity Dec 02 18:03:27 Sounds promising Dec 02 18:04:01 Mattx: use the v4 one, the v13 doesnt work with supportfragments Dec 02 18:04:05 libs * actually I had many :P Dec 02 18:04:18 Are there any troubles supporting colored status bar for pre 21? Dec 02 18:04:28 So many types of gravities. Dec 02 18:04:43 danijoo, I removed all supportfragments. I think the last dep to v4 is this ViewPager, everything else that I'm using is in v13 Dec 02 18:04:44 ArcaneWater, only supported in v19 Dec 02 18:04:55 Mattx, there's no reason to remove -v4 dependency Dec 02 18:05:00 support-v13 is mostly useless Dec 02 18:05:03 ArcaneWater: if you mean "not supported at all", then yes, there are trubles Dec 02 18:05:05 That's being ignored, too Dec 02 18:05:10 pfn, why? Dec 02 18:05:21 Mattx, because there's nothing in there of value for 99% of apps Dec 02 18:05:29 unless you need some accessibility stuff that was added later Dec 02 18:05:34 that's about the only thing v13 has Dec 02 18:05:46 Mattx, support-v13 doesn't mean it's newer than -v4 Dec 02 18:05:54 people need to understand that Dec 02 18:05:58 it seems it has a lot more. I'm taking from there fragment adapters for instance Dec 02 18:06:35 import android.support.v13.app.FragmentPagerAdapter; Dec 02 18:06:37 Mattx, yeah, Fragment adapters are the only thing it has, really Dec 02 18:06:39 Mattx: they are all in v14 too Dec 02 18:06:48 v4*. Dec 02 18:06:48 Grr. Dec 02 18:06:52 oh adapters. mh Dec 02 18:06:54 what should I be using guys? I'm confused now u.u Dec 02 18:06:57 v4 Dec 02 18:06:59 use v4 Dec 02 18:07:01 actually, I was wrong, it just has stuff for native android.app.Fragment Dec 02 18:07:07 not even for accessibility Dec 02 18:07:11 can i install 3 APKs from my app and request user confirmation (for permissions) just once? Dec 02 18:07:14 https://gist.github.com/i-am-the-slime/037c08d344942be54a03 Dec 02 18:07:17 pfn: v13 is just v4 but with native fragments Dec 02 18:07:23 danijoo, right Dec 02 18:07:29 luist, no Dec 02 18:07:35 I have a "Load More" view at the bottom of my ListView. When clicked, it turns into a progress bar. Then, either the view collapses to be the height of the progress bar (which feels weird) or it stays the same height (which looks weird). Hard to decide what's best. Dec 02 18:07:39 danijoo, and no, it's not "just -v4" Dec 02 18:07:48 danijoo, v13 is *only* the adapters for native fragments Dec 02 18:07:50 yeah i mean in the fragment aspect Dec 02 18:07:52 danijoo, that's exactly what I need! but ViewPager is not in v13. should I mix both libs? v4 and v13 Dec 02 18:08:00 v4 has more stuff included than that Dec 02 18:08:01 pfn: oh well… can i accept all the permissions first than install all the apks? Dec 02 18:08:02 actually viewpager is in v13, but not in my sdk for some reason (?) Dec 02 18:08:02 Mattx, -v13 is not newer than -v4 Dec 02 18:08:05 -v13 *requires* -v4 Dec 02 18:08:19 luist, no Dec 02 18:08:23 Mattx: you should read http://developer.android.com/tools/support-library/index.html Dec 02 18:08:31 this tells you what versions to use Dec 02 18:08:33 let's see Dec 02 18:08:49 pfn: really? doesnt google play ask for all the permissions first before updating like, 10 apps? Dec 02 18:09:12 luist, that's google play, not arbitrary apps Dec 02 18:09:23 luist: it asks for every app one by one, not for all together.. Dec 02 18:09:25 luist, do not use any gapps as any example of how things can be done Dec 02 18:09:33 danijoo, it asks all together prior to updating Dec 02 18:09:36 if you choose update-all Dec 02 18:09:44 but gapps are not an example of how things can be done Dec 02 18:09:52 pfn: doesnt it ask for one by one in seperate dialogs? I thought it does.. Dec 02 18:09:53 gapps and system apps Dec 02 18:09:59 danijoo, separate dialogs, but all at once Dec 02 18:10:16 update all -> accept all dialogs -> then updates start Dec 02 18:10:24 * pfn shrugs Dec 02 18:10:31 or start in background, who knows, either way Dec 02 18:10:34 it's all at once Dec 02 18:10:37 well lets say i have to distribute 20 apps for a project with 10000 tablets… i want to reduce the time spent for the technician Dec 02 18:10:38 thats seperate for me :) Dec 02 18:10:50 luist, custom rom Dec 02 18:10:54 always the solution Dec 02 18:11:12 pfn: the rom is a public one from the government and we won’t be able to change it Dec 02 18:11:22 public from government => easier Dec 02 18:11:28 have govt include the applications in Dec 02 18:11:32 problem solved Dec 02 18:11:47 what i mean is, the hardware provider will already provide with this rom, we wont be able to customize it Dec 02 18:12:08 there is no solution Dec 02 18:12:12 :P Dec 02 18:12:24 theres always a solution, maybe its a bad one Dec 02 18:12:34 i need the less bad Dec 02 18:12:50 the bad solution is a custom rom Dec 02 18:12:58 there is no other options Dec 02 18:13:02 actually that would be a pretty good one… Dec 02 18:13:12 otherwise enable adb on all devices and install them all over adb Dec 02 18:13:29 or you hire somebody to install it on all xxxx devices. Must be a fun job.. Dec 02 18:14:15 they have a technician already Dec 02 18:14:17 :p Dec 02 18:14:21 : D Dec 02 18:14:37 Can't the government install anything remotely? Dec 02 18:16:38 http://www.microsoftstore.com/store/msusa/en_US/pdp/productID.309552300?srccode=cii_5784816&cpncode=41-8348772-2&WT.mc_id=US_datafeed_PriceGrabber Dec 02 18:16:40 that is so tempting Dec 02 18:16:41 I tried setting layout_gravity to every view there, yet still the view doesn't budge Dec 02 18:17:06 pfn: Don't all of these monitors only run at 30Hz? Dec 02 18:17:12 yeah Dec 02 18:17:21 and for all intents and purposes, it doesn't matter Dec 02 18:17:23 outside of gaming Dec 02 18:17:49 video is all 30fps max for ntsc anyway Dec 02 18:17:51 Come on, don't say that. Dec 02 18:18:04 Isn't it 29.997 or something silly like that? Dec 02 18:18:11 yes Dec 02 18:18:22 So then GET IT Dec 02 18:19:30 Haven't these Korean monitors stepped up to be 4k too, by now? Dec 02 18:20:56 ok, done! sherlock is not part of the project anymore Dec 02 18:21:15 now I need to figure out how to create a facebook like menu with the native drawer. any link/guide/whatever is appreciated :) Dec 02 18:23:10 well it's cheap Dec 02 18:26:57 dirty deeds, done dirt cheap Dec 02 18:27:26 pfn: is it troublesome to enable abd on each tablet? Dec 02 18:27:47 luist, yes, but less troublesome than going through many prompts when installing Dec 02 18:27:47 pfn: wont the host identify the device and allow me to install already? Dec 02 18:28:52 huh Dec 02 18:32:41 anybody have experience with Bluetooth with Android ? Dec 02 18:33:01 Marlinski, tell your problem Dec 02 18:33:41 when I close my socket (from A), the other end of the bluetooth connection (let say B) doesn't close it, unless A shutdown its bluetooth (from the Android system configuration, manually) Dec 02 18:34:13 I close it by the book, first the input stream, each one (in and out) has its own try catch and then socket.close() Dec 02 18:34:18 Marlinski oh you have one of those ! Dec 02 18:34:27 those are thee best devices Dec 02 18:34:39 yeah I have seen on forum that it seems to happen Dec 02 18:34:56 hopefully the next connect works though Dec 02 18:35:15 but it annoys me as I have to set timeout on the other end Dec 02 18:35:21 well you would close the docket, not the input stream. if you read the socket code it closes the streams Dec 02 18:35:25 *socket Dec 02 18:35:57 i mean technically to be uber paranoid ... closing streams before sockets, if if thats what socket.close does anyhow Dec 02 18:35:59 I don't think it is good practice to let a socket open is it ? Dec 02 18:36:01 Marlinski, my current project uses bluetooth and it works well. only the socket is closed. Dec 02 18:36:09 ok I try this Dec 02 18:36:14 get back to you in a minute Dec 02 18:37:10 still not Dec 02 18:37:23 wat phone? some old htc ? Dec 02 18:37:36 no Dec 02 18:37:46 Samsung Galaxy S4 and Xiaomi Redmi 1S Dec 02 18:38:20 (cyanogenmod on Xiaomi) Dec 02 18:38:47 Marlinski i did it the way bluetoothchat does it Dec 02 18:38:58 if you are doing it like that too, maybe a problem on the other bt device Dec 02 18:39:11 or the phone, always so much fun. you may want to sniff acl_ events Dec 02 18:39:43 I'll do that thanks Dec 02 18:40:05 if it happens with both your phones, smells like the device Dec 02 18:40:14 (unless your code is busted) Dec 02 18:40:25 here CM (11) too. galaxy tab 2, 7 inches Dec 02 18:40:59 i tested with moto g, windows phone and my laptop Dec 02 18:41:24 Marlinski.. what version of Android? Dec 02 18:42:05 bitkiller how do you like WP ? Dec 02 18:42:50 .. I am experiencing some weird bluetooth issue with 4.4.2 but it isn’t about opening and closing the socket.. the data is out of order or truncated or has extra bytes attached.. Dec 02 18:42:51 g00s, i don't like. just have to eventually develop for it Dec 02 18:42:59 noly 4.4.2 is affected Dec 02 18:43:39 i recently started noting (!) that samsung note 3/4 users were having probems with bluetooth Dec 02 18:43:53 this seems to be pretty recent Dec 02 18:44:25 pfn: https://github.com/zbsz/robotest Dec 02 18:44:31 seems like someone did it Dec 02 18:44:35 will test it tomrrow Dec 02 18:44:55 g00s, I’m telling you it’s probabyl 4.4.2 Dec 02 18:45:21 it seems a data corruption issue Dec 02 18:45:29 yeah, the stream has shit in it Dec 02 18:45:30 I have this device that is supposed to send byte data in a pretty specific format.. I am getting truncated data at the beginning and end, weird garbage bytes at the beginning and end, and just general out of order bytes Dec 02 18:45:34 gordon_, yep, it's painful, see, it doesn't even support 2.4 yet Dec 02 18:45:47 needs more love Dec 02 18:45:50 I’ve narrowed it down to 4.4.2 Dec 02 18:45:52 i have a very robust parser with error recovery and it can't make sense of it Dec 02 18:46:03 nobody's using it so.. Dec 02 18:46:10 well, just pure junit is fine form e Dec 02 18:46:12 yeah both phones failed at closing properly the connection (I mean in a way that the other end close it too) Dec 02 18:46:16 we have a bunch of devices, note 2, note 4, S5, S4, S3, Nexus 6, Tab 10 and 7, Tab 2 Dec 02 18:46:23 or maybe some custom lib Dec 02 18:46:27 whatever Dec 02 18:46:33 all different android versions but the ones running 4.4.2 have this problem. no others Dec 02 18:46:36 samsung sucks Dec 02 18:46:37 I think I will send a little goodbye packet to fix this Dec 02 18:46:37 I'm fine with sbt ~ test :) Dec 02 18:46:43 4.4.4 is fine, 4.3 is fine.. Dec 02 18:46:47 g00s +1 Dec 02 18:46:59 +1 as well Dec 02 18:47:04 but its the most popular it seems Dec 02 18:47:08 tricknology: it is 4.4.4 Dec 02 18:47:31 My issue exists on 4.4.2 only, not 4.4.4 Dec 02 18:47:50 as soon as the updates got pushed to the notes and galaxies we started to get calls Dec 02 18:47:58 but bluetooth is a pain in the ass anyway, cannot make a step forward without walking backward two steps Dec 02 18:48:27 yeah.. it’s kind of a bummer Dec 02 18:48:35 tricknology: what is your product ? Dec 02 18:48:40 I’m working with the device manufacturer Dec 02 18:48:44 can’t say unfortunately Dec 02 18:48:52 np Dec 02 18:48:56 understand Dec 02 18:49:01 but it sends and receives data via bluetooth if that helps haha Dec 02 18:49:11 huhu Dec 02 18:49:13 I wonder if jack/jill is a good example of java -> dex bytecode direct compilation, hmm Dec 02 18:49:33 but I’m looking at the raw byte output and it’s all mangled Dec 02 18:49:59 I wish I could narrow it down and alert Google (if they don’t already know or still care) Dec 02 18:50:39 Do you think turning on packet sniffing (option in dev menu) would help? Dec 02 18:52:25 jack is from eclipse :) Dec 02 18:52:36 based on eclipse compiler anyhow Dec 02 18:52:56 There's little more therapeutic than refactoring complex code into pure simplicity. Dec 02 18:52:58 tricknology: just post some example code of how you are reading from stream Dec 02 18:53:04 tricknology also, how many devices do you have connected at the same time ? Dec 02 18:53:13 one g00s Dec 02 18:53:24 TacticalJoke and nothing worse than refactoring code into a bigger mess ! Dec 02 18:53:34 whotitis~ I don’t think I can post any code without breaching an NDA Dec 02 18:53:48 hmm it works from at least one way finally Dec 02 18:53:51 I found the problem Dec 02 18:54:19 Furthermore.. the device manufacturer sent me an SDK that never worked so I had to jimmy a BT handler to get it to work Dec 02 18:54:21 the problem was located between the chair and the keyboard :-) Dec 02 18:54:24 I said example, like how to are reading Dec 02 18:54:25 helper* Dec 02 18:54:27 Yeah, creating a bigger mess just feels like Hell. lol Dec 02 18:54:46 Folks: using the new app.usage api. Anyone know if it is possible to lookup up the value of the permission (granted or not) programmatically? the android source looks like there should be a "PACKAGE_USAGE_STATS" key in Manifest.permissions but it is not public in api level 21 Dec 02 18:55:42 as far as I can tell there seems to be no way to tell if someone has flipped the switch in security -> app usage -> your app name or not, other than that the query to app usage returns nothing if no permission Dec 02 18:55:45 aah it’s a little complicated.. Dec 02 18:56:16 but I htink I can paste this.. it’s pretty generic Dec 02 18:56:18 I'm starting to suspect it's the toolbar that forces a stupid padding on the left Dec 02 18:56:36 sec Dec 02 18:56:48 hello Dec 02 18:56:55 hello Dec 02 18:57:11 p Dec 02 18:57:19 quick question - hope somone here knows it - how do i have to share a m3u8 in order to have vlc-player read it? Dec 02 18:58:31 I'm looking for a direct download link to the android api 21 x86 system image? Dec 02 18:58:34 whatitis~ here is the BTService class.. don’t ask me why it’s named service.. http://pastebin.com/jXjk1EqB Dec 02 18:59:05 hello_xoxo: try #android-root? Dec 02 18:59:26 this channe Dec 02 18:59:39 this chnl for andrd development Dec 02 18:59:40 ? Dec 02 18:59:42 yes Dec 02 19:00:06 I’m aware of how to get the SDK but not the system image Dec 02 19:00:15 that seems like a root thing Dec 02 19:00:20 no Dec 02 19:00:38 https://software.intel.com/en-us/blogs/2014/03/06/now-available-android-sdk-x86-system-image-with-google-apis Dec 02 19:00:40 if anyone on has experience with android.app.usage just ping me, wold love to chat Dec 02 19:01:04 hello_xoxo get it from the SDK manager Dec 02 19:01:47 that's what I usually do but my PC is indefinitely offline and my tablet is how I fetch files from the internet usually Dec 02 19:02:01 tricknology also don't forget, if you model your code like blutoothchat - there is a data corruption bug as they access a message from 2 threads Dec 02 19:02:18 dunno if they ever fixed it Dec 02 19:03:08 I am not sure what this code is modeled after.. it’s legacy Dec 02 19:03:10 works from the 4.4.4, not from the 4.4.3 Dec 02 19:03:16 Is it wrong to return null in an Adapter.getItem override if you'd really just rather not implement that method? Dec 02 19:03:17 anyway time to sleep Dec 02 19:03:22 thx for your help Dec 02 19:03:28 Marlinski u try 4.4.2? Dec 02 19:03:37 tricknology: don't have it right now Dec 02 19:03:44 * tricknology thinks it’s a problem with 4.4.2 maybe 4.4.3 Dec 02 19:03:48 I don’t have a 4.4.3 device Dec 02 19:03:56 am experiencing some strange BT issues with 4.4.2 only Dec 02 19:04:10 will make more test tomorrow :] Dec 02 19:04:15 Ping me Dec 02 19:04:22 I need a direct link to the file, which can be found in the XML file that the SDK manager downloads Dec 02 19:04:23 np, I will stay around Dec 02 19:05:42 such as thishttp://dl-ssl.google.com/android/repository/repository-10.xml Dec 02 19:05:49 xcept that is not the correct one Dec 02 19:06:20 and I'm not at my PC to get it myself, just wondering if anybody could help me get the direct link Dec 02 19:10:49 lol http://knowyourmeme.com/memes/the-1-phenomenon Dec 02 19:12:39 tricknology, see a few things iffy with that code. but one maybe for reading is how you send your data read to your handler. your buffer is 1024 in size, even if only reading 1 byte of the size you send the full 1k off buffer. seems wastefully since data can be sent, but reading you only get what has transfered Dec 02 19:14:08 I understand that. I should fix that, thanks.. but I doubt that’s causing the issue.. Dec 02 19:14:58 so say a device sends 500kb of data, the other device can read using a buffer of 2048b at a time, but may only get much smaller amounts each read, so you are constantly sending extra nulls of the buffer to yourmhandler every read Dec 02 19:15:10 tricknology: I came in too late - what's happening? Dec 02 19:15:18 looking into it that’s how the SDK was put together so I think it was just copied fomr tehre tbh Dec 02 19:15:24 Bluetooth issues with 4.4.2 Dec 02 19:15:51 well we have 3 4.4.2 devices, all of which are affected, none of the +/- versions are affected Dec 02 19:16:10 byte data coming in all mangled, truncated, extra bytes, rearranged.. it’s weird Dec 02 19:16:14 ah. sorry, can't help there, no bluetooth experience (and I assume it's not just a coding problem) Dec 02 19:16:30 I've heard of that happening, never read anything that explained the cause though Dec 02 19:16:50 thanks for ur help tricknology i found it though... https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml file b in this directory :) Dec 02 19:17:34 I’ve looked over my code and this issue didn’t exist before that update. Dec 02 19:18:40 tricknology, you are reusing the same array. so say you read once and get XXXXX and your buffer is sized 10, on read two you only get XXX, so when your buffer still has those extra 2 bytes in it Dec 02 19:18:54 so thatd give you extra mangled ddata Dec 02 19:19:03 but what about missing? Dec 02 19:19:17 like the beginning lopped off Dec 02 19:20:22 ive had that too, but cant remember the why, I ended up creating a protocol to only start keeping bytes after I confirmed I got a start command Dec 02 19:21:16 it was a random issue, so I didnt dig deeper, as it only affected first read sometimes. im sure I messed up somewhere :) Dec 02 19:22:22 whatitis~ thanks, that’s really helpful Dec 02 19:22:40 and funny thing is.. I just got an e-mail with an updated SDK Dec 02 19:22:49 so I don’t know which to try first haha Dec 02 19:22:58 what are you transferring, is it a never ending stream of data, or like files? if a known size/hash on sender end, can pass that data to receiver, then send Dec 02 19:23:04 if I implement the SDK I have to gut everything that has to do with reading Dec 02 19:23:26 no known size, it’s variable but it ends Dec 02 19:23:36 hi Dec 02 19:23:38 just a string of hex Dec 02 19:24:02 hi mithenks Dec 02 19:24:25 how it's possibile to compile a file that use a class from android, i.e. android.util.Log, from command line with javac? Dec 02 19:25:25 * tricknology shrugs Dec 02 19:26:11 wahtitis~ sender isn’t smart enough to send me anything related to the size of what it’s sending Dec 02 19:28:51 Is the viewpagerindicator from 2012 still recent or should I use anything esle? Dec 02 19:29:14 use sliding tabs Dec 02 19:29:15 guess first step would be to either 1, reset the array after reading, or 2, read into your buffer&only pass the amount of bytes actually read so you are passing extra Dec 02 19:29:34 then move on to fixing other issues Dec 02 19:29:57 arent passing* Dec 02 19:30:03 Is that a class that is included? Dec 02 19:31:34 Looks like just an example. Dec 02 19:32:40 thanks whatitis~ I’ll give that a go. Dec 02 19:33:21 I have an activity that sends commands to a background service to play audio on a button press. But when the service is preparing the audio, the button stays highlighted until the service has finished and begins playing. What can I use to make this operation asynchronous? Can I use a simple asynctask? Dec 02 19:35:24 yes Dec 02 19:35:28 that is what you should do Dec 02 19:35:30 <_Auron_> I never would have imagined having a scalable grid with cells that have an image under text would be such a freakin nightmare to make in android Dec 02 19:35:47 using GridLayout _Auron_? Dec 02 19:35:56 can i request developer permissions in a tablet from the host via adb?? Dec 02 19:36:19 luist I’m not sure but just asking, what’s wrong with the normal way? Dec 02 19:37:22 tricknology: considering a project where we have to install stuff in 10000 tablets, the normal way takes like 5-10 times longer, that corresponds to days, maybe weeks Dec 02 19:37:27 <_Auron_> tricknology: no.. but what are the odd limitations in using a gridlayout? Dec 02 19:37:40 oh God. that sounds horible luist Dec 02 19:38:09 tricknology: if i can do everything in the host, i can make an script or something, and avoid doing the same thing 10000 times manually Dec 02 19:38:17 I am not sure _Auron_ it’s been awhile since I worked with it (pre-fragments) btu I didn’t experience anything funky Dec 02 19:38:29 luist that would be ideal, yes Dec 02 19:38:30 https\://dl-ssl.google.com/android/repository/sys-img/google_apis/sysimg_x86-21_r02.zip is the link wants Dec 02 19:38:47 tricknology, thanks! Dec 02 19:39:16 <_Auron_> tricknology: I'm just having to write a custom calendar view because android's one is barely customizable at all, and I can't get images to have a uniform size behind the text when I select dates. Dec 02 19:39:31 <_Auron_> but I'll figure something out Dec 02 19:41:28 I hate these Google examples. Dec 02 19:41:52 marrrk haha I found one that was broken Dec 02 19:41:57 marrrk: anything in particular? Dec 02 19:42:06 http://developer.android.com/training/implementing-navigation/nav-drawer.html Dec 02 19:42:47 mDrawerLayout.closeDrawer(mDrawerList) should be mDrawerLayout.closeDrawer(findViewById(R.id.content_frame)) Dec 02 19:42:54 In particular this one: https://developer.android.com/samples/SlidingTabsBasic/project.html Dec 02 19:43:06 Maybe I'm just too dumb but I don't see any explanation linked to it. Dec 02 19:43:17 except for this: https://www.youtube.com/watch?v=tRg_eDfQ8fk Dec 02 19:43:26 who does youtube videos for code... Dec 02 19:44:38 Well, Google, I guess Dec 02 19:44:47 she starts out by saying Dec 02 19:45:02 make sure to use the full package name for the SlidingTabLayout Dec 02 19:45:22 But that's from the example. How about explaining that thing first, then? Dec 02 19:45:36 luist: I would assume that on normal devices your answer would be a "no". it's a security risk to leave it on by default. can you control the roms / pre-install applications before you get your hands on them though? Dec 02 19:45:56 Groxx: no i cant Dec 02 19:46:09 is it normal to send each byte read from an inputstream through to a handler and have the handler build the string? Dec 02 19:46:12 wtf am I reading.. lol Dec 02 19:46:24 Groxx: i though about requesting the permissions, only having to accept on the device itself, instead of doing everything in the config Dec 02 19:46:40 tricknology: heh, probably not? that sounds like a really inefficient way to transfer data across threads Dec 02 19:46:40 Groxx: some devices already pop the permissions when i plug them, but not all Dec 02 19:46:50 Right, Groxx? Dec 02 19:46:51 So I guess I should just copy and paste their view into my project... Dec 02 19:47:45 hey guys Dec 02 19:48:07 luist: and it's a bunch of different devices then, too? yeesh. you're in for a lot of fun, methinks Dec 02 19:48:15 is there a way to grab form data from a WebView without resorting to using JavaScript? Dec 02 19:48:36 Groxx: not really.. its an specific device for each project Dec 02 19:48:56 Groxx: but ive tested one of them and it does not pop the permission request by default Dec 02 19:48:59 luist: I assume you at least know you can install the app and launch / test it from an ADB script / some other continuous-integration tool? Dec 02 19:49:17 doesn't help with the "enable adb" problem, but some automation is better than none :( Dec 02 19:49:24 Groxx: yes, but i need to enable the device first right Dec 02 19:50:31 luist: yeah. dunno. as much as it sucks for you, I honestly hope there isn't a way (in general). it's too easy to dump data from a device once enabled, it'd be a wide-open way to steal data from people's phones given a few seconds. Dec 02 19:50:56 at least it only has to be done once :\ Dec 02 19:54:04 Groxx: well its just a few more seconds until i enable it manually… i dont think its that bad considering 1 device, but 10000… i hope noone is trying to steal data from 10000 devices tho Dec 02 19:54:13 anyone here use genymotion with either android studio or intellij idea? Dec 02 19:54:27 i have genymotion installed and it works, i have the idea plugin installed Dec 02 19:54:35 cannot figure out how to get it to debug with genymotion Dec 02 19:55:01 I440r: hm. works for me out-of-the-box. Dec 02 19:55:22 how do you do it? Dec 02 19:55:31 just run->debug and select avd? Dec 02 19:55:37 yeah, basically Dec 02 19:55:43 or do you have genymotion emu already running? Dec 02 19:56:04 Hey guys, my app crashes with the dialog "Unfortunately "myApp" has stopped..." (only) sometimes when it is in the background for a very long while. i just cant find out what causes this, since it happens really only sometimes and never when i`m at my computer and am debugging. What would you do to find the bug? Dec 02 19:56:09 I440r: ah. I typically start genymotion emu first, I don't know if it appears in the avd list. Dec 02 19:56:22 run->debug->project just launches an avd Dec 02 19:56:32 let me try that :) Dec 02 19:56:33 adkins, use a crash reporter like acra Dec 02 19:57:31 pfn: thank you, already installed CatLog..........checking acra now. Any more hints? are there common issues that could cause this? Dec 02 19:57:54 genymotion emulator is now launching... it looks somewhat better than the google avd's lol Dec 02 19:58:14 adkins, catlog is pretty useless on android 4.x unless rooted Dec 02 19:58:21 adkins, lots of things cause it Dec 02 19:58:24 it is rooted Dec 02 20:00:16 pfn: :( what could the system do with my app if it is stopped and in the background after a very long time. Only thing i can think of is that it kills it to free memory. Can you think of something else? if not: Is it possible to simulate a situation of killing it because of freeing memory? Dec 02 20:01:12 there's lots of reasons Dec 02 20:01:15 read your log, fix it Dec 02 20:01:19 ;) Dec 02 20:01:30 k thank you Dec 02 20:02:03 pfn: you mean acra reporter widget right? Dec 02 20:02:16 adkins, no Dec 02 20:02:17 no he doesn't Dec 02 20:02:20 adkins, I mean acra the library Dec 02 20:03:30 alright Dec 02 20:07:57 I'm trying to decode this http://pastebin.com/n83kEQkU base64 image, but android sliently says 'D/skia﹕ --- decoder->decode returned false. Somebody plese help Dec 02 20:10:17 that moment when you are like, awesome it wasn't me, but oh wait, this means there isn't a good fix atm https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=77712 Dec 02 20:11:35 is there a such a thing as a vnc session that has glx extensions?" Dec 02 20:11:52 i dont mean "so i can play world of warcraft" or anything stupid like that Dec 02 20:12:01 buyt running things like genymotion Dec 02 20:12:05 err wrong chan lol Dec 02 20:12:06 my bad :) Dec 02 20:12:15 pfn: while integrating acra i noticed something in onCreate function of my application-class: super.onCreate is not the first thing that gets called. Do you think it should be the first to get called? Dec 02 20:12:26 adkins, it doesn't matter Dec 02 20:13:08 ok , thx again ;) Dec 02 20:17:24 pfn: -> ACRA: THE END - next time your application crashes, it sends a report to your backend. what is meant by backend in this case? Dec 02 20:17:48 adkins, whatever you configure it to be Dec 02 20:19:27 List-related stuff can by accessed by "position", "location", "index", etc. We need standardization. :D Dec 02 20:19:42 OMFG i gave my genymotion emulator 8 processors. it boots in about 2 seconds Dec 02 20:19:43 ! Dec 02 20:19:44 pfn: formUri = "http://www.backendofyourchoice.com/reportpath") so i have to have a server online to write to? Dec 02 20:19:55 if you want to report to a form, yes Dec 02 20:19:57 I vote for index. easy / historical one-character variable name: i Dec 02 20:20:13 Yeah, I'm keen on index. Dec 02 20:20:54 pfn: not really, is it possible to send it to me via email or something? ;) Dec 02 20:20:59 adkins, yes, read the docs Dec 02 20:21:04 k Dec 02 20:28:24 Horrible Java Dec 02 20:29:19 Horrible Javar Dec 02 20:29:43 or i guess Javar the Horrible :) Dec 02 20:30:36 is OpenGL supported on Android Wear? Can I make a watchface that utilizes OpenGL? I don't have a device atm and it doesn't work on emulator for me Dec 02 20:32:23 pfn have you subclassed an Android view in Scala? They have these three constructors and I don't think I can just call the most general one with null. Dec 02 20:32:43 marrrk, just call context, attrs, 0 Dec 02 20:32:49 and delegate all your constructors to call that one Dec 02 20:32:59 cool, very good, thanks Dec 02 20:33:00 yes Dec 02 20:33:20 all view constructors should delegate through the 3/4 arg variants Dec 02 20:33:29 although the 4-arg variant is only available on 21+ so just ignore it Dec 02 20:33:38 yeah I hadn't even seen that one Dec 02 20:34:02 So null for attrs and 0 for that id thing? Dec 02 20:34:12 Style Dec 02 20:34:47 well, when delegating, yes Dec 02 20:34:54 obviously you should pass them unmolested to super Dec 02 20:35:09 Ah, I see Dec 02 20:36:03 <_Auron_> ugh, I can't seem to figure out how to find the width/height of particular views when they're being inflated in my custom view Dec 02 20:36:21 <_Auron_> they keep returning 0 Dec 02 20:36:50 pfn: Like this: https://gist.github.com/i-am-the-slime/35ee570a2c8c25c0685d ? Dec 02 20:37:22 yes, but if your view is inflated from xml, you only need the 2-arg variant overload Dec 02 20:37:31 the 1-arg is only for creating views from code Dec 02 20:38:04 Maybe I should provide teh 1 arg constructor then and fail with an error indicating that Dec 02 20:38:17 That I disallow that. Dec 02 20:38:26 * pfn shrugs Dec 02 20:38:31 being able to specify a style is handy Dec 02 20:38:35 Yeah, I'll just hope I'll remember Dec 02 20:38:44 I* Dec 02 20:39:11 does genymotion not support NDK libraries or something? Dec 02 20:39:36 * pfn shrugs Dec 02 20:39:40 just implement all 3 constructors Dec 02 20:39:40 its crapping out on System.loadlibrary("..."); Dec 02 20:39:52 genymotion is x86 only Dec 02 20:40:02 no its not Dec 02 20:40:02 so if you don't have x86 libraries, of course it'll fail Dec 02 20:40:11 wait Dec 02 20:40:19 crap Dec 02 20:40:23 utterly pointless Dec 02 20:40:29 uninstall Dec 02 20:40:59 you can install an arm-abi translater bullshit Dec 02 20:42:45 HAHA, after all that I find otu that that whole class is pretty much inactive... Dec 02 20:43:02 Boy, private static final int Dec 02 20:43:07 all the important parts pertaining to reading and writing are in the SDK Dec 02 20:45:09 if i have a bug report on code.google.com what does it mean if that bug report is triaged? Dec 02 20:45:19 lol marrrk where are you seeing that? Dec 02 20:45:22 i think someone just set my bug to triaged / high-priority Dec 02 20:45:23 be careful... Dec 02 20:45:44 I am seeing that in the SlidingTabLayout.java file provided by Google Dec 02 20:45:52 i reported a bug related to the intellij idea/android studio logcat facility Dec 02 20:45:55 l440r it means that it is a priority issue they are looking at it. well done :) Dec 02 20:45:58 I440r, then it just means that it's been seen and prioritized for internal development, what bug triage usually means Dec 02 20:46:03 bug numbver 81006 Dec 02 20:46:11 prioritized as in set in priority order, not necessarily a priority Dec 02 20:46:37 so my bug has simply been viewed and set to a high priority for google to fix? Dec 02 20:46:50 usually what that means Dec 02 20:46:54 kk Dec 02 20:47:00 what else would it mean Dec 02 20:47:03 when I get a high priority bug it depends on what else I’m working on Dec 02 20:47:04 i did not know that what that "usually" means lol Dec 02 20:47:06 no idea Dec 02 20:47:17 but usually I finish what I’m working on and look at what’s in the queue Dec 02 20:47:32 ya Dec 02 20:47:35 depending on the time I have left and the complexity of the issue (and my internal prioritization) I deal with it Dec 02 20:47:54 devs usually fix the low hanging fruit first. given 5 high prority bugs... ill fix the one i can fix the fastest Dec 02 20:47:56 https://code.google.com/p/android/issues/detail?id=79729 Dec 02 20:48:00 still waiting for a google response on that Dec 02 20:48:20 l440r yeah it depends on the bug and how much time you have left in your day Dec 02 20:48:27 They should hurry up with their Java 8 support if Scala 2.12 is going to be Java 8 only. Dec 02 20:48:39 someimtes if it’s complex I’ll let it hang out while I tie up other loose ends. Then set aside a day or two for that bug Dec 02 20:48:53 or a week… >:( Dec 02 20:49:22 greetings folks. Dec 02 20:49:46 YES. Java 8 support would rock (if it can be backported) Dec 02 20:49:48 ayo Dec 02 20:50:01 Groxx? Dec 02 20:50:14 ? Dec 02 20:50:14 just setup a basic web-view app. going back to paper for app design before i try to do anything crazy. Dec 02 20:50:25 just wondering what you meant Dec 02 20:50:37 it was re marrrk's last message Dec 02 20:50:46 aah Dec 02 20:51:13 I would like to switch on strings.. can you do that now in Android? Dec 02 20:51:23 marrrk, don't count on it and expect to be stuck on scala 2.11 for the forseeable future Dec 02 20:51:26 or do I have to worry about that random < Java 7 guy Dec 02 20:51:33 They could lose all their stupid Listener classes. But then again they couldn't since it wouldn't work on older versions. Dec 02 20:52:14 kind of annoyed. genymotion is freeeeeking awesome. problem is, im doing arm NDK development Dec 02 20:52:25 I440r, build your libraries for x86, or use the arm translater Dec 02 20:52:35 i gave my geny emu 8 processors and it booted in 2 seconds Dec 02 20:52:43 pfn my library is 100% pure arm assembler Dec 02 20:52:59 I440r, sucker Dec 02 20:53:34 what is the arm translater? Dec 02 20:56:54 didn't you say that booting thing a bit earlier already? Dec 02 20:57:57 <_Auron_> why does view.getWidth()/getHeight() even exist if it just returns 0??? Dec 02 20:58:40 Can a reference to a viewPager adapter become invalid? Dec 02 20:59:50 what does "invalid" mean Dec 02 21:00:23 not valid Dec 02 21:00:26 It means it was a stupid question. Dec 02 21:00:28 * Ashiren is helpful Dec 02 21:01:21 well, a reference is always valid if it's not null... Dec 02 21:01:37 mayb he means the reference forgotton or reset to null Dec 02 21:02:10 I was thinking when there is a low on memory situation maybe some bits of memory could be freed. Dec 02 21:02:27 some bits... like half of the object is gone? Dec 02 21:02:28 _Auron_: it returns 0 before it has been laid out. are you waiting for the first layout pass to occur? Dec 02 21:02:59 Nevermind Dec 02 21:03:05 marrrk, once again, not possible Dec 02 21:03:30 except in the case of weak/soft references, of course Dec 02 21:03:32 For some reason I thought the framework could arbitrarily set it to null. Dec 02 21:03:42 still not possible Dec 02 21:03:45 Good. Dec 02 21:05:18 arbitrary values cannot be changed behind your back Dec 02 21:07:00 Better. Dec 02 21:07:22 <_Auron_> Groxx: How do I know when it's been laid out? Dec 02 21:09:23 <_Auron_> is it not after inflating it? Because even after I inflate the layout it still returns 0 Dec 02 21:09:57 _Auron_: creating / inflating views just puts them in the view tree. all views wait until later to lay out, since the final layout may depend on all views. Dec 02 21:10:20 <_Auron_> okay, so do I have to create a listener or something? Dec 02 21:10:39 _Auron_: you have to wait until onLayout has been called or use globallayouttreeobserver or use a handler with a post delayed that keeps reposting itself until its not 0 Dec 02 21:10:49 _Auron_: there's this: https://developer.android.com/reference/android/view/View.OnLayoutChangeListener.html or there's a global variant for older OS versions. or you can override onLayout in the view and do your work there, if that makes sense. Dec 02 21:11:09 _Auron_: unfortunately this isn't an area I'm very familiar with so I don't know what's best. those at least work though :) Dec 02 21:11:27 <_Auron_> okay, I'll look into that. thank you Dec 02 21:12:19 <_Auron_> all I want to do is have a selectable row of text that displays a circle behind the selected item, and this has just been a maddeningly obtuse problem that makes me *REALLY* hate android right now Dec 02 21:13:04 <_Auron_> because the image size bloats the row's height bigger than I want it, but I can't change it with code, and if I specify a specific size it goes off-center Dec 02 21:13:13 _Auron_: behind a selected section of text, or you have a bunch of rows of text (say in a listview) and you want to draw a circle behind one of them? Dec 02 21:13:45 <_Auron_> it's not even a list per say, it's actually a custom calendar view because you can't do anything fancy at all with the default CalendarView Dec 02 21:13:55 <_Auron_> and I want to display a circle/icon behind the selected date Dec 02 21:15:00 ah. personally, I'd probably just make a custom view, and draw it by hand in onDraw. I'm assuming you have a bitmap though? Dec 02 21:15:32 <_Auron_> yeah it's a drawable Dec 02 21:17:34 _Auron_: I feel like there's a way in xml to define "stretch this other drawable as needed to fill/fit/crop the container" but I'm having trouble finding it Dec 02 21:18:37 <_Auron_> scaleType="centerInside", yeah but behind a textview it just stretches to fit the exact size of the text, and numbers have varying sizes so I don't get a uniform size for each one Dec 02 21:18:58 <_Auron_> I don't know why android makes something like this so maddeningly difficult Dec 02 21:19:30 _Auron_: I assume you have another view behind the textview? can you use the drawable as a selected state on that view? Dec 02 21:22:55 <_Auron_> Groxx: This is what I have for a day in the list: http://pastebin.com/36PGqauJ Dec 02 21:24:57 <_Auron_> but because this is for a custom view that I use in another layout, the image height causes the the next row to be shrunk down Dec 02 21:25:52 which api level for 4.4.4? Dec 02 21:26:09 I think its api 19? Dec 02 21:26:45 <_Auron_> yeah Dec 02 21:27:23 _Auron_: ah. change the imageview to match_parent on both width and height? you don't want it to change the view's size. Dec 02 21:27:54 _Auron_: that'll still allow it to stretch vertically if you have 2 lines of text, but you may be preventing that elsewhere? Dec 02 21:30:45 <_Auron_> Groxx: it takes up the entire view vertically if I use match_parent Dec 02 21:31:47 _Auron_: you should make a custom view Dec 02 21:31:53 draw the bitmap to the canvas, then draw the text on it Dec 02 21:32:39 oh nm you said selectable, well it would be but that will take slightly more work Dec 02 21:33:02 _Auron_: the entire day-view? that sounds close to what you want, aside from maybe some margins Dec 02 21:33:11 _Auron_: unless I'm misinterpreting Dec 02 21:35:01 rusty no 4.4.3 is 19 Dec 02 21:36:02 <_Auron_> Groxx: not if the second row isn't visible anymore Dec 02 21:38:41 <_Auron_> hmm actually I think that may have worked after I changed something else, groxx Dec 02 21:38:52 <_Auron_> let me try it on the device Dec 02 21:39:11 _Auron_: this is what I'm imagining, fwiw: http://cl.ly/image/3D2M1f0a3L0e is that close? Dec 02 21:40:05 <_Auron_> mm, still won't work right Dec 02 21:40:07 _Auron_: ah, though you've said rows… same principle applies to the margins though. that would be match_parent + layout_margin=etc Dec 02 21:40:16 _Auron_: I think. been a while since I used that combination. Dec 02 21:40:24 Guys any suggestion how can you offer live support in app? I was thinking about bundling VNC server but it requrires root. Dec 02 21:40:37 hum 477 people starred Dart on Android. yuck. https://code.google.com/p/dart/issues/detail?id=19266 Dec 02 21:42:45 will Java handle a situation where I am comparing an int to an Integer when that Integer is null? Dec 02 21:42:54 <_Auron_> groxx: oh! Dec 02 21:43:05 <_Auron_> layout_margin seems to be the missing puzzle piece here Dec 02 21:44:38 _Auron_: hopefully :) that's at least a simple fix! Dec 02 21:50:08 who here watches All About Android every week ? Dec 02 21:51:57 we should make one called All About Android-Dev Dec 02 21:52:12 <_Auron_> groxx: I believe I'm on the right track, but unfortunately the second row gets pushed out of the linearlayout of my custom entirely still Dec 02 21:52:33 <_Auron_> do I just need to assign strict weights on each of the row's layouts? Dec 02 21:53:14 is there any reason not to develop on your own phone? Dec 02 21:53:39 RustyShackleford: if money is not an object, no Dec 02 21:53:40 i mean, as opposed to an extra device that you use just for development? Dec 02 21:53:59 <_Auron_> aside from distractions, no Dec 02 21:54:14 pfn: what backend would you suggest to use for acra? not getting it to work with email Dec 02 21:54:24 it works fine with email Dec 02 21:54:33 I know, I fucked up and published it with emailTo enabled :-( Dec 02 21:55:35 RustyShackleford: you should test it on many types of devices as possible Dec 02 21:56:00 i have an s4 and an s5 Dec 02 21:56:09 not a very diverse set of devices Dec 02 21:57:34 thats why you goto best buy Dec 02 21:57:57 _Auron_: not entirely sure what you mean by "pushed out of the linearlayout" Dec 02 21:59:35 lasserix_ lol never thought of this Dec 02 21:59:39 RustyShackleford: I'd recommend testing on alternate densities, and performance testing on a dirt-cheap phone, but the emulators work fine too (though slow). Dec 02 21:59:59 RustyShackleford: otherwise I do most of my dev on my phone, and test on others. it's just easier. Dec 02 22:00:13 Groxx x86 emulators are pretty quick nowadays Dec 02 22:00:23 i haven't tried the emulators in a long time Dec 02 22:00:31 it used to be suuuper slow Dec 02 22:00:59 <_Auron_> groxx: the first row is taking up the remaining space, preventing the second row from displaying at all Dec 02 22:01:07 McJuicy: yeah, I just can't use haxm :) it conflicts with virtualbox, which I need. Dec 02 22:01:15 RustyShackleford it is slow when you emulate arm because it is converting ARM instructions to x86 Dec 02 22:01:19 <_Auron_> so I just tried to force further embedded linearlayouts and assigning weights to them, doesn't help. Dec 02 22:01:57 RustyShackleford: & McJuicy: yeah, if you can install haxm (usually you can), and use the x86 emulators, they're great. nearly as nice as genymotion, and they can do a few things genymotion can't. Dec 02 22:02:08 Genymotion is p legit Dec 02 22:02:17 pfn: i`m not getting an email.......this is what i`ve done: http://pastebin.com/QuCiMbjy Can you tell me what i`m missing? Dec 02 22:02:37 <_Auron_> genymotion is pretty buggy too Dec 02 22:03:10 i dont get prompt to send an email either. There is just an empty toast comming up and diappearing again Dec 02 22:03:32 adkins, don't set interaction mode = toast Dec 02 22:03:50 * pfn doesn't use the email backend in any case Dec 02 22:04:09 although, an app I published with it on mistake has been sending me emails Dec 02 22:04:12 so it undoubtedly works Dec 02 22:04:34 "(23:06:41) pfn: adkins, don't set interaction mode = toast" what else? Dec 02 22:04:48 i dont doubt that it works, just didnt get it done ;) Dec 02 22:05:08 I dunno what else Dec 02 22:05:09 _Auron_: hm. what's your linearlayout's xml, and are you inflating rows in code? depending on how you do it, you can lose layout params. Dec 02 22:05:14 I don't use email for reporting Dec 02 22:05:32 pfn: what do you use? Dec 02 22:05:36 <_Auron_> groxx: since I couldn't do anything I wanted to with code earlier, I've been focusing on just the xml. Dec 02 22:06:20 adkins, a backend service Dec 02 22:06:38 which one Dec 02 22:07:10 one I wrote myself Dec 02 22:07:18 ok Dec 02 22:09:08 trivial to setup in any case Dec 02 22:09:36 pfn: trivial to setup email or service? Dec 02 22:09:57 any of them, I don't know what you're doing, but email works for me in all cases Dec 02 22:10:06 there are plenty of service implementations available free Dec 02 22:10:13 did you take a look at my link? Dec 02 22:10:41 you don't need to set a report sender Dec 02 22:11:14 ok good to know (docs said that though) Dec 02 22:12:15 pfn: hang on Dec 02 22:12:39 ;) i removed the sender-call and it worked... Dec 02 22:13:27 docs don't say that Dec 02 22:15:00 pfn: you are right, my fault/bad reading Dec 02 22:15:54 pfn: do you use acra in all your apps you published to collect bug-reports? Dec 02 22:16:13 all my personal apps, yes Dec 02 22:17:04 the personal apps you published or the ones you just use personally ? Dec 02 22:17:41 I publish all my apps Dec 02 22:18:35 Is it sensible for adapters that return multiple view types to simply return null in getView? Dec 02 22:18:58 Oops. Dec 02 22:19:00 In "getItem", rather. Dec 02 22:19:12 getItem is unused by the framework Dec 02 22:19:18 K. Dec 02 22:19:53 pfn: well thank you a lot again Dec 02 22:20:27 only thing I haven't published is my tvm calculator... too lazy Dec 02 22:20:27 (it works but mode is still toast ;) ) Dec 02 22:20:50 want more features before publishing, but it's effectively finished Dec 02 22:21:07 do you guys know if there are core differences between 4.2.2 and 4.1.2? I have a service that works fine on 4.1.2 but on 4.2.2 it seems like the device pauses and restarts my service Dec 02 22:21:21 pfn: do you code android just for yourself and live from it? Dec 02 22:21:34 adkins, both Dec 02 22:22:06 pfn: both? work for android company and for yourself? Dec 02 22:22:33 more or less, yes Dec 02 22:22:43 nice Dec 02 22:24:37 he literally lives from coding android Dec 02 22:24:41 without android, death Dec 02 22:24:58 lol Dec 02 22:28:44 is there a way to stop system_server from printing in logical? Dec 02 22:29:11 keep the device off Dec 02 22:29:17 one of the Dell Venues I have just keeps printing garbage like "data z positive" with the tag "AccelerometerSimpleCalibration" Dec 02 22:29:30 whatitis-, thanks Dec 02 22:29:47 :) but seriously, just filter Dec 02 22:29:51 logicat => logcat Dec 02 22:30:07 my galaxy tab is a logcat glutton with spam Dec 02 22:30:12 just filter Dec 02 22:30:32 weird, github's android app uses a custom typeface for their iconography? how weird Dec 02 22:30:34 Same with my Sony Xperia M. Dec 02 22:30:34 do you guys know if there is a tool to look at my code and determine if I have issues with a particular android version? Dec 02 22:30:46 DammitJim, android lint Dec 02 22:30:46 I am having problems with devices on 4.2.2 vs no problems on devices with 4.1.2 Dec 02 22:31:06 thanks Afzal Dec 02 22:31:50 Hey, has someone a clue to have two way between threads comm? I'd like to avoid using a pair Handlers. Something like a double way Pipe... Dec 02 22:32:03 DammitJim: lint ? If you mean something that warns you "4.2.2 has a bug here, but 4.1.2 does not, beware", I wish it existed. I don't know of any though. Dec 02 22:32:50 Tldr, i'm writing a tcp client, and was doing fine until i remembered io was not permitted in the ui Thread when i got an exception back in my face... Dec 02 22:33:53 is it true that the real money in mobile development is with iOS? Dec 02 22:34:02 RustyShackleford, no Dec 02 22:34:10 i've heard that some companies make the iOS app first Dec 02 22:34:19 then outsource someone to make an android port Dec 02 22:34:24 mobile development is still a niche enough field that you can make a lot of money devving for android or iOS or both Dec 02 22:34:25 RustyShackleford, what rock have you been under for the latter, and the former is no Dec 02 22:34:31 and everyone outsources everything Dec 02 22:34:33 ios or android Dec 02 22:34:36 The true money in mobile development is in providing the service of app development to others companies Dec 02 22:34:38 hello Dec 02 22:34:43 I'm looking for information about interactions between watch and mobile usingandroid. For example, if your watch has a microphone, is it possible to put an apk in the watch and an apk in the mobile and received the sound data from the watch microphone to the mobile ? Dec 02 22:34:49 s73v3r, indeed Dec 02 22:35:13 Question: ConnectivityManager.getActiveNetwork() : NetworkInfo, returns "Returns details about the currently active default data network. When connected, this network is the default route for outgoing connections.". What exactly is defined by "Default Network"????????? Dec 02 22:35:47 why don't you google what default means Dec 02 22:35:48 RustyShackleford lol, that just happened to me Dec 02 22:35:50 Strat, the preferred route at that time of the call Dec 02 22:37:02 Is Android Wear is a reduced Android ? Or is it Android + specific packages ? Dec 02 22:37:11 RustyShackleford the problem i faced is that if you aren't in a mobile dev shop, its hard having all the devices you need to test Dec 02 22:37:14 Afzal, so it could be Wifi, if the user has only enabled Wifi (and disabled Mobile Data)? Basically, it is whatever is available and to which the device is connected, at the time of the call? Dec 02 22:37:44 huh? Dec 02 22:38:08 g00s_: even if you have all the devices, testing seems like it would be really tedious Dec 02 22:38:09 I mean, what if bot wi-fi and mobile data are enabled? Dec 02 22:38:09 oh, g00s is just being slow at replying Dec 02 22:38:16 RustyShackleford, qa team that does it Dec 02 22:38:18 both* Dec 02 22:38:19 Strat, that's what "When connected, this network is the default route for outgoing connections" would mean Dec 02 22:38:24 or billing appropriately to have all necessary test devices Dec 02 22:38:33 can you test EVERYTHING with automated unit tests? Dec 02 22:38:39 Lol Afzal, i see Dec 02 22:38:44 Strat, wifi is always preferred over data if you have internet connectivity on it Dec 02 22:38:47 I guess iḿ overthiking it Dec 02 22:38:54 No one is familiar with Android wear ? Dec 02 22:38:57 because it basically is as simple as that lol Dec 02 22:38:58 i've never written unit tests for android, but testing the UI seems like it would be difficult to automate Dec 02 22:39:02 Fooman2011, I am Dec 02 22:39:03 * pfn has only ever had a max of 2 development devices when working with clients Dec 02 22:39:06 unfortunately Dec 02 22:39:09 occasionally a 3rd device Dec 02 22:39:10 thnx for the replies Afzal Dec 02 22:39:20 and I recently expensed a chromecast for development Dec 02 22:39:27 RustyShackleford, use a Cucumber based framework like Calabash or Appium Dec 02 22:39:34 and yeah, expense your clients for development devices Dec 02 22:39:42 pin lol, did you spend the $15 to become a dev? Dec 02 22:39:42 RustyShackleford i had to put together a bid against multiple parties that states what devices they would test on and guarantee their app to work on Dec 02 22:39:44 either that or pay out of your own pocket and deduct taxes Dec 02 22:40:04 unfortunately, their list was probably $10k worth of equipment Dec 02 22:40:07 good way to get the newest devices at a ~30% discount Dec 02 22:40:28 Afzal: Could you tell me if Android Wear is a reduced Android ? Or is it Android + specific packages ? The documentation is not very clear about this point Dec 02 22:40:42 g00s_, less taxes Dec 02 22:40:46 g00s_, so more like 6k Dec 02 22:40:50 nm watches and bullshit now Dec 02 22:41:14 what's your take on watches? Dec 02 22:41:17 Fooman2011, it's Android - specific package + some Wear backend stuff like data item storage and message handling that you use the wearable google play services to get on the phone Dec 02 22:41:19 AndroidTV Dec 02 22:41:21 they are kind of cool, I'll admit Dec 02 22:41:25 but also very gimmicky Dec 02 22:41:29 RustyShackleford i haven't done anything with them at all Dec 02 22:41:32 SmartTV should just become Android TV and samsung should do the development Dec 02 22:41:33 if someone pays me to write something for android wear, I would Dec 02 22:41:36 otherwise just gonna ignore it Dec 02 22:42:01 pin, I hope they pay you enough for it lol, because I'm not getting paid enough to deal with the Android wear apis Dec 02 22:42:21 Afzal, try typing correctly? I assume you're referring to me Dec 02 22:42:24 I've already complained countless times that I hate how those APIs work Dec 02 22:42:33 oh yes, I meant pen Dec 02 22:42:42 lol Dec 02 22:42:42 UGH this stupid mac autocorrect Dec 02 22:42:43 try again Dec 02 22:42:44 pfn Dec 02 22:42:49 there we go Dec 02 22:42:58 microsoft keyboard? Dec 02 22:43:01 RustyShackleford the other thing i just dealt with; the iOS app took 14 months to complete. people liked it, want an android app - so company scrambles and wants a android version that looks like the iOS one in 4 mos Dec 02 22:43:01 ;) Dec 02 22:43:14 oh mac, i see Dec 02 22:43:21 Afzal, nice pos Dec 02 22:43:28 adkins, no, the "check while I type" feature on mac. It only happens on chat though even though I have it disabled Dec 02 22:43:33 RustyShackleford i asked the project manager if they had an android device (no) just make it look like iOS ;) Dec 02 22:43:33 pos? Dec 02 22:44:01 RustyShackleford anyhow, just my last experience. if you have good connections you can do well, with hard work Dec 02 22:44:15 probably positive atitudes ;) Dec 02 22:44:30 i didn't want to work for a mobile dev shop, after i saw the kind of bullshit work they got. Dec 02 22:44:43 90% of it was making an app for detergent company or something stupid Dec 02 22:44:45 Afzal: So I you have a watch (support Android Wear) and a smartphone (Support Android), theorically you can create a application for the watch to transfert data acquired from the microphone watch to mobile into another application ? Dec 02 22:44:53 with 90% content of ads, for tracking, etc Dec 02 22:45:02 g00s_: i think its all BS everywhere Dec 02 22:45:14 Fooman2011, except the mic on the watch is not accessible through APIs last I checked :) Dec 02 22:45:23 i'm looking at job listings and I don't like any of them :( Dec 02 22:45:26 i prefer to stick with a project i love and work on it. Dec 02 22:45:40 Fooman2011, actually my bad. The AudioRecord APIs are not available on the watch Dec 02 22:45:42 it's mostly webdev around here. I think I'd rather do mobile development Dec 02 22:45:44 Afzal: You mean using Android wear ? Dec 02 22:45:58 yes Dec 02 22:46:10 :( Dec 02 22:46:19 but webdev and mobile apps are similar, in that some people throw money at a terrible idea Dec 02 22:46:22 Afzal: Thanks very much for info :) Dec 02 22:46:31 Fooman2011, lemme double check this. I was looking for a very specific method when I tried Dec 02 22:46:33 Fooman2011: what watch is it ? dont have a clue, just curious.... Dec 02 22:47:35 Fooman2011, there: http://stackoverflow.com/questions/25969617/mediarecorder-throw-java-lang-runtimeexception-start-failed-2147483648-when Dec 02 22:47:58 makes sense, you can't use MediaRecorder APIs, only AudioRecord ones :) Dec 02 22:48:46 so yes. You can record the audio on the wear app, transfer data from the wear app to the mobile app and then do whatever with it Dec 02 22:51:11 why would changing the position of editText/ buttons via Grapahical Layout break my program?? That doesnt make sense Dec 02 22:51:21 i move one of them up a few pixels...bam Dec 02 22:51:38 g00s_, so the same 1 project forever now? :p Dec 02 22:51:59 pfn likes to put me down any chance he gets Dec 02 22:56:57 g00s_, don't you get bored? Dec 02 22:57:31 day: What change does it make to the XML file? Dec 02 22:57:38 no, because i don't see myself as a mobile developer. its just a means to an end. the project keeps getting bigger and bigger with other technologies Dec 02 22:59:17 i could wind up even doing my own HW soon Dec 02 22:59:37 so easy with BLE; for $2 you get a radio and arm m0 Dec 02 23:00:10 Sony smartband talk swr30 Dec 02 23:00:31 Afzal: It seems possible using AurdioRecord clas Dec 02 23:00:35 i give up making a Observable behave like loader, ugh Dec 02 23:00:42 Yeah Dec 02 23:01:06 g00s_, depends, how much like loader? :p Dec 02 23:01:19 Afzal do you use rx ? Dec 02 23:01:30 g00s_, just a tiny bit Dec 02 23:01:46 g00s_, oh look at this: https://github.com/evant/rxloader Dec 02 23:02:33 "and fall down anytime you want to do anything more complex than loading data immediately when the Activity or Fragment is shown" lol Dec 02 23:02:39 Afzal thanks Dec 02 23:02:42 JakeWharton, might be able to shed some light on this too since he has a tweet from last year to do the same :D Dec 02 23:03:00 Using a custom view in place of ViewHolder, I was able to implement the footer thing in my adapter and keep the code simple: http://pastebin.com/TNUbYRBv Dec 02 23:03:14 So glad I'm not using ViewHolder now. The equivalent of even that with ViewHolder is hugely harder to read. Dec 02 23:03:53 Afzal i didn't see anything in there about cursors. that the trouble, mixing the Subscription side effects with timing of closing the cursor Dec 02 23:05:29 Oops, I could change some of those Views to WhateverViews. Dec 02 23:05:50 Or one. Dec 02 23:06:49 Afzal http://www.reddit.com/r/androiddev/comments/2nzk7n/rxjava_for_sqlite/ Dec 02 23:07:51 heh, first time I've seen someone mention rxloader here (someone at work pointed it out a while ago) Dec 02 23:08:50 TacticalJoke, yes, viewholder is a messy pattern Dec 02 23:09:38 Yeah, when I do the CommentListingAdapter, that'll be way more complex. ViewHolder would've killed that. Dec 02 23:30:59 can someone explain the parameters to getPixels(int[] pixels, int offset, int stride, int x, int y, int width, int height) Dec 02 23:31:09 for example, what is stride? Dec 02 23:31:36 say i have a tile set bitmap thats X tiles wide by Y tiles high and i want to extract ONE tiles worth of pixles to an array.. . . Dec 02 23:32:14 i assume i would set offset and stride to 0 and just use x,y/w,h ? Dec 02 23:33:21 Hey! I've started to use a custom font in my listview and now the scrolling is much slower and laggy. Any ideas? Dec 02 23:34:33 aceus: What does your Adapter.getView override look like? Dec 02 23:37:39 i440r, what do the docs say about description of args? Dec 02 23:37:50 i dont see a description of the args Dec 02 23:38:06 Returns in pixels[] a copy of the data in the bitmap. Dec 02 23:38:06 Oops. Just found a huge bug in that code I posted. Dec 02 23:39:05 thats funny, cause I see description of args Dec 02 23:39:34 yea i am not used to the google api docs, i did not see they had TWO sections for this one api call Dec 02 23:39:44 googles docs suck donkey Dec 02 23:39:47 stride:the number of entries in pixels [] to skip between rows... Dec 02 23:39:59 it isnt a google api Dec 02 23:40:01 they say set it to width Dec 02 23:40:04 its for bitmap Dec 02 23:40:08 its their documentation Dec 02 23:40:31 ... Dec 02 23:41:03 so it shouldnt matter whose it is, you just dont like reading Dec 02 23:41:42 no. i just dont like reading badly formatted, horrendously presented documentation thats of no use to ANYONE unless they already know the entire api inside and out Dec 02 23:42:04 I440r: stride is i think when you pack your array Dec 02 23:42:05 false Dec 02 23:42:43 ie, if you have like point information encoded with color informaiton so x1, y1, z1, r1, g1, b1, x2, y2, z2, r2, g2, b2 then the stride would be 6 Dec 02 23:42:53 since each set in the sequence is six elements Dec 02 23:43:21 in this case it's probably the resolution of your pixel array? Dec 02 23:43:35 width of it Dec 02 23:43:53 no i mean, how many numbers in the array define a pixel? Dec 02 23:44:01 one Dec 02 23:44:20 0xAARRGGBB Dec 02 23:45:20 its saying you use it to skip a row, so to skip a row, the minimum has to be 1xwidth, to skip to rows would be 2xwidth Dec 02 23:45:22 ahh Dec 02 23:45:25 the stride is the row Dec 02 23:45:33 so its >= bitmap width Dec 02 23:46:10 so to skip no rows i set it equal to 0 ? Dec 02 23:46:31 no Dec 02 23:46:37 err Dec 02 23:46:38 dunno Dec 02 23:46:43 seems like it should be bitmap width Dec 02 23:46:52 thats what the documentation suggests Dec 02 23:47:27 if you arent wanting to skip then dont use that method? Dec 02 23:47:36 what do you need? Dec 02 23:47:43 stride is just the width of your pixel array Dec 02 23:47:44 that's all Dec 02 23:47:50 im trying to extract one tile of 32x32 pixles out of a bitmap thats 8 tiles wide by N tiles high Dec 02 23:47:55 you can get all pixels of a bitmap Dec 02 23:48:13 not as a bitmap but as an integer array. i dont want to do a for loop extracting ONE pel at a time Dec 02 23:48:17 I440r, just get 32, for stride and width Dec 02 23:48:54 2d array = pixels[x*y], and each row is pixels[x + y * stride] Dec 02 23:48:57 pfn stride = width of area im extracting not width of the image itself! Dec 02 23:48:58 got it Dec 02 23:49:08 no, stride is what I just gave above Dec 02 23:49:24 pixels[x + y * stride] Dec 02 23:49:43 your not making any sense Dec 02 23:49:45 and yes, stride must be >= width Dec 02 23:49:53 if thats the stride why does it even want any x or y coords Dec 02 23:49:53 do you understand how to work with "2 dimensional arrays" ? Dec 02 23:49:59 you clearly don't Dec 02 23:50:04 its NOT a 2d array Dec 02 23:50:11 there's no such thing as a 2d array in java Dec 02 23:50:15 the array is 1d/. the bitmap is 2d Dec 02 23:50:19 exactly Dec 02 23:50:23 [x + y * stride] Dec 02 23:50:26 if you can't figure that out Dec 02 23:50:29 get back to thinking about it Dec 02 23:50:59 does not compute Dec 02 23:51:09 given a flat array of length x*y Dec 02 23:51:15 how do you get a pixel at x,y Dec 02 23:51:39 the BITMAP is 2 dimensional. the integer array is NOT Dec 02 23:51:44 stride = tile width Dec 02 23:51:48 seems to have worked Dec 02 23:53:06 why is the sdk's api-21 10gb? the other system images are about 1gb Dec 02 23:53:27 testing if it actually DID work now.. Dec 02 23:54:04 my laptop has 3gb left..... i probably wont even be able to add on the next sdk update at this rate Dec 02 23:55:02 seems what you want is similar to what some older maybe also newer games do. one large bitmap with many sprites, then extract sprites based off a smaller square. cant remeber the term. sprite sheet or such Dec 02 23:55:41 I think I’m about to experience first-hand what happens when logcat hits its limit Dec 02 23:56:02 40000 threads and counting Dec 02 23:56:03 logcats limit is to trim Dec 02 23:56:13 I440r, you need to use your brain some Dec 02 23:56:17 its the software reading that may fail Dec 02 23:56:29 heh depends on how high you set that limit Dec 02 23:56:38 pfn i did. your suggestion seems wrong. setting stride = to tile width (i.e. width of area being extracted) seems to have worked perfectly Dec 02 23:56:48 40000 threads, is dumb Dec 02 23:56:52 oh yeah what i said Dec 02 23:56:59 lol Dec 02 23:57:02 not for this test Dec 02 23:57:12 for all test Dec 02 23:57:19 40000 threads is dumb Dec 02 23:57:24 its hasnt spawned 40000 threads at once Dec 02 23:57:35 oh great Dec 02 23:57:40 it’s 3 threads in a for loop of 10000 Dec 02 23:57:40 my hard drive has 72mb free Dec 02 23:57:42 who cares, more than 8 is dumb for most Dec 02 23:57:51 I’m testing concurrency Dec 02 23:57:56 threads obviously arent what you expect Dec 02 23:58:09 they sure arent’ that’s why I want to spawn many of them Dec 02 23:58:12 you're abusing concurrenyt Dec 02 23:58:25 arrest him! Dec 02 23:58:27 stupid Dec 02 23:58:29 * tricknology runs Dec 02 23:58:35 well how would you do it.. Dec 02 23:58:48 if you spawn a thread in a thread in a thread in a thread in a thread how many threads have you spawned? Dec 02 23:58:56 why are you doing this tricknology? Dec 02 23:59:03 that’s not what im doing haha Dec 02 23:59:11 what are you trying to accomplish? Dec 02 23:59:12 hwrdprkns i think you get a SO at some point Dec 02 23:59:19 have you not heard of a threadpool? ;p Dec 02 23:59:30 especially, seeing code you posted in ##java couple days ago where you have a method that just creates new Thread. that expensive, use a pool, Executor etc Dec 02 23:59:35 it’s kind of simple.. just ping a bunch of different URLS and use the first one that returns status 200 Dec 02 23:59:41 3 urls = 3 threads Dec 02 23:59:44 I440r, of course it works perfectly Dec 02 23:59:51 you should of course use a thread pool yo Dec 02 23:59:54 which is not what you suggested Dec 03 00:00:06 I440r, it only doesn't work if you want your destination buffer to be larger than the slice of bitmap you want to retrieve Dec 03 00:00:22 like if you're slicing bitmaps to make a larger bitmap Dec 03 00:00:33 tricknology: wrong, use a pool or some kind of management. no need to just keep uncaringly spawn new Threads Dec 03 00:00:34 pfn ugh i get it. im remembering the amiga blitter now Dec 03 00:00:41 well let me explain a little further.. Say I have 3 servers, 1 west, 1 central, one east. I want my eclient to use the fastest server.. Dec 03 00:00:42 the stride is for the TARGET buffer, not the source buffer Dec 03 00:01:00 stride skips, stop and rethink Dec 03 00:01:00 so spawn 3 threads, whoever returns status 200 - use that one Dec 03 00:01:01 tricknology: you can do that with just one thread... Dec 03 00:01:13 slice it as pfn says Dec 03 00:01:18 yeah but then I have to ping each one successively Dec 03 00:01:29 waht if the latency is 1000ms+? Dec 03 00:01:32 if the phone has only one cpu it will do that anyways Dec 03 00:01:37 lololol Dec 03 00:01:43 set a timeout Dec 03 00:01:44 tricknology in that case you want async i/o networking Dec 03 00:01:45 clever lasserix Dec 03 00:01:57 which is great for many connections / sparse events Dec 03 00:02:04 I440r, that's right Dec 03 00:02:12 tricknology: who cares if latency is 1000ms+, should care about your complete disregard of programming Dec 03 00:02:14 aah I think that might be a little overkill no? Dec 03 00:02:17 pfn thats the bit that i was slightly confused about :) Dec 03 00:02:26 you ever mess with the amiga blitter? Dec 03 00:02:27 I think you aren’t understanding what I’m doing Dec 03 00:02:33 I440r, nope Dec 03 00:02:40 I440r, but it's a common practice Dec 03 00:02:42 I jsut wanted to see for myself what messed up thread management would do Dec 03 00:02:47 hance the 30000+ threads Dec 03 00:03:01 it will be bad Dec 03 00:03:06 it was bad Dec 03 00:03:07 keep it simple stupid Dec 03 00:03:09 ;p Dec 03 00:03:16 well I guess pat yourself on back for showing how to do it wrong Dec 03 00:03:21 counter inly incremented to 5893.. should have been 10000 Dec 03 00:03:22 tricknology: you probably want to average 3 attempts Dec 03 00:03:32 set a timeout Dec 03 00:03:36 gah… that was just for my test Dec 03 00:03:45 check this out please Dec 03 00:03:46 cause if the latency is more than a second, then probably you don't want to use that server right? Dec 03 00:03:47 no need to test Dec 03 00:04:02 want to ping 3 servers at once.. the first one to repond with OK use that url.. that’s it Dec 03 00:04:05 if you have 4 cores with 10000 threads, guess what.... Dec 03 00:04:18 In practice I never spawn more than 3 Dec 03 00:04:26 you don't need more than one Dec 03 00:04:36 you practiced with more than 10000 Dec 03 00:04:42 you can even use a pool Dec 03 00:04:44 and it'll reuse Dec 03 00:04:56 no! thread ALL the things! Dec 03 00:04:58 ok so i guess i need some help with this in a different way. Dec 03 00:05:22 i am drawing a minimap as the player moves around the world. one PEL of the mini map = 1 tile of the world Dec 03 00:05:23 yes Dec 03 00:05:29 every method deserves its own thread! Dec 03 00:05:32 the color of pel = the avg of the colors within the tile Dec 03 00:05:39 i440r, check out sprite sheets Dec 03 00:05:46 what is pel? Dec 03 00:06:02 so i am extracting that one tile into the array and computing the avg r/g/b values of that tile Dec 03 00:06:07 private ecstasy label Dec 03 00:06:10 picture el;ement Dec 03 00:06:13 pixel Dec 03 00:06:35 problem is, my minimap pels seem to be tending towards gray Dec 03 00:06:46 there are many examples on line of getting most common colors in an image Dec 03 00:07:13 https://gist.github.com/znwabudike/dfa45da4f8fd77f525ee Dec 03 00:07:17 hopefully this helps.. Dec 03 00:07:22 Hello! Im trying to port my old Tabs to be compatible with 5.0 - as nowadays NAVIGATION_MODE_TABS is deprecated. I got it to work with ViewPager and PagerTabStrip, but i only need very basic Tabs, like thos in the hangouts app. Dec 03 00:07:24 pastebin was down so the spacing is wrecked.. Dec 03 00:07:54 how do i achieve these tabs like in the Hangouts app? - Also with a viewpager? Dec 03 00:09:43 tricknology: that looks horrible Dec 03 00:09:45 forgot that 10k for loop.. Dec 03 00:09:54 https://gist.github.com/znwabudike/dfa45da4f8fd77f525ee Dec 03 00:11:17 whatitis~ it doesn’t look that way in my IDE i promise :p Dec 03 00:11:52 tricknology: jeez Dec 03 00:12:07 stop with new thread in loop, use a pool. ExecutorService or ExecutorThread cant remember, can reuse threads. even simply creating a class that extends thread and allowing it to accept a method that tosses it runnables or whatever and blocks til new would be better Dec 03 00:12:22 new Thread is expensive Dec 03 00:12:26 AsyncTask.THREAD_POOL_EXECUTOR Dec 03 00:13:13 ok I will do that. Thanks Dec 03 00:13:31 the examples i have found are doing exactly what im doing, it tends to white balance the image Dec 03 00:13:35 not what im looking for Dec 03 00:15:19 tricknology: just stop guessing and throwing in code you think should work. and start accepting that what you wanna do has been done before&check examples, multiple, of keywords of your issue Dec 03 00:17:37 there are many ways todo threading, you just have to know your endgame, and find a way to get there using tested methods Dec 03 00:18:08 new Thread is never the answer Dec 03 00:20:38 if my minimum target will always be jellybean(api 16), and of course i will also test and build for api21(android 5.0), do i still need system images for api's 17/18/19 to test on? if my app works on api 16 and 21, it is not gonna break on api 17/18/19 right? Dec 03 00:20:51 unless the question is, what's not the answer Dec 03 00:21:08 njcomsec not a good assumption Dec 03 00:21:17 because i simply dont have the hard drive space Dec 03 00:21:26 can you give me an example of how it could break then Dec 03 00:21:34 i really cant see how Dec 03 00:22:11 not like i keep bookmarks of all the interesting regressions sitting right here :) Dec 03 00:22:46 if elements are deprecated, it wont work on higher versions, if i use new elements not available in older versions -it wont work on older ones...... but if my app works on api 16 and 21 i dont see how it could fail on the inbetween ones Dec 03 00:23:17 njcomsec: if you can live with some rare-ish crashes after shipping (and follow up quickly with fixes), you might be alright to start as long as you're not doing anything too complicated (stock widgets, only light theming, etc) Dec 03 00:23:30 deprecated and new api methods on older is a different situation Dec 03 00:24:15 and deprecated doesnt mean doesnt work on close future apis, just that phasing out Dec 03 00:24:37 njcomsec see http://testdroid.com/testdroid/8615/android-5-0-lollipop-first-results-on-app-robustness Dec 03 00:25:14 its just the new system image (api 21) is 10gb... and i cant even upgrade my laptop hard drive Dec 03 00:25:29 so im having to uninstall every other thing on here i can find Dec 03 00:25:40 thanks i will check it out Dec 03 00:25:45 system image is 10g ? Dec 03 00:25:54 for api 21 yeh Dec 03 00:25:54 the image is 10gB? that seems fa Dec 03 00:25:55 se Dec 03 00:26:03 ok 9.something gb Dec 03 00:26:13 no way Dec 03 00:26:15 go into your sdk and look Dec 03 00:26:49 my sdk 21 is taking up 130 mb Dec 03 00:27:00 show a screenshot so I dont have to dl 9gb Dec 03 00:27:23 oops, qemu images sorry :D i don't have any of those XD Dec 03 00:27:28 maybe you didnt download everything inside it? i selected all inside api 21 because i dont know which bits i can leave out if any Dec 03 00:27:38 <_Auron_> lol Dec 03 00:28:10 so 9gb is all including source and docs etc, or just I age? Dec 03 00:28:26 or just image* Dec 03 00:28:54 which bits do i need just to test apps? Dec 03 00:29:13 probably a power of 2 Dec 03 00:29:16 left nut Dec 03 00:29:21 just sdk, and if no device, a single image for emulator Dec 03 00:33:29 Hi, is anybody online? Dec 03 00:33:35 nope Dec 03 00:34:03 lol well apparently you are. ;) Dec 03 00:34:30 I'm trying to find somebody who can help me decipher a logcat. Dec 03 00:34:46 I got an obvious error but don't know EXACTLY what it means. Dec 03 00:34:52 for your app? Dec 03 00:34:52 post it up Dec 03 00:34:58 not in here Dec 03 00:35:00 pastebin Dec 03 00:35:01 pastie Dec 03 00:35:02 <_Auron_> link with paste? Dec 03 00:35:05 whatever Dec 03 00:35:14 Not for an app but hardware related to gps Dec 03 00:35:21 Just a sec Dec 03 00:35:22 geofferey: but if your parents are siblings you can right on fuck off Dec 03 00:35:37 What? Dec 03 00:35:38 then if not your app, wrong place Dec 03 00:35:47 sorry that was a Dec 03 00:35:52 Where can I go for support Dec 03 00:35:52 game of thrones reference Dec 03 00:35:58 post your logcat error Dec 03 00:36:01 the whole red part Dec 03 00:36:05 on pastebin Dec 03 00:36:06 already Dec 03 00:36:10 alrighty Dec 03 00:37:54 thats why. api21 has about 10 system images i downloaded Dec 03 00:38:21 i only need ARM EABI 7a, and Intel x86 atom right? Dec 03 00:38:37 what are the other intel ones and the one with "google" on the front for Dec 03 00:39:04 whats the difference between "intel x86 atom system image" and "google apis intel x86 atom system image" Dec 03 00:40:27 google apis contains cool stuff like maps Dec 03 00:40:32 adding google api seperate from android Dec 03 00:41:10 here we go: Dec 03 00:41:13 http://pastebin.com/p9hVQvDp Dec 03 00:41:47 ok so i dont need the google ones Dec 03 00:41:49 permission fail Dec 03 00:41:54 im guessing i dont need the TV ones Dec 03 00:42:09 only get what you need Dec 03 00:42:31 @lasserix Dec 03 00:42:43 Idk how to direct towards somebody Dec 03 00:42:45 New to IRC Dec 03 00:43:00 geofferey: like this, normally Dec 03 00:43:03 if nothing specific to googles added apis, dont get those images Dec 03 00:43:24 oh okay, thanks Dec 03 00:43:26 do i need Arm or intel image? iv never seen this option when creating an avd Dec 03 00:43:40 or is that meant to be about my own computer processor Dec 03 00:43:54 if you have haxm installed, the intel ones will be fast Dec 03 00:44:07 haxm? my laptop has an intel i7 Dec 03 00:44:18 intel virtualisation drivers, basically Dec 03 00:44:20 as long as you don't use native ARM binaries in your app, it shouldn't make a difference. Dec 03 00:44:37 whatitis: were you refering to my logcat paste? Dec 03 00:44:47 yeah. it's intel's drivers to support fast virtualization. very much awesome. Dec 03 00:45:08 ok... i will just download 2Intel x86 Atom system image" Dec 03 00:45:22 "* Dec 03 00:49:03 Leeds http://www.vice.com/read/british-expats-hong-kong-cocaine-prostitutes-rurik-jutting-304 Dec 03 00:50:12 yes, yes... you know what I was doing last time I was in a pub in Wanchai, last week? Playing backgammon... Dec 03 00:52:17 is that what the kids are calling it these days? Dec 03 00:52:55 nah, we were calling it shesh-besh, but I assumed people here didn't know that name Dec 03 00:53:16 i find it hard to imagine the protests there now... was always so calm and peaceful when i visited hk Dec 03 00:53:23 geofferey: did you check for location permissions before trying to use GPS? and make sure it was added into your manifest? Dec 03 00:55:04 the protests have been 90% calm and peaceful... at least up to this weekend Dec 03 01:04:04 hello Dec 03 01:04:21 DataInputStream bf = new DataInputStream(socket.getInputStream()); Dec 03 01:04:30 ^ this causes a system error in android Dec 03 01:04:41 anyone could explain why and how to fix? Dec 03 01:05:42 What's a system error? Dec 03 01:06:19 is tagged by eclipse as System.err Dec 03 01:08:41 Please post the exact error message you're seeing. Dec 03 01:11:36 i fixed it while reading it Dec 03 01:11:38 thanks Dec 03 01:11:38 :D Dec 03 01:12:25 s73v3r:What manifest? I'm not sure what you're talking about. Would I have edit manifest and build rom again to fix? Dec 03 01:13:31 I am not building an app. If thats what you mean by manifest? Dec 03 01:13:59 I am trying to correct a problem with the rom. If this is the wrong place please let me know. Dec 03 01:14:50 locaion services work but not the gps. Dec 03 01:15:11 this is not #android-roms - this channel is for app developers, developing apps Dec 03 01:15:53 http://ezscreens.appspot.com/view/bb54/wtf+android+traceview Dec 03 01:15:54 wtf Dec 03 01:16:04 Okay sorry for that. I will try somewhere else. Dec 03 01:16:09 android why you broken??? Dec 03 01:16:44 50 seconds stuck in MessageQueue.enqueueMessage Dec 03 01:18:46 pfn huh? thats like core stuff Dec 03 01:19:18 is there anywhere beside #android-roms? its deader than door nails in there Dec 03 01:19:38 that is not a real channel... Dec 03 01:19:55 g00s_, of course, that's why I ask why android is broken Dec 03 01:20:00 the answer is to go back to wherever you got your 'rom' from, and talk to them Dec 03 01:21:06 That's not possible unfortuneately Dec 03 01:21:13 I would've done that. Dec 03 01:21:24 Actually looked into. They are MIA Dec 03 01:21:32 then you're SOL Dec 03 01:21:41 or 'buggered' Dec 03 01:21:43 There's gotta be someway. I can get the source Dec 03 01:21:47 geofferey so you decided to come here and disregard the topic instead Dec 03 01:21:53 but this is not the correct channel Dec 03 01:21:59 pfn: do message queues block while sending messages? the thread might be blocked. Dec 03 01:22:01 g00s_: he doesn't even know what a topic is Dec 03 01:22:13 he isn't even sure what irc is, then :P Dec 03 01:22:16 Android-dev I thought that was the topic Dec 03 01:22:28 making and fixing roms is part of android development Dec 03 01:22:30 * Leeds rests his case, m'lud Dec 03 01:22:33 Leeds probably should rename it to android-app-dev :D Dec 03 01:22:35 it didn't say android app dev Dec 03 01:22:42 lol Dec 03 01:22:47 geofferey: it does. Dec 03 01:22:57 it says #android-dev Dec 03 01:23:02 17:22 Topic for #android-dev: Android application development | Android 5.0 Lollipop SDK is out Dec 03 01:23:10 maybe try android-root ? Dec 03 01:23:18 I'm just looking for some help somewhere Dec 03 01:28:26 Groxx, should show up in there Dec 03 02:00:13 pfn: ugh. some time I need to figure out exactly how to read traceview. but: would it actually show up as exclusive time on dispatchMessage? it's not doing the work, whatever it calls is, and the inclusive time on dispatchMessage is still >99% (seems like that should usually be the case, but still) Dec 03 02:05:00 What do you folks think about parentheses in Java? I can't decide between [return (position < listing.getPostCount());] and [return position < listing.getPostCount();] (along with similar cases). Dec 03 02:05:41 My hunch is to use parentheses when using binary operators, but it gets messy if you do it religiously. Dec 03 02:06:12 TacticalJoke you have a knack asking style issues settled decades ago Dec 03 02:06:22 lol Dec 03 02:06:22 I'm not sure this one was ever settled. Dec 03 02:06:27 :D Dec 03 02:06:38 well, if it hasn' tbeen settled by now, it probably never will be right ? Dec 03 02:06:59 do whatever makes it more clear Dec 03 02:07:00 The cleanest approach might be to be inconsistent regarding parentheses, but that bothers me. Dec 03 02:07:33 Yeah, clarity rules. Dec 03 02:07:55 so if its not clear from operator precedence, add ( )s Dec 03 02:10:03 TacticalJoke: personally I dislike `return ( blah ) `. return isn't a function you're calling. Dec 03 02:10:43 I agree. Dec 03 02:10:55 TacticalJoke: otherwise I'm parenthesis-happy. the added explicitness is usually faster to read than remembering operator precedence (especially when you get into * vs && vs & vs ?:. ) Dec 03 02:11:17 I guess I mainly like using parentheses with the ternary operator, when binary operators are involved, such as with this: return (foo == bar) ? a : b; Dec 03 02:11:44 I don't usually for a single == for a ternary, but otherwise I do that too Dec 03 02:19:15 Hmm, now that I think of it, I quite like this style: return (foo) ? x : y; Dec 03 02:19:29 I think it's because it's analogous to 'if' statements. Dec 03 02:22:26 you do make a good point… Dec 03 02:43:23 Hey all, is there a widget for this sort of button (email/sms), or should I just use two buttons? Dec 03 02:43:32 http://i.imgur.com/oARuiPi.png Dec 03 02:50:25 Groxx, exclusive time means it does not count nested calls to other methods Dec 03 02:50:49 ie calculation or polling/waiting time **** ENDING LOGGING AT Wed Dec 03 02:59:58 2014