**** BEGIN LOGGING AT Tue Apr 28 02:59:59 2015 Apr 28 03:13:36 is it possible to use paypal with an android developer acc? Apr 28 03:19:14 i wouldn't expect so considering google runs their own payment system Apr 28 03:19:23 JakeWharton: Some of your responses to my questions have saved me days or even weeks of work. Srsly. Apr 28 03:19:37 that's why this channel exists Apr 28 03:19:49 and that other one Apr 28 03:19:59 does anyone know of a good example using AWS SNS with Xamarin? Apr 28 03:35:31 my app got it's first non 5 star review :( Apr 28 03:35:50 first one not done by your mates? ;) Apr 28 03:36:37 haha Apr 28 03:36:58 haha Apr 28 03:36:59 surprisingly enough only 3 of my reviews are friends. i guess i should be happy i have alot of review but pissed because my friends dont review it :/ Apr 28 03:37:26 What did the non-five-star reviewer say? Apr 28 03:37:39 it was all super valid critiscm Apr 28 03:37:43 I did review once for the person I know. Gave 1 star because it was done with phonegap Apr 28 03:37:48 Great with 2 missing features The app is great, slick, and easy to use. One thing its missing in my opinion is the ability to set a reminder or alarm. Another feature would be to set a widget with the list of things. If these two things were added, this app would be practically perfect. Apr 28 03:37:49 * gordon_ is feeling like scumbag Apr 28 03:37:54 he gave 4/5 Apr 28 03:38:27 people still use those widgets ? Apr 28 03:38:32 im getting all these good reviews, but at the same time only around 65% of users actually keep the app which is slightly disheartening Apr 28 03:38:35 That's a very positive review. Apr 28 03:38:54 yeah i responded to him that all those points are super valid, and i would try to implement them Apr 28 03:39:00 we're getting into marketing stuff which I hate Apr 28 03:39:22 Don't be a review perfectionist, because some people will rate anything 1/5. Apr 28 03:39:35 Or 0 if possible. Apr 28 03:39:53 TacticalJoke: yeah i think i prefer a review like that with 4/5 and great feedback rather than all the 5/5 that are jsuting saying they like it Apr 28 03:40:06 you should make achievements Apr 28 03:40:16 i tried some really shady marketing that kinda back fired on my half assed app i did last week Apr 28 03:40:17 Yeah, I'd love to get reviews like that. Apr 28 03:40:31 and push more notifications :D Apr 28 03:40:43 i saw a post on /r/androidev of someone who put his app name as a viral youtube video Apr 28 03:40:58 Did you release the swipe game? Apr 28 03:41:05 i tried it but it backfired and google play took 2 days to update the search tags Apr 28 03:41:11 one of the best reviews I saw of my parent companies apps was, "if you think this app is bad, you can feel better if you try to use their other one." Apr 28 03:41:27 dragorn: :D Apr 28 03:41:53 TacticalJoke: yeah, im not sharing it really yet because it has a bug or two, and some typos https://play.google.com/store/apps/details?id=com.dylanredfield.simonslides Apr 28 03:42:13 Nice font. Apr 28 03:42:21 s/Hight/High/ Apr 28 03:42:31 yup like i said typos Apr 28 03:42:43 That looks like a good game idea. Apr 28 03:42:44 i used this for the font and logo :D http://hipsterlogogenerator.com/ Apr 28 03:43:00 i coded the entire thing is about 3 hours of work Apr 28 03:43:11 so it's reminder app Apr 28 03:43:21 and that could have been cut down a ton if i had some prior nolledge on handlers Apr 28 03:43:41 gordon_: the AutoAgend one is a school planner, that one took a lot more work Apr 28 03:45:24 DadFoundMy: that logo generator is hillarious :D Apr 28 03:46:50 You scored a 4 out of 5 on the hipstometer Apr 28 03:46:52 damn Apr 28 04:00:42 anyone ever used robolectric to test a class that creates a handlerthread? the default shadowhandlerthread always has a null looper Apr 28 04:01:06 mhm dragorn i see Apr 28 04:05:42 anyone here have experience with backupAgent / backupAgentHelper? Apr 28 04:15:48 How do I make Android studios to download maven locally Apr 28 04:16:19 Androids studios looks so much better live this desktop connect Apr 28 04:17:43 Are you finally on a desktop? Apr 28 04:22:44 do people really develop with AIDE? Apr 28 04:23:54 masterjef i doubt it Apr 28 04:24:27 the reviews on it are pretty hilarious Apr 28 04:26:08 rofl Apr 28 04:26:39 tldr push notification ads are a baaad idea Apr 28 04:26:47 Using the command line I can install an android application using `gradle installDebug`, is there a way for me to specify the device to install to? Right now it's being installed to both of my devices. Apr 28 04:26:51 push notification ads are just awful Apr 28 04:27:21 adb -s Apr 28 04:28:18 g00s: Right, I know how to do that with adb, but was wondering if I could tell gradle to do that as well. Apr 28 04:28:34 oops Apr 28 04:29:39 Yeah TacticalJoke kinda I have a Windows xp remote desktop Apr 28 04:29:43 Yeah I'm curious abuot doing this with gradle too. I do like installing on multiple devices with one command but I wish it was done in parallel, though Apr 28 04:30:49 ihope ronkrt isn't using rdp to remote into AIDE running on his tablet :| Apr 28 04:31:22 No Apr 28 04:31:44 I'm using end to connect to Windows from my phone Apr 28 04:31:58 Using Android studios now Apr 28 04:32:21 Using Android Studio via your phone? Apr 28 04:32:22 do you guys create layouts using the ui designer or strictly the xml? Apr 28 04:32:30 xml Apr 28 04:32:33 xml Apr 28 04:32:34 Yeah, always XML. Apr 28 04:32:38 eek :S i use the ui designer Apr 28 04:32:43 I've never used the designer. Apr 28 04:32:55 im not 100% familiar with all of the properties so i like a visual representation of wat my app can look like Apr 28 04:33:11 "can look like" because apparently the ui designer isn't always accurate? Apr 28 04:33:24 *ducks* I use Scaloid since I'm already using Scala for android projects anyway. Apr 28 04:33:38 TacticalJoke why not Apr 28 04:33:45 why don't you guys use the ui designer? Apr 28 04:34:37 Well, what does it give you? If I want a LinearLayout I start typing. If I want a Button I start typing. Apr 28 04:35:03 it gives you visuals and what not Apr 28 04:35:38 I can get that while typing. :D Apr 28 04:35:42 Or after typing. Apr 28 04:36:39 oh, right Apr 28 04:36:43 the preview on the right hand side Apr 28 04:36:49 my designer doesnt render custom views btw Apr 28 04:36:51 I guess I don't get the impression that Android layouts lend themselves well to WYSIWYG drag-and-drop stuff. Apr 28 04:37:02 Mine works with my custom views. Apr 28 04:37:19 i tried using something from appcompat and in the designer it said 'rendering error - cannot find class' Apr 28 04:37:26 Hmm, I suppose drag-and-drop reminds you of certain stuff (e.g., alignParentTop). Apr 28 04:37:27 Just tried it. Apr 28 04:37:31 ya Apr 28 04:37:40 TacticalJoke: I'm on Android using chrome connect to login to a Windows. Xp hyper v Apr 28 04:37:52 ronkrt: Dude, just get a freaking desktop already. Apr 28 04:37:56 Yes Android studios Apr 28 04:38:09 Yea if I could afford it Apr 28 04:38:19 I'm not using aide Apr 28 04:38:59 Works fin Apr 28 04:41:09 DadFoundMy: How did you design your app icon for your other app? Apr 28 04:41:43 looks like used Android Asset Studio with graphic Apr 28 04:42:43 just a question - is it possible to modify the icon of your app after it has been set? Apr 28 04:42:53 yes Apr 28 04:42:55 idk how many of you own a ipod touch or iphone or whatever Apr 28 04:43:02 but the calendar app always shows today's date Apr 28 04:43:17 ah dynamically? Apr 28 04:43:20 yes Apr 28 04:43:36 if someone else does it, sure you can too most likely, but that seems a bit much Apr 28 04:44:16 well look at this Apr 28 04:44:17 http://cloud.addictivetips.com/wp-content/uploads/2012/02/iPhone-Springboard.jpg Apr 28 04:44:22 oh, are you saying the calendar app on another device and OS does it? Apr 28 04:44:34 another screenie: http://mams.rmit.edu.au/htgo17jk5g2v.jpg Apr 28 04:44:43 do you see how the icon changes depending on the date Apr 28 04:44:53 is it possible to do something like that on android? Apr 28 04:44:55 yeah, also see how its IOS Apr 28 04:45:04 mhmm ok lemme get an android example Apr 28 04:45:08 yes Apr 28 04:45:22 you know the messaging app? how it shows a little circle with the number of unread messages Apr 28 04:45:27 on top of it Apr 28 04:45:42 i mean sure, if you can link your apps icon for launcher, i guess i don't see how you couldn't modifiy the icon in the apk to adjust whatever Apr 28 04:45:49 aspire: I've never seen an Android app doing this. Apr 28 04:45:52 that is different Apr 28 04:45:55 I know that iOS apps do this. Apr 28 04:45:59 mhmmm Apr 28 04:46:05 so, not possible? Apr 28 04:46:24 I presume it's not possible. Otherwise, I guess, I would've seen this happen in the past. Apr 28 04:46:27 it's possible, but you'd have to get in the apk and modify the launcher icon physically Apr 28 04:46:34 http://www.pinaldave.com/bimg/android%20(1).png Apr 28 04:46:40 its not possible to have the (1) ? Apr 28 04:46:40 it's just a zip file anyways Apr 28 04:46:48 whatitis: You're saying it's possible for an app to change its home-screen icon at run time? Apr 28 04:47:00 that 1 is the launchers doings Apr 28 04:47:02 TacticalJoke not even at runtime Apr 28 04:47:04 at any time, really Apr 28 04:47:18 TacticalJoke, if you own the apk i don't see why not, but it'd take some hacking Apr 28 04:47:30 just doesn't seem worth the hackery, but probably doable Apr 28 04:47:44 im just trying to see if its possible to show a little red circle with a number in it on my app icon Apr 28 04:47:47 I doubt it's just a case of changing the APK resource. I'd imagine the launcher would have to be refreshed, etc. Apr 28 04:47:50 as shown in http://www.pinaldave.com/bimg/android%20(1).png Apr 28 04:48:14 TacticalJoke, exactly the hackery :) anything is possible usually, it's just the need of it Apr 28 04:48:15 aspire: Is that a custom ROM? Apr 28 04:48:44 TacticalJoke nope Apr 28 04:48:54 my old phone had message counts like that Apr 28 04:48:56 samsung galaxy s2x Apr 28 04:49:10 message unread counts* Apr 28 04:49:22 Doesn't Touchwiz qualify as a custom ROM? :D Apr 28 04:49:37 Or whatever their distro would be called. Apr 28 04:49:38 some light googling says it's possible, but it's not really the way we do things in android. icons should be static, there's a notification area for a reason Apr 28 04:49:39 SamsungOS. Apr 28 04:50:01 aspire, those # circles are releated to the Launcher and the ability of the app to use the launcher/lockscreen intents etc... Apr 28 04:50:21 oh mhmm Apr 28 04:50:39 so, not possible then? Apr 28 04:51:02 quit saying not possible, anything is possible, should be saying "oh so i need to research more" Apr 28 04:52:25 this place isn't the say all for everything, it is a resource, use it as such and don't think it's the know all of all :) Apr 28 04:53:38 oh Apr 28 04:53:41 mhmm ok thanks Apr 28 04:53:54 :) Apr 28 04:54:01 whatitis: Do you come from Zombo.com? Apr 28 04:54:07 ok last question before i go to bed: how do i know if my app is currently visible or not Apr 28 04:54:33 not that i'm aware of, but many things i'm not aware of, so maybe? Apr 28 04:54:55 aspire, your activities are onResumed Apr 28 04:54:57 when a certain event happens in my app: if the app is visible = display a popup message Apr 28 04:55:04 if the app is not visible = push a notification Apr 28 04:55:28 oh ok whatitis so when onPause is called = my app is no longer visible? Apr 28 04:55:48 whatever activity has onPaused sure Apr 28 04:56:13 there is a whole Lifecycle you should read Apr 28 04:56:21 explains quite a bit Apr 28 04:56:33 yeah im just sort of diving into android development Apr 28 04:56:52 start diving into querying Google and SO more :) Apr 28 04:56:59 the plan was to work on apps during the day and learning about the concepts at night Apr 28 05:05:48 hi all. Does anyone in here know the workings of Google TTS? android.speech.text.TextToSpeech? Apr 28 05:07:33 I am using eclipse, and I get this error when building my code. It just doesn't make sence. The constructor TextToSpeech(SensorReader, SensorReader) is undefined SensorReader.java /SensorReader/src/com/jh/sensorreader line 17 Java Problem Apr 28 05:09:24 does any other app builds on eclipse? Apr 28 05:09:25 <_genuser_> hola amigos Apr 28 05:09:49 yup. it working fine. Apr 28 05:09:55 and well, there is no TextToSpeech(SensorReader, SensorReader) Apr 28 05:09:59 https://developer.android.com/reference/android/speech/tts/TextToSpeech.html Apr 28 05:10:05 Does MoPub have an IRC for support or something? It's getting kind of ridiculous. No response on their dev forums. Apr 28 05:10:16 the line is, TextToSpeech tts = new TextToSpeech(this,this); its in my onCreate method. Apr 28 05:10:28 Trying to add custom ad networks for mediation, but it wont let me edit the settings for them. Clicking the edit network button does nothing. Apr 28 05:10:49 BlindWiz: pastebin your code Apr 28 05:11:25 i bet 'this' referse to annonymous class Apr 28 05:11:54 ok, giv me a second. Apr 28 05:12:17 so probably your need to change to new TextToSpeech(MyActivity.this,MyActivity.this) Apr 28 05:12:32 My activity listens to locations changes and posts them to an app singleton, where I can access the coordinates. However, I'd also like to be able to refresh said coordinates even AFTER the fragment was displayed. How can I listen to the changes, if the listener is not in parent activity? Apr 28 05:12:45 desmin88, you are spending a lot of time with this, maybe take a day or 2 off from it. From seeing what you've been posting i have 0 clue what you are doing with your descriptions from passed few days except, you are trying to use MoPub with Admob Apr 28 05:13:41 Look here: http://gyazo.com/91699727684ae30a7a828733190476b1 Apr 28 05:13:56 I click 'Edit Network' to try to setup my Publisher ID etc, yet it does nothing. Apr 28 05:15:18 I appreciate the sentiment whatitis but its kinda ridiculous with MoPub. Apr 28 05:15:31 Ashiren, http://pastebin.com/pCDvbRhV Apr 28 05:15:53 I'm using findFragmentByTag in a ViewPager adapter to get fragments. is this ok? Apr 28 05:16:18 When onResume() of the activity is called, this method returns null. how do I get a reference to the fragments then? Apr 28 05:16:30 paste some code Matip Apr 28 05:16:34 one sec Apr 28 05:16:45 Disregard my last question. Apr 28 05:17:04 z Apr 28 05:17:09 weird Apr 28 05:17:38 ahh Apr 28 05:18:13 sensorsReader should implement TextToSpeech.OnInitListener Apr 28 05:18:28 https://gist.github.com/9756770a4d525da2f1da Apr 28 05:18:30 desmin88, ^ Apr 28 05:18:51 I run the for in onResume of MyActivity Apr 28 05:19:08 but at that time it seems the ViewPager is still blank Apr 28 05:20:09 Ashiren *slam my head on screen* ok... I forgot that part. Apr 28 05:20:30 Matip: just paste more Apr 28 05:20:39 desmin88, there is no more relevant code Apr 28 05:20:43 ashiren let me give it a go. Apr 28 05:20:44 i want to see it all Apr 28 05:22:29 is onResume() on activities called before after onCreate() but *before* the GUI is ready? Apr 28 05:23:06 it can be iirc Apr 28 05:23:34 damn, I got disconnected two times in 30 sec, I repeat just in case Apr 28 05:23:39 is onResume() on activities called after onCreate() but *before* the GUI is ready? Apr 28 05:24:32 that would explain the problem, but in that case I don't know how to run something *after* the GUI is ready Apr 28 05:24:52 onresume should be one of the last ones called (I think). there's also onPostResume Apr 28 05:25:24 Just look at Lifecycle, it isn't randomly placed, it is followed Apr 28 05:26:16 if you want to be sure to run something after it being drawn (i.e. size measure) after all you can use view.post(new Runnable()) which will run as soon as it gets rendered. Apr 28 05:28:50 it's weird, onResume is fine for code that needs the GUI ready in THAT activity Apr 28 05:29:11 it looks as if fragments in a ViewPager are created independently from the activity Apr 28 05:30:00 right Apr 28 05:30:05 * Matip is adding logs to check ^ Apr 28 05:30:05 Matip, you are mudding activities and fragments now, get to the point of your questions Apr 28 05:30:59 use a view tree observer, Matip Apr 28 05:31:18 pfnQ, how did you deduce that? Apr 28 05:31:19 whatitis, I have one activity with a ViewPager, which renders multiple fragments, what is the problem? Apr 28 05:31:46 simple Apr 28 05:31:47 [01:23] is onResume() on activities called after onCreate() but *before* the GUI is ready? Apr 28 05:31:53 says nothing bout fragments Apr 28 05:31:54 deduce what Apr 28 05:32:07 that he needs a tree observer Apr 28 05:32:28 whatitis, read above that message Apr 28 05:32:38 Matip> I'm using findFragmentByTag in a ViewPager adapter to get fragments. is this ok? Apr 28 05:32:39 When onResume() of the activity is called, this method returns null. how do I get a reference to the fragments then? Apr 28 05:32:50 [01:23] damn, I got disconnected two times in 30 sec, I repeat just in case Apr 28 05:32:51 Oh, misread, thought he was looking for dimensions Apr 28 05:32:52 is above Apr 28 05:34:28 Matip, what is your real question? Apr 28 05:36:27 if just wanting to get fragments, that's simple, use the Fragment Manager Apr 28 05:36:31 real question: how do I fix this problem? problem: I expect a ViewPager to be ready when onResume in the activity is called, but adapter.findFragmentByTag is null at that time Apr 28 05:36:57 if null ignore, what's the issue? Apr 28 05:37:35 expect what? Apr 28 05:37:55 how do you expect the adapter to be ready if you don't set it up first? Apr 28 05:38:06 ^ Apr 28 05:38:19 you haven't asked anything Apr 28 05:38:28 you kidding? of course I set it up onCreate Apr 28 05:38:31 other than shown us some broken, incomplete code Apr 28 05:39:52 not to mention, adapter.findFragmentByTag is not legitimate Apr 28 05:47:36 Matip: skipped through most of the convo but don't use getFragment on your PagerAdapter. Use getFragment(ViewPager pager, int i) instead. Apr 28 05:49:19 Matip: What are you trying to do? Fragment also has onResume Apr 28 05:53:16 thepoosh ! Apr 28 05:53:21 morning Apr 28 05:54:24 thepoosh you guys may have some more competition now, seems Fb added video chat Apr 28 05:54:31 to Messenger Apr 28 05:54:36 meh Apr 28 05:55:02 thepoosh: what app? Apr 28 05:55:09 glide.me Apr 28 05:55:34 g00s: we are now featured on the appstore for apple watches Apr 28 05:55:43 \o/ Apr 28 05:55:52 one ticket left for the google final change requests Apr 28 05:55:54 so... Apr 28 05:56:00 hopefully all is good Apr 28 05:56:13 thepoosh better watch out, if google feature you too i wouldn't be surprised if they take it down, and never talk to you guys again heh Apr 28 05:56:32 apple is pretty vindictive that way Apr 28 05:56:36 yeah, they are annoying bitches Apr 28 05:56:46 but they know we have an android client Apr 28 05:57:11 plus, we already got all the press and our iOS user base is about 5% of the entire user base Apr 28 05:57:14 25% Apr 28 05:57:29 Does anyone here use MoPub? Apr 28 05:57:40 MoPub? Apr 28 05:57:48 what's that? Apr 28 05:57:55 http://mopub.com Apr 28 05:58:05 why not AdMob? Apr 28 05:58:11 mopub mediates admob plus more Apr 28 05:58:22 oh Apr 28 05:59:49 hm, i just converted something to recyclerview + gridviewmanager, and highly regret it. maybe rollback Apr 28 05:59:54 still way too much pita ! Apr 28 06:00:03 :S Apr 28 06:00:10 trying to get RV + action modes is like OMG you have to be kidding Apr 28 06:00:12 i was sure RecyclerView is a good thing Apr 28 06:00:19 Leeds: ! Apr 28 06:00:30 thepoosh: where??? Apr 28 06:00:31 thepoosh its very low level Apr 28 06:00:44 oh Apr 28 06:00:54 it was all the rage 2 months ago Apr 28 06:01:15 its more flexible, if you can make it flex haha Apr 28 06:01:24 with 1k lines of code Apr 28 06:01:38 oh Apr 28 06:01:44 so back to the COBOL days Apr 28 06:01:55 of endless boiler plate code Apr 28 06:02:35 its amazing (or maybe it isn't) that there is nothing like setMultiChoiceModeListener - its all you Apr 28 06:02:58 a simple onitemclicklistener is a PITA to Apr 28 06:03:32 never mind, things like GridView gives you horizontal and vertical spacing, you have to make your own ItemDecorator, determine where the view is in the layout, add offsets ... Apr 28 06:03:56 i wonder, is this finished, did the devs have ADD, what happened Apr 28 06:04:02 I just added margins to the parent view of the item and said fuck it works Apr 28 06:04:45 heh, yeah the naive approach gives you thick borders between items, and 1/2 borders between item and edge of layout Apr 28 06:05:10 I hate when all the blogs and sites you check have no interesting or new content for days. Apr 28 06:05:11 even the guy who wrote the BNR book was like "O.o" Apr 28 06:05:16 God dammit, can I get something interesting?! Apr 28 06:07:04 i think that google just bruteforces their (sometimes terrible) apis with raw intellect Apr 28 06:07:05 TacticalJoke you are addicted to information kibble :) Apr 28 06:07:19 desmin88 and i dont have that intellect so ... Apr 28 06:07:25 exactly Apr 28 06:07:43 not an insult to you Apr 28 06:07:46 no one has that intellect Apr 28 06:07:56 heh none taken Apr 28 06:14:03 hi guys. I am working on a google glass project. I am trying to get my app to speak some text on the glass app's startup. I thought I could place the speak method in the onCreate method, but that doesn't work. Do any of you have any ideas? Apr 28 06:15:37 I just used *gasp* internet explorer to maybe see if the MoPub site was taking a dump w/ chrome Apr 28 06:15:46 lord forgive me Apr 28 06:16:01 i'm sure Luther has an insult for you Apr 28 06:16:06 lol Apr 28 06:21:34 OH WTF Apr 28 06:21:36 IT WAS CHROME Apr 28 06:21:56 Firefox works correctly but not chrome, ffs Apr 28 06:23:35 can a sound be played from the onCreate method? Apr 28 06:24:24 BlindWiz: you can probably schedule a task to do so from OnCreate Apr 28 06:24:28 eeyup Apr 28 06:25:07 from oncreate, I want to use TextToSpeech to play some text. I know that tts will not work if onInit doesn't finish its work. how can I know if onInit is done? Apr 28 06:25:53 probably an oninitlistener Apr 28 06:25:53 hmm, how do I schedule from onCreate? where do I start looking? Apr 28 06:26:38 hmm, I'm using one. I just had an idea. be right back. Apr 28 06:32:14 morning guys! Apr 28 06:33:19 I'm more of an evening guy. Apr 28 06:34:12 Hi evening guy, im desmin88 Apr 28 06:35:25 * desmin88 is sorry for that terrible pun Apr 28 06:35:32 TacticalJoke did you see these ? https://www.youtube.com/playlist?list=PLOU2XLYxmsIKEOXh5TwZEv89aofHzNCiu Apr 28 06:35:47 i often wonder how people find this stuff Apr 28 06:35:55 I think I've seen some of those. Apr 28 06:35:57 at least i can never find stuff on youtube it seems Apr 28 06:36:58 if i want to start learning android app development, what should be the starting point? any suggestions? tutorial links? or packages to download? Apr 28 06:38:27 Mariaa, go in any direction. Can't go wrong. Apr 28 06:38:30 Mariaa: A big factor is your programming history. Apr 28 06:38:49 If you've been doing stuff for a long time, you can probably just start at and jump into an app. Apr 28 06:41:45 i am a CS major, working as a wed dev since long, so what do you suggest? Apr 28 06:42:00 TacticalJoke: alright will have a look at that. Apr 28 06:42:16 hm, looks like commonsware has a good webinar on recyclerview, but why should i have to pay for information that should "just be there" Apr 28 06:42:21 Do you know Java (the language and the virtual machine) well? Apr 28 06:42:29 If not, I guess that's a big thing to learn first. Apr 28 06:42:46 i do know Java, i am not an expert it at though. Apr 28 06:45:11 you need to master your java programming. It'll be the best advise I can give you. Apr 28 06:45:36 android dev is jus learning the android specific stuff. Apr 28 06:46:00 ok, guys. Thanks for the help. See-Ya Later. Apr 28 06:47:48 Mariaa: If someone were to talk about either overriding the methods of a superclass or implementing the methods of an interface, would you know what they were referring to? Apr 28 06:48:57 yes for sure, i am good at oop concepts. Apr 28 06:50:07 Ah, okay. I think OOP is a big part of it. Apr 28 06:51:26 If you're good enough about Java, you can probably just dive right in and learn whatever along the way. Apr 28 06:51:31 s/about/at/ Apr 28 06:52:08 so the first thing i need to download to create environment locally for development is adt bundle , is that correct? Apr 28 06:52:45 Android Studio is the official IDE now. Apr 28 06:54:09 What a shame, eclipse has so many plug-ins Apr 28 06:55:02 alright, thanks a lot TacticalJoke Apr 28 06:57:55 Does Android 4.x actually use gpsd? Apr 28 06:58:55 Mariaa: I've found that Google and this channel are really important resources. Apr 28 07:00:06 TacticalJoke: you are right, i havee learned so much about php and programming for irc support channels Apr 28 07:00:16 i am a big fan of support channels :) Apr 28 07:00:48 googling Android gpsd does yield too many soccer results. Apr 28 07:04:54 hm, reddit /r/androiddev whos hiring Apr 28 07:05:12 these Harris guys were right next to where i used to work. but .. rochester :( Apr 28 07:05:19 capella ! Apr 28 07:07:34 TacticalJoke this is cool http://enoent.fr/blog/2015/01/18/recyclerview-basics/ Apr 28 07:07:56 i didn't know StaggeredGridLayoutManager could do that Apr 28 07:08:17 i thought it was one of those where there were 2 columns, each item could have different height , etc Apr 28 07:08:57 but he says it has lots of bugs, like more bugs than usual i guess :( Apr 28 07:09:05 Ah, that's a nice overview. Apr 28 07:09:18 I need to switch to RecyclerView for comments at some point (maybe post-1.0 :D). Apr 28 07:09:29 Well, I don't need to; it would just be nice. Apr 28 07:09:55 Assuming it's not buggy for my use cases. Apr 28 07:11:29 I wish more tutorials were this thorough (without overloading the reader). Apr 28 07:12:16 The good thing about my app is that the UI can and should be really simple. So I get to avoid all the craziness. :D Apr 28 07:12:23 Well, some of it Apr 28 07:12:28 Why ACTION_IMAGE_CAPTURE intent comes with different requestId? I start it with one, and it is captured with another Apr 28 07:12:36 TacticalJoke, how long until 1.0 or beta? :O Apr 28 07:12:40 also: good morning Apr 28 07:12:43 I dunno. It's taking forever. Apr 28 07:12:45 O hai. Apr 28 07:12:53 :( Apr 28 07:13:03 I love this app, though. Apr 28 07:13:05 If I can say that. Apr 28 07:13:09 Hello everyone,It's any way to handle touch event begin with navigation bar? Apr 28 07:13:29 codefalling, onTouchListener? Apr 28 07:14:16 But every time I touch begin with navigation bar,it has no response Apr 28 07:14:55 I just want to implement a swipe gesture from bottom like Windows8 tablet Apr 28 07:15:55 doesn't swiping up from the bottom activate Google Now Apr 28 07:16:20 Levite: Yah. And I hate that. :[ Apr 28 07:16:31 me too Apr 28 07:17:23 TacticalJoke then remove it. Apr 28 07:17:26 Swipe from home activate Google Now.So I shouldn't swipe from whole bottom? Apr 28 07:18:04 I don't have a pre-lollipop device charged at the moment but swiping up anywhere on the nexus 6 activates it Apr 28 07:18:25 wlan2: How? Apr 28 07:19:05 codefalling: Hmm, not sure. Would it be easy for users to invoke the wrong thing by mistake? Apr 28 07:19:28 I guess one of those reddit apps allows swiping from the bottom. I don't recall whether it worked well or not. Apr 28 07:19:47 The one that allows swiping up/down for posts/comments. Apr 28 07:21:08 I don't know,in fact Apr 28 07:21:34 I just override onInterceptTouchEvent Apr 28 07:22:11 Then log it,but get no response when touch from navigation bar Apr 28 07:26:19 So I can't swipe from bottom and can't swipe from top.Disappoint for a tablet app Apr 28 07:30:10 TacticalJoke how do the toolbars get that big <- arrow ? Apr 28 07:30:44 do i have to supply a drawable for setNavigationIco, or something else ? Apr 28 07:31:13 You can use custom:navigationIcon="?attr/homeAsUpIndicator". Apr 28 07:32:01 This is it for Theme.AppCompat: @drawable/abc_ic_ab_back_mtrl_am_alpha Apr 28 07:32:27 And in fact it's the same for the Light version (they just draw the colour on top at run time). Apr 28 07:33:41 ah k , thanks Apr 28 07:35:58 On v21 it's this: @drawable/ic_ab_back_material Apr 28 07:37:58 hmm i see ?android:attr/homeAsUpIndicator Apr 28 07:38:59 Yeah, that's the bridge used for 21+. Apr 28 07:39:19 That's in Base.V21.Theme.AppCompat. Apr 28 07:39:43 ?android:attr/homeAsUpIndicator will resolve to this: @drawable/abc_ic_ab_back_mtrl_am_alpha Apr 28 07:39:51 oh Apr 28 07:40:10 Oops, I mean this: @drawable/ic_ab_back_material Apr 28 07:40:14 Copy-pasted the wrong one. :D Apr 28 07:41:09 In other words, it resolves to @drawable/abc_ic_ab_back_mtrl_am_alpha (in AppCompat) when running <21 and @drawable/ic_ab_back_material (in Android 21) when running >=21. Apr 28 07:41:24 so on Toolbar xml, i should say android:navigationIcon="?attr/homeAsUpIndicator" ? Apr 28 07:41:31 Yeah, I think so. Apr 28 07:41:42 ok thanks Apr 28 07:41:55 The relevant documentation is here: http://developer.android.com/reference/android/R.attr.html#homeAsUpIndicator Apr 28 07:42:21 Though I guess it's only semi-relevant because that's about ?android:attr/homeAsUpIndicator and not AppCompat's ?attr/homeAsUpIndicator. Apr 28 07:44:05 Though that applies to all AppCompat shenanigans. Apr 28 07:44:32 you can set it in code too Apr 28 07:45:14 yeah i guess i should resolve that theme attr Apr 28 07:54:20 hey, i added nohistory attribute for an activity but when i finish() the activity it's still showing in the recent, why is that? Apr 28 07:54:21 Did groxx get kidnapped? Apr 28 07:54:30 heh Apr 28 07:58:33 gradle plugin 1.2.1 Apr 28 07:58:52 Wow, and no release notes for 1.2. Apr 28 07:59:02 they are terrible Apr 28 08:00:38 TacticalJoke i put on my toolbar android:navigationIcon="?attr/homeAsUpIndicator" but don't see any arrow Apr 28 08:00:54 You have to use custom: or app: Apr 28 08:01:29 I get a "minSdkVersion must be 21 or higher" warning for "android:navigationIcon". Apr 28 08:01:59 oh yeah, stupid stupid i mess that up a lot Apr 28 08:03:06 The arrow colour should be the colour of android:textColorPrimary, I think. Apr 28 08:03:19 And that theme-overlay thing sets it to white or black. Apr 28 08:04:07 (In other words, setting the correct theme overlay is sufficient, but you can customise the colour if desired.) Apr 28 08:04:17 weird. i have a flotaing activity - when i press back, or tap outside, it simply dissapears ... nicely. but if i press that back arrow, it goes away but the activity underneath it gets recreated also Apr 28 08:04:25 *floating Apr 28 08:04:34 Do you have the parent activity set? Apr 28 08:04:51 g00s: go to sleep! Apr 28 08:04:56 I think by default it recreates the parent activity (unless you use singleTop or whatever it is). Apr 28 08:04:59 it's already 11:04 here Apr 28 08:05:04 TacticalJoke: where is my reddit client? Apr 28 08:05:09 TacticalJoke no ... thanks a lot, i'll try that Apr 28 08:05:10 It is in production. Apr 28 08:05:11 :D Apr 28 08:05:27 g00s: I meant that setting the parent activity will cause your issue. Apr 28 08:05:36 oh - no i dont have that Apr 28 08:05:42 * g00s sighs Apr 28 08:05:48 What happens when they click this new icon? Apr 28 08:05:50 Code-wise. Apr 28 08:08:07 TacticalJoke hm, i actually did have android:parentActivityName set in the Manifest, so i cleared that out. but now clicking on back doesn't do anything :D Apr 28 08:08:52 so i guess i would setNavigationListener, and do it myself ? (finish) Apr 28 08:08:59 Yeah. Apr 28 08:09:02 XD Apr 28 08:09:08 i suck Apr 28 08:09:15 Either that or keep parentActivityName and set the parent activity's launchMode to singleTop. Apr 28 08:09:17 i hat all UI crap Apr 28 08:10:48 * g00s goes back to the networking stuff :) Apr 28 08:11:25 TacticalJoke a good website to burn time is sciencedaily Apr 28 08:11:41 also gizmag has crazy stuff Apr 28 08:13:11 guys.. help me find motivation to code today :/ Apr 28 08:13:24 Have you checked under your bed ? Apr 28 08:14:00 coudnt. im too lazy to get up :p Apr 28 08:14:15 if you code you will feel better latter, if not you will feel a strange stress you can't get rid of Apr 28 08:14:45 until you code, you will feel restless and unhappy Apr 28 08:14:54 even getting drunk won't help Apr 28 08:15:53 dont say that :p Apr 28 08:16:17 :) Apr 28 08:17:00 well. i fired up AS. the first step is done Apr 28 08:17:01 every day you don't code Steven Hawking cries, do you want that on your soul? Apr 28 08:17:15 He cries anyway. Apr 28 08:17:39 ya, but this time he means it. Apr 28 08:18:10 today ill live dangerous Apr 28 08:18:16 and switch my code to newest appcompat Apr 28 08:19:28 has anyone ever used that: https://github.com/anjlab/android-inapp-billing-v3 Apr 28 08:19:39 If danijoo commits fewer than five changesets today, that number of kittens will be killed. Apr 28 08:19:40 seems to reduce the iap boilerplate to a single listener Apr 28 08:19:45 If he commits more than zero changesets today, that number (at a limit of five) of puppies will be killed. Apr 28 08:19:57 Let the games begin! Apr 28 08:20:14 i'm lucky if i commit once per day :| Apr 28 08:20:28 ya, think about the screams of dying puppies next time you feel like not coding! Apr 28 08:20:33 TacticalJoke, I think changing the identifier of an R.string is totally worth a commit. Apr 28 08:20:34 :p Apr 28 08:20:42 Yeah, I love tiny commits. Apr 28 08:21:11 Actually, I stated that totally wrong. But my brain isn't working after a lack of sleep. Apr 28 08:21:39 weren't you awake when I went to bad yesterday? :o Apr 28 08:21:52 maybe timezones. Apr 28 08:22:12 I think so. I am doing crazy-hours right now. Apr 28 08:22:26 TacticalJoke how come ? Apr 28 08:22:45 TacticalJoke isn't it 9:22 am over there ? Apr 28 08:22:59 Oh, work related. Apr 28 08:23:02 It is indeed. :D Apr 28 08:23:12 :O Apr 28 08:23:21 does anyone else experienceing the gradle daemon to lock your /build folder so you cant clean anymore? Apr 28 08:23:26 Error:Execution failed for task ':app:clean'. Apr 28 08:23:26 > Unable to delete file: D:\git\Hots\app\build\intermediates\exploded-aar\com.afollestad\material-dialogs\0.6.3.5\classes.jar Apr 28 08:23:39 this wont resolve unless I kill gradle daemon Apr 28 08:23:49 the sleep thing is a classic paradox, lack of sleep makes you less productive than if you took the time to sleep but under deadline pressure its almost impossible to admit that. Apr 28 08:24:11 TacticalJoke do we need this? app:theme="@style/ThemeOverlay.AppCompat.ActionBar" Apr 28 08:24:15 on Toolbar ? Apr 28 08:24:31 or is it enough the activity inherits the appcompat theme Apr 28 08:24:32 Okay, here is what I meant: 0 changesets = 5 kittens killed, 0 puppies killed; 1 changeset = 4 kittens killed, 1 puppy killed; 2 changesets = 3 kittens killed, 2 puppies killed; 3 changesets = 2 kittens killed, 3 puppies killed; 4 changesets = 1 kitten killed, 4 puppies killed; 5 changesets = 0 kittens killed, 5 puppies killed Apr 28 08:24:41 g00s, you can just set android:background="?attr/colorPrimary" Apr 28 08:24:52 And more changets are the same as 5 changesets. Apr 28 08:25:02 g00s: Yeah, I think so. Apr 28 08:25:14 danijoo: You need both for things to look right always. Apr 28 08:25:21 oh shit Apr 28 08:25:29 TacticalJoke, perfect! Apr 28 08:25:36 What does the theme change? I dont have it and It looks material to me Apr 28 08:25:39 The overlay thing makes sure that the icons and text are the right colour (white or black) depending on the theme. Apr 28 08:25:51 It might be fine if you're not changing the theme (I forget). Apr 28 08:25:55 so. thats why I had to fiddle arround with it :D Apr 28 08:26:04 i thought appcompat themes broken as usual ^^ Apr 28 08:26:15 TIL Apr 28 08:26:34 You can avoid the theme-overlay thing and just set textColorPrimary or whatever it is. But the theme thing is kinda handy. Apr 28 08:27:26 (You can set textColorPrimary just for the Toolbar or you can set it globally.) Apr 28 08:28:28 -_- dex limit Apr 28 08:28:35 damn you kotlin! Apr 28 08:30:37 TacticalJoke, I would just commit nothing Apr 28 08:31:36 * Zharf hates cats Apr 28 08:34:46 hi since api 22 string entity is deprecated http://developer.android.com/reference/org/apache/http/entity/StringEntity.html it says use openConnection instead but i didnt get how can i use it Apr 28 08:34:57 i only use stringentity like this entity = new StringEntity(jsonArray.toString(), "UTF-8"); Apr 28 08:41:47 sci-fic: you need to use HttpURLConnection.addRequestProperty(String name, String value) Apr 28 08:51:16 thepoosh:there is no static method error Apr 28 08:52:36 it's not a static method Apr 28 08:52:46 do it after you run openCOnnection Apr 28 08:52:59 since it returns an object of HttpUrlCOnnection Apr 28 08:53:26 1. open a connection Apr 28 08:53:30 2. add headers Apr 28 08:53:36 3. send post data Apr 28 08:53:46 4. get response Apr 28 08:54:39 im using loopj http://paste.ubuntu.com/10922911/ Apr 28 09:03:04 a certain function in my app won't work till the app is manually removed from the stack. how do i debug this? Apr 28 09:03:52 with "remove from stack" you mean that the user swipes it away from recent apps? Apr 28 09:03:53 What stack? Apr 28 09:04:00 Doh! Apr 28 09:04:11 danijoo: yes swipe away from recent apps Apr 28 09:04:39 seems like you have something in onCreate you actually want to have in onResume then Apr 28 09:04:54 danijoo: ok i'll check that Apr 28 09:05:58 we cant tell more without any code though Apr 28 09:06:45 anybody ARMv7 developers here ? Apr 28 09:07:02 in some way, we are all running stuff on ARMv7 :) Apr 28 09:08:29 need linux compiler. Where can i get one ? Apr 28 09:08:45 whats a linux compiler Apr 28 09:08:56 *linux compiler for ARMv7 is gcc -match Apr 28 09:09:00 ? Apr 28 09:09:19 Hi guys, does anyone know of a way to overlay a tutorial screen with callout boxes over a settings fragment? Apr 28 09:09:55 sci-fic: so check if they released an update and if not, create an issue Apr 28 09:10:13 how can i compile *.cpp in linux for ARMv7 ? Apr 28 09:10:20 the_fog, relative or framelayout and just overlay it with your tutorial layout Apr 28 09:10:52 how can i compile *.cpp in linux for ARMv7 without JNI etc.. ? Apr 28 09:11:13 danijoo: the settings fragment doesn't have an XML layout though.. Apr 28 09:11:13 gcc ? Apr 28 09:11:31 the_fog, but you can add it to the activity hosting the fragment Apr 28 09:13:41 anybody free developer here for port 2 projects from linux to android ? Apr 28 09:13:48 danijoo yes.... Apr 28 09:13:56 the penny drops :) Apr 28 09:14:08 thanks... that should work Apr 28 09:15:06 free like in doing it for free? Apr 28 09:16:01 danijoo: free mean have free time. Money are present. :) Apr 28 09:16:14 BogdanSuvorov, did you see the topic? :) Apr 28 09:16:35 Android 5.1 only ? Apr 28 09:16:52 "o bots, and no advertising please, jobs or otherwise" Apr 28 09:17:00 +N Apr 28 09:18:03 head to a freelancer platform if you want to hire one Apr 28 09:18:47 need to port 2 projects: wave analysis from linux https://github.com/ysle11/otskok-impuls/blob/master/calculator.h , m7m minerd https://github.com/magi-project/wolf-m7m-cpuminer-V2/blob/master/m7mhash.c Apr 28 09:19:03 how much it cost ? Apr 28 09:19:12 -.- Apr 28 09:20:16 all apps must be in CMD Windows style Apr 28 09:20:56 danijoo: how can i compile cpp code from linux for armv7 arch Apr 28 09:20:57 ? Apr 28 09:21:16 danijoo: you dont know.. Apr 28 09:22:51 troll someone else. Apr 28 09:23:40 anybody real developer here ? Apr 28 09:23:58 danijoo: you are the troll Apr 28 09:24:03 ofc. Apr 28 09:24:16 thats why you get so many replies :p Apr 28 09:26:18 i know how to do it, just look partners.. Apr 28 09:27:37 you need to compile a version of gcc specifically for arm Apr 28 09:28:23 you can use the default linux complier to compile an arm version Apr 28 09:28:46 but normally on most distros the march won't work for arm Apr 28 09:29:20 so basically you use gcc to compile another version of gcc Apr 28 09:29:36 tho at this point you might be able to find something already compiled. Apr 28 09:29:51 tho I can't say where Apr 28 09:31:07 Carbonflux: more publisher can work with .apk only. Is a must to use JNI for make .apk ? Apr 28 09:31:34 I don't know Apr 28 09:32:26 JNI = Java Native Interface - is for call c++ methods from Java Apr 28 09:33:11 Java is higher layer if I understand what you are saying Apr 28 09:33:32 at this compiler level you are just talking to the hardware. Apr 28 09:33:54 for c/c++ (JNI) for android - see NDK Apr 28 09:33:54 Android Studio use JNI for connect c++ methods Apr 28 09:34:13 what Ashiren said Apr 28 09:34:17 Ashiren: yes, NDK and JNI Apr 28 09:35:26 im not sure about pure console apps. sounds more like for ROMs developing Apr 28 09:35:45 minerd is not effective if writen on Java, it must be compiled from c++. I want to make the port of minerd Apr 28 09:36:32 well minerd wouldnt be effective on android neither Apr 28 09:36:39 Ashiren: yes, ROMs developing and console apps is need - not more Apr 28 09:37:39 Ashiren: minerd have 5Kh on ARMv7 Neon, so I want to use it for promote some pools Apr 28 09:38:26 Ashiren: MagiCoin - is CPU only miner Apr 28 09:39:07 Ashiren: support of MagiCoin propose me some money for port minerd on Neon Apr 28 09:39:28 2000 XMG for week of work Apr 28 09:39:45 1 XMG = 7000 satoshi Apr 28 09:40:14 0.14 btc per week Apr 28 09:40:37 0.14btc=$35 Apr 28 09:40:44 I am tired Apr 28 09:40:46 :) Apr 28 09:41:04 nice salary Apr 28 09:41:40 also you might want to look into https://stackoverflow.com/questions/9460251/how-do-i-build-a-native-command-line-executable-to-run-on-android Apr 28 09:42:33 besides isnt there minerd port already on android? probably would just need some tweaks for different coins Apr 28 09:44:17 Ashiren: do you know some already ported minerd ? I dont. Apr 28 09:45:11 reading stackoverflow Apr 28 09:45:29 one of first links in google ~ https://bitcointalk.org/index.php?topic=93276.100 Apr 28 09:46:27 Ashiren: run minerd via adb - is a normal Apr 28 09:50:14 hmm Apr 28 09:50:38 all their binaries only for nonArm cpus https://github.com/pooler/cpuminer/downloads Apr 28 09:51:01 I'll try to compile their sources for ARMv7 Apr 28 09:51:54 Ashiren: thank you. If you have XMG wallet - i want to pay you for help. Apr 28 09:53:28 :o Apr 28 09:54:02 also you can ask magic111 from #magi channel for request payment. Just say him: - "I helped BogdanSuvorov for make minerd for Android" Apr 28 09:54:02 z:o Apr 28 09:56:08 magic111 will be after 6-8 hours on channel #magi. He is from Netherlands Apr 28 09:56:27 ^^ Apr 28 09:56:45 Ashiren: just give me your XMG wallet. I'll pay you for work now. Apr 28 09:57:15 I am from Ukraine. :) Apr 28 09:57:25 ofc everyone has a XMG wallet Apr 28 10:12:45 I am using a RecyclerView and I want to open an Activity when one of its items is clicked. Is it a good approach to do it directly on the onClick listener? I am doing that from the ViewHolder itself and somehow seems like it's not its responsibility Apr 28 10:37:43 Papipo, since recyclerview does not have an onitemclicklistener, this is the only thing you can do Apr 28 10:37:46 Why isn't my locale change working? I'm trying to change it within a fragment. There is no error of any kind, it just doesn't happen. http://pastebin.com/NbkWRmUK Apr 28 10:38:20 jutsi, NEVER create new configs Apr 28 10:38:23 use old one Apr 28 10:39:03 getConfiguration() , change that and set updateConfig with that Apr 28 10:39:45 do i get it from the activity or? Apr 28 10:39:55 that doesn't seem to work, where i get configs from? Apr 28 10:41:11 jutsi, http://pastebin.com/3ud1fR8v Apr 28 10:41:59 this android thing is so badly designed... Apr 28 10:42:15 Papipo, what thing exactly? Apr 28 10:42:15 what should be read to understand the structure of Android SDK and what to update or not from SDK Manager? Apr 28 10:42:23 many things Apr 28 10:42:32 it's just the smell Apr 28 10:42:46 it's cumbersome in many places Apr 28 10:46:03 wut o.O I got the weirdest error ever, "You need to use a Theme.AppCompat theme (or descendant) with this activity Apr 28 10:46:55 thats not weird. it tells you exactly what is wrong Apr 28 10:47:11 you are trying to use an Appcompat version of Activity without an Appcompat theme Apr 28 10:47:13 yeah i know, i didn't have a values directory, i only had a values for each language Apr 28 10:48:10 how to identify/ uninstall adt from Eclipse Installation details? Apr 28 10:48:42 Anyways it's still not changing languages... Could it be because it's a fragment and i need to declare locale (and get configs) from the activity? Apr 28 10:48:59 http://snag.gy/UYaYo.jpg Apr 28 10:49:18 jutsi, languages dont change once activity is started Apr 28 10:49:22 you need to recreate it Apr 28 10:49:36 danijoo ok so recreate the activity? Apr 28 10:49:50 yeah. for example you need to finish it and start it again Apr 28 10:49:51 need contents of a scrollview to be slighly taller than the screen Apr 28 10:50:04 but watch out. Language will reset to system default with every orientation change ^^ Apr 28 10:50:12 so I need a linear layout the size of the screen + some more Apr 28 10:50:14 so once user rotates screen, you have to call the code again Apr 28 10:50:29 can't think of how I've done this in xml before Apr 28 10:50:55 knapper_tech, scrollview: match_parent; inner layout: wrap_content where content is larger then screen Apr 28 10:51:31 Up buttons are no longer up buttons with Material, right? Apr 28 10:51:45 Estel, they are still up buttons Apr 28 10:52:07 I have some memory of them getting redefined? Apr 28 10:52:10 danijoo, inner content dividing up the linear layout instead of matching parent Apr 28 10:52:35 I guess it might be matching parent in a way? but anyway one of the children wants to be screensized too Apr 28 10:52:39 Estel, are we talking about action bar navigateHomeAsUp? Apr 28 10:52:48 Yes Apr 28 10:52:53 Well, I was. Not sure if you were :P Apr 28 10:52:59 they are the same since android version 4 Apr 28 10:53:36 I tried to restart the activity, but still nothing Apr 28 10:54:47 okay, thanks Apr 28 10:55:16 hello, I have a class in which I start an AsyncTask. For some reason I keep getting a null pointer exception though Apr 28 10:55:25 jutsi, just google android change language and youll find plenty of tutorials Apr 28 10:55:42 This is my code: https://bpaste.net/show/2f8da6491d5b Apr 28 10:55:45 i am, thats how i found the first one, which didn't work Apr 28 10:55:46 Hi, I do need to get some json data just after application resume, in my case: "HttpClient httpclient = new DefaultHttpClient(); HttpResponse httpResponse = httpclient.execute(new HttpGet(url));" however, on some devices there is no results, but if app restarted call do it well. Any idea on workaround? Apr 28 10:56:49 szt, http://imgur.com/jacoj Apr 28 10:57:28 hang on Apr 28 10:57:37 https://bpaste.net/show/3bceb4e81347 Apr 28 10:57:40 danijoo: ^ Apr 28 10:58:13 szt, urlConnection is null Apr 28 10:58:15 at line 60 Apr 28 10:58:21 what could cause that? Apr 28 10:58:43 Because I set it to null? Apr 28 10:58:57 :) Apr 28 10:59:19 and your first line in try (53) already throws you an error. Apr 28 10:59:26 so it will still be null in finally Apr 28 10:59:28 oh Apr 28 10:59:33 I found the bug Apr 28 10:59:43 sorry this is ridiculous.. Apr 28 11:07:55 how in hell can I get a resource from a custom xml? Apr 28 11:08:10 I am in a static context (a newInstance method of a fragment) Apr 28 11:10:47 in /values ? Apr 28 11:10:53 or in /xml Apr 28 11:11:08 or /assets Apr 28 11:12:16 values Apr 28 11:12:34 it's an api key, I want to store it on the debug dir and .gitignore it Apr 28 11:12:40 so it never hits the repository Apr 28 11:12:51 I have added the classic getContext() method to my App class, just in case Apr 28 11:12:58 just store it as like a resource Apr 28 11:13:05 if that makes things easier Apr 28 11:13:23 YOUR_API_KEY_HERE Apr 28 11:13:34 and put that in another xml file than strings.xml Apr 28 11:13:37 you mean in strings.xml ? Apr 28 11:13:53 Papipo, android doesnt care about /values naming Apr 28 11:14:00 aha Apr 28 11:14:07 it takes all your xmls and create resources from it Apr 28 11:14:28 so it its this_is_my_secret.xml, you can still use getString(R.string.api_key) Apr 28 11:14:31 and you mean to put it on the values dir of main instead of debug? Apr 28 11:14:46 whereever you need it Apr 28 11:14:59 just use a new file if you dont want to commit it to repository Apr 28 11:15:20 I must have done something wrong, because that was my first approach. Android studio won't autocomplete the string name Apr 28 11:15:36 maybe your filestructure was wrong. Apr 28 11:15:43 dont forget the tags Apr 28 11:16:09 , right? Apr 28 11:16:15 like in strings.xml Apr 28 11:16:19 yep Apr 28 11:16:22 just copy the header part of it Apr 28 11:17:13 seriously, it's not working Apr 28 11:17:42 gonna try just adding it to the strings.xml file as a test Apr 28 11:18:12 there it works perfectly fine Apr 28 11:18:27 it might have something to do with the fact that it's on debug instead of main Apr 28 11:18:43 if its on debug, it will only work on debug builds Apr 28 11:21:06 sigh, it was a matter of purging the cache / rebuilding Apr 28 11:21:15 I did both things and not it's working Apr 28 11:23:24 Yeah just followed another locale change tutorial... didn't work Apr 28 11:26:36 jutsi, can you post a link to it? Apr 28 11:28:31 dani how can i do something like that http://postimg.org/image/49uhdc2m7/ . swipe right verify swipe left cancel icon will appear and also on verify button click it will slide in left to right etc Apr 28 11:28:44 danijoo Apr 28 11:29:04 viewpager or img switcher or what else Apr 28 11:30:11 danijoo following this one http://stackoverflow.com/questions/2900023/change-language-programatically-in-android Apr 28 11:30:30 sci-fic, no idea Apr 28 11:31:26 jutsi, show your code again :) Apr 28 11:31:54 danijoo http://pastebin.com/4ZU4EQ3M Apr 28 11:32:19 you didnt follow the tutorial Apr 28 11:32:34 "And you have to set it every time you enter activity ( each activity ) from my experience." Apr 28 11:32:59 but im using fragments, not activities Apr 28 11:33:15 but it has to go into activities onCreate :) Apr 28 11:33:21 before you inflate any layout Apr 28 11:33:27 right-o Apr 28 11:33:43 its not encouraged to change language anyways Apr 28 11:33:51 dont do it if you dont have to Apr 28 11:37:13 hello Apr 28 11:40:00 danijoo i have to.. Making an app for a close to extinct language, which needs switching Apr 28 11:40:07 meh, yes you would need to mess with all activities' onCreates to make sure language is changed Apr 28 11:40:27 as well services and probably fragment before they create views Apr 28 11:40:28 if im using fragments, do i need to mess with fragments oncreates? Apr 28 11:41:36 its fighting the system Apr 28 11:41:39 really hacky Apr 28 11:41:46 ok maybe fragments are not needed Apr 28 11:42:06 anybody have a sample app for twitter streaming api? I mean a client android app Apr 28 11:42:19 you can also do it once in applications onCreate Apr 28 11:42:35 and then again everytime application#onConfigurationChange is called. then you dont need to mess with activities Apr 28 11:42:42 I'm trying to learn, so it'll be really helpful Apr 28 11:42:47 HOW can android not support this? o.O Apr 28 11:43:18 jutsi, BECAUSE there is a system language. And its assumed that this is the language for all apps Apr 28 11:43:49 danijoo the onConfigurationChange way seems cleaner Apr 28 11:44:11 really? and you havent ever wanted to change language in any app? Apr 28 11:44:26 danijoo the language im creating for doesn't have its own language in android system :( Apr 28 11:44:34 Ashiren, I have it implemented in one app to my shame ;) Apr 28 11:45:04 jutsi: is it klingon Apr 28 11:45:57 i'd switch to that ^^ Apr 28 11:46:05 Ashiren no, its an indigenous language Apr 28 11:47:01 danijoo could you link me to any tutorial using teh way you described with the onConfigChange and on applicationcreate thingie? Apr 28 11:47:15 *the Apr 28 11:47:18 no. i dont have one by my hand Apr 28 11:47:27 I can post you how I did it. Apr 28 11:47:34 that'd be major help :) Apr 28 11:50:54 i need a little help guys Apr 28 11:51:20 can anybody give a link to smaple twitter streaming api client app Apr 28 11:51:29 *spamle Apr 28 11:51:33 *sample Apr 28 11:52:52 jutsi, https://gist.github.com/danijoo/d024eb20f9b4a9ded587 Apr 28 11:53:00 do I have to make changes on android.bat in order to change the default location of /users/.android ? Apr 28 11:54:48 thanks :) Apr 28 11:57:51 danijoo how do i "call" the language change? I see that you update language onCreate but doesn't it only get called once? Apr 28 11:58:41 hello Apr 28 11:59:30 jutsi, I call ((MyApplication) getContext().getApplicationContext()).updateLanguage() Apr 28 11:59:48 and then i start my entry activity finishing all other activities Apr 28 11:59:58 danijoo is it possible to pass a string along instead of using preferences? Apr 28 12:00:08 *sharedPreferences Apr 28 12:01:03 jutsi, yes but you want it to be saved for when the user starts the app again next week, dont you? Apr 28 12:01:11 thats why you put it in a preference Apr 28 12:01:14 i have htc m7 and phone just updated to andoid 4.4.2 Apr 28 12:01:25 there no andoid 5 update available for this phone? Apr 28 12:01:34 isthisreallife, wrong channel Apr 28 12:01:56 danijoo good thinking Apr 28 12:01:58 this is android application development Apr 28 12:02:02 ah sorry Apr 28 12:02:17 i am trying to remove item from array adapter but it is causing index out of bound exception.. i am working on search i have search but didnot find something helpfull untill now Apr 28 12:02:50 s9iper1: you should be using the FIlterable interface Apr 28 12:02:52 for searching Apr 28 12:02:57 ^ tyhis Apr 28 12:03:00 Any suggestions as to how do I convert the "Base64-encoded RSA public key to include in your binary" to the PEM format? Apr 28 12:03:33 Just prepend -----BEGIN PUBLIC KEY----- and add a \n every 64 chars and append -----END PUBLIC KEY----- ? Apr 28 12:03:43 s9iper1: take a look at this code Apr 28 12:03:44 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/widget/ArrayAdapter.java#ArrayAdapter.ArrayFilter Apr 28 12:03:55 thepoosh, its not working in my case me so i am writing my own. Apr 28 12:04:09 that is because you are not implementing your own filter Apr 28 12:04:16 create a custom filter and use it Apr 28 12:04:19 s9iper1, see the picture linked in the topic Apr 28 12:05:28 mAdapter.getFilter().preformFiltering(YOUR_SEARCH_TERMS) Apr 28 12:05:39 danijoo: that is the second time in ten minutes Apr 28 12:05:57 and I'm not sure how logcat will make a change if it's not crashing on him Apr 28 12:06:02 thepoosh, should make me a script i think Apr 28 12:06:23 lolz Apr 28 12:06:31 danijoo, haha Apr 28 12:06:46 you should see it as a general advice for people that "my adapter gives me nullpoiner - fix it" is not helpful Apr 28 12:06:52 we need code and stacktraces Apr 28 12:06:59 yes, that Apr 28 12:07:18 s9iper1: can you give a sample of what you tried in the Filterable implementation? Apr 28 12:07:34 one sec Apr 28 12:07:49 danijoo: this is a general thing but written for iOS devs Apr 28 12:07:55 you should read it and weep Apr 28 12:07:56 whathaveyoutried.com Apr 28 12:09:04 danijoo, thepoosh http://paste.ubuntu.com/10924668/ here is the code and the method is at the bottom Apr 28 12:09:07 Hi all, I have a videoview looping a local webm (~4seconds long) in res/raw, though it's incredibly choppy (only shows 2 frames). Any ideas how I can improve performance? Apr 28 12:09:37 s9iper1: as i said, you have to use filterable Apr 28 12:09:41 and not your method Apr 28 12:09:44 thepoosh, this guy exactly hits the point Apr 28 12:09:53 or lock the UI while doing it Apr 28 12:09:56 i was using filter but filter is not working Apr 28 12:10:09 or create a copy of the dataset and then set it with notifyDatasetChanged Apr 28 12:10:23 danijoo: I know, I've been saving this link for a few years now Apr 28 12:10:30 s9iper1: show me *that* code Apr 28 12:10:35 sometimes I wonder why people use their time to setup irc, come here and ask a question when google can solve it in 1 second Apr 28 12:11:25 they don't setup anything web.freenode.com Apr 28 12:11:46 danijoo, i came here after google Apr 28 12:11:51 iwuhfiwuehf the most immidate optimization tip that comes to mind is reducing the resolution of the video to fit a phone screen Apr 28 12:11:59 s9iper1, that was not against you :) Apr 28 12:12:06 just against everyone :D Apr 28 12:12:20 s9iper1: where is the Filterable code? Apr 28 12:12:22 :( Apr 28 12:12:54 jutsi: write your own decoder Apr 28 12:13:27 thepoosh, http://paste.ubuntu.com/10924712/ Apr 28 12:13:47 and now mModeAdapter.getFilter() Apr 28 12:13:50 i was using it but its not working after i have added bitmaps Apr 28 12:14:16 wat? Apr 28 12:14:24 thepoosh what for? o.O Apr 28 12:14:24 that shouldn't make any difference Apr 28 12:14:44 jutsi: ignore me Apr 28 12:15:01 thepoosh but you're funny Apr 28 12:15:17 thepoosh, running this again for you ... Apr 28 12:15:17 s9iper1: you probably wrote the search mechanism wrong, look at the link i posted earlier and see how a filter should be implemented Apr 28 12:16:01 thepoosh, ok Apr 28 12:18:41 danijoo: ARRRRG, I don't get it, what's the point of android:scrollbars in RelativeLayout if it's not making it scrollable!!! Apr 28 12:19:03 tbh no idea :D Apr 28 12:19:10 it's so annoying Apr 28 12:21:15 Leeds: what's up? haven't heard from you in a while Apr 28 12:21:22 jutsi: It is - it's a 1080x1920 video (portrait), running on 42" full HD displays. Apr 28 12:21:53 thepoosh: just been in Singapore for the weekend, was in UK and Spain before that for Pesach Apr 28 12:22:03 oh, cool Apr 28 12:22:06 how was? Apr 28 12:23:07 all good... we sort of ran out of things to do in Singapore apart from eating - which we did a lot of - and ended up going to the cinema twice over the weekend :) Apr 28 12:23:14 it's your turn to find me music now Apr 28 12:23:28 anything good? Apr 28 12:24:42 iwuhfiwuehf, are you using the default videoview? Apr 28 12:24:52 danijoo: Yup Apr 28 12:27:52 thepoosh: it's not new, but if you want something with some wit to it, I can recommend Tropical Brainstorm by Kirsty MacColl Apr 28 12:28:00 have you tried other video formats like mp4? Apr 28 12:28:07 was listening to it on the plane this morning Apr 28 12:28:47 Leeds: once my current set is over she's next Apr 28 12:29:26 danijoo: Have tried MP4 & OGV - same result Apr 28 12:31:19 iwuhfiwuehf, what about the codec. did you check that its a supported one? Apr 28 12:32:45 danijoo: The webm is vp8, and the mp4 was some variation of H264. They are playing though, so I wouldn't have thought that would be the issue - they're just painfully slow. Apr 28 12:38:39 iwuhfiwuehf running it on an emulator or real device? Apr 28 12:39:03 jutsi: Real device with a tegra 3 Apr 28 12:41:46 iwuhfiwuehf using video view or some custom player? Apr 28 12:42:33 jutsi: Just the base videoview Apr 28 12:43:08 iwuhfiwuehf no surfaceview? Apr 28 12:43:26 jutsi: Nope, should I? Apr 28 12:43:42 yes, from what i understand it helps wiht hte lag Apr 28 12:43:44 with the Apr 28 12:45:08 iwuhfiwuehf also what format is your video? Apr 28 12:45:36 i just asked all that ^^ Apr 28 12:45:48 The one I'm using now is a vp8 webm, though I've tried an mp4 in some form of h264 & an ogv with the same result Apr 28 12:46:56 have you tried lowering the bitrate of the video? Apr 28 12:47:23 jutsi: Yup, still no change Apr 28 12:48:49 jutsi: Interestingly, I've just tried it on a tab 4 running 4.4 (other device is on 4.2), and the video plays through once fairly smoothly, but then stops Apr 28 12:48:52 if you run the video just once, does it lag? Apr 28 12:49:26 ah yes, then you need to slow down your loop, by the sounds of it, it's making too many calls and its slowing down your playback Apr 28 12:49:55 jutsi: Yeah, the loop doesn't seem to impact anything Apr 28 12:50:26 so it runs smooth the first time, but only on your tab? Apr 28 12:52:10 I've got a card showing description of something. There are 2 options - simple and advance. So what do you think should be the way to switch between them? tabs, swipe, switch? Apr 28 12:52:35 iwuhfiwuehf the last thing i can think of then is memory reading speeds.. Maybe it exceeds them? Is the video on an SD card? Apr 28 12:52:58 yoavst, awesome anymation replacing card 1 with card 2 Apr 28 12:53:16 something like blending one into the other Apr 28 12:53:29 but what should replace between them? Apr 28 12:53:49 I want to make both of them accessible, since sometimes the short description is too short. Apr 28 12:54:35 a viewpager is pretty cool, not the tabbed one, but the one where you side swipe between them Apr 28 12:54:59 maybe a small arrow indicator for the small one (like in ExpandableListView) Apr 28 12:55:03 so it will not have a blowing animation :P Apr 28 12:55:23 jutsi: Mmk, the tabs now looping fine (I added videoview.start to the onprepared listener), but the other device is still painfully slow. They're both running from the default storage (res/raw). The only major difference between the two is the android version - 4.2 to 4.4. Dyou know of any differences between the two? Apr 28 12:55:45 iwuhfiwuehf, maybe its time to show some code already Apr 28 12:56:09 do I have to escape "/" in my strings? this is what I have in my xml --> Add/Remove Friends Apr 28 12:56:33 ExeciN: if you add quotes its fine Apr 28 12:56:41 "Add/Remove Friends" Apr 28 12:56:47 danijoo: jutsi: Mmk, here you go » http://hastebin.com/motucukule.java Apr 28 12:56:51 ExeciN, press shift+F10 Apr 28 12:57:03 why doesn't anyone use pastebin anymore? Apr 28 12:57:04 what is shift+F10? Apr 28 12:57:12 jutsi: it's blocked in india Apr 28 12:57:18 run application :P Apr 28 12:57:24 to see if it works Apr 28 12:57:37 lollll Apr 28 12:57:54 im mad today. I shoudnt troll here :/ Apr 28 12:58:03 thepoosh: cool thanks, danijoo: I must have a different set of keyboard shortcuts Apr 28 12:58:07 ExeciN: http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling Apr 28 12:58:17 danijoo: i get you man Apr 28 12:58:43 danijoo: also, I think it's F5 Apr 28 12:59:01 weird. its F10 for me Apr 28 12:59:18 http://prntscr.com/6z4mnq Apr 28 12:59:28 I just remember the shortcut for VS2010 Apr 28 13:00:06 does anyone faced my problem ? I've been using a popupWindow with an offset but when It's display for the first time, the offset is just ignored wtf ! Apr 28 13:00:15 but not the second time Apr 28 13:00:44 ektos, where do you open it? maybe the anchor view is not inflated yet Apr 28 13:01:24 ektos, do you set the offset in showAtLocation Apr 28 13:01:25 ? Apr 28 13:01:34 cause i do, and never experimented that issue Apr 28 13:01:52 adq: No I use showAsDropDown Apr 28 13:02:16 danijoo: this is me -> http://prntscr.com/6z4nje Apr 28 13:02:22 ah, try with showAtLocation Apr 28 13:03:24 Is there a way to use tabs without viewpager? Apr 28 13:04:03 yoavst: what are you trying to do? Apr 28 13:04:10 and why is a viewpager not optional? Apr 28 13:04:21 tabs to switch modes Apr 28 13:04:25 but it is textview Apr 28 13:04:31 wat?! Apr 28 13:05:32 adq: No it's not what I want Apr 28 13:05:52 adq: I'd like to get a dropdown effect Apr 28 13:06:04 you can have any animation you like with a popupwindow Apr 28 13:06:09 ektos: show us the code Apr 28 13:06:11 mPopup.setAnimationStyle << Apr 28 13:06:25 but i don't know more anyway, good luck Apr 28 13:09:09 I have something like that https://www.irccloud.com/pastebin/reAf1s7e Apr 28 13:10:54 that is one shitty plugin Apr 28 13:11:04 try gist or pastebin Apr 28 13:12:54 hi there guys :) Apr 28 13:12:56 my eyes always bleed if people use _variableName in java ^^ Apr 28 13:13:03 adq: I would like to get the second screen as result https://usercontent.irccloud-cdn.com/file/5APAsdDl/Screen+Shot+2015-04-28+at+15.11.38.png https://usercontent.irccloud-cdn.com/file/MuwU4QUt/Screen+Shot+2015-04-28+at+15.11.57.png Apr 28 13:13:30 can someone please tell me what's the format for simpledateformat for this: "2015-04-28T14:08:19+01:00" Apr 28 13:13:30 danijoo: I know you already told me that! Apr 28 13:13:38 danijoo: and more than once ^^ Apr 28 13:13:40 :D i did? XD Apr 28 13:13:51 danijoo: yep Apr 28 13:14:06 where is this from btw? php? Apr 28 13:14:16 doria: what does it look like? Apr 28 13:14:28 hi thepoosh! :) Apr 28 13:14:29 danijoo: what the screens or the _ ? Apr 28 13:14:40 the _ Apr 28 13:14:46 http://developer.android.com/reference/java/text/SimpleDateFormat.html Apr 28 13:14:47 ektos, try asking in #android-fr maybe :) Apr 28 13:14:53 danijoo: that is bad Apr 28 13:14:54 it's a PHP returned ISO8601 date format Apr 28 13:15:04 it looks just like that :D Apr 28 13:15:06 doria: look at the format not in that Apr 28 13:15:29 adq: I'll think about it but I'm not really fan of French xD Apr 28 13:15:31 danijoo: do you use '_' for private cariables? Apr 28 13:15:37 simpledateformat gives me a parsing error when parsing with "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" Apr 28 13:16:04 Unparseable date: "2015-04-28T14:08:19+01:00" (at offset 19) Apr 28 13:16:17 ektos, there are some talented developers there but it's crippled with troll, i warned you :) Apr 28 13:17:12 doria try yyyy-MM-ddThh:mmzzzz Apr 28 13:17:31 coming right back ;) Apr 28 13:17:42 danijoo: did you turn nice again?! Apr 28 13:18:13 thepoosh, its a trap! Apr 28 13:18:36 danijoo:So freenode's browser client is down... did you come up with anything re videoviews? Apr 28 13:19:15 no. looks good to me. No idea why it lags Apr 28 13:19:24 maybe you can try surfaceview Apr 28 13:19:32 danijoo:Mmk, I'll give it a go Apr 28 13:19:51 what's the recommended way of uploading a file to a webserver from Android? I see that AndroidHttpClient is deprecated Apr 28 13:20:12 depends on who is the one recommending :) Apr 28 13:20:35 what would you recommend, danijoo ? Apr 28 13:20:41 OkHttp Apr 28 13:21:12 Without pulling in any external libraries Apr 28 13:21:18 what would you recommend then? Apr 28 13:21:28 nothing Apr 28 13:21:33 kba: HttpUrlConnection Apr 28 13:21:54 thepoosh: okay, thanks Apr 28 13:22:37 http://snag.gy/WzAIt.jpg Apr 28 13:22:46 anyone knows how to solve this? Apr 28 13:23:05 anahumar: care to add some more information? Apr 28 13:23:10 all we know is that nothing happened Apr 28 13:23:13 just installed android studio but sdk keeps failing Apr 28 13:23:17 "yyyy-MM-dd'T'HH:mm:ssZ" << doria Apr 28 13:23:30 danijoo: will you stop helping lazy people?! Apr 28 13:23:40 now i'm pissed off Apr 28 13:23:44 :D Apr 28 13:24:06 i try to fix my karma Apr 28 13:24:40 anahumar, could be anything. from no permissions to shitty internet connection Apr 28 13:25:07 also, is this windows 95? ^^ Apr 28 13:25:24 it's the same connection I'm writing to you from .. permission probably Apr 28 13:25:40 I can't run the SDK Manager.exe Apr 28 13:25:43 you can try launching AS as admin Apr 28 13:25:46 nothing happens when I click it Apr 28 13:25:54 If I extend LinearLayout, how can I get rid of the default contructors? Apr 28 13:25:59 or the sdk manager.exe Apr 28 13:26:08 barq, you dont. they are all neccessary Apr 28 13:26:25 you need at least 2 of them Apr 28 13:26:45 the one with (context) and (context, attrs) Apr 28 13:26:51 @thepossh: ended up using this -> "yyyy-MM-dd'T'hh:mm:ssZZZZZ" ;) Apr 28 13:27:08 good Apr 28 13:27:09 tyvm for your help :) Apr 28 13:27:14 first one called when you instantiate it from code, second one is called when you have it in XML Apr 28 13:27:38 ^^ Apr 28 13:27:50 Thanks. Apr 28 13:28:03 another problem... lol Apr 28 13:28:20 the server spits out 2015-04-28T14:26:09+01:00 Apr 28 13:28:31 I've another "used to be" working copying of sdk now is acting the same .. SDK Manager.exe no response Apr 28 13:28:41 I use a calendar for later retrieval Apr 28 13:28:59 doria, thats the same format you gave in first place Apr 28 13:29:12 when I use calendar.HOUR_OF_DAY its gives me 11?! Apr 28 13:29:37 doria, maybe a timezone issue? Apr 28 13:29:48 or maybe read documentation Apr 28 13:29:55 or both Apr 28 13:30:01 most likely .. that's why I was struggling to get the parsing string right... eheheh Apr 28 13:30:19 thepoosh, did I miss that we switched roles? Apr 28 13:30:29 SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZZZZZ",Locale.US); Apr 28 13:30:30 hmmm Apr 28 13:30:31 formatter.setTimeZone(TimeZone.getTimeZone("GMT")); Apr 28 13:30:32 Date now = formatter.parse(date); Apr 28 13:30:33 appVars.calendar = Calendar.getInstance(); Apr 28 13:30:35 appVars.calendar.setTime(now); Apr 28 13:30:37 that's the code Apr 28 13:30:37 oh Apr 28 13:30:38 my Apr 28 13:30:43 god Apr 28 13:31:29 Hi guys bit of a dev question or a root qustion so maybe direct me but the verizon motox has just been rooted and I have been asked to help someone with a creating a stock rom so - far we have added root, xposed, and wifi tethering - first rom so pretty basic for now - however i now need to disable a verizon app by disabling the notifications by modifying it I have unpacked the apk but Im wondeing if I can disble Apr 28 13:31:36 notifications through modfiiying something? Apr 28 13:31:42 *custom Apr 28 13:32:20 The thing is we don't have write protect turned off yet so we must modify the app before hand Apr 28 13:33:01 Haxxa, although this should go into #android-root, you should be able to decompile the apk to smali or java and make the needed changes by hand, then recompile it and ship it with the ROM Apr 28 13:34:07 danijoo, Well I have decompiled the apk just not sure where to go from here do I need to modify the actual java code in a IDE? Apr 28 13:34:45 doria: you set the time zone to one hour back on purpose? Apr 28 13:34:50 we bascially want to disable notifications entirely from this app Apr 28 13:34:54 you can also do it in texteditor if you like :p Apr 28 13:35:04 ehehe no Apr 28 13:35:25 Haxxa, try #android-root but decompiling an apk to disable the notification will not fly Apr 28 13:35:41 adq will not fly? Apr 28 13:35:44 this is the PHP bit that sets the date string: Apr 28 13:35:45 (and it will give you smali code, not java code, and it's not necessarily easy to repack, and you will lost the signature, etc) Apr 28 13:35:48 date_default_timezone_set( $timezone ); Apr 28 13:35:49 ^ because Apr 28 13:35:50 $date = date("c"); Apr 28 13:35:56 its work though. You need to understandt the code you are modifying. And its hard to read smali Apr 28 13:36:04 and if its obfuscated, you are fucked. Apr 28 13:36:24 this is not how it should be done Apr 28 13:36:32 and $timezone= "Europe/London" Apr 28 13:37:04 isnt Europe/London GMT already? Apr 28 13:37:08 yes Apr 28 13:37:18 so why is the string from your server GMT+1 then? Apr 28 13:37:28 that doesnt make sense Apr 28 13:37:51 adq the reason is we literally obtained root last night and we still need to use stock rom for everything so we have to reverse enginneer everything considering we lack write permissions - everything must be ready on firrst boot and afterwards no changes to /system can be made Apr 28 13:37:56 what I'm trying to accomplish is getting the device's timezone and get the correct (adjusted) time in the server for the given timezone Apr 28 13:38:15 so.. no trusting the device's date/time Apr 28 13:38:17 not* Apr 28 13:38:26 doria, Data object already is timezone dependent. Apr 28 13:38:50 if you read GMT in, and put it out as a string in another timezone, the timezone with change itself Apr 28 13:38:53 you dont have to do that Apr 28 13:38:57 given this any ideas the app in question is the setup.apk which stupidly also has annoying notifications pop up for not using verzion sim and these can not be disabled Apr 28 13:39:02 I had already got rid of that line danijoo ;) result is the same: hour_of_day = 11 :S Apr 28 13:39:42 Haxxa, #android-root :) Apr 28 13:39:58 its dead danijoo :( Apr 28 13:40:17 try #cyanogenmod then. Apr 28 13:40:24 or #cm Apr 28 13:40:28 whatever their channel is Apr 28 13:40:34 they know more about that stuff than we Apr 28 13:40:47 also devs usually rage if you ask them root questions Apr 28 13:41:27 doria, try to remove 4 Z Apr 28 13:41:58 "yyyy-MM-dd'T'HH:mm:ss.SSSZ" -> 2001-07-04T12:08:56.235-0700 Apr 28 13:42:11 thats from the documentation and you have the same but without the .SSS Apr 28 13:43:53 also devs usually rage if you ask them root questions < lol Apr 28 13:44:42 how can I have view that can display a PDF file that can also be searched and navigated with other buttons, dropdowns, etc. and the search function in the android toolbar Apr 28 13:44:48 actionbar Apr 28 13:45:44 danijoo, London has bst Apr 28 13:45:57 which is gmt+1 Apr 28 13:46:11 brb ;) Apr 28 13:47:00 Which we are currently in now :D Apr 28 13:47:09 yes Apr 28 13:47:10 Hurray for changing the time according to the date Apr 28 13:47:39 is minification via proguard enough obfuscation? Apr 28 13:47:51 Although, and I realise this is possible a silly question and I havent thought about it much, but sure GMT == BST Apr 28 13:47:59 paulo_, it is not obfuscation Apr 28 13:48:07 Because Greenwich is affected by BST. Apr 28 13:48:10 Anthaas, nope Apr 28 13:48:37 gmt does not change Apr 28 13:48:43 ok. what kind of obfuscation do you recommend? Apr 28 13:48:56 Its funny that Greenwich Mean Time doesn't change when it represents the time at the Royal Observatory, which does change hahaha Apr 28 13:48:57 paulo_, standard Apr 28 13:49:27 Which obviously makes the UK world leaders of time. Apr 28 13:49:30 Anthaas, that's why it's slowly being renamed to utc Apr 28 13:49:34 If we choose to move Greenwich you are all buggered :P Apr 28 13:50:29 danijoo, so cm is pretty dead Apr 28 13:50:32 and cm dev Apr 28 13:50:37 :( Apr 28 13:51:27 Meh, I quite like using GMT as a standard Apr 28 13:51:38 Making time relative to where you are makes things more complicated. Apr 28 13:52:37 pfnQ: how do I do that? Apr 28 13:53:08 by not setting -dontobfuscate paulo_ Apr 28 13:53:36 Hi all Apr 28 13:54:09 ok. i actually haven't tried decompiling before settinge the minify: true flag. Apr 28 13:54:10 I was wondering what parts of the SDK takes most of the space as I want to delete some off the SDK manager. Apr 28 13:54:35 bergooo, For me it was the VM images. Apr 28 13:55:47 What's the easiest way to install crosswalk for my app with the cordova CLI? Apr 28 13:57:31 is there any tutorial on how to use the SNS mobile push notification published in aws labs on github? Apr 28 13:57:32 Anyone know why this SimpleDirectedGraph constructor can't be found with JGraphT? http://pastebin.com/1XwKrYCa Apr 28 13:57:37 Oops, wrong channel Apr 28 13:57:50 Feel free to answer if you know the answer though haha Apr 28 14:00:55 DLSteve, you mean the system images ? Apr 28 14:01:06 bergooo, yah Apr 28 14:01:35 can I delete all of them (when just developing for smartphones) ? Apr 28 14:03:37 indeed it took 7gb, the rest of the SDK is still around 20gb Apr 28 14:12:27 Anyone remember that list for looking at various companies software stacks? Apr 28 14:12:37 nm stackshare Apr 28 14:12:50 delete versions of the sdk you don't care about, delete docs and example code, delete vm images Apr 28 14:12:56 my whole sdk dir is only 9 gig Apr 28 14:13:09 (lets not talk about the ~/.android-studio and ~/.gradle nonsense of course) Apr 28 14:17:53 back Apr 28 14:18:51 me dumb dumb... LOL I was accessing the static member of hour_of_day instead of using the method get() ... that's why I was getting always a '11' LOL Apr 28 14:19:08 all is well with the world now... :P Apr 28 14:19:58 How can I install the YouTube player on my emulator? Apr 28 14:21:51 Wait, I think I've found a way Apr 28 14:32:43 Papipo, use genymotion with gapps Apr 28 14:36:45 Genymotion does not have networking support, right? Apr 28 14:36:52 at least not once I updated it... Apr 28 14:37:03 ofc it has Apr 28 14:37:38 wifi on by default, with the professional edition you can change it to simulate edge, 3G ... Apr 28 14:37:42 weird, I used it in the past, and once I updated it, couldn't access the network Apr 28 14:37:48 mmm, maybe that was it Apr 28 14:37:58 Papipo, updating VMs sometimes causes error Apr 28 14:38:02 reinstalling :D Apr 28 14:38:05 you only need to create a new one in that case Apr 28 14:38:24 should I install the genymotion shell? Apr 28 14:38:34 do you want the genymotion shell? Apr 28 14:38:40 I don't think so Apr 28 14:38:45 ... Apr 28 14:39:03 I was just wondering if there is a typical usage of the shell Apr 28 14:39:10 but I don't think so either Apr 28 14:39:13 is there a way to use objectanimator to animate translationX or translationY relatively without using a custom view? Apr 28 14:39:29 like how translate animation works Apr 28 14:40:22 genymotion shell basically is genymotion without a UI Apr 28 14:40:32 you can control the vm from it without using buttons Apr 28 14:48:17 danijoo: which version of genymotion are you using? Apr 28 14:48:29 because I just installed it and as I said, it won't allow me to use the network Apr 28 14:48:55 2.4 here Apr 28 14:49:14 Its related to the virtualbox machine Apr 28 14:49:23 with the network configuration Apr 28 14:49:28 some IP conflicts Apr 28 14:50:19 ^this Apr 28 14:51:05 is there a canonical way to translate a page out of view using ObjectAnimator xml res? Apr 28 14:54:34 those are my contacts http://puu.sh/htWTc/b554333d6f.png when I call the contact picker within my app my contact is missing http://puu.sh/htWYm/ced78d3cd4.png how can I get my contact without invoking the contact picker? Apr 28 14:57:20 I have got a picture in an ImageView and would like to set white color to transparent so you can see the backgound of the image. How can I do this? Apr 28 14:57:37 well, at least I can ping the genymotion emulator Apr 28 14:57:50 I guess I still need to set up something to allow it to connect elsewhere Apr 28 14:58:10 It's weird that Genymotion isn't able to do that out of the box Apr 28 14:58:34 take it up with them Apr 28 14:59:15 img.setAlpha(0.5f); sets the transparency of the whole picture. How can I only set white color to transparent? Apr 28 15:00:10 chili4sale: Are you saying that you have an ImageView with a bitmap that has multiple colors, and you only want to modify the alpha of the white parts of the bitmap? Apr 28 15:01:23 yiati: Yes, exactly. Apr 28 15:02:24 chili4sale: There is no way that you can do that with anything directly in the ImageView class. That's way too custom. Get into Canvas if you want to do that Apr 28 15:04:15 chili4sale, is it a static image you are packing into the apk? Apr 28 15:04:26 yes Apr 28 15:04:59 why dont you edit it with photoshop then? Apr 28 15:05:00 then you can make the image look how you would like before putting it in the app Apr 28 15:05:10 exactly Apr 28 15:05:27 If you do want the alpha to change dynamically though you're going to still only have the canvas as an option Apr 28 15:06:18 or maybe even just make a series of images that look how you want before putting them in the app Apr 28 15:07:08 thats what I would do. Apr 28 15:07:19 You usually cant see a differnce between a few % alpha Apr 28 15:28:52 do you know if there is a video player library with YouTube and VAST support? Apr 28 15:29:27 google made it impossible to use its videos without youtouble library. it was possible to use videoview in the past Apr 28 15:29:33 but thats past Apr 28 15:30:22 yuck Apr 28 15:32:48 do you know if it displays ads? Apr 28 15:33:08 no idea. i'd guess it does Apr 28 15:34:03 only for videos that have ads ofc Apr 28 15:34:09 not if its your own video Apr 28 15:34:09 gonna deploy my app on a real device Apr 28 15:34:22 because on the emulator it's not displaying any ads Apr 28 15:34:33 genymotion does :p Apr 28 15:34:38 haha Apr 28 15:34:41 using genymotion :P Apr 28 15:36:41 I start an activity (startActivityForResult) in another project from my app and wonder if it’s possible to return values without closing the started activity? I want to be able to take several pictures with the camera without returning after each. Apr 28 15:37:27 mEck0: use a service? Apr 28 15:38:23 jpiche: The activity I’m starting is a barcode scanner, and it shouldn’t be running in background all the time? Apr 28 15:39:32 mEck0: oh you don't have access to the barcode scanner activity? Sorry I misinterpreed the question Apr 28 15:40:06 using a service is my default answer for "I want to do cross-activity stuff" questions Apr 28 15:40:45 jpiche: I actually have access to its source code too, but have it in another Android project. Maybe it should be move into the same project instead under another namespace? What is best practise in such a case? Apr 28 15:42:13 mEck0: if you want to "return" values from an activity and keep the activity open, then startActivityForResult probably won't help you Apr 28 15:42:46 mEck0: passing "return" values to a service or DB or something is what I would look at Apr 28 15:43:48 jpiche: Okay, I’ll thinking about using a service and how I can fix it that way. Thanks for the input! Apr 28 15:43:59 anyone can help me with changing the spinner indicator icon Apr 28 15:45:55 mEck0: good luck Apr 28 15:50:30 Q about Google service accounts, trying to add one to my gplay dev account. Where do I get the password for it? Apr 28 15:52:21 is webview.loadurl a blocking operation? Apr 28 15:54:40 alexfu, try it ;) Apr 28 15:57:22 danijoo: i honestly can't tell. loading a webview in a fragment seems to have no problems but as soon as i add a animation transition into the mix, the animation gets super choppy Apr 28 15:58:09 alexfu, enable strict mode Apr 28 15:58:22 if its not asyn, it will tell you Apr 28 16:00:00 true. Apr 28 16:02:32 Hi, I would like to ask about any news on the Android Studio NDK support. Are there any upcoming releases that will integrate the NDK into the default IDE ? Apr 28 16:04:08 Also, are there any plans to add a usable profiler, debugger, etc. ? Other companies have already released their tools that work much better than the ones provided by Google. NVIDIA, ImgTec, even Microsoft have already superior tools for the native development. Why Google doesn't even try to catch up or team up with them ? Apr 28 16:05:50 anyone can help me with changing the spinner indicator icon Apr 28 16:06:02 danijoo: webview.loadurl is async Apr 28 16:06:34 i know :p Apr 28 16:06:53 rathodvikas10, its part of the background. Apr 28 16:07:53 so i need to draw image for arrow indicator and set it as background Apr 28 16:08:15 kinda yeah Apr 28 16:08:36 so why the hell is my animations so choppy when i animate into a webview Apr 28 16:08:36 what would be the size of that drawable Apr 28 16:08:57 http://imgur.com/a/9hWTZ centered (#0) or vertical centered only (#1)? Apr 28 16:09:33 absolutly #0 Apr 28 16:10:49 thx danijoo, waiting few more ppl (on other channels too) Apr 28 16:11:52 Hey guys Apr 28 16:12:07 I have a question I was wondering if anyone could help with Apr 28 16:12:23 depends on the question, just ask Apr 28 16:12:44 I am working on a library that optionally supports gcm notifications Apr 28 16:13:34 with other permissions I just use checkCallingOrSelfPermission(); Apr 28 16:13:54 but I'm not sure where com.google.android.c2dm.permission.RECEIVE lives Apr 28 16:13:59 to check him in code Apr 28 16:14:45 according to https://developer.android.com/google/gcm/client.html in the manifest, like any regular permission Apr 28 16:14:46 so essentially I want to be able to do is check in code if the manifest contains com.google.android.c2dm.permission.RECEIVE Apr 28 16:15:17 you can list permission with packagemanager Apr 28 16:15:22 programmatically Apr 28 16:15:39 ^ tyis Apr 28 16:15:43 this* Apr 28 16:16:14 dc_android, http://developer.android.com/reference/android/content/pm/PackageManager.html Apr 28 16:16:30 there are several ways, you can retrieve the list of all permissions for a packagename and check yourself in the list Apr 28 16:16:33 or use checkPermission Apr 28 16:16:44 since you know what to check Apr 28 16:19:05 Thanks adq that makes a lot of sense Apr 28 16:19:12 Brain freezing Apr 28 16:19:24 Best way to select 5 random but unique values from a collection? Apr 28 16:20:19 Random.nextInt(collection.getSize()) Apr 28 16:20:36 not aware of the best way, but many ways, you can check that each random value is not equal to a previous one Apr 28 16:20:44 Anthaas, shuffle ? Apr 28 16:20:55 if you're collection is a large entropy pool, maybe you don't care Apr 28 16:21:04 mkdk: que? Apr 28 16:21:12 Its a set of known values. Apr 28 16:21:19 just collection.get( new Random().nextInt(collection.getSize()) ) ! Apr 28 16:21:37 Anthaas, https://docs.oracle.com/javase/6/docs/api/java/util/Collections.html#shuffle(java.util.List) Apr 28 16:21:45 And then just move on if that value has already been selected or is unwanted? Seems very inefficient. Apr 28 16:21:57 or pop that value Apr 28 16:22:12 popping would help on a unique list Apr 28 16:22:40 err on a list composed of unique values Apr 28 16:23:05 but if there is 1 1 1 1 1 1 1 2 3 4, popping 1 will just reduce a bit the probability to hit another 1 Apr 28 16:23:32 make it uniqye first Apr 28 16:23:46 All values are unique, e.g a,b,c,e,f,g,h. but for each value in the list, I need to pick 5 other random values, not including itself. Apr 28 16:23:48 A Set is also a Collection Apr 28 16:25:20 I would do this naive approach of simply checking if the value picked has already been used, if not i keep it otherwise i retry Apr 28 16:25:41 if performance does not matter (it shouldn't on only 5 elements) Apr 28 16:25:51 size is variable Apr 28 16:26:02 number selected is size of collection / 2 Apr 28 16:26:10 Anthaas, if you want to make it simple, put all possible values into one List and then select random item from the list and place it under the item you want. Remove the item from the original list to avoid checking for duplicates. Apr 28 16:26:12 size of collection is a command line arg Apr 28 16:27:33 how can I create a view that displays a pdf in a way that's navigatable and interactive? Apr 28 16:28:18 noahmg123, I solved this by using pdf.js in a web view Apr 28 16:28:47 noahmg123, the main reason for this solution was that it was a Unity project for Android Apr 28 16:28:50 mkdk: that is a way to do it, but I want to have my own controls Apr 28 16:29:09 noahmg123, you can freely modify the pdf.js and its controls Apr 28 16:29:28 or write your own parser ;) Apr 28 16:29:59 danijoo: was that to me. If it was how would I do it? Sounds complicated. Apr 28 16:30:11 What's the easiest way to install crosswalk for my app using the cordova CLI? Apr 28 16:30:13 mkdk: I would like other views like button views to be the controls Apr 28 16:32:22 noahmg123, I see. Have you seen http://sourceforge.net/projects/andpdf/ ? Apr 28 16:33:11 noahmg123, also, I think the Android has a PDF library in the NDK distribution. You could simply create a native wrapper that would send the rendered document back to the Java and embed it in a custom control. Apr 28 16:34:18 noahmg123, more : https://developer.android.com/about/versions/android-5.0.html and https://github.com/digipost/Android-Pdf -- I have no experience with any of these libraries. Apr 28 16:34:18 mkdk: atually I was just thinking. Could I have the button view send js to the webview to navigate the pdf? Apr 28 16:34:24 mkdk: atually I was just thinking. Could I have the button view send js to the webview to navigate the pdf? Apr 28 16:34:50 noahmg123, if you can send JS calls to the WebView then it won't be an issue. Apr 28 16:35:18 mkdk: but can i? Apr 28 16:35:39 noahmg123, yes : https://developer.android.com/reference/android/webkit/WebView.html#evaluateJavascript(java.lang.String, android.webkit.ValueCallback) Apr 28 16:36:01 mkdk: cool. I'll look into that. Apr 28 16:36:04 noahmg123, all you have to do is to call the JS function that is called when you click the button in the pdf.js Apr 28 16:36:09 noahmg123, you're welcome Apr 28 16:36:21 mkdk: i also have another problem Apr 28 16:36:43 noahmg123, shoot. I hope I can help you Apr 28 16:38:36 mkdk: basically what I'm trying to do with this app is have a drop-down view act as a table of contents picker for the pdf. The only problem is I want to make it navigatable down to a small incriment. It would have to search for the number that prepends each incriment in the background, and then scroll to that point. Is that possible? Apr 28 16:40:38 Which Gradle Plugin version to use when creating a Gradle based Android project from the command line? (android create project --name MyProject --gradle --gradle-version ) Apr 28 16:40:57 noahmg123, yes it is. However, I would suggest to include the bookmarks into the PDF itself. In this way any other PDF viewer will be also able to provide table of contents. Have a look at this : http://www.w3.org/TR/WCAG20-TECHS/PDF2.html Apr 28 16:41:01 2.1.1 is current Apr 28 16:41:14 oh plugin version Apr 28 16:41:28 1.1.0 Apr 28 16:41:41 mkdk: the only problem is there are many incriments per page. so I can't just give it a page number. Apr 28 16:43:00 danijoo: May I ask, how do you find that version number? Apr 28 16:43:15 by putting android gradle plugin into google --_ Apr 28 16:43:16 noahmg123, also, you can see that the pdf.js already has support for Table of Contents. The bookmarks don't have to be page numbers, any paragraph can be marked as a bookmark/target. Demo Here : http://mozilla.github.io/pdf.js/web/viewer.html Apr 28 16:43:58 noahmg123, Example 3 on the previous page shows how can be paragraphs on the same page marked as separate bookmarks : http://www.w3.org/TR/WCAG20-TECHS/PDF2.html Apr 28 16:44:01 danijoo: i've check here: http://tools.android.com/tech-docs/new-build-system/version-compatibility Apr 28 16:44:12 but it's confusing though.. Apr 28 16:45:13 mkdk: that's all well and good. but my document is large and I would really rather not have to go though bookmarking everything. All in all it would be over 30,000 bookmarks. Apr 28 16:50:23 noahmg123, oh. Well, depending on the structure of the document you could automatize the process of bookmarking, i.e. turn all H1 (main headings) elements into bookmarks or use some sort of regular expression to match the text which you want to bookmark. I'm going to check if pdf.js supports jumping into a precise position in the document. Apr 28 16:50:49 danijoo: gwrapper downloads gradle-1.12-all.zip which I think is quite old. Is that okay? the download url is specified in the /gradle/wrapper/gradle.properties Apr 28 16:51:13 no thas not ok Apr 28 16:51:17 thats old as fuck Apr 28 16:51:17 noahmg123, also, I have to ask how do you want to do it now ? How do you know where to jump in an openened document, given that you would have the ToC picker setup Apr 28 16:51:21 you want gradle 2.1.1 Apr 28 16:51:28 with plugin 1.1.0 Apr 28 16:52:19 mkdk: It will use a bookmark structure for level one, and use a search for level two and three Apr 28 16:53:39 mkdk: each incriment is prepened by two numbers the number of level two and the number of level three (e.g. 1.1 blah 1.2 aaa 2.1 hi 2.2 hello etc) Apr 28 16:53:43 yeah, i see exact numbers in my Android Studio projects. BTW can you show me a location online where I could find those corresponding numbers? Apr 28 16:54:18 reversiblean, go to gradle homepage for 2.1.1 and to gradle android plugin project for the 1.1.0 -_- Apr 28 16:54:28 just look at what is the latest release.. Apr 28 16:55:03 mkdk: It will use the ToC to fine level one and then search for the two number pair (based on the input from the drop downs) and then scroll to the first place it sees it. Apr 28 16:55:08 noahmg123, I think if there's this kind of pattern you should be able to do it automatically given the right tools. I would strongly suggest to do it this way, because it will be IMO easier not to have to work out all the details with a huge PDF document you would have to scan and preprocess each time. Apr 28 16:55:44 noahmg123, I meant, I would suggest that you place the bookmarks directly in the PDF. Apr 28 16:56:11 mkdk: So far I've only found tools that give you the ability to bookmark a page. Apr 28 16:56:32 Does GridView work with different itemViewTypes? My adapter returns the correct number for getItemViewType and getViewTypeCount but I get the wrong recycled view. Apr 28 16:57:13 mkdk: I could use ToC for level 2 and that would help some more. The Level two sections rarely have more than 40 level 3s Apr 28 16:58:51 noahmg123, have you seen pdfmarks ? http://milan.kupcevic.net/ghostscript-ps-pdf/#marks Apr 28 16:59:34 mkdk: looking at it rigt now. also looking into my metod Apr 28 17:01:02 noahmg123, you could also simplify it for yourself and use a 3rd party library in Java to pre-process the PDF document. Search for the patterns, just like you would with your original ToC drop-down, insert the bookmarks where you would jump, and save it into a new PDF. Apr 28 17:02:48 mkdk: I'm a newbie so I don't see that as a very viable option right now. What I am thinking now would be the simplest option is this: Apr 28 17:03:48 mkdk: bookmarks mark levels 1-2. JS call search from the point of the bookmark for the Levels 2-3 pair and scrolls there. Apr 28 17:04:04 It normally isn't more than a page away. Apr 28 17:06:04 google play services update Apr 28 17:07:29 noahmg123, sure. You can do that, but I couldn't find a way in the pdf.js about how to easily jump to a particular part of the displayed page. I found some calls for pixel specific jumps - I think. Apr 28 17:08:20 noahmg123, another library that might make it easier for you is the Android version of the previously mentioned PdfBox. It should contain everything you need for this task : https://github.com/Birdbrain2/PdfBox-Android Apr 28 17:08:33 mkdk: well is does not have to be a pdf.js call. we could just use regular javascript. Apr 28 17:09:07 I'm trying to develop for mobs with android 4.1.2 and above, should I update sdk to Android 5.1.1(api 22) or just Android4.1.2(api 16) or both only or all those in between? Apr 28 17:09:15 noahmg123, the problem is that it is the pdf.js that renders the document and it might be hard to find the right place on the page/screen to jump to from an external script. Apr 28 17:10:21 anahumar, you can install only the min and the target version of the Android SDK to make a build. Apr 28 17:10:54 danijoo: there are more newer versions: https://developer.android.com/tools/revisions/gradle-plugin.html Apr 28 17:11:00 Can I use those? Apr 28 17:11:23 mkdk: hmmmm... couldn't we just use JS to scan the html (it is renered in HTML right?) for the occurance of the pair and then scroll there? Apr 28 17:11:30 rendered* Apr 28 17:14:37 noahmg123, you can give it a shot. Just be aware that PDF.js might render some of the special characters using its own font renderer that uses glyphs and path commands to create a letter, ie. you most likely cannot search for it using the standard text search. Apr 28 17:16:16 mkdk: will work on it. they are just numbers so they probably won't be rendered differently Apr 28 17:16:29 Does GridView support recycling if the adapter has multiple view types? Apr 28 17:19:54 I have a broadcast receiver that launches an activity when the user unlocks the device. sometimes there is a substantial delay (5-10 seconds) for the activity to launch. Is there any way to speed this up, as it is fundamental to the app that this happens quickly Apr 28 17:20:55 g00s !!!! Apr 28 17:21:04 noahmg123, btw. this example might be helpful in learning how to use pdf.js API (see the HTML source) : http://mozilla.github.io/pdf.js/examples/learning/prevnext.html Apr 28 17:21:04 capella ! Apr 28 17:21:17 mkdk: thanks. Apr 28 17:21:20 Heh - I found the shout from you from last night Apr 28 17:21:52 :D Apr 28 17:21:57 (no idea what it was all about :) ) Apr 28 17:22:32 mkdk: firing up Android Studio right now (I was waiting it until I had a plan, and now I do) Apr 28 17:23:05 noahmg123, sounds good! Also, this is how you can jump to a specific page using the # anchor : https://github.com/mozilla/pdf.js/wiki/Viewer-options Apr 28 17:23:28 * capella -> car inspection Apr 28 17:24:00 mkdk: wow. that will save me a lot of time. I can just have a short xml doc and use that for the "bookmarks" Apr 28 17:24:21 capella oh, i just saw someone hiring in rochester ny Apr 28 17:24:35 hey all. I have a non-rooted S4. I want to use `libiw` for advanced 80211 scanning/beacon interception. Is there anyway to get access to some ioctl() calls without root? I know how ioctl works, but I'm desperate ! thanks Apr 28 17:24:54 Oh! I need to ask you about that later then g00s :D Apr 28 17:27:37 mkdk: One last thing. How do I create a multi-level drop down (preferably using several dropdowns)? e.g. (Not the real situation) Section 1 has 5 subsections but Section 2 only has 4. There are two drop downs to pich the section and subsection. How would I dynamically change the second one base off of the first (preferably by calling to the aforementioned XML that gives the number of subsections in each section). Apr 28 17:28:39 damn it, i just submitted a bug to the defect tracker and notice bad timing - getting spammed again. i notice when this happens the signal gets lost in the noise Apr 28 17:28:55 noahmg123, I'm sorry, but I cannot help you with this. I haven't used the Android Java SDK much, I work primarily in the NDK. Apr 28 17:29:46 mkdk: ok. thanks for the tips on the webview though. Apr 28 17:31:15 noahmg123, lastly, if you find yourself stuck with the whole bookmarking / positioning, look again at the pdfmarks (6.4 Basic pdfmark Functions, p. 69) : http://www.pdflib.com/fileadmin/pdflib/pdf/pdfmark_primer.pdf -- It shows how to create a bookmark using a special format that you can use to embed this information directly into the PDF. You should be able to write a simple program that is very similar to what are you planning to do anyway (search Apr 28 17:31:15 and mark). Apr 28 17:31:22 noahmg123, you're welcome. Apr 28 17:35:35 How do I pack a pdf file within my app so that people cannot steal it? Apr 28 17:39:08 u cant Apr 28 17:39:20 noahmg123, you can password protect the PDF file and encrypt the password in the Java, so it's harder to retrieve it. Or you can encrypt the whole PDF file using some standard encryption algorithms, while securing the decryption key using some smart tricks. Hint: http://stackoverflow.com/a/6070048 Apr 28 17:39:40 display it as a Widevine DRM video Apr 28 17:40:09 noahmg123, in the end, anyone who is determined to decrypt the PDF file will succeed, because you have to decrypt it at some point. Apr 28 17:40:10 mkdk: ok. and since it is within my app structure how would I access it? Apr 28 17:40:13 How can I retrieve the user's contact from within my code? (the one shown under me) http://puu.sh/htWTc/b554333d6f.png Apr 28 17:40:16 mkdk: ok. and since it is within my app structure how would I access it? Apr 28 17:41:13 noahmg123, you could access it as any other file in your Assets. The difference is that when you read the file, you decrypt it in memory and feed it to the PDF viewer. Apr 28 17:42:19 mkdk: Sorry, I am a very big newbie. How would I do that in code. Apr 28 17:42:32 ExeciN, have a look here : http://developer.android.com/training/contacts-provider/index.html Apr 28 17:45:45 noahmg123, it depends on the protection method you choose. If you go with an encrypted file and use the standard Android Crypto API, it's the same as reading any other file, you only have to set the key before you start reading the stream. The CipherInputStream will try to decrypt the data using that key before returning the data from the read() method. API: http://developer.android.com/reference/javax/crypto/CipherInputStream.html Apr 28 17:46:58 noahmg123, btw. what format was the PDF originally written in (Latex, Microsoft Word, OpenOffice, etc.) ? Apr 28 17:47:08 mkdk: ok. forget encryption just for the sake of simplicity. if it is in /res/pdfs/test.pdf how would I tell pdf.js in the webview to grab that? Apr 28 17:49:57 noahmg123, I'm not very familar with the access protocols in the SDK, but using the standard file:// most likely won't work. You'd have to use HTTP instead in order to be able to respond to the HTTP requests made by the pdf.js/WebView. Have a look at this solution which proposes reading the file and sending the binary data directly to the pdf.js. This would also make it very easy to implement the protection we talked about previously. Apr 28 17:49:57 http://stackoverflow.com/a/26086480 Apr 28 17:51:09 mkdk: thx. I just noticed here: http://developer.android.com/design/patterns/app-structure.html (under spinners) you can have a multi-spinner spinner. What is that officially called so I can possible look up how to use it? Apr 28 17:51:46 does AS have any kind of notepad / scratch space i can put snippets of things for later ? Apr 28 17:52:54 noahmg123, I just found this answer which shows how to modify the pdf.js script to allow loading PDF files using the file:// protocol : http://stackoverflow.com/a/24942468 Apr 28 17:53:55 mkdk: it is an internal file though. Would "Copy Reference" in Android Studio work? Apr 28 17:54:59 g00s: i think so. I remember seing something about that. Apr 28 17:55:40 mkdk: I skimmed through it but this is stuff that I either already know or don't need right now. I don't want the user to select a contact, I want to get the user's contact (for example filing a "name" field that already has the user's name) Apr 28 17:56:13 thanks mkdk and what about the extra(s)? android support library, google repository, intel x86 emulator accelerator, etc.. Apr 28 17:56:38 how to download just the minimum needed to start writing code Apr 28 17:58:50 g00s: TODO is the best thing I can come up with right now. Apr 28 17:59:01 noahmg123 oh yeah, thanks Apr 28 17:59:17 I think it also keeps track of XXX Apr 28 17:59:18 g00s: you are welcome Apr 28 18:00:41 anahumar: you should download all those things Apr 28 18:01:35 i get the message "rm failed for -f, No such file or directory Apr 28 18:02:18 when android install .apk. But the build is success Apr 28 18:02:38 Should i concern about that message? Apr 28 18:03:39 I just noticed here: http://developer.android.com/design/patterns/app-structure.html (under spinners) you can have a multi-spinner spinner. What is that officially called so I can possible look up how to use it? Apr 28 18:05:03 I cant see anything there that i'd call a multispinner Apr 28 18:06:46 noahmg123, I think you have to place it under Assets in order to be able to access it. As far as I know, it is the location of the private app storage, which should be accessible only to the application. Apr 28 18:08:27 anahumar, depends on what do you need. I usually don't install anything besides the SDK. Intel x86 emulator is required when you don't have a physical device to test on. Google repo, support library - I'm not sure exactly what they contain. I usually skip all the extra Google APIs (such as wearables, etc.) Apr 28 18:09:13 I dont install anything besides the plan sdk + support lib repository Apr 28 18:09:19 noahmg123, btw. here's some more info on spinners and probably also gives an idea how to make multilevel spinners (custom onClick handlers) : http://developer.android.com/guide/topics/ui/controls/spinner.html Apr 28 18:10:07 danijoo: ok. my computer is going slow right now so thats why it took me a bit to respond. What I mean is there is multiple fields in the one spinner. Apr 28 18:10:26 noahmg123, you can add any view as dropdown view for it Apr 28 18:10:32 like in a listadapter Apr 28 18:10:35 anahumar, from the README : "Support Libraries for Android. Apr 28 18:10:35 This SDK component contains static libraries providing access to newer APIs Apr 28 18:10:35 on older platforms and various helper classes. Apr 28 18:10:35 " Apr 28 18:13:12 danijoo: oh, cool. will try that. Apr 28 18:13:56 ExeciN, you could also have a look at "Edit an Existing Contact Using an Intent Apr 28 18:13:56 " : https://developer.android.com/training/contacts-provider/modify-data.html#EditContact Apr 28 18:16:28 hey kroot , you are still around ! Apr 28 18:17:10 what? me? naw Apr 28 18:17:55 kroot still working on android ? Apr 28 18:18:07 yes, of course Apr 28 18:18:34 :D Apr 28 18:19:30 kroot, what are you working on ? Are you contributing to the AOSP ? I ask out of curiosity. Apr 28 18:20:34 interesting from chris banes blog "ProgressDialogs are a bad pattern, and are not even mentioned in the material design spec, which is why I haven't backported them." Apr 28 18:22:25 seriously fuck anrdoid studio .. http://snag.gy/ZbiuE.jpg Apr 28 18:23:30 anahumar i dont see anything wrong O.o Apr 28 18:24:03 danijoo: videoview still works with youtube rtsp links Apr 28 18:24:39 i dont think so Apr 28 18:25:05 I'm playing it in my app as we speak Apr 28 18:25:38 hm. i read its not working Apr 28 18:25:41 TIL Apr 28 18:27:56 g00s, I guess it has to do with the fact that the ProgressDialog is modal and the current UX leans more towards iOS-like loaders embedded in the view (see the Circular example) : http://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators Apr 28 18:28:12 yeah Apr 28 18:28:29 g00s, what do you think ? I am just trying to educate myself on what should I use when I get to implement progress indicators. Apr 28 18:29:14 hm .. i either put one inline with content like Play, when it updates an app - or a circular one from SwipeToRefresh layout Apr 28 18:32:26 * g00s trying to get actionmodes working with recyclerview :'( Apr 28 18:32:45 g00s, thanks for sharing. Just found out that those Google design docs are worth the read. Apr 28 18:33:01 :) Apr 28 18:33:15 what is the best food to eat after 3 days of not eating? Apr 28 18:33:20 thai? Apr 28 18:34:05 try #android-food oops :p Apr 28 18:37:57 g00s, maybe this could help : https://www.bignerdranch.com/blog/recyclerview-part-2-choice-modes/ Apr 28 18:38:29 mkdk i actually went through the BNR one, it was insane. this seems much clearer http://enoent.fr/blog/2015/01/18/recyclerview-basics/ Apr 28 18:38:57 lasserix_ well, if you were fasting, its best to break a fast slowly with easily digestable things. maybe a salad or something. Apr 28 18:39:24 g00s a kind of fast, but yeah that's a good idea. Apr 28 18:40:18 lasserix_ do you intermittent fasting, or something else ? Apr 28 18:40:50 i wish i could fast more, i get huge headaches Apr 28 18:41:25 g00s, true, that article is much easier to follow Apr 28 18:41:52 i do intermittent fasting, but this had a more specific goal, trying to clean out some of the cobwebs been building in my mind for a while Apr 28 18:41:56 lasserix_, I would suggest raw fruits and vegetables. Apr 28 18:42:06 thanks Apr 28 18:42:13 lets see what i can find in walking distane Apr 28 18:42:18 yeah, not a big protein meal for sure like hamburgers and bacon :) Apr 28 18:42:35 you could also go for a bowl of rice with honey Apr 28 18:42:42 O.o Apr 28 18:42:48 or milk+cornflakes ? Apr 28 18:42:51 well my goto soul food used to be thai, everytime after going camping we'd stop by this great thai place but i dont think there anything like that around Apr 28 18:43:12 milk is always bad Apr 28 18:43:21 i am feeling in the need for like something above and beyond the bagel and cream cheese ration of my days ;p Apr 28 18:44:26 rice isn't really healthy either Apr 28 18:44:46 g00s, it's from this story : https://en.wikipedia.org/wiki/Gautama_Buddha#Renunciation_and_ascetic_life Apr 28 18:47:17 danijoo, g00s : Please expand on how milk and rice aren't good/healthy meals. According to my understanding, many people can survive on these two foods. They can be found throughout the history of humanity in general as an important part of the diet. Apr 28 18:47:47 I ask because I suck at eating and cooking :) Apr 28 18:48:20 actually salad if as lettuce can hard to digest. if you really had starving hard lasserix_ drink a bit of milk (assuming you tolerate lactose of course) or water with sugar. if it was not really hard, then just eat not much) Apr 28 18:48:54 mkdk mostly 2 reasons. one, rice being a water crop soaks up ambient pollutants. since pollutants are ubiquitous you are likely getting nasty things; for example in the US much rice is grown in former cotten areas which is contaminated with lead, so the rice is contaminated with lead Apr 28 18:49:13 mkdk, are you sure? about 70% of humanity cant even consume milk. Apr 28 18:49:16 its more along the lines of like you've been backpacking for three weeks,you just got back into town and need that "meal" instead of the freeze dried strew you've been surviving on Apr 28 18:49:42 but def milk has been a big help: you can also go like almond or whatever if you are lactose interolarent Apr 28 18:49:43 mkdk: Food that is fantastic for survival tends to be terrible in large quantities which is what we mostly consume in the modern agricultural world Apr 28 18:50:20 from an insulin perspective, its not great eaither unless you get long grains, like long grain brown basmati or something. they dont have complete proteins, but you can increase their nutritional value letting them soak in water for a while to allow germination Apr 28 18:51:13 Great survival food, is terrible food to be eating if you are aiming for optimal health, especially if you are sedentary Apr 28 18:51:22 consuming milk is mosty an european/american thing. And its pretty unhealthy. Men usually stop being able to digest milk at certain age (when not being breastfeed anymore). Its just some europeans starting to use cow milk and their body adepting to it Apr 28 18:51:35 never the less most of us arent able to digest it but most dont know Apr 28 18:52:03 g00s, good points. I would never consider pollution in the food from the environment as a health risk. For the other part, I know nothing about insulin other than it's related to diabetes, but I'll keep that in mind. Apr 28 18:52:12 danijoo: I am one of the lucky ones that had ancestors poison themselves repeatedly. I can pound through jugs of milk all day long just fine :D Apr 28 18:52:15 for optimal health, all you need is chocolate and bacon relly :D Apr 28 18:52:21 danijoo: exaggerated Apr 28 18:52:38 icedp, why? :) Apr 28 18:53:34 hmm maybe sushi Apr 28 18:54:06 also I thought we are talking about what to eat after fast. :) and milk is full of protein and lactose what is hard to digest. that was my actual point Apr 28 18:54:29 just a question: i am creating an ArrayAdapter for my ListView and you are required to pass in a context Apr 28 18:54:39 te array adapter is going to be initialized in my main activity Apr 28 18:54:40 you want something light after a fast. drinking tons of milk is like eating a burger Apr 28 18:54:49 does it matter whether i pass in 'this' or 'getApplicationContext()' for the context? Apr 28 18:54:55 also its good to limit your daily intake of Java Apr 28 18:54:59 or does getApplicationContext() return 'this' if you are invoking it on an activity? Apr 28 18:55:04 aspire, this is #android-food, go to #android-dev ! Apr 28 18:55:17 danijoo, I'm a bit skeptical about the lactose intolerancy claim, because back in the days when I was a kid, drinking milk was one of the important parts of the diet. And people before did the same as well. It's only now we are figuring out it's bad for us, but in here Europe it still has mainly possitive image in respect to overal health. I'm not into nutrition, so I'm not familar with the research done in this field. Apr 28 18:55:17 i am confused Apr 28 18:55:19 aspire: think you want to pass htis (not app context) or your themeing can be messed up Apr 28 18:55:27 o... really!? Apr 28 18:55:32 i've been passing getApplicationContext() in all this time Apr 28 18:55:48 aspire: applicationContext != activity Apr 28 18:55:50 *it can mess up your themeing if you use styles a lot Apr 28 18:56:12 yiati why is Activity an instance of Context Apr 28 18:56:23 problem is that "de facto" knowledge about food and health has been laid out by the very same who produce those products in vast quantities Apr 28 18:56:25 and what is the purpose of the getApplicationContext() really? Apr 28 18:56:26 aspire: Because it's a different type of context Apr 28 18:56:29 ooo Apr 28 18:56:30 ohhh Apr 28 18:56:38 aspire: class Activity extends Conextet { //..... } Apr 28 18:56:44 Context :( Apr 28 18:56:47 can you differentiate the activity context vs getApplicationContext ? Apr 28 18:56:50 so i know when to use which one? Apr 28 18:56:51 aspire: ApplicationContext is the context of your entire Application, Activity is the context of a single Activity Apr 28 18:57:12 "Retrolambda breaks lint" oh that sucks Apr 28 18:57:14 aspire: http://possiblemobile.com/2013/06/context/ Apr 28 18:57:16 so yiati getApplicationContext returns the same object regardless of which activity i invoke it on? Apr 28 18:57:23 aspire: yep Apr 28 18:57:28 ahh Apr 28 18:57:49 thanks Apr 28 18:57:51 mkdk, the ingedrients of milk are pretty healthy (beside lactose), yes. But its really hard for your body to digest it because of that. (source: Im a biochemist) Apr 28 18:58:03 aspire: If you want something to live the entire context of your app or the context of an Activity is not important then use applicationContext Apr 28 18:58:21 yiati like what Apr 28 18:58:29 what can that 'something' be Apr 28 18:58:49 aspire, everything that is not intended to get destroyed with your activity Apr 28 18:59:08 aspire: If you want to configure a singleton that you want to live the entire app, then application context is good Apr 28 18:59:13 lasserix_, well someone has to pay for the research ;) The bigger problem is IMO that we are exposed to hormonal disruptors that have negative effect on a big scale. The nutritional value of grown food has also reduced substantially in past decades. Apr 28 18:59:20 o.. Apr 28 18:59:30 i see i see Apr 28 18:59:44 i guess for the apps i am creating right now, it doesn't really matter which one i use? Apr 28 18:59:50 danijoo, I take your word for it then :) I have to go now and read about why it is the case. Apr 28 18:59:51 they are simple apps Apr 28 19:00:14 aspire: You can also cause memory leaks if you create a singleton that uses Activity context instead of ApplicationContext if you aren't careful Apr 28 19:00:49 aspire: There are instances where you 'need' the Activity context, but otherwise it shouldn't hurt to use ApplicationContext Apr 28 19:00:55 mkdk, about every third individual in europe/america is more or less unable to deal with lactose. most just dont know it because the symptomes arent that bad for all Apr 28 19:01:12 o.. Apr 28 19:01:23 mhm i see Apr 28 19:01:36 hello Apr 28 19:03:14 im not really fond of the google play services nearby connections api Apr 28 19:03:25 too much static stuff for my liking Apr 28 19:03:30 any alternatives for local pairing? Apr 28 19:03:51 i just wanna pair devices locally on a wifi network Apr 28 19:03:58 danijoo, I have a related question if I may. Just today I reading an article about a new discovery regarding memory formation in the brain. The article mentioned names of different proteins imporant for creating neural connections and I was wondering if it's possible to somehow increase the expression (?) of these proteins using some supplements/medicine. Apr 28 19:05:06 mkdk, could you link to it? Apr 28 19:05:48 messing arround with protein expression is always dangerous. especially in the brain. Things like alzheimer is also related to overexpression in some way for example Apr 28 19:05:54 danijoo, http://www.sciencedaily.com/releases/2015/04/150424105012.htm Apr 28 19:06:31 thx Apr 28 19:06:51 I see. It's probably similar to the dopamine levels in the brain, that both low and high levels of dopamine are bad in general. Apr 28 19:07:41 also things like that are easy to discover (easy compared to target them in human), while working with it is pretty hard Apr 28 19:08:41 discovery is usually done by creating geneetically modified animals like mices that lacks a protein or overexpress it Apr 28 19:09:09 but its another thing to get a drug that find its way into the brain and triggers an expression Apr 28 19:09:20 (one of the big problems with brain deseases) Apr 28 19:10:37 I see, hopefully we'll find a way how to do that to help people. Apr 28 19:10:55 I think we can see some quantum leaps in the future with things like that Apr 28 19:11:17 hopefully they can find a way to make me smarter, so i can figure out recyclerview in all its glory Apr 28 19:11:17 like we are pretty close to healing certain diseases not healable right now Apr 28 19:12:25 hopefully they can make google employees start updating their documentation :P Apr 28 19:14:36 danijoo, do you think it would be possible to grow the neocortex tissue in the lab ? Just like they already "grew meat in the lab". I am asking, because if that's the case, someone might grow a large, but still efficient brain and train it to overcome humans in particular tasks, like writing the documenation. Apr 28 19:14:59 I grow neocortexes for breakfast Apr 28 19:15:26 yiati can i have one ? Apr 28 19:15:37 Already ate them, come back tomorrow Apr 28 19:16:26 http://android-developers.blogspot.fr/2015/04/theres-lot-to-explore-with-google-play.html fresh Apr 28 19:17:37 btw. this is an interesting video explaining our current understanding of how the neocortex represents the information. It also explains how to replicate it in software to create a new model for machine intelligence : https://www.youtube.com/watch?v=izO2_mCvFaw Apr 28 19:18:22 adq yeah there are updates in the sdk manager Apr 28 19:18:24 "AI Neural Nets" <-- google that for some fun stuff Apr 28 19:18:42 got to work on nueral networked simulations in college, that was pretty fun Apr 28 19:19:18 g00s, oops i did not check that Apr 28 19:19:32 yiati, you need a lot of theory for ai neura nets, i'm surprised for college level Apr 28 19:19:34 hello android dev enthuasists Apr 28 19:19:38 yiati, thanks. This video actually compares different approaches (mathematical, biological, mechanical) for the AI Apr 28 19:19:45 "Connecting to Google Play services" i still think this is a total freaking hack, they need some other packagaing mechanism that is transparent to programmer and user Apr 28 19:19:55 (graph theory, jackson network, etc... i saw that at the end of my studies, not in college lol) Apr 28 19:21:05 adq: Yeah it was a ai upper division bachelors class and our professors main focus was neural nets so that was about the last third of the class Apr 28 19:21:07 i'm going to play with multiple nodes later on Apr 28 19:21:17 (related to android wear & the link, not AI neural network :p) Apr 28 19:22:00 yiati, this is the part talking about differences (cca. 4 minutes) : https://youtu.be/izO2_mCvFaw?t=2223 Apr 28 19:24:07 mkdk: Hmm cool video Apr 28 19:24:26 yiati, just curious, in which country did you study? Apr 28 19:24:32 adq: Texas Apr 28 19:24:38 ok thx Apr 28 19:27:52 hm, my GA isn't behaving the same with play services 7.3 Apr 28 19:28:37 W/GAv4﹕ AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See http://goo.gl/8Rd3yj for instructions. Apr 28 19:30:35 lol Apr 28 19:32:40 i am having trouble using pdf.js in a webview Apr 28 19:35:38 how do I use pdf.js in a webview? Apr 28 19:36:08 If I launch my app by tapping on a notification then return to the home screen and invoke the app by tapping on the app icon, how can I prevent a new activity from being started? Apr 28 19:37:58 yiati, I'm not much into AI, but that video was informative in regards to the brain structure. Also, the implementation they did (NuPIC on GitHub) showed some interesting results. Basically the model allows them to monitor different properties of the system and then point out if there's something out of ordinary, ie. they show how a manually triggered automated software test popped up in the log and no one knew why at first. Another example was some Apr 28 19:37:58 analysis of words and how you can match words naming related objects. Apr 28 19:38:20 is there a fix to this shit? https://imgur.com/w9kaIJN Apr 28 19:39:34 noahmg123, have a look at this : http://stackoverflow.com/a/24938424 Apr 28 19:40:35 mkdk: I see that code. How do I use it? Apr 28 19:41:34 noahmg123, on the GitHub page you can find a section explaining how to use it : https://github.com/pauldmps/Android-pdf.js Apr 28 19:42:40 mkdk: I meant how do I put it in my app in the first place. Apr 28 19:43:14 noahmg123, you have to include it in your Assets folder in order for you app to be able to access it. Apr 28 19:43:37 Do I just copy the assests folder? Apr 28 19:43:52 If you need an example project, just clone the one from the GitHub and load it in the Android Studio to see how it is setup. Apr 28 19:44:58 mkdk: I don't need an example project. I already have an activity with a webview. I just want it to display pdf.js Apr 28 19:45:47 In the Android Studio you have to create the Assets folder specifically. It is a special kind of folder. You have to find app/src/main folder in the project view, then right click and select New->Folder->Assets Folder Apr 28 19:47:59 I also had to add the following into my app/build.gradle : sourceSets { main { assets.srcDirs = ['src/main/assets'] } } Apr 28 19:48:49 This will ensure that the assets directory is packaged inside the APK Apr 28 19:49:49 mkdk: I am only getting "Page: /" Apr 28 19:50:10 noahmg123, where ? Apr 28 19:50:22 mkdk: index.html Apr 28 19:51:37 noahmg123, I guess that is because the Javascript wasn't loaded properly. You have to fix the paths in the index.html : https://github.com/pauldmps/Android-pdf.js/commit/0dde45e085924abccaf5a21c0a480d7be6a60ca9 Apr 28 19:53:35 Also, have a look at the rest of commits in this repo to see how the author altered the original pdf.js in order to get it to work on the Android. There are specific requirements to make it run on Android > 4.1 (JB). Have a look at their Java file : https://github.com/pauldmps/Android-pdf.js/blob/master/src/com/sample/pdfwebviewer/PdfViewer.java Apr 28 19:54:08 mkdk: those changes are already made. Apr 28 19:54:22 setAllowFileAccessFromFileURLs and setAllowUniversalAccessFromFileURLs allows the webview to access files on the local storage Apr 28 19:55:02 hey, is there something special i need to do to get OTG working on my Nexus 7 2012 WiFi? Apr 28 19:55:31 i have a similar tablet, an HP, that's basically a knockoff of the Nexus 7, and it had an option under Developer Options, "Enable OTG / serial" Apr 28 19:55:37 but the Nexus 7 doesn't have that Apr 28 19:56:15 mkdk: ok Apr 28 19:56:18 hi guys Apr 28 19:56:30 mkdk: wait Apr 28 19:56:52 mkdk: Page: / is what index.html appears as even on my laptop Apr 28 19:59:44 verve, otg is controlled by the cable Apr 28 20:00:09 mkdk: full on pdf.js gives me what I want except it gives an error when using the file tag Apr 28 20:00:28 verve, or specifically, the id pin on the micro connector, which is set on otg cables appropriately (I forget if it has to go to ground or +5, one of those) Apr 28 20:00:46 dragorn: well, this dongle i have isn't working; tried it on a kernel that i'm fairly certain had support for the device built in Apr 28 20:00:59 verve, after that, it counts on the OS, the usb chipset, and the power system all cooperating. I don't recall if the 2012 n7 had much juice for otg Apr 28 20:01:03 i'm on something else now, and i plugged in a USB drive Apr 28 20:01:14 not sure if i have to mount it, but it's not poppin' up anywhere Apr 28 20:01:21 verve, I think it depends on the USB controller in your phone, have a look at this : http://www.androidpit.com/usb-otg-what-it-means-and-how-to-use-it and specific OTG USB controller requirements : https://www.altera.com/en_US/pdfs/literature/hb/arria-v/av_54018.pdf Apr 28 20:01:35 many devices either supply minimal power, or no power, in otg mode Apr 28 20:02:01 some require not only power injection but a hub in the chain; i ended up spinning custom PCBs with power injected hubs to get some devices working Apr 28 20:02:31 otherwise the kernel rejects it as a power over-draw because it identifies the chipset power source capabilities as 0 even when using aux injected power Apr 28 20:02:36 hm Apr 28 20:02:42 tldr: otg is a f'ing mess Apr 28 20:03:15 noahmg123, I think this problem has to do with the fact you are trying to access it using the file:// protocol. I would try to setup a simple HTTP server on your PC and try it out using the http://. You can setup a simple HTTP server using Python, by running 'python -m SimpleHTTPServer' in the directory you want to serve on your localhost Apr 28 20:04:09 and, as you hinted at knowing, just because the device enumerates doesn't mean it usefully does anything, so either you're using it via the userspace api or you've got a modified kernel, which gets awflly close to off-topic for here, but if you've got the ability go in via adb and look at dmesg and see if te device is seen at all, and if so, if it enumerates or rejects it due to power Apr 28 20:04:23 mkdk: it actually apears to be a chrome problem. is there a way to make the webview not use the chrome engine? Apr 28 20:04:24 noahmg123, note that the default port for the Python HTTP server is 8080 if you run as an unprivileged user Apr 28 20:04:28 mkdk: it actually apears to be a chrome problem. is there a way to make the webview not use the chrome engine? Apr 28 20:05:49 no Apr 28 20:06:06 I dont know what “http://www.example.com/gizmos” means in this context https://developer.android.com/training/app-indexing/deep-linking.html Apr 28 20:06:08 noahmg123, I doubt that Android includes multiple web rendering engines. I know for a fact that it works on Android as well, because I got it to run for my friend. It was running through Unity and we have used the Awesomnium plugin to get the WebKit engine in Unity. Apr 28 20:06:11 I'm unsure of what to replace it with Apr 28 20:06:21 I don't have a website of my own Apr 28 20:07:02 in fact I cannot really understand most of that page Apr 28 20:07:16 I understand the benefits of the outcome though Apr 28 20:07:38 Odaym, you don't have to specify anything : https://developer.android.com/guide/topics/manifest/data-element.html#host Apr 28 20:08:03 except android:scheme Apr 28 20:08:07 mkdk: well it does not work on mine. Full on pdf.js direct from Mozilla works on firefox on my computer and works on chome except you cannot use the ?file= thing. Apr 28 20:08:28 mkdk: the last part also goes for my app Apr 28 20:08:32 Add one or more tags, where each tag represents a URI format that resolves to the activity. At minimum, the tag must include the android:scheme attribute. Apr 28 20:08:40 noahmg123, ah, that is because of the same thing as you had to do on Android : To allow Chrome to access the local files Apr 28 20:08:47 that agrees with what you said Apr 28 20:08:54 Odaym, ^ this. When I did deep-linking I did the pathPattern of .*, sending it to a DeepLinkActivity which would then render w/e i needed from the URI Apr 28 20:09:10 mkdk: why would it work on firefox though? Apr 28 20:09:12 Odaym: that is for, e.g. something like the play store. Where if you navigate to https://play.google.com/store/apps/details?id=org.example.blort, it will open the app in the play store app, instead of opening the actual web page Apr 28 20:09:35 I've worked with custom schemes that lead other apps to open my app Apr 28 20:09:38 this is similar yea? Apr 28 20:09:39 So you use that functionality to register your app's ability to handle that url Apr 28 20:09:46 Odaym: yes, it works with custom schemes as well Apr 28 20:10:12 eh I still dont get it Apr 28 20:10:20 noahmg123, because Firefox maybe allows the access to the local files. It has different security model to Chromium/WebKit. This funky looking URL actually really explains how to enable it : http://www.chrome-allow-file-access-from-file.com/ Apr 28 20:10:42 Once you've added intent filters with URIs for activity content to your app manifest, Android is able to route any Intent that has matching URIs to your app at runtime. Apr 28 20:11:43 Odaym:yyes Apr 28 20:12:03 alright, but I dont know which URI to specify, why would I Apr 28 20:12:12 I want everything that Google finds best to do, to be done Apr 28 20:12:12 Odaym: back up a bit :) Apr 28 20:12:14 , now you're app will open on odaym://test Apr 28 20:12:18 what are you trying to do? Apr 28 20:12:30 benefit from something that I believe is good Apr 28 20:12:40 lol Apr 28 20:12:51 Odaym: if you don't have a specific use case, don't implement it Apr 28 20:12:55 ^^^ Apr 28 20:13:06 yea but Ill come out of here not knowing what went wrong Apr 28 20:13:21 I think I am talking about app indexing here Apr 28 20:13:28 and mistakenly switched to deep linking tutorial Apr 28 20:13:50 nah, nah this isnt for me. you need a website to do this Apr 28 20:14:02 you'll need a website for app indexing too don't you? Apr 28 20:14:13 Odaym, maybe this ? https://developers.google.com/app-indexing/ Apr 28 20:14:16 so that searching from google which comes up to links on the web might lead up to your app on a mobile Apr 28 20:14:42 so that your existence to Google is made up of a website and app Apr 28 20:14:58 correct? Apr 28 20:15:10 it knows where to find you on the web, and on the device if you exist there Apr 28 20:15:20 When synchronizing disk i/o what's the best way to lock on a particular file? Apr 28 20:15:23 and this : https://developers.google.com/app-indexing/webmasters/appindexingapi Apr 28 20:15:31 yea yea you need the whole party Apr 28 20:15:43 does anyone here use http://www.adcolony.com/monetize/ for ads? Apr 28 20:15:53 i wanna introduce video ads and just normal ads in my app Apr 28 20:16:00 lasserix, open it in an exclusive mode ? Apr 28 20:16:03 and when i googled it that link was one of the results Apr 28 20:16:32 JesusFreke I got a box didgeridoo today Apr 28 20:16:51 mkdk: back. my computer crashed Apr 28 20:17:07 on my way to amazingness Apr 28 20:17:19 Odaym: hah, nice! Apr 28 20:17:20 i also wanna introduce microtransactions in my app Apr 28 20:17:27 although to be fair, is there a way to actually test that? Apr 28 20:17:35 (without actually purchasing anything) Apr 28 20:17:37 Odaym: marko johnson? Apr 28 20:17:44 from marko johnson, I mean? Apr 28 20:17:49 Meinl Apr 28 20:18:03 http://www.amazon.com/Meinl-Percussion-DDG-BOX-Didgeridoo-Mahogany/dp/B00B2PJ6O8 Apr 28 20:18:08 ah Apr 28 20:18:23 aspire: "microtransactions" beyond IAP? IAP is _arguably_ testable, though crappily. Apr 28 20:18:38 er? i am not sure what that i Apr 28 20:18:42 is Apr 28 20:18:53 groxx is back :) Apr 28 20:18:58 hey JesusFreke I got asked a question by email today, from a company here that acts like Wired and TechCrunch, in Lebanon. The question read “What is the most important tip or advice you can give regarding mobile app development that you learned from your experience and that you would like to share with other peers?" Apr 28 20:18:59 like.. buying in game content Apr 28 20:19:07 like buying coins for example Apr 28 20:19:15 what would you answer? Apr 28 20:19:30 Odaym: I would decline to answer :) Apr 28 20:19:38 cause there is no 1 thing? Apr 28 20:19:43 lasserix, have you tried this ? http://developer.android.com/reference/java/nio/channels/FileLock.html Apr 28 20:20:01 yeah looking now thanks Apr 28 20:20:35 I don't do much actual mobile app development. At least, likely not in the sense that they are asking for. Apr 28 20:20:51 ah I see Apr 28 20:20:57 well stop knowing that much Apr 28 20:21:00 :P Apr 28 20:21:12 anyone's got experience with boto in windows? where do I store the keys? .boto is ok?? Apr 28 20:21:14 I don't do UIs, for example :) Apr 28 20:21:24 e.g. take a look at my penroser app to see why! :p Apr 28 20:21:26 g00s: ha, mostly :) lost a whole weekend to either food poisoning or some other kinda bug. Apr 28 20:21:48 Odaym my tip would be "use as few google apis as possible" :) Apr 28 20:22:08 groxx ah so you are now fasting along with lasserix Apr 28 20:22:14 funny that you mention, the answer I came up with was that most of the companies I worked for decided on UI/UX decisions based on what they believe applies to them since EVERYBODY has a mobile, there is a prevailing (and false) sense of entitlement when it comes to what should act how on the mobile Apr 28 20:22:27 mkdk: it unfortunately did not work Apr 28 20:22:27 g00s: finally past that actually :) but yeah, for about two days Apr 28 20:22:56 lasserix, also check : http://developer.android.com/reference/java/nio/channels/FileChannel.html#lock() Apr 28 20:23:13 noahmg123, what is the error you see in the JS console in the Chrome ? Apr 28 20:23:17 g00s: since I didn't respond yesterday: had a question? Apr 28 20:23:34 groxx hmm, no not yet :D Apr 28 20:24:01 groxx oh yeah, well have you used recyclerView StaggeredGridLayoutManager ? Apr 28 20:24:10 mkdk: it is actually in the window: Apr 28 20:24:12 mkdk: Message: Unexpected server response (0) while retrieving PDF "file:///home/noah/Documents/pdfjs-1.0.1040-dist/web/compressed.tracemonkey-pldi-09.pdf". Apr 28 20:25:23 Yes, that might be because you are trying to serve the local file, using the file://. Try starting the webserver under /home/noah/Documents/pdfjs-1.0.1040-dist/web/ and supply ?file=compressed.tracemonkey-pldi-09.pdf Apr 28 20:25:24 that really your answer g00s ? Apr 28 20:25:46 Odaym absolutely, minimize the surface area you use to reduce the bug exposure Apr 28 20:25:56 api surface area Apr 28 20:26:02 so you're referring to API's and external lips altogether Apr 28 20:26:07 yup Apr 28 20:26:11 libs* Apr 28 20:26:16 lol Apr 28 20:26:21 ok thanks man Apr 28 20:26:28 including play services, for example Apr 28 20:26:30 g00s: nope, haven't used that one. Apr 28 20:28:11 the FileLock is sufficient for two different file objects pointing at the same disk file? Apr 28 20:28:41 i dont understand why the new play services considers my devices missing play services :| Apr 28 20:28:46 iei am writing to a cache from one thread, maybe another thread wants to read from that file, the filelock from the file input stream will apply equally even tho the file instances are distinct? Apr 28 20:29:45 does the official twitter sdk allow posting a tweet with a single click? (ie, Twitter.postTweet("yay! hi from my app!");) Apr 28 20:30:20 niya, IIRC you can set it up for the user but they still have access to what you want them to say before submission Apr 28 20:32:21 verve, if you are still here, have a look at how the usb driver detects OTG capability (it must support HNP and SRP) : http://androidxref.com/5.1.0_r1/xref/external/kernel-headers/original/uapi/linux/usb/ch9.h#669 Apr 28 20:32:31 quinnjn: hm. i see... how do apps like instasgram do it so they share to fb, twitter, etc... just by marking a checkbox? Apr 28 20:35:25 mkdk: I missed what you had said. --allow-file-access-from-files solved the problem on desktop. how do I do it on mobile? Apr 28 20:36:47 noahmg123, as I wrote before you have to set the proper WebSettings before you initialize the WebView : https://github.com/pauldmps/Android-pdf.js/blob/master/src/com/sample/pdfwebviewer/PdfViewer.java#L42 Apr 28 20:37:04 that is setAllowFileAccessFromFileURLs and setAllowUniversalAccessFromFileURLs Apr 28 20:37:06 mkdk: I will try that. Apr 28 20:37:10 ok Apr 28 20:38:24 noahmg123, sorry I have to go to bed now. I hope you'll get it to run, otherwise try the Android-pdf.js project from the GitHub page; If all that fails for some reason, have a look at the native PDF renderer or Apache pdfbox and its Android port. Apr 28 20:38:52 mkdk: ok. sorry this took a while. Apr 28 20:39:31 Dang, I didn't get any work done :( But I have enjoyed talking to you guys o/ Apr 28 20:40:38 noahmg123, no probs. It's kind of complicated to get all the parts together to get it to run. In the end, it's a hack ;) Apr 28 20:41:08 if i try to read witha filelock it'll throw ane xception, not just wait as synchornized Apr 28 20:41:09 mkdk: I got it working! with full pdf.js. needs tweeking but there is not an error. thx Apr 28 20:42:15 noahmg123, awesome ! :) Apr 28 20:43:53 lasserix, yes, that is the expected behaviour. You cannot open a file that is locked. You have to catch the exception and use a loop or a callback to monitor the lock on the file. Once it's released, you'll be able to open it. Perhaps a better approach would be to synchronize the BufferStream instead and write the file at once. Apr 28 20:44:03 how about? http://stackoverflow.com/questions/19733266/how-to-synchronize-file-writing-to-achieve-maximum-concurrency-between-threads-j Apr 28 20:44:40 I have never used it, so I can't say. Apr 28 20:46:12 lasserix, this is another approach using a temp file : http://stackoverflow.com/a/5542076 Apr 28 20:49:05 i'm confused by these new google play services instructions "Optionally, register AnalyticsReceiver and AnalyticsService to support background dispatching on non-Google Play device" Apr 28 20:49:32 so, if my app is distributed through Play, it would have to be a Play Service device right? unless it was sideloaded, which i don't care about Apr 28 20:52:22 g00s, I understand it like this: If google play services is installed on the device, it will use play services. if not, it will use the backround service Apr 28 20:52:28 I think Play Store indeed needs Play Services Apr 28 20:52:29 But I could be wrong Apr 28 20:52:43 drkfdr, I dont think so. Apr 28 20:52:45 danijoo are you using GA ? Apr 28 20:52:57 g00s, yes. Apr 28 20:53:01 danijoo look at this https://developer.android.com/reference/com/google/android/gms/analytics/GoogleAnalytics.html Apr 28 20:53:05 perhaps not in the past.. not sure nowadays Apr 28 20:53:20 but i didnt change my implementation for it for long. Apr 28 20:53:22 danijoo specifically the AndroidManifest Apr 28 20:53:31 And I never used this analytics receiver stuff.. Apr 28 20:53:38 danijoo its brand new Apr 28 20:53:48 with play services 7.3 Apr 28 20:54:08 ah. im still on 6.something >.< Apr 28 20:54:15 :D Apr 28 20:54:57 lol, also they now recommend using wakelock permission - i thought GAV4 just did the right thing, its so confused now :) Apr 28 20:55:42 yeah well I think you dont need that Analytics receiver if you only publish on google play Apr 28 20:55:45 lasserix, also you might want to consider using more granual Lock mechanism than synchronized-block : http://developer.android.com/reference/java/util/concurrent/locks/Lock.html -- Also note that the BufferedOutputStream provides synchronized versions of the write/flush/close methods : http://developer.android.com/reference/java/io/BufferedOutputStream.html Apr 28 20:55:59 I mean there might be some people that dont have play services installed but... fuck them. Apr 28 20:56:05 * drkfdr adds some abc_fade_in and makes this RGB light control app more fancy Apr 28 20:56:27 mkdk: the problem is i dont want to have to create the locks since that too will have to be synchronized Apr 28 20:56:34 is there some way to set a bluetooth LE timeout value ? Apr 28 20:56:43 unless i just make like 20 on start, but i dont know before hand how many i need Apr 28 20:56:56 thats why i liked the string.intern method, implicit singleton tolock on Apr 28 20:57:08 I recently removed everything that forces google play services because I dont "really" need it and the only visible result was people complaining in reviews from time to time Apr 28 20:57:40 Does retrofit support using different interceptors for different api calls? Apr 28 20:58:06 lasserix, you can create different instances of the service for different api calles Apr 28 20:58:28 g00s, but wait. didnt GA work on non-google play devices in the past without doing that extra stuff? Apr 28 20:58:35 i thought it did. Apr 28 20:59:00 google still going downhill? oh how... not surprising at all :p Apr 28 20:59:14 danijoo: you mean make multiple restadapter? Apr 28 20:59:23 lasserix, forget what i said, it was dump Apr 28 20:59:53 cant you just check what api call has been performed with an if case in the interceptor? Apr 28 21:00:42 ravilov, google still doesnt document their new releases properly Apr 28 21:00:44 -_- Apr 28 21:00:58 yeah Apr 28 21:02:06 one of the reasons why Im usually 1 or 2 versions behind in support libraries and stuff like that... Apr 28 21:02:16 the other one is lazyness Apr 28 21:03:31 lasserix, have a look at this : http://lifeinide.blogspot.dk/2011/05/threaded-io-streams-in-java.html Apr 28 21:05:00 g00s: forgot to ask - are you still in NY? didja like the snow we got for two days over the weekend? APRIL !!!!! Apr 28 21:11:24 capella i didn't see any show ... pretty warm here Apr 28 21:11:55 danijoo it was supposed to work on non-GA devices without that stuff .... Apr 28 21:12:22 g00s, then I really dont see the point in this new thing Apr 28 21:12:26 danijoo also they deprecated the logging stuff, so you can't really see it unless you do an adb setprop on your device Apr 28 21:13:01 i think ill remove GA with my next google services update Apr 28 21:13:07 I dont use it much anyways Apr 28 21:13:29 Crashlytics has enough for me. Apr 28 21:14:23 maybe AnalyticsService is just a background thing? like its not doing it over a service if you dont register it, but still does it when app is running Apr 28 21:14:30 they really need to document that -_- Apr 28 21:15:02 that would make sense together with the optinal WAKE_LOCK for non-Gplay devices Apr 28 21:16:24 grr.. ANR Apr 28 21:17:41 damn that is dumb, they recommend having a pref change listener for app opt-out, but you can only initialize GoogleAnalytics.optOut once as its initialized (further changes have no effect) Apr 28 21:20:13 Why is copying the body with the requestinterceptor breaking the api call? Apr 28 21:21:07 g00s GoogleAnalytics.getInstance(context).setAppOptOut(boolean) is what im doing. Apr 28 21:21:19 thats the first line of my GA initialization method Apr 28 21:21:27 danijoo yeah, me too - after that call you can't change it though Apr 28 21:21:37 so having a listener seems ... O.o Apr 28 21:22:01 you would have to kill the process, restart, so it could take the new value Apr 28 21:22:24 really? it doesnt change dispatching immediatly when I call that later at runtime? Apr 28 21:24:18 oh, shit i had a mismatch between the preferences.xml key and the contant in code, ugh Apr 28 21:25:01 lasserix: I haven't followed all of this, but: you probably have to buffer & rewind the stream, since I assume it's not fully buffered to begin with Apr 28 21:29:25 I cant boot any ROM above 4.2.2. Theey just get stuck at the loading icon. Apr 28 21:29:30 new AS update!! Apr 28 21:29:31 lol Apr 28 21:30:18 donguston, read channel topic Apr 28 21:30:28 Afzal, god help us Apr 28 21:30:32 lol Apr 28 21:30:39 is this beyond RC3? Apr 28 21:30:59 Oh I joined wrong channel lol Apr 28 21:33:51 no, RC3, I didn't turn on my computer yesterday Apr 28 21:34:01 Hello, I have a question about the SNS push notifications needed for an Android App Apr 28 21:34:23 what type of app, I should configure in AWS? Apr 28 21:35:50 it's better than eclipse. I didn't understand which logcat window to use though.. (there were 2) Apr 28 21:35:50 danijoo hm, the plot thickens. my preferenceChangeListener is not firing, i wonder if there is something special about registering it in Application.onCreate Apr 28 21:36:23 g00s, are you keepin a reference? I know this shoudnt happen but maybe gc? Apr 28 21:37:03 it shoudn't be GC'd, its not a Weakreference Apr 28 21:37:16 I usually just set a listener to the checkbox in the preference setting Apr 28 21:37:28 because this is the only place where the pref could be changed Apr 28 21:39:38 g00s: sounds like it's pretty UI related. probably only observes changes when it's "on screen"? and are you using a different instance to make the views than you are to register? Apr 28 21:39:57 i just followed the directions here https://developers.google.com/analytics/devguides/collection/android/v3/advanced Apr 28 21:40:06 "App-level Opt Out" Apr 28 21:40:12 literally copy/pasta Apr 28 21:41:33 ah, I was looking at the Preference class, not SharedPreference Apr 28 21:42:40 heh. interesting. the docs for that method say: "Caution: The preference manager does not currently store a strong reference to the listener. " Apr 28 21:43:28 if that's still true, seems like faulty example code Apr 28 21:44:27 does anybody have experience with SNS and GCM? I mean I thought the notification was sent directly from GCM, now I've read some article that GCM is needed to send push notifications, could anybody elaborate more on this? Apr 28 21:44:41 danijoo> g00s, are you keepin a reference? I know this shoudnt happen but maybe gc :)) Apr 28 21:45:37 epinky, GCM is a service from google which you can use to send messages to client phones from your server Apr 28 21:46:08 danijoo: thank you, where does SNS come into play? Apr 28 21:46:15 its basically your server contacting google server -> google server sending the message to the device if its online -> broadcastreceiver on the devices get called and does your stuff Apr 28 21:46:44 danijoo: and that messaging is free? Apr 28 21:46:47 what is SNS? Apr 28 21:46:49 epinky, yes Apr 28 21:46:57 danijoo: Amazon SNS Apr 28 21:47:34 epinky, well. there are other services like GCM. I dont know Amazon SNS but maybe its one of those Apr 28 21:47:58 Most of them delegate delivery to GCM tho Apr 28 21:48:05 push notifications are not built into android. they rely on libraries like GCM Apr 28 21:48:25 well. one cound consider GCM as build in though ;) Apr 28 21:48:28 basically every company that maintained their own push arch is now an API that delegates into GCM. Apr 28 21:48:30 SNS delegates everything to other endpoints, iirc. Apr 28 21:48:37 " The preference manager does not currently store a strong reference to the listener. You must store a strong reference to the listener, or it will be susceptible to garbage collection." Apr 28 21:48:42 lol, oops, ugh! Apr 28 21:48:56 yeah, that's fun to debug Apr 28 21:48:57 g00s, I wonder what led to this design decision Apr 28 21:49:11 i can't recall any other APIs doing that Apr 28 21:49:24 g00s, Picasso from Square for example ;) Apr 28 21:49:36 danijoo, memory leaks, we did something like that as well Apr 28 21:49:48 danijoo, people forget listeners, they leak their activities, their app crashes Apr 28 21:49:58 people complain either way Apr 28 21:50:02 yep Apr 28 21:50:06 err on the side that will cause them to shoot themselves in the foot the least Apr 28 21:50:16 ah yeah. I agree. For something like a sharedpreference that kinda makes sense Apr 28 21:50:33 because its not activity context related like the view listeners Apr 28 21:51:13 yep, but it's really a lose-lose choice there Apr 28 21:51:45 mostly comming from the fact that there's alot of devs out there that don't understand how GC works :/ Apr 28 21:52:19 or even what a reference constitutes Apr 28 21:52:31 that's a thing on LinkedIn, right? Apr 28 21:52:42 we see people move from declaring the instance inline to putting it in a local in the same scope (therefore no change) Apr 28 21:58:23 danijoo: well Amazon SNS needs a GCM, so I don't get the point of send to GCM if I have to use GCM anyways Apr 28 21:58:44 epinky, well. then SNS sends to GCM sends to your device Apr 28 21:59:15 danijoo: how do I get a GCM api key? Apr 28 21:59:17 no idea what the pros of SNS are but you could just use GCM then Apr 28 21:59:24 epinky, google dev console Apr 28 22:01:26 hey, sorry if bother you guys Apr 28 22:01:28 I want to know how do I change package name in android studio? Apr 28 22:03:24 nevermind Apr 28 22:03:26 i got it Apr 28 22:21:35 @all if a user is logged in using a Facebook/Google+/email account, instead of implementing a stub authenticator is it possible implement Apr 28 22:21:49 ConcreteAccountAuthenticator extends AbstractAccountAuthenticator {..} Apr 28 22:21:49 ? Apr 28 22:24:39 so thats kinda scary actually , from a security perspective . even GA docs make the mistake of forgetting about the PreferenceManager storing weakreferences here https://developers.google.com/analytics/devguides/collection/android/v4/advanced Apr 28 22:25:07 so if devs copy & paste that, and don't realize there is a bug, then i bet a lot of people disable pref in the app but don't realize nothing will happen Apr 28 22:25:37 and they also forget that prefChangeListener doesn't get an initial call, so you have to spoon feed it for its first value Apr 28 22:27:25 let me submit a bug against those docs ! Apr 28 22:27:43 oh wait, you can't ! hahaha , AOSP tracker doesn't take play services bug reports Apr 28 22:27:47 :D Apr 28 22:40:07 what kind of precautions can i take to make my app "safe" Apr 28 22:40:28 as in: not vulnerable for file editing, not vulnerable to memory editors (such as gamecih), not vulnerable to apps like "freedom" ? Apr 28 22:54:36 aspire: probably dexguard + learning obfuscation techniques you can apply by hand. Apr 28 22:57:55 dexguard? Apr 28 23:10:26 dexguard and obfuscation wouldn't help Apr 28 23:10:37 anyway, just follow security best practices Apr 28 23:10:39 best you can do Apr 28 23:31:28 isn't that pretty much the entire sales pitch of dexguard? Apr 28 23:34:51 "Based on our experience, we give DexGuard a hacker protection factor of 35. The combined layers of protection completely break one-click cracking tools and even keep determined hackers at bay." Apr 28 23:35:00 What in the name of all that is holy is a hacker protection factor? Apr 28 23:35:05 Is it measured in snake oil? Apr 28 23:35:11 35 snakeoils of hacker protection? Apr 28 23:35:15 bwahahaha Apr 28 23:36:10 People actually PAY for this kind of bullshit? Apr 28 23:36:44 how many libraries of congress is that again? Apr 28 23:36:59 I never can remember the conversion factor Apr 28 23:56:43 join #reddit-mfa Apr 28 23:56:47 wooops Apr 29 00:02:15 heh. probably means "will take a determined hacker 35 minutes to get past it, instead of proguard's 5 minutes" Apr 29 00:02:54 The release notes for AS 1.2 RC3 state "This build incorporates the final release of version 1.2 of the Android Gradle plugin". Anyone know what that means? Apr 29 00:03:05 I guess it means something like "It works with 1.2 of the plugin". Apr 29 00:04:45 If I have an EditText and a Button underneath it, how do I ensure when the keyboard rises, that the button is still visible after? Apr 29 00:05:46 Bryan792: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft Apr 29 00:06:03 IIRC, it's "adjustResize". Apr 29 00:06:23 but that will ensure the focused EditText is visible Apr 29 00:06:25 not the button Apr 29 00:07:01 What makes you think that? Apr 29 00:07:08 "The activity's main window is always resized to make room for the soft keyboard on screen." Apr 29 00:07:27 it makes the entire activity’s layout resize to fit the keyboard Apr 29 00:07:34 only way I know of is to define a layout that will fit in the smaller height available, and use adjustResize. I'm not sure how / if you can control adjustPan to ensure "X and Y are visible". Apr 29 00:07:39 the issue is that your button may now be too small to hit Apr 29 00:07:59 this is assuming that the current window can be resized right? Apr 29 00:08:23 what if all the elements are already have set heights Apr 29 00:09:27 then you have problems on differently-sized phones anyway. Apr 29 00:09:38 and/or it'll scroll. Apr 29 00:11:16 I need two pairs of headphones: one for my laptop and one for my TV. Apr 29 00:11:22 And the ability to wear both at the same time. Apr 29 00:12:09 TacticalJoke yeah, why does AS come with a gradle plugin? i thought i get that from build.gradle Apr 29 00:19:27 ya incorporates features that the android gradle plugin has up to 1.2, unit testing for ex Apr 29 00:21:58 would i need to try and detect when the window resizes and then make sure the layout includes my wanted elements before draw? Apr 29 00:22:51 It sounds like you're doing something wrong, Bryan792. Apr 29 00:24:01 maybe Apr 29 00:25:57 gotta look through it, not my code, thanks Apr 29 00:40:29 ThreadPoolExecutor.allowCoreThreadTimeout FTW. Apr 29 00:40:35 Out* Apr 29 00:52:15 hi is there a way to sign android apk and have it download in the phone through a link without user intervention ? maybe using a valid cert ? Apr 29 00:54:24 axilaris: that is explicitly not allowed :) Apr 29 00:54:46 if you are a system app, you could. almost. Apr 29 00:54:48 only system and google cert may do that Apr 29 00:55:04 in ios there is the enterprise developer program Apr 29 00:55:10 doesn't matter Apr 29 00:55:12 nothing of that sort will work for android Apr 29 00:55:21 i thought android was extremely flexible Apr 29 00:55:35 well user can turn off and allow unauthorized apps Apr 29 00:55:36 holy crap pfn, even for just 3 minutes 535 lumens from AA is crazy http://www.zebralight.com/SC5-AA-Flashlight-Cool-White_p_161.html Apr 29 00:55:51 that's pretty awesome Apr 29 00:55:54 but what i want is a way without user intervention Apr 29 00:55:55 I need a new flashlight Apr 29 00:55:59 axilaris, there is NO way Apr 29 00:56:03 axilaris, do not ask again Apr 29 00:56:09 pft. i want 1000 lumens for 1 minute Apr 29 00:56:19 pfn: ok Apr 29 00:56:58 JesusFreke 1100 lumen for 2 hours http://www.zebralight.com/SC600-Mk-II-L2-18650-XM-L2-Flashlight-Cool-White_p_123.html Apr 29 00:57:29 yeah, that's an 18650 though :) Apr 29 00:57:35 :D :D Apr 29 00:57:51 of which I have a couple laying around, for my laser Apr 29 00:58:09 JesusFreke what color laser ? Apr 29 00:58:40 g00s: blue. it's the wicked lasers arctic blue one Apr 29 00:58:56 JesusFreke does particulate matter in the air show up in it ? Apr 29 00:59:10 i thought green might be good for that Apr 29 00:59:19 yep. you can usually see the beam itself, except in bright light Apr 29 01:00:47 g00s: https://www.youtube.com/watch?v=xtRA9TWEavM :D Apr 29 01:03:02 JesusFreke really cool interference patterns Apr 29 01:03:18 yeah, definitely Apr 29 01:03:52 i was expecting some didgeridoo though Apr 29 01:04:28 here you go: http://www.instructables.com/id/Leather-Didgeridoo/ Apr 29 01:05:30 well, laser + didgeridoo Apr 29 01:14:55 JesusFreke do you know if its possible for a device to not have google play service loaded, but have Play Store ? is that common at all ? Apr 29 01:16:39 g00s: I'm not aware of any such devices, other than like a hacked together community rom or something. Apr 29 01:16:57 ok thanks Apr 29 01:52:23 can't have play store but not play services Apr 29 01:52:41 oh, vice versa? it's possible, but no rom would be like that Apr 29 01:54:33 hm lets say I have 2 Preferences (A, C) defined in XML. At runtime, i'd like to possibly (if debug build) insert a preference B, between them. I defined A:order=1 and B:order=2 but its still being put last (position 3) ... any ideas ? Apr 29 01:55:48 i'd just put B in the XML too, but i see no way of completely hiding it for non-debug build Apr 29 01:55:54 Hey guys, I need a little help getting the facebook sdk to work. I am running Android Studio 1.1.0 and whenever I try to build, I get an error on the line compile 'com.facebook.android:facebook-android-sdk:4.0.0' and the error says Error:(10,0) Gradle DSL method not found: 'compile()' Apr 29 01:58:00 g00s, getPreferenceScreen.findPreference.setVisible(false) Apr 29 01:58:07 or just remove it Apr 29 01:58:15 if (!BuildConfig.DEBUG) Apr 29 01:58:33 it's a pity that BuildConfig can't generate attributes/resources Apr 29 01:59:03 voysturr: You're probably putting that statement in the wrong build.gradle. Apr 29 01:59:11 voysturr: Put it in the build.gradle for 'app'. Apr 29 01:59:37 TacticalJoke: Are you serious? FML, I've been fighting with this for 2 days now Apr 29 02:00:13 pfn i don't see Preference#setVisible ... Apr 29 02:00:18 i guess i can remove it though Apr 29 02:00:32 g00s, something along those lines, I don't recall Apr 29 02:01:02 g00s: You set the order on all preferences in the category after adding B? Apr 29 02:01:29 TacticalJoke: Holy shit, it worked! Thank you so much! I would have never thought of that. Apr 29 02:01:43 surf2b1 i set the order on the pref to insert, and the one to insert after Apr 29 02:01:57 I heard they're gonna remove the dual-build.gradle thingamybob. Not sure if true, though. Apr 29 02:01:59 * pfn releases android-sdk-plugin 1.3.22 Apr 29 02:02:03 * pfn twiddles thumbs while tests run Apr 29 02:02:38 i think its easier to remove it - i'll do that, hopefully no flicker Apr 29 02:02:49 there is no flicker, you do this onCreate Apr 29 02:02:52 before any rendering occurs Apr 29 02:03:06 I have lots of java experience but zero in android development. That would be awesome if they did since it is a bit confusing. Apr 29 02:03:58 java experience leads to an easy time working with android Apr 29 02:04:19 cool Apr 29 02:04:48 voysturr: Didn't your project's build.gradle include comments stating something such as "Don't put dependencies here"? Apr 29 02:05:05 I think mine did at first (though I remove all that stuff before checking in). Apr 29 02:05:46 pfn TIL lint does not work on classes using lambdas + retrolambda Apr 29 02:05:58 g00s, should work fine Apr 29 02:06:02 what about it doesn't work Apr 29 02:06:20 I suppose it might fail the java AST-based checks Apr 29 02:06:36 https://github.com/evant/gradle-retrolambda/issues/96 Apr 29 02:06:51 yeah, java AST-based checks Apr 29 02:07:01 I disable those Apr 29 02:07:16 those are useless to me in any case Apr 29 02:07:40 I only use the class and resource scope checks Apr 29 02:09:44 TacticalJoke: They did but I am a goof and have no idea how gradle works. That was a steep learning curve. It even says that I need to add the dependancies and repositories to app/build.gradle but I didn't bother to read the app part lol Apr 29 02:10:22 g00s: tested and it worked fine for me. http://pastebin.com/vSQ0PBRH Apr 29 02:11:09 gradle isn't a steep learning curve... Apr 29 02:11:38 surf2b1 and that put the inserted pref first ? Apr 29 02:12:15 it put it after the second and before the first, which is what I that you were looking to do Apr 29 02:12:26 order starts at 0 Apr 29 02:13:13 * thought Apr 29 02:13:13 ohhh, i see thanks surf2b1 ! Apr 29 02:13:23 np Apr 29 02:13:25 g00s, I want to write a simple byte-code checker for unused resources, I'm sad that one is written as an AST-based checker Apr 29 02:22:54 g00s, I'll write one pretty soon, use the standard resource detector for XML files, and write a separate class-based detector for source Apr 29 02:39:29 Hey guys. I'm gonna start using okhttp but was wondering if it provided simple network utils like isNetworkAvailable() or something. Or does okhttp not handle it since it's just a client? Apr 29 02:39:51 Android gives you that Apr 29 02:40:53 Yeah but don't bother using it, just send a ping to your server and wait for a pong, it's the only reliable way to determine connectivity Apr 29 02:41:34 JakeWharton: theres no go to networking util lib that companies use? Apr 29 02:42:00 I just know that theres situations like hotel wifi where you "have" a connection but you're not actually connected Apr 29 02:42:10 And was guessing that maybe some lib handled that situation Apr 29 02:42:13 eghdk: that's exactly why I made the suggestion I just did Apr 29 02:42:37 Yeah, so far (at least) in my app I just try to make the request. If I get an IOException I simply state "Could not connect" or whatever. Apr 29 02:42:42 Though obviously different depending on context. Apr 29 02:43:20 eghdk, google checks via calling a cgi that returns uh... HTTP 204 i think Apr 29 02:43:22 one sec Apr 29 02:43:28 you can make your own cgi and check it Apr 29 02:43:30 it's real easy Apr 29 02:43:59 So if I wanted to tell the user (as seen in hangouts) that "Data network unavailable" in a big red banner, I should just base that off of my server? Apr 29 02:44:02 What's the point of pining another serevr than your own? Apr 29 02:44:05 dragorn: cgi? Apr 29 02:44:07 pinging* Apr 29 02:44:26 eghdk, make a cgi that returns a 204 status code and query it. In python that's as simple as: print "Status:204\n" Apr 29 02:44:42 if you get 204, you've got a valid egress connection. If you get anything else, you'r ehitting a captive portal rewrite Apr 29 02:44:58 CedricBeust: that makes sense when you put it that way. Apr 29 02:45:06 google literally calls google.com/generate_204 Apr 29 02:45:14 so you could call theirs, if you wanted, i suppose Apr 29 02:45:39 that's how the wifi connection state is determined and the 'you need to log into wifi' alert is presented Apr 29 02:45:47 dragorn: I'm not familiar with what cgi is (does it stand for something)? Apr 29 02:46:01 eghdk: forget about CGI, it's the wrong solution to this problem Apr 29 02:46:02 dragorn: Oh really? Apr 29 02:46:17 eghdk, common gateway interface, it's a pretty core component of anything on the web Apr 29 02:46:35 Did you see that in aosp somewhere? that they hit http://google.com/generate_204 Apr 29 02:46:39 CedricBeust, how do YOU propose to detect a captive portal rewriting http requests? Apr 29 02:46:59 eghdk, yup, it's documented Apr 29 02:47:00 dragorn: Send a ping to your server, wait for a pong. If you don't receive, you don't have networking. Apr 29 02:47:05 CedricBeust, nope Apr 29 02:47:11 CedricBeust, a) ICMP is often heavily filtered Apr 29 02:47:18 CedricBeust, b) ICMP may not be filtered but HTTP is Apr 29 02:47:43 CedricBeust, c) a network-rewriting captive portal will often answer all ICMP, or no icmp even after authentication Apr 29 02:48:10 filtering icmp is bad, but it doesn't prevent many networks, especially paywalled wifi, from doing it Apr 29 02:48:14 Forgive me for not trying this yet, but what will okhttp do if I have no network. Will it just fail then (the failure callback gets called) or will it succeed but with an error code or somethign Apr 29 02:48:42 you'll eventually die with some sort of network exception Apr 29 02:48:47 depending on how you don't have network Apr 29 02:48:52 dragorn: I didn't mean a literal ping Apr 29 02:49:03 an empty REST ping, wait for a pong Apr 29 02:49:15 CedricBeust, so, for example, checking the result code? ta-da. Apr 29 02:49:17 eghdk: Are you using Call.enqueue? Apr 29 02:49:23 gradle-plugin 1.2.2 :) i keep hoping this will fix my AS woes Apr 29 02:49:36 eghdk: In the case you describe, you should simply get onFailure. Apr 29 02:49:36 g00s, orrr break all your projects ;P Apr 29 02:49:45 indeed Apr 29 02:50:11 TacticalJoke: Don't hate me, I've spent more time reading the docs and planning before I've actually used it. I will be using async calls, so yes Call.enqueue will be used Apr 29 02:52:17 Why would I hate you? Apr 29 02:52:48 That's often a good practice, BTW. You can save so much time and energy by planning. Apr 29 02:52:52 hi all, I am working on a google glass. Right now my app doesn't do much because I am trying to get some of the basics done before I work on any of the specific stuff. I am trying to get my gestureDetector to work. I have plans for all of the gestures. Everytime a Gesture is used, a log entry is made. And for a single tap, my google tts speaks a couple words of text. The problem is Apr 29 02:52:52 that the gestures don't work at all. My app loads on Google Glass, but as I try the different gestures, the logcat doesn't update with the gesture made logcat entries. I pastebined my java file at http://pastebin.com/xde14zM5 Apr 29 02:53:27 apologies, the code isn't the cleanest yet. Not many comments. Apr 29 02:54:31 Comments make code cleaner? ;o Apr 29 02:54:34 TacticalJoke: Because I'm asking questions before actually trying it. But I figure android-dev is a good place to ask. I'm very curious whether devs create a networkutil class and surround their network calls with if (NetworkUtils.networkAvailable()){//make network call} Apr 29 02:54:39 well easier to read :) Apr 29 02:54:52 BlindWiz: Super debatable. :D Apr 29 02:54:57 Just trying to figure out standard operating procedure before going too deep Apr 29 02:55:15 TacticalJoke your right. Comments at times could confuse things more. Apr 29 02:55:46 you're* Apr 29 02:56:47 the wierd thing is that my code compiles. I've cross checked it against other code samples, and the google code samples etc. Apr 29 02:58:36 eghdk, usually I just do an infinite progress spinner while it loads network data and a timeout / error handler that shows it didn't work **** ENDING LOGGING AT Wed Apr 29 02:59:59 2015