**** BEGIN LOGGING AT Sat Jun 06 02:59:59 2015 Jun 06 03:00:00 yes Jun 06 03:00:13 looking at the threads its probably measurement-1 Jun 06 03:00:26 gonna call it 5 times now Jun 06 03:00:28 they are probably waiting on each other.. dead-lock condition Jun 06 03:01:02 Odaym: what you doing? Jun 06 03:01:11 Odaym: onMeasure is never the size of the view Jun 06 03:01:18 well it doesnt have to be Jun 06 03:01:29 it isnt the size of anything.. Jun 06 03:01:32 Hmm... I'm just wondering why this cropped out of nowhere. It was fine when I published the app last night, and it was even working earlier today. Jun 06 03:01:36 Odaym: onMeasure is "I want to be this size" onLayout is "this is your size" Jun 06 03:01:39 you can use to get the drawable inside of it Jun 06 03:01:44 and get that size Jun 06 03:01:54 erm ok Jun 06 03:01:58 from the imagematrix Jun 06 03:01:58 :| Jun 06 03:02:37 no? Jun 06 03:02:53 Odaym: why are you doing this.. what are you trying to achieve? Jun 06 03:03:27 make a view have a padding top and bottom according to how high the image under that view is Jun 06 03:03:58 RelativeLayout much? Jun 06 03:04:12 ohhhhhhh damnnn Jun 06 03:04:14 no. Jun 06 03:04:24 layuot_alignTop? Jun 06 03:04:26 the view im using is a custom view that is not following the rules Jun 06 03:04:31 it always spans the whole view Jun 06 03:04:31 :| Jun 06 03:04:35 fail Jun 06 03:04:44 in code i dont know where he's doing it Jun 06 03:04:50 ok well use an onPreDraw Jun 06 03:04:58 https://github.com/Korilakkuma/CanvasView/blob/master/com/graphics/CanvasView.java Jun 06 03:05:09 no idea where it says "dont give a fuck and just paint everywhere" Jun 06 03:05:14 groxx: After looking at Palette I got it fixed :) http://pastebin.com/eUrWkF3D Jun 06 03:05:32 aha! Jun 06 03:05:37 6044-6044/com.om.atomic E/DBG﹕ [2000,1500] -> [2000,1500] & scales: x=1.0 y=1.0 Jun 06 03:05:37 06-06 06:05:24.001 6044-6112/com.om.atomic D/OpenGLRenderer﹕ endAllStagingAnimators on 0x979fe200 (RippleDrawable) with handle 0xaee710b0 Jun 06 03:05:38 06-06 06:05:24.385 6044-6044/com.om.atomic E/DBG﹕ [2000,1500] -> [1080,810] & scales: x=0.54 y=0.54 Jun 06 03:05:38 see Jun 06 03:05:46 this is one normal call and another call in a handler with 500 Jun 06 03:05:50 okay.. So 9 hours later.. 0 tests of everythign I've implemented.. Time to compile it.. Jun 06 03:05:51 android is BROKEN! Jun 06 03:05:51 <_genuser_> alright, I'm tired of this project. who wants to finish this? Jun 06 03:05:54 ha! Jun 06 03:06:08 ? Jun 06 03:06:13 Odaym: its because he doesnt override onMeasure Jun 06 03:06:33 i guessed as much but I didnt know what to put inside it Jun 06 03:06:50 just super? Jun 06 03:06:54 well, how do you want the size to work? Jun 06 03:07:09 Odaym: you trying to place a backgroudn behind this view? Jun 06 03:07:11 something on top? Jun 06 03:07:18 why line up the views like this Jun 06 03:07:24 I cant say in layout that it should be the height of the imageview, because the imageview is the whole view, but the IMAGE part of it may not span the whole view Jun 06 03:07:37 because I want to draw on the image Jun 06 03:07:45 right Jun 06 03:07:58 so just extend his view and override onDraw? Jun 06 03:08:03 draw your background drawable Jun 06 03:08:11 or just call setBackground? Jun 06 03:08:30 with what size bitmap? Jun 06 03:08:37 the size that his view took when it started Jun 06 03:08:42 so it is squished Jun 06 03:08:49 ok you can do this with an imageView Jun 06 03:08:54 and RelativeLayout Jun 06 03:09:30 so imageview you are saying will wrap content until the edge of where the actual picture is? Jun 06 03:09:33 set your imageview to match_parent wrap_content and android:adjustViewBounds = true then set the right android:scaleType to your preference Jun 06 03:10:02 now set his view to android:layout_alignTop and android:layout_alignBottom of your imageview Jun 06 03:11:24 you can always use Picasso's Target class to direct the result into a custom drawable in an extended CanvasView Jun 06 03:11:37 have the onMeasure use the size of the drawable to determine its size Jun 06 03:12:37 I tried that part but didnt know what I know now when I tried it Jun 06 03:12:41 so i tried something else Jun 06 03:12:46 Odaym: you might want to check out this example i did for someone in the channel a while back https://github.com/slightfoot/android-painter-example Jun 06 03:13:20 MRW my app hasn't had any crashes so far.. http://i.imgur.com/Na3cZe8.gifv Jun 06 03:13:32 I'll try it ok Jun 06 03:14:15 Actually.. wrong link.. was this one I wanted to use http://i.imgur.com/BAZ3gLD.gifv :P Jun 06 03:16:24 right, im off.. night Jun 06 03:23:42 surf2b1: cool :) was using the array form just a magic fix, or was it something else? Jun 06 03:24:14 Is anyone here having issues with Google Play Services 7.3.0? I just tried several versions of my app that are known to work, but as of a few hours ago they are not working. Jun 06 03:26:42 groxx: magic fix Jun 06 03:27:14 surf2b1: oh well. now we can look like wizards when it happens again. Jun 06 03:28:26 t0astt: I've had issues with gplay services and using XML to configure it. if you've got XML config, maybe switch it to code, see if it fixes everything? Jun 06 03:29:00 deadlock issues, specifically. apparently it pops up occasionally. Jun 06 03:29:33 groxx: I'm having deadlock issues right now, but everything to my knowledge is in code, aside from strings (like ID's, etc.) Jun 06 03:29:49 really needs experience to sum this whole thing up in something so simple that didnt even cross my mind, thanks a lot yet again Napalm|afk Jun 06 03:30:29 shouldve experimented more in xml before this whole fiasco of code Jun 06 03:30:41 why is it that when i generate getters/setters in android studio it plops them awkwardly right in the middle of everything Jun 06 03:31:09 then i always gotta cut them and move them down Jun 06 03:31:13 but at least the whole part where I scale the final resulting bitmap is all correct, it just fit right into place Jun 06 03:32:48 NateRiver: it might be using the auto-arrangement setting. if your code doesn't match it, the behavior could seem random. Jun 06 03:35:34 Using this example: http://stackoverflow.com/questions/8098806/where-do-i-create-and-use-scheduledthreadpoolexecutor-timertask-or-handler Jun 06 03:35:57 is it enough to use scheduleTaskExecutor.shutdown(); to stop the threads ondestroy? Jun 06 03:36:13 Hello i'm trying to use notifyDataSetchanged() inside onPostExecute() but it gives me "java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.BaseAdapter.notifyDataSetChanged()' on a null object reference Jun 06 03:36:13 " Jun 06 03:36:56 boodllebat: even though i think that it is right Jun 06 03:37:03 i can show my code Jun 06 03:39:31 today, I closed my legally questionable websites that earn $0-$1 per day, and focus on my app Jun 06 03:39:35 \o/ Jun 06 03:40:04 why even run it if it's legally questionable? Jun 06 03:40:12 and only earns 0-1 dollar a day Jun 06 03:40:44 I can show you the cooodeee.. Shiny shimmering spleeendid.. Tell me boodllebat when did you last let your IDE decide? Jun 06 03:40:48 Vercinger: idk it keep my adsens account a little active Jun 06 03:41:04 boodllebat, in all seriousness, sorry I can't help u :) Jun 06 03:41:23 Vercinger: why what happened ? Jun 06 03:41:25 paulo_ - I use my youtube channel for that Jun 06 03:41:40 boodllebat - I started listening to disney songs instead.. and I don't know what I'm talking about :) Jun 06 03:41:40 Vercinger: lol what video would I even make Jun 06 03:41:53 paulo_: legally questionable ones? :D Jun 06 03:42:04 Vercinger: like? Jun 06 03:42:08 Vercinger: i'm not using IDE i code on cli and i get exceptions on logcat Jun 06 03:42:51 boodllebat sorry.. your one line made me think of this song: https://www.youtube.com/watch?v=-kl4hJ4j48s Jun 06 03:43:24 I was just .. nerdifying the lyrics.. I'm terribly sorry.. There are plenty of other skilled people in here that might help you, but I'm not one of them :) Jun 06 03:43:50 paulo_.. I know for a fact you can easily earn +50$ a month by making minecraft videoes :D Jun 06 03:44:39 Vercinger: that is just shit listen to this https://www.youtube.com/watch?v=D6kOyjm14eE Jun 06 03:44:39 Anyone knows what part of the app-lifecycle is "called" when i press the "back"-button? Jun 06 03:45:07 It's all relative boodllebat :P Jun 06 03:45:33 Vercinger: no just listen it one time ! Jun 06 03:45:41 boodllebat: I am :) Jun 06 03:46:42 after like 3 weeks of Rnd and struggling with my app its finally becoming playable Jun 06 03:47:17 NateRiver: :) that's great can we earn via app ? Jun 06 03:47:23 NateRiver this one is for you: http://i.imgur.com/BAZ3gLD.gifv Jun 06 03:47:39 hahahahahah Jun 06 03:47:44 xD thnaks Jun 06 03:47:59 boodllebat: Where is the code? Jun 06 03:48:08 TacticalJoke: wait Jun 06 03:48:17 Vercinger: lol i'm not a good talker Jun 06 03:48:34 & i've tried minecraft before, it was entertaining at first Jun 06 03:48:41 but not so much anymore Jun 06 03:49:00 It's all relative :) Jun 06 03:49:22 TacticalJoke: as soon as i uncomment line 18 it'll give me null point exception i can also provide full code http://paste.ubuntu.com/11601419/ Jun 06 03:49:46 I think I'll use the gif for myself aswell.. no crashes in my app so far.. Time to field-test it! :) Jun 06 03:50:14 That's not enough context. Jun 06 03:50:18 Vercinger: this one goes to you watch it full http://gifsec.com/wp-content/uploads/GIF/2014/04/midget-fuck-you-gif.gif Jun 06 03:50:18 Anyway, I have to go. Jun 06 03:50:40 aww Jun 06 03:50:53 Vercinger: watch it full Jun 06 03:50:53 I hate gifs.. so sloooooow Jun 06 03:51:05 Vercinger: its not slow Jun 06 03:51:13 my internet it is Jun 06 03:51:20 takes long to load a gif for me than 1080 videoes.. Jun 06 03:52:29 TacticalJoke: there ? Jun 06 03:52:38 no, he had to go Jun 06 03:59:46 Hi, any retrofit users here? Jun 06 03:59:52 I'm trying to get it to work with some XML Jun 06 04:01:04 I am Jun 06 04:05:11 * surf2b1 chuckles Jun 06 04:07:38 dvass: I use Retrofit Jun 06 04:08:26 JakeWharton: I thought your name looked familiar Jun 06 04:13:13 I found the following piece of code online: http://hastebin.com/ziducufomo.avrasm Jun 06 04:13:22 I wanted to convert it to make us of Retrofit Jun 06 04:14:10 I think I can manage creating the POST request and getting the response but I need to keep querying it to check when the status attribute of the response is finished Jun 06 04:14:19 What would be the best way to keep querying it? Jun 06 04:14:55 I feel that using a Runnable is not ideal Jun 06 04:15:24 How do you guys keep track of your private keys for signing your apps? Right now mine is just sitting in my desktop directory... and I'm not really OK with that but I'm not sure if anyone has a good system to use Jun 06 04:16:12 t0astt: i keep mine in the top-level app directory, and just .git_ignore them to keep them out of git. Jun 06 04:17:44 treelzebub: ah ok Jun 06 04:18:05 you should backup them somewhere else. Jun 06 04:18:20 in case your drive fails or something Jun 06 04:18:35 lemg_mx: do you do cloud? or just physical media you own? Jun 06 04:19:13 I do cloud. Jun 06 04:19:27 but physical media would be good also Jun 06 04:19:35 so maybe in an USB drive Jun 06 04:20:30 t0astt: I tend to keep it in the same directory with a gitignore, plus store it on in 1password, which is backed up in several locations, and has a massive password. Jun 06 04:22:35 do i have to create new adpaptet inside onPostExecute() ? Jun 06 04:24:46 hm, Samsung's Galaxy Note 3 & 4 got highest scores in American Customer Satisfaction Index's annual report Jun 06 04:39:24 I bet they also won the "most developer hate directed at" award. several times over. Jun 06 04:44:38 groxx so consumers are like, "i'll take the phone with the most awards" :D Jun 06 04:45:00 do you remember that old video of the iphone vs evo 4g ? Jun 06 04:45:23 nope Jun 06 04:45:42 I've been tv-free since second year of college. I love it. Jun 06 04:46:02 groxx me too https://www.youtube.com/watch?v=FL7yD-0pqZg Jun 06 04:46:09 add a browser ad blocker, and my life is dramatically improved Jun 06 04:54:05 why do you have to register everytime you use this channel, it gets so tedious Jun 06 04:55:09 every single IRC client will do it for you Jun 06 04:57:28 yeah but most channels just let you in Jun 06 05:00:46 we like banning people using a stable account Jun 06 05:01:52 Ohh so they cant come back, i guess that makes sense Jun 06 05:04:14 about how often does Anrdoid Studio get a new version? i think they just added "Android M" Jun 06 05:25:30 Thanks for the SingletonFactory suggestion, that really solved so many problems Jun 06 05:28:29 Agggh making apps is so fun. It really sucked for like a month try to learn stuff. But now its more fun than most things Jun 06 05:35:29 anyone have any idea how apps like AppLock know when an application is brought to the foreground? https://play.google.com/store/apps/details?id=com.domobile.applock Jun 06 05:42:47 damn that applock thing has 250 mil? who knew something like that could get so popular, seems more like a 1 mil app Jun 06 05:49:22 NateRiver: 250 mil people need to hide their special photos from certain people Jun 06 05:49:26 IDK, never used it Jun 06 05:56:16 In order to enable and disable action bar items in code, I am using the strategy `Menu menu; @Override public boolean onCreateOptionsMenu(Menu menu) { this.menu = menu; return true; }`. I just got a crash report from a Galaxy Note 4 user: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.Menu.findItem(int)' on a null object reference Jun 06 05:57:25 essentially, for one user, the `menu` object is not being set and so calling findItem(int) on it causes an NPE Jun 06 05:57:32 but I can't reproduce at all on my nexus 5 Jun 06 05:58:04 maybe it's why I've been getting so many 1 star reviews with no review text, and this is the first user to click report when it crashes Jun 06 05:58:36 could be. very few click report Jun 06 06:00:15 Thats cool you can see what his error was though Jun 06 06:00:23 most common bug I see: launch app, hit home button, kill the process via the android tab in android studio (not force stop!), resume app from recent apps list. Jun 06 06:01:00 tends to highlight state mismanagement (especially static) in ways that other approaches don't Jun 06 06:01:48 so any ideas how to fix it? is there a better approach to dynamically changing menu items than saving the Menu passed to onCreateOptionsMenu? Jun 06 06:02:17 dunno :| I don't use the action bar Jun 06 06:07:19 all the answers on stackoverflow suggest my approach (e.g. http://stackoverflow.com/a/11699930/1318194) Jun 06 06:12:34 duncannz: they also mention http://stackoverflow.com/questions/7133141/android-changing-option-menu-items-programmatically/11699930#comment22195707_11699930 could you have a lifecycle problem? Jun 06 06:14:06 I could well have a lifecycle problem, however my understanding was onCreateOptionsMenu only gets called once? I haven't used setNavigationMode like that answer suggests Jun 06 06:14:10 comment suggests* Jun 06 06:14:52 also, this is in the docs: "Once the activity is created, the onCreateOptionsMenu() method is called only once" Jun 06 06:17:28 duncannz https://raw.githubusercontent.com/xxv/android-lifecycle/master/complete_android_fragment_lifecycle.png Jun 06 06:18:36 so it looks like each time after onResume? Jun 06 06:21:37 put lolcats in your lolcycle Jun 06 06:22:05 should it even matter for calling Menu#findItem()? as long as onCreateOptionsMenu(Menu) always gets passed a non-null Menu, it should be fine Jun 06 06:22:18 and it's always worked for me and other devices I've tested on so it seems samsung specific Jun 06 06:24:05 unfortunately, samsung specific behavior may as well be android specific behavior :( Jun 06 06:26:38 the only thing I can think of is that this guy's Internet loads something from my server faster than onCreateOptionsMenu() gets called Jun 06 06:26:54 and so menu is still null by the time I try to show a menu item Jun 06 06:26:58 but that seems really unlikely Jun 06 06:29:04 ..if anyone here has a Samsung Galaxy Note 4 and a spare moment to test my app (on play store), I'd greatly appreciate it. Jun 06 06:37:40 Nvm - it looks like I've found it. I was failing to keep my menu object over state changes (i.e. if(savedInstanceState!=null) in onCreate()). feel really stupid now Jun 06 06:38:10 it literally crashes when you rotate the screen and I didn't notice Jun 06 06:42:00 keeping a menu object over state change ? Jun 06 06:42:09 duncannz hope you are using leak canary :) Jun 06 06:43:05 g00s: never heard of it but will look into it, thanks Jun 06 06:43:20 oh actually I did see this on reddit Jun 06 06:47:00 Hello i have a AsyncTask i'm showing a loading dialog onPreExecute() but i'm unable to dismiss it inside onPostExecute() here is my code http://paste.ubuntu.com/11601965/ Jun 06 06:51:51 boodllebat: first google result: http://stackoverflow.com/questions/4538338/progressdialog-in-asynctask You need to create your progressdialog outside of onPreExecute Jun 06 06:52:33 IMHO a ProgressDialog is ugly. Also, consider orientation changes w/ using AsyncTask Jun 06 06:54:08 surf2b1: what is better that progress dialog Jun 06 06:56:29 boodllebat: Create your own custom dialog/view. I just think stock progress dialog is boring. Jun 06 06:57:52 I have private Intent mainMenuIntent = new Intent(this, MainMenu.class); in my activity and it gives error "java.lang.String android.content.Context.getPackageName()' on a null object reference" anyone know whats wrong with my intent? Jun 06 06:58:24 NateRiver make sure you do that in or after onCreate() Jun 06 06:59:31 ok thanks that fixed it :) Jun 06 06:59:55 surf2b1: oh i'm newbie it would take lot of time for me to make that but anyways i have a custom dialog using XML right ? Jun 06 07:00:57 boodllebat: yes, you can create a custom dialog with XML. Not sure if that was your question.. Jun 06 07:11:28 ohai happy android people :) Jun 06 07:13:12 harro Mavrik! Jun 06 07:14:18 hey Mavrik Jun 06 07:22:58 JakeWharton: The response I get from the API has a ( and ) surrounding the JSON Jun 06 07:23:10 how would I get retrofit to still recognise the response Jun 06 07:40:23 Sorry, I DCed. Jun 06 07:40:29 Did anyone mention how I could achieve this? Jun 06 07:43:31 no sorry its been dead air in here Jun 06 07:44:55 dvass, parse the response yourself Jun 06 07:45:19 the rules VII :D https://medium.com/google-developers/developing-for-android-vii-the-rules-framework-concerns-d0210e52eee3 Jun 06 07:45:28 we want more rules ! we want more rules ! Jun 06 07:46:28 I can't believe I solved that issue man Jun 06 07:46:43 started to think it was just the daily routine, come and work on the issue Jun 06 07:48:43 danijoo: with a deserialiser? Jun 06 07:49:54 g00s, reads like the bible Jun 06 07:50:12 "You shall not architecting around application components!" Jun 06 07:50:24 dvass, if you're using okhttp, you can add a request interceptor that will strip those parenthesis Jun 06 07:50:36 danijoo hm, have some questions ... "Isolate UI processes from Background Services" seems they are advocating putting services in another process ? Jun 06 07:50:51 Mavrik: thanks, will try that! Jun 06 07:51:48 dvass, or get the raw Response in your callback and parse it on your own Jun 06 07:52:10 g00s, makes sense Jun 06 07:52:25 Mavrik that such a pita though :( Jun 06 07:52:43 But just for services which really shouldn't die when their activity process is being killed Jun 06 07:52:59 on the other hand, foreground services have same priority as activities so I'm not sure just how much of a problem that is Jun 06 07:52:59 https://plus.google.com/+RonAmadeo/posts/BZEsJTcyfmk Jun 06 07:53:22 i have a foreground service - yeah. if you do onTrimMemory correctly ... not sure its worth it Jun 06 07:53:35 if you release caches & stuff the process might not be killed after all Jun 06 07:54:22 weird thing was i was just reading some android docs saying its best not to split, you may wind up using even more memory Jun 06 07:54:45 have to find that again Jun 06 07:58:27 If I can receive a different response how can I create a model to manage all the various responses? Jun 06 07:58:28 danijoo that was a year ago Jun 06 08:00:25 g00s, well yeah Jun 06 08:00:44 g00s, since you'll be duplicating the pieces of common memory right? :) Jun 06 08:00:46 oh haha :D Jun 06 08:00:53 early mornings... >.< Jun 06 08:01:55 they also say dont overlap service start / bind lifecycles :( i do that a lot Jun 06 08:13:33 ah found it, " If your goal is to have a background process that can run independently of a heavy-weight UI process, it can't have dependencies on content providers or services that execute in the UI process." Jun 06 08:14:15 since my service is taking data from devices and putting it into a content provider, seems like thats not possible any more Jun 06 08:15:12 dont really understand that though, i would think remote service putting stuff in provider would be *the* way to do it (sharing data) Jun 06 08:21:06 Is there any good library for managing notifications? Jun 06 08:21:23 Rather than having to create my own builder, keeping track of it and stuff? Jun 06 08:23:33 what do you need a library for? You cant do much with notification Jun 06 08:23:38 only show, hide, update Jun 06 08:24:09 Mavrik do you use in-process "local" bound services (casting binder to service) ? Jun 06 08:33:20 danijoo: because it would potentially be mroe shorthand to write Jun 06 08:36:11 i think the notification builder classes could have been better if they implemented it like GA builder ones; you put X in either the unchanging or changing part Jun 06 08:36:26 easier to reuse portions of things Jun 06 08:37:14 had a few bugs updating a notification using stale builder, i just rebuild it from ground up each time Jun 06 08:37:27 maybe cache pendingintents or whatever Jun 06 08:38:02 mm, in what way can I monitor a URL until a certain element equals a certain value? Jun 06 08:39:01 load the URL every N seconds/minutes/etc until it matches? Jun 06 08:39:32 Yeah but how to best execute code like this? Jun 06 08:39:40 particularly when the fetch part is async I believee Jun 06 08:39:51 If retrofit performs asynchronous operations Jun 06 08:40:50 I do it with an inexact repeating alarm... Jun 06 08:41:02 starts a service to load the URL Jun 06 08:41:48 Hmm, is that the best approach? Jun 06 08:42:15 the best approach would be to notify the phone Jun 06 08:42:19 via gcm for example Jun 06 08:42:25 good point Jun 06 08:42:49 periodic checks are bad for battery and limited mobile data plans Jun 06 08:43:50 dvass: is the server side under your control? Jun 06 08:44:05 Leeds: No, for which reason I could not do it Jun 06 08:44:11 via gcm Jun 06 08:44:21 you can still do it with an intermediate server of your own Jun 06 08:44:22 dvass, you could still set up your own server to do the checks Jun 06 08:44:54 mm I guess but for now I'd like to do it straight from the phone Jun 06 08:44:54 how often would you want to check that? every minute? every hour? Jun 06 08:44:54 sounds like things are in for abig shake up with doze mode Jun 06 08:45:10 g00s, yes :/ Jun 06 08:45:14 seems like GCM would be the most reliable way Jun 06 08:45:36 I started rewriting my app recently to do the checking server-side, until I noticed I was very clearly violating a government copyright notice... decided to just leave it be :) Jun 06 08:45:49 g00s, makes it really hard for single devs because you are forced to also do server side stuff for gcm.. Jun 06 08:46:32 yeah, seems like GCM has some special priority on M Jun 06 08:46:54 eh, server side stuff for GCM isn't hard Jun 06 08:48:18 worried more about freedom to use 3rd part push Jun 06 08:49:17 in the old days, you could go to sleep blocking on a socket ... and the phone would turn on again when data arrived, anybody could do that Jun 06 08:49:31 of course, assuming tcp connection was any good Jun 06 08:50:07 Leeds, its not hard, yes. But with limited sources its definitly harder than doing a periodic sync every hour via sync adapter Jun 06 09:00:03 http://stackoverflow.com/a/28398657/2780412 Jun 06 09:00:11 What about polling with retrofit like that? Jun 06 09:03:32 If your app is backgrounded, the phone might go to sleep Jun 06 09:07:34 Ah, so I should do it in a service? Jun 06 09:07:45 What if I had an ongoing notification? Would that prevent it sleeping? Jun 06 09:08:32 Sure, but then you'd keep the phone awake permanently Jun 06 09:08:40 Consider if you actually need that Jun 06 09:11:03 until the thing is over Jun 06 09:11:08 it shouldn't takemore thana minute or two Jun 06 09:11:40 Hi, what do you think on http://i.imgur.com/oqn4vID.png (ignore all grid problem, my first mockup ever)? Jun 06 09:15:17 I like Jun 06 09:15:25 isnt Halcyon Days for Steve Roach? Jun 06 09:15:27 yoavst: is it just an image or code Jun 06 09:15:41 dvass: Image Jun 06 09:15:45 is that subtlepatterns in the background? Jun 06 09:16:09 Odaym: it is pencil's grid Jun 06 09:16:15 the export png doesn't work :/ Jun 06 09:16:21 try subtlepatterns website Jun 06 09:16:30 really neat for this type of thing, and navdrawer backgrounds and whatnot Jun 06 09:16:59 Odaym: Thanks, I'll check it Jun 06 09:17:14 Do you think the cards look fine? the extended drawer is normal Jun 06 09:17:47 they don't look like cards Jun 06 09:18:07 it has rounded edges but it doesn't look like a card Jun 06 09:18:28 Odaym: As I said, it is mockup, so in real app it will look more cardish Jun 06 09:18:33 but is the content looks ok? Jun 06 09:18:38 well you asked if the cards look fine Jun 06 09:18:46 I cant say anymore since nothing is finished :P Jun 06 09:18:49 you can get out of any comment Jun 06 09:19:27 pretty big clash between purple and blue though, both are explosive Jun 06 09:20:26 It get the color from cover's palette Jun 06 09:20:33 nice Jun 06 09:20:38 you..have the code for that? Jun 06 09:20:39 :P Jun 06 09:20:43 not yet :P Jun 06 09:20:44 http://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsUjhfMDFndk5wcnM/components_cards3.png Jun 06 09:20:51 It is based on this google's mockup Jun 06 09:20:53 see? look at that Jun 06 09:21:03 how many colors are explosive and prominent? Jun 06 09:21:43 the top bar is pretty blaring, the rest are less noisy Jun 06 09:22:06 Odaym: Have you seen the photo I've sent by google? Jun 06 09:22:13 yes, that's the one I was talking about Jun 06 09:22:15 It is based on image's palette Jun 06 09:22:29 yea but since you mentioned the picture, I said look at how many colors are very loud, only 1 Jun 06 09:22:33 the rest much calmer Jun 06 09:22:52 Odaym: If I'll add more cards to the mockup will it look better? Jun 06 09:23:02 of course, no content is ugly Jun 06 09:23:22 just add any shit Jun 06 09:24:19 the google one you showed doesn't really look good to me, it looks childish Jun 06 09:24:53 man, there will only ever be one Apple Jun 06 09:24:58 noob tryhards Jun 06 09:26:22 what are the chances of going from noob programmer to making 100K from apps in like a 5-10 year period, assuming someone quits their job and works on it 10 hours a day Jun 06 09:26:32 100% Jun 06 09:26:36 Odaym: http://i.imgur.com/g9WZNJm.png Jun 06 09:26:37 better? Jun 06 09:26:48 much better Jun 06 09:26:55 yours looks better than theirs Jun 06 09:27:26 the deep pink they have is disgusting Jun 06 09:27:32 So your saying theres a chance Jun 06 09:27:34 zero taste man Jun 06 09:29:11 it's like a color that that American store that sells trendy things to teenagers would use Jun 06 09:29:15 I forget its name Jun 06 09:30:13 you quit your job to do that NateRiver? you will end up broke and no skill Jun 06 09:30:19 lol Jun 06 09:30:59 Odaym i thought you said 1005? Jun 06 09:31:07 Chrome likes to crash :/ Odaym now with roboto typeface - http://i.imgur.com/9eWuSuF.png Jun 06 09:31:08 100%? Jun 06 09:31:22 I thought you meant someone in that position quit their job and you take their place Jun 06 09:31:27 I misread Jun 06 09:31:53 no it looks elongated yoavst Jun 06 09:32:05 should look sturdy Jun 06 09:32:21 Odaym: But it is roboto Jun 06 09:32:32 just saying my taste Jun 06 09:32:36 But it doesn't really matter, the device will force each font Jun 06 09:32:42 his font* Jun 06 09:32:42 hm? Jun 06 09:32:49 ...no you can set your own font Jun 06 09:32:56 Should I? Jun 06 09:32:57 right..? Jun 06 09:33:05 you can have any font you want .. Jun 06 09:33:09 I dont know Jun 06 09:33:11 Odaym why will I end up broke, i want to work hard and earn enough money to get some land and marry Farmer Marven's beautiful daughter Jun 06 09:33:19 me too! Jun 06 09:33:29 cause you dont have what it takes NateRiver Jun 06 09:34:41 You dont know me, in a month ive already made some really cool apps - and im only getting better. And even if I didnt have what it takes id still get what i takes, you havent seen how pretty Vienna is Jun 06 09:35:00 if you really wanted the above you would've achieved it with your current job :P Jun 06 09:35:11 you just dont wanna wake up at 9 AM Jun 06 09:35:12 :P Jun 06 09:36:58 Odaym, my job at the Disney store? no it was a waste of time, ill never win Viennas hand if i keep comming home with glitter in my hair every night Jun 06 09:37:39 well, that's my opinion Jun 06 09:37:43 you should try at least Jun 06 09:38:00 save enough money to live for a year, quit your job and try what you're saying Jun 06 09:39:52 I already did quit it and have been doing that for the last month, I still have enough for 5 more years of coding Jun 06 09:40:06 then why are you talking Jun 06 09:42:16 I guess I wanted an experienced person to say the chance of making 100K off their app companies after 5 years xD Jun 06 09:43:03 yeaa..... Jun 06 09:43:06 right Jun 06 09:43:21 you are that person Jun 06 09:43:25 dont think anybody here has done that Jun 06 09:43:34 you will tell us some years from now if it's possible Jun 06 09:43:54 you're already an entrepreneur bro Jun 06 09:44:08 hmmm, thats cool to think about, thanks Jun 06 09:51:04 How do you delete an app's cache in Android M? I don't see it anywhere in the App info menu. Jun 06 09:51:06 im going to print out our conversation and put it on the wall Jun 06 09:52:50 Ah found it, it had to calculate it first :/ Jun 06 09:52:51 Does it matter what i use for icons edit like switch or photoshop? Jun 06 09:54:34 Hey Muchoz Jun 06 09:54:55 ? Jun 06 09:55:38 What the ? for Muchoz? Jun 06 09:55:56 Use whatever you like, I'd advise a vector based graphics editor like Illustrator, Sketch, Inkscape or that other thing on Mac. perlsyntax, because you said "hey Muchoz" Jun 06 09:56:07 i got sketch 3 Jun 06 09:56:21 Use whatever you're good at Jun 06 09:56:45 oh i just say hi that all. Jun 06 09:57:25 Muchoz,I try out sketch 3:) but i try to find some good plugin for it:) Jun 06 09:58:12 perlsyntax, I personally use Trello/Victor and SVG's from Sketch 3. Jun 06 09:58:21 thanks Jun 06 09:58:26 It's a damn breeze: https://github.com/trello/victor Jun 06 09:58:45 Do you ever have the default android studio emulator get stuck above your screen so you cant move it? Jun 06 09:59:06 You'll have to live with not seeing the images in the editor though, but that's a problem on AS' end. Jun 06 09:59:11 preview* Jun 06 10:01:09 are tools:somthing="something" tags in xml layouts removed in release builds? Jun 06 10:06:04 how to store and fetch data from cache ? Jun 06 10:06:43 boodllebat, do you have a cache? ;) Jun 06 10:07:14 if you dont know, you dont Jun 06 10:07:41 danijoo: i mean a i create a temporary base to store HTTP data so that i can match it so that i do get request for same http content again n again Jun 06 10:08:15 danijoo: like i dont want to update my listview for same content again and again Jun 06 10:08:37 depends on your implementation Jun 06 10:08:58 okhttp does that automatically afaik. Ofc the website needs to send the correct headers Jun 06 10:09:47 What can i do to prevent my listview from updating same content again and again from http server like if one time the content fills the listview i dont want to fetch content in listview again on http event Jun 06 10:10:53 danijoo: i'm not getting your thing can you tell me anything about which i should read ? Jun 06 10:11:07 read about cache headers Jun 06 10:12:11 danijoo: android cache headers or http cache headers ? Jun 06 10:12:36 http Jun 06 10:12:51 Thanks bro Jun 06 10:12:53 this is a good start: http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ Jun 06 10:15:35 danijoo: hey i found something this might be fe useful for me http://developer.android.com/reference/android/net/http/HttpResponseCache.html Jun 06 10:15:54 danijoo: what's time there ? Jun 06 10:16:11 time? Jun 06 10:16:29 Time is a measure in which events can be ordered from the past through the present into the future. Jun 06 10:16:37 (c) wikipedia Jun 06 10:16:56 :p Jun 06 10:17:55 i mean what's time at your place like at my place its 3:47PM ? Jun 06 10:18:34 danijoo: like time on clock Jun 06 10:18:47 midday Jun 06 10:19:03 12.19 to be exact Jun 06 10:20:22 am I so interessting? Jun 06 10:20:32 [12:20:02] * Received a CTCP TIME from boodllebat Jun 06 10:20:33 [12:20:13] * Received a CTCP FINGER from boodllebat Jun 06 10:20:33 [12:20:18] * Received a CTCP USERINFO from boodllebat Jun 06 10:20:43 danijoo: i'm new to irc Jun 06 10:21:03 :p Jun 06 10:21:28 danijoo: what happens to you when i do CTCP from here ? Jun 06 10:21:42 danijoo: do you get notification ? Jun 06 10:21:52 i just posted that notification .... Jun 06 10:22:08 depends on client. some show it, some dont Jun 06 10:22:18 danijoo: do CTCP time on me Jun 06 10:22:23 i did Jun 06 10:22:24 ;) Jun 06 10:22:41 * [boodllebat] (~smuxi@123.136.206.230): boodllebat Jun 06 10:22:41 * [boodllebat] #android-dev #ubuntu Jun 06 10:22:42 * [boodllebat] weber.freenode.net :US Jun 06 10:22:42 * [boodllebat] idle 00:00:29, signon: Sat Jun 06 10:33:25 Jun 06 10:22:42 * [boodllebat] is logged in as boodllebat Jun 06 10:22:42 * [boodllebat] End of WHOIS list. Jun 06 10:22:51 danijoo: oh got that Jun 06 11:04:16 It's so annoying that android.os.Build.MODEL does not give the correct device name for so many phones. ahh Jun 06 11:04:37 I have an activity that is only started when an intent is set to the app Jun 06 11:04:49 if I send two intents will that create two different instances of the activity? Jun 06 11:06:19 depends on the intent flags Jun 06 11:06:30 and on yout settings in manifest Jun 06 11:17:42 can app be taken down for using twitch, twitter and youtube icons? Jun 06 11:17:56 copyright and all that Jun 06 11:19:54 DarkChaoz: as long as you aren't using them as your launcher icon I don't think there will be a problem. I am not a lawyer and don't speak for Google or their bots. :) Jun 06 11:25:13 Any good tutorials on how to make and start services properly? I need to make a service to run a task to poll a UR Jun 06 11:25:14 L Jun 06 11:27:21 lol Jun 06 11:27:35 just wanna use icons simply for grid menu Jun 06 11:27:49 If I were to start a service from an activity and then terminate said activity, what happens to the service? Jun 06 11:44:13 dvass, depends Jun 06 12:06:37 i have something like this i get JSON content from web via HTTP request it works correctly when JSON is valid but if JSON is invalid my application crashes with exception with an exception of my logcat , i dont want application to be crashed i just want a dilog there that invalid JSON Jun 06 12:06:59 so catch the exception Jun 06 12:15:08 If working with RESTful APIs use Retrofit, is great. Jun 06 12:25:26 How can I set up testing on Android Studio? Jun 06 12:25:41 I read a guide on how to set up tests but I want to emulate sending an Intent to an activity Jun 06 12:25:56 do I do this just by starting the activity with an intent? Jun 06 12:30:52 dvass: adb shell, then use the am command Jun 06 12:38:21 hi all need help with this http://www.quora.com/How-do-I-get-a-ranked-list-of-Google-play-store-apps I am stuck with this problem for a couple of days. Please help Jun 06 12:45:50 I'm getting this error when I try to run the app Jun 06 12:45:56 Error:Execution failed for task ':app:preDexDebug'. Jun 06 12:45:56 > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 Jun 06 12:46:08 Anyone know what this is about? Is that I'm using JDK 8 Jun 06 12:48:14 Try building with --stacktrace, get some more information Jun 06 12:52:40 where do i ask questions related to google play store website? Jun 06 12:54:07 Does anyone have a sample code on Github or can send me a Pastebin how you have implemented the Fresco libary to display FB profile picture? :) Jun 06 12:55:19 In a circle view Jun 06 13:04:14 I switch to 1.7 JDK but it still gives the error... Jun 06 13:04:16 very odd. Jun 06 13:06:52 it's gradle, the new revolutionary build system that eats more time than your project, whatever it may be! Jun 06 13:08:23 man I still don't get this android crap Jun 06 13:12:05 me neither, but if you have specific questions, maybe someone who does get it can answer. Jun 06 13:12:52 I just scrolled back a bit, i feel threatened Jun 06 13:13:32 adq, why? :) Jun 06 13:13:40 you're the one getting paid when people bitching over android quit :P Jun 06 13:14:48 hey folks, does anyone know if there are any changes in 5.0+ to how memory allocation is handled in native C code? Jun 06 13:15:35 guys, I have a question. Is there any problem if I make a new thread to use for something like I do it in java? or I have to check how android does it? (the app works, I'm just curious if it's ok to do it like this or not) Jun 06 13:15:57 lol Mavrik ^^ Jun 06 13:16:19 sigmabeta, no Jun 06 13:16:31 luci1093, new Thread().start() or however it is works Jun 06 13:16:42 luci1093, it just may not be the best solution for what you are trying to do Jun 06 13:17:10 well yeah, that's how I've done it Jun 06 13:17:24 is it a problem or I can let it like this? Jun 06 13:17:45 luci1093, do you stop the thread when your UI is closed? Jun 06 13:18:02 hm, no Jun 06 13:18:08 Mavrik, i'm running a mmap call that worked on 32-bit devices before 5.0, but as soon as they get upgraded to 5.0 it fails Jun 06 13:18:15 mmap(0, 0x31000000, PROT_NONE, MAP_ANON | MAP_SHARED, -1, 0); Jun 06 13:18:28 well the max that I can create are like 2 so should I also close them? Jun 06 13:18:47 luci1093, assuming you stop the thread when the UI closes, it's fine. at that point an AsyncTask might be easier tho Jun 06 13:19:07 luci1093, so like I said, it is dependent on what you are trying to do Jun 06 13:19:08 sigmabeta, are you sure you're not hitting anything 64-bit related? Like https://code.google.com/p/android/issues/detail?id=80213 ? Jun 06 13:19:34 luci1093, so you just leave the code running after user closes your app? Jun 06 13:20:03 not sure, how do I check that? Jun 06 13:20:14 doesn't onDestroy just close them automatically? Jun 06 13:20:45 No. Jun 06 13:20:48 Why would it? Jun 06 13:20:48 luci1093, what are you trying to do Jun 06 13:21:09 where can I find out why android studio colors certain text? I did a refactor on a var and now it has a red background with a borrder which is even more red. I also have text which has a yellow background with a black border Jun 06 13:21:11 are you trying to have a "please wait, doing something" dialog while doing something? use AsyncTask Jun 06 13:21:11 luci1093, does the thread on desktop java just close when some class method is called? Jun 06 13:21:23 No. Jun 06 13:21:33 So on Android when Activity class goes away, threads aren't magically completed. Jun 06 13:21:37 are you trying to have some background work happen that the user doesn't care about, and then it finishes at some point and you're happy? use IntentService Jun 06 13:22:44 Mavrik, i'll be honest my NDK/JNI/C++ isn't fantastic, i am debugging code someone else wrote. howeverrr the problem in question does seem to have appeared after we started producing 64-bit builds. Jun 06 13:22:54 so I don't rule this out just yet Jun 06 13:23:53 Well, badly written native code will crash when pointers become longer ;) Jun 06 13:24:04 truth Jun 06 13:24:08 well it's a bit more complicated what I'm doing to explain it, I'll try tho... >.<. So I have like 3 listviews in my app that pretty much use the same code when running so I just made a global class with a method just for that. But I've noticed that they were starting to work really slow (btw using SimpleCursorAdapter- not the deprecated constructor) so I just initialised a new thread when that class context is called basicaly. Well that's about it Jun 06 13:24:08 lol Jun 06 13:24:19 Mavrik, but the code works on 64-bit devices. Jun 06 13:24:41 luci1093, where does the background thread fit into this Jun 06 13:25:19 well all 3 listviews were working on the same thread -> UI form what I've looked in the Android Device Monitor Jun 06 13:26:01 and when scrolling the listviews I'd see screenshots not scrolling lol, now they work smoothly o.o Jun 06 13:26:03 yes, anything that modifies the contents of the screen must (must (MUST!!1!1)) operate on the UI thread Jun 06 13:26:48 so typically if you don't want hitches in UI animation you do something like Jun 06 13:27:14 have the UI thread set up for the blocking animation (show a spinny thing, or a dialog, or something) Jun 06 13:27:38 how to retrofit content adapters work Jun 06 13:27:44 have a background thread do the thing that takes long (load screenshots?) Jun 06 13:27:46 I made one in hope of stripping the first and last char of the response Jun 06 13:27:56 have the background thread tell the UI thread it's finished Jun 06 13:27:57 if that would be the case most likely you'd get that spinning thing every time you want to scroll lol Jun 06 13:28:02 but the JSONElement that is passed through to the desiarlizer is only 1 char Jun 06 13:28:10 have the UI thread update itself with the finished content Jun 06 13:28:16 luci1093, yes, that happens in a lot of apps Jun 06 13:28:29 yes, but not when scrolling a listview Jun 06 13:28:31 luci1093, the behavior i just described is an Asynctask Jun 06 13:28:37 luci1093, look at the play store Jun 06 13:28:39 oh Jun 06 13:28:50 scroll up on the play store Jun 06 13:28:52 notice content fades in Jun 06 13:28:55 magic? no. asynctask Jun 06 13:29:13 ok, that's because it's waiting for a response from the server right? Jun 06 13:29:24 the image loading is not long enough to justify showing a spinny thing, but that's what's happening. Jun 06 13:29:25 you don't wait for that when you scroll through settings for example Jun 06 13:29:47 or through your music in Google music ... an example on top of my head Jun 06 13:29:54 luci1093, correct. anything involving image loading or a network call is going to take longer than 16ms, so you do it on a background thread. Jun 06 13:30:16 yes, but I'm jsut populating a listview from a local Database Jun 06 13:30:26 should I still use async for that? Jun 06 13:30:27 what does the listview contain Jun 06 13:31:35 data from the db. It shows for every listview a row in the db which contains like 7 columns Jun 06 13:31:46 *for every listview item Jun 06 13:31:54 what *views* does the listview contain Jun 06 13:31:55 Anyone any good with Retrofit? Jun 06 13:32:04 Yes, database queries should be performed off the main thread Jun 06 13:32:05 specifically, for each list item, what happens in your GetView() call Jun 06 13:32:38 well one lsitview item contains 12 textviews ... Jun 06 13:32:49 oh, that's right it's a DB + cursoradapter, so bindView() not getView() Jun 06 13:32:54 from which I use 6 of them know Jun 06 13:33:20 luci1093, assuming you are populating (*only*) textviews, (why did you mention screenshots earlier?) Jun 06 13:33:30 then you do not need to create a background thread for this. Jun 06 13:33:33 I did not Jun 06 13:33:42 you need to have the query that creates the cursor happen in a bakcground thread. Jun 06 13:34:52 okay and can I do it like Thread t = new Thread()? or any suggestions? Jun 06 13:35:07 guess I need to return somethign when its done, right? Jun 06 13:35:53 or should I still use AsyncTask for that too? >.< Jun 06 13:36:38 let's assume you use Thread Jun 06 13:36:52 how do you plan to notify the UI thread to update itself? Jun 06 13:38:32 lets handler all the things Jun 06 13:38:50 I have a custom LinearLayout view that contains multiple rows that can be hidden/shown at will. if I wanted to animate it, does it require a few lines or dozens of lines of code? Jun 06 13:38:51 luci1093, let me save you some effort Jun 06 13:39:21 the answer is "by googling for like an hour, which I shouldn't do, because AsyncTask will do that for me" Jun 06 13:39:36 the UI thread notification, not the googling Jun 06 13:40:28 ok I'll just look into AsyncTask Jun 06 13:40:37 seriously, it's great Jun 06 13:40:46 the thing is, I jsut made this app for learning puropuses, It's kinda in a messy state Jun 06 13:40:48 you'll want to do something like, extend AsyncTask Jun 06 13:41:13 override doinBackground() and perform your DB query in there Jun 06 13:41:36 override onPostExecute() and give your adapter the cursor you got from the DB query in there Jun 06 13:41:51 optionally, override onPreExecute() and replace the listview with a spinny thing there Jun 06 13:42:11 like for example you said how do I notify the UI thread to update itself... I acutally don't, or think I don't. Like for example when I add a new item to the database I just repopulate the listview (yes, I'm guessing that's a bad way of doing it but I'll let the performance issues for later on) but this scrolling thingy was bugging me >.< Jun 06 13:42:42 luci1093, when you say "repopulate the ListView" Jun 06 13:43:02 do you mean ListView lv = new Listview(); someLayout.addView(lv);? Jun 06 13:43:26 or do you mean listViewAdapter.notifyDatasetChanged(); Jun 06 13:43:38 because if you do either of those on a non-UI thread, you will crash the app Jun 06 13:44:16 runOnUiThread(new Runnable{...}); :) Jun 06 13:44:28 I just call again the function that populated the lsitview ... so that means the cursor gets the data again from the db and remakes the adapter and then show it... Jun 06 13:44:47 luci1093, and this isn't crashing your application? Jun 06 13:44:53 nope Jun 06 13:45:02 luci1093, because it is running on the UI thread Jun 06 13:45:13 which is why your screen freezes (I think that is what you meant by 'screenshots') every time this happens Jun 06 13:46:08 oh LOL ... that's why you tought I was talkign about images ? >.< uh sry Jun 06 13:46:08 yeah Jun 06 13:46:13 worth mentioning, this might be a passable but frustrating problem if the operation takes like a second or two Jun 06 13:46:31 if it takes longer than 5 seconds the app will throw a "app not responding, wanna quit?" dialog Jun 06 13:46:55 this isn't something you want to sweep under the rug. do it right, it's not hard and you'll thank yourself later Jun 06 13:47:44 so my solution is still AsyncTask in this case? XD Jun 06 13:48:07 it works pretty well like i've done it now too tho lol Jun 06 13:48:16 open your logcat Jun 06 13:48:25 filter by the word "choreographer" Jun 06 13:48:48 for each entry that shows up, paste the line "actually, it's not working so well" into this IRC chat Jun 06 13:49:49 AsyncTask is a class purpose-built for doing the exact thing you are trying to do, you could've written the code to use it in the time you've been spending trying to convince yourself it's not necessary Jun 06 13:49:50 it's real easy Jun 06 13:51:08 well not sure how to filter because it shows me nothing o.o ... anyway I was not trying to convince myself that it's not necesary ... I came here to ask if it's ok to do it like this or not :) Jun 06 13:51:50 ok I got it filtered >>< Jun 06 13:52:06 it skips frames Jun 06 13:52:13 how many? Jun 06 13:53:45 oh actually Jun 06 13:54:06 I'm not sure ... 06-06 16:48:04.345 2496-2496/com.android.systemui I/Choreographer﹕ Skipped 41 frames! The application may be doing too much work on its main thread. Jun 06 13:54:24 does that have anything to do with my app? Jun 06 13:54:51 and I'm not sure if that's after I added the new threads Jun 06 13:55:09 like for example I'm stressing it right now and doesnt show me any more of that o.o Jun 06 13:55:51 it's highly likely that came from your app Jun 06 13:56:14 not so sure .. .I was checking that now Jun 06 13:56:20 well, like you said Jun 06 13:56:22 if you're not getting it anymore Jun 06 13:56:28 then whatever you did has fixed the problem Jun 06 13:56:33 I only get that error when I close the screen Jun 06 13:56:41 even if my app is closed Jun 06 13:56:42 hm Jun 06 13:56:44 and you're probably also not seeing the screen freeze Jun 06 13:56:56 luci1093, yeah remember what we were saying about how you need to close your thread Jun 06 13:57:08 it is possible your thread is still trying to update the screen afterwards Jun 06 13:57:21 only, the activity doesn't exist anymore, so what is it updating Jun 06 13:57:33 well, the activity. because it still exists, because you have created a memory leak is my guess. Jun 06 13:57:44 hm, I'll try to uninstall it to see if I get this again ... why I'm curious is because I also have a custom Rom on my phone and I hope that doesnt come from the rom itself lol Jun 06 13:58:06 it's not impossible that the custom rom is causing it Jun 06 13:58:24 but it shouldn't be your first guess Jun 06 13:58:33 it's not xD Jun 06 13:59:30 funny thing Jun 06 13:59:39 I stll get that after uninstalling the app o.o Jun 06 14:01:08 oh well ... I'll use AsyncTask just to be safe xD Jun 06 14:02:13 luci1093, you're doing yourself a favor Jun 06 14:02:26 AsyncTask is basically page 2 of the how-to-dev-for-android manual Jun 06 14:02:45 you'll be using it a lot so it is worth having it under your belt Jun 06 14:03:29 alright Jun 06 14:04:04 java.lang.RuntimeException: Unable to start service service.MonitorConversionService@42f3d708 with Intent { .service.MonitorConversionService (has extras) }: retrofit.RetrofitError Jun 06 14:04:04 Jun 06 14:04:14 I do not understand why I am getting this error Jun 06 14:04:17 well thanks a lot for everything ... sry if I made you loose your patience xD (I know I can be annyoing sometimes :D) Jun 06 14:04:49 luci1093, nah it's fine, i apologize if i came off a bit terse, text can appear that way sometimes Jun 06 14:05:42 nah, you didn't ... only reason I said that was because we wasted quite a bit of time on the "Screenshot" thingy because I did not have a better way of explaining it in that moment XD Jun 06 14:06:30 yeah, the term that a lot of people have come to use to describe that type of thing is "jank" Jun 06 14:07:35 alright, I'll try to remember that next time xD Jun 06 14:07:40 and it's really a common problem Jun 06 14:07:58 a lot of people who dip their toes in android dev ignore things like what we've been talking about Jun 06 14:08:19 have you ever tried to a network call on the main thread? Jun 06 14:08:21 Anyone? Jun 06 14:08:26 no Jun 06 14:08:45 haven't done "networking" in android yet Jun 06 14:08:45 i'ma spoil it for you, it's guaranteed to crash the app Jun 06 14:08:50 instantaneously Jun 06 14:08:55 it will refuse to do it Jun 06 14:09:12 remember what i said before about how if the UI freezes for 5+ seconds, android gives the user the option to tableflip? Jun 06 14:09:13 it will refuse? I tought it will hang up Jun 06 14:09:31 yeah, figures Jun 06 14:09:38 the play store used to be lousy with apps that would be like Jun 06 14:10:02 oh you want to download the entirety of Transformers 6: the Really Really Long One? let me do that on the UI thread Jun 06 14:10:15 xD Jun 06 14:10:16 XD Jun 06 14:10:25 so in android 4.0 google made it so any network call on the ui thread would instantly crash the app Jun 06 14:10:41 so now rather than the play store being lousy with apps that have that easy of a problem to fix Jun 06 14:10:41 I'd have done that in verson 1 xD Jun 06 14:10:55 now it's just stack overflow lousy with people asking why their app is crashing :D Jun 06 14:11:07 then there are apps that leave very active resource hungry services "on" despite not using them Jun 06 14:11:18 oh god... that site is magical lol Jun 06 14:11:24 p_l Jun 06 14:11:27 p_l yup Jun 06 14:12:08 that's why I love Greenify <3 Jun 06 14:12:49 love how I can also reject app permisions on my rom :D Jun 06 14:13:29 luci1093, the more you learn about android dev, the more you will realize a lot of that stuff is snake oil Jun 06 14:13:50 & may cause more problems than it solves Jun 06 14:13:57 so like, you disabled network access Jun 06 14:14:13 but John Q Developer did not write code that checks "hey, did this guy allow network access or not?" Jun 06 14:14:18 nah, the only things I disable are GPS Jun 06 14:14:24 John Q Developer asked you for network access when you installed it Jun 06 14:14:24 and sometimes run in background Jun 06 14:14:31 JQD is assuming he has this permission Jun 06 14:14:38 when JQD sees the network access failed mysteriously Jun 06 14:14:44 JQD isn't gonna say "this guy just doesn't want me to do it" Jun 06 14:14:53 haha yeah Jun 06 14:15:00 he's gonna say "hey, let me try a million more times, i'm sure this guy's battery is infinite" Jun 06 14:15:09 well I didnt have problems with the gps part tho Jun 06 14:15:10 XDDDDDDDDDD Jun 06 14:15:28 to be clear, i know we're not talking about network access, and i know that isn't always the case Jun 06 14:15:41 I know Jun 06 14:15:48 it was still funny XD Jun 06 14:15:53 if JQD was smart in the first place, he would not respond to a mysterious failure by immediately trying again Jun 06 14:16:02 but as we've already been discussing, frequently JQD is not good at his job Jun 06 14:16:43 this'll get better with official support for permission revocation in Android M, but until then your better option is to just not use the app if you don't like what it does Jun 06 14:18:19 like, if the app is using GPS for reasons you think are illegitimate, what are the odds that's the only thing it's doing that you don't like Jun 06 14:20:04 yeah, I usualyl do that but there have been times in which I liked the app but I didn't want it to access, GPS for example, and I just disabled it and it worked yay :) Jun 06 14:20:25 I'm afraid M permissions will train lambda users to click "yes", "yes", "yes", whatever the consequences are. Like UAC did in the 2000's (antivirus, zonealarm, personal firewall, whatever) Jun 06 14:20:31 I just never use GPS that's why I reject their permission :) Jun 06 14:20:55 adq oh dude.... that's the worst when installing programs on PC Jun 06 14:21:28 those apps will just do if(! hasPermission() ) finish(); Jun 06 14:21:34 everyone that knows me comes to me with their PC problems and god ... not once have I seen a person that doesn't have crap installed becuase of that Jun 06 14:22:01 adq, i'm afraid of the opposite Jun 06 14:22:11 not a single person checks "custom installation" (well exept me muahah) xD Jun 06 14:22:33 all the folks who are gonna say NO WAY FACEBOOK, you can't have internet permission, checkmate suckers! Jun 06 14:22:36 then 1-star reviews Jun 06 14:22:44 "DOESN'T WORK WITHOUT INTERNET PERMISSION, REFUNDED" Jun 06 14:22:46 on a free app Jun 06 14:22:51 i'm talking about "lambda users" (nothing pejorativ here though) Jun 06 14:22:54 XD Jun 06 14:23:05 which corresponds to the masse Jun 06 14:23:17 which is most of ppl using facebook, per example Jun 06 14:23:21 (this includes my mom) Jun 06 14:23:53 they have no idea what privacy regardless to their own data and metadata is, they just want the service Jun 06 14:24:05 so they will click "yes" Jun 06 14:25:12 everthing costs. If its free, you are the product ;) Jun 06 14:25:31 everything ends too ;) but I will probably not see it Jun 06 14:25:45 danijoo, that's what i mean, i'm worried about the people who dont understand that Jun 06 14:26:35 by the way, internet will be granted auto iirc (on M) Jun 06 14:26:40 Hi, im trying to figure out how the LG IR blaster learns an IR code, and im stuck at the point where android.os.IBinder.transact() is done. Is it possible to find out where the thing goes on? I guess its leaving the debuggable VM code to process something natively Jun 06 14:26:42 it should be in the "default" group of perm Jun 06 14:27:13 which emphasis how this move about permission is shaddy Jun 06 14:27:49 but dev have been dellusioned since years, lacking of granularity in permissions scheme so now they are happy.. Jun 06 14:55:57 Is it possible to show notification in status bar using SL4A and Python? Jun 06 15:28:36 Quick question guys, can't I run network code in a service? Jun 06 15:28:49 I thought that as long as it wasn't the main UI thread you can run that kind of code without it being async Jun 06 15:37:41 dvass, services run in the UI thread by default Jun 06 15:37:52 consider an IntentService? Jun 06 15:37:55 I switched IntentSerbice and was fine Jun 06 15:37:57 thank you Jun 06 15:38:00 yeah Jun 06 15:38:08 IntentService is meant for one-off background work Jun 06 15:38:30 why registerReceiver(r, new IntentFilter(Intent.ACTION_TIME_TICK)) -> the receiver is only called once? Jun 06 15:39:18 doesn't matter, bug in my code :( Jun 06 15:40:11 Is there a broadcast for every second? I can use handler.postDelayed(x, 1000), but I'm losing seconds after few runs Jun 06 15:46:34 I woudnt rely on postDelayed Jun 06 15:46:45 if it must be exactly a second, use a thread Jun 06 15:53:49 If I have some XML with Jun 06 15:53:55 and I'm using Retrofit with SimpleXML Jun 06 15:54:03 how can I make the model parse the value of something Jun 06 16:03:34 read the docs Jun 06 16:05:34 you take a screenshot of your xml and include some OCR library to scan it into text Jun 06 16:07:52 danijoo, I'm starting to regret using DBFlow. Jun 06 16:08:35 It is so badly documented, nothing is explained, integration with Gson/Retrofit is vague/non existent. Jun 06 16:09:22 i woudnt expect an integration of something like that on an ORM anyways.. Jun 06 16:10:26 If only it was explained how I can do it myself. Even trying to create M2M tables seems impossible. Jun 06 16:10:41 No, that is not supported out of the box. Jun 06 16:10:58 switch if you dont like it Jun 06 16:11:24 danijoo, I'm once again looking for something. Jun 06 16:11:32 Looking at Schematic atm. Jun 06 16:11:49 why dont u start with something more people use Jun 06 16:11:53 ORMlite or GreenDAO Jun 06 16:12:29 danijoo, how do you know so many people use ormlite? Jun 06 16:13:26 Muchoz, its under the first hits if you google android orms ;) Jun 06 16:14:03 A better SEO doesn't mean it has more users. Jun 06 16:14:22 to some degree, it does Jun 06 16:14:43 and if you read blogs about orm, its always one of the compared ones Jun 06 16:15:11 https://www.google.de/search?q=android+orm&oq=android+orm&aqs=chrome..69i57j69i60l3j0l2.1223j0j4&sourceid=chrome&es_sm=93&ie=UTF-8 Jun 06 16:15:17 What do the big guys use? Jun 06 16:15:28 if its not on the first page, its not relevant :p Jun 06 16:15:35 what makes a guy big? Jun 06 16:15:53 1M+ users of the app. Jun 06 16:16:26 That doesn't seem like the correct way to assess if a library is popular Jun 06 16:16:42 hm. dunno. im only small then. just 700k :( Jun 06 16:16:50 I think number of projects using it is a better metric than the number of users of a specific app Jun 06 16:16:54 CedricBeust, Google results or whether a big guy uses it? Jun 06 16:17:06 It probably means it's robust though. Jun 06 16:18:08 look for github contributors and followers Jun 06 16:19:26 danijoo, well DBFlow has more watchers, stars, forks, but less contributors. Jun 06 16:20:08 but you already realized it sucks :pp Jun 06 16:20:12 FYI here is a simple approach that doesn't require an ORM (and possibly compatible with ORM's): http://beust.com/weblog/2015/06/01/easy-sqlite-on-android-with-rxjava/ Jun 06 16:20:41 yeah i think a lot of the "big guys" just go without orms Jun 06 16:21:03 I might switch with 1M+ too Jun 06 16:21:10 :p Jun 06 16:22:44 hmm yeah I guess I could be considered big :p Jun 06 16:22:54 Anyone have any idea about how to use SimpleXML with an XML tag like Jun 06 16:23:00 Muchoz, http://www.appbrain.com/stats/libraries/dev scroll to the first orm you see Jun 06 16:23:02 its ormlite :) Jun 06 16:23:55 dvass, you were already told to go read the docs Jun 06 16:24:31 I did, it didny make a distinction Jun 06 16:25:48 CedricBeust, that is interesting... Jun 06 16:25:56 Muchoz: Glad you like it Jun 06 16:26:55 Anyone have an idea for a fun Android project to try and learn Rx, Kotlin and Dagger? Jun 06 16:27:23 a word domination app Jun 06 16:27:58 razzledazzle: I don't know about a project specifically but I wrote a series of articles on the subject: http://beust.com/weblog/2015/03/23/android-rx-and-kotlin-a-case-study/ Jun 06 16:28:00 you mean world? :D Jun 06 16:28:48 :) Jun 06 16:28:52 CedricBeust, that webpage makes Safari go nuts aka keep reloading the page until it crashes :/ Jun 06 16:28:59 Muchoz: Really?!? Jun 06 16:29:03 how do you access XML variables from one XML file to another? Jun 06 16:29:13 CedricBeust, yes Jun 06 16:30:18 ah, I read that, thanks for writing that, inclined me more into Kotlin and Rx especially, now I just need something to work on to get the "Reactive" mindset :P Jun 06 16:31:20 * wakelock um, goes to dominate the word? Jun 06 16:31:25 have yet to decide which word Jun 06 16:31:43 * wakelock decides for "nerd" Jun 06 16:34:12 I should really start with rxJava Jun 06 16:34:30 I tell myself the same since 3 projects Jun 06 16:35:23 danijoo, what is the #1 frustration of ORMLite? Jun 06 16:35:40 you constantly asking about it :p Jun 06 16:35:58 I'm here with da quesionz!ç Jun 06 16:36:01 :) Jun 06 16:36:01 the fact it's an unnecessary abstraction layer over proper sql? :p Jun 06 16:36:07 That's worse of a grammar than I had intended Jun 06 16:36:15 for me its that there is no support version for ormlitecursorloader Jun 06 16:37:24 Can you answer a couple of questions for me? Jun 06 16:37:44 sure Jun 06 16:37:47 you mean a couple *on top* of all the other ones? :p Jun 06 16:38:18 ^ Jun 06 16:38:50 > Jun 06 16:39:13 Well first of all many to many: supported or not? Jun 06 16:39:36 I wont answer questions you can google :) Jun 06 16:39:52 You're right Jun 06 16:39:58 um, but you can google just about anything if you try hard enough :p Jun 06 16:40:40 Ya, I actually meant that "can you..." as ".. in case I have some and Google is the devil with my searching?*" Jun 06 16:41:00 not out of the box, but its possible Jun 06 16:41:15 Ya I see, with a table in the middle which is no problem. Jun 06 16:41:59 *sigh* Let's begin this once again... Jun 06 16:46:21 it seems like a normal decision to make; if my service gets to some state when the app is in the background I want to stop it. but how can i tell that without stupid hackery from packagemanager or whatnot ? Jun 06 16:54:41 I did download Documentation for Android SDK, now how can I access it? Jun 06 16:55:02 irits in your sdk folder. open it with browser Jun 06 16:55:05 g00s, can't you simply bind to it and call its methods? Jun 06 16:55:44 wakelock atm i'v overlapping binding / starting lifecycles; wish i could find a way to get rid of binding because of its async nature Jun 06 16:56:26 g00s, implement custom callbacks :p service.setOnDoneListener(whatever); service.startWork(); Jun 06 16:56:45 but yeah not ideal Jun 06 16:56:57 chet wrote another article yesterday https://medium.com/google-developers/developing-for-android-vii-the-rules-framework-concerns-d0210e52eee3 Jun 06 16:57:21 so far I've only ever wanted a service if I have something that shouldn't ever die/quit Jun 06 16:57:37 so I just do startService() followed immediately by bindService() Jun 06 16:57:56 and thereafter treat it as a bound service Jun 06 16:58:14 yeah; i know i need a service - its just that it has N concurrently running components and I need to shut it down only when all those components become inactive and the UI doesn't care Jun 06 16:58:58 is implementing an internal monitor an option? Jun 06 16:59:07 atm i bind, and those components check : is the service bound? no ? am I done? remove me from active components. is #active components 0 ? stopSelf Jun 06 16:59:29 yeah seems like quite a lot of housekeeping Jun 06 16:59:34 it all works pretty well, just the nonsense of bindService() in the activities / fragments Jun 06 17:00:03 only other thing i can think of, is that each component implements a ref counter to know whether its being used by the UI :( Jun 06 17:00:24 dont really like that either :( Jun 06 17:00:52 ugh that seems like an almost inevitable point of failure Jun 06 17:01:01 yeah Jun 06 17:01:52 danijoo, I'm so happy with this documentation. Jun 06 17:01:53 implement a separate service for each component :p Jun 06 17:02:14 wakelock they are all the same kinds of components , there can be any # of clients running Jun 06 17:02:34 I have a quick question. I have a string that is storing the name of my image, "image123" for example. How can i take that string and apply make it this: R.drawable.image123? Jun 06 17:02:36 any ideas? Jun 06 17:02:57 you can't Jun 06 17:03:12 hey guys Jun 06 17:03:13 apoc52, getResources().getIdentifier("image123", "drawable", packagename) Jun 06 17:03:23 ok thank you! Jun 06 17:03:37 g00s: hey Jun 06 17:03:46 hey Napalm Jun 06 17:04:00 wakelock, YOU cant doesnt mean you cant :p Jun 06 17:04:18 Just installed Android Studio via ppa (webupd8) and it all went smooth. When I started up AS, it failed to download the sdk component "tools", to quote "The following SDK component was not installed: tools" How do I fix this? Jun 06 17:04:23 danijoo, :p Jun 06 17:04:36 danijoo, that useGetSet seems very handy for m2m for example :D Jun 06 17:05:12 danijoo, it was more like, that seems like a bad practice, don't do that ;) Jun 06 17:05:29 wakelock, why would that be bad practice? Jun 06 17:05:50 ... or do I need to fix it? Jun 06 17:05:55 there are cases where this is simple the only reasonable way to go Jun 06 17:06:22 dunno, because a string could be anything, not just limited to resources that actually exist Jun 06 17:06:29 needs extra error checking and stuff... Jun 06 17:06:40 it has bild in error checking Jun 06 17:06:43 build* Jun 06 17:06:47 it's kind of like using an integer as a boolean and only ever checking if it's 0 or 1 Jun 06 17:06:50 what if it's -2? Jun 06 17:06:53 just check if getItentifier returns something or 0 Jun 06 17:07:08 its always 0 for not found or something else when its there Jun 06 17:07:10 doesn't it throw an exception? Jun 06 17:07:14 no Jun 06 17:07:16 dunno, just guessing Jun 06 17:07:18 ah ok Jun 06 17:07:46 well, s/error checking/error checking and proper error handling/ Jun 06 17:07:49 I use this to map a list of 150 database entries to their icon for example Jun 06 17:07:51 alert, toast, log, whatever Jun 06 17:08:00 all images are stored as objectname_databaseId Jun 06 17:08:38 so what happens if I hack your database and insert an invalid icon identifier? obviously you check if .getIdentifier() returns 0, what do you do then? Jun 06 17:09:26 i dont care then. if you mess with my databsae on your phone, I couldnt care less about a crashj Jun 06 17:09:46 that's not how robustness works Jun 06 17:10:06 "robust" means being able to cope no matter what, including user stupidity ;) Jun 06 17:10:07 lol. delete a random file in your windows folder then :p Jun 06 17:10:07 That's how over engineering works Jun 06 17:10:16 danijoo, I don't use windows :p Jun 06 17:10:28 if it crashs write them a mail about "this is not how robustness works!" Jun 06 17:10:39 replace it with any other OS then ;) Jun 06 17:10:55 eh okay Jun 06 17:11:02 what if user decompiles the apk and deletes an image Jun 06 17:11:14 did you build checks for that in your apps ? Jun 06 17:11:24 I'm gonna put these docs on my kindle, easier to read. Jun 06 17:11:57 there's a sane limit after which checking makes no sense, I just feel properly and gracefully handling an API method returning 0 is well above that limit Jun 06 17:12:00 but to each their own Jun 06 17:12:23 I dont even have to make that check because Picasso does it for me Jun 06 17:12:52 CedricBeust, im really enjoying your blog right now. Could be the thing that actually gets me to try Rx :) Jun 06 17:13:05 danijoo: Sweet! Jun 06 17:13:32 didnt know it integrates so nice with kotlin Jun 06 17:13:41 also retrolambda :) Jun 06 17:13:44 the inline functions make it awesome Jun 06 17:13:59 lol, works with kotlin - talk about the key argument :D Jun 06 17:14:33 if that doesn't make you want to finally try it, I don't know what would :p Jun 06 17:15:38 danijoo: "getResources().getIdentifier("image123", "drawable", packagename)" only provides an int. How can i take this into a drawable? Jun 06 17:15:51 apoc52, its the resource int Jun 06 17:16:01 apoc52, it provides exaclty what R.drawable.* would provide Jun 06 17:16:04 you can use it for getResources().getDrawable(int) Jun 06 17:16:07 you figure out the rest Jun 06 17:16:26 all those R.* are just generates integers Jun 06 17:16:55 makes for ultimate fun when a n00b forgets to call .getColor() ;) Jun 06 17:17:32 wakelock, fixed with the new android annotations. soon (tm) Jun 06 17:18:05 wow, annotations guard against stupid noob mistakes too now? Jun 06 17:18:06 lol Jun 06 17:18:10 setBackgroundColor( @ColorInt int color ) Jun 06 17:18:27 that will warn you if your int is not a color Jun 06 17:18:36 @IntRes, @StringRes... Jun 06 17:18:41 but *any* int can be a valid color Jun 06 17:19:04 ah yeah. it was actually intRes ^^ Jun 06 17:19:11 still don't understand why they made colors to be simple ints, it would make more sense for them to be proper objects Jun 06 17:19:17 don't think that would harm performance much Jun 06 17:20:08 are we talking about the same google that suggests to not use enums because they are "bad in performance" ? Jun 06 17:20:16 ... Jun 06 17:20:30 I always wondered why they constantly insist on using tons of static final ints Jun 06 17:20:31 yes, thats in their dev docs Jun 06 17:20:37 danijoo: Yeah her post should be taken in perspective Jun 06 17:20:50 There is a big difference between designing system libraries and apps Jun 06 17:21:00 that's ridiculous. official java docs clearly state enums have literally no impact on performance. Jun 06 17:21:06 CedricBeust, yes but in general its bullshit to tell people to not use enums in their apps Jun 06 17:21:12 so unless they made some major f**kup in the dalvik vm... Jun 06 17:21:14 for a system framework its another story ofc Jun 06 17:21:16 danijoo: I agree Jun 06 17:22:05 * wakelock once took an existing OSS projects and among other things converted all such clusters of final ints into proper enums Jun 06 17:22:14 I use that app every single day, multiple times a day Jun 06 17:22:23 never ever noticed any degradation in performance Jun 06 17:22:38 project* Jun 06 17:23:42 Hey, I need to be able to make the thumb of a seekbar invisible at times (API 15).... is it possible? Jun 06 17:24:15 definitely possible if you extend it into your custom seekbar Jun 06 17:25:04 danijoo, just out of curiosity, do you usually follow google blindly on this and actually avoid enums, or do you use common sense and use enums where appropriate and ignore the stupid guideline? :) Jun 06 17:25:18 I use enums everywhere Jun 06 17:25:23 cool Jun 06 17:25:40 i have enums in my enums Jun 06 17:25:44 did you consequently ever find yourself wondering why your apps are sluggish? Jun 06 17:25:47 danijoo, ^ Jun 06 17:25:48 wakelock: I do, but how do I access the thumb? it's a private variable in AbsSeekBar Jun 06 17:25:50 i have static final int instead of enums :p Jun 06 17:25:51 g00s, so you can enum while you enum? Jun 06 17:25:59 danijoo enum ;) Jun 06 17:26:11 guys thank for your help! it's all working now. I was populating a gridview dynamically with images defined in my database Jun 06 17:26:17 private static enum g00s extends danijoo { } Jun 06 17:26:20 viran, you might need to use reflection :/ Jun 06 17:26:38 danijoo: what does that mean? Jun 06 17:26:44 enums are extremely well designed in Java (even though I might not be totally objective about them) Jun 06 17:26:47 as always with perf, know where you need them to choose between enum or a bunch of primitive int, measure to verify and spot bottlenecks etc Jun 06 17:26:52 I also use them everywhere in the back end Jun 06 17:26:59 i wish enums could be "opened" Jun 06 17:27:00 more parsimoniously on Android Jun 06 17:27:01 CedricBeust, what about android/dvm? Jun 06 17:27:06 oh Jun 06 17:27:13 Just being extra anal Jun 06 17:27:17 it's fine in apps, really Jun 06 17:27:29 it's fine in anything not called thousand of times per second Jun 06 17:27:31 simply Jun 06 17:27:36 g00s, why would you do that?? then all the values would just spill out! :( Jun 06 17:27:41 thousand is a very low order Jun 06 17:27:52 the dev guidlines also say we should not use getter() and setter() methods ^^ Jun 06 17:27:57 because methods have bad performance Jun 06 17:27:57 yeah same Jun 06 17:28:18 method performance is fine on objects. Bit more expensive on interfaces Jun 06 17:28:22 so... why even bother coding in java if you're going to make it look like c/c++ every chance you get? Jun 06 17:28:27 i'm sure i'm killing it with rxjava anyhow Jun 06 17:28:30 if you call it one or two times, who cares, but if you do that (audio or video processing as examples, but not only) so many times, you will see where your knees stand Jun 06 17:28:50 * wakelock converts g00s into an Observable Jun 06 17:29:13 i do have a few observables in my enums :) Jun 06 17:29:29 so you can observe while you enum? Jun 06 17:29:36 that was my lazy event bus Jun 06 17:30:00 danijoo + wakelock: fwiw @ColorRes / etc have all worked for at least several months now. they're great. Jun 06 17:30:23 public void sendEvent() { Log.d("eh", "don't feel like it"); } Jun 06 17:30:29 i want to use databinding but cant :9 Jun 06 17:30:30 g00s, ^ lazy event bus Jun 06 17:30:53 g00s, cool Jun 06 17:30:57 er, groxx ^ Jun 06 17:31:24 hate it when I have to type more than one letter to tab-complete successfully :p Jun 06 17:31:59 now I just want an enum -> static instance + @Def annotation generator. until then, I just keep using enums :) I do way worse crap for performance than inlining stuff. the type safety is more valuable. Jun 06 17:32:40 they become a hassle to persist though, you wind up assinging IDs anyhow Jun 06 17:33:16 bad idea to use their name or ordinal probably Jun 06 17:33:18 g00s, not really, I use enum constant names as string identifiers ;) Jun 06 17:33:27 bad idea to use name? why? Jun 06 17:33:31 seems perfectly reasonable Jun 06 17:33:38 what if you rename it, then your schema is busted :( Jun 06 17:33:41 until you rename :D Jun 06 17:33:42 no worse than persisting a bunch of e.g. strings (except that you have to write the "find enum by name" method) Jun 06 17:33:47 yeah name() is iffy. As is ordinal() Jun 06 17:33:54 why would I rename, it's all named perfectly logically as it is :p Jun 06 17:34:00 i constantly end up renaming enums because I dislike my variable names Jun 06 17:34:15 All my enums usually take their name in the constructor: enum { RED("red"), BLUE("blue") } Jun 06 17:34:27 need to decouple the symbol name from its string representation Jun 06 17:34:35 CedricBeust, still a bust if you decide to rename Jun 06 17:34:39 I do that when I need to make a change to it, yeah :) Jun 06 17:34:45 wakelock: how so? Jun 06 17:34:46 otherwise I'm too lazy to do it up front Jun 06 17:35:01 All my enums usually take their name in the constructor: enum { ROUGE("red"), BLUE("blue") } <-- doesn't break anything Jun 06 17:35:22 CedricBeust, yes but then it's not as readable Jun 06 17:35:34 wakelock: I don't follow you Jun 06 17:35:56 you're still using Enum.ROUGE in code. "red" is just for lookup from serialized state Jun 06 17:35:57 as you go through the code, you have to keep in mind .ROUGE really means "red" Jun 06 17:36:08 that becomes even more obvious when you're dealing with someone else's code Jun 06 17:36:16 groxx: Right, so refactoring my code doesn't break anything Jun 06 17:36:23 no, you just `Enum.fromString(str)` and don't care what the value is Jun 06 17:36:43 groxx, yeah you do, for example in switch/case statements Jun 06 17:36:52 no... that's still `case ROUGE` Jun 06 17:37:03 more like Jun 06 17:37:11 case ROUGE: // really means "red" Jun 06 17:37:26 the red is irrelevant for your code Jun 06 17:37:35 you're thinking about this wrong. "red" is just a permanent, arbitrary, serialized value that uniquely identifies that enum. Jun 06 17:37:41 its only the (de)serializer Jun 06 17:37:43 it could be "ASDF" and it doesn't matter Jun 06 17:38:00 literally, if you ever write "red" anywhere except in the constructor, you're doing it wrong. Jun 06 17:38:04 I just stick to enum consts as string identifiers and I have yet to regret it. I honestly don't remember ever wanting to change the const name Jun 06 17:38:40 biggest annoyance to me with enums is that you still have to define a default: case when assigning to a final variable :| because _technically_ it can change. Jun 06 17:38:42 maybe a few times during active development, but never later Jun 06 17:39:18 * wakelock is used to having a default: statement in all switch/cases anyway Jun 06 17:39:26 even if it only contains a break; Jun 06 17:39:32 it just adds to completeness Jun 06 17:40:10 yeah, but enums are (in practice) a finite set of values. default is unnecessary noise. Jun 06 17:40:53 it also means if you add a value to the enum, your default case is now _used_, instead of it being a compile time error to not handle all the values explicitly Jun 06 17:41:01 see, just like you keep saying I shouldn't care about "red" (yet I do), I also say you shouldn't care about the fact it's a switch/case dealing with enums and just treat all switch/cases equally ;) Jun 06 17:41:32 if you insist, you can always make your default spit out an exception :p Jun 06 17:41:43 I do. but it's not compile-time safe Jun 06 17:41:47 when adding enums Jun 06 17:41:52 annotate then :p Jun 06 17:41:57 annotate? Jun 06 17:42:33 make a custom annotation that will do a check somehow and force a compile time error when necessary Jun 06 17:42:38 (I'm not entirely serious) Jun 06 17:44:12 that's pretty much exactly what I'd want, yeah Jun 06 17:44:24 default strict, @AllowDefault permissive, etc Jun 06 17:44:42 groxx, your IDE forcing you to add a default: statement even for enums actually ties in to the earlier "robustness" discussion - no matter what, there is always a sane and graceful way to handle an enum value being (supposedly) "out of range" Jun 06 17:45:14 instead of forcing you to add new code when you add a new enum const, it forces you to make your code deal with out of range values automatically Jun 06 17:45:39 the compiler is forcing it, and it's only required in practice if you receive the enum from an outside source (e.g. if you're a library, and someone compiles against a newer / older version). that doesn't really happen in android apps. Jun 06 17:46:08 the compiler makes no difference between those cases, and I fully understand such behavior Jun 06 17:46:15 it's just annoying that enums are otherwise nice for compile-time safety, except for this one very-useful subset Jun 06 17:46:55 eh well, I fully understand and support the way the compiler does it currently Jun 06 17:47:36 a lot of the times there are "sane defaults" - you might have several options expressed as enums, but a lot of the time you can easily declare one to be the "common/sane default" Jun 06 17:47:51 in those few cases when you can't, you just throw an exception Jun 06 17:48:31 I tend to see the exact opposite - enums used when there is no sane default :) Jun 06 17:48:54 well I guess you're using your enums in werid and unusual ways :p Jun 06 17:49:38 is there something less weird when there is no default? Jun 06 17:50:00 whats the default for eye color Jun 06 17:50:09 purple Jun 06 17:50:21 okay this was an obvious one :p Jun 06 17:50:29 danijoo, UNDEFINED ;) Jun 06 17:51:21 you could probably argue for blue, since all newborns have blue eyes Jun 06 17:52:03 hmm. maybe not all... many, anyway :) Jun 06 17:52:12 groxx, you could also argue for brown because its the most often one for adults Jun 06 17:52:50 groxx, actually all newborns have dark, almost black eyes Jun 06 17:52:53 http://www.amazon.de/RxJava-Essentials-Ivan-Morgillo-ebook/dp/B00YEVZ76S/ref=sr_1_1?ie=UTF8&qid=1433613155&sr=8-1&keywords=rxjava is it worth? Jun 06 17:53:01 dunno where you got that false information, groxx ;) Jun 06 17:53:14 wakelock, where do you live? in hell? Jun 06 17:53:27 lol Jun 06 17:53:27 danijoo, how often have you actually seen a newborn? ;) Jun 06 17:53:34 too often Jun 06 17:53:35 :p Jun 06 17:53:46 excuse me for not believing that :p Jun 06 17:53:58 1 can be too often too Jun 06 17:54:06 was it an albino? Jun 06 17:54:15 at least it was no daemon Jun 06 17:54:25 with black eyes and claws Jun 06 17:55:04 hmm Jun 06 17:56:53 ok.. this book just dismissed itself Jun 06 17:57:10 so if i put a content provider in :process2 , when the Activity goes to query it, is it created in Process2 or the default process ? Jun 06 18:04:38 g00s: good question. no clue :) Jun 06 18:06:55 "Application components (activities, services, providers, receivers) are interfaces for your application to interact with the operating system; don’t take them as a recommendation of the facilities you should architect your entire application around. " Jun 06 18:07:05 i always find this to be one of the biggest challenges Jun 06 18:07:29 so often i'm like "i just want to do this, but to do it right i need a service blah blah blah: Jun 06 18:08:57 the system sometimes make it really hard to do it that way.. Jun 06 18:09:56 looking at https://github.com/googlesamples ... it seems like samples for a whole bunch of google techs, is there a way to just look at the android ones ? Jun 06 18:13:18 I'm trying to get to the default seekbar thumb drawable in runtime....... any advice? Jun 06 18:13:47 cant use seekbar.getThumb() since it requires higher API Jun 06 18:14:12 how do I access the system's drawables? Jun 06 18:15:30 g00s: import sample in Android Studio? Jun 06 18:16:16 aren't the github ones outside of the sdk manager ? Jun 06 18:16:44 groxx where is that option in AS ? Jun 06 18:16:48 i'll try Jun 06 18:16:48 file, iirc Jun 06 18:17:07 for example i'm looking at https://github.com/googlesamples/android-UniversalMusicPlayer Jun 06 18:17:26 hm. yeah, they do have all of them in a flat account :\ github is suboptimal sometimes. Jun 06 18:17:47 ¯\_(ツ)_/¯ either that, or I'd say just pull the samples through the sdk manager, browse them locally. Jun 06 18:18:17 vrain i think it is something like Resources.getSystem().getDrawable(...) idk though Jun 06 18:18:19 i just remember seeing it Jun 06 18:19:02 groxx they are a disjoint set, i have samples installed but its not in there Jun 06 18:20:57 guys how do I change the color of the background of my app with java? Jun 06 18:20:59 View view = this.getWindow().getDecorView(); view.setBackgroundColor(color); doesnt work Jun 06 18:21:24 set it in xml Jun 06 18:21:37 g00s: ugh, you're right. I don't have it either, and I have a bunch of samples versions installed. that's crappy. Jun 06 18:21:46 keyboard doesnot appear in landscape mode but appears in portrait mode with EditTextPrefrences ? Jun 06 18:23:46 danijoo i dont need to set it in xml Jun 06 18:23:58 i need to change it when a button is pressed Jun 06 18:24:19 groxx i have a difficult question for you on the following line in this service, it checks a wekreference to see if the service is in use. How could this be valid? https://github.com/googlesamples/android-UniversalMusicPlayer/blob/master/mobile/src/main/java/com/example/android/uamp/MusicService.java#L851 Jun 06 18:24:38 hi guys Jun 06 18:25:04 is there a windows off topic? Jun 06 18:25:07 I have reinstalled Android Studio with ADT, if I try to install something to a device "adb install XXX.apk" it just sits there doing nothing. "adb devices" does list the device. Any ideas on why it just hangs? Jun 06 18:25:15 groxx the wekref is initialized here https://github.com/googlesamples/android-UniversalMusicPlayer/blob/master/mobile/src/main/java/com/example/android/uamp/MusicService.java#L146 Jun 06 18:25:25 hi g00ey Jun 06 18:25:32 g00s, hi bro Jun 06 18:25:34 remember me? Jun 06 18:25:41 i got a new job Jun 06 18:25:42 finally Jun 06 18:25:55 Hulio change nick ? Jun 06 18:25:56 getWindow().getDecorView().setBackgroundColor(Color.RED); Jun 06 18:25:56 doesnt work either Jun 06 18:26:48 liftedbronco, do u want to change the button background color or what ? Jun 06 18:26:55 liftedbronco, do you want to change the windowcolor or the content views background color Jun 06 18:27:00 background color of the app Jun 06 18:27:04 of the activity Jun 06 18:27:06 like the layout Jun 06 18:27:26 findViewById(android.R.id.content).setBackgroundColor Jun 06 18:28:00 why didnt i think of that in the first place. thats janijoo Jun 06 18:30:38 danijoo, any help with the keyboard problem ? Jun 06 18:30:48 keyboard doesnot appear in landscape mode but appears in portrait mode with EditTextPrefrences ? Jun 06 18:30:52 no Jun 06 18:32:48 g00s: seems fine to me, though they seem to be using WeakReference<> as a "I don't trust my ability to manage asynchronous messages" "helper". annoying :\ it implies a level of distrust about the code, so I'm not sure if I should assume messages could be erroneously not-cleared, or if they're just being paranoid. Jun 06 18:36:26 is there any official group for android development discussion by google ? Jun 06 18:36:30 Fresh install of AS with SDK, but every time I try to use adb to install it just hangs. No output, nothing, just hangs. Jun 06 18:36:33 danijoo, do you use the javax.perstistence annotations in ORMLite? Jun 06 18:36:35 Any suggestions? Jun 06 18:36:42 persistence* Jun 06 18:37:13 I dont know what this is :p Jun 06 18:37:40 s9iper1, https://source.android.com/source/community.html Jun 06 18:37:41 groxx so with weakRef, does get() return null right away when the object is no longer reachable, or can there be some delay until the GC does something ? Jun 06 18:37:42 danijoo, do you use @OneToMany or @DatabaseField for a ForeignKey? Jun 06 18:37:53 DatabsaeField Jun 06 18:38:02 Then you're not using javax.persistence Jun 06 18:38:10 ok Jun 06 18:38:10 groxx they seem to be saying, "if there is a reference to this service, somebody is useing it, so don't stop' Jun 06 18:38:22 Good, cause that seemed the more clear way for me. Just wanted to know. Jun 06 18:38:57 g00s: reachable isn't determined until GC runs, at which point it'll collect & it'll return null Jun 06 18:39:35 so it can be not-code-reachable but still in memory + weakref will return non-null, since it's not e.g. refcounted and cleaned up instantly Jun 06 18:39:39 so it seems like a bad idea they way they are using it, that thing could run, the weakref not marked by GC as weak, and service doesn't stop Jun 06 18:40:57 g00s: there are some other oddities in there :\ e.g. they stopSelf when handleStopRequest fires, but they also enqueue a "delayed stop" that does the same thing... Jun 06 18:41:29 services stop when stopSelf() is called though, not when they're garbage collected - that can only happen after they're stopped + nothing's referencing its instance. Jun 06 18:42:29 so i'm back to square one. without binding to the service, and onBind setting some flag - how does a started service know whether its being used any more Jun 06 18:42:44 (and onUnbind clearing said flag) Jun 06 18:43:34 Any suggestions on getting adb install to work? It just hangs after "adb install" indefinately. Jun 06 18:43:35 g00s: started services don't become "unused", they have to have a stopSelf call Jun 06 18:43:53 ooh. wait, you're thinking for when the last binder detaches? Jun 06 18:44:25 or... no. clarify please :) I think I'm confused. Jun 06 18:44:27 danijoo, the spec/doc states: "NOTE: With regards to connection sources, Android users should see the Android specific documentation later in the manual." Does this mean nothing of the jdbc applies to Android or I should look at both? Jun 06 18:45:17 Muchoz generally jdbc does not apply to android Jun 06 18:45:18 dont know Jun 06 18:45:28 read all and decide Jun 06 18:45:36 g00s, I know that. But is the way kind of the same is my question. Jun 06 18:46:24 Well it's only one and a half of a page, what can it hurt? Jun 06 18:46:33 qkzoo1978, does `adb devices' hang too? Jun 06 18:46:51 you could have read it in the time you askes ;) Jun 06 18:47:36 @adq no, it lists the devices Jun 06 18:48:16 if you have more than one device, you have to add -s DEVICENAME to adb Jun 06 18:48:27 like adb -s FOOBAR install PATHOFYOURAPK Jun 06 18:48:51 otherwise it cannot know which one to pick, however it should not hang and tell you what i just said Jun 06 18:49:10 install -r :) Jun 06 18:49:31 install -r does the same thing, just hangs Jun 06 18:49:37 -r is for replacing the app Jun 06 18:49:43 ya I know Jun 06 18:49:49 qkzoo1978: `adb push` + open the APK on the device? Jun 06 18:49:59 Just hangs Jun 06 18:50:04 can't push? Jun 06 18:50:11 Nope, just hangs, just like install. Jun 06 18:50:17 I assume e.g. `adb shell ls` also hangs? Jun 06 18:50:18 The logcat is working. Jun 06 18:50:27 huh. dunno. reboot the phone? Jun 06 18:50:27 maybe spawn `strace' prior to running adb Jun 06 18:50:36 but you will have to look yourself in it Jun 06 18:50:41 strace adb blablablabla Jun 06 18:50:47 adb shell works. Jun 06 18:50:58 hmm Jun 06 18:51:24 it's extremly verbose Jun 06 18:51:37 I'll check it out, thx Jun 06 18:52:37 Ok, did an strace, but not entirely sure what the heck I'm looking at now. Jun 06 19:31:50 joy. I figured out why MNC + pidcat = no output :| if anyone else is trying to use that combination, I have an Issue on github that contains a fix (though not a pull request) Jun 06 19:57:20 how do i align text with gridview? http://i.imgur.com/dsx5kfj.png Jun 06 19:57:29 http://pastebin.com/ZNF3xL6j Jun 06 19:57:50 Hello, I'm a little bit outdated about programming, there used to be Global Session Variables, is there something similar(what is its name?) in android development?ç Jun 06 19:59:08 livtyler: Not positive what global session variables are but maybe check out shared preferences: http://developer.android.com/reference/android/content/SharedPreferences.html Jun 06 19:59:16 livtyler: ... Global Session Variables? In what? Jun 06 19:59:25 I think its a php thing Jun 06 19:59:26 (sounds like Web developement stuff) Jun 06 19:59:40 mmarklar: yeah, reminds me of $SESSION or whatever the crap was called Jun 06 19:59:44 yeah Jun 06 19:59:53 * p_l is very, very, very happy to never touch PHP again Jun 06 20:00:03 y Jun 06 20:00:22 yeah global is in PHP Jun 06 20:00:42 livtyler: static variables probably. but learn java + android's lifecycle before you try to use them, there are a few surprises. Jun 06 20:01:06 or shared preferences, depends on how you're thinking of using it :) Jun 06 20:01:11 PHP practices != Android development practice Jun 06 20:01:14 shared prefs == cookies, nearly. Jun 06 20:01:14 mmarklar: cool, so that's the new name, is there the way to deal with login forms? or is it something newer? thanks Jun 06 20:01:14 >_> Jun 06 20:01:35 livtyler: it doesn’t map like that, its not the same thing Jun 06 20:01:59 livtyler: ... there is near zero overlap between CGI-centric PHP programming and Android environment Jun 06 20:02:02 what exactly are you trying to accomplish? Jun 06 20:02:14 im guessing you want to send data to login page on server via mobile app? Jun 06 20:02:43 mmarklar: login form, and to have a new Activity that greets the logged in user Jun 06 20:02:59 i was planning to do that for a future app myself xD Jun 06 20:03:57 livtyler: how experienced are you with Android? Android Studio has a simple template for the login form Jun 06 20:04:15 you will have to make the request to the server yourself, and store the user name yourself as well Jun 06 20:04:23 you could use those shared preferences to store the username Jun 06 20:05:16 mmarklar: ok, will look into the link you provided, thank you Jun 06 20:05:43 anyhow do i align text with gridview? http://i.imgur.com/dsx5kfj.png Jun 06 20:05:50 how do i align text with gridview? http://i.imgur.com/dsx5kfj.png Jun 06 20:05:56 livtyler: ok good luck, check out this link for the template I mentioned https://developer.android.com/tools/projects/templates.html Jun 06 20:06:26 mmarklar: thanks Jun 06 20:06:32 np Jun 06 20:07:27 Is it possible to hook into an activities onActivityResult call in a similar way you can with activity lifecycle callbacks? Some interface like this? http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html Jun 06 20:07:39 DarkChaoz: like, centered? Jun 06 20:07:59 i tried that didnt work Jun 06 20:08:12 tried how, and is that what you want, or do you want something else? Jun 06 20:08:48 i want the text aligned in the middle of the icons and not to the left Jun 06 20:09:59 do u need to see the activity code? Jun 06 20:10:38 should do it Jun 06 20:12:29 ok will try that Jun 06 20:14:22 Uuuhm, so I want to just try my luck with making an android app over the next few days, think main goal is some form of check list/note keeping type app, sort of not sure what way I should go about styling it though? Writing the XML? using the built in IntelliJ Drag and drop thing (it seems kind of clunky) or a mix I guess or is there another way? any good resources anyone can recommend? Jun 06 20:15:20 thanks groxx that worked Jun 06 20:15:28 pokEarl: styling is typically in XML, since it's a pain to do it in code. it's _also_ a pain in XML, but less so :) Jun 06 20:15:41 pokEarl: https://developer.android.com/guide/topics/ui/themes.html Jun 06 20:15:57 pokEarl: The drag-and-drop thing will just write the XML for you. But nobody seems to really use it. Jun 06 20:16:07 And you'll need more than a few days to do anything nontrivial on Android, unfortunately. Jun 06 20:17:42 What makes you say that TacticalJoke ? What about something like (After 5 seconds of googling ) nativeCSS or something along these lines that lets me style it in css in some way I guess, is that no good? Jun 06 20:19:35 dunno. never tried NativeCSS. I suspect it a) mostly works, and b) is quite complicated, so when it doesn't, you'll spend a crap-ton of time figuring out why / how to fix it. Jun 06 20:21:46 so odds are best way to go about it is just learning myself to write some xml. Probably not a bad idea anyway Jun 06 20:22:16 yeah. you'll also find way way way more documentation / stackoverflow / etc results for the built-in stuff. Jun 06 20:25:07 Yeah, it's just writing XML and using styles (detailed in groxx's link). Jun 06 20:27:41 CSS is more flexbile than Android's style system (e.g., in Android, you can apply only one style per thing). But they're kinda similar. Jun 06 20:27:46 flexible* Jun 06 20:33:01 i just do it all in java.... i find it a pain getting the java to work with xml, inflating layouts and many xml files etc Jun 06 20:37:42 The only time I do it in Java is when I want as much speed as possible (e.g., with ListView/RecyclerView/whatever). Some things are quite a bit less readable in Java (e.g., resolving theme attributes), so I prefer XML in general. Jun 06 20:40:39 njcomsec: In my experience, almost everything is easier in XML than in Java. I'm not sure what problems you're referring to. Jun 06 20:40:40 well im making games so it is a bit different... i had a combination of xml and java but it needed to be very dynamic and it was just a big mess so redoing it in 100% java worked out a lot better.... but yeh showing a list of scrollable data in xml is maybe easier Jun 06 20:42:14 hello android-dev! Jun 06 20:42:23 I need some help with Gradle. Jun 06 20:42:46 I don't know if this is a Cordova issue or if I am messing up somewhere. Jun 06 20:43:18 I have a build-extras file which links to the Google Play downloader library Jun 06 20:43:48 but there's also a play licensing library Jun 06 20:44:04 and it just doesn't link to the licensing library. It can't find it. Jun 06 20:44:21 Here's my code: http://pastebin.com/g8hLZAEB Jun 06 21:21:32 Hey :) Can anyone help me with the Animation of Drawable Vectors? :) Jun 06 21:21:52 :( Jun 06 21:22:05 wat Jun 06 21:23:04 DarkChaoz do you mean me? :) Jun 06 21:25:23 nah, i was referring to agamnus Jun 06 21:25:34 trust me i cant answer android questions lol Jun 06 21:25:37 im a noob. Jun 06 21:25:40 :P Jun 06 21:26:21 OKay :D Jun 06 22:10:03 ... Jun 06 22:11:40 ............... Jun 06 22:15:22 Agamemnus no idea what you're up to, but i'm sure the problem is Cordova Jun 06 22:26:13 g00s Jun 06 22:26:17 I completely agree with you Jun 06 22:26:23 ^_^ Jun 06 22:26:43 how do I have more than one dependency??? Jun 06 22:26:52 http://pastebin.com/g8hLZAEB Jun 06 22:28:32 Agamemnus was that hand written or generated? looks weird Jun 06 22:28:55 anyhoe try just one dependencies { } block Jun 06 22:29:14 i'm not sure if this is the right place to ask this, but has android changed the way it handles html forms somehow? Jun 06 22:29:23 I seem to remember it going to the next input field when you completed one and clicked on 'next' Jun 06 22:29:28 now it just attempts to submit the form Jun 06 22:30:15 not sure if it's a browser thing or an android thing, either Jun 06 22:30:23 hand written Jun 06 22:30:28 seems to do it on both firefox and chrome though so Jun 06 22:30:49 i see, so a block should work Jun 06 22:31:07 except it isn't able to read the licensing one, no matter what i do Jun 06 22:31:12 Erry :O Jun 06 22:31:13 i did some messed up workaround though Jun 06 22:31:32 Erry teh poke lake owner :P Jun 06 22:36:23 Someone using ORMLite and could tell me whether this still is required (2y old almost so that's why I'm asking)? http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_4.html#Using-Table-Config-File Jun 06 22:38:09 erry: definitely browser-dependent. you can also control some of that in the html though, and there are plenty of sites that expend effort to do things that break it :| Jun 06 22:39:49 Muchoz: if it's reflection-slowness related: reflection is still slow, but it has improved. I think somewhere before 4.0? Jun 06 22:39:59 welp Jun 06 22:40:21 groxx, how can i control it in the html? is it possible to get a next button? have any docs? Jun 06 22:40:52 groxx, "Turns out that one of the major culprits is some ugly code down in the Android OS – especially in Method.equals(). Because annotations use this method, looking up annotation values is extremely expensive, often garbage collecting thousands of objects and megabytes of space." Jun 06 22:41:03 That's what's it about. Jun 06 22:41:06 i read about data-dependency (which i can't find any other reference of) in a stack overflow answer, as well as tabindex Jun 06 22:41:12 but none of them make a 'next' button appear.. Jun 06 22:42:54 erry: hm. looks like it might have to be done in javascript. it does feel like there was something that worked on most browsers though... Jun 06 22:43:33 Guess I'll do it without for now and test the difference later. Jun 06 22:43:59 groxx, i could swear it used to work, unless i dreamt it Jun 06 22:45:47 erry: yeah, I know what you mean. maybe it was just an old behavior that has been dropped? Jun 06 22:46:04 I can see why it _could_ cause problems, though 'submit' seems likely to cause even more Jun 06 22:46:16 seems like basic accessibility to me Jun 06 22:46:24 so why it would be dropped is beyond me :| Jun 06 22:46:26 * erry not happy panda. Jun 06 22:46:36 hm Jun 06 22:46:48 i could spin up some older android version emulators and see if that's the case Jun 06 22:46:55 or if it just never happened, and i'm just insane :D Jun 06 22:49:11 On google play can u specify whether to deploy app on phone and/or tablet? Or just either one Jun 06 22:50:11 erry: I kinda sorta remember having a 'next/previous' above-keyboard thing appear when focused in a form, which may have been dropped because ugly. but yeah, accessibility-- :| Jun 06 22:51:19 sigh. Jun 06 23:01:24 Hi, im trying to append text views of words together programatically to make sentences. Im not sure how to detect when i should start a new line though so it dosent go off screen and dosent squish Jun 06 23:03:10 NateRiver that seems like a terrible idea Jun 06 23:06:16 hm, how weird, even with a kitkat emulator i have the same problem Jun 06 23:09:00 NateRiver: StaticLayout will handle that for ya. text layout is _unbelievably_ complex, don't do it yourself. Jun 06 23:11:23 there is also http://developer.android.com/reference/android/text/BoringLayout.html Jun 06 23:11:26 never used it Jun 06 23:14:01 non-spanned english-y text in a single-line textview will sometimes use that. that's all I've seen though :) Jun 06 23:21:09 Hi! I am trying to create a simple application to upload an image to a Flask server (multipart HTTP POST to a REST api endpoint), what's the best way to do this? I currently have a class Server with static methods (uploadImage(Bitmap b)) and I think I need to use a FutureTask but I'm not sure how to initiate the transaction. The API mentions an executor but I did not find any implementation of the Executor interface, the ones in AsyncTask is Jun 06 23:22:37 I should probably also mention that I do not want to save the image into memory but upload it directly from a Bitmap ... which is why I cannot use something like Retrofit. Jun 06 23:27:15 onto: I think I'd just use this: https://github.com/square/okhttp/wiki/Recipes#posting-a-file Jun 06 23:27:21 onto: not sure about some of that, but you can get executors via http://developer.android.com/reference/java/util/concurrent/Executors.html Jun 06 23:27:42 onto: And forget about that Bitmap parameter -- you're just wanting to post some bytes, it seems. Jun 06 23:28:51 You could also let OkHttp take care of the thread pool by use of Call.enqueue. (Then you don't even have to worry about anything Executor.) Jun 06 23:32:05 groxx, TacticalJoke: Oh, I didn't know about OkHttp. I'll try it out! Thanks! Jun 06 23:39:50 I'm having trouble uninstalling android ndk r10 Jun 06 23:39:59 I found the folder but don't see the uninstaller Jun 06 23:40:21 fuck barca Jun 06 23:41:27 could I just remove the folder Jun 06 23:41:48 there's a "remove-windows-symlink.sh" file Jun 07 00:53:12 im starting to learn fragments. Do i put my app logic in the .java that extends Fragment or FragmentActivity? Jun 07 00:54:16 depends what logic - potentially neither :) Jun 07 00:54:43 hey bankai_ Jun 07 00:54:43 Lets say I had a button and wanted a onClickListener() Jun 07 00:54:55 hey g00s :) Jun 07 00:55:04 DadFoundMy: put it where it's relevant Jun 07 00:55:21 what do you mean? Can if you give an example? Jun 07 00:55:41 if your fragment has the button, do it in the fragment Jun 07 00:56:02 alright i think i get it thanks Jun 07 00:57:35 DadFoundMy: I haven't seen anyone else use this approach but what I do is have a base class that extends ContextWrapper and all layout/view stuff is handled there. Then I can use it in a dialog/fragment/activity. Hopefully that makes sense. haha Jun 07 00:59:34 DadFoundMy this is good to think about https://github.com/tehmou/rx-android-architecture Jun 07 01:20:12 Hi guys, i'm having a wierd behavior with the youtube API on my app, when in debug mode from Eclipse it works perfectly, when using a release .apk ... there is an "Unknown Error" & the player shows "An error occured while initializing the YouTube player.". I've tried changing the DEVELOPER_KEY but it doesnt seem to make it work. Any idea what i'm doing wrong ? Jun 07 01:24:49 what up Jun 07 01:41:15 any one got any tricks for getting your apps seen on the play store? Jun 07 01:41:49 money Jun 07 01:43:13 http://www.fiercedeveloper.com/story/fiksu-ad-cost-install-android-apps-59-last-year/2015-06-01 Jun 07 01:45:34 as in pay for advertising Jun 07 02:27:59 what does that mean, it costs more for advertisers to advertise on Android? Jun 07 02:28:42 who are these advertisers paying, Google? Jun 07 02:41:40 hey guys, what's the path for arm64 native libs ? Jun 07 02:43:59 arm64-v8a ? Jun 07 02:59:03 groxx g00s about that appending text views. im trying to let people insert words into a text view so i need to be able to pop them out of the sentence Jun 07 02:59:37 insert removed words into a sentance that is, they have to guess which word was removed **** ENDING LOGGING AT Sun Jun 07 02:59:58 2015