**** BEGIN LOGGING AT Thu Mar 26 02:59:58 2015 Mar 26 03:00:14 hahaha Mar 26 03:05:28 g00s, do you know anything about the android lollipop memory issue? Mar 26 03:05:36 where it restricts memory usage unfairly Mar 26 03:05:50 5.0 had some memory issues, but i never tried it so Mar 26 03:06:02 I love the way people talk about "the issue", "the memory leak"... Mar 26 03:06:14 I am on 5.0.1 and having this problem Mar 26 03:06:21 with my jigsaw Mar 26 03:08:32 Agamemnus i saw a benchmark this week that showed Cordova had the worst performance of any runtime, anywhere (android/ios) so i'm not surprised you are seeing issues :) Mar 26 03:08:45 cordova is chrome Mar 26 03:09:05 sooooo Mar 26 03:09:20 * g00s sighs Mar 26 03:09:24 heh Mar 26 03:09:28 annd they probably didn't add crosswalk to it, or custom chrome settings Mar 26 03:09:42 but see here Mar 26 03:09:55 http://forum.xda-developers.com/moto-x-2014/general/talk-how-crappy-lollipops-memory-t3015520 Mar 26 03:10:27 g00s: did you see teh benchmarks for robovm? pretty impressive Mar 26 03:10:42 bankai_ i'm trying to find it again Mar 26 03:10:53 bankai_ do you have a link ? Mar 26 03:10:57 if its the same one Mar 26 03:11:01 sec Mar 26 03:11:34 got it Mar 26 03:11:35 https://medium.com/@harrycheung/mobile-app-performance-redux-e512be94f976 Mar 26 03:11:43 bah i just loaded it! Mar 26 03:12:18 huh, wait no cordova Mar 26 03:15:14 Hey JakeWharton or anyone else. Would you know why butterknife examples and docs use ButterKnife.bind() but when I'm trying to use it, it tells me it doesn't exist. inject() on the other hand does? Mar 26 03:18:17 because you are looking at master instead of the released version Mar 26 03:19:16 doh. didn't know there was a difference. Mar 26 03:19:54 so the docs that I see are from the master branch which will eventually get into a released version... correct? JakeWharton ? Mar 26 03:20:03 yes Mar 26 03:20:05 v7 Mar 26 03:21:13 okay thanks, just wanted to make sure I understood that correctly. thanks JakeWharton Mar 26 03:22:08 What does bind() do? Mar 26 03:22:14 when using getitem from an adapter of a costum view I only get the textview Mar 26 03:23:01 CedricBeust: replaces inject() Mar 26 03:23:16 Why the change of name? Mar 26 03:23:23 i'm sick of people saying view injection and butter knife is injection Mar 26 03:23:29 didn't they see the quotes?!? Mar 26 03:23:33 when using getitem from an adapter of a costum view I only get the textview Mar 26 03:23:48 Come to think of it, a few people on my team are indeed occasionally confused about when to inject with ButterKnife and dagger Mar 26 03:26:14 when using getitem from an adapter of a costum view I only get the textview Mar 26 03:27:14 the android toolwindow is growing lots of UI chrome getting in the way - just want to see logcat but i have tabs toolbars, comboboxes - is there any way to break out logcat into its own tool window ? Mar 26 03:27:21 in AS 1.2 that is Mar 26 03:28:03 wait JakeWharton where are the quotes supposed to be in "[23:23] i'm sick of people saying view injection and butter knife is injection" Mar 26 03:28:32 http://jakewharton.github.io/butterknife/ Mar 26 03:30:42 Oh. you mean "View "injection" library for Android" was making some people think that it was actually some kind of dagger injection type of thing going on? Mar 26 03:30:50 yes Mar 26 03:31:09 it's boilerplate reduction Mar 26 03:31:25 JakeWharton: That's only half the battle though, unless you also renamed @InjectView? Mar 26 03:31:33 I did :) Mar 26 03:31:39 Haha, figured Mar 26 03:31:43 What's the new hotness Mar 26 03:31:47 @FindView, I believe Mar 26 03:31:54 Seriously? Mar 26 03:31:59 Why u no @BindView? Mar 26 03:32:12 because it's not really "binding" (despite the method being named that) Mar 26 03:32:19 i'm torn, still mulling over naming to be honest Mar 26 03:32:33 Yeah I think it would be nice to unify the method name with the annotation Mar 26 03:33:30 well there's @OnClick and stuff still Mar 26 03:33:49 also there's now resource binding on master Mar 26 03:33:52 JakeWharton: Isn't an annotation for inject really just mean like that it's generating the code? idk ButterKnife.generate() Mar 26 03:34:06 ButterKnife.doMagic() Mar 26 03:34:13 eghdk: generation has already happened Mar 26 03:34:26 ButterKnife.lookupGeneratedClassAndDoTheStuff() Mar 26 03:35:01 ButterKnife.spread(); Mar 26 03:36:06 @ButterUp(R.id.mytextview) and then ButterKnife.spread() works for me. Mar 26 03:36:15 lol Mar 26 03:36:19 @OkButter Mar 26 03:36:44 Maybe rename the project to PopCorn and call this action popping the corn Mar 26 03:37:16 Turns an innocent-looking corn kernel into a delicious pop corn dripping with butter Mar 26 03:38:27 @SpreadView ButterKnife.melt() The possibilities are endless. Mar 26 03:38:49 Fondue.meltCheese() Mar 26 03:38:54 sorry French me speaking Mar 26 03:38:56 you really need a toast helper of some kind Mar 26 03:44:36 g00s: http://i.imgur.com/QblQ8cO.gifv Mar 26 03:49:36 lmao Mar 26 04:02:40 bankai_ haha thats great Mar 26 04:06:03 why would anyone want their switches to do this https://github.com/Serchinastico/CoolSwitch Mar 26 04:07:21 If one has just dropped acid, it might be nice. Mar 26 04:07:47 such an innocent looking widget --> seizure Mar 26 04:09:09 someone help, this bug is destroying me http://stackoverflow.com/questions/29270864/using-the-getheight-method-on-a-relative-layout-during-the-getview-of-a-cust Mar 26 04:09:43 Basicly i need to call getHeight on a view, but its not completely instaniated because it's int he getVIew() of a custom adapter Mar 26 04:11:33 The problem is that it hasn't been measured yet. Mar 26 04:12:07 One solution is to use the ViewTreeObserver thing (though I'm not sure whether this is the best solution). Mar 26 04:12:30 TacticalJoke: ive seen that, but im not sure how to implement it since it's inside of the getView() Mar 26 04:14:35 DadFoundMy: I don't think that's a problem. Picasso does the same with (using ViewTreeObserver), as far as I can remember. Mar 26 04:16:41 I'm doing the same kind of thing using "imageView.getViewTreeObserver().addOnPreDrawListener(new ImageViewOnPreDrawListener());". Mar 26 04:18:13 im trying to add that, but which listener would i want to add on would i want to add it to the relative layout? Mar 26 04:18:23 im think widnowfocus change or whatever Mar 26 04:18:52 DadFoundMy: Isn't it the case that you want the size of the image (which presumably is match_parent x match_parent) inside the RelativeLayout? Mar 26 04:18:52 Being kinda pedantic, but it might help. Mar 26 04:18:52 s/image/ImageView/ Mar 26 04:19:48 its not actually a imageview, its this library https://github.com/amulyakhare/TextDrawable Mar 26 04:20:26 But you're saying "imageView.setImageDrawable(textDrawable);", so don't you want the ImageView's size? Mar 26 04:21:30 no im setting the imageview's size. I need to set it to be the same height and width of the height of the relative layout Mar 26 04:22:49 the getViewTree obverser should be in the getView right? Mar 26 04:23:31 Yeah. Mar 26 04:23:53 If this RelativeLayout uses a predetermined size then you don't have to worry about the setOnPreDrawListener thing. Mar 26 04:24:02 e.g., 60dp x 60dp. Mar 26 04:24:14 it doesn't its set by its text Mar 26 04:24:21 ill gist the layout one sec Mar 26 04:24:41 heres the layout https://gist.github.com/DylanRedfield/ffc6e94fb404a384414f Mar 26 04:24:56 i need the imageview to be the same size ad that layout Mar 26 04:26:37 Okay. As far as I know, using ViewTreeObserver.setOnPreDrawListener is the best option for something like this. Mar 26 04:26:58 s/set/add/ Mar 26 04:32:18 TacticalJoke: heres my code, maybe im iimplementing it wrong? https://gist.github.com/DylanRedfield/fcd6dc26f2a357811d69 Mar 26 04:32:48 The call to ImageView.setImageDrawable would also have to be in the listener. Mar 26 04:33:23 hmm then i cant access convertview Mar 26 04:34:44 hey we got a start!, it now works for the last element in the listview Mar 26 04:35:16 One solution would be to create an inner class with a constructor, and pass the ImageView reference to the constructor. Then use that in onPreDraw. Mar 26 04:35:27 I *think* this is okay (it's hard to think right now since I'm multitasking :D). Mar 26 04:37:32 any idea on why it would only work ont he last element? Mar 26 04:38:40 I guess there's only one TextDrawable and you're using it in only the last ImageView. Mar 26 04:41:20 lol i now manage to get it to work for 2 Mar 26 04:41:22 DadFoundMy: This is what I meant above. Mar 26 04:41:25 http://pastebin.com/Zcyg89Ju Mar 26 04:41:51 showText is defined by you, of course. Mar 26 04:42:31 i think i need to sleep on the issue, this is such a pain in the ass Mar 26 04:43:40 Oh, I forgot "return true;". Mar 26 04:44:32 DadFoundMy: Didn't I just give you the answer? :p Mar 26 04:44:58 It's untested, but I'd be surprised if that didn't work. Mar 26 04:45:00 yeah im attempting to implement it now Mar 26 04:45:27 It's good practice to check whether we're "alive" and to remove ourselves. Mar 26 04:46:06 WHAT Mar 26 04:46:21 taken out of context, that sounds very cultish Mar 26 04:47:00 * TacticalJoke hands Agamemnus a green beverage. Mar 26 04:49:55 mmMMmm. soylent green Mar 26 04:50:04 TacticalJoke: should the innerclass you linked by a inner class in the getView()???? Mar 26 04:50:26 hallo Mar 26 04:50:34 i have some questions as i'm a noob Mar 26 04:50:38 Yeah, in the same class as getView(). Mar 26 04:50:39 i'm putting everything into main activity Mar 26 04:50:41 obviously this is stupid Mar 26 04:50:51 how do i go about figuring out where to put things? Mar 26 04:51:07 This is Java Mar 26 04:51:33 okay Mar 26 04:51:37 So.... you can put them in lots of places.. Mar 26 04:51:41 ProLoser: make helper methods...? Mar 26 04:51:43 ProLoser: There are so many variables in that calculation. Mar 26 04:51:46 uhm Mar 26 04:52:11 It's like asking "Which piano key should I press next?". :D Mar 26 04:52:25 Or "strike", if we're gonna get technical. Mar 26 04:53:04 ProLoser: Do you have a specific scenario? Mar 26 04:53:12 i'm making an alarm clock app Mar 26 04:53:23 i should probably push what i've got on github Mar 26 04:54:09 I think in general we can say that an activity should contain code that relates only to (1) GUI stuff and (2) that particular activity. Mar 26 04:54:28 TacticalJoke: the code still doesn't work :/ predraw is still required the view is inflated :/ Mar 26 04:54:48 DadFoundMy: Can you paste exactly what you're trying? Mar 26 04:55:09 https://gist.github.com/DylanRedfield/cd22ba639f0c095cccf1 Mar 26 04:55:24 You're doing it wrong. Mar 26 04:55:32 how should i change it? Mar 26 04:55:48 It should be "rel.getViewTreeObserver().addOnPreDrawListener(new RelOnPreDrawListener(imageView));". Mar 26 04:55:55 After finding the ImageView. Mar 26 04:56:27 ohhh Mar 26 04:56:48 WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Mar 26 04:57:00 THANKS Mar 26 04:57:08 Glad it worked. :) Mar 26 04:57:22 Hi, Building the kernel (Samsung I9500 | CM 11.0) And The error: http://pastebin.com/raw.php?i=Ljb52sP3 | Full thing I did: http://pastebin.com/raw.php?i=3RjJfXzB Mar 26 04:57:34 now i need to study the shit out of that code to see why it worked lol Mar 26 04:57:55 rrman wrong channel, see topic Mar 26 04:57:58 rrman, see topic Mar 26 04:58:21 OK, Thanks Mar 26 04:58:32 DadFoundMy: Note that (named) inner classes are basically identical to anonymous inner classes. So nothing magical is going on. Mar 26 04:58:44 We use an named inner class because we need a constructor. Mar 26 04:59:18 ahh that makes sense Mar 26 04:59:34 CedricBeust question about rx? Mar 26 04:59:49 ? Mar 26 04:59:55 The thing we pass to ViewTreeServer.addOnPreDrawListener only has to implement the interface. We could pass *anything*. Mar 26 05:00:38 so before the named class was made the OnPreDraw was being called but it didnt have anything to call it on, execpt for the last go around where it called it on the last one Mar 26 05:00:57 *it didnt have anything to see it on Mar 26 05:00:59 *set Mar 26 05:01:16 CedricBeust when you get data from something, it fits well as an observable, but what about giving ... for example, my BluetoothCode has a mixture of read and write operations, do the write operations make sense as Observables ... because they don't really report anything back, just onComplete or onError Mar 26 05:01:44 I guess it called it on various ImageViews, but there was only one TextDrawable, and once you had assigned it to the last ImageView, it had been removed from all the others. Though that's just my guess. Mar 26 05:02:16 just wondering if i'm thinking about this wrong. becuase i have a fragment unSubscribe from a write observable ... and since it isn't subscribed when it 'hits the wire' it aborts the operation :| Mar 26 05:02:21 g00s: Not sure, I guess anything that returns at least one value is potentially an Observable, doesn’t mean it’s a good idea to make one Mar 26 05:04:22 anyone work with the alarm manager before? Mar 26 05:06:53 CedricBeust ok , thanks. maybe i need to find more precedent in existing apis Mar 26 05:07:56 the write operations don't return a value, but they are async and return error codes - so that would either have to be through another callback mechanism, or blocking + throwing exceptions Mar 26 05:08:33 ProLoser: FYI, questions like that don't get answers. Actual and specific questions, on the other hand, often do. :) Mar 26 05:08:44 i know how irc works Mar 26 05:08:55 * hams slaps ProLoser around a bit with a large trout Mar 26 05:09:00 Strange that you'd waste time asking pointless questions then. :p Mar 26 05:09:12 i was hoping for some pointers for beginners Mar 26 05:09:17 i can werk this irc Mar 26 05:09:18 but the answer was "We don't know" Mar 26 05:10:01 so i setup a broadcastreceiver Mar 26 05:10:10 and now i want it to like... well... start playing music Mar 26 05:10:18 this means i have to trigger an intent? Mar 26 05:10:25 i'm still trying to learn what intents/activities are Mar 26 05:12:00 uhmm...... I'm using the camera default app, when I accept image and return to my app I click in the button, button is pressed but doesn't leave camera app, keep there and can't continue Mar 26 05:12:46 moin Mar 26 05:15:31 do you guys have like any intro tutorials that sort of give me a high-level introduction? Mar 26 05:21:10 ProLoser, you ever used Java? Mar 26 05:21:17 umm Mar 26 05:21:22 like... in college Mar 26 05:21:24 so nothing useful, no Mar 26 05:21:30 but intents/activities are not java normal Mar 26 05:22:01 what about intents activities? what is your goal? Mar 26 05:22:12 they are java normal Mar 26 05:22:13 you have to narrow your questions and focus on building Mar 26 05:22:24 android completely follows java semantics Mar 26 05:22:39 i've never heard about intents or activities before Mar 26 05:22:57 obviously you have if you are naming them Mar 26 05:23:01 so next step is reading Mar 26 05:23:09 no... i named them cuz they're all over the android docs Mar 26 05:23:11 yeesh Mar 26 05:23:26 and i'm ASKING for something to read Mar 26 05:23:28 you know Mar 26 05:23:29 like Mar 26 05:23:37 "High level intro" recommendations Mar 26 05:23:39 * hams offers ProLoser some Taste the rainbow. Mar 26 05:23:43 find yourself an app to make, keep it simple, but liking to your interest. Then just read read read,test test test, read read read Mar 26 05:23:44 ProLoser why don't you read the AOSP source code for the alarm clock :| Mar 26 05:23:53 where is it? Mar 26 05:23:58 also Mar 26 05:24:01 you can google that Mar 26 05:24:07 it would be nice to just for now get a high level overview of intents/activities Mar 26 05:24:08 just download the sample source with the sdk manager Mar 26 05:24:10 and how/why to use them Mar 26 05:24:26 whatitis hmm - i dont think the apps are in the sources Mar 26 05:24:28 there are so many ways to learn, you need to know how you do it, then find those methods Mar 26 05:24:56 g00s, you sure? i'm saying the sample code not necessarily samples in source Mar 26 05:25:19 oh - ok . i dont think alarmclock is in sdk sources Mar 26 05:25:21 /sdk/samples/ Mar 26 05:25:24 ah ic Mar 26 05:29:11 does studio have a good 'new activity' uh... wizard Mar 26 05:29:20 that generates some scaffolding? Mar 26 05:32:14 ProLoser: Your questions remind me of Stoned Guy: http://www.quickmeme.com/The-High-Guy Mar 26 05:32:30 ... Mar 26 05:32:35 i'm new to android studio Mar 26 05:32:38 Or "Really Stoned Guy" or whatever. Mar 26 05:32:40 you guys are really unhelpful Mar 26 05:33:07 hey Mar 26 05:33:12 that's true Mar 26 05:33:13 buuuuuuuuut Mar 26 05:33:18 i don't normally do java or android studio and i don't have the energy to read all the fundamentals of java before i start building anything Mar 26 05:33:19 you shuld just use Cordova Mar 26 05:33:23 haha Mar 26 05:33:23 ProLoser: It's really hard to answer such non-specific questions. Mar 26 05:33:26 no i freaking hate cordova Mar 26 05:33:30 Why? Mar 26 05:33:36 it sucks Mar 26 05:33:39 i used it in a hackathon Mar 26 05:33:42 it's very garbage Mar 26 05:33:47 Your last question was "does studio have a good 'new activity' uh... wizard that generates some scaffolding?" Mar 26 05:33:58 like i want to create a new activity class Mar 26 05:34:13 i don't know the shortcut to have it import the packages, add the extends, put in the overrides and add the layouts Mar 26 05:34:16 or if there is one Mar 26 05:34:44 It does all that. Why not try it? Mar 26 05:34:49 Cordova is not garbage. Mar 26 05:34:50 try what? Mar 26 05:35:04 Try Cordova with Crosswalk. Should be better for Android. Mar 26 05:35:06 The New Activity wizard. Mar 26 05:35:07 Agamemnus: i had to use oauth in my 3 day hackathon Mar 26 05:35:17 TacticalJoke: i was asking IF THERE IS ONE Mar 26 05:35:21 Well, this is why you need to use libraries Mar 26 05:35:25 made by ME Mar 26 05:35:40 Agamemnus: the problem with oauth is it requires a webview Mar 26 05:35:48 which is unavailable when running in browser Mar 26 05:36:05 and i went around to about 200 people at the hackathon asking everyone if they knew how to log out errors from cordova Mar 26 05:36:05 ProLoser: 2 things Mar 26 05:36:09 was a fucking nightmare Mar 26 05:36:14 First of all Mar 26 05:36:21 It's a library/plugin Mar 26 05:36:24 so it uses the java things Mar 26 05:36:37 second Mar 26 05:36:38 yeah Mar 26 05:36:40 ProLoser: So you haven't even downloaded Android Studio? Mar 26 05:36:48 let me link you Mar 26 05:36:48 i'm using android studio right now Mar 26 05:37:05 i'm asking the question "Is there a new activity menu-item/wizard/button/shortcut/whatever?" Mar 26 05:37:15 ProLoser: It's so easy to find. Come on now. Mar 26 05:37:17 or some sort of new class thing that lets me specify what type of class Mar 26 05:37:28 TacticalJoke: instead of being like that you could just tell me Mar 26 05:37:36 Okay, I'm giving up on this. Good luck. Mar 26 05:37:45 ProLoser: https://github.com/agamemnus/Cordova-Google-Play-Token Mar 26 05:37:50 ... Mar 26 05:37:51 Maybe I should mention oauth here Mar 26 05:38:25 we were working with twitter Mar 26 05:38:28 all the calls required you to be oauthed Mar 26 05:38:39 Well, it's a similar idea Mar 26 05:38:40 and i couldn't figure out how to debug errors in cordova while it's running on the device Mar 26 05:38:44 Make a plugin/library Mar 26 05:38:46 oh Mar 26 05:38:50 that's simple Mar 26 05:38:53 chrome://inspect Mar 26 05:38:58 but you need to connect first Mar 26 05:39:05 so adb devices in command line Mar 26 05:39:08 with phone plugged in Mar 26 05:39:09 yeah, during the hackathon we were on ios Mar 26 05:39:14 ah Mar 26 05:39:25 no idea about ios Mar 26 05:39:28 i also was not the team cordova expert Mar 26 05:39:37 that's why i went around to all the other teams asking for tips Mar 26 05:39:51 Dude Mar 26 05:39:52 most people's responses were "we just alert the errors" or "we log the errors to our server" Mar 26 05:39:57 There aren't that many cordova experts Mar 26 05:40:00 lol Mar 26 05:40:04 so i'm gathering Mar 26 05:40:08 we were also using ionic Mar 26 05:40:11 which made things a lot worse Mar 26 05:40:12 I wouldn't call myself a cordova expert either Mar 26 05:40:18 anyway Mar 26 05:40:21 i gave up on cordova Mar 26 05:40:23 i'd rather learn native Mar 26 05:40:28 The problem with Cordova is, you just have to redo everything Mar 26 05:40:32 Or, SOMEONE does Mar 26 05:40:39 and then it becomes a lot easier for everyone else Mar 26 05:40:40 redo everything? Mar 26 05:40:43 As long as they can see it Mar 26 05:40:53 Like tokens Mar 26 05:40:55 like... everything Mar 26 05:41:01 Except the display Mar 26 05:41:10 Things a web browser can't do for some reason or another Mar 26 05:41:29 well Mar 26 05:41:32 But also that thing/code "bridge" has to be findable Mar 26 05:41:33 so one reason i dropped cordova Mar 26 05:41:44 in the hackathon, we wanted you to get notifications when someone was nearby Mar 26 05:41:49 either by bluetooth or gps or something Mar 26 05:41:52 Java and android has its own learning curves as well Mar 26 05:42:00 and it seemed like it would have been a huge PITA to implement in cordova Mar 26 05:42:01 if not impossible Mar 26 05:42:02 yeah, bluetooth beacons, there are libraries Mar 26 05:42:10 or something Mar 26 05:42:29 it's just that most of these libraries/plugins/bridges are very poorly done Mar 26 05:42:34 so if i want something super native-ee for cordova, i have to go find a cordova plugin for it Mar 26 05:42:38 ? Mar 26 05:42:41 and I can't say mine is perfect but it's better than many others' Mar 26 05:42:46 yeah that's right Mar 26 05:42:53 that's the idea Mar 26 05:42:59 that has slowed adoption Mar 26 05:42:59 this stuff woulda been helpful to know during the hackathon lol Mar 26 05:43:12 but as android matures it changes less Mar 26 05:43:20 that means people can catch up with plugins Mar 26 05:43:26 makes cordova more viable Mar 26 05:43:31 (with Crosswalk) Mar 26 05:44:05 I barely know Android/Java Mar 26 05:44:20 But I managed to put together scraps from here and websites etc Mar 26 05:44:28 ... to make a bunch of little libs Mar 26 05:44:37 but they are barely used Mar 26 05:45:01 one i am sort of proud of Mar 26 05:45:02 is my expansion file plugin Mar 26 05:45:03 what is the difference between crosswalk and cordovav? Mar 26 05:45:12 which has a lot of issues but it is the best Mar 26 05:45:23 and i did steal a lot of concepts from others, but that's who I am Mar 26 05:45:34 Crosswalk adds a chromium build to cordova Mar 26 05:46:18 https://github.com/agamemnus/cordova-plugin-xapkreader here is my reader Mar 26 05:46:19 uhmm... so it uses chromium instead of webkit? Mar 26 05:47:05 well Mar 26 05:47:10 everything does since 4.0 Mar 26 05:47:12 I believe Mar 26 05:47:23 and it's only for 4.0+.... actually Mar 26 05:47:45 it's kind of confusing Mar 26 05:48:07 webkit and chromium are pretty similar Mar 26 05:48:56 http://www.paulirish.com/2013/webkit-for-developers/ Mar 26 05:49:18 It's kind of like.. if I remember correctly.... chromium is on top of webkit Mar 26 05:49:26 and safari uses webkit, their own version Mar 26 05:49:30 android uses chromium Mar 26 05:49:35 android uses blink Mar 26 05:49:37 or Mar 26 05:49:37 uh Mar 26 05:49:38 but the base is webkit Mar 26 05:49:38 nvm Mar 26 05:49:44 or something Mar 26 05:49:46 chrome uses blink Mar 26 05:49:49 and blink is... Mar 26 05:49:50 i don't know the nuances of chromium Mar 26 05:49:55 blink is a fork of webkit Mar 26 05:50:02 webkit = html rendering engine Mar 26 05:50:08 blink is a fork of webkit Mar 26 05:50:10 or something Mar 26 05:50:17 but i think that if you take webkit and edit some core things Mar 26 05:50:20 it'll end up in Blink Mar 26 05:50:46 umm... okay Mar 26 05:50:52 so then Chromium is built on Blink and some other things Mar 26 05:51:02 and the release/browser version is called Chrome.. Mar 26 05:51:38 and.... crosswalk lets you package in a standalone copy of chromium... with custom settings Mar 26 05:51:53 ok Mar 26 05:52:03 that means no waiting for features Mar 26 05:52:25 Less fragmentation Mar 26 05:52:32 anyway Mar 26 05:52:36 my recommendation Mar 26 05:52:53 pick up a java/android for idiots book... if there is such a thing Mar 26 05:53:06 or, try to make a plugin, or modify an existing one Mar 26 05:53:22 if you are into learning things in that way Mar 26 05:53:41 and then ask stupid questions here Mar 26 05:53:53 for certain definitions of "stupid" Mar 26 05:53:59 actually Mar 26 05:54:06 i was at the bookstore a few hours ago looking at android books Mar 26 05:54:11 they're all super archaic Mar 26 05:54:23 and don't really give you a quick run-through Mar 26 05:54:44 Maybe the others would chime in with their ideas. Mar 26 05:55:00 The Android docs are helpful sometimes if you just focus Mar 26 05:55:08 still haphazard tho Mar 26 05:59:14 later, gl hf Mar 26 06:00:47 how do i pull up the command palette in android? Mar 26 06:00:50 studio Mar 26 06:10:15 hey Mar 26 06:10:17 still around? Mar 26 06:10:24 he maybe Mar 26 06:38:12 what's the best way to store a simple string across multiple instances of an app Mar 26 06:38:15 or uh... runs Mar 26 06:38:17 like an oauth token Mar 26 06:41:50 is it stupid to make a singleton class? Mar 26 06:43:09 ProLoser: Not at all, very common. Just don't use a static to implement it. Mar 26 06:43:18 a static? Mar 26 06:43:21 what's a static? Mar 26 06:43:26 like a static class? Mar 26 06:43:48 http://beust.com/weblog/2011/03/10/rehabilitating-the-singleton-pattern/ Mar 26 06:44:09 i found this Mar 26 06:44:11 https://gist.github.com/Akayh/5566992 Mar 26 06:49:33 ProLoser, is it over runs on the app? Mar 26 06:49:50 like when the app shuts down and restarts you still want the data? Mar 26 06:49:57 use SharedPreferences Mar 26 06:50:01 to save the info Mar 26 06:50:31 and then either read that into a singleton or just read it when you need it Mar 26 06:51:43 doing that now Mar 26 06:57:39 john67 here now Mar 26 06:58:06 you found that and what? Mar 26 07:01:50 look at that code how they make singleton Mar 26 07:01:56 i keep forgetting how ugly java is Mar 26 07:02:48 hey lemonxah Mar 26 07:05:59 hey g00s Mar 26 07:06:07 ^^ Mar 26 07:06:58 i am super excited .. got decent internet for the first time since forever .. used to have a 4mb line cause that is all my area could do since monday .. and now http://www.speedtest.net/my-result/4240266969 Mar 26 07:07:02 win Mar 26 07:07:16 its still slow compared to the US and UK Mar 26 07:07:25 but its the fastest you can get in my country now Mar 26 07:07:44 well fastest for home use really Mar 26 07:08:15 http://www.speedtest.net/result/4239423132.png Mar 26 07:08:48 lemonxah wow, I'm in the US and I have only 3Mb/s ;) Mar 26 07:10:43 is that by choice? or cause there is nothing faster? Mar 26 07:10:57 leeds :/ Mar 26 07:12:03 lemonxah fast is very expensive here. i mean, i could probably pay what leeds is paying and get 100Mb/s Mar 26 07:12:25 yeah i am paying $250 for my 40mb Mar 26 07:12:34 :O Mar 26 07:12:40 $250 usd/mo ? Mar 26 07:12:45 US$250/month? Mar 26 07:12:51 so .. i think i win Mar 26 07:12:51 yes Mar 26 07:12:51 that's insane Mar 26 07:13:04 fuck that, its like a car payment Mar 26 07:13:06 I barely pay that per year Mar 26 07:13:13 $250 per month for a 40mb uncapped with a soft cap of 700GB before they start throttling me Mar 26 07:14:24 yes it is :/ Mar 26 07:14:33 and you are not the first person to mention that Mar 26 07:14:39 but i really wanted fast internet Mar 26 07:14:49 south africa is not the place to be for internet Mar 26 07:15:00 what would, say, 10mbit cost you? Mar 26 07:15:14 $150 Mar 26 07:15:30 the 4mb is $100 Mar 26 07:16:10 that is rough estinations based on exchange might be $95 Mar 26 07:16:12 but still Mar 26 07:17:02 lemonxah: is that guaranteed 4mbit or guarenteed 10mbit ? Mar 26 07:17:08 no Mar 26 07:17:11 its upto Mar 26 07:17:14 damn. Mar 26 07:17:20 that's pretty expensive Mar 26 07:17:21 so when i had 4mb line it was running at 3.3 Mar 26 07:17:30 my 10 was running at 8.2 Mar 26 07:17:37 my 40 is running as you can see on 37 Mar 26 07:17:45 at least you can get 40 lol Mar 26 07:18:07 well Mar 26 07:18:09 that is locally Mar 26 07:18:26 if i test international speedtest.net hosts Mar 26 07:18:29 i get max 17mb Mar 26 07:18:34 so that sucks Mar 26 07:18:43 if my phone line is perfect, I'd still get max 24mb, but since my phone line is crap and I'm a long way from the exchange, i get ~12mb Mar 26 07:19:04 I think I'd take the 10mb for $150 and save the $100 per month Mar 26 07:19:09 i live 300 meters from the exchange Mar 26 07:19:12 lemonxah: nice Mar 26 07:19:27 lemonxah: is your 40mbit on VDSL ? Mar 26 07:19:32 yes vdsl Mar 26 07:19:35 not fibre Mar 26 07:19:38 I can't even get VDSL where I am :P Mar 26 07:19:39 we dont have fibre here yet Mar 26 07:19:43 only ADSL Mar 26 07:19:55 they upgrade my street box 4 days ago Mar 26 07:20:00 nice Mar 26 07:20:03 before that i was stuck on 4mb Mar 26 07:21:51 incidentally, because people always suggest it's only local - I get over 100mb on a speedtest to Singapore... I think there are direct cable connections, but it's also 2500km away Mar 26 07:23:02 yeah that sucks .. i hate you now :( Mar 26 07:25:15 * lemonxah dies from envy Mar 26 07:25:49 you'll be glad to know I only get about 14/6 to Cape Town :) Mar 26 07:26:04 heh Mar 26 07:26:14 makes me feel a tiny bit better .. but not a lot Mar 26 07:33:55 can you make a function argument final? Mar 26 07:34:20 ProLoser why are you asking these dumbass questions Mar 26 07:34:30 like Mar 26 07:34:45 i got one for ya: where is the backround setting for the drop down menu ? Mar 26 07:35:02 i'm getting an error saying i can't use a var on an inner class and need to make it final Mar 26 07:35:10 but it's an argument on an outter callback Mar 26 07:35:20 try it Mar 26 07:36:02 i did Mar 26 07:36:06 i'm getting new errors Mar 26 07:37:10 nvm Mar 26 07:37:10 blah Mar 26 07:37:12 variable name mismatch Mar 26 07:37:47 lol Mar 26 07:37:57 ProLoser, i take it you are new to programming? Mar 26 07:38:00 or just new to java? Mar 26 07:38:04 java Mar 26 07:38:09 i do javascript primarily Mar 26 07:38:19 hmm Mar 26 07:38:29 i refactored a class and brought in a separate lib with the previous name Mar 26 07:38:32 seems JS and PHP struggle with ... everything :D Mar 26 07:38:40 so it was an error due to me not doing the refactor perfectly Mar 26 07:38:54 g00s: seems like js and php are scripted languages and java is compiled so... Mar 26 07:38:56 get over yourself? Mar 26 07:39:08 seems JS and PHP *people* struggle with ... everything :D Mar 26 07:39:12 is what i meant Mar 26 07:39:19 ... Mar 26 07:39:38 lemonxah: doesn't help to deal with this shit ^ Mar 26 07:39:47 Leeds do you concur, having followed this channel for half decade now Mar 26 07:40:03 oh god I've wasted 5 years in here Mar 26 07:40:20 the far more pressing matter Mar 26 07:40:33 actually, almost 6: "BEGIN LOGGING AT Sun May 24 14:51:07 2009" Mar 26 07:40:51 lol Mar 26 07:41:01 ihave only been here 3 years Mar 26 07:41:08 i cant believe its that long allready Mar 26 07:41:09 i've been here like... a week Mar 26 07:41:14 :) Mar 26 07:41:55 but yes i find it that people starting with scripting languages like python, js, php find it harder to get going on compiled and statically typed languages Mar 26 07:41:59 but not impossible to laern Mar 26 07:42:02 learn even Mar 26 07:42:12 g00s: to be fair, I get bitten by Java syntax/scope/etc stuff all the time - it's far more complex than most starting languages Mar 26 07:42:16 what is your far more pressing matter? Mar 26 07:42:29 yes .. hence scala :) Mar 26 07:42:36 java syntax is ugly Mar 26 07:42:58 lemonxah lol, when i look at scala its like being goatse'd Mar 26 07:43:03 to get a single ton you have to public class singleton { public static singleton getInstanct() {} } Mar 26 07:43:16 in scala its object singleton {} Mar 26 07:43:18 done Mar 26 07:43:22 lemonxah, you can use an enum :) Mar 26 07:43:34 iprime, exmple? Mar 26 07:43:38 oh yes, enums for singletons is the new thing Mar 26 07:43:58 enum Something { INSTANCE; }... you'd still have to do Something.INSTANCE tho Mar 26 07:44:00 i haven't kept up with the "new" things in java for a while cause i really dont like it Mar 26 07:44:16 java simply comes from a different place, a different design philosophy, from things like php and js Mar 26 07:44:19 java 8 gets better... wonder when we'll be able to use it in Android Mar 26 07:44:31 you wont be able to use it ever Mar 26 07:44:35 mewahahaw Mar 26 07:44:38 haha Mar 26 07:44:49 java is way clunky Mar 26 07:45:03 Leeds: well, not just different place, better place ;) Mar 26 07:45:07 is it only possible to getApplicationContext(); in activities? Mar 26 07:45:13 like vs my singleton utility? Mar 26 07:45:25 p_l have you played with kotlin at all ? Mar 26 07:45:26 p_l: there are cases where each is better :P Mar 26 07:46:12 not just kotlin g00s Mar 26 07:46:19 but like any "new" language Mar 26 07:46:58 ProLoser, from any Context Mar 26 07:48:00 ProLoser, just dont save the context in a singleton Mar 26 07:48:09 oh Mar 26 07:48:10 heh Mar 26 07:48:13 i was about to do that Mar 26 07:48:20 so contexts aren't universal to the app? Mar 26 07:48:25 you can save it weakly Mar 26 07:48:29 erm no Mar 26 07:48:32 i guess it's not necessary Mar 26 07:48:38 yeah you can save it weakly Mar 26 07:48:39 ProLoser consider using Application... or maybe just change your arch Mar 26 07:48:46 i was trying to have my utility do a lot of stuff for me, some of which involved method calls requiring a context Mar 26 07:48:50 and since it sthe application context you technically could Mar 26 07:48:59 i guess i could just pull back on that restructure Mar 26 07:49:01 ProLoser, just pass the context to your methods Mar 26 07:49:41 some samsung phones have multi instance apps... wonder how that plays with using the app context Mar 26 07:53:24 oy Mar 26 07:53:29 i need to use the refactor feature more Mar 26 07:53:41 which ide intellij? Mar 26 07:53:46 android studio Mar 26 07:56:16 Leeds: I can't honestly recommend PHP in any case, except maybe when the other option is either brainfuck or malbolge ;P Mar 26 07:58:03 p_l: :D Mar 26 07:58:10 hey thepoosh Mar 26 07:58:18 hi g00s Mar 26 07:58:52 my boss made a list of change requests that we got since we agreed to commit to the google deadline Mar 26 07:59:09 we're up to 8 Mar 26 07:59:10 change requests from google ? Mar 26 07:59:34 or customers, or boss ? Mar 26 07:59:39 no, from our product and qa team Mar 26 07:59:43 k Mar 26 08:00:46 thepoosh when is the deadline ? Mar 26 08:00:57 next Thursday Mar 26 08:01:16 hmm Mar 26 08:01:38 all the google requirements done ? Mar 26 08:01:50 we are now in the qa cycles Mar 26 08:01:55 everything is sort of met Mar 26 08:02:11 but all sorts of things are rejected by qa or product Mar 26 08:21:53 g00s Up past your bedtime :) Mar 26 08:22:01 capella going to bed Mar 26 08:22:10 heh Mar 26 08:22:11 heh Mar 26 08:22:56 so I'll be alone hacking on moz in the wee hours Mar 26 08:24:02 waitfing for that cpu monitoring stuff, then i will try it again (FF) Mar 26 08:24:31 \o/ Woohoo ! If you can't fix something properly, settle for a hack Mar 26 08:25:39 grand-father the special case, declare victory, go home Mar 26 08:26:18 frackin SwiftKeyboard causes me more headaches Mar 26 08:28:12 "On April 30, 2014, we announced the deprecation of the XMPP Chat API " .... anyone know what Fb replaced it with? Mar 26 08:29:02 g00s: shoot in the dark: a closed proprietary protocol usable only by Messenger app? Mar 26 08:29:13 messenger uses mqtt which is open Mar 26 08:29:21 wonder if they replaced it with mqtt though Mar 26 08:29:36 g00s: is the protocol *on top* of mqtt open too? Mar 26 08:29:56 mqtt just moves byte buffers around ... you have to encode/decode them Mar 26 08:30:07 that's what I meant :) Mar 26 08:30:25 MQTT is just the transport Mar 26 08:30:26 yeah, i dont care about that part/ curious about what is replacing xmpp at the transport layer Mar 26 08:31:27 "RadioShack puts customer personal data up for sale in bankruptcy auction" assholes Mar 26 08:31:44 morning. Can anyone help me how to specify "--core-library" option in Android Studio? I tried defining via dexOptions and modifying dx in build-tools, but none of them seems to work... Mar 26 08:32:23 test Mar 26 08:33:25 * hams Offers Troffel some gum, you want .<~Juicy-Fruit~>. or .<~SpearMint~>. ? Mar 26 08:34:27 I hate tests, the pressure kills me. Mar 26 08:34:59 my IRC client, is often unclear of if it did lose connection while 'sleeping' or not :o Mar 26 08:35:15 I fail them on purpose so people leave me alone and I can go back to work. Mar 26 08:36:39 samsung's at it again... got three crashes yesterday... all stacktraces point to AudioTrack implementation hitting some assert Mar 26 08:38:09 I get a CM11 crash on my GS3 about once every four days. (not samsungs fault). Whne I was stock, it never failed, but that was back around ICS Mar 26 08:40:32 Zharf, Samsung devices are cause of a lot to annoyance when debugging, in my optic Mar 26 08:40:50 hams, how does one red text like a champion? Mar 26 08:46:38 I'm trying to mess with the slidingdrawer in Xamarin, I've got the draw in a FrameLayout, in the drawer is a LinearLayout, in which are some textViews and editText controls Mar 26 08:46:44 I can slide the drawer up Mar 26 08:47:03 but the controls in the drawer are extreamly spaced out Mar 26 08:47:24 I can see the first textView and the first editText only, and there's a massive gap between them Mar 26 08:48:11 the slid out draw is also transperant and controls underneeth the drawer can be... 'clicked' Mar 26 08:48:33 any ideas what I'm doing wrong? Mar 26 08:51:30 Is anyone else constantly getting optimisation tips "You translated the APK into but not the store listing"? I've never translated my app at all Mar 26 08:53:06 duncannz, happens when you use a lib with translated strings Mar 26 08:53:21 EPG: ok that makes sense Mar 26 08:57:41 duncannz, add stripping of resouces to build.gradle Mar 26 08:58:16 that is, list languages you support and Gradle will strip out other language strings Mar 26 08:58:22 so Play Store won't misdetect app languages Mar 26 08:58:26 well I guess it's not a bad thing if someone in a foreign locale gets *some* localized strings Mar 26 08:58:35 from those libraries Mar 26 08:58:41 I'd disagree :) Mar 26 08:58:55 duncannz, the thing is, they'll get app marked as translated to their langauge Mar 26 08:58:58 and then it won't be Mar 26 08:59:04 except for a wierd error message or two Mar 26 08:59:12 causes people to be annoyed :) Mar 26 08:59:23 Troffel, they seem to break everything Mar 26 08:59:32 yeah and I guess it'd be confusing to mix languages. idk, I don't speak more than one language :p Mar 26 08:59:40 so I will follow your advice Mar 26 09:00:22 It's not confusing, it just looks amateurish Mar 26 09:00:48 (Bad translations are the reason why most people here still want their phones to be in english not local language :P ) Mar 26 09:01:05 ACTION_DATE_CHANGED is not working what should i use instead. ? Mar 26 09:01:23 Mavrik: out of interest, where do you live? Mar 26 09:01:59 Zharf, but it's nice if you want to implement features only available to your samsung users :P Mar 26 09:03:10 btw, did anyone test already, does the S6 Edge stuff break layouts in any way? Mar 26 09:11:30 Troffel, I'll just say "don't use samsung, get a real device" to my users Mar 26 09:11:46 unfortunately I can't respond to the crash reports on google play Mar 26 09:12:25 Zharf, I too daydream :D Mar 26 09:13:02 I don't have to care about my users, I'm just providing an application that I wrote for myself Mar 26 09:13:06 :p Mar 26 09:17:17 I think I've fixed the transperancy on my SlidingDrawer Mar 26 09:17:32 but I'm stumped as to why the controls int he drawer are all spaced out Mar 26 09:21:58 it's like there's massive big spaces between the controls on the LineearLayout which is the content of hte slidingdrawer Mar 26 09:22:12 massive spaces or the controls are extreamly big Mar 26 09:23:10 I cant see anything wrong in the axml Mar 26 09:23:17 is there somewhere else I can look Mar 26 09:26:32 humn Mar 26 09:26:44 I deleted them and readded two, and they look fine Mar 26 09:27:27 I don't see anything different in the axml Mar 26 09:27:32 what am I missing? Mar 26 09:28:52 when I added them in the designer the first time I must have done something odd Mar 26 09:29:06 but I don't see how or where that's set Mar 26 09:39:10 ACTION_DATE_CHANGED is not working what should i use instead. ? Mar 26 09:46:49 hi, I am new to android programming, I have started sample "basicimmersivemode", but I am confused. Even though it is easy example I need deeper insight into the code meaning. Are there some additional clarification for newbies like me? Mar 26 09:47:00 s9iper1, maybe create your own alarms? Mar 26 09:49:32 bolovanos, what exactly don't you understand? Mar 26 09:56:15 bolov do you know java Mar 26 09:58:12 bolovanos, not in this channel there aren't - not a good place for newbies Mar 26 09:59:48 omg... xamarin just... removed half the stuff I just did Mar 26 10:00:30 xamarin shmamarin Mar 26 10:00:55 I added another control Mar 26 10:01:04 then removed it Mar 26 10:01:08 and re added it Mar 26 10:01:10 and... Mar 26 10:01:17 a bunch of other controls have been deleted also Mar 26 10:01:26 this is depressing Mar 26 10:01:28 EPG, it begans with structural "complexity" (why is there for such easy thing, two other separate classes, my guess is they are separating activities from each other, but only guess), do not know what code is mandatory in order to show intended result, thats why I am revers engeneering code to find out. ... Mar 26 10:01:33 that bit was working! Mar 26 10:01:46 se5a: Ctrl + Z Mar 26 10:02:16 njcomsec, learning it on the run :) Mar 26 10:02:49 oh phew. yeah control Z did have enough buffer Mar 26 10:02:50 ravilov, any suggestion for better place? Mar 26 10:03:08 probably best to spend a few weeks/months learning regular java first Mar 26 10:04:05 wow now I can say I helped someone with xamarin Mar 26 10:04:31 I'll put that in my resume Mar 26 10:04:46 heh Mar 26 10:05:42 damn, I undid too many times, and it wont redo Mar 26 10:06:17 oh Mar 26 10:06:26 wrong window selected Mar 26 10:06:56 is it a very bad idea to use fragments as recyclerViewItems? Mar 26 10:07:44 now I'm getting No resource identifier found for attribute 'placeholder' in package 'android' Mar 26 10:09:42 it's a bad idea to use fragments with anything ;) Mar 26 10:10:40 fragments arnt the hot thing anymore? Mar 26 10:10:57 they are all i ever hear people talking about in here Mar 26 10:11:22 they're hot, but more hype instead of useful Mar 26 10:12:00 you can easily do the same stuff without fragments Mar 26 10:12:03 i see.... interesting.... before i was under the impression they were some kind of essential tool for advanced apps.... havnt tried them myself yet Mar 26 10:12:16 good to know im not missing anything Mar 26 10:15:38 *sigh* : http://forums.xamarin.com/discussion/23949/weird-error Mar 26 10:15:42 no help there... Mar 26 10:16:32 se5a: there is a #xamarin channel here with 28 people now Mar 26 10:16:40 orly Mar 26 10:29:23 sup goys Mar 26 10:39:26 how do you create drop shadow for xml drawables? Mar 26 10:40:03 bolovanos, countless piles of documentation, tutorials and examples all over the internet Mar 26 10:44:06 i found some ways but it seems way to complicated for something that i think should be simple Mar 26 10:44:11 too* Mar 26 10:44:53 ha, why do you think drop shadows are simple? Mar 26 10:45:01 or should be Mar 26 10:45:32 coming from web development Mar 26 10:46:23 ravilov, I knew that. It must be that Internet everybody is talking about all the time! You could not have been more specific. Mar 26 10:46:25 you just set a few css rules Mar 26 10:51:33 bolovanos, I'm not going to google for you Mar 26 10:52:15 joroci, yeah, pretty simple in css(3), but if that's what you're expecting on android, get ready to be disappointed Mar 26 10:52:51 i dont' expect it to be the same, but it does look too messy Mar 26 10:53:34 that's because it is ;) Mar 26 10:54:10 they are two completely different mediums so it's unreasonable to expect one would look anything like the other Mar 26 10:54:19 do you know a good example of how to do it? Mar 26 10:54:36 no, sorry Mar 26 10:54:41 never needed it so far Mar 26 10:55:02 as far as design goes, I pretty much always stick to what the basic framework has to offer Mar 26 10:55:20 ie. I don't really care much for prettified design :p Mar 26 10:56:18 joroci: drop shadows for what ? Mar 26 10:56:46 shmooz: I think it goes "Turn down for what" actually... Mar 26 10:57:38 for text? or other widgets? Mar 26 10:57:57 * Anthaas|afk isnt funny Mar 26 10:58:09 for xml drawable Mar 26 10:58:11 Anthaas also isn't afk apparently Mar 26 10:58:22 Just got here, but will be again shortly haha Mar 26 10:58:32 that's what they all say Mar 26 10:58:36 that's how it starts... Mar 26 10:58:46 I CAN'T LEAVE! :'( Mar 26 10:58:52 Help me Mar 26 10:59:07 i got an imageview with a background which is the drawable xml and src with an icon drawble(png) Mar 26 11:02:30 shmooz? Mar 26 11:05:01 I'm adding a breakpoint at a line and then I go step by step - until it opens the View.java file. Since I don't care much whats going on View class is it possible to just continue to the next line of my app ? Mar 26 11:05:48 Something like : step by step debugging but without entering "external" classes Mar 26 11:06:39 joroci: sorry there is no simple way to do it like in dreamweaver or whatever you're used to Mar 26 11:07:16 joroci: just compare and pick one of these ways ... https://www.google.ca/search?q=android+imageview+drop+shadow&ie=utf-8&oe=utf-8&gws_rd=cr&ei=fecTVfD9CYL4Uo-5g4gF Mar 26 11:08:51 csst0111, dont step in. step over Mar 26 11:09:14 heh - like doggie-doo Mar 26 11:10:11 no difference I tell you! Mar 26 11:11:19 thx Mar 26 11:28:28 are you guys embracing rx-android yet? Mar 26 11:30:05 it's been a long time since i develop an app. now im trying to catch it all up again. it's so overwhelming seeing these new libraries and framework :/ Mar 26 11:31:46 is there a way to connect 2 BLE devices to a single phone and transmit data? Mar 26 11:48:13 so I got a weird behaviour on a listview Mar 26 11:48:20 its rolling back the adapter changes on scroll Mar 26 11:48:32 and switching the views to the old adapter configuration Mar 26 11:49:50 sounds like some sort of race condition Mar 26 11:50:56 it appears so... Cannot understand which though Mar 26 11:55:39 What is the most convenient android IDE? Mar 26 11:55:49 android-studio Mar 26 11:56:01 unless you're using the NDK then it would be eclipse Mar 26 11:56:02 notepad :p Mar 26 11:56:19 Notepad???? Mar 26 11:56:27 Notepad is very good Mar 26 11:56:29 lots of tools Mar 26 11:56:32 and a great gradle integration Mar 26 11:56:54 it practically writes the code for you Mar 26 11:57:16 Sure notepad can be disaster for this job i guess so Mar 26 11:57:38 basically yea, its making programmers go unemployed for sure Mar 26 11:58:00 Then everything will be command line right? Mar 26 11:59:40 I'm new to android development. I want to write a chat client, which already has a web application Mar 26 12:01:38 xmpp protocol? Mar 26 12:02:03 What is that? Mar 26 12:02:34 dang, yet another newbie here? and yet another chat thingy? so overdone Mar 26 12:02:51 ...you've never heard of XMPP??? Mar 26 12:03:27 good luck with your chat stuff then, lol Mar 26 12:04:06 Lol Mar 26 12:04:13 misaq look into xabber Mar 26 12:04:21 its an open source chat application, maybe you can start there Mar 26 12:04:35 based on what you've been saying in #android, apparently you really like to get yourself into stuff you know absolutely nothing about, misaq Mar 26 12:04:38 first rooting, now this... Mar 26 12:04:48 Hi, I noticed activities got this onSearchRequested callback. Reading docs, they say that it is called when the user start searching. Mar 26 12:04:53 I have no clue how to start searching Mar 26 12:05:00 ravilov, that's how people learn you know. Mar 26 12:05:05 ravilov, stop being an asshole. Mar 26 12:05:10 ravilov getting into shit you know nothing about is how you start learning stuff Mar 26 12:05:12 Mavrik, not in here though, plenty of other resources Mar 26 12:05:33 but I agree, google and books go first Mar 26 12:05:40 Siamaster, that looks like a leftover of 2.3 devices with dedicated search button Mar 26 12:05:42 also, starting way too high is really just setting yourself up for failure Mar 26 12:06:09 ah ok, ty Mar 26 12:06:10 and you learn with failures man Mar 26 12:06:13 I'm too young for that Mar 26 12:06:18 Siamaster, Mavrik, correct (re: onSearchRequested) Mar 26 12:06:25 Thank you guys Mar 26 12:06:47 jvrodrigues, the only thing you can learn with this approach is to next time start at a realistic level ;) Mar 26 12:07:29 someone got out of bed on the wrong side Mar 26 12:07:36 Sure everything good needs lots of work Mar 26 12:07:52 bolovanos, no, I'm always like this Mar 26 12:09:09 ravilov, then keep it for your self, your reactions r not helpfull at all Mar 26 12:09:42 bolovanos, sorry but can't tell me what to do Mar 26 12:09:48 sure we can. Mar 26 12:27:32 So, I've always kind of not understood the point in pointers, or when or why they should be used. Just went for a poo. They make complete sense now. Mar 26 12:27:42 Every programmer should be required to poo when they are struggling with something. Mar 26 12:29:02 that is where I do some of my best work Mar 26 12:32:02 Annoyingly, I normally have some of my best thoughts JUST as Im about to fall asleep. Mar 26 12:32:21 I then either have to commit to getting up and writing them down/implementing them, or forget them. Mar 26 12:34:55 if you force yourself to fall asleep with these thoughts, chances are they will be there in the morning Mar 26 12:34:58 works for me Mar 26 12:36:41 Hmm, could try that. I had an old workmate who believed in the whole being able to control your dreams etc thing, so used to try and design software in his sleep. Mar 26 12:36:54 Having seen his code, I believe he did in fact dream it up. Mar 26 12:37:24 Having read up, I had to laugh at the question: "What is the most convenient IDE?" Mar 26 12:37:50 Which shade of grey is the most grey? Mar 26 12:38:15 all 50 of them Mar 26 12:38:30 Hahaha, well played. Mar 26 12:56:08 Hi, I'm running my app using adb from my phone, how do I refresh it after I make changes to the files in Android Studio? Mar 26 13:02:07 tiatmed: It should be "adb install", but why not just choose Run from Android Studio? Mar 26 13:02:35 Oh sorry, I forgot to update some of my code Mar 26 13:02:38 False alarm haha Mar 26 13:16:13 TacticalJoke: give.me.reddit!! Mar 26 13:16:46 Here you go: https://reddit.com/ :D Mar 26 13:36:57 christ, why are actionbar tabs deprecated Mar 26 13:42:16 cause we knew that you wanted to use them Darkwater Mar 26 13:42:34 why did you have to be so cruel :'< Mar 26 13:56:49 in java, if i only want to synchronize single method (method, not object/class), is there a more elegant way than making new object lock and do synchronized (lock) { ... }? Mar 26 13:57:32 not really Mar 26 13:57:39 you can lock on anything really Mar 26 13:57:49 objects that exists allready Mar 26 13:58:00 but you have to remember to lock on the same object Mar 26 13:58:00 i know Mar 26 13:58:22 Hi all. I'm using this solution to make a slide in animation with Fragments. http://stackoverflow.com/a/22088522/1723525 But how can I do the opposite animation when pressing the back button? Any suggestions? Mar 26 13:58:27 but i hoped for one-liner like synchronized void blah() but per method Mar 26 13:58:50 hi Mar 26 13:59:49 FrancescoV: try fragmentTransaction.setCustomAnimations(...) with 4 arguments Mar 26 13:59:57 sorry for the the question, found the solution: setCustomAnimations(@AnimRes int enter,@AnimRes int exit, @AnimRes int popEnter, @AnimRes int popExit) Mar 26 14:00:18 Ashiren, thanks ;) Mar 26 14:09:40 is there a shortcut to auto include a class cast in android studio? Mar 26 14:15:51 jvrodrigues: In what situation? Mar 26 14:16:05 well Mar 26 14:16:24 when youre casting a superclass to a subclass type variable Mar 26 14:16:24 * adq is looking for the reddit client of TacticalJoke Mar 26 14:16:27 The heck -- I'm getting open-casket funeral videos all over my YouTube suggestions. Mar 26 14:16:38 how is it going TacticalJoke? Mar 26 14:16:39 I'm literally looking at a bunch of dead people. Mar 26 14:16:43 Hey, adq. :D Mar 26 14:16:46 :)) Mar 26 14:16:47 like Class class = (Class) superClass; Mar 26 14:16:55 I want teh (Class) thing to come up automatically Mar 26 14:17:05 cause it gets-me really mad that I have to do that all the time Mar 26 14:17:18 sometimes it does come up automatically but I still havent figured out a way to put it up Mar 26 14:17:26 adq: Yeah, I'm trying to hurry. It's taking forever! Mar 26 14:17:45 i'm still using "reddit for fun" atm, waiting yours Mar 26 14:17:45 TacticalJoke: every day you wait is a day you're not making 83c! Mar 26 14:18:06 I won't have ads or anything. :D Mar 26 14:18:16 TacticalJoke: every day you wait is a day you're not making 0c! Mar 26 14:18:20 lol Mar 26 14:18:26 :) Mar 26 14:19:55 well to be fair its a day he's not wasting 25e Mar 26 14:20:00 jvrodrigues: This works: Mar 26 14:20:11 String s = ( --> Ctrl+Shift+SPace Mar 26 14:20:12 Space* Mar 26 14:20:37 Gotta have dat opening paren, doe. Mar 26 14:21:05 <- living dangerous, AS is in canary Mar 26 14:21:14 It's also a suggestion in the Ctrl+Shift menu. Mar 26 14:21:20 i want to get the current fragment, visible i have tried this method, but the fragement is null http://pastebin.com/fM95FSRe Mar 26 14:21:49 i dont get why, Mar 26 14:22:09 s/Shift/Space/ Mar 26 14:23:51 TacticalJoke, works like a charm, tyvm Mar 26 14:28:23 hey, i've recently become aware of realm, an alternative to sqlite. iirc there are a couple of other sqlite alternatives out there Mar 26 14:28:54 i remember writing the contentprovider code to be one of those most irritating parts of developing android apps (this was 2.5+ years ago, though) Mar 26 14:29:04 hi Mar 26 14:29:07 hello Mar 26 14:29:24 john67, why not pull it from some array you might be passing to the adapter Mar 26 14:29:33 what are the packages I must install the least for dev? Mar 26 14:29:37 images* Mar 26 14:29:39 diphtherial: there's also ways to generate the ContentProvider ;) Mar 26 14:29:42 sdk images Mar 26 14:29:55 ( https://github.com/BoD/android-contentprovider-generator ) Mar 26 14:30:32 content provider is not really that irritating Mar 26 14:30:39 i quite enjoy building my content providers Mar 26 14:30:44 ! Mar 26 14:30:45 and tables and everything Mar 26 14:31:00 very relaxing, and overall rewarding Mar 26 14:31:06 hahahaha :)) Mar 26 14:31:23 yea, im not joking Mar 26 14:31:32 eh, i just remember there being a lot of string concatenation and static fields that just contained column names and silly stuff like that Mar 26 14:31:42 BoD: that's interesting, thanks Mar 26 14:31:44 you mean, like acupuncture Mar 26 14:31:52 well you need to build your database structure Mar 26 14:31:57 but thats not the content provider Mar 26 14:31:59 :s Mar 26 14:32:12 also you could use SQLite and not have a content provider Mar 26 14:32:16 but quite frankly Mar 26 14:32:20 for instance, do I need the ARM images? Mar 26 14:32:27 iprime: how? Mar 26 14:32:29 you're right, i misspoke; i just meant the whole database interaction bit in general Mar 26 14:32:29 x86 images? Mar 26 14:32:38 iprime: can i have more details please? Mar 26 14:32:41 Kartagis: you inly need those if you want to run an emulator Mar 26 14:32:43 *only Mar 26 14:32:47 content providers are what splits professionals from amateurs reallyu Mar 26 14:33:33 i thought being paid is what makes you a professional Mar 26 14:34:18 jvrodrigues, i agree. Copy/pasting from samples or previously written code is indeed what makes you a professional developer :) Mar 26 14:34:32 boilerplate galore Mar 26 14:35:09 liefer you would be surprised how many apps are in the market that run sql queries in their activities Mar 26 14:36:18 Well thats kind of what you would expect, if you make the correct way of doing things a PITA Mar 26 14:36:54 +1 Mar 26 14:36:54 People are lazy. They will cut corners where they can Mar 26 14:37:14 the 'official' way should be easier Mar 26 14:37:18 agreed Mar 26 14:37:35 kind of why i'm tempted to try out one of these alternatives...realm seems ok, but i wonder what else is out there Mar 26 14:37:37 morning. Can anyone help me how to specify "--core-library" option in Android Studio? I tried defining via dexOptions and modifying dx in build-tools, but none of them seems to work... Mar 26 14:37:46 i dimly recall there being a whole bunch of ORMs on top of sqlite available for android Mar 26 14:38:02 yeah but ORMs... Mar 26 14:38:13 there are tons of ORMs available for android really, but yea, ORMs... Mar 26 14:38:19 :) Mar 26 14:38:41 im feeling very controversial today, i actually *like* orms Mar 26 14:38:49 stop hating on content providers and go write yorus Mar 26 14:39:08 I have nothing against ORMs, except perf Mar 26 14:39:13 jvrodrigues: i haven't done any android development in a long time; i don't have anything to write right now, either Mar 26 14:39:25 just thinking vaguely about getting back into it, and i remember that hanging me up way back when Mar 26 14:40:00 well, depending on your database structure, content providers can get lenghty Mar 26 14:40:32 but they really are the least of any developers concern as far as i know Mar 26 14:41:02 kukukk, is your library modular? Mar 26 14:42:43 iprime: It's not a library. It's an Android app with some external dependencies (using components from java.*, javax.* namespace). Mar 26 14:43:17 kukukk the external dependencies are in a library folder? Mar 26 14:43:18 all right, are those dependencies modular, you can exclude certain modules Mar 26 14:43:21 thanks for the opinions Mar 26 14:43:44 Yep, they are in the library folder as *.jar files. Mar 26 14:43:48 iprime: i didnt get what u said earlier , why not pull it from some array you might be passing to the adapter Mar 26 14:44:23 john67, your view pager creates fragments which you instantiate, when you instantiate them do you pass them a Book object? Mar 26 14:44:25 I could try to repackage them using JarJar, but would be easier to specify --core-library option... Mar 26 14:45:09 yeah, i do so Mar 26 14:45:11 can't you use the compiler command line options? Mar 26 14:45:25 john67, where do you pull the Book obj from, an array? a List? Mar 26 14:47:13 oki, will do so Mar 26 14:48:38 iprime: I'm trying to define --core-library as command line option, but I can't find where to define it. Adding it to "dx" in built-tools doesn't seems to have any effect. Mar 26 14:49:43 (The idea came from here: http://stackoverflow.com/a/11090774 ) Mar 26 14:50:44 fuuuuu**** suddenly my app won't use camera in my emulator Mar 26 14:51:05 doesn't throw exceptions neither :( Mar 26 14:51:36 iprime: it doesnt get the current content of variable for me Mar 26 14:52:09 hi, how can i put that checkbox my imageviews inside ? http://paste.ubuntu.com/10684130/ Mar 26 14:53:08 inside imageview? add relativelayout or framelayout and put imageview and checkbox there Mar 26 14:54:51 Ashiren:i mean something like if imageview clicked put verified icon center of image Mar 26 14:55:04 what harm would installing everything do? Mar 26 14:55:09 or tick in the right corner Mar 26 14:58:01 sci-fic, i would make a custom drawable that adds a checkmark image to the corner Mar 26 14:59:44 quinnjn:can i load a verify icon from drawable for that clicked gridview item ? Mar 26 14:59:46 kukukk, editing dx.bat worked for me Mar 26 14:59:47 sci-fic, not the best example but shows how to create a custom drawable that takes in a bitmap and does somethign with it http://www.vogella.com/tutorials/AndroidDrawables/article.html#drawables_custom2 Mar 26 14:59:53 ty Mar 26 15:01:06 I searched developer.android.com for FAB and FloatingActionBar but it found no references except for the samples Mar 26 15:01:42 kukukk, is it just one dependency that's causing that, if so, which one? Mar 26 15:01:44 I don't think Google provides a floating action button. Mar 26 15:01:45 smallfoot-, no official FAB library exists. Mar 26 15:01:54 Oh :( Mar 26 15:02:01 That is so weird! Mar 26 15:02:05 Why is this? Mar 26 15:02:15 to make you code.. ) Mar 26 15:02:20 This sucks... Mar 26 15:02:24 Not RAD at all... Mar 26 15:02:25 iprime: probably not only one, but the first in the list is jaxb-api Mar 26 15:02:28 smallfoot-, there are a ton on github though! i used com.melnykov:floatingactionbutton Mar 26 15:02:44 Yeah, then I have to evaluate a dozen, and compare and then decide on one... Mar 26 15:02:46 not RAD Mar 26 15:02:48 kukukk, tried editing dx.bat yet? Mar 26 15:03:13 Whether Google provides a component is seemingly random. Mar 26 15:03:14 or whatever dx is for your OS Mar 26 15:03:35 Are the ones on GitHub easier to use than the Android sample? Because the sample was onChecked, not onClick, and after changing it to onClick, I never got it to work... Mar 26 15:03:42 iprime: I'm on OSX, so I tried to edit dx. Now I wil try again with restarting Android Studio to be sure that it is not caching it somehow... Mar 26 15:04:00 kukukk, also make sure you're editing the correct dx Mar 26 15:04:21 I have only one build-tools installed. Mar 26 15:04:26 oh Mar 26 15:05:00 is it the one that android studio reports is used when triggering the error? Mar 26 15:05:00 smallfoot-, what android sample Mar 26 15:05:08 quinnjn, the FAB sample Mar 26 15:05:23 quinnjn, https://developer.android.com/samples/FloatingActionButtonBasic/index.html Mar 26 15:08:12 iprime: got it ,its works Mar 26 15:08:31 iprime: Based on project settings in Android Studio (SDK Location and Build Tools Version), I'm editing the correct dx file. But I will make a search and edit all dx files found. Mar 26 15:11:56 kukukk, i'll check on the mac in 30 mins or so, it's strange that it works on windows but wouldn't on macos Mar 26 15:12:06 iprime: thnx Mar 26 15:12:11 john67, great, what are you building? Mar 26 15:13:25 iprime an app with contains the number of people with info in my school, Mar 26 15:13:40 iprime: thanks in advance. In the meantime I will add try to add _echo "dx test" >> ~/dxcall_ to the dx file to see if it even gets called or not. Mar 26 15:22:39 iprime: strange. I edited all dx files found (I used Eclipse earlier, and I had a separate SDK folder for it) and added _echo "dx test" >> ~/dxcal_ to them. But there is no such file generated during build. I don't know how Android Studio works, but there is no dx file call during compile.. Mar 26 15:23:41 kukukk, you should see the error message in Android studio in the Gradle console Mar 26 15:24:16 e.g. for me it's something like: Mar 26 15:24:29 but the problem i have is that the data from the database isnt loaded , when the app is launch, i created an application class for the database.The i have an assert database . i have thread but it still doesnt load the data from the database . i dont get why any idea? http://pastebin.com/L2aeFW91 Mar 26 15:24:52 kukukk: Mar 26 15:24:54 > com.android.ide.common.internal.LoggedErrorException: Failed to run command: Mar 26 15:24:55 C:\...\Android\sdk\build-tools\20.0.0\dx.bat --dex ... Mar 26 15:26:02 i got no error Mar 26 15:26:09 I see this: Mar 26 15:26:10 Execution failed for task ':app:preDexDebug'. Mar 26 15:26:10 > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 Mar 26 15:26:34 But it this not specify that from which file it was called. Mar 26 15:26:46 john67, why do you use Thread? You can try using AsyncTask.. and also it's a good idea to execute db stuff off the main thread Mar 26 15:26:59 ahh Mar 26 15:27:07 It seems I have a newer built-tools version. Maybe it is no longer using dx ? Mar 26 15:27:10 must be something macos specific, i can check soon Mar 26 15:27:29 Ok. I will wait. Mar 26 15:27:52 doubt that, i've got 21.1 something, just used a project with bt set to 20 Mar 26 15:28:14 Ah, ok. Btw, I have 21.1.2 Mar 26 15:29:02 slightly off-topic is agile software still a thing? Mar 26 15:29:25 if it makes managers happy ) Mar 26 15:30:47 there's a title at a company my friend recently joined called 'Agile Developer' Mar 26 15:30:49 continuing from previous time, is there an open source friendly and android compatible SDK? Mar 26 15:31:12 i suspect 4.2 or something might have acceptable licensing but is that really it? Mar 26 15:31:14 Is there a benefit of using AsyncTask over Threads/Handlers? Mar 26 15:31:38 puddy, is it pivotal? Seems like they love that word Mar 26 15:32:04 quinnjn: hah, no. their company is small potatoes Mar 26 15:32:15 Sure they dont just want him to be quick on his feet? Mar 26 15:32:23 Anthaas|2, different API to the same underlying concept Mar 26 15:32:46 So with a good enough understanding of threading, its fine to use that instead of Async? Mar 26 15:32:49 puddy, tried doing a search for Small Potatoes job Agile Developer, no results Mar 26 15:32:50 nfk, SDK for what? Mar 26 15:32:58 haha Mar 26 15:33:06 Anthaas|2, yep, I'd also suggest you use Executors and ExecutorServices instead Mar 26 15:33:06 Mavrik, to develop android applications Mar 26 15:33:08 iprime: never use asyntask, let me try Mar 26 15:33:19 Ahh ok :-) Thanks. Mar 26 15:33:33 sqlite: updating a single row, does it matter if the data in it changes or not? does the SQLiteHelper.update() method return 1 or 0 when it's successful anyway? Mar 26 15:34:07 Mavrik: See, I have a decent enough understanding of threading, problems (Dekker's Algorithm) etc, and how implement multi-threading - but I've never used the higher classes like Executors etc. Mar 26 15:34:26 those are just more elegant APIs to threads :) Mar 26 15:34:37 you still need to know and understand threading Mar 26 15:34:42 Ahh, that'll be nice to have a look at then. Mar 26 15:34:48 There's Java Concurrency in Practice Mar 26 15:34:52 which is an awesome book :) Mar 26 15:35:06 Oh? I'll have to have a look at that. Mar 26 15:35:37 The 2006 book? Mar 26 15:36:11 I guess the principles are probably the same but the API might be a bit dated... Mar 26 15:38:08 saapas: SQLiteDatabase you mean? neither. it's not C. For update() it returns the number of rows affected Mar 26 15:39:51 icedp, yes that. I know it's not C :) but does 'affected' mean the number of rows the WHERE arguments match regardless of whether the data changed or not? Mar 26 15:39:56 Anthaas|2: AsyncTask just uses Thread (via Executors.newFixedThreadPool, I think) and Handler under the hood. Mar 26 15:40:29 Oh, just saw that you'd already had a response. Mar 26 15:40:46 When you first open Google Docs/Sheets/Slides you reach the intro screen which has a grid of your documents. Does anyone know what type of grid this is? Mar 26 15:42:51 Probably a recyclerview Mar 26 15:43:27 I'm trying to use FindClass in jni, and I've included jni.h; but ndk-build is reporting about implicit declarations about it, why is that? Mar 26 15:44:41 SimonVT, I see, and inside the RecyclerView? Mar 26 15:45:57 smallfoot-, https://www.youtube.com/watch?v=yYsO_h6I_Hw Mar 26 15:46:21 installing android studio and the sdk is somehow pain in the ass Mar 26 15:46:32 saapas: I'm quite show the number where where clause matches Mar 26 15:46:35 why are those sdk servers that slow Mar 26 15:46:36 saapas: * sure Mar 26 15:46:54 is there any good resource how to integrate roboelectric in as Mar 26 15:46:55 ? Mar 26 15:47:07 icedp, ok thanks Mar 26 15:48:03 What do you mean inside? RecyclerView and GridLayoutManager can position your views like that.. What kind of views you return from your adapter is up to you Mar 26 15:48:47 quinnjn, thanks! Mar 26 15:49:21 SimonVT, I see. So it can be either RecyclerView or GridLayoutManager? Mar 26 15:49:34 SimonVT, does it use Cards? Mar 26 15:49:34 RecyclerView takes a LayoutManager Mar 26 15:49:40 quinnjn, ah, I see Mar 26 15:51:04 What is it that the Adapter in Google Slides/Docs/Sheets return? Is it a Card? Mar 26 15:51:10 is it possible to trigger touch events from a background service ? Mar 26 15:51:15 hello :) Mar 26 15:52:24 Adapter supplies Views, since Card is a View, it could. Mar 26 15:53:30 I see Mar 26 15:53:50 Looking at Google Slides/Docs/Sheets, what do you think it is in the view of the intro screen? Mar 26 15:54:57 unsure what the intro screen is, but prob a custom view. Mar 26 15:55:16 custom view? Mar 26 15:55:34 class GoogleSlideIntroScreenView extends View {...} Mar 26 16:01:08 kukukk, you are right, it doesn't seem to execute the dx at all Mar 26 16:01:15 i'll check tomorrow, now i'm off Mar 26 16:01:28 iprime: thnx for all Mar 26 16:01:31 iprime: thanks. Mar 26 16:03:17 iprime: if I'm not online and you have some updates, you can also responde here: https://code.google.com/p/android/issues/detail?id=161575 Mar 26 16:08:29 hi Mar 26 16:08:31 question Mar 26 16:08:32 Error:No cached version listing for org.robolectric:robolectric-gradle-plugin Mar 26 16:08:38 what does that mean in android studio Mar 26 16:08:46 what do i have to do to solve this? Mar 26 16:11:11 anyone? Mar 26 16:18:05 does anyone know if it is possible to broadcast touch events from a background service ? Mar 26 16:19:39 Sekundes, somewhat sure that would be a major security flaw if that was possible Mar 26 16:20:35 ok next question :D is it possible to simulate a mouse in android without actually pluging one in Mar 26 16:20:43 for example like the usb host mode Mar 26 16:20:51 when you plug a mouse in Mar 26 16:22:56 Sekundes: i would say that would be even more a security issue Mar 26 16:24:14 this android system is an asshole :( Mar 26 16:24:18 won`t let me do shit Mar 26 16:25:12 all i get is no no no.. why isn't there any constructive talk :D Mar 26 16:25:35 Sekundes: to be constructive. only app i know that does something like that is synergy: http://sourceforge.net/projects/synergyandroid/ Mar 26 16:25:37 Sekundes, should check out #android-root Mar 26 16:25:58 i need to do it without root Mar 26 16:26:04 needs to be an app in the market Mar 26 16:26:05 :D Mar 26 16:26:21 you can add apps that require root to the market too Mar 26 16:26:25 Hi! I'd like that just some users be able to download my app. Can someone suggest a tutorial for me? Mar 26 16:26:45 juliofreitas, using the play store? Mar 26 16:26:46 Sekundes, in general? very likely. with an user app? very unlikely Mar 26 16:28:02 whatitis, yes! Is there another way? Mar 26 16:28:07 i have made a controller for the android phone (hardware and software) Mar 26 16:28:15 but atm it only works in my app Mar 26 16:28:28 probably best you can hope for Mar 26 16:28:30 i want it to be overlayed system wide Mar 26 16:28:35 you can host your apk anywhere, but if using playstore, you can setup tester groups. What's the detail of why you are limiting, is it for testing? Mar 26 16:28:35 ^ Mar 26 16:29:28 Sekundes: do you want something like a floating window? Mar 26 16:29:49 then i don´t understand why you want to simulate a mouse Mar 26 16:30:08 whatitis, no. Will be a material of a makeup course, but just people that make the course can download... Mar 26 16:31:37 if wanting your app hosted on play store, but wanting to limit access i'd say go the G+ Community route and setup a group, but don't publish the app just keep it beta/alpha. But there maybe other options, i'm not sure Mar 26 16:33:08 beo6 i have a controller that works inside my app..and at the moment using it in another app would mean moving a part of my code there Mar 26 16:35:01 Sekundes: maybe you should use intents to give commands to your controller? but i have no idea what you exactly want to do. Mar 26 16:38:15 let`s say for example my app receives x/y coordonates from my laptop's mouse by wireless, and i want to make a mouse pointer move on the phone but not only in my app Mar 26 16:47:47 I'm trying to follow this guide: https://source.android.com/source/building-kernels.html and the dd command (under "identifying kernel version") is giving me a bizarre error "dd: unrecognized operand ‘2610244’" what does that even mean? Google is not helping here :( Mar 26 16:48:26 Sekundes: I think a better question would be what are you trying to achieve? Mar 26 16:48:44 deadmund, #1 wrong channel, #2 read the man page for dd Mar 26 16:48:59 pfn, What channel should I ask in? Mar 26 16:49:00 Sekundes, can't create a fake pointer from an app Mar 26 16:49:05 deadmund, see topix Mar 26 16:49:27 Sekundes, you need to emulate hid, either as bluetooth or usb Mar 26 16:49:37 not something that can be done without root Mar 26 16:49:58 Sekundes, maybe accessibilityservice has something rudimentary that may remotely help Mar 26 16:52:10 getting started in learning how to create web services Mar 26 16:52:26 are normal java servlets the way those are handled in android? Mar 26 16:53:38 I'm sure that was an oddly formatted question, but I don't know a better way to phrase what I'm asking. Mar 26 16:53:44 gonna say no, what are you making, web service on server backend,or something hosted on a device? Mar 26 16:54:43 the works would be done on a server backend and then served up to the device Mar 26 16:56:44 I'm just trying to learn how to that interaction works before in a dummy app before I try and do it with our actual product Mar 26 16:57:18 pfn the problem is i want to sell this app Mar 26 16:57:27 and i doubt many people have their phone rooted :D Mar 26 16:57:36 i mean it would kill a big part of the market Mar 26 16:58:14 Anthaas|2 i am trying to send touch events from a "virtual mouse" Mar 26 16:58:26 i have an app that listens to my virtual mouse Mar 26 16:58:27 the object does a bunch of Natural Language Processing so it is too much to be done on the phone Mar 26 16:58:28 Sekundes, not a sellable app Mar 26 16:58:48 why would you say that pfn ?:D Mar 26 16:58:57 because it's not possible with normal app apis Mar 26 16:59:17 isn`t there a special uber right on android that allows this ? Mar 26 17:00:38 how do I know which kernel (eg. device/samsung/tuna) is appropriate for my device? (Samsung Galaxy Ace) Mar 26 17:00:41 Sekundes, no Mar 26 17:00:56 Sekundes, root is it Mar 26 17:03:20 pfn there has to be another way :D Mar 26 17:03:22 pfn: Sekundes: how about that? https://gist.github.com/mlatu/bd3e681b1aa640c8048e Mar 26 17:03:25 where there is a will there is a way Mar 26 17:03:40 oo_miguel: #android-root Mar 26 17:03:55 SimonVT: ok thank you Mar 26 17:04:19 so icedp i could have a background service that sends adb commands ? Mar 26 17:05:01 icedp, doesn't work from non-root devices, not from a local app Mar 26 17:07:03 pfn: well then maybe Sekundes can make his app on laptop connect to phone via wi-fi and run shell commands Mar 26 17:07:18 more accessible then requiring root Mar 26 17:08:09 icedp, again, not a sellable app Mar 26 17:08:24 if i find the sollution for this i promise you guys a vacation wherever you want when my app sells :D Mar 26 17:08:51 we go get drunk somewhere :D Mar 26 17:09:11 pfn atm i am interested in how to do it without rooting Mar 26 17:09:18 Sekundes, answer is no Mar 26 17:09:33 you are so negativist pfn :D Mar 26 17:09:36 :( Mar 26 17:09:39 the answer is no Mar 26 17:09:45 pfn: never say never. there a bunch of paid app that work only with root. of course it won't conquer the world, but Mar 26 17:10:01 never said that there aren't apps that require root on the store Mar 26 17:10:04 they just don't sell well Mar 26 17:12:08 ok let me ask something else then..is it possible to sell my controller to other developers as an ingame purchase ? Mar 26 17:13:22 pfn: less chances to kick off probably, but not impossible. for instance first thing I've found: mobile odin has 100-500kk downloads and requires root. it has a price of a few dollars Mar 26 17:14:13 icedp, there are some niche items that sell, sure, like clockworkmod what'sit Mar 26 17:14:19 very few Mar 26 17:14:29 pfn: well that was my point, so agreed ) Mar 26 17:24:38 Sekundes, there are ways to send adb commands without root if that is what you are trying todo Mar 26 17:24:45 yes Mar 26 17:24:46 :D Mar 26 17:24:59 how ?:D Mar 26 17:25:09 i've been focusing on it for passed couple weeks with my apps Mar 26 17:25:31 main thing is you do have to have device hooked to computer to turn on adb tcpip tho,just once per boot Mar 26 17:26:12 that seems like an incredibly hackish and shoddy way to do it... Mar 26 17:26:16 if possible to emulate a usb connection a pc/computer would be obsolete, but til then Mar 26 17:26:41 ravilov, it's easy, adb tcpip 5555, boom can issue adb shell access commands Mar 26 17:26:58 that's how my logcat and screen recorder apps work without root Mar 26 17:27:29 you can send emulated presses or keycodes too Mar 26 17:27:58 so the key is in adb commands Mar 26 17:28:09 and i would have to have a background service Mar 26 17:28:15 that sends the commands i guess Mar 26 17:28:21 the key is getting a shell 2000 user running, as apps uids limit you Mar 26 17:29:18 Sekundes: you send them from PC. you don't even have to install any app on the phone Mar 26 17:29:27 my greatest joys was decoding the adb protocol :/ spent weeks on it, to simply find a easier solution that null'd all my hardwork :) Mar 26 17:29:58 stupid LITTLE_ENDIAN format Mar 26 17:30:54 like I said, hackish Mar 26 17:31:04 bah, it really isn't Mar 26 17:31:14 not really documented or reliable Mar 26 17:31:30 also intended for debugging and testing, not real work Mar 26 17:31:49 you have no eye, so your words are just jibberish Mar 26 17:32:05 ... Mar 26 17:36:36 Anyone use Android Studio with jenkins/ci? Mar 26 17:36:36 I have to admit, Im with Ravilov on this. Mar 26 17:38:29 lasserix, I used to use jenkins but with gradle i found it pretty easy to just make a pre-commit hook to check for clean builds and pre-push to check for clean tests Mar 26 17:39:02 hmm okay Mar 26 17:39:07 not up to me but thanks Mar 26 17:39:08 Not the super best solution but took like 10 min to setup Mar 26 17:57:30 I'm having trouble getting my layouts to format properly across different devices... is there anything obvious that I may be overlooking? Like dp vs sp, relative layout, etc.? Mar 26 18:02:05 http://stablekernel.com/blog/the-future-of-the-app-economy/ Mar 26 18:05:34 toast too vague Mar 26 18:05:58 can you post like screenshot comparison and tell us what the root viewgroup of your layout is? Mar 26 18:08:10 dp vs sp shouldn't be issue, use sp for text, as lasserix said show an image Mar 26 18:08:12 one of these days, I'd love to figure out why android studio occasionally does this: http://cl.ly/image/2Z043l3S0b2V Mar 26 18:09:18 groxx lol its goes into a little ball ? Mar 26 18:09:23 groxx my logcat display window does that like 75% of the time Mar 26 18:09:45 i always have mine fullscreen, never saw that one before Mar 26 18:09:53 g00s: yeah, plonks down in the bottom left corner when I start it up. then I have to expand it, fix all my pane sizes, etc Mar 26 18:10:11 seems like it might be related to having last used it on a bigger, lower-density screen Mar 26 18:10:19 uh that would drive me nuts, because i do have to restart it ever few hours Mar 26 18:11:13 lol Mar 26 18:11:42 if you sum android dev itself + AS or eclipse + avd or genymotion and/or physical device + adb thus Mar 26 18:11:58 you certainly being eat by an acorn Mar 26 18:12:17 Hello, I am pretty new to android development, I want to know what is the best practice for storing development & production specific constants like API base url. Mar 26 18:12:32 adq: that's the weirdest haiku I've ever read Mar 26 18:12:36 oops s/acorn/squirrel/ ofc Mar 26 18:12:53 lol sorry Mar 26 18:13:41 i forgot gradle and few things Mar 26 18:13:43 advy: personally, I use buildConfigField in gradle: `buildConfigField "type", "name", "value"`. that way it's automatic when switching build types / flavors Mar 26 18:15:44 Is it possible to charge icon on the navigation drawer to show "up" button" when fragment has a stack ? Mar 26 18:15:45 advy: I usually store them in a .xml file that varies depending on the build flavor Mar 26 18:16:30 fanno the one on the left hand side? use toolbar Mar 26 18:18:47 lasserix: android.support.v4.widget.DrawerLayout tho the one that may be holding the actual "button" may be android.support.v7.app.ActionBar ? is that what you mean by toolbar ? Mar 26 18:19:12 oh sorry nevermind Mar 26 18:19:15 read your question wrong Mar 26 18:19:41 lasserix: np happens to all of us.. well at least me also =P Mar 26 18:23:12 capella chrome on android will finally be less janky http://phandroid.com/2015/03/26/chrome-laggy-scrolling-fixed/ Mar 26 18:23:48 COlor.parseColor should show the color in the column on the left Mar 26 18:24:06 g00s: pointer events fixes that? wat wat wat?? Mar 26 18:25:06 ah "Most notably, pointer event listeners never block scrolling," Mar 26 18:25:22 but each pointer movement performs a hit-test Mar 26 18:25:40 heh - and various compensating performance issues Mar 26 18:26:15 groxx: jaana: Thanks. Also I have seen few projects having a config class to define all general configurations. What will you recommend? Mar 26 18:28:59 advy: personally I like it. buildConfigField is handy for small & simple stuff (that'll appear in a BuildConfig class, alongside e.g. BuildConfig.DEBUG), but if that's not enough, app//src/java/etc/config.java can do anything. Mar 26 18:29:50 advy: at work, we take it one step further with buildConfigField, and also generate resources with the same values. maximum laziness, plus we can swap out e.g. values in the manifest between versions with almost no effort. Mar 26 18:35:04 g00s: I reposted this one earlier over at moz http://arstechnica.com/information-technology/2015/03/chromium-team-reverses-course-will-adopt-ies-merged-mouse-touch-apis/ Mar 26 18:36:44 capella you like georgia right ? http://stablekernel.com/blog/the-future-of-the-app-economy/ Mar 26 18:36:59 "Since 2010, Georgia has seen more than 25,000 new jobs created in tech disciplines." Mar 26 18:37:32 without reading that its probably all based in alpharetta :) Mar 26 18:38:31 and omigod the traffic on I400 :/ Mar 26 18:38:45 "and marketing budgets exceed many new app entrepreneurs’ revenue projections for the next five years." lol Mar 26 18:39:36 fianlly it works Mar 26 18:40:30 Yah, the ad guys are winning coming and going Mar 26 18:40:39 groxx: Thanks that was really helpful. pm? Mar 26 18:40:47 we need to stop paying them to spam us Mar 26 18:40:47 advy: sure Mar 26 18:41:04 heh - like digging our own graves :p Mar 26 18:41:18 that does describe most interactions with ads, yeah Mar 26 18:42:48 funny how under free market advertising should be illega Mar 26 18:42:51 *illegal Mar 26 18:43:00 yet its one of the biggest industries these days Mar 26 18:43:23 why would anything be illegal under a free market? Mar 26 18:43:35 groxx what is advertising? Mar 26 18:43:43 paying someone to tell others about you Mar 26 18:43:58 more generally what does it to do markets? Mar 26 18:44:06 move money from A to B Mar 26 18:44:20 more specifically, in terms of supply and demand? Mar 26 18:44:42 advertising is the artificial manipulation of demand Mar 26 18:45:11 sure. but why is that bad? say you remove all advertising - how does someone get started in the market? Mar 26 18:45:12 which contradicts the principles of free markets where demand and supply should dictate ecomic exchange Mar 26 18:45:42 ah. so "free" == "100% controlled fair playing field" Mar 26 18:45:43 i'm just saying, if free market is that supply and demand determines best economic outcome, then manipulating demand should be illegal Mar 26 18:45:48 just like the finance industry is the artifical production of dubious innovations XD Mar 26 18:46:05 heh Mar 26 18:46:10 lasserix: those ridiculous theories are mortally flawed Mar 26 18:46:14 sure Mar 26 18:46:27 peter thiel does a good job blowing them into tiny little bits, among others Mar 26 18:46:31 well, you can pretty solidly argue that it _doesn't_ manipulate demand, instead claiming that it _allows_ demand to exist Mar 26 18:46:59 it's hard to have demand for something that most people don't know even exists Mar 26 18:47:20 that doesn't mean there's no _intrinsic_ demand, just that there's no _market_ demand Mar 26 18:47:30 groxx you should distinguish between an industry of advertising and organic advertising or whatever Mar 26 18:48:02 I don't think you can actually draw a line between those two. certainly from the high level, but not when you start looking at details Mar 26 18:48:06 am i the only one who finds IntelliJ 14 preferences so much harder to find stuff in than 13 ? Mar 26 18:48:18 g00s: dunno. I always search for everything Mar 26 18:48:27 hasn't changed much for me :) Mar 26 18:49:34 groxx the line is very simple: you dont pay people to want something and talk about it, but you do pay an advertising agency to stimulate such talk Mar 26 18:50:28 lasserix: how does e.g. Dropbox's "invite a friend, you both get xGB" fit into that? Mar 26 18:50:35 no Mar 26 18:51:09 i am specifically talking about the multi-billionare dollar industry that knows how to entirely break someone down to turn them into a vessel of artificial desire Mar 26 18:51:13 eg modern advertising Mar 26 18:51:32 modern society you mean Mar 26 18:51:38 ok, so say you pay someone else to manage your dropbox-like sharing system Mar 26 18:51:47 you know, software-as-a-service Mar 26 18:52:11 now they could be collecting billions, if they were the most successful. where does that fit in? Mar 26 18:52:38 that's not the advertising industry i am refering too Mar 26 18:53:23 how is it different? you're paying someone to manipulate people -> manipulating demand Mar 26 18:54:21 advertisers explain they're happy to do better jobs of targetting ads more appropriately but they never consider that the problem isn't the appropriateness, but the *volume* of adds ... nobody is spending that much of their time considering purchases Mar 26 18:54:38 "let me breathe" ;) Mar 26 18:54:43 id argue something like its not an artificial stimulation of demand since by offering your service for sharing, you are providing a service. you aren't brainwashing people with slogans on the television that dropbox will make their dreams more peaceful and kids for affectionate Mar 26 18:54:58 capella: yeah, but the concept of "mind-share" exists, and we think it has value :) Mar 26 18:55:08 capella: though I agree, the volume is absolutely stupid right now Mar 26 18:55:26 yah .. it hits the point of diminishing returns and just doesn't stop Mar 26 18:55:35 then they get mad cause people install ad blockers Mar 26 18:56:38 for ads to be more effective, they have to be more targetted to an audience receptive to that signal, which requires invasive collection of data and loss of privacy Mar 26 18:56:46 lasserix: xGB free can be pretty easily compared to "give you X$ every month", depending on if you claim "discount" == "money gained". so the SaaS dropbox xGB sharing thing is not only paying to advertise, it's paying _individuals_ to manipulate them directly. and this is different from TV ads saying "use code X, save $!" how? Mar 26 18:56:54 capella: but volume is just one face, the reality of how "ugly" it gets goes way, way deeper. the life-long biases it creates in people is amazing: for instance, how much of society's concept of love, romance, family, success, happiness etc etc refracted through how advertising want us to think of these things, Mar 26 18:57:09 Now if they could check, when was the last time someone asked this guy if he wanted to buy a car? Mar 26 18:57:25 and the answqer was 15 times in the last 5 minutes Mar 26 18:57:29 to be clear, I think most people dislike advertising, and for good reasons :) no intent to debate that point. Mar 26 18:57:33 g00s, wrong for ads to be effective, they just have to target the idiots :) Mar 26 18:58:02 groxx: offering free gigabytes for trying the service again is very different from trying to sell the idea that having gigabits with dropbox will make you a better person Mar 26 18:58:02 men, consider the technics of the 80's that advertising use(d), like anticipating your eye movement with a particular well-known pattern Mar 26 18:58:06 thats why google wants to know what you actually buy. amazon knows this of course Mar 26 18:58:08 we are in ... 2015 Mar 26 18:58:11 and the adver-weasals have no problem assuming we're all the idiots Mar 26 18:58:11 not just what you click on Mar 26 18:58:17 now "feel" the ga Mar 26 18:58:18 gap* Mar 26 18:58:43 but, I'm clearly off-topic now :D Mar 26 18:58:46 also why i wont let google have any part of my financial transactions Mar 26 18:58:51 we're beyond what can be evil to just stimulate a fake need on someone lol Mar 26 18:58:55 lasserix: I think that's moving the "free market" needle way into another dimension, but if your argument is that ads now are immoral in their techniques: agreed. Mar 26 18:58:56 sorry for introducing moral with "evil" Mar 26 18:59:12 hard to define, but agreed. Mar 26 18:59:58 groxx: heh, sorry im not investing myself enough in this conversation, being too general (at work trying to get stuff done) but i mean specifically more than immoral Mar 26 19:01:09 offering current customers free gigabytes for inviting other people to use the service is, although i'd have to build the arguement, much different than paying an organization to determine the best way to brand dropbox so people will feel they need it Mar 26 19:01:12 lasserix: no worries :) Mar 26 19:01:55 probably the easiest way to differentiate is again, you're not paying an advertising agency when offering your customers free gigabytes to invite others Mar 26 19:02:06 how about doing your own market research, then branding yourself off the results? Mar 26 19:02:09 lasserix: read "The New Industrial State" Mar 26 19:02:26 hate to tell you but what you're railing against is how the world works, it's the only reason you - and all of us - are even employed Mar 26 19:02:42 groxx: i dunno have to think about it more, just would like advertising to be legally curbed at some point Mar 26 19:02:53 myke: pretty sure we're aware of that. doesn't mean it can't be better though. Mar 26 19:02:54 im kinda afraid of the subliminal ads that will infect our VR headsets in the future Mar 26 19:03:11 subliminal is not very efficient Mar 26 19:03:14 heh. especially with facebook in the mix Mar 26 19:03:32 adq what do you mean? subliminal 24x7x265 is very, very effective. Mar 26 19:03:33 myke is that a book? Mar 26 19:03:40 g00s: it's a very famous book Mar 26 19:03:51 upends that ridiculous adam smith era nonsense Mar 26 19:04:01 subliminal == 1 image injected which has nothing to do (or almost nothing to do) on 23 other images of a one sec Mar 26 19:04:17 it has been tested a lot Mar 26 19:04:32 nah, that's just a subliminal _technique_. the term is much more broad. Mar 26 19:04:47 ahhh sorry iwas very strict on the term Mar 26 19:05:07 myke adam smith is not totally without grounds, just if you confine yourself to one village in the 1700s. Mar 26 19:05:16 and yeah, the flashes of images are pretty solidly established as "nowhere near as effective as we once thought/hoped" Mar 26 19:05:25 i saw something much more broad which makes me think of it, was pretty clever, in a serie i don't recall which one, they turn a can of coca-cola, like you hide to not show the brand Mar 26 19:05:32 right, in the 1700s, when lack of technology doesn't allow organizations to grow to any kind of size Mar 26 19:05:37 but the fact it was hidden instantly trigger my mind, and i recognize the coca-cola can Mar 26 19:05:41 i think it was the main goal Mar 26 19:05:51 and is totally irrelevant in today's world of corporations larger than some countries Mar 26 19:06:38 i have a for loop inside it i have if condition and else condition i m running a method in else condition than BREAK but its getting me out of condition i want to come out of the loop as well how can i do that ? Mar 26 19:06:51 you hide something partially to got the inverse effect at the watcher side Mar 26 19:07:03 s9iper1: make it a function and return() ? Mar 26 19:07:09 not to mention the wealth of nations was really a critique of mercantlism, rather than an explanation of capitalism. that's what das kapital is for :) Mar 26 19:07:37 s9iper1: there is a a way that's like goto one sec Mar 26 19:07:38 lasserix: wow, not many people have actually read Das Kapital and realize it's a great analysis of capitalism Mar 26 19:07:59 i dont understand Mar 26 19:08:04 s9iper1: http://stackoverflow.com/questions/886955/breaking-out-of-nested-loops-in-java Mar 26 19:08:13 thanls Mar 26 19:08:17 s9iper1 lasserix: there's "label_name: for (watever) { break label_name; }", if that's what you're thinking about Mar 26 19:08:17 thanks Mar 26 19:08:19 :) Mar 26 19:08:29 myke what really blows my mind is he wrote it at the library Mar 26 19:09:52 hi!, someone knows how to correctly capture an image from default camera app ?? I mean... i'm confusing wich is the correct path to store image Mar 26 19:09:56 lasserix: didn't know that Mar 26 19:10:01 myke idk if they still do this on stage, but it's pretty fun (lots of good jokes) http://www.marxinsoho.com/ Mar 26 19:10:34 myke yeah while he was more or less broke all the time, he'd go from his apartment to the library (probably cause he did so much research) Mar 26 19:11:30 feathersanddown: believe the camera app pushes it down in to DCIM or pic or whatever, you can get the id in onactivityresult from the intent and then use mediastore to find it again Mar 26 19:11:44 oh' and to finish on the ad topic (myself at least), let me quote the last chomsky "commandments": "Getting to know the individuals better than they know themselves" Mar 26 19:11:48 game over. Mar 26 19:13:03 adq: i think the internet already won there. i've already encountered security questions listing addresses i may have lived at, and i couldn't pick the right one. Mar 26 19:13:59 internet helps a lot to collect many/much meta-data which alone cannot be "patternized" Mar 26 19:14:23 and without internet which would never been reached "almost instantly" Mar 26 19:15:10 why would a flashlight app want access to my media files Mar 26 19:15:13 adq yes advertising requires surveillance ;) Mar 26 19:15:14 lol Mar 26 19:15:27 why the NSA loves google and other companies that concentrate this information Mar 26 19:15:38 they do their job :)) Mar 26 19:15:54 also why there is a revolving door between NSA and silicon valley Mar 26 19:15:55 so it reduces the cost of NSA Mar 26 19:17:23 meanwhile, back in the barnyard - looks like dagger 2 is almost here? i need to find an article on what dagger 2 offers from ground up Mar 26 19:17:44 back to code, right ! :p Mar 26 19:19:30 Sculptor: _probably_ they are just using it for external storage. very very very likely it's for some horrible reason though. Mar 26 19:19:57 anyone know what happens you call pause on a mediaplayer that is buffering? Mar 26 19:20:19 Sculptor: fwiw I've used this in the past. no un-necessary permissions whatsoever: https://play.google.com/store/apps/details?id=com.nionsoftware.flashlight Mar 26 19:20:31 groxx: they should need exeternal storage, imagine a flashlightapp internal storage would be enough! Mar 26 19:21:16 yeah. in general I see "app that obviously has no need for storage, requesting external storage" == "they're using it to download big interstitial ads" Mar 26 19:21:46 not _nefarious_, but not something you want. Mar 26 19:22:38 oh yeah usually the ad sdks want all that Mar 26 19:24:24 lasserix its not working here is the little code http://paste.ubuntu.com/10685584/ Mar 26 19:25:35 hmm maybe doesn't work with single loops? Mar 26 19:25:38 anyways just set a flag? Mar 26 19:25:46 boolean shouldStop = false; Mar 26 19:25:53 for () if (shouldStop) break; Mar 26 19:25:57 settingAlarm(Context context, int TEN_MINUTES) :O Mar 26 19:25:58 else shouldBreak = true; Mar 26 19:26:01 TEN_MINUTES = 20; Mar 26 19:26:08 ok Mar 26 19:26:11 where is your god now s9iper1 Mar 26 19:27:25 #define true false Mar 26 19:27:32 it looks like break OUTER is intending to skip the loop and exit the method, why not just "return;" ? Mar 26 19:27:37 or is this a snippet? Mar 26 19:27:47 i think outer: is in the wrong place Mar 26 19:27:52 #define if return Mar 26 19:27:53 ooo gotcha Mar 26 19:27:57 ok Mar 26 19:31:01 i have a fairly simple question ... i see these "@" symbols inside of activity_main.xml and i presume that they connect to resources somewhere else in my android studio project Mar 26 19:31:19 is there a reference where I can find out more about this syntax and how to utilize it? Mar 26 19:31:40 are you thinking annotations, like @Override? Mar 26 19:31:47 no, not in java Mar 26 19:32:20 http://developer.android.com/guide/topics/resources/layout-resource.html Mar 26 19:32:23 for example I see: android:paddingLeft="@dimen/activity_horizontal_margin" Mar 26 19:32:29 ok let me look into that Mar 26 19:32:30 thanks Mar 26 19:32:45 more generally here http://developer.android.com/guide/topics/resources/layout-resource.html Mar 26 19:32:50 ok great Mar 26 19:33:03 but you can define things in xml, via styles or whatever, then use @ to distinguish types Mar 26 19:33:13 that second link is the same as the first Mar 26 19:33:19 was that intended? Mar 26 19:33:37 so somewhere someone defined 48dp say in styles.xml Mar 26 19:34:05 then later you can use this in your layout or (even code via context.getResources().getDimensionxxx) via @dimen/ac.. Mar 26 19:34:15 *http://developer.android.com/guide/topics/resources/available-resources.html Mar 26 19:35:48 oh nice Mar 26 19:35:51 that sounds useful Mar 26 19:36:55 man video is pain Mar 26 19:37:20 still got em VideoView woes? Mar 26 19:37:40 its getting there Mar 26 19:37:50 problem is i have like a billion different states Mar 26 19:39:31 start state, buffering state, buffering when touched, buffering when touched having been touched, buffering when touched and paused, buffering when touch and resumed, playing, playing when touched, playing when touched and touched again, palying when touched and paused, playing when touched and resumed, * when touched and fullscreened, when rotated, when stoped, not to mention this just a base class since the overlay Mar 26 19:39:31 is different for each camera stream type, oh yeah also forgot when there is an error! Mar 26 19:40:12 and the lovely fact this view is deep inside a viewhiearchy and full screening changes everything from the activity down Mar 26 19:41:37 you should make a library when you got it all figured out Mar 26 19:42:11 maybe Mar 26 19:42:17 essentially it is the youtube videoview Mar 26 19:43:12 is there an xsd style documentation for these xml files that tell me the valid syntax? Mar 26 19:44:31 if your using AS trial and error Mar 26 19:47:15 hrm... i've noticed that on the emulator, when the thread count rises above about four, background threads will actually block the UI thread (progress bars will stop animating, for example) Mar 26 19:47:27 i get none of the usual warnings about the app "doing too much work on the UI thread" in the log Mar 26 19:47:33 is this just a quirk of the emulator? Mar 26 19:48:09 by "thread count", i'm not including the UI thread in that count Mar 26 19:49:21 it seems like it doesn't block the UI thread in the sense that the documentation usually means (doing too much work on the UI thread), but more like the UI thread just isn't scheduled to run by the OS Mar 26 19:59:56 rmk0: hm. doesn't ring a bell. but by "progress bars will stop animating" do you mean "they will get stuck at 0% for a while"? Mar 26 20:00:33 4 is suspiciously close to "main thread + the three default background asynctask threads". if you're doing a lot of long asynctasks, they'll queue up behind each other, which can be surprising Mar 26 20:02:08 rmk0: emulator is usually much slower than devices Mar 26 20:02:41 groxx: i'm actually using a separate executor. just a fixed sized pool of four threads Mar 26 20:03:03 groxx: i didn't mean stuck at 0%, they're indefinite progress indicators... just meant they stopped rotating Mar 26 20:03:42 rmk0: yeah that can happen Mar 26 20:03:48 did you set their priority to BACKGROUND? Mar 26 20:04:01 hm. what's the emulator? intel + haxm + gpu acceleration = faster than any physical device, but the arm ones can be surprisingly slow Mar 26 20:04:01 lasserix: default priority Mar 26 20:04:12 ah. that could be it too :) Mar 26 20:04:17 hm, right Mar 26 20:04:25 i had done an app where we scoured all native databases on the phone and initially i used as many threads but had that same problem Mar 26 20:04:34 makes sense, i suppose... i don't usually bother to set thread priorities in ordinary desktop/server java Mar 26 20:04:45 imagine it might matter a bit more in Android Mar 26 20:04:50 yeah it is recomended Mar 26 20:05:07 the emulator is an intel atom without gpu acceleration, for the record Mar 26 20:13:47 i`m a lil confused about if it is ok to store a context in a member in a non-activity class. I thought its ok as long as the object of the non-activity class is held by the activity, that the context belongs to (hope its well enough explained ;) ). Google gives me different opinions on this. what do you say? Mar 26 20:14:50 myke: http://downloads.bbc.co.uk/podcasts/radio4/rla48/rla48_19661204-0900b.mp3 Mar 26 20:16:42 adkins don't let the context outlive the lifecycle of its origin Mar 26 20:16:51 *context reference Mar 26 20:17:00 if true then you are fine Mar 26 20:17:21 setting the thread priority with android.os.Process.setThreadPriority seems to have helped Mar 26 20:17:35 that will help Mar 26 20:17:42 you also want to check num of cores Mar 26 20:17:43 if 1 or 2 Mar 26 20:17:46 only use 1 Mar 26 20:17:48 in a queue Mar 26 20:17:53 right Mar 26 20:17:55 even if there are 4 Mar 26 20:18:03 better to use 2 with a queue Mar 26 20:18:04 lasserix: should i set the reference to the context in the non-activity class to null in onStop? Mar 26 20:18:17 adkins or the object itself Mar 26 20:18:30 ondestroy is fine Mar 26 20:18:37 stop is called almost all the time it goes BG Mar 26 20:18:48 itself? this=null? Mar 26 20:19:13 in activity, mObjectWithContextRef = null or in ObjectWithContext you can do ctxt = null; Mar 26 20:19:13 mContext=this; and then mContext=null in onDestroy? Mar 26 20:21:17 lasserix: so if i have f.i. objects of 1000classes that have reference to the context, i can just set mObjectWithContextRef = null and dont need to worry about setting all the references in the 1000objects to null? Mar 26 20:23:08 this seems just to be too simple for avoiding leaking references to context ;) Mar 26 20:27:11 you could also use WeakReference's to hold your context Mar 26 20:27:13 even easier yet Mar 26 20:28:04 i was told to not use weakReferences, but forgot to ask why ;) Mar 26 20:31:47 weakreferences don't quite match the lifecycle of your contexts Mar 26 20:32:30 there are points where a weakreference outlives the activity it represents Mar 26 20:32:34 most of the time it is fine Mar 26 20:32:38 http://time.com/3158893/smartphone-apps-apple/ Mar 26 20:33:02 adkins, to answer your question yes as long as no one else holds a reference to those objects that outlives Mar 26 20:33:37 lasserix: what question do you mean? Mar 26 20:33:44 so if you have an object in your activity you instantiate it, pass it the activity context, then pass a reference of that object to some singelton, setting null in the activity won't matter because the singleton will still retain the reference Mar 26 20:34:44 lasserix: yes i learned that, not storing context/views anymore in applicationObject ;) Mar 26 20:36:10 so is it safer to pass context and set it to null in onDestroy than using weakReference? Mar 26 20:36:22 adkins safe is all a matter of use Mar 26 20:36:39 wouldn't the lifecycle issue still exist if you weren't using weakreferences? Mar 26 20:36:57 ? Mar 26 20:37:37 quinnjn: its something like a weakreference in a async task will not necessarily be null even though an activity has gone through destroy Mar 26 20:38:12 yeah, but a Context field in an async task would not necessarily be null even though an activity has gone through onDestory as well. Mar 26 20:38:25 if i use weakreference i could imagine that that context might get garabageCollected while i still need to use it, but since its a weakreference...... Mar 26 20:39:42 yeah Mar 26 20:39:45 *that was it Mar 26 20:39:58 hmm... not too familiar with weakrefs but isn't the whole point that it doesn't matter if the ref outlives the referred object? because, y'know... it's a weak ref anyway :) Mar 26 20:40:00 but if i dont use weakreference and set the reference to null in onDestroy......what if onDestroy doesnt get called? Mar 26 20:40:06 http://www.androiddesignpatterns.com/2013/01/inner-class-handler-memory-leak.html Mar 26 20:40:13 adkins: you don't care Mar 26 20:40:28 if ondestroy wasn't called it means the processing is being torn down and all references are kaput to end with Mar 26 20:40:57 kaput? do you mean kaputt? are you german too? ;) Mar 26 20:40:58 *the process Mar 26 20:41:05 kaput == null Mar 26 20:41:43 kaput=null? Mar 26 20:42:00 kaput equals null? Mar 26 20:42:08 never heard of that word Mar 26 20:42:41 http://www.oxforddictionaries.com/definition/english/kaput Mar 26 20:43:11 without tricks in a cardgame Mar 26 20:43:20 sounds like a reference being gobbled up by the gc to me Mar 26 20:43:47 Late 19th century: from German kaputt, lol Mar 26 20:43:56 and i`ve never heard it Mar 26 20:44:09 so many things we've never heard of, you know ;) Mar 26 20:44:29 thank god i`m coding ;) Mar 26 20:44:33 because i'm french, i know the term from the card and because i learn german "alles kaput" Mar 26 20:44:37 learnt a bit of* Mar 26 20:45:15 How do you handle light/dark icons for android L? I'm trying to use drawable aliases for a notification bar remote view and it's not using the drawable-v21 bitmap alias I'm setting Mar 26 20:45:17 ;) Mar 26 20:45:27 http://pastebin.com/BjsaLmLK Mar 26 20:45:31 I think both techniques are going to work fine. For new eyes though, the field `WeakReference mContext` is going to research it where just `Context mContext` is prob going to be used wrong. Mar 26 20:45:46 adkins, are you looking for dev advice or looking to discuss language? :p Mar 26 20:46:02 lasserix: "if ondestroy wasn't called it means the processing is being torn down and all references are kaput to end with" so they wont be kept alive in memory automatically? Mar 26 20:46:30 if ondestroy isn't called it means the os is killing your process which means its reclaiming that memory so all references in that process are null and void Mar 26 20:46:34 ravilov: ;) Mar 26 20:46:35 yeah if onDestory isn't called its prob cause the app is being killed anyways, and will be removed from memory. Mar 26 20:46:51 thx Mar 26 20:47:39 this is why it's a bad practice to flush some persistent disk cache @ ondestroy, but it's better to clean the cache at launch Mar 26 20:47:51 since sometimes, ondestroy will never be called Mar 26 20:47:55 basically if onDestroy isn't called it means something is very wrong and your app is not shutting down normally Mar 26 20:47:55 or doing analytic calls Mar 26 21:02:07 Hello guys! I'm using YoutubePlayerFragment, but it's leaking a resource or something. Android crashes (in STICT MODE) saying I must call "release" method. but where? how? Mar 26 21:05:04 Mattx, post the stacktrace Mar 26 21:09:28 quinnjn, https://gist.github.com/anonymous/b5fea8859897c01a8aba Mar 26 21:09:39 it happens when I rotate the screen Mar 26 21:10:26 I am using Picasso library and every once in a while the images are returned null. I had other issues but never got null images from the camera before using this library. I see it reported here but didn't find a solution https://github.com/square/picasso/issues/495 Mar 26 21:10:53 I guess the player view is detroied without releasing the resource that it was using (surface? not idea) Mar 26 21:24:01 lasserix: i just played around a bit....this: http://pastebin.com/kA8vUg6d works. This: http://pastebin.com/xVpcL9ND creates a leak though. From what you said i thought the second one should work too? Mar 26 21:24:43 lasserix: i used a different method to find the value, i pass through the adapter Mar 26 21:32:13 adkins: not sure, but NonActivity should be recycled as soon as activity is gced Mar 26 21:32:21 my guess is activity is cached instead of being destroyed Mar 26 21:32:47 and since nonactivity still holds a ref to mcontext and is not being nulled as the activity/process is cached, it creates the leak Mar 26 21:35:16 lasserix: ok.....well it seems that almost anything i passed to the non-activity-class in my project creates a leak if i dont null it in the nonActivity-class Mar 26 21:35:45 directly Mar 26 21:36:28 as i said, the os will cache your activities / processes even if ondestroy is called (sometimes) therefore you need to set anything to null that holds a ref, since nonactivity keeps mContext alive even if activity set it to null Mar 26 21:36:48 *another way to say that, is w/r to activity mContext is dead, but since nonactivity has a ref, it is still well and alive and not gcable Mar 26 21:38:39 lasserix: ok, so i`m thinking of putting some relase function to all classes for removing all references just to be sure. what do you say? Mar 26 21:40:01 adkins, sounds good man. I'd call it destroy() though. Mar 26 21:41:07 quinnjn: i am a woman Mar 26 21:41:19 sorry, hard to tell on irc :) Mar 26 21:41:27 quinnjn: just kidding ;) Mar 26 21:41:36 also hard to tell on irc haha Mar 26 21:41:46 ;) Mar 26 21:46:22 adkins, on some projects, because the state can be indetermined (but is still deterministic somehow), i simply at initilization (could be in a regular onCreate, onResume, etc.. or in a specific init function but let's say it's called when you start an activity), i test against the object (a simple if foo == null) and initialize it if found null, so whatever the state, i always be sure to start with the Mar 26 21:46:22 state i want Mar 26 21:47:17 bpe: sorry, i dont get it Mar 26 21:47:40 Hi all! For BLE device discovery I can use either startLeScan() or startScan(). But it says in the documentation that startLeScan() was deprecated in API level 21 and that I have to use startScan() instead. But if I use the newer startScan() method, will this also work on API 21 and below? Mar 26 21:47:48 i guess you are checking and doing something in onCreate but not really getting what Mar 26 21:47:56 https://github.com/pfn/keepassj Mar 26 21:48:00 heh, as if there weren't enough already Mar 26 21:48:11 there can never be enough keepasses Mar 26 21:48:15 osollovan, oh i know this one! use LeScan if you can cause its better on battery life IIRC Mar 26 21:48:23 oops adkins, i think my windows scrollign was blocked on : lasserix: "if ondestroy wasn't called it means the processing is being torn down and all references are kaput to end with" so they wont be kept alive in memory automatically? Mar 26 21:48:23 just wrap it with a api level check Mar 26 21:48:30 a bit late.. Mar 26 21:49:01 thanks quinnjn, and this should work on API 18 (for instance) as well then? Mar 26 21:49:34 bpe: ok i know what you are refering to now, but still dont get what you are trying to say Mar 26 21:49:58 Oh I'm sorry you said LeScan. Will this work on API21 and above? Mar 26 21:50:01 I'm setting layout_weight=0.35 to View1 and weight 0.65 to View2. but View1 is bigger than View2. should it be the opposite? Mar 26 21:50:05 you have to take care of the ref at the beginning Mar 26 21:50:07 mainly Mar 26 21:51:44 bpe: are you saying that, if a reference is leaking memory, lets say a passed context from MainActivity to NonActivityClass, i could check in onCreate after restarting app if member_NonActivityClass == null and create it only then? Mar 26 21:51:54 and i can still use the old member ? Mar 26 21:51:57 osollovan, I meant use startScan if API >21, otherwise use the older one. I can't find any info now but I do remember API 21 brought a lot more benefits than previous. Mar 26 21:52:16 not sure it would be recommended for a ref like an Activity, but for a regular object yes Mar 26 21:53:48 bpe: ok, i`m trying to avoid leakingPreferences to context/activity currently, i`d say this wont work in that case Mar 26 21:54:58 cant imagine i could reuse an object from a leaking activity Mar 26 21:55:02 ;) Mar 26 21:57:08 Retrofit SIGSEGV!!! http://pastebin.com/P4ycKRSA My retrofit adapter is getting a list of URLs and then loading those urls, ~50? Not sure if it's my phone that's broken or something else; It's not a guaranteed occurance Mar 26 22:03:25 it's not retrofit Mar 26 22:03:45 you just happen to be on one of its threads Mar 26 22:04:19 What would be a good 1st step to debugging this? Mar 26 22:04:22 quinnjn, I read online that I alwasy had to use the latest API as targetSDK (which is 22). Does this mean I cannot use startLeScan with this? Mar 26 22:07:38 osollovan, you should use a check such as: (android.os.Build.VERSION.SDK_INT>=21){ ...startScan(...) } else { ...startLeScan(...) } Mar 26 22:11:47 I am calling some statements in my onDestroy method and when i minimize my app(pressing home button or back button) those statements are not called and when i restart my app then they get executed. Why is this happening? Mar 26 22:24:08 i have a question Mar 26 22:24:08 thanks quinnjn, if I wanted to build an app that would run on api 18, 19, 20, 21 and 22 (every api that supports BLE) is it hen best to build the app with these different SDKs (18 through 22) and only use LeScan for api < 21? Because I read online that it was common to always use the latest API as target sdk Mar 26 22:24:20 i have oauth to spotify Mar 26 22:24:30 i get an access token and want to store it so i'm putting it in shared prefs Mar 26 22:24:46 i was thinking of relocating the storing (and usage?) of this token inside a singleton utility Mar 26 22:24:59 but the thing is storing the token requires a uh... activity object? Mar 26 22:25:12 activity.getSharedPreferences Mar 26 22:25:18 osollovan, oh sorry. Using that same tactic change the else to `else if(android.os.Build.VERSION.SDK_INT >= 18) { ... startLeScan(...) }` Mar 26 22:25:33 should i just pass in the 'this' to the utility or can i get access to shared prefs directly? Mar 26 22:25:36 osollovan what did you want to do with startLeScan, and how often ? Mar 26 22:25:38 then the api levels that support BLE will do so, the lesser SDKs will just ignore the BLE Mar 26 22:28:19 has anyone had any issues compiling with gcc4.9 LP 5.0.2 kernel/fs/namespace.c where is complains about kernel_key and kernel_dev ?? I hope im in the right channel for this question.. Mar 26 22:28:26 let me rephrase Mar 26 22:28:32 a bunch of stuff in my utility would need context Mar 26 22:28:40 should i just pass context to every single method in my singleton utility? Mar 26 22:28:45 or shoudl i just store a context? Mar 26 22:28:56 are contexts shared across activities? like 1 context per app? Mar 26 22:29:04 or does each activity have it's own context? Mar 26 22:30:33 quinnjn, thanks. and so it's indeed best to do a separate build for every API I want it to run on (build with SDK 18 for a device that runs API 18, 19 for 19, ... instead of compiling only with SDK 22)? Mar 26 22:31:35 g00s, I want it to scan for devices when starting my application, after which I connect to the one that advertises the GATT service I'm looking for. This would occur only on startup, or when I lose connection Mar 26 22:32:15 first, i'd recommend just forgetting about 18. its terrible with ble Mar 26 22:32:59 if you aren't scanning often, or doing it for long periods (like receiving broadcast data w/o connection) startLe scan will be fine Mar 26 22:33:27 it has a bug on 128-bit uuid filters though, so you'll need to fix that. see SO + google bug tracker for some code Mar 26 22:34:17 if you app receives broadcast data then i would make the optimization on Android 5+ to use the newer classes Mar 26 22:36:55 oh ok, I didnt know that this 128-uuid bug was the reason that it's deprecated. Mar 26 22:37:12 what exactly do you mean with "receiving broadcast data w/o connection"? Mar 26 22:37:55 my app is receiving broadcast data (like notifications) when connected Mar 26 22:40:55 it wasn't deprecated because of 128-bit filter bug. its just that newer APIS push the functionality down into the firmware which can be more efficient Mar 26 22:41:22 android studio seems to be nice Mar 26 22:42:41 osollovan so again, are you connecting to this device or just passively receiving broadcast data ? Mar 26 22:43:48 Hi! Mar 26 22:44:12 adkins: that works Mar 26 22:45:15 i'm using socket.io java client for connecting to a nodejs chat server, but the problem is that whenever i destroy an activity, i can't emit a message from the ondestroy() method Mar 26 22:45:33 has anyone else faced this problem? Mar 26 22:47:37 g00s, I connect to the device with the BluetoothGatt connect() method Mar 26 22:52:57 does this mean I use a connection, or is this something different? Mar 26 22:53:15 ashemark: depends on what you mean. you can do things from activity's onDestroy, but it's essentially only called if the user hits "back" or you explicitly call "finish" (there are other cases, but basically.) Mar 26 22:54:24 groxx: i've overridden onBackPressed in my activity and called finish method explicitly.. Mar 26 22:54:57 onBackPressed will (normally, unless you have a fragment back stack) call finish for you Mar 26 22:56:26 pressing back, i'm taken out of activity to the home screen, so no fragment back stack i suppose Mar 26 22:56:30 which someone would make WSYIWG xml drawable editor Mar 26 22:57:38 groxx: but there's another peculiar behaviour occuring right now, the code inside onDestroy() works after I completely close the app and restart Mar 26 22:57:48 exactly the opposite where I want it to run.. Mar 26 22:58:11 ashemark: what do you mean by "completely close the app"? kill the process, or hit home, or something? Mar 26 22:59:35 groxx: well i just press the menu long enough to expose all the running apps, and then close it from there Mar 26 23:00:01 ashemark: typically that'll kill the process, unless you have a service running. then it depends. Mar 26 23:03:46 groxx: i think that when i kill the process(supposedly), the app is still in the background, but when i launch the app again, it kills the previous app(for real this time) and hence the onDestroy gets called Mar 26 23:04:03 is that possible? Mar 26 23:05:34 btw i'm not running any service by myself.. Mar 26 23:06:09 ashemark: seems unlikely. when the app is killed, typically the process just dies instantly - no onDestroy, nothing. what _could_ be happening though is if it's killing your _task_, which will finish() (thus onDestroy()) everything in it before starting a new one. Mar 26 23:06:52 ashemark: tbh though, onDestroy is problematic for reasons like this. you probably want to use something else, like detect when they leave the app and disconnect / mark "away" some X seconds later (which will mean you probably want a service) Mar 26 23:08:21 if I want to set setFilterTouchesWhenObscured, do I have to make that setting on every webview in my app after it has been created or is there a universal way to set it? Mar 26 23:08:47 groxx: when i press back button, i can still see my app in recent apps, although i've called finish() in my onBackPressed() (override) Mar 26 23:09:10 ashemark: because "back" destroys the activity, but not usually the process Mar 26 23:09:37 groxx: so how do i kill the process, reliably?? Mar 26 23:10:01 select it in the "android" tab in android studio, click the 'x' button on the left edge Mar 26 23:10:23 groxx: programmatically? Mar 26 23:10:54 ashemark: in-app, or with 'adb'? Mar 26 23:11:03 groxx: in-app.. Mar 26 23:11:20 I don't know if there's a reliable way. and it's almost never the right choice anyway. Mar 26 23:11:36 e.g. you can call System.exit(), but it doesn't always work Mar 26 23:11:45 ok.. Mar 26 23:13:29 you can always NPE your way to an exit. Mar 26 23:13:59 ashemark: why do you want to exit in such a way? Mar 26 23:14:10 it's reliable, but still almost never the right choice! Mar 26 23:14:12 unless something catches it :) but yeah. still, very unlikely the correct choice, and it likely means you're just failing to work _with_ the system Mar 26 23:15:35 icedp: i'm trying to run some code whenever an activity is destroyed, and for obvious reasons chose onDestroy() method of the activity for this, but that doesn't work Mar 26 23:16:08 ashemark: why do you need run code when activity is destroyed? Mar 26 23:16:27 ashemark: maybe it will ok to run that code when activity is paused or stop Mar 26 23:16:45 only when totally kill the app, and restart it, only then that code runs, which is weird... Mar 26 23:17:15 tried stop too, but same phenomenon occured... Mar 26 23:18:25 ashemark: very strange. onPause should always be called Mar 26 23:18:28 show the code then ) Mar 26 23:19:38 icedp: ok Mar 26 23:22:15 icedp: here you go http://pastebin.com/cn4dm3H6 Mar 26 23:24:46 ashemark: do you have an old version of Android? Mar 26 23:25:24 icedp: i have two devices running on 4.4.4 and 5.0 Mar 26 23:25:25 ashemark: try onPause() Mar 26 23:25:28 hmm Mar 26 23:26:08 okay Mar 26 23:26:11 ashemark: try onPause() and make sure the method is called with debugger or log statement Mar 26 23:26:27 if not this I don't now how can it be Mar 26 23:26:35 ok Mar 26 23:28:04 icedp: onPause() works just fine Mar 26 23:30:16 ashemark: http://developer.android.com/reference/android/app/Activity.html#onPause%28%29 , onStop, onDestoy etc and https://github.com/xxv/android-lifecycle Mar 26 23:30:32 I want to have two textViews side by side, one anchored to the left side of the screen with the text gravity left, and one on the right side with the text gravity on the right. what's the best way to do this? currently I'm using a tableLayout, but I must have messed up somewhere somehow because I'm loosing stuff off the right side of the screen on the device. Mar 26 23:31:00 ashemark: there are warnings which method might not be called and which should you use for what Mar 26 23:31:09 icedp: ok Mar 26 23:31:11 thanks Mar 26 23:31:29 the width of the tableLayout is match_parent Mar 27 00:02:07 " Here we drew inspiration from ReactiveX frameworks. Our system has interfaces similar to RxJava, but more appropriate for mobile and with built-in support for Closeables." Mar 27 00:02:19 i wonder what thet mean by that, maybe less GC ? Mar 27 00:02:34 from https://code.facebook.com/posts/366199913563917/introducing-fresco-a-new-image-library-for-android/ Mar 27 00:14:21 if you know anyone at google who works on the NDK documentation, tell them that in "android-ndk-r10d/docs/Additional_library_docs/opensles/index.html", the Android.mk modification should be to LOCAL_SHARED_LIBRARIES instead of LOCAL_LDLIBS as written so that all eabi toolchains' linkers know where to find the library Mar 27 00:14:47 otherwise armeabi-v7a fails to find the library Mar 27 00:24:51 TheChuckster: you can report it at https://code.google.com/p/android/issues/list. Or alternately, download aosp, make a patch and upload it to AOSP Mar 27 00:32:51 Anyone know if playback complete is called when doing streaming video with mediaplayer? Mar 27 00:34:06 nm Mar 27 00:34:56 d'oy. I figured out how to mimic gridview's dividers with recyclerview (simply! non-buggily! looks perfect!). I can't tell if it's too horrific to survive though. Mar 27 00:51:55 Hi, is there a way to get a dialog box to show onCreate that a user has to enter first name, last name, etc and to be able to display that inside another fragment ? Mar 27 00:52:11 Or that dialog box to pop up inside the same fragment. Mar 27 01:00:40 if the memory graph goes like this: https://www.dropbox.com/s/1qfio6sdd8jt5im/Screenshot%202015-03-26%2021.00.30.png?dl=0 Mar 27 01:00:42 is that bad? Mar 27 01:00:58 (doing continuous computation on sensor values) Mar 27 01:01:33 Afzal: it means you (or something you're using) are making a bunch of intermediary objects, but it's not intrinsically bad Mar 27 01:03:56 groxx right, that's probably the giant ass array, hmm one of my concerns is that when I stop the sensor, the graph remains at the last y-position, which means something is not getting cleared (right?) Mar 27 01:04:19 welp, apparently it's not the giant ass array :/ Mar 27 01:04:39 howcome in Android studio its not automatically importing everything i need for a second activity Mar 27 01:04:55 like DisplayMessageActivity and EXTRA_MESSAGE Mar 27 01:05:13 ia9371 try the Optimize Imports shortcut Mar 27 01:06:36 i tried that Mar 27 01:06:59 its saying that import android.os.Bundle; has an error Mar 27 01:07:31 and DisplayMessageActivity.class is red Mar 27 01:07:41 r.id.edit_message is red Mar 27 01:08:05 and EXTRA_MESSAGE is red it says all this because im trying to create a second activity Mar 27 01:08:29 I just coppied and pasted the method from developer.android.com Mar 27 01:11:09 OH i have to creat a DisplayMessageActivity Mar 27 01:16:05 Afzal its hard to know good or bad, because we don't know how much the memory is getting fragmented Mar 27 01:16:57 Afzal: there are some allocation-tracing methods that you could use to measure what's being created and I think when. or ddms / Android Device Monitor has a tab that has start/stop allocation tracking, though I don't think I've used it yet. Mar 27 01:17:40 groxx I tried them, it's just that because there's data being created so fast, it's hard to see what's out of place Mar 27 01:18:23 anyway, I found that converting my sensor reading (object) to json every time I receive it is causing part of this problem Mar 27 01:18:38 ha, yeah, that'll make a lot of intermediate objects :) Mar 27 01:18:40 g00s it's reclaimed when I start the sensors again Mar 27 01:20:19 hopefully this new magical library that Square is coming up with will solve it :P :P Mar 27 01:20:52 Afzal what do you want the library to do ? Mar 27 01:21:41 How to display text from EditText to a title inside a fragment ? Mar 27 01:21:46 I want it to use magic and not create any intermediate objects when serializing an object! lol Mar 27 01:21:59 haha Mar 27 01:22:17 dont use json then, i fixed your problem without magic Mar 27 01:22:28 Afzal if you data sensor is like 300 hz (or 200 i can't remember) and you are converting it to json every instance, that Mar 27 01:22:32 s a lot of strings Mar 27 01:22:33 g00s yeah, I could just write my own toString function :p Mar 27 01:22:51 Afzal: at those rights you have to bypass strings alltogether Mar 27 01:22:55 Afzal where is this data going ? Mar 27 01:23:06 *at those rates Mar 27 01:23:23 lasserix it's to send to a server via udp to show a graph (it's a dev feature) so I guess it's not that big of a problem Mar 27 01:23:25 yeah maybe use okio and make buffer, save it someplace Mar 27 01:23:36 see square already solved your problem Mar 27 01:23:40 lol Mar 27 01:24:18 i'm so lucky i haven't used json yet, it just seems like crap Mar 27 01:24:36 after I remove that line, btw, the graph still goes up for very slowly. Takes like 4 minutes to fill the free memory available to the app Mar 27 01:24:38 * g00s <3 binary formats Mar 27 01:25:11 s/for/but/ (or whatever the sed syntax is) Mar 27 01:25:38 i think it's the other slash lol Mar 27 01:26:39 ahh that always sucks Mar 27 01:26:48 saw the exact game i had wanted to make Mar 27 01:27:41 lasserix yeah that happens to me too. i had an idea like the apple health platform they announced, but there was no way i could execute on that the way they did heh Mar 27 01:28:12 aww man lol Mar 27 01:37:00 capella is going to love this one http://www.theatlantic.com/politics/archive/2015/03/welfare-makes-america-more-entrepreneurial/388598/ Mar 27 01:47:52 hey, When Android Studio merges manifest files it also includes a bunch of extra permissions I don't want (from libraries). Is it possible to ignore permissions and features that other manifest files have defined? Mar 27 01:48:39 heres the UI for my main activity. any suggestions? http://imgur.com/vEoXUXy Mar 27 01:49:00 Does anyone think the circle textview is too large? Mar 27 01:50:18 Yeah, I think so. Mar 27 01:50:20 Looks pretty Mar 27 01:50:31 Shouldn't the floating action button be slightly bigger? Mar 27 01:50:45 DadFoundMy: Depends, is it supposed to be clickable or not? Mar 27 01:50:47 It feels like the circles are just a little too big (but that's just my view). Mar 27 01:50:50 TacticalJoke: i think that's the guideline size Mar 27 01:50:56 phix: I know there is something, hunting for it at the moment. this might contain it / be useful though: http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger Mar 27 01:51:06 groxx: thnx bud Mar 27 01:51:06 TacticalJoke: I agree, I'm going to make them smaller Mar 27 01:51:06 I mean "bigger than the other circles". Mar 27 01:51:25 It looks nice though! Mar 27 01:51:31 DadFoundMy: if they are clickable I suggest you make them as big as possible to avoid the fat finger problem Mar 27 01:51:40 phix: they arent Mar 27 01:51:47 Another thing I'd consider is making each letter colour-consistent. Like, make all Gs the same colour. Mar 27 01:52:15 TacticalJoke: ive been considering that also Mar 27 01:52:17 DadFoundMy: Is that a appcompat app or not? Mar 27 01:52:24 Or perhaps colour in accordance with period number. Mar 27 01:52:24 phix: yeah Mar 27 01:52:28 i use several libraries tho Mar 27 01:52:35 one for the FAB, and the circles Mar 27 01:52:46 DadFoundMy: I am going to start using an action bar (never used one before). Mar 27 01:52:49 Are they random colours right now? Mar 27 01:53:22 I am trying to use fragments however I cannot scan barcodes with zxing 2.2 if I use fragments, it doesn't launch the scanner Mar 27 01:53:46 phix: i love they way they look Mar 27 01:54:00 TacticalJoke: random, except if they are the same class name Mar 27 01:54:22 phix: yeah, I think this is it. never tried it, but seems promising: http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-Selector Mar 27 01:54:52 here is the UI from a few weeks ago... i think its an improvement :D http://imgur.com/ZPbcsiK Mar 27 01:55:22 Wow, yeah. Huge improvement. Mar 27 01:55:47 In the new UI, is the + duplicated (FAB + toolbar action)? Mar 27 01:56:20 No, the + is, a new class that FAB is a new assignment. It expalins that when you first launch the app Mar 27 01:56:43 Also the FAB clicks to reveal 3 more FAB's which i think is cool Mar 27 01:57:18 Ah, okay. To be honest, the two +s are kinda confusing. Mar 27 01:58:09 yeah i agree, and a lot of other people have said that. I'm not sure how else i could make it though Mar 27 01:58:22 maybe have the add class as a menu? Mar 27 01:58:41 heres what it shows when you first enter the app (other than the clicked fab) http://imgur.com/fkJehGZ Mar 27 01:58:45 Yeah, I was thinking that, but not sure. Mar 27 01:58:55 Another option would be not to use an icon for "New Class", but that might not be a good idea either. Mar 27 01:59:24 i think im going to give it to some friends of mine to test out, and use some anyanlists to change things like that Mar 27 02:00:05 What happens when you click "Gym" or something? Are you taking to an Assignment activity? Mar 27 02:00:15 If so, couldn't the "New Assignment" button be on *that* activity? Mar 27 02:01:34 heres what happens on click http://imgur.com/WSJSxnV Mar 27 02:01:42 still need to work ont he ui of that screen Mar 27 02:02:02 I want the FAB to be add an assignment because that's the most common action, its the new class i think i should change Mar 27 02:02:31 Also its worth metnioning when the user first enters the app, if they think the FAB makes a class that are given a dialog saying its the other + Mar 27 02:02:49 noooooooooo not another todo list thingy Mar 27 02:02:53 That is a sign that it's a convoluted UI, IMO. Mar 27 02:03:18 If you need to explain something over and over, something is wrong. Mar 27 02:03:43 well it's not exmplaining it over and over, only once if the user attempts to create an assignment without having a class Mar 27 02:03:58 again i think this is something analystics might solve Mar 27 02:04:29 If I wanted to create a Gym assignment, I think I'd expect to click on "Gym", see a new activity, and click an FAB. Mar 27 02:04:47 (Rather than click an FAB, select "Gym" somewhere, and enter details.) Mar 27 02:05:41 Good point. One of the main features of the app is that if you create an assignment from the FAB the app attempts to automaticly select the class based ont he time Mar 27 02:06:14 so for example if when you create a class you set the time from from 10:30-11:30, if you create an assignment fromt hat time frame it will recommend that class Mar 27 02:06:31 Ah, okay. That changes things. Mar 27 02:07:23 i think an issue will be that users wont know these things. I don't really want to create a tutorial, but I want users to know these features exist Mar 27 02:08:12 Here's an idea: Mar 27 02:08:22 Have just the FAB, and make that an "Add *Something*" button. Mar 27 02:08:41 Then the user gets to choose -- do they want to add a subject or an assignment? Mar 27 02:08:55 In other words, my idea involves removing that top + entirely. Mar 27 02:09:02 Making the bottom + overloaded. Mar 27 02:09:26 Then everything is self-documenting and nobody can click the wrong button. Mar 27 02:09:53 It can also be context-aware: if there are no subjects, the only choice is "Add a new subject." Mar 27 02:09:58 Thats actually what I originally had, but 1, according to google the FAB should just be for the main action of the app. and 2 i didnt think users would be able to tell the difference of the two Mar 27 02:10:23 i think i like your idea earlier to just have text in a menu saying add a class Mar 27 02:13:26 does the listview look better without a divider? http://imgur.com/tsrzeSX Mar 27 02:14:23 I prefer dividers, personally, but I can't remember what the material guidelines say about this. Mar 27 02:16:19 wow i tried looking at google calendar for some inspiration, in my opinion that app looks awful Mar 27 02:20:44 The calendar app has always been pretty sub-par. Mar 27 02:31:54 its very janky on my n7, but it sure looks pretty blinged out Mar 27 02:34:47 At least they let you schedule stuff in December these days :D Mar 27 02:35:06 December's so overrated. I don't know why you even want it Mar 27 02:41:18 touche Mar 27 02:41:37 what did they used to not let you use december? Mar 27 02:41:53 yeah it was an android 4.2 bug Mar 27 02:42:05 so i'm reading http://www.theshiftingbit.com/Fixing-Memory-Leaks-in-Android-Studio Mar 27 02:42:12 haven't used MAT in a long time Mar 27 02:42:16 lol thats such a random bug Mar 27 02:42:26 lol i can't believe you still have to do this by hand $ hprof-conv infile.hprof outfile.hprof Mar 27 02:44:23 g00s: whats your app do that your running out of memory??? Mar 27 02:44:40 i was just reading that blog, thats all Mar 27 02:44:53 oh :/ Mar 27 02:44:58 surprised things aren't more automated by now. but the memory stuff / ddms was always very ghetto Mar 27 02:45:26 beforei was into android dev i remember facebook got in trouble for manipulated android or something, i should try to find that now that i kno about development Mar 27 02:47:15 DadFoundMy: they were mucking with the internals of dalvik Mar 27 02:47:53 in order to work around a limitation they were running into, because they were loading tons of classes from multiple dex files Mar 27 02:48:13 I'm subclassing TextView. Is there a way to see whether android:padding has been set on an instance of my subclass? (I can't access "com.android.internal.R.styleable.View" or "com.android.internal.R.styleable.View_padding", so that approach doesn't work.) Mar 27 02:48:30 I know I could just check for 0 or something, but I wonder whether there's a better way. Mar 27 02:51:40 jesus christ this is nuts https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920 Mar 27 02:56:56 CedricBeust noticed your Q on rxjava groups Mar 27 02:57:16 the last talk ben c did on temporal operators was pretty good, all kinds of nifty things one can do with those Mar 27 02:57:28 stuff i never imagined just looking at the docs Mar 27 02:58:19 i never read that list anymore Mar 27 02:58:21 thanks Inbox **** ENDING LOGGING AT Fri Mar 27 02:59:59 2015