**** BEGIN LOGGING AT Thu Apr 09 02:59:58 2015 Apr 09 03:08:34 TacticalJoke: i hear alot of people that don't use fragments, but i guess they know a better way Apr 09 03:08:41 or a good work around, i dont really Apr 09 03:08:53 JakeWharton: you don't use fragments right? Apr 09 03:12:41 DadFoundMy: no Apr 09 03:13:47 Does OkHttp use a connect/read timeout if none is manually set? I can't seem to tell from the source. Apr 09 03:15:31 No Apr 09 03:18:12 JakeWharton: do you use another proccess to get the same result? Apr 09 03:18:55 DadFoundMy: What do you want to use Fragments for? Apr 09 03:22:04 hello Apr 09 03:23:20 is there any alternative way for performming Fragment.startActivityOnResult on sdk 9? Apr 09 03:25:23 LocalBroadcast is not the way in my case. Apr 09 03:26:08 TacticalJoke: i dont know of anything in particular really Apr 09 03:26:10 i want to resolve relations between previous activiy and current activity Apr 09 03:26:58 crazy_rudy_: Why are you supporting API 9? Apr 09 03:27:11 because my legacy users Apr 09 03:27:12 TacticalJoke: gingerbread masterrace Apr 09 03:28:03 50,000 2.3 ver users uses my app every day Apr 09 03:28:26 crazy_rudy_: you looking for a Jr. Developer :D Apr 09 03:28:29 jk Apr 09 03:28:33 well i mean... Apr 09 03:28:55 what? Apr 09 03:29:20 i just want a solution for that :( Apr 09 03:29:35 and i just want a job :( Apr 09 03:30:44 could you solve this problem? Apr 09 03:31:13 no Apr 09 03:31:34 but highschool without a job is too hard so i can pretend to solve it :D Apr 09 03:33:31 crazy_rudy_: you'll probably have to get teh activity to do it and pass the result back Apr 09 03:35:29 @bankai: what is the teh activity? Apr 09 03:35:31 Hello, I got 3 fragments inside an activity layout, it looks like this: Apr 09 03:35:32 xmlns:tools="http://schemas.android.com/tools" Apr 09 03:35:32 android:layout_width="fill_parent" Apr 09 03:35:32 android:layout_height="fill_parent" Apr 09 03:35:32 android:baselineAligned="false" Apr 09 03:35:34 android:orientation="vertical" > Apr 09 03:35:36 android:id="@+id/messageFragment" Apr 09 03:35:40 android:name="apps.android.expressa.expressa.Fragments.MessageFragment" Apr 09 03:35:42 android:layout_width="match_parent" Apr 09 03:35:44 android:layout_height="match_parent" Apr 09 03:35:46 android:layout_weight="1" Apr 09 03:35:48 tools:layout="@layout/message_fragment_layout" /> Apr 09 03:35:52 android:id="@+id/listsFragment" Apr 09 03:35:56 android:name="apps.android.expressa.expressa.Fragments.ListsFragment" Apr 09 03:35:58 android:layout_width="match_parent" Apr 09 03:36:00 android:layout_height="match_parent" Apr 09 03:36:02 android:layout_weight="2" Apr 09 03:36:04 tools:layout="@layout/lists_fragment_layout" /> Apr 09 03:36:06 android:id="@+id/bottomBarFragment" Apr 09 03:36:10 android:name="apps.android.expressa.expressa.Fragments.BottomBarFragment" Apr 09 03:36:12 android:layout_width="match_parent" Apr 09 03:36:14 android:layout_height="match_parent" Apr 09 03:36:16 android:layout_weight="3" Apr 09 03:36:18 tools:layout="@layout/bottom_bar_layout" /> Apr 09 03:36:22 Apr 09 03:36:24 SORRY Apr 09 03:36:25 diegoaguilar: some people are going to tell you that was an awful way of posting that. Dont listen, you do you. Apr 09 03:36:26 sorry, I will use pastebin Apr 09 03:36:28 it was a mistake Apr 09 03:36:30 http://www.hastebin.com/topivovoxi.xml Apr 09 03:36:46 its an awful way, I know Apr 09 03:36:50 I didnt mean it Apr 09 03:36:59 middle click on linux? Apr 09 03:37:39 crazy_rudy_: Just tell the activity to do it. Then, when the activity gets the result, make the activity tell the fragment. Apr 09 03:38:03 I used hastebin and thought I had copied the url Apr 09 03:38:39 so I want one fragment behind another Apr 09 03:38:49 thast why activity got a linear layout Apr 09 03:39:25 I even would love to assign them proportional heights, like 60%, 20%, etc Apr 09 03:42:31 diegoaguilar: wow Apr 09 03:42:45 * phix stacks the sandbags up Apr 09 03:43:55 uh phix ? Apr 09 03:44:15 diegoaguilar: Don't do that again, use pastebin Apr 09 03:44:30 diegoaguilar: flood protection Apr 09 03:45:36 i feel like it should be build into freenode to not allow more than a couple lines at once Apr 09 03:46:24 it was a mistake, sorry Apr 09 03:46:31 i already explained Apr 09 03:47:19 DadFoundMy: about what you were saying earlier, I don't believe there are "a lot of people" not using Fragments Apr 09 03:49:08 CedricBeust: well i would think there are more people not using freagments than there are using them Apr 09 03:49:59 JesusFreke ST got a new syntax definition. i wonder if i should do one for ragel Apr 09 03:50:25 DadFoundMy why would you think that :) Apr 09 03:50:46 g00s: well the vast majority of apps are pretty simple Apr 09 03:50:56 and its just an extra thing to learnm Apr 09 03:51:01 yeah those fart apps don't need fragments but ... Apr 09 03:51:19 as far as learning, they've been around for like 4 year now O.o Apr 09 03:51:21 g00s: oh cool so you've seen my app! /Ss Apr 09 03:51:35 they are pretty much part of android canon Apr 09 03:51:52 i guess realisticly im just trying to convince myself it's okay not to learn them :/ Apr 09 03:52:29 not that they are awesome, but i haven't found anything better Apr 09 03:52:50 then again, i still use content providers so Apr 09 03:52:51 * g00s ducks Apr 09 03:56:41 CedricBeust so looking again at this http://blog.jetbrains.com/kotlin/2015/04/announcing-anko-for-android/ Apr 09 03:56:54 have you seen any blogs on how to make your own DSL with kotlin ? Apr 09 03:57:12 " Kotlin’s extension functions and properties arranged into type-safe builders " Apr 09 03:57:19 this is very cool Apr 09 04:03:38 g00s: There are several articles on how to make DSL's on Kotlin, it's pretty easy Apr 09 04:04:12 DadFoundMy: I very much doubt that but I don't really have data, just intuition that tells me that a lot of people do what works by default Apr 09 04:04:25 and frankly, I'm not convinced by all the alternatives I've read so far Apr 09 04:05:17 I also think the complexity of fragments is blown way out of proportions. It's hairy if you mix rich actvities with rich fragments but most of the time, we have a pretty empty activity that immediately delegates to fragments Apr 09 04:06:02 the tricky bits are rotation changes, cached fragments... Apr 09 04:06:33 i could imagine some DSL in kotlin defining the rules for what fragments to shown when Apr 09 04:06:53 Hi all. Quick question. Is the agile methododology of coding worth learning if I am a solo dev? Does it have any application if you aren't working with other people? Apr 09 04:07:19 I know it's not Android specific but i'm curious Apr 09 04:08:02 liuwenhao only if you define agile as making a decision between n things where the decided upon thing gives you the most wiggle room Apr 09 04:08:46 * JesusFreke wiggles Apr 09 04:09:43 JesusFreke but can you wiggle while you're riding :) Apr 09 04:09:57 indubitably Apr 09 04:10:27 thanks g00s; I think I'm going to read more about it just to get a sense of what it is Apr 09 04:10:42 try to find the presentation to this first http://pragdave.me/blog/2014/03/04/time-to-kill-agile/ Apr 09 04:11:41 https://www.youtube.com/watch?v=AXit0UpwPxs this? Apr 09 04:11:54 or this http://www.thoughtworks.com/talks/the-death-of-agile Apr 09 04:12:04 liuwenhao: ni shi zhong guo ren ma? Apr 09 04:12:06 lol no Apr 09 04:12:21 dadfoundmy: yes Apr 09 04:12:25 neato Apr 09 04:12:27 but I live in USA right now Apr 09 04:12:34 http://www.thoughtworks.com/talks/the-death-of-agile Apr 09 04:12:38 i lived in china for a little bit Apr 09 04:12:40 thank you g00s Apr 09 04:12:45 will watch this right now Apr 09 04:14:23 although i did read 'the art of doing twice the work in half the time' and enjoyed it ;) Apr 09 04:16:00 I will check that out as well. I need more things to read Apr 09 04:22:13 liuwenhao for yourself though, i'd probably first read some uncle bob Apr 09 04:22:57 http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 Apr 09 04:23:12 http://www.amazon.com/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073 Apr 09 04:23:43 and i heard good things about this, if you want a modern survey of agile methods http://www.amazon.com/Learning-Agile-Understanding-Scrum-Kanban-ebook/dp/B00PJ8YKRM Apr 09 04:24:01 gotta love the cosmic covers :) Apr 09 04:25:24 i tend not to have much time for those kinds of books these days, seems like i spend all of it fighting android Apr 09 04:27:39 hm, just stumbling upon this, looks interesting too http://www.amazon.com/Soft-Skills-software-developers-manual/dp/1617292397 Apr 09 04:27:48 * g00s puts on wishlist Apr 09 04:46:27 g00s: thank you. those books look great Apr 09 04:46:48 good night everyone Apr 09 06:03:07 Hey guys, I currently have very high memory usage in my app due to some one-time tutorial screens that don't garbage collect properly - they drive RAM usage up to 89MB. By the time the user gets to the end of the screens and starts a new activity, like Settings, the MainActivity gets killed. How can I prevent that with a bandaid fix? Ie. not preventing the memory leaks? Apr 09 06:03:14 Basically just preventing the MainActivity from being killed Apr 09 06:07:04 are you keeping around a lot of images? what is using the memory Apr 09 06:07:21 Showcase View https://github.com/amlcurran/ShowcaseView Apr 09 06:07:30 here is the bug reported Apr 09 06:07:31 https://github.com/amlcurran/ShowcaseView/issues/244 Apr 09 06:07:34 and some people listed fixes Apr 09 06:07:36 but they seem involved Apr 09 06:07:43 and I don't have much time, my app is being presented tomorrow Apr 09 06:08:01 t0astt, what's your app? Apr 09 06:08:02 about Apr 09 06:08:31 it's for ridesharing Apr 09 06:08:37 oh Apr 09 06:08:47 nice Apr 09 06:08:53 my first app Apr 09 06:08:58 it's been a bit of a challenge lol Apr 09 06:09:01 way to go then Apr 09 06:09:08 every beginning is difficult Apr 09 06:09:09 thanks :D Apr 09 06:09:15 I had to write a rest api for it as well Apr 09 06:09:19 on my backend server Apr 09 06:09:22 interacting with my db Apr 09 06:09:28 full stack dev <3 Apr 09 06:10:25 basically your issue now is using that library, you can't expect us to debug it for ya, you either use it or don't. Maybe once done with the View do some debugging to make sure everything is closing down and not keeping reference Apr 09 06:11:02 no i'm not asking for you to debug it. I know what the bug is. I'm just wondering if there is a way to prevent my activity from being killed off due to the RAM usage (89mb) Apr 09 06:11:39 depends on device probably, as if it will be killed or not, your problem should be if being killed what to save state wise Apr 09 06:11:57 or what to have been saved in case of being killed Apr 09 06:12:11 state wise there isn't anything to save Apr 09 06:12:31 so what's the issue, if it's killed Apr 09 06:12:56 So they go through the tutorial screens and then eventually get to a spot where they are in a new activity (the tutorials are in the mainactivity) Apr 09 06:13:25 The mainactivity has built up so much RAM usage by then, that when they enter a new activity (settings/notifications) and then try to go back (by using the back arrow/button), they go back to the launcher Apr 09 06:13:28 aka out of the app Apr 09 06:13:33 because the mainactivity has been killed off Apr 09 06:14:02 well fix the issue, or override onBackPressed for new activity to do some checking Apr 09 06:14:16 can always send an intent to relaunch activity Apr 09 06:15:22 Hm ok Apr 09 06:15:36 How can I check that? Apr 09 06:34:16 t0astt, what makes your activity use so much RAM? Apr 09 06:46:26 stand up to slave drivers! http://roadlesstravelled.me/2015/04/06/why-steve-jobs-motivated-me-to-quit-apple/ Apr 09 06:48:27 being individual is overrated ;) Apr 09 06:49:07 be unique! just like everyone else :P Apr 09 06:49:14 Heya Apr 09 06:49:43 shmooz, lol Apr 09 06:50:16 Hello, I want to add elements to a ListView Apr 09 06:50:26 Im reading docs, and I see I need an ArrayAdapter Apr 09 06:50:43 you need an adapter, doesn't have to be an ArrayAdapter Apr 09 06:50:49 well Ok, Apr 09 06:50:59 Adapter being an interface Apr 09 06:51:00 right? Apr 09 06:51:11 well it's actually a ListAdapter Apr 09 06:51:16 oh :P Apr 09 06:51:27 the base class you need, which implements Adapter Apr 09 06:51:35 well strings for the list are at the values folder Apr 09 06:51:40 as string-array Apr 09 06:51:42 oh Apr 09 06:52:04 if you don't need styling arrayadapter would do Apr 09 06:52:18 i personally rarely use it Apr 09 06:52:21 what would "styling" do in this case? Apr 09 06:52:53 how each of your list view items looks and what it contains Apr 09 06:53:08 and I'm asking because ArrayAdapter's constructor has got as second argument "The layout that contains a TextView for each string in the array" Apr 09 06:53:11 if you just need a single line of text you can do that with arrayadapter easily using android layouts Apr 09 06:53:18 that's what here says http://developer.android.com/guide/topics/ui/declaring-layout.html#AdapterViews Apr 09 06:53:26 you can use andorid.r.layout.single_list_item or something Apr 09 06:53:29 I'm like .. what? a TextView? Apr 09 06:53:48 android.R.layout.simple_list_item_1 Apr 09 06:54:05 so I should have a layout for each item, like for an "styled" presentatio? Apr 09 06:54:14 diegoaguilar, i'm sure there is documentation on that and examples on the internetz Apr 09 06:54:42 you won't be able to style the items much with an arrayadapter, unless you override its getView.. Apr 09 06:54:58 i suggest you just read up a bit more on how listview works Apr 09 06:55:18 or unless you use your own layouts Apr 09 06:55:34 diegoaguilar: eventually you'll have to extend BaseAdapter and drop ArrayAdapter Apr 09 06:56:31 yeah baseadapter ftw Apr 09 07:00:24 yeah i really wish i used base adapter from the start Apr 09 07:00:52 im extending arrayadapter right now and it all works out but my code could be a lot cleaner with baseadapter Apr 09 07:01:37 diegoaguilar: you can just construct ArrayAdapter i believe and one of the parameters will be a String array (or list) Apr 09 07:02:04 DadFoundMy: what will be your next successful app ? Apr 09 07:02:08 thanks DadFoundMy Apr 09 07:02:28 shmooz: cant release details :D Apr 09 07:02:43 its a game aimed at programmers though Apr 09 07:02:43 bah Apr 09 07:03:02 i would but i am working with a partner on it and he wouldnt want me spilling details Apr 09 07:03:05 we Apr 09 07:03:10 're really excited for it though Apr 09 07:03:42 we'll have to kick you for soliciting Apr 09 07:03:53 * DadFoundMy runs Apr 09 07:05:18 better not be addictive, we don't need more things to distract us from finishing our apps Apr 09 07:07:26 i hope it is :D Apr 09 07:07:44 its going to be a lot of work in so youll have a while to finish your stuff Apr 09 07:08:06 #clementineMasterRace Apr 09 07:08:11 #wrongchannel Apr 09 07:09:29 I would avoid fragments if I were you Apr 09 07:10:04 haha reading up in chat i see Apr 09 07:10:17 or fork a separate version with fragments and one without Apr 09 07:11:01 yeah I was reading what you were saying before Apr 09 07:11:46 Hi guys. Apr 09 07:11:52 I just moved an android studio project and suddenly my .xml files is giving me a lot of ‘Cannot resolve symbol’. Apr 09 07:11:56 Did that ever happen to any of you? Apr 09 07:12:02 http://picpaste.com/Screen_Shot_2015-04-09_at_09.02.56-gkIl8iif.png Apr 09 07:12:48 have you rebuilt the project since you moved the files? Apr 09 07:12:49 shmooz: im about to add a nav drawer to my app. I know it's do able without fragsments, but is it smart to? Apr 09 07:13:06 nielmcg yeah, did that a bunch of times :( Apr 09 07:13:24 whoops neilmcg :) Apr 09 07:13:53 DadFoundMy: I think if it's possible to, it's smart to Apr 09 07:15:41 Looking for a way to specify a view's layout parameters with all the same abilities in XML Apr 09 07:16:00 what about a clean build JohnR^^ ? It looks like Studio is confused about where those ids are defined in that screenshot Apr 09 07:16:30 like some compiled file is still referencing the old location Apr 09 07:16:35 seems MarginLayoutParams and LayoutParams...anyway it's not working for me and I don't like inserting layouts just to get some XML layout values set on a view. Apr 09 07:17:08 because it's stupid. why do I need a layout just to set some of the attributes? Apr 09 07:17:09 neilmcg: i did a build -> clean project. still the same :/ Apr 09 07:18:24 knapper_tech: what code have you tried ? Apr 09 07:18:47 I instantiated a view from just context Apr 09 07:19:27 how long/hard is it to convert on my activities to fragments? Apr 09 07:19:30 shmooz, and then I created a new MarginLayoutParams, setMargins, setLayoutParams, but the view ends up reflecting none of it Apr 09 07:19:36 knapper_tech, because those attributes make sense only for a view that's inside a parent view Apr 09 07:19:43 DadFoundMy, lifecycle is a little different Apr 09 07:20:28 DadFoundMy, other than that, methods and sigs are almost identical. back management is only slightly more manual and can be configured in fragment transaction. Apr 09 07:20:55 knapper_tech: ugh i dont want to use them but i feel that i should Apr 09 07:21:12 seems like such a pain in the ass to make a nav drawer without them Apr 09 07:21:16 DadFoundMy, view rotation is something where you will, probably like everyone else, resort to imlpementing your own configchange handler that just recreates the view instead of the entire damned fragment Apr 09 07:21:57 and you only implement a non-trivial configchange handler if you need to actually change the layout Apr 09 07:22:16 some layouts make sense in portrait and landscape (good enough for now) Apr 09 07:22:56 knapper_tech: that stuff should work, you must be doing something wrong Apr 09 07:22:58 Almost everything an Activity can do, a fragment can do, and you always have access to getActivity() Apr 09 07:23:01 can't tell without seeing code Apr 09 07:23:18 shmooz, I think the view needs to be added and then I get the layout params off the new view and modify from there Apr 09 07:23:27 I was attempting to set on a view that wasn't yet a childe Apr 09 07:24:25 neilmcg: got any other ideas? :P Apr 09 07:25:33 JohnR^^, what do you mean you "moved" it? Apr 09 07:25:33 DadFoundMy: I started using them because of a NavDrawer as well. Apr 09 07:26:19 claint: did you have to convert your whole project? Apr 09 07:26:35 DadFoundMy: Nah, I started with them. I still have one activity. Apr 09 07:27:09 ugh idk if it's worth converting my project Apr 09 07:27:16 iprime: well, actually what happened was that i accidentally deleted my project (It was in a subfolder, which I didn’t know at the time). So i found and retrieved it from my time capsule and put the folder in a directory i knew i wouldn’t delete Apr 09 07:27:19 its not something im going to support for a while anyway Apr 09 07:27:47 JohnR^^, try reimporting it, you might have some old paths in your config files (idea and gradle configs) Apr 09 07:28:02 iprime: will do Apr 09 07:30:23 DadFoundMy: probably not worth it then. I am curious about your NavMenu without Fragments. Do you have to restore the state of the menu every time? Apr 09 07:30:55 claint: http://stackoverflow.com/questions/19442378/navigation-drawer-to-switch-activities-instead-of-fragments Apr 09 07:32:17 DadFoundMy: yep, that looks like what I supposed you would need to do. Apr 09 07:33:02 so what would it take to change my project to fragments? Changing onResume() to something else i presume? what else would be involved? Apr 09 07:33:18 I guess intents work differently? Apr 09 07:34:05 iprime: Yay, It worked. Not from the same location - I had to copy the project to a new location and then when I imported it again, then it worked! Apr 09 07:34:07 ty! Apr 09 07:39:28 Hi! For an animation with repeat count infinite and mode restart, I want the first animation to have an offset and not the subsequent ones. Is that possible? setStartOffset seems to be applied everytime the animation runs Apr 09 07:57:56 hi guys, need some recommendation Apr 09 07:59:20 Although I could code the android app myself, I do a lot of prototyping and was wondering if you can recommend any tool to make android app fast using click and drag with a modern interface, unlike most drag and drop app makers out there Apr 09 07:59:35 i saw that there is the mit app inventor tool Apr 09 07:59:49 but the design elements are really boxy Apr 09 08:00:59 app inventor is the only one i've heard of Apr 09 08:22:36 how to detect changes on a native Android calendar Apr 09 08:22:55 ? Apr 09 08:30:47 anybody here use cocos2d-x for android game development? Apr 09 08:30:53 unable to set it up on my mac! :( Apr 09 08:41:51 Why didn't Android Studio warn me that SoundPool.Builder is in API 21+ when my app's minimum is API 15? Apr 09 08:42:06 10* Apr 09 08:44:11 in fact it alerts me that the old constructor is deprecated even though it's only available in API 21+ Apr 09 08:49:41 is youtube down or just me? Apr 09 08:51:36 jkli: isup.me Apr 09 08:52:25 the heck Apr 09 08:54:38 interesting, youtube germany is down Apr 09 08:56:48 hi why i cannot connect to google play? (no connection, retry) but I can connect to other google's service such as gmail, youtube? Apr 09 08:59:19 I can connect to google play Apr 09 09:02:31 there are regional server outs Apr 09 09:02:56 source? Apr 09 09:09:31 cmon Apr 09 09:09:37 somebody must have some cocos experience? :( Apr 09 09:09:55 cocoa? Apr 09 09:10:25 supay, i use libgdx instead Apr 09 09:10:38 maybe because i'm not sure how good cocos for android is Apr 09 09:11:02 iprime: how good is libgdx? and is it crossplatform? (ios + android, at least?) Apr 09 09:11:34 it is crossplatform yeah, it's pretty good, of course depends on your goals, check the gallery: http://libgdx.badlogicgames.com/ Apr 09 09:15:20 and theres unity *hide* Apr 09 09:16:37 danijoo, :D Apr 09 09:18:05 that could reduce the time to make your game from 3 months to 3 clicks ^^' Apr 09 09:18:22 do you guys know of a good cheap sms gateway ? Apr 09 09:18:26 for user authentification? Apr 09 09:19:10 Any IRC client that can automatically rejoin channels when it regains connection/wakes up/starts? Apr 09 09:19:45 currently using gool'ol Xchat d: Apr 09 09:20:24 xchat is scriptable ;) Apr 09 09:20:43 Troffel, what os? Apr 09 09:20:55 im going to be honest and say, I've never looked more into IRC clients than just logging on my channels d: Apr 09 09:21:17 danijoo, mac, ubuntu, windows Apr 09 09:21:21 would be best d: Apr 09 09:21:41 Troffel, i dont know any irc client that has a good implementation for all 3 Apr 09 09:21:50 but primarily mac / ubuntu Apr 09 09:22:03 if you have different ones for each, that's good too :) Apr 09 09:22:40 just so annoying to return to the client to see it has timeout and never reconnected Apr 09 09:22:44 for windows im using hexchat. for mac nothing can beat limechat Apr 09 09:23:54 damn Apr 09 09:24:10 costs 4ct per user if you want to use 2 factor auth Apr 09 09:24:11 thanks danijoo, ill look into once I get off from work :) Apr 09 09:25:47 can one release an app in playstore anonymously Apr 09 09:26:00 means without id authentification Apr 09 09:26:00 no Apr 09 09:26:13 ofc you gotta add some names and companies Apr 09 09:26:15 you shoudl be a registered developer, that is Apr 09 09:26:35 and you should pay, there's the link back to you ;) Apr 09 09:26:37 registration as developer is cumbersome? Apr 09 09:26:44 no, it's easy Apr 09 09:26:47 can i pay via paypal? Apr 09 09:26:48 costs $25 Apr 09 09:26:56 maybe, i'm not sure, with CC for sure Apr 09 09:27:14 i am having NullpointerException at line 151 can any body guide me http://paste.ubuntu.com/10781092/ ? Apr 09 09:27:16 we dont use cc here Apr 09 09:27:25 since recent, you are also required to make tyour full address public available Apr 09 09:27:41 means everybody seeing your app in the store will also know your address Apr 09 09:28:50 dang Apr 09 09:28:56 then i will move to mozambique Apr 09 09:29:18 but will the place of company determine in which store the app is going to be released? Apr 09 09:29:28 there is only one google play store Apr 09 09:29:54 so once released it will be globally released worldwide? Apr 09 09:29:58 what, why would I need to make my address public Apr 09 09:29:58 s9iper1, why don't you try the simple framework Apr 09 09:30:05 even if it is in non-english language? Apr 09 09:30:16 jkli, you can check/uncheck lands in the store Apr 09 09:30:24 Darkwater, because you are selling a product Apr 09 09:30:26 ah Apr 09 09:30:34 yeah, digitally Apr 09 09:30:43 physical address is irrelevant imo Apr 09 09:30:58 no. because if you fuck with your user, you are physically responsible Apr 09 09:31:06 actually wait, is it only for paid apps? Apr 09 09:31:06 is there a difference in the app screening for free and paid apps? Apr 09 09:31:32 thats the address that will get the post from their lawyer if your app is the next fappening :p Apr 09 09:31:48 Darkwater, afaik only paid/in-app-purchase but im not sure Apr 09 09:32:06 s9iper1, http://simple.sourceforge.net/ Apr 09 09:32:25 if that's the case I'm a bit more understanding Apr 09 09:32:52 Any idea why AndroidStudio would throw "ERROR: In SherlockSpinner, unable to find attribute android:popupPromptView" with ActionBarSherlock? Apr 09 09:33:00 though I still don't like the idea of having it public; why not only make it visible to customers Apr 09 09:33:06 ie. people who actually bought the app Apr 09 09:33:14 SheikhAman, it want to tell you that Sherlock is soooo 2014 Apr 09 09:33:32 I know :-/ Apr 09 09:33:50 I just need to ship something quick and just imported it to AS to face this stuff Apr 09 09:33:58 SheikhAman, simple solution.. don't target android 2 :D Apr 09 09:34:06 oh Apr 09 09:34:07 well Apr 09 09:34:11 tried putting in ActionBarActivity, but it's too much work as of now Apr 09 09:34:56 It was all okay when I was using Eclipse Apr 09 09:35:03 SheikhAman, i guess actionbarsherlock has its own identifier that is not android: Apr 09 09:35:07 but i could be wrong Apr 09 09:35:20 oh ok. nvm if it works on eclipse Apr 09 09:39:40 it's so frustrating i cannot connect to play store and download apps Apr 09 09:44:44 iprime, suggest any framework ? Apr 09 09:47:17 Is it possible to send an SMS to a group of contacts, I've searched online but I only found sending to a single contact using Uri.fromParts("sms", phoneNumber, null). Any help would be much appreciated. Apr 09 09:50:07 so I went into ABS source, and commented that attribute android:popupPromptView and it started working Apr 09 09:50:08 pheww Apr 09 09:50:08 does the mobile play store require SIM card? Apr 09 09:59:37 Locale.getDefault().getLanguage() returns "default" :s Apr 09 09:59:40 is it intended Apr 09 10:09:17 just a quick question, it seems that to change programatically my network operator, I have to use reflection, right? My aim is just to change it based on the wi-fi (when I'm at home or not) Apr 09 10:16:56 i am getting null pointer exception at line 151 code is here any guide people http://paste.ubuntu.com/10781092/ ?? Apr 09 10:29:06 Hey gauthierm. Found the solution for my yesterday's problem. See the comment http://www.reddit.com/r/androiddev/comments/31w0j6/how_to_move_a_view_between_different_parent/cq6e6u6 Apr 09 10:43:46 <_genuser_> how odd, that new'ing an object the constructor isn't run. Apr 09 10:45:32 _genuser_, what do you mean? Apr 09 10:48:00 genuser: maybe a singleton class with private constructor? Apr 09 10:55:27 guys im using universal image loader roundedbitmap displayer and there are black blanks around the image, what should i do ? cause i've never worked with images before Apr 09 11:12:36 hello :) no matter what, get Intent intent = new Intent(this, MyService.); Apr 09 11:12:51 *Unable to start service Intent Apr 09 11:17:54 be more specific Apr 09 11:18:09 what happens, any error? any code? Apr 09 11:19:05 a-russo, see channel topic Apr 09 11:24:14 Hi, I have a Fragment that uses dependency injection for an EditText. (I'm using ButterKnife.inject () inside onCreateView ()). It also provides a public method setEditText (), which sets the aforementioned EditText. Apr 09 11:24:24 I add the Fragment with FragmentManager to my Activity and then I use myFragment.setEditText ("foo") somewhere after (based on a OnPreferenceChanged event). Of course the Fragment's view is not yet there and my app crashes with a NullPointerException. Apr 09 11:24:33 What's the best practice here? Apr 09 11:25:09 on at least onResume Apr 09 11:25:25 *there yet Apr 09 11:25:34 fabiob, you cant do butterknife injectins before onActivityStarted() is called Apr 09 11:25:51 onActivityCreated* Apr 09 11:28:41 danijoo: They say to do that in the docs: https://jakewharton.github.io/butterknife/ Apr 09 11:28:59 danijoo: See "Non-Activity Injection". Apr 09 11:29:21 did you set the second parameter correctly? Apr 09 11:29:26 inject(this, view) Apr 09 11:29:37 Hi Apr 09 11:29:47 Anybody here using mortar or something similar? Apr 09 11:30:00 I would like to avoid fragments, and I don't know if there is any other alternative Apr 09 11:30:20 It feels weird to have all those dagger modules and injections all over the place Apr 09 11:30:49 danijoo: Yeah, and it works. The problem arises when I whant to use myFragment.setEditText() before the EditText is injected. Apr 09 11:31:18 wait then :p Apr 09 11:31:28 and dont use it before its injected Apr 09 11:31:46 danijoo: Yeah :) Apr 09 11:32:13 danijoo: Maybe I should use myFragment.setEditText() when I know the Fragment's view is created, but I don't know how to do that. Apr 09 11:32:53 danijoo: I don't seem to find a callback or something in my Activity that tells me when a Fragment is added and its view is created. Apr 09 11:33:16 Fragment#onActivityCreated Apr 09 11:33:23 after that, you can be sure it has a view Apr 09 11:33:35 danijoo: i asked few days ago, how to make a "background task" that is launched each hour, to perform check on a webserver in order to notify the user in case of new content, whether the app is closed, in background or in foreground (and I want to avoid GCM). You advise me to look at "AsyncTask", but all I see the documention for when the app is launched Apr 09 11:33:49 do you have some other key word to enhance my search ? :D Apr 09 11:34:01 fabiob, maybe Fragment#isAdded() also is a good indicator for you Apr 09 11:34:25 danijoo: But it's from the fragment. I call myFragment.setEditText () from the Activity. Apr 09 11:34:37 danijoo: Oh, I'll check that out. Apr 09 11:35:21 danijoo: That could be it. "added" means its view is already there? Apr 09 11:35:29 not sure Apr 09 11:35:36 check the documentation Apr 09 11:35:41 but i think so Apr 09 11:35:46 " Return true if the fragment is currently added to its activity." Apr 09 11:35:57 blusky, you set it once up in an activity's onCreate Apr 09 11:35:58 I'll try. Apr 09 11:36:10 and then is runs at given period of time even if its not started Apr 09 11:37:56 blusky, you dont want to use an async task for that Apr 09 11:38:01 you need to use the scheduler Apr 09 11:38:17 lemonxah: ok, gonna look into that :) Apr 09 11:38:17 lemonxah, he is talking about syncadapter if i remember right :) Apr 09 11:38:27 at least thats what i suggestee Apr 09 11:38:29 suggested Apr 09 11:38:35 well he doesn't want to use GCM Apr 09 11:38:41 Papipo_: https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Apr 09 11:38:47 ooooh, right !!!! that may be why i didn't get anything adapted :D Apr 09 11:38:49 and syncadapter is kinda used for that Apr 09 11:38:54 lemonxah, its not Apr 09 11:39:00 blusy ah :D Apr 09 11:39:11 you can still use the syncadapter to sync the data Apr 09 11:39:17 when using scheduler Apr 09 11:39:25 but what i am saying is Apr 09 11:39:27 syncadapter can shedul itself Apr 09 11:39:30 yep fabiob, I've read that many times Apr 09 11:39:35 you dont need an extra sheduler for it Apr 09 11:39:39 Actually it's open on my browser Apr 09 11:39:45 mostly ppl use the syncadapter in conjuction with a GCM message telling them there is new data Apr 09 11:39:45 scheduler is for "one task at one time", or does it work like a cron ? Apr 09 11:39:51 so they associate it together Apr 09 11:39:54 as well as the sample mortar apps from te mortar repository itself Apr 09 11:39:59 So much boilerplate Apr 09 11:40:07 lemonxah, yeah but you can also set the adapter to sync every 1 hr Apr 09 11:40:11 blusky its for 1 task at a time but at the end of that task just schedule another one Apr 09 11:40:24 good workaround :) Apr 09 11:40:26 danijoo, this i didn't know Apr 09 11:40:35 haven't worked with syncadapter yet Apr 09 11:40:43 the advantage of syncadapter is that it manages to run only when connected to internet etc Apr 09 11:41:06 lemonxah: but what if the user restart the device, i'll lose the chain won't I ? Apr 09 11:41:07 lemonxah, https://developer.android.com/training/sync-adapters/running-sync-adapter.html#RunPeriodic Apr 09 11:41:30 blusky, then you will have to add a service that starts at device boot if you want it all the time Apr 09 11:41:41 Hi all - I'm having trouble getting android studio running on Ubuntu, I'm not sure how to sort out the SDK manager and stuff, is anyone could check the following link for me that'd be ace http://www.reddit.com/r/androiddev/comments/31x9hd/problems_installing_android_studio_on_ubuntu/ Apr 09 11:41:50 or just the first time the app starts kick it off or read up on the sync adapter Apr 09 11:42:26 ok, got a lot of documentation to read before asking new questions :) Apr 09 11:42:30 thx lemonxah and danijoo :) Apr 09 11:42:46 baxx, do you have a proxy server? Apr 09 11:42:46 Papipo: I'm investigating in using mortar myself, but never tried it Apr 09 11:42:58 I am going to port an app I was developing Apr 09 11:43:02 lemonxah: no I don't have one, cheers Apr 09 11:44:25 If I want a list to appear inside a layout, so I need to use fragments? Apr 09 11:44:34 s/so/do/ Apr 09 11:44:38 no Apr 09 11:44:57 fabiob: if android developing has teached me something, there is a library somewhere that reduces the boilerplate of the library you have to use to reduce the boilerplate of the library you use to make a certain API sane. Apr 09 11:44:58 ok cool Apr 09 11:45:05 I mean, Papipo Apr 09 11:45:49 danijoo: f and p are close together? You using a dvork keyboard or something more exotic? Apr 09 11:46:02 haha I did it too Apr 09 11:46:04 lemonxah: should I have a proxy server? Apr 09 11:46:05 fabiob! Apr 09 11:46:16 no i just suck at typing :) Apr 09 11:46:28 using a qwerty EN_GB keyboard Apr 09 11:47:10 he problem with mortar is that it's still on an early version Apr 09 11:47:21 ah, UK Apr 09 11:47:24 my fingers type faster than their shadow and my brain, thats the problem Apr 09 11:47:25 hopefully there will be a way to improve the boilerplate or maybe generate the code Apr 09 11:47:38 I hate using a UK keyboard, @#"' are in the wrong place Apr 09 11:47:41 phix: no, i'm just stupid :) Apr 09 11:47:55 no baxx was just wondering cause that would explain what you are seeing Apr 09 11:48:00 phix im a german. dont ask me how much german keyboards suck Apr 09 11:48:21 NEIN! Apr 09 11:48:30 to get a { in german keyboard, u have to do alt-gr + 7 Apr 09 11:48:33 I have used a danish keyboard Apr 09 11:48:38 thats not fun when programming.. Apr 09 11:48:40 lemonxah: ok fair, I can't find any docs or whatever that deals with this Apr 09 11:49:10 And went to Germany to get cheaper booze :P Apr 09 11:49:32 so i just got the first one i could find on ebay with qwerty to have {} at the right place. turned out to be an uk_gb one :) Apr 09 11:49:36 phix, haha Apr 09 11:49:39 Fragment#isAdded doesn't quite cut it, because i would have to poll it and Fragment's commit is async AFAIK. Apr 09 11:50:05 fabiob, i dont know what exacly you are trying to do, but it seems to be a design problem Apr 09 11:50:10 Most things in ANdroid is async Apr 09 11:50:19 I am dealing with the account manager atm :S that is all aync Apr 09 11:50:22 async* Apr 09 11:50:23 danijoo: Yeah, I suspect it as well. Apr 09 11:50:35 lemonxah: do you know what my problem is at all? Any good words to google? Apr 09 11:50:37 what do you call from activity and why Apr 09 11:50:40 I don't have a clue Apr 09 11:51:19 is this image relevent : https://lh5.googleusercontent.com/-A15OZF53DzM/VSZkMnCwYeI/AAAAAAAAd9A/NSCvlz4BEUw/w770-h838-no/a.png Apr 09 11:52:07 danijoo: Activity#onCreate() I call getFragmentManager ().beginTransaction ().add (R.id.my_id, MyFragment).commit (); Apr 09 11:53:16 you said sth about setEditText Apr 09 11:53:32 danijoo: When a certain preference changes, I call myFragment.setEditText("foo"); Apr 09 11:54:14 baxx you are not downloading the list of SDKs to install and that might be a block on the internet you are using something like a proxy or some other block Apr 09 11:54:18 why do you not do that inside the fragment? Apr 09 11:54:28 danijoo: (I'm using a library for injecting Preferences, but that's equivalent of setting a listener) Apr 09 11:54:38 set the listener inside your fragment Apr 09 11:54:56 danijoo: Uhm, now I fell really stupid. Apr 09 11:55:00 :p Apr 09 11:55:01 lemonxah: I just ran it with sudo instead of just ./android and now have this : https://lh3.googleusercontent.com/-xc7tGSB_6fc/VSZoeOi-S3I/AAAAAAAAd9U/gFz9kuGM7ks/w1514-h833-no/a.png Apr 09 11:55:17 Let's try. Apr 09 11:55:38 baxx, this sounds like you need to adjust ownership settings for your /home/vco/Android folder Apr 09 11:56:10 danijoo: yeah, can't believe i didn't try sudo last night >.< Apr 09 11:56:12 sudo chown -R vco:vco /home/vco/Android should do the trick and allow you to make it without sude Apr 09 11:56:38 then you should not need sudo anymore Apr 09 11:56:50 danijoo: Oh, right. I can't.. I have more than one of those Fragments. Apr 09 11:57:08 ? Apr 09 11:57:27 http://i0.kym-cdn.com/entries/icons/original/000/004/689/sandwich.png Apr 09 11:57:30 danijoo: Those Fragments are shared UIs for addresses. I have two addresses shown in my activity. Apr 09 11:57:38 danijoo: so I need to recursively chmod all the things in the directories ~/Android and ~/android-studio Apr 09 11:57:51 baxx, no. thats what -R is for Apr 09 11:57:52 danijoo: I have to change *one* of those, if my Preference is changed. Apr 09 11:58:14 danijoo: thus I need to call a method on the right instance. Apr 09 11:58:43 fabiob, make a method in the fragment itself MyFragment#changeEditTextText(String text) Apr 09 11:58:52 in that method, check if view is null or not Apr 09 11:58:55 to avoid the error Apr 09 11:59:25 baxx, just run the command i posted and it should fix everythign Apr 09 11:59:52 danijoo: and then I cache it and set the text when the view is actually created? I thought about that.. Apr 09 12:00:03 what is the cause of this error i googled but nothing help full Apr 09 12:00:03 Error:Execution failed for task ':app:preDexDebug'. Apr 09 12:00:04 > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 1 Apr 09 12:00:05 that would be possible, yeah Apr 09 12:00:32 danijoo: But that seemed a dirty hack and I was hoping I was missing something. Apr 09 12:00:41 s9iper1, thats only the result. there should be an error message saying whats wrong somewhere above it Apr 09 12:00:45 (I hate fragments) Apr 09 12:00:54 fragments are dirty hacks by definition :p Apr 09 12:02:07 danijoo: Good to know, I feel less stupid. :) Apr 09 12:02:59 danijoo: Have you tried mortar? Does it bring more problem to the table than it resolves, as I understand from Papipo? Apr 09 12:03:07 *problems Apr 09 12:03:34 fabiob, no. I got that fragment thing going for me Apr 09 12:09:36 guys how can i center that textview according to contact image view ? http://paste.ubuntu.com/10782223/ Apr 09 12:10:04 i tried gravity,layout_gravity center in parent etc and they didnt work Apr 09 12:14:23 sci-fic, android:layout_alignCenterVertical="true" Apr 09 12:14:36 danijoo: trying to implement the sync adapter, but I need an "Account", on the documentation, account is a String, but android studio shout me "need android.accounts.Account", any idea ? Apr 09 12:15:00 blusky, you need to create a dummy account Apr 09 12:15:29 first part of "how to sync adapter" contains that. https://developer.android.com/training/sync-adapters/creating-authenticator.html Apr 09 12:15:36 new Account("dummy","dummy") N Apr 09 12:15:39 ? Apr 09 12:15:42 ok, gonna read that Apr 09 12:16:46 danijoo: you mean this android:layout_centerVertical="true"? if so it doesnt work Apr 09 12:19:15 danijoo, its saying this http://paste.ubuntu.com/10782194/ i have added stax library from project structure.. Apr 09 12:20:25 sci-fic, why dont u drag and drop it in the layout preview. Apr 09 12:20:32 and check what argument it sets Apr 09 12:21:28 its layout file can i do that ? Apr 09 12:21:58 danijoo:http://postimg.org/image/aqiqn1tsz/ Apr 09 12:25:03 sci-fic, again, why dont u use the preview Apr 09 12:25:22 also to warn you, nintendo will shut you down once they see your app Apr 09 12:25:24 ;) Apr 09 12:25:36 its just test image :D Apr 09 12:25:42 ok ^^ Apr 09 12:26:08 its a gridview layout file i cant see in preview Apr 09 12:26:16 can i ? Apr 09 12:26:27 why dont u test it Apr 09 12:26:47 i see blank design page Apr 09 12:29:02 thats bad Apr 09 12:29:10 I have a RecyclerView and some CardViews. When I click a card, I'd like to have it grow to fill the entire screen. What's the best approach? Apr 09 12:30:54 I'm thinking of starting a new Activity that has a fadein-window-animation, and make a view transition of the card to this new Activity where the card has a different size. ..if that makes any sense.. Apr 09 12:32:11 Zta, that makes sense Apr 09 12:32:29 but will only work on android 5.x devices Apr 09 12:32:44 because there is no appcompat support for activity transitions Apr 09 12:34:40 Won't overridePendingTransition(int, int) work? Apr 09 12:35:03 http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int, int) Apr 09 12:35:09 The samples/legacy/ApiDemos has an Animation/Activity Transition demo that uses methods that I Was hoping would work on older APIs. Apr 09 12:35:55 hello Apr 09 12:36:04 is it possible to do this: BitmapFactory.decodeResource(getResources(), R.drawable.card_1c); Apr 09 12:36:15 but with card_1c as a string? Apr 09 12:36:31 like "R.drawable.card_"+n+"c" Apr 09 12:37:28 I believe so paulo_ but it'd be a bit different Apr 09 12:37:36 paulo_, no, since variable names aren't strings. Apr 09 12:37:53 resource IDs are statically pregenerated integers Apr 09 12:38:06 You can do something along the lines of ermm, hold on Apr 09 12:38:46 Also, regarding RecyclerView/CardView: since .addOnItemClickedListener() doesn't exist anymore, what should I do then? RecyclerView.addOnItemTouchedListener() or CardView.adOnClickedListener()? Apr 09 12:39:18 Zta, do what it makes sense Apr 09 12:39:28 Zta, if you want to handle a click, then add a click listener to the actual view Apr 09 12:39:38 that is, cardview or whatever you ahve as an item Apr 09 12:40:12 I think something like this should work paulo_ : int id = getResources().getIdentifier("x" + n.toString(), "drawable", getActivity().getPackageName()); Apr 09 12:40:18 But since the CardView instance is recycled, I cannot see exactly where to add the OnClickedListener.. Apr 09 12:40:49 Where "x" in your case would be "card_" Apr 09 12:41:33 VnM, "Note: use of this function is discouraged. It is much more efficient to retrieve resources by identifier than by name." Apr 09 12:41:38 Why do you people do that? -_- Apr 09 12:41:49 just create a static array of IDs and reference that Apr 09 12:41:53 paulo_, use getResources().getIdentifier("card_" + n + "c", "drawable", getResources().getPackageName()) Apr 09 12:41:54 it'll be portable, won't break and FAST Apr 09 12:41:56 Vnm: thanks :) Apr 09 12:42:08 oh. should read.. :D Apr 09 12:42:20 int[] cards = new int[] { R.id.card_1, ... } Apr 09 12:42:33 instead of relying on internal representation of things for minor conveniences Apr 09 12:43:03 Mavrik, thats cool until its 200 different cards. Apr 09 12:43:19 You have no business having 200 different card resources anyway Apr 09 12:43:22 that'll kill your app Apr 09 12:43:27 sizewise and resolve wise Apr 09 12:43:32 CardView.setOnClickListener() solved: http://andraskindler.com/blog/2014/migrating-to-recyclerview-from-listview/ Apr 09 12:43:37 since that method will have to resolve those 200 cards constatntly. Apr 09 12:44:01 Mavrik, what if i have a database with 200 items, each having another image assoziated with it Apr 09 12:44:20 What then? Apr 09 12:44:21 because thats the way how im currently doing it for this case Apr 09 12:44:27 getResources.getIdentifier Apr 09 12:44:38 ah nvm Apr 09 12:44:47 thought we are talking about drawable ids :) Apr 09 12:44:49 not view ids Apr 09 12:45:15 look, whatever Apr 09 12:45:31 teaching people bad patters for when they have 3 cards just because you have a freak case of 200 drawables Apr 09 12:45:41 it just causing them issues personally Apr 09 12:46:02 as i said, i thought we were talking about sth else. of course its something completly differeent for view ids Apr 09 12:46:11 because you know what will happen at runtime with them Apr 09 12:56:59 isn't `android create project ...` supposed to generate a gradle project? Apr 09 12:57:22 it generates ant.properties for me and no gradle stuff Apr 09 12:57:54 I'm rather sure it doesn't. Apr 09 12:58:16 meh Apr 09 12:58:34 when is onDraw called? is it only called after invalidate()? Apr 09 12:58:51 paulo_, whenever the view needs to be redrawn Apr 09 12:58:56 which includes invalidate() Apr 09 12:59:07 Mavrik: how often does that happen? Apr 09 12:59:09 and invalidate() of parents Apr 09 12:59:16 like does it aim 30fps or something? Apr 09 12:59:16 paulo_, very often. Apr 09 12:59:19 60fps. Apr 09 12:59:24 onDraw has to be done in less than 16ms Apr 09 12:59:29 more like less than 10 Apr 09 12:59:51 Where can I found the documentation for everything around the 'xmlns:tools="http://schemas.android.com/tools' ? Apr 09 12:59:53 e.g. when animating it's usually common for onDraw to be called for each animation step if there's something changing hte view Apr 09 13:00:12 I've just found http://tools.android.com/tech-docs/tools-attributes Apr 09 13:01:24 ah ok. is it possible to make it such that its ony redrawn after invalidate()? Apr 09 13:03:35 paulo_, how would that work? Apr 09 13:04:14 onDraw() is already called minimum amount of times Apr 09 13:04:25 but when it is called it HAS to be called for the view to be drawn on screne Apr 09 13:05:27 Is there a way to make Gson get a jsonobject from a json string and deserialize that? Apr 09 13:05:49 So only deserialize the value of a specific key. Apr 09 13:06:40 I can do it with the org.json library by deserialising it with that and serialising the value I want Gson to deserialise but that's redundant and totally not efficient. Apr 09 13:08:36 hi Apr 09 13:10:21 Muchoz, sure. make a jsonobject out of that string, get the value and deserialize that. Apr 09 13:11:03 String -> JSONObject -> JSONObject(valueX) -> Object(from valueX) Apr 09 13:11:07 danijoo, a Gson JsonObject or json.org JSONObject? I can perfectly do it with JSONObject, but that's redundant to deserialise it once again. Apr 09 13:11:19 danijoo, JsonObject != JSONObject Apr 09 13:11:41 everything in gson of course Apr 09 13:12:10 How do I deserialise it to a JsonObject in Gson then? Apr 09 13:12:36 JsonParser#parse(string) Apr 09 13:12:53 danijoo, will new JsonObject().getAsJsonObject(body);do? Apr 09 13:12:57 body is a String Apr 09 13:13:28 What's the difference between using the Parser and straigh doing it from the JsonObject instance? Apr 09 13:13:40 no. because new JsonObject() will give you an empty object. Apr 09 13:14:22 wait, you have a json string and want to extract an object out of that, right? Apr 09 13:14:26 or vice versa Apr 09 13:16:11 OK jakewharton is on stage at DroidCon Montreal. So I'm going to spam his bot. Okhttp butter butterknife square :D Apr 09 13:16:32 Let's see if he beeps :D Apr 09 13:17:13 he should change the title Apr 09 13:17:43 a "few" Apr 09 13:17:45 :D Apr 09 13:18:04 Nope no beep :D Apr 09 13:20:18 Wow, this Matt Ball is a total dick (see answer): http://stackoverflow.com/questions/5128442/how-to-convert-a-string-to-jsonobject-using-gson-library Apr 09 13:21:11 anyone been able to link adsense to google analytics account? Apr 09 13:21:29 isnt it supposed to work with android apps? Apr 09 13:22:01 Quacked, dont u just go to adsense and put your analytics account details in? Apr 09 13:22:03 and its done? Apr 09 13:23:12 There are no AdSense accounts associated with the Analytics login you're using. Make sure that you're using a Google Account (login or email address) that has Edit permission for the Analytics property andAdministrative access for the AdSense account. Alternatively, create a new AdSense account. If you are a premium AdSense user, please contact your AdSense account manager to add or remove links. Apr 09 13:23:49 in adsense settings I find the option admob account Apr 09 13:23:58 it pretty much tells you what to do, doesnt it Apr 09 13:24:04 and I set that to the same account as analytics Apr 09 13:24:17 but in analytics it still says that message I pasted Apr 09 13:25:05 it worked out of the box when i did it Apr 09 13:25:09 so no clue whats wrong :/ Apr 09 13:25:33 is it something I misunderstand? I want the revenue from admob to show in analytics Apr 09 13:25:40 I dont have my own ads Apr 09 13:25:53 I was able to link adwords (but I dont use it so its pointless) Apr 09 13:28:47 anyone here used Tinder app ? Apr 09 13:30:56 I only have one user and it has all rights like admin, edit, read and analyze Apr 09 13:30:57 danijoo, it's deserialising correctly now. But when I use "new Gson().fromJson(results, listType);" It crashes and reports a StackOverflow error but crashes when throwing that exception because the transaction "is too large" Apr 09 13:31:26 danijoo, have you enabled user-id function in analytics? Apr 09 13:32:30 and accept the data protection directive? Apr 09 13:33:26 How can I make selector with ripple effect? Apr 09 13:43:56 Quacked, i dont know Apr 09 13:44:29 SneakerXZ, by putting it together in an xml Apr 09 13:44:46 danijoo: Do you have an example? Apr 09 13:45:32 i have an inline example for you: .... Apr 09 13:45:46 yeah this https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html Apr 09 13:49:21 nice, how to make it back compatible? Create a two selectors and set them in styles depending on platform? Apr 09 13:50:14 returning to the unexplained destroyed service Apr 09 13:54:22 SneakerXZ, yes Apr 09 13:54:35 drawable-v21 for the ripple Apr 09 13:54:40 danijoo: Perfect, thank you. Easier than I thought. Apr 09 13:57:13 Hello Apr 09 13:57:57 I've appended text to a textview Apr 09 13:58:49 if I get the current text of the textview, it's updated Apr 09 13:59:10 How can I update the textview also in the app activity? Apr 09 13:59:15 Any ideas? Apr 09 14:03:40 cristian_c: Where were you updating it originally? Apr 09 14:03:48 hey anyone familiar with the Comparator, I am trying to figure out how to use two sorts together Apr 09 14:04:02 this is what I have tried but the results are not turning out they way I want it to http://pastebin.com/9kpCUZKw Apr 09 14:04:16 I need it to sort by points then by time Apr 09 14:04:46 theblang, in a separate java file Apr 09 14:05:30 theblang, but the text is correctly updated if I use .getText().toString()) Apr 09 14:05:50 theblang, in logcat , via Log.e Apr 09 14:06:02 cristian_c: Yeah, so what is wrong with updating it like that? Apr 09 14:06:18 theblang, I don't see the text in the activity Apr 09 14:06:43 cristian_c: after calling setText with the new text? Apr 09 14:07:18 http://stackoverflow.com/questions/29540836/how-to-use-comparator-twice-in-a-row Apr 09 14:07:18 theblang, I think it's not updated because at first the text is empty. Then, I populate with .append method Apr 09 14:07:35 theblang, I don't use settext, but append Apr 09 14:08:28 hi Apr 09 14:08:33 Lonesoldier728, you cant nest comparators. Apr 09 14:08:55 cristian_c: try setText and see if it works Apr 09 14:08:56 Well I tried to even call the one nested inside first then the second one Apr 09 14:09:03 and it still does the same results danijoo Apr 09 14:09:08 it doesnt matter Apr 09 14:09:12 you cant nest. Apr 09 14:09:25 theblang, what argument have I to use with SetText? Apr 09 14:09:40 ahh, a test Apr 09 14:10:13 https://github.com/xpheres/AndroidAnalyticalTranslator/blob/master/app/src/main/java/com/example/root/analyticaltranslator/MainActivity.java Apr 09 14:10:22 I'm trying to manage to use volley to get a json object Apr 09 14:10:37 Lonesoldier728, try this: http://pastebin.com/Vrfdk6ey Apr 09 14:10:42 theblang, if I use settext, then have I to do something else to update to show the updated text in the activity^ Apr 09 14:10:44 *? Apr 09 14:12:44 danijoo that looks promising Apr 09 14:13:53 oh well. no it doesnt Apr 09 14:14:11 hey Apr 09 14:14:22 or does it work? Apr 09 14:14:25 gnome 3.16 isn't looking to bad Apr 09 14:15:27 cristian_c: No, just call setText on the EditText that you got an object handle to Apr 09 14:15:56 lemonxah, yeah looks promisiong Apr 09 14:16:00 promising Apr 09 14:16:23 been using plasma5 for a while and then decided to give it a go Apr 09 14:16:26 and its not bad Apr 09 14:16:31 wanna install cinnamon2 later today Apr 09 14:16:40 theblang, have I to convert the textview to an edittext? Apr 09 14:16:46 i just reinstalled ubuntu gnome on a laptop yesterday after not using linux since half a year Apr 09 14:16:53 *not using linux on desktop Apr 09 14:17:29 Any of you at DroidCon? Apr 09 14:17:39 cristian_c: What do you mean. You can call setText on TextView, if that is what it is. EditText just inherits from TextView and has additional functionality for allowing the user to change text through the UI. You don't need an EditText to change text programatically Apr 09 14:19:10 theblang, no, I change text via code, not via ui :) Apr 09 14:19:51 theblang, at this moment, textview contains a log visible from the user Apr 09 14:20:14 activity contains a button and a textview , at the moment Apr 09 14:22:01 theblang, instead, does the append method require additional steps to show the updated text in the activity? Apr 09 14:28:23 does anyone has experience with volley? Apr 09 14:28:31 I want to make a json request to a website Apr 09 14:28:41 https://github.com/xpheres/AndroidAnalyticalTranslator/blob/master/app/src/main/java/com/example/root/analyticaltranslator/MainActivity.java Apr 09 14:29:13 so who's at Droidcon? :D Apr 09 14:29:28 Jake is :P Apr 09 14:29:31 I saw JakeWharton in the flesh!! Although blurry because he was too far Apr 09 14:30:11 xpheres, this url is a 404 Apr 09 14:30:25 what is 404? Apr 09 14:30:29 danijoo works here Apr 09 14:31:29 Afzal, talking about the url he tries to fetch with volley Apr 09 14:31:36 oh lol Apr 09 14:31:40 I thought the github url Apr 09 14:31:50 xpheres, this is 404: http://prntscr.com/6rlqph Apr 09 14:32:10 let me check Apr 09 14:32:29 ok Apr 09 14:32:32 there is a mistake Apr 09 14:32:34 xpheres you should try http instead of https Apr 09 14:32:39 it is not https but http Apr 09 14:32:42 with http it works Apr 09 14:32:43 :) Apr 09 14:32:51 I'm going to correct it right now Apr 09 14:33:37 Hi guys, do you know a way to put a Collection into a bundle to be accessable in a Fragment? Apr 09 14:33:49 thanks Apr 09 14:33:53 I didn't realized Apr 09 14:34:09 you didnt realized because you commented out the error code ;) Apr 09 14:34:19 for testing, put a throw new RuntimeException in it Apr 09 14:34:30 I really want to stick to the recommended way to implement data exchange from activity to fragment Apr 09 14:35:12 ok Apr 09 14:36:10 cydmax, make the objects of the collection implement serializeable Apr 09 14:37:07 then you can use bundle.setSerializeable() Apr 09 14:39:56 ok Apr 09 14:40:38 I need to send a string taken from the editbox of the android app to the php website and obtain the return and print it in the edit box below Apr 09 14:41:38 something like this: https://github.com/xpheres/analyticaltranslator/blob/master/assets/javascript/atranslator.js Apr 09 14:41:51 danijoo I've already done that for a single object. But if I want to putSerializable(key_string, Collection), the debugger says it can apply it... hmmm Apr 09 14:42:20 ehh putSerializable(key_string, Collection) Apr 09 14:42:26 cydmax: You need to make the Object in Collection also serializable Apr 09 14:42:40 s/Object/Class/ Apr 09 14:43:25 the Class definition of the Object it implements serializable Apr 09 14:43:37 hmm ok let me double check Apr 09 14:43:40 yeah. collection implements serializeable, but also each object in the collection must implement it Apr 09 14:43:49 ohh ok Apr 09 14:43:55 so I'm missing the Collection Apr 09 14:44:20 oh well. Apr 09 14:44:27 what kind of collection? Apr 09 14:44:34 not all of them are serializeable afaik Apr 09 14:44:47 and this is the function that take the string and sent the response to the json: https://github.com/xpheres/analyticaltranslator/blob/master/website/php/translatorfunction.php Apr 09 14:45:00 java.util.Collection ;-) Apr 09 14:45:16 thats only an interface Apr 09 14:45:20 I was thinking about extending it in a custom class like mCollection Apr 09 14:45:20 not a class Apr 09 14:45:22 ah ok Apr 09 14:45:31 why dont u use list, hash or whatever? Apr 09 14:46:12 ok I'll try that Apr 09 14:46:16 should I put in the place of "null" parameter the string I want to send to the php function? Apr 09 14:46:53 how do I pass the context of an edit box as a parameter to call the function? Apr 09 14:46:58 xpheres: Sounds like your question is about a backend, not about android Apr 09 14:46:59 content Apr 09 14:47:04 yiati Apr 09 14:47:09 xpheres: and php Apr 09 14:47:12 I need to pass a string as a parameter from android Apr 09 14:47:27 the php function is already working, I don't need to ask anything about it Apr 09 14:47:32 xpheres, you are sending a GET request, and your php looks for a POST parameter Apr 09 14:47:37 I just want to ask how do I send the query to the function Apr 09 14:47:42 ah right Apr 09 14:47:44 can you spot whats wrong on that? ) Apr 09 14:47:57 right, then I have to send a post request Apr 09 14:48:00 xpheres: You need an http client, google about it Apr 09 14:48:03 good reading Apr 09 14:48:24 I think I can do the post request with volley, isn' t it? Apr 09 14:48:42 volley works, or retrofit+okhttp Apr 09 14:48:49 right Apr 09 14:49:10 and you dont add any string to your request Apr 09 14:49:25 so how should the server receive something Apr 09 14:49:26 so I will change Request.Method.GET to Request.Method.POST Apr 09 14:49:38 yes danijoo, but I don't know where to put that string Apr 09 14:49:50 and how to get it from the editbox in the android frontend Apr 09 14:49:59 I know the id of the editbox Apr 09 14:50:00 xpheres, read the documentation Apr 09 14:50:02 ok Apr 09 14:51:34 I guess is like this: http://stackoverflow.com/questions/4531396/get-value-of-a-edit-text-field Apr 09 14:51:58 try it Apr 09 14:52:00 xpheres: You could just reference the api, http://developer.android.com/reference/android/widget/EditText.html Apr 09 14:52:09 danijoo does not seem like it is working i am seeing the order of points being off someone with 13 points before 20 and then with 15pts after 20 Apr 09 14:52:25 ah right gettext Apr 09 14:53:58 one day, ill write a tutorial on how to google for javadocs Apr 09 14:54:27 nvm Apr 09 14:54:30 different issue Apr 09 14:56:33 speaking of javadocs, javadocs.io is awesome Apr 09 14:58:54 pfn: javadoc.io? javadocs.io doesn't seem to exist Apr 09 14:58:55 danijoo thanks for tips! java.util.Collection can be casted to a ArrayList easily... I'm using a library to ease up SQLite access and it gives me back a Collection... Apr 09 14:59:03 yiati, probably Apr 09 14:59:07 ok at least I changed the https https://github.com/xpheres/AndroidAnalyticalTranslator/blob/master/app/src/main/java/com/example/root/analyticaltranslator/MainActivity.java Apr 09 14:59:13 yiati, yeah, not javadocs, javadoc Apr 09 15:00:04 javadoc.io gives me error 522 Apr 09 15:00:06 :/ Apr 09 15:00:30 cloudflare hates me Apr 09 15:01:37 danijoo: pfn: have to use www in url for it to complete. www.javadoc.io Apr 09 15:01:52 It kind of reminds me of http://gradleplease.appspot.com/ Apr 09 15:02:00 yiati, yeah, except gradleplease is garbage :p Apr 09 15:02:22 yiati, it doesn't know what's canonical vs. alternative/forks Apr 09 15:03:20 pfn: Yeah it could definitely be worked on some, but it's functional, and there aren't great alternatives. javadoc.io which requires www was telling me that it has to warm up for ten minutes before it can finish my query Apr 09 15:03:41 wow. who configures javadoc.ios webserver Apr 09 15:03:54 http://javadoc.io/ does not redirect to http://www.javadoc.io/ Apr 09 15:04:13 pfn: It's a cool concept though Apr 09 15:05:23 yiati, well, it's either that or let you sit on a spinner while it downloads the jar and then redirects you Apr 09 15:05:32 yiati, probably something someone whipped up in a few minutes Apr 09 15:05:47 yiati, it doesn't actually take 10 minutes Apr 09 15:37:50 juste followed the training about syncadapter, but I got the exception : "E/AndroidRuntime( 2714): Caused by: java.lang.SecurityException: caller uid 10224 is different than the authenticator's uid" Apr 09 15:37:58 I googled it, but can't fix this Apr 09 15:44:31 blusky: did you try this http://stackoverflow.com/q/3774282/3508192 Apr 09 15:45:29 i am getting Apr 09 15:45:31 java.lang.ExceptionInInitializerError Apr 09 15:45:32 at org.jivesoftware.smack.SmackConfiguration.java.lang.String getVersion()(Unknown Source) Apr 09 15:45:52 with smack 4.1 in release build Apr 09 15:45:57 interesting, Toolbar#inflateMenu doesn't clear the previously inflated menu? Apr 09 15:46:40 Solarnum: already saw this, didn't help :/ Apr 09 15:50:41 i am getting java.lang.ExceptionInInitializerError at org.jivesoftware.smack.SmackConfiguration.java.lang.String getVersion()(Unknown Source) Apr 09 15:50:56 with smack 4.1 in release build Apr 09 15:59:32 anyone have any idea what this might be: Apr 09 15:59:40 libc﹕ @@@ ABORTING: INVALID HEAP ADDRESS IN dlfree Apr 09 15:59:40 a colon Apr 09 15:59:53 Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) Apr 09 16:00:12 I'm getting it sometimes while swiping between tabs in a ViewPager connected to a SlidingTabLayout Apr 09 16:02:04 MooGoo, is this your app, or some game? Apr 09 16:02:10 my app Apr 09 16:02:14 That is crashin? Apr 09 16:02:17 yes Apr 09 16:02:29 are you doing native coding? Apr 09 16:02:32 nope Apr 09 16:03:41 did you read the stackoverflow threads bout it? there seems to be quite a few reasons for that issue Apr 09 16:04:23 I read one, but it didn't help....it seemed more about closing Bluetooth sockets Apr 09 16:04:30 or some kind of threading sync problem Apr 09 16:05:05 what are you doing, just swiping, what code is running Apr 09 16:05:10 or just skeleton code? Apr 09 16:05:51 either swiping, or tapping on a tab title to automaticly move the ViewPager Apr 09 16:06:09 but is anything running, or do you just have a basic view pager with no logic? Apr 09 16:06:27 occasionaly it will hang in mid-swipe between the pages, then crash shortly after with no popup message Apr 09 16:06:41 what are the pages doing? Apr 09 16:06:42 there are other things running I guess Apr 09 16:07:02 each page has a list of CardViews with various functionality Apr 09 16:07:03 this is all just guess work without you pastebin' any code Apr 09 16:07:14 gotta narrow it down somehow Apr 09 16:07:16 I mean...it's a lot of code...and I have no idea where the problem starts Apr 09 16:07:37 is it random occurences, or pretty reproducable? Apr 09 16:08:06 it's happened twice so far, only when furiosly swiping through tabs over and over Apr 09 16:08:14 also, what version of android is it happening on, haven't you tried other versions or devices? Apr 09 16:08:27 yes....this is on ICS, and I have not experienced it on anything else yet Apr 09 16:10:22 if I have an array can I update the object at the index and set something to it like so, usersArray.get(index).setPoints(pts); Apr 09 16:10:34 there happened again Apr 09 16:10:36 will it update permanently within the array Apr 09 16:10:48 I love the memory address 0xdeadbaad, sounds ominous Apr 09 16:11:13 yes Apr 09 16:11:39 since you are just modifying an object Apr 09 16:12:58 MooGoo, i'd say start with turning your pages into just blank skeleton code that runs nothing extra, and try swiping and see if reproduces with no logic in the pages Apr 09 16:14:22 ok Apr 09 16:14:36 Lonesoldier728: Arrays and Lists contain references to objects. Saying "list.get(n).modify();" is no different, in terms of mutatabillity, from saying "someObject.modify();". Apr 09 16:14:53 (Well, references to objects if they don't contain primitives.) Apr 09 16:16:37 ok if it is an int field a primitive then it is a problem? Apr 09 16:16:43 not sure I understood that last part Apr 09 16:17:10 I mean "Arrays and Lists contain references to objects (or they contain primitives)". Was just a legal disclaimer. :D Apr 09 16:17:18 In the case you're talking about, they contain references to objects. Apr 09 16:21:29 iprime: Apr 09 16:22:45 johnny :D Apr 09 16:22:48 Lonesoldier728: Does that make sense? Apr 09 16:22:53 done with the app? Apr 09 16:24:08 iprime: same problem Apr 09 16:24:17 iprime: the alarm doesnt work Apr 09 16:24:41 ohh Apr 09 16:24:59 well, how about you put your code in some private repo Apr 09 16:25:05 oki Apr 09 16:25:09 Every time I re-deploy my app, notifications I dismissed re-appear. I checked my code and I'm not manually recreating the notifications. Is there some sort of notification state commit you need to do to make sure dismissed notifications stay dismissed? Apr 09 16:29:01 yeah thanks tacticaljoke Apr 09 16:29:37 A key point is that we only ever have references (pointers) to objects. So a List or array is just a bunch of references or pointers. Apr 09 16:30:31 back Apr 09 16:31:03 iprime: http://pastebin.com/Q3yE9QiG , i have no error the receiver receive nothing , Apr 09 16:31:09 i think it comes from there Apr 09 16:31:40 danijoo_: does periodic synctask need "synchronization" activated on the device ? Apr 09 16:32:21 Is there a way to tell Android studio to add extra parameters to it's ADB install command ? Apr 09 16:37:40 blusky, YES Apr 09 16:37:44 sry caps Apr 09 16:41:54 erf... Apr 09 16:42:06 any stats about how many users got it activated ? Apr 09 16:42:56 cause I think more than 50% disable it in order to save battery Apr 09 16:45:04 why would you think that Apr 09 16:45:26 pfnQ: seeing android's phone in my family / friends Apr 09 16:45:26 add phone home stats to your app Apr 09 16:45:34 don't pull numbers out of your ass Apr 09 16:45:50 Almost no one disables sync Apr 09 16:45:53 pfnQ: please ... don't be rude :) Apr 09 16:46:10 that's what I wanted to know Apr 09 16:46:19 (see, the "I think" ?) Apr 09 16:46:24 your the one pulling numbers out of your ass Apr 09 16:52:02 blusky, I doublt that, because without sync whatsapp, facebook, mail - they all wont work Apr 09 16:52:18 it works for me Apr 09 16:52:23 and it isn't activated Apr 09 16:52:31 GCM also work without sync activated Apr 09 16:53:02 hm. im not that much into it to be honest Apr 09 16:53:03 (for mail, i don't know) Apr 09 16:53:08 but i thought it woudnt work Apr 09 16:53:15 ok, gonna figure it out with statistic :) Apr 09 16:53:27 (if a lot of people let it activated) Apr 09 16:53:43 at least, it's working somehow :D Apr 09 16:53:46 and thx a lot for that :p Apr 09 16:54:03 yw Apr 09 16:54:35 if a lot of ppl turn it off, you can check for it on application start Apr 09 16:54:54 yup, I think I'll do that, adn fall back to GCM for those users Apr 09 16:54:55 and make a message ("feature xyz dont work without sync. Button: turn on sync" Apr 09 16:55:11 or I can do that :) Apr 09 16:57:16 What is wrong here? http://pastebin.com/ubKh3aSw Apr 09 16:58:11 noahmg123: missings default value Apr 09 16:58:26 in your error: " required: String,int"," found: String" Apr 09 16:58:34 try: mFuelLevel = intent.getIntExtra("FUEL_LEVEL",0); Apr 09 16:58:58 blusky: trying now Apr 09 16:59:22 what's your IDE ? Apr 09 17:00:20 blusky: it was actually online. It was for a tutorial. Apr 09 17:01:09 blusky: I didn't know it needed 2 paramaters. It actually wanted the default to be -1 so I did that and it worked. Apr 09 17:01:37 hi, I'm close to make my json query work but i need some help https://github.com/xpheres/AndroidAnalyticalTranslator/blob/master/app/src/main/java/com/example/root/analyticaltranslator/MainActivity.java Apr 09 17:01:37 ok Apr 09 17:01:55 blusky: tank you Apr 09 17:01:59 thank* Apr 09 17:02:06 np:) Apr 09 17:21:01 Sending an intent throught the LocalBroadcastManager simply with "new Intent(MY_ACTION)" is being received properly, but sending the same intent with "new Intent(MY_ACTION, uri)" is not being received Apr 09 17:21:53 is there something extra I need to do to register when expecting the data field to be populated in the intent Apr 09 17:22:04 Hey, is there a way to limit the length of a TextView by number of words, rather than characters? Apr 09 17:23:59 s73v3r: No, but you could write a helper method to take an input string, and pump out a valid string for your requirements Apr 09 17:24:30 I am having trouble using Choice member variables Apr 09 17:25:30 do you have other choice Apr 09 17:26:01 Sculptor: no I don't have another choice. JK let me check :) Apr 09 17:26:37 I have ChoiceFormat Apr 09 17:28:26 blusky: I am having trouble using Choice member variables Apr 09 17:28:50 dunno what it is, just ask here, and wait for answer :) Apr 09 17:30:15 Does anyone know why this ImageView's height and width that are wrap_content isn't perfect? https://i.imgur.com/a63s3M9.png Apr 09 17:30:17 You need to ask a specific question, noahmg123. "I'm having trouble with X" doesn't get answers. Apr 09 17:30:29 This doesn't make it center perfectly. Apr 09 17:30:49 I don't quite understand what my options are for the dataType field in the IntentFilter constructor "IntentFilter(String action, String dataType)" http://developer.android.com/reference/android/content/IntentFilter.html#IntentFilter(java.lang.String, java.lang.String) Apr 09 17:31:25 TacticalJoke: I am getting the error Cannot resolve symbol Choice when trying to create a memeber variable. Apr 09 17:32:15 I am getting the error Cannot resolve symbol Choice when trying to create a memeber variable. Apr 09 17:32:25 yo yo yo Apr 09 17:32:39 noahmg123: http://pastebin.com/ Apr 09 17:33:15 or some better pastebin, which is almost any. :P Apr 09 17:34:01 TacticalJoke: http://pastebin.com/jvATuKWZ Apr 09 17:34:29 Okay so registering my LocalBroadcastManager definitely seems like not having the dataType set is why I can't get notified once I add data to the send(intent), now to figure out what valid dataTypes are Apr 09 17:34:32 I've never heard of Choice. What is it? Apr 09 17:35:25 TacticalJoke: Not sure. I am just following allong in a tutorial. Apr 09 17:35:35 Can you link to the tutorial? Apr 09 17:36:01 TacticalJoke: I'm pretty sure it requires a paid account. Apr 09 17:37:15 I'm guessing Choice is a class they define. Though who knows. Apr 09 17:37:47 TacticalJoke: this is the first time I've seen it in the tutorial Apr 09 17:39:20 TacticalJoke: The guy in the tutorial is using Android Studio 0.8.9 and I am using v1.1.0 so maybe v0.8.9 was a little lax. Apr 09 17:40:10 TacticalJoke: i.e. wouldn't throw up an error. Apr 09 17:40:13 I doubt it. We're using a statically typed language; stuff has to be defined. Apr 09 17:41:13 TacticalJoke: Apparently I zoned out for a few secons and missed the part where he set up the Choice class :P Apr 09 17:41:27 It is in the video, but I missed it Apr 09 17:41:48 ugh, why is googleapiclient.blockingConnect returning ConnectionResult.CANCELED Apr 09 17:46:10 Why would the layout editor not be showing text set with the tools:text attribute? Apr 09 17:46:45 nevermind. it’s because the namespace was declared twice Apr 09 17:47:06 anyone got a good example of how to use tools xml attribute? Apr 09 17:47:11 never quite understood how to use that Apr 09 17:48:21 You ever put placeholder text in your layout so you can see how things will look when populated? Apr 09 17:48:43 sure Apr 09 17:48:59 but that works w/o defining tools Apr 09 17:49:24 instead of putting that in the regular Text place, you simply put it in the tools:text place. This way, there’s no way you could forget to take it out Apr 09 17:49:35 damnit! lost 50 bounty on so for not posting simple code on how to start a service! even tho i answered the solution correctly Apr 09 17:50:04 s73v3r: do you have an xml i could look at? i don't quite follow how to make that happens ince i have never udnerstood how to use it Apr 09 17:50:07 there have been a few times where I had some placeholder text put in a spot that could be blank, and forgot to remove it for release Apr 09 17:50:30 you declare the tools namespace: xmlns:tools="http://schemas.android.com/tools" Apr 09 17:50:52 and then in a view, set tools:text="My Queue" Apr 09 17:51:06 oh, then it doens't stick around when inflaing the view later Apr 09 17:51:10 ? Apr 09 17:51:18 you can put tools: in front of almost any attribute Apr 09 17:51:19 yes Apr 09 17:51:24 cool Apr 09 17:51:25 thanks Apr 09 17:51:27 http://tools.android.com/tech-docs/tools-attributes Apr 09 17:51:47 there’s a few other things in it, for different annotations Apr 09 17:52:58 can I link analytics and adsense (admob data) without creating the adsense account under "My ads" at https://www.google.com/adsense/app#main/adMob/ ? Apr 09 17:53:23 analytics just says "There are no AdSense accounts associated with ..." Apr 09 17:53:53 I think I have an adsense account just because I initially signed up for admob and it was moved or something Apr 09 17:54:23 What data type do I need to list in an IntentFilter in order for an Intent with a URI data field to match it? Apr 09 18:00:05 Finally got it by adding data schemes "http" and "https" to the intent filter. Does seem it's necessary Apr 09 18:02:52 is it perhaps not possible to see admob revenue in analytics? Apr 09 18:05:02 new AS beta Apr 09 18:05:33 I still need to convert from Eclipse Apr 09 18:06:15 "to move resource files from source folders into src/main/resources such that they are" Arghhhh. Keep seeing that lately. Apr 09 18:06:17 Should be "so that". Apr 09 18:06:27 g00s, 1.2 or newer? Apr 09 18:06:33 "So move files", not "such move files". Apr 09 18:06:49 iprime: http://tools.android.com/recent/androidstudio12beta2available Apr 09 18:07:04 ohh beta 2 Apr 09 18:07:32 not available for me yet Apr 09 18:08:00 "Fixed "Import Settings" bug which prevented settings from 1.0/1.1 to be imported into 1.2 on Windows and Linux " Apr 09 18:08:04 awesome:) Apr 09 18:11:39 ahhhhh Apr 09 18:11:39 I'm being lazy and waiting till the RC. :D Apr 09 18:11:56 so drawRect does not actually draw on the end coordinate Apr 09 18:12:22 i was using canvas.drawRect(10,200,200,300,paint); and canvas.drawRect(201,200,333,300,paint); and wondering why there was a 1 px gap Apr 09 18:12:44 i need to always add 1 to the end coord Apr 09 18:13:36 so to make coodinates 10,200,200,300 filled, i must use canvas.drawRect(10,200,201,301,paint); Apr 09 18:13:36 Hey is there a way to determine if there is a viewpropertyanimator associated with a view? Apr 09 18:13:45 njcomsec, are you talking about fill, or fill and stroke and such Apr 09 18:14:15 im using canvas.drawRect to make a checkerboard(i have the cell/row coords in 2d arrays) Apr 09 18:14:24 i fixed it now Apr 09 18:21:34 I have some trouble getting started with ContentProviders. I've followed a course where CP is used with a SQLite database, and that makes sense, but now I want to write my own... and I'm stuck. The data set is a set of files on the phone -- specifically, images/photos. Apr 09 18:24:03 the problem is getting started. When the CP was towards a database/SQL, everything made sense; the contract, the query functions etc. But how does this all work when the dataset is a bunch of files? What I want to get from the CP, to my activity, is the following fields: FILENAME, DATE_CREATED, IMAGEDATA (i.e. the image itself) etc Apr 09 18:25:38 How do you loop ViewPropertyAnimator? Anyone? Apr 09 18:26:04 Btw, I'm doing the Udacity course on Android Apps, where we were guided through a weather forecast app called Sunshine. This downloaded data from OpenWeather (JSON), inserted it in WEATHER and LOCATION tables (SQLite), and then had a "WeatherProvider" to handle that IO. Apr 09 18:27:30 man, those birds staring at me again through the window Apr 09 18:27:58 g00s: they want revenge! Apr 09 18:29:38 Wasn't there a Stephen King novel about that? Apr 09 18:30:07 Revenge of the Birds Apr 09 18:30:36 I saw the movie when I was 8 years old, it terrified me Apr 09 18:31:45 I thought it was Hitchcock Apr 09 18:34:17 “The birds” is Hitchcock, the Stephen King one with the crows is “The Dark Half" Apr 09 18:35:32 oh ok it was "The Birds" , I mixed it up with "Revenge of the Nerds" Apr 09 18:40:42 shmooz lol Apr 09 18:44:05 ugh, this is so dumb, wtf google, play services blockingConnect vs. connect is broken Apr 09 18:44:17 connect returns connectionresult=sign_in_required, blockingconnect returns canceled Apr 09 19:17:19 anyone know of a reason not to leave WebView.setWebContentsDebuggingEnabled on in production? Apr 09 19:17:39 * g00s_ avoiding play services as much as possible Apr 09 19:20:44 Alright 50 bounty points going to be mine! Apr 09 19:20:55 MikeWallaceDev also presented! Apr 09 19:21:02 are those videos up yet? Apr 09 19:22:22 dunno Apr 09 19:22:39 Videos or it didn't happen. :D Apr 09 19:25:42 -dev Apr 09 19:29:30 hi Apr 09 19:29:37 anyone could help me finish my json request? Apr 09 19:29:58 anyone want to see how you can do persistent animations in a gridview (or any base adapter)? http://pastebin.com/GmA1XHG1 Apr 09 19:30:04 https://github.com/xpheres/AndroidAnalyticalTranslator/blob/master/app/src/main/java/com/example/root/analyticaltranslator/MainActivity.java Apr 09 19:52:49 Hi!, why following this guide: https://developer.android.com/guide/topics/ui/layout/listview.html cursor from ContactProvider give me 1 result but twice, (getCount() == 2) where Contact app only have one entry ??????? Apr 09 19:57:46 Does anyone know why this ImageView's height and width that are wrap_content isn't perfect? https://i.imgur.com/a63s3M9.png Apr 09 19:57:48 this is the result: http://picpaste.com/listviewexample-VN6WJHPL.png Apr 09 19:58:45 feathersanddown, please post the full code that you have right now. Apr 09 19:59:05 Use something like hastebin.com Apr 09 20:01:21 http://pastebin.com/i3CjZC6S Apr 09 20:02:20 inside onLoadFinished() method, second parameter Cursor data have 2 values Apr 09 20:06:14 I have 52 card low res images, and at most, only 18 of them are displayed on the screen. is it better to just load them all to memory or should I implement some form of caching? Apr 09 20:06:40 http://picpaste.com/listviewexample1-gteD3uK0.png <--- debug Apr 09 20:06:44 i'm using canvas Apr 09 20:06:47 hmm. someone's making a card game :D Apr 09 20:07:04 yeah lol Apr 09 20:07:25 pfn_ did you mention or was that groxx Apr 09 20:09:08 paulo_, Facebook recently released a library for images I thought. Google something like that, it handles all of the memory. Apr 09 20:10:24 paulo_: How much memory do they actually take up? You could test using Bitmap.getByteCount/Bitmap.getAllocationCount. Apr 09 20:10:39 getAllocationByteCount* Apr 09 20:12:00 how many pixels on canvas can be drawn in the time it takes to load for example a 50x50px png? Apr 09 20:13:11 for instance, if a game has very basic graphics(2d) is it worth trying to draw as much as possible in cavnas instead of loading bitmaps? to improve performance Apr 09 20:13:36 njcomsec: You’d need to measure it to be sure Apr 09 20:14:14 if you don’t see issues when using bitmaps, then they’re probably good enough Apr 09 20:14:50 yeh thats true. i guess it also keeps the install size down too using canvas Apr 09 20:22:14 g00s_, I mentioned how it's kind of annoying to have to declare it, yes Apr 09 20:22:23 at the same time, manifest merging should take care of that... Apr 09 20:22:27 * pfn_ shrugs Apr 09 20:22:42 pfn_ do you know what that entry means ? Apr 09 20:22:54 groxx had a pretty good guess which I think is about right Apr 09 20:23:45 apparently its the minimum version of play services your app supports. so you can set it to the one you are using, but many probably go a version or two back to be more relaxed Apr 09 20:24:17 i haven't seen the notification pop up though, which is supposed to happen if the app needs a newer one on install time Apr 09 20:26:02 it happens when you initialize googleapiclient Apr 09 20:26:04 not at install time Apr 09 20:27:37 how to I get list of all resources under the drawable folder? Apr 09 20:29:46 if there isnt an official function you could just make your own array i suppose, since you know the content of the list if you added the images yourelf Apr 09 20:30:12 but then you would have to update it whenever you add an image Apr 09 20:37:16 whats a cool database library? Something relatively straight forward to setup, doesn't need to be cutting edge performance. Apr 09 20:38:22 isnt sqlite enough? Apr 09 20:38:55 Lots of overhead, i want to get something together for a proof of concept. Apr 09 20:46:37 quinnjn: http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html Apr 09 20:58:11 hi all Apr 09 20:58:29 do you know how can i compile https://github.com/rovo89/Xposed ? Apr 09 20:58:45 it requires some system library Apr 09 20:58:47 libbinder Apr 09 20:58:49 for exampe Apr 09 21:12:12 #android-root maybe? Apr 09 21:12:57 Hi Apr 09 21:13:27 What is the best way to store API KEYS? With highest security. Apr 09 21:16:19 iraycd, dexguard Apr 09 21:16:49 on the server :D Apr 09 21:16:59 never touching the device Apr 09 21:17:07 I have all my keys always in the pocket Apr 09 21:17:11 hi Apr 09 21:17:20 That single word is amazing to listen. But when I am a provider. I can't except my client to store it in a secured way. Apr 09 21:18:13 JesusFreke, on the server? so anyone can grab? Apr 09 21:18:51 yes, of course I meant publicly accessible on the server. because that's completely secure :p Apr 09 21:18:55 JesusFreke: I am developing an Android plugin. For a SaaS application called picpil.com Apr 09 21:19:10 I need to give API keys to the client. Apr 09 21:19:31 iraycd, fix CSS please Apr 09 21:19:37 Hahaha. Apr 09 21:19:52 http://demo.picpil.com/ Apr 09 21:20:15 So, I am giving picture rendering as a mobile solution. Apr 09 21:20:48 So, the client can upload images from the mobile. Apr 09 21:21:23 AWS, I don't know. For a reverse engineer, it's so easy to get the KEYs. Apr 09 21:21:46 gdrc: I will change the CSS for sure. Apr 09 21:23:14 gdrc: Is there an method which I can implement from the client side. Apr 09 21:34:26 iraycd: have a look at AccountManager Apr 09 21:34:28 hey all.. I’m having a slight issue with a parcelable.. when I case back to my custom object one of my int values is getting reset to 0.. everything else is fine Apr 09 21:35:05 I am dest.writeInt(int) and in.readInt() Apr 09 21:35:15 cast* back Apr 09 21:36:31 no error that it is unable to marshal it.. it’s just 0 Apr 09 21:36:34 oooh.. Apr 09 21:36:37 hmm.. no Apr 09 21:38:35 icedp: How can I convince everyone to use that. How is Google or Facebook solving this problem? Apr 09 21:39:59 iraycd: do you use Google and Facebook on your Android phone? Apr 09 21:42:47 android's entry point is virtually free Apr 09 21:43:03 icedp: I am building SaaS application. I give keys to Android phone, so looking for a method of API usage on android. Apr 09 21:43:48 iraycd: in Settings -> Accounts I see Facebook, Google, Skype, Twitter, Dropbox, Firefox and other stuff Apr 09 21:43:58 iraycd: so it's used Apr 09 21:44:37 icedp: But do I need to popup any dialog or do I need any special permission? Apr 09 21:45:03 iraycd: no, yes, but permission is not scary Apr 09 21:45:37 icedp: If you don't mind is there any sample code? Apr 09 21:45:52 why haven't my stats been updated for 4 days? it says at the bottom that they get updated daily Apr 09 21:50:20 icedp: How does GCM API Keys work? Apr 09 21:51:47 iraycd: That's a very broad question Apr 09 21:52:06 iraycd: I'm not sure on tutorial. Just search on AccounManager / AbsractAccountAuthenticator maybe Apr 09 21:52:20 Hey, any idea how I can get "waiting for service media.audio_flinger..." to stop delaying the umount of /data? Apr 09 21:52:38 yiati: But, I have been waiting to know the process since a long long time. No one is able to answer that. Apr 09 21:52:53 I'm trying to encrypt my phone and it just sits.... spewing messages about audio_fling Apr 09 21:53:08 iraycd: What does that have to do with it being a broad question Apr 09 21:53:34 iraycd: Have you read how GCM API Keys work? Apr 09 21:53:39 yiati: I just wanted to know how they know match SHA-1 fingerprint. Apr 09 21:53:54 There you go now you have a good question Apr 09 21:54:42 yiati: So, do you have the answer? I am very excited. Apr 09 21:57:16 iraycd: http://stackoverflow.com/questions/21377251/google-cloud-messaging-how-to-use-sha1-certificate Apr 09 21:58:28 yiati: I know how it works. Apr 09 21:59:01 yiati: I want to know how does google matchs it. Apr 09 21:59:19 getString unmarshalling unknown type code :( Apr 09 22:01:25 g00s_: in the same thread you can see it didn't work for someone else, as it didn't for us Apr 09 22:02:07 Is it possible to set elevation for a row in a list view in Android 5? Apr 09 22:05:27 wooooah Apr 09 22:05:41 Parcelable is messing up my data.. Apr 09 22:05:45 tralamazza yeah, i see that now too :( Apr 09 22:05:51 in.readint should produce 6.. it’s producing 166 Apr 09 22:05:59 nowhere in my code is anything == 166 Apr 09 22:06:27 tricknology: sounds like you're unmarshaling it wrong :) Apr 09 22:06:49 Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@428487e0: Unmarshalling unknown type code 755004019 at offset 308 Apr 09 22:06:53 make sure you're doing everything in the correct order, and reading the correct types, etc. Apr 09 22:06:58 I sure am Apr 09 22:07:11 oh snap Apr 09 22:07:13 nope Apr 09 22:07:16 :) Apr 09 22:07:18 changed order for debug.. Apr 09 22:07:18 thanks Apr 09 22:07:45 wanted to see the value of the last item in the method.. swapped places with the 2nd to last.. bing broken Apr 09 22:07:49 1000 thanks Apr 09 22:08:06 I wouldn’t have looked there yet since I was so meticulous about arranging them correctly Apr 09 22:40:55 Where in my app should the code in this tutorial go? http://developer.android.com/google/play/billing/billing_integrate.html Apr 09 22:43:06 I'm implementing a remove ads in app purchase so every activity is going to need to check if the user has removed ads Apr 09 22:49:30 duncannz, if you need some code ran in all of your activities you should throw it into a BaseActivity https://tausiq.wordpress.com/2013/01/18/android-base-activity-class-example/ Apr 09 22:51:16 thanks Apr 09 22:51:40 is there a method to go from DP to Pixels? Stuff like the GridView takes Pixels as the unit for spacing in between columns Apr 09 22:52:43 s73v3r: dp * dpi / 160 Apr 09 22:52:48 s73v3r: float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics()); Apr 09 22:52:49 s73v3r: getResources().getDisplayMetrics().density * pixels Apr 09 22:53:06 ok three different answers Apr 09 22:53:06 yeah, or TypedValue is probably the "right" way, since you can specify dips / sips / etcs Apr 09 22:53:19 agree, listen to duncannz Apr 09 22:54:02 When someone buys a paid app in the Google Play store, does the dev get credited instantly? or how often does Google pay out? Apr 09 22:54:19 thanks Apr 09 22:54:21 liuwenhao: it goes into your google wallet merchant account Apr 09 22:54:51 Is it instant? or is there a delay? Apr 09 22:55:48 I'd imagine at least 15 minutes, since you can un-purchase apps within that window Apr 09 22:56:07 beyond that, not sure. Apr 09 22:57:26 so with that BaseActivity thing, would I want to extend ActionBarActivity or Activity? that article says Activity but is it out of date or right? Apr 09 22:58:22 duncannz: ActionBarActivity is from support lib. So if you use support Apr 09 22:58:30 yeah I do Apr 09 22:58:39 ok thanks Apr 09 23:14:40 Certainly quiet in here tonight! Apr 09 23:18:10 Out of curiosity, how many of you only use a single screen for development? i was dual-screening but my second monitor died Apr 09 23:18:59 hmm, I have a single 34" Apr 09 23:19:55 One of the ultra-wide ones? Apr 09 23:20:01 yeah the L Apr 09 23:20:02 LG Apr 09 23:20:23 i'm stuck with a 17" 4:3 monitor for the time being Apr 09 23:20:25 it's painful Apr 09 23:21:55 34"? Nice Apr 09 23:22:04 My second died, so Im borrowing one from the missus Apr 09 23:22:11 27inch, next to her 20 inch Apr 09 23:25:22 Mavrik: how's the ultra-wide? I'm debating making that kind my next work-screen. Apr 09 23:25:42 I really like it Apr 09 23:25:51 I would prefer maybe a bit more of the resolution Apr 09 23:26:00 and the volume control doesn't work on OS X Apr 09 23:26:26 but otherwise it's alot of space (2-3 editor windows) and the price is very reasonable Apr 09 23:26:32 maybe consider the curved version Apr 09 23:26:34 "a bit more of the resolution" -> higher pixel density? Apr 09 23:26:54 yeah, curved for a big wide work-display makes sense. TV? hells no. Apr 09 23:27:11 yeah a bit more density Apr 09 23:27:32 as for curved - it's funny that the upper corners seem a bit "far" Apr 09 23:27:35 <3 high density screens. ehm.. Calendar.setTimeInMillis() throws me an NPE even that on the line I've written, no variables are null. Apr 09 23:27:46 hence the curved would make more time Apr 09 23:27:57 saapas, full stack trace on pastebin plz? :) Apr 09 23:29:43 Mavrik, http://pastebin.com/3c9ss29X Apr 09 23:31:00 "Cannot evaluate java.util.GregorianCalendar.toString()" Apr 09 23:33:33 works fine in the first instance of SessionCollection.. Apr 09 23:34:25 Hey there Apr 09 23:34:30 saapas: The Calendar instance is null? Apr 09 23:34:48 I'm looking to migrate and existing couple of activities in Android Studio into a tabbed layout Apr 09 23:35:09 Is there a tutorial that still works in API level 15? Apr 09 23:35:10 f-cking so people should have been my bounty! Apr 09 23:35:14 Oh, never mind; just read all the stack trace. Apr 09 23:35:15 TacticalJoke, nope, I've checked it every time. I get the instance just before the NPE line Apr 09 23:35:22 Everywhere else I see, half the stuff is deprecated Apr 09 23:37:32 eeeeee.......whaat. now it works, and I did no changes. Apr 09 23:38:10 saapas: interesting. not sure what's happening there. could the calendar be in a weird state or something (like only partially initialized (is that possible?)) Apr 09 23:38:24 TechGeek01: what in particular is deprecated? Apr 09 23:38:45 groxx, I'm not an expert on the Calendar, but so far it has been quite simple to use Apr 09 23:38:54 *easy Apr 09 23:39:08 yeah, i would certainly expect setTimeInMillis to be a "safe" thing to do Apr 09 23:40:38 icedp: ActionBar.setNavigationMode(), ActionBar.newTab() Apr 09 23:41:00 And ActionBar.NAVIGATION_MODE_TABS Apr 09 23:41:08 saapas: going by the source for GregorianCalendar (which does not perfectly line up with your stack trace, alas), I'm guessing it's not getting a time zone. not sure why that would be though. Apr 09 23:41:30 saapas: http://androidxref.com/5.1.0_r1/xref/libcore/luni/src/main/java/java/util/GregorianCalendar.java#576 Apr 09 23:42:28 groxx, ha! I just introduced TimeZone into SessionCollection and Calendar in there also. :) Apr 09 23:43:02 maaaaaaaaaybe the emulator had the version of the app that did _not_ have the timezone setter called. Apr 09 23:46:38 TechGeek01: I use android.support.v4.ViewPager, android,support.v7.widget.Toolbar, com.astuetz.PagerSlidingTabStrip and FragmentPagerAdapter. Works on api >= 15 Apr 09 23:48:34 any recommendations for getting a date in a certain format and paying attention to the set timezone? Apr 09 23:52:12 Hi, I have a hopefully not too stupid question. I have ndk and can call stuff but there is a directory called $NDK_ROOT/sources/android/native_app_glue I want to call the functions in the .c in there. Apr 09 23:53:55 saapas: not sure exactly what you're after, but Date/Calendar classes are a pain to use IME. I've been meaning to give this library a go though: https://github.com/dlew/joda-time-android Apr 09 23:54:54 ¯\_(ツ)_/¯ I find Calendar usable. it's the "think properly about date/time in the first place" that's hard. Apr 09 23:55:14 maybe if I were doing a heck of a lot more math with it, but I've never needed to. Apr 09 23:55:35 im in an airport about to go on a plane for a few hours. I want to program but i wont have access to stack overflow. what do? Apr 09 23:56:13 DadFoundMy: download the sources + samples for the sdk? Apr 09 23:56:21 Just use the SDK in offline mode Apr 09 23:56:36 the sdk has all the docs? Apr 09 23:57:16 ah, looks like there's a separate "documentation for sdk". that has pretty much a clone of the docs site, though I don't remember how far it goes beyond the API documentation (e.g. dunno if it has the API guides / tutorials. maybe.) Apr 09 23:58:32 groxx: I think I know what you mean. Once you "get it" it's not too bad, but then I forget about, and next time I go to do something date related I'm like "So I need a Date class...no wait, that's deprecated. What's the Gregorian calendar again?" etc etc Apr 09 23:58:40 barbs, I think so too. well, I have a timestamp, and I need the date from it as a string. the formatter needs to understand that when timezone and DST is respected, the date might be on another day what it would be in UTC. Apr 09 23:59:18 atm I'm using the deprecated Date class, and you can specify how it interprets the string using DateFormat Apr 09 23:59:23 saapas: most of that is handled in e.g. SimpleDateFormat, though it's possible you'll need to tweak things for DST Apr 09 23:59:26 DST breaks everything. Apr 09 23:59:40 yyyyyyeap. thanks Apr 09 23:59:45 you make a string like "DD-MM-YYYY" or whatever. it can also interpret timezones if they're specified Apr 10 00:00:13 barbs, yes I have the format string. just a smart formatter is needed Apr 10 00:00:35 android.text.format.DateFormat.format() doesn't seem to be smart enough :) Apr 10 00:00:47 hmm i broke 200 downloads but im not really expanding more than that. i guess i need to advertise more than word of mouth :/ Apr 10 00:07:29 And, I'm spent. Presentation is done. I was in a panic all day. Adrenalin kept me going... Party tonight? Hell no. I've been in bed since 18.00 Apr 10 00:08:29 On the other hand Jakewharton was very cool and attended my presentation. Thanks for the support Jake! Apr 10 00:08:57 MikeWallaceDev: was there an android dev conference? Apr 10 00:09:21 Is there a video anywhere, MikeWallaceDev? Apr 10 00:09:30 Congrats, BTW. :) Apr 10 00:09:44 /alias MikeWallaceDev GeorgeWallaceDev Apr 10 00:09:49 :D Apr 10 00:09:54 I felt bad for Jake and Jesse, nobody went to their presentations. Nobody even flew in all the way from Japan to see them... Apr 10 00:10:15 Video was taken, it has to be edited Apr 10 00:10:19 Nobody went to theirs? Apr 10 00:10:29 So that will take a while. Apr 10 00:10:44 is this droidcon? Apr 10 00:10:54 EVERYBODY went to theirs!! :D Apr 10 00:11:04 Yes DroidCon Apr 10 00:11:10 oh cool Apr 10 00:11:23 what was your presentation on? Apr 10 00:11:34 My presentation was at the same time as Jessy's :-/ Apr 10 00:12:04 I talked about spannables Apr 10 00:12:12 Which are awesome Apr 10 00:12:31 was jake or jesse's about fragments :D ? Apr 10 00:12:52 (and yes, 8 people flew in from Japan just to see them...) Apr 10 00:13:24 I don't know! I was too concentrated on mine! :-D Apr 10 00:14:05 looks like this was his presentation https://speakerdeck.com/jakewharton/a-few-ok-libraries-droidcon-mtl-2015 Apr 10 00:14:16 I had many difficulties during the day, I was panicked. I think it will show in my talk Apr 10 00:14:43 Oh right! But I don't know Jesse's Apr 10 00:15:00 MikeWallaceDev: from my experience your voice will always sound shaky but in reality you sounded fine Apr 10 00:15:18 I had mic problems... Apr 10 00:15:20 I have to give a speech on net neutrality tomrorow and i still havent got a clue what im gong to say Apr 10 00:15:24 MikeWallaceDev: oh ouch Apr 10 00:15:26 But thanks :-D Apr 10 00:15:55 It kept falling off my ear Apr 10 00:16:06 So sound goes up and down Apr 10 00:16:38 Could someone help me recreate this design? http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7WFlXMWVNV0h2QW8/components_lists_keylines6.png I can't seem to find what typography (http://www.google.com/design/spec/style/typography.html#typography-standard-styles) that 'Today' title is using. Apr 10 00:17:07 I got to the venue and couldn't access my slides!! I was freaking out. No slides. No text. Apr 10 00:17:25 http://hanhuy-acra.appspot.com/reports/package/com.hanhuy.android.irc.lite/id/b3f6f7866b18cd0d32a418c1646f536eaaa12a34#report-5717424225648640 Apr 10 00:17:29 oops Apr 10 00:17:39 Muchoz, tried whatfontis.com yet? Apr 10 00:17:44 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.irc.lite/b3f6f7866b18cd0d32a418c1646f536eaaa12a34 Apr 10 00:17:49 I wonder what's a good way to solve that... hmm Apr 10 00:18:01 www.pornhub.com/girlsoftheweb Apr 10 00:18:06 Ooops Apr 10 00:18:06 saapas, it's from material design. It should be explained somewhere. Android is always using Roboto. Apr 10 00:18:09 MikeWallaceDev: LMAO Apr 10 00:18:24 :-D Apr 10 00:18:29 I need to know what style from Material design it's using. Apr 10 00:18:32 Muchoz: doesnt the google docs show exactly how to make it? Apr 10 00:18:45 DadFoundMy, it explains the list, not the headers. Apr 10 00:19:01 And I can't find it anywhere on that site. I've been looking for a solid hour now. Apr 10 00:19:21 Muchoz: what do you mean the headers? Apr 10 00:19:29 The 'Today' title. Apr 10 00:19:35 ohh Apr 10 00:19:48 It's not the default font? Apr 10 00:19:58 It is, but I need the style... Apr 10 00:20:11 also on the topic of that screen I cant be the only one who hates the color google says to choose for the action bottom Apr 10 00:20:20 It should be somewhere under TextAppearance.* Apr 10 00:21:15 DadFoundMy: Definitely not the only one. Apr 10 00:21:18 If I do 'MyActivity extends BaseActivity' and 'abstract class BaseActivity extends ActionBarActivity', how can I access the context from that BaseActivity? ButterKnife seems to fail when I call ButterKnife.inject(this) from BaseActivity, for example Apr 10 00:21:51 duncannz, all activities are contexts Apr 10 00:22:03 This.getappcontext() Apr 10 00:22:18 duncannz, show type hierarchy in android studio Apr 10 00:22:22 makes it kinda obvious Apr 10 00:22:53 ok so should I do getApplicationContext() instead of this when passing Contexts from the BaseActivity? Apr 10 00:23:06 duncannz, you can pass the activity itself. Apr 10 00:23:07 duncannz, never Apr 10 00:23:29 activity is-a context Apr 10 00:23:42 Never, what a wrong answer. Apr 10 00:23:45 duncannz: it's worth noting that you probably shouldn't use the activity as a context in the constructor - only after onCreate has been called. Apr 10 00:24:09 iirc :) Apr 10 00:24:14 JesusFreke, when do you have a constructor in an activity? Apr 10 00:24:17 And sometimes passing the Activity context can cause leaks Apr 10 00:24:19 MikeWallaceDev, good for you, you suggested the wrong answer to begin with Apr 10 00:24:43 I meant you saying "never" Apr 10 00:25:02 well ButterKnife.inject(this) in BaseActivity#onCreate does not work. Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference. So what should I do? Apr 10 00:25:03 Muchoz: private String blah = this.getPackageName(); Apr 10 00:25:17 that's effectively "in the constructor" Apr 10 00:25:23 duncannz, find where the null pointer occurs, duh Apr 10 00:25:34 null pointers are the easiest problem to fix Apr 10 00:25:51 Unless it's in platform code :) Apr 10 00:26:10 JesusFreke, I don't see why you would need that, but ok. Apr 10 00:26:13 well, usually it's null as a side-effect of some bad input on the user's part Apr 10 00:26:18 duncannz, http://android-developers.blogspot.be/2009/01/avoiding-memory-leaks.html Apr 10 00:26:25 Muchoz: not that specifically, but just field initialization in general Apr 10 00:26:59 anyway, as for memory leaks, any java developer worth their salt should be aware of when and how leaks occur Apr 10 00:27:09 advising against using activity context blindly is a far more severe mistake Apr 10 00:27:31 and as for leaking activities, even then, it still isn't absolutely end of the world bad Apr 10 00:27:52 pfn_, http://android-developers.blogspot.be/2009/01/avoiding-memory-leaks.html Apr 10 00:28:05 What's the standard height of the action bar? Apr 10 00:28:09 Woops, meant to post screenshot but I CMD+V'd too quickly pfn_ https://i.imgur.com/efEGZPZ.png Apr 10 00:28:15 You'd just say anything not to admit you are wrong. Apr 10 00:28:18 I got my tabs working, but I want them to be that same height Apr 10 00:28:54 TechGeek01: ?android:attr/actionBarSize or (if using AppCompat) ?attr/actionBarSize Apr 10 00:28:57 MikeWallaceDev, what's to admit? never say never, I don't really don't care, I'll say it anyway Apr 10 00:29:08 can't we have in Java String interpolation? somehow? please. 15 lines of this "CREATE VIEW " + SearchEntry.SEARCH_QUERY_VIEW + " AS SELECT *, (EXISTS(SELECT 1 from " + ShowEntry.TABLE_NAME + final String SQL_CREATE_SEARCH_VIEW = "CREATE VIEW " + SearchEntry.SEARCH_QUERY_VIEW is killing me :( Apr 10 00:29:15 I'll say it again, never pass application context instead of activity context Apr 10 00:29:19 unless you're sure it's what you want Apr 10 00:29:30 well, my e-penis is bigger than both of yours, so.... Apr 10 00:29:44 TacticalJoke: Include it as layout_height="?android:attr/actionBarSize" ? Apr 10 00:29:47 s/sure/absolutely know/ Apr 10 00:30:00 it's a pretty pretty small subset of circumstances Apr 10 00:30:20 I'm just going to ignore you... I tried reaching out to you, you ignored it. So, whatevs... Apr 10 00:30:36 yeah, nice way to reach out "you got something up your ass? want to talk to me about it?" yeah, no Apr 10 00:30:37 here's my stack trace http://dpaste.com/3FA7MWA.txt Apr 10 00:30:46 TechGeek01: Sure. Apr 10 00:31:35 icedp: There's System.format() (which is slow so I don't recommend it), or you can use a joiner, or implement a quick interpolation routine yourself Apr 10 00:32:17 icedp, scala ;-) Apr 10 00:33:03 (for the others, I didn't say that. I asked him if he was ok.) Apr 10 00:33:08 icedp, there is String.format too: http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#format(java.lang.String,%20java.lang.Object...) Apr 10 00:33:31 icedp: Also, Kotlin "Hello, ${world}" Apr 10 00:33:38 CedricBeust: Haha. Was just about to type that. Apr 10 00:33:54 Even "Hello, $name." :) Apr 10 00:33:54 Perhaps StringBuilder? Apr 10 00:34:29 Spannablestringbuilder? :-D Apr 10 00:36:18 Btw, does anyone use AndChat? Do you know how to autocomplete names? Apr 10 00:36:23 So I have my tabs, and I had an old layout with two activities and buttons on my main activity Apr 10 00:36:56 starting a brand new project after finishing one is kinda demoralizing for me. having to go through all the boring stuff Apr 10 00:36:59 Is there a way to take a FrameLayout and import an existing activity as a fragment, and showing that in the tab, or do I need to recreate in entirely? Apr 10 00:37:03 this is going to suck Apr 10 00:37:32 In other words, can I keep the existing two activities and layout XML files, or do I have to rewrite them as part of the activity with the fragments? Apr 10 00:37:46 And if I were able to import without migrating it, how would I go about doing that? Apr 10 00:37:55 Dadfoundmy that's the part I like! I get bored with the details... Apr 10 00:38:26 MikeWallaceDev: but it's so satifing to have a working project in front of you! Apr 10 00:38:56 I like working on the architecture, the design patterns Apr 10 00:39:10 Probably my favourite thing is refactoring my existing code. Apr 10 00:39:16 Or writing unit tests for new code. Apr 10 00:39:37 Oddly enough, I do like refactoring too... Apr 10 00:39:38 ahh unit testing. the thing at the top of my list to learn Apr 10 00:39:54 i love making my shitty code slightly less shitty Apr 10 00:40:02 and making helper methods and shit like that Apr 10 00:40:08 There's little more satisfying, to me, than creating a small but comprehensive suite of unit tests. It's an empowering feeling. :D Apr 10 00:40:26 MikeWallaceDev, search button Apr 10 00:40:33 TacticalJoke: interesting. Wish I had that - I hate writing unit tests! Apr 10 00:40:42 * MikeWallaceDev needs to test more Apr 10 00:40:45 anyone having problems with logcat in the new As 1.2 Beta 2 ? Apr 10 00:40:48 Yeah, a lot of people tell me they hate them. I am weird about certain things. Apr 10 00:40:52 CedricBeust: I would use format if only it would allow to refer to elements by alias not only by index $1%s. I think StringJoiner would do but... no StringJoiner in Androdi? Apr 10 00:41:03 definitely a good kind of weird :D Apr 10 00:41:13 g00s_: This? http://www.reddit.com/r/androiddev/comments/3221a4/android_studio_12beta_logcat_problem/ Apr 10 00:41:23 TacticalJoke yeah Apr 10 00:41:24 :D Apr 10 00:41:32 :-D Apr 10 00:42:33 G00s use pidcat in the meantime Apr 10 00:42:46 icedp: I don't mean to tease, but look at this Kotlin code: println("Name: $name, age: $age, address: $address") Apr 10 00:42:54 Name: Fred, age: 30, address: 123 Something Road Apr 10 00:43:31 i almost dont want to start this project without learning fragments because i know i will have to redo a lot of it :/ Apr 10 00:44:02 Even stuff like this: println("Name: ${name + " Smith"}, age: $age, address: $address") Apr 10 00:44:17 Though that's not the best example (because of the +). Apr 10 00:44:20 You can learn fragments, and you can look into "flow and mortar" Apr 10 00:44:51 don't have to use fragments to have responsive UI Apr 10 00:45:02 Hmm. Is there a possibility of extending FragmentActivity and having an action bar like in ActionBarActivity? Apr 10 00:45:18 Essentially how Tasker does it Apr 10 00:45:37 i know but im too big of a noob to learn how to do it a different way Apr 10 00:46:04 Noob !!! Apr 10 00:46:15 :-D Apr 10 00:46:16 I've yet to see an alternative that makes me go "Wow that's so much better than fragments and it supports all the use cases that fragments do" Apr 10 00:46:30 TacticalJoke: yeah, thanks, I've looked into it. It's cool. (interpolation syntax looks like the one Ruby has). But for now I should do it in Java unfortunately =) Apr 10 00:46:47 DadFoundMy: If you want to learn Fragments, maybe watch those YouTube videos and create a test project. They're not very hard to grok. Apr 10 00:47:18 Are there useful libraries for Android…? PHP has PEAR, ruby has gems, C# has nu-get, iOS has cococontrols and cocopods and Android has…??? Apr 10 00:47:20 CedricBeust, I'll just look at anything that isn't fragments... Not my favorite thing in the world... Apr 10 00:47:27 TacticalJoke: i started one of them but then fell asleep :/ and now im about to go on an airplane and not be able to watch videos Apr 10 00:47:39 You can download YouTube videos. Apr 10 00:47:40 BTW. Apr 10 00:47:46 i have a book im downloading this a kinda remember having a half decent chapter on framgents Apr 10 00:47:49 http://www.clipconverter.cc/ Apr 10 00:47:56 TacticalJoke: not on this shitty airport wifi Apr 10 00:48:03 Are you always on planes? Apr 10 00:48:08 Are you that guy from Terminal. Apr 10 00:48:12 CedricBeust, they certainly are the path of least resistance Apr 10 00:48:16 The^ Apr 10 00:48:18 TacticalJoke: well i do live in a plane soooo Apr 10 00:48:26 Does anyone understanding what the percent of bufferingupdate for media player actually represents? Apr 10 00:48:39 I use them because too lazy to wire up any sort of framework Apr 10 00:48:46 * regan just got a job Apr 10 00:48:47 TacticalJoke: my father is an international criminal so we just go from airport to airport traveling Apr 10 00:48:56 regan: cool wanna give it to me? Apr 10 00:48:58 regan, grats, whereabouts Apr 10 00:49:17 Its a small company, I am tech lead on iOS and ANdroid Apr 10 00:49:26 Are there useful libraries for Android…? PHP has PEAR, ruby has gems, C# has nu-get, iOS has cococontrols and cocopods and Android has…??? Apr 10 00:49:30 thanks. Apr 10 00:49:36 yuck on iOS, but otherwise Yay Apr 10 00:49:44 🙌🙌🙌🙌🙌 Apr 10 00:49:47 Are there any useful libraries for Android? Yes. Apr 10 00:49:56 Yes. Apr 10 00:49:58 Oops, I added "any". Apr 10 00:50:07 regan, all of maven central Apr 10 00:50:08 regan: well the cocopod equivlent would be gradle Apr 10 00:50:28 pfnQ: okay your slightly more correct :( Apr 10 00:50:30 /any/many/ Apr 10 00:50:37 and any repositories published out there Apr 10 00:50:47 regan: do you know the android sdk yet? Apr 10 00:51:28 I have 4 apps on GooglePlay but not really expert Apr 10 00:51:29 What's that site that lists all the libraries?? Apr 10 00:51:41 http://search.maven.org/#browse%7C47 I think is what I was looking for thanks. Apr 10 00:51:42 MikeWallaceDev: github :D ? Apr 10 00:51:46 search.maven.org Apr 10 00:51:49 :-D Apr 10 00:51:52 Hahaha Apr 10 00:52:06 regan: you did that without any libraries? im kinda impressed Apr 10 00:52:18 Oh the apps are pretty shit. Apr 10 00:52:28 There's a site that lists them, rates them... Apr 10 00:52:28 DadFoundMy, download jars manually... Apr 10 00:52:49 My apps: https://play.google.com/store/apps/developer?id=PymbleSoftware+Pty+Ltd&hl=en Apr 10 00:52:55 i probably use too many libraries. I have one for action buttons, and even one for the circle text views with a letter in them like the gmail app Apr 10 00:52:58 pfnQ: ewww Apr 10 00:53:15 I used ZXing, but I think I downloaded it by hand. Apr 10 00:53:15 pfnQ: you like eclipse that much? Apr 10 00:54:00 DadFoundMy, no, that's just what you do if not using central Apr 10 00:54:01 developing for android on eclipse? come on! Apr 10 00:54:14 DadFoundMy, I don't use eclipse nor studio Apr 10 00:54:14 I think I am going to go for a surf… But I will be back later to ask lots more about Android Apr 10 00:55:06 https://android-arsenal.com/ Apr 10 00:55:12 That was for you regan Apr 10 00:55:19 Oh, thanks Apr 10 00:55:25 :-) Apr 10 00:55:25 pfnQ: what do you use? Apr 10 00:55:29 text editor? Apr 10 00:55:44 intellij, sbt and scala Apr 10 00:55:54 I had to code in GEdit this morning! Apr 10 00:56:43 AS was taking forever to download, and I needed to work on the code Apr 10 00:57:27 Scala is also an editor? Apr 10 00:58:05 (cause I'm actually looking for a small, fast Linux editor) Apr 10 00:58:11 no Apr 10 00:58:41 Rats. Apr 10 00:58:46 but you could write code from the repl 😉 Apr 10 00:58:54 vim Apr 10 00:59:07 MikeWallaceDev sublimetext works on linux ;) Apr 10 00:59:11 what I usually turn to Apr 10 00:59:25 ideavim 24/7 ftw Apr 10 00:59:36 I liked Sublime... $70 :-( Apr 10 01:00:30 Sorry... I meant small, fast and free :-D Apr 10 01:00:56 Atom is cool, but takes too long to load Apr 10 01:01:05 vim Apr 10 01:01:10 Hahaha Apr 10 01:01:14 emacs is relatively fast these days Apr 10 01:01:14 No!!! Apr 10 01:01:42 I don't know about emacs... I'm considering it Apr 10 01:02:29 It's a big investment, but maybe it's worth it. Apr 10 01:02:37 (time) Apr 10 01:03:47 i've been meaning to properly check out emacs. I've had this bookmarked, looks pretty good http://www.jesshamrick.com/2012/09/10/absolute-beginners-guide-to-emacs/ Apr 10 01:04:35 I was watching this video and the is all "I've been using emacs for 25 years and I can do anything with it" - well I'm 48, I don't want an editor that I'll be proficient in when I hit 73! Apr 10 01:04:57 Oh cool barbs Apr 10 01:05:39 Added to pocket Apr 10 01:06:03 understandable! I'd be more interested in learning about it for the sake of learning, rather than making it something I'd actually use day-to-day Apr 10 01:06:03 though that may end up happening anyway :) Apr 10 01:06:25 That's the thing Apr 10 01:06:41 I'm a big vim fiend so I imagine I'd use "evil mode" Apr 10 01:06:44 I love AS but it's strictly Android Apr 10 01:07:01 well, emacs is great if you love lisp Apr 10 01:07:27 pfnQ: I did a bit of lisp at uni, it was really interested and would love to visit it again :) Apr 10 01:07:36 Probably would lead down the path if using clojure on android Apr 10 01:07:36 emacs might be a big chunk to chew, but might be worth it in the long run Apr 10 01:07:39 MikeWallaceDev, well it's based off IntelliJ. Jetbrains has an IDE for everything. Apr 10 01:07:59 yep, I just use intellij and refuse to use studio Apr 10 01:08:07 MikeWallaceDev: I love AS as well. Any new language I want to look at, I check if Jetbrains has an IDE for it :) Apr 10 01:08:22 pfnQ: how come you refuse to use Studio? Apr 10 01:08:50 I was on intellij before studio came out, I switched as soon as it was announced Apr 10 01:08:53 no reason to use it over intellij Apr 10 01:09:01 and I don't write just android code Apr 10 01:09:13 That's a good reason Apr 10 01:09:36 AS will have the best gradle-plugin support. so if that is important to you ;) Apr 10 01:09:40 I use far too many languages, and studio only supports 1 Apr 10 01:09:53 really? I thought there was a whole bunch of stuff in AS that's not in IntelliJ. Layout editors and such. Haven't used IntelliJ for Android Dev much though so I'm not sure what it's missing Apr 10 01:10:03 Exactly, that's a problem Apr 10 01:10:05 Hey! I've added setAdListener on an AdView, and now the ad is not shown anymore Apr 10 01:10:10 is it a bug or what? Apr 10 01:10:17 if I comment that setAdListener it works again Apr 10 01:10:18 barbs, only current gradle plugin Apr 10 01:10:30 my ideal situation would be AS for Android, other Jetbrains IDEs for everything else :) Apr 10 01:10:34 The multiple layout view is a killer feature Apr 10 01:10:45 I don't code in much else though Apr 10 01:11:26 I remember someone on here mentioning that they do their Android dev in a terminal with Vim. I'm so curious as to what their workflow is. Apr 10 01:11:31 Seeing my layout on 9 devices while I work on it is pretty awesome Apr 10 01:11:45 agreed Apr 10 01:12:25 any idea? Apr 10 01:12:26 For me IDE == Debugger Apr 10 01:13:24 The integration of editor and debugger is why I don't code in a text editor Apr 10 01:13:25 Hi!, when I do: Cursor c = getContentResolver().query( ContactsContract.Data.CONTENT_URI, PROJECTION, SELECTION, null, null ); <---- c.getCount() return 2 items, while in the emulator Contact exist only 1 test item Apr 10 01:13:29 why ? Apr 10 01:14:32 Maybe it's an amalgamated contact Apr 10 01:14:37 ? Apr 10 01:14:39 breakpoint, debug Apr 10 01:15:55 For example, if you have Paul contact on your phone, and Paul on g+ you'll only see one contact, with all the information Apr 10 01:16:50 (From both providers) Apr 10 01:17:50 ahm... I don't know... I just added only name and phone number.... nothing more in the phone emulator Apr 10 01:20:30 http://imgur.com/delete/6C1GWBcAY395rvb <--- only 1 contact Apr 10 01:21:48 Well, if you added it, then yes, it's one contact. However, in my example you would still see only one contact Apr 10 01:22:02 Just letting you know :-) Apr 10 01:23:32 But contacts are complicated, I'm not even sure what you receive with that query. I think it's pointers to other data that will then create the contact Apr 10 01:23:54 do c.getColumnCount(). Is that equal to one Apr 10 01:23:55 Haven't used contacts API in years, sorry :-/ Apr 10 01:23:55 RE: String interpolation - so far closest I've found) https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/text/StrSubstitutor.html Apr 10 01:25:44 What's the advantage over indexed? Apr 10 01:26:58 feathersanddown: read through http://developer.android.com/guide/topics/providers/contacts-provider.html , it explains it pretty well. Apr 10 01:27:25 feathersanddown: but specifically: CC.Data is returning two rows because one is for the "structured name", and one is for the phone number. Apr 10 01:27:27 c.getColumnCount() = 2 :( Apr 10 01:27:32 Anyone know why my mediaplayer seek to jumps like 10 seconds when i use seekbar to set it? Apr 10 01:27:58 oh so getCount is for "columns" Apr 10 01:28:26 getCount should be rows, getColumnCount is columns Apr 10 01:28:38 what's your projection? Apr 10 01:29:11 static final String[] PROJECTION = new String[] {ContactsContract.Data._ID, ContactsContract.Data.DISPLAY_NAME}; Apr 10 01:30:12 i'm trying to follow the https://developer.android.com/guide/topics/ui/layout/listview.html example Apr 10 01:30:19 ah. feathersanddown ah. yeah, you're misusing that. ContactsContract.Data.DISPLAY_NAME is for the aggregated contact query. Apr 10 01:30:33 getCount() returns # of rows iirc Apr 10 01:30:42 "iirc" ???? Apr 10 01:30:50 if i recall correctly* Apr 10 01:31:07 feathersanddown: if you look at http://developer.android.com/reference/android/provider/ContactsContract.Data.html you'll see DISPLAY_NAME tells you to look at ContactsContract.Contacts for more info. do so, you need to use that uri if you want that field. Apr 10 01:31:20 and read the provider guide, the contacts provider is complex but quite well defined. Apr 10 01:31:41 jaja well... I'm really confused because I readed almost whole guides and tutorials Apr 10 01:32:03 it can be confusing to start, yeah Apr 10 01:32:57 And confusing when you haven't done it in a long time :-D Apr 10 01:33:09 to keep things accurate though, make sure you _only_ use ContactsContract.Data with a .Data.CONTENT_URI query, and e.g. .Contacts.DISPLAY_NAME with a .Contacts.CONTENT_URI query. each query can only return one type of thing (basically), and if you pull from other sources you'll probably hit errors later. Apr 10 01:33:23 well... as I can see, following guides is not guarantee to learn :( Apr 10 01:34:12 feathersanddown: done much with databases? the "contacts provider organization" image near the top of the guide is the structure of the whole thing Apr 10 01:34:41 OK guys, I'm off. I still have to eat, sleep and get up at 5 for DroidCon tomorrow... Zzzz Apr 10 01:35:02 every piece of info in a contact has a Data row, every contact (from any source, e.g. local, google contacts, facebook, others) has a RawContact row, and every "contact" like you see in the contacts app has a single Contact row. Apr 10 01:35:03 have a nice day tomorrow MikeWallaceDev :) Apr 10 01:35:28 Thanks mate! Apr 10 01:36:23 feathersanddown: there's also the image here, which shows an example. http://developer.android.com/guide/topics/providers/contacts-provider.html#ContactBasics Apr 10 01:36:44 I am getting an error and none of the files in the stack trace are mine: http://dpaste.com/3FA7MWA.txt Apr 10 01:37:02 none of the links to the files in Android Studio are blue anyway Apr 10 01:37:32 I have a ListView. What listener should I use to grab the view that is currently in focus? Apr 10 01:37:58 duncannz: I'm not sure, but you may need an ActionBar theme to use ActionBarActivity? Apr 10 01:38:06 I've used an OnItemSelectedListener, and an OnFocusChangeListener to no avail Apr 10 01:38:51 MarkyC: How are you defining "in focus"? Apr 10 01:39:04 It might be OnItemClickListener, in any case. Apr 10 01:39:13 groxx: I'll give you some context. I wanted to move some repetitive tasks out of every activity's onCreate into a BaseActivity. So I changed my activities from 'Home extends ActionBarActivity' to 'Home extends BaseActivity' then created BaseActivity as 'abstract class BaseActivity extends ActionBarActivity'. Apr 10 01:39:23 thanks groxx, will read them :) Apr 10 01:39:28 Hey there, does anyone know how to detect if the device an app is running on is a tablet or mobile? More importantly, what does Google define as a tablet or mobile? This is a requirement for implementing a Material Design compliant UI, hence the question. Thanks. Apr 10 01:41:08 mixedCase: there's no clear split between the two, because Samsung: http://www.engadget.com/2014/06/01/samsung-7-inch-galaxy-w/ Apr 10 01:41:30 mixedCase: (getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE Apr 10 01:41:41 found that on SO anyway Apr 10 01:41:50 mixedCase: http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts says that "xlarge" implies tablet though Apr 10 01:42:02 duncannz: I found that as well, but wasn't sure on Google's position. Apr 10 01:42:19 groxx: xlarge it is then, thanks :) Apr 10 01:42:31 and there are also examples somewhere in the docs that say "use w600dp", which is a "more modern" approach (also mentioned in that link) Apr 10 01:42:43 TacticalJoke: Put simply, I'm replicating something from Instagram. When you hover over a video Post in Instagram, it plays the video (after a delay, that's not relevant here) Apr 10 01:42:56 or, they don't say "use w600dp" so much as "here's an example with a 7 inch tablet: layout-w600dp" Apr 10 01:43:32 TacticalJoke: So my first problem is figuring out which view has focus Apr 10 01:44:06 MarkyC: nope. you mean (fully?) visible Apr 10 01:44:13 (which view in my ListView, that is. I created a custom View that builds upon LinearLayout that I use to hold my Posts) Apr 10 01:44:13 MarkyC: focus is another thing Apr 10 01:44:23 I'm not sure what you mean by "hover over". Could refer to at least three different things. Apr 10 01:44:32 groxx: And w600dp means that the larger side is 600dp at least, correct? Apr 10 01:44:50 icedp: yes, my view should be fully visible before I play the video Apr 10 01:44:51 mixedCase: it means the width is 600dp, which will change when the orientation changes Apr 10 01:45:07 mixedCase: some examples also use "sw600dp" which is "smallest width", which is a rough measure of "a device that's this big" Apr 10 01:46:02 groxx: Alright, I will do some googling. If I can use dp to determine device type that'll save me calling Java classes, I'm using Python4Android lawl, so thanks for that option. Apr 10 01:46:34 mixedCase: yeah, resources is the right way to do it :) and if you don't want to change the display "style" with rotation, use "swXdp" because it's not rotation-dependent. Apr 10 01:47:09 TacticalJoke: I will try OnItemClickListener Apr 10 01:47:28 MarkyC: Are you talking about long-pressing? Apr 10 01:47:32 groxx: Will do, thanks. Apr 10 01:47:34 mixedCase: the screens_support.html link from earlier is probably the best source for that. or find the "Providing Resources" guide, it's useful too Apr 10 01:49:33 TacticalJoke: Nope, I just want to know if my view is on the screen (Say I have 10 views in my listview, all 10 don't fit on the screen at once, I would like to know which one(s) are present on the screen, in front of the user to see) Apr 10 01:50:37 TacticalJoke: Now, if I have 10 views, they are long enough that only 1 fits on the users screen at a time, so there should only be one on the screen at a time (with a special case for when the user is in between two views, which I will account for) Apr 10 01:51:34 MarkyC: listview or recyclerview? Apr 10 01:51:56 groxx: ListView Apr 10 01:53:14 MarkyC: I would try to set onScrollListener and when scroll changed getChildAt every child and check it's hit rect if it's on screen Apr 10 01:54:14 yeah, onScrollListener makes sense. that'll also tell you the number of views visible. Apr 10 01:54:17 icedp: That seems to be the winning solution Apr 10 01:56:29 icedp: I seem to see some weirdness in the onScrollStateChanged method (it gives me the wrong index sometimes), but thankfully I only need onScroll Apr 10 01:57:05 onScrollStateChanged doesn't give you indexes, btw Apr 10 01:57:49 groxx: you're right! it's a scrollState Apr 10 02:03:09 MarkyC: and when detected sendMessageDelayed to ListView's Handler to introduce a delay Apr 10 02:03:31 MarkyC: and removeMessage when scroll state changed to idle Apr 10 02:04:02 <_genuser_> eh, combining the projects from eclipse and AS, sounds like boring work. Apr 10 02:05:45 * Muchoz commits and goes to sleep. Apr 10 02:06:49 icedp: Thank you Apr 10 02:07:47 icedp: I guess I still have to handle the case where the user scrolls a little bit but not enough to go to the next item in the ListView Apr 10 02:41:44 g00s_ no power in Syracuse... coding in the dark Apr 10 02:43:14 capella-s3 gotta get used it, will be bump ride between fossil fuels and renewables - consider it training ! Apr 10 02:43:50 capella-s3 get my message ? Apr 10 02:44:01 nope bounced Apr 10 02:44:09 capella-s3 gotta get used it, will be bump ride between fossil fuels and renewables - consider it training ! Apr 10 02:45:07 if this is the promise of renewable I'll take coal Apr 10 02:45:45 when fossil runs out society will go into a reset Apr 10 02:45:53 heh... starting up the backup generator Apr 10 02:46:24 those things are stinky and loud Apr 10 02:46:24 g00s_ you in town? got power? Apr 10 02:46:39 i'm not in syracuse **** ENDING LOGGING AT Fri Apr 10 02:59:59 2015