**** BEGIN LOGGING AT Thu May 14 02:59:58 2015 May 14 03:01:00 How to clear / nullize the static inner class singleton? May 14 03:02:00 Pwnies: are you reseting the view handlers correctly? May 14 03:04:17 lasserix_: You want to null out a singleton? May 14 03:05:09 yeah May 14 03:05:13 but safely May 14 03:05:18 and re-initialize May 14 03:05:25 i need to move some application scoped into activity scoped May 14 03:05:56 lasserix_: How are you creating the singleton? Manually or with DI or something? May 14 03:06:24 its the static inner class, then i just call get() in onCreate May 14 03:06:52 add a boolean parameter or something then May 14 03:07:10 MySingleton.getInstance(createNewInstance) May 14 03:08:08 how is that different? May 14 03:09:02 You can use the boolean to determine whether your getInstance(createNewInstance) method should return the static instance, or if it should create a new one May 14 03:09:08 ie http://pastebin.com/ybNBQBvQ May 14 03:09:36 i always want to create it when its not, but i just need a way to safely release and reinitialize May 14 03:10:09 yep May 14 03:10:29 sorry i dont see how adding a boolean helps May 14 03:10:36 i was thinking more along the lines of having to synchronize something May 14 03:10:50 but that would seem to defeat the point of using the static inner class May 14 03:12:49 anyone updated to 1.2.1.1 ? May 14 03:14:48 yeah May 14 03:44:09 i want to notify my app of state change on a backend system via google cloud messaging or sometihng similar but ive heard that isnt guaranteed to run in a timely manner? is there another way to do this or am i on the right track already? May 14 03:55:20 teasp00n: GCM is fairly speedy overall. If you need guaranteed updates, use your own backend May 14 04:08:24 Anyone here used jimu mirror? Just discovered it today and it looks pretty interesting and more useful then AS preview. May 14 04:11:36 codepete_ there is also http://zeroturnaround.com/software/jrebel-for-android/ May 14 04:11:44 i haven't used either May 14 04:13:19 Woah awesome. Thanks. I've been seeing those ads pop-up but never bothered to check it out haha. May 14 04:21:21 Current jrebel looks pretty expensive though. Wonder what they will charge for the Android version. May 14 04:32:38 i’m guessing about the same May 14 05:48:48 hello, anyone familiar with android wear ? May 14 05:49:07 is it possible to show picture on wear without writing wear app ? like notifications ? cannot find anything May 14 06:50:41 wow, my Acra reporter went over quota May 14 06:50:54 how the hell did I get 1gb of incoming data May 14 06:51:42 lots of crashes :) May 14 06:52:43 it's not that much data May 14 06:53:16 I guess I should look at my other crashes when the quota is back up May 14 06:57:24 crap, i have a Manager class. its the end. May 14 06:57:46 Hello! I have problems with my app.. but also i can't use pastie right now.. any other paste service i can use in thsi channel? May 14 06:59:19 styler2go: github gist, pastebin, google "paste code". There are tons of options May 14 06:59:34 sometimes some are forbidden :) like in #ubuntu May 14 07:01:28 so this is my problem: http://pastebin.com/YvK7aJEV May 14 07:02:20 g00s: sup? May 14 07:02:50 hey thepoosh whats p May 14 07:02:54 u May 14 07:02:57 p May 14 07:03:08 styler2go: in EmojiconsPopup.java:149 there is a null pointer exception May 14 07:03:28 g00s: worked until 22:00 last night May 14 07:03:30 styler2go: looks like findViewById is returning null. Are you sure R.id.rootView is in your layout? May 14 07:03:32 yes, but i don't know how May 14 07:03:39 thepoosh thats it ? May 14 07:03:44 my boss's boss showed me something and we caught a bug May 14 07:03:51 then tracked it down for 3 hours May 14 07:04:06 how can i check this with logcat? i mean, is there an easy way to do it? usually i try to use .toString() and just check what it says May 14 07:04:10 was it an interesting bug ? May 14 07:04:32 messages not arriving in the client May 14 07:04:38 the worst there is May 14 07:04:43 it's probably a server issue May 14 07:04:50 hm yeah May 14 07:04:52 if (getActivity().findViewById(R.id.rootView) == null) May 14 07:05:10 styler2go: ^ May 14 07:05:13 thepoosh well do you know what it is ? May 14 07:05:22 oh server May 14 07:06:11 fucking disconnects May 14 07:06:40 styler2go: just reproduce while in debug mode May 14 07:06:49 it will stop just before the exception May 14 07:07:13 oh does it? :o May 14 07:07:25 i didn't do android in a long time =( May 14 07:07:44 nah, it did not stop May 14 07:09:20 is casting something on rootView too early in onCreateView? May 14 07:10:10 Don't do getActivity().findViewById in your Fragment May 14 07:10:21 Call findViewById directly on the content view you create May 14 07:17:00 how do i do something liek that in a fragment? cidString = (String) getActivity().getIntent().getExtras().get("cid"); May 14 07:17:06 it als tells me null object reference May 14 07:19:07 You don't. You pass data to the Fragment via setArguments/getArguments May 14 07:19:39 ok and afrer that? :o May 14 07:19:39 When creating it May 14 07:19:44 how do i access it? May 14 07:19:55 Check the javadocs for those methods May 14 07:20:00 ok May 14 07:22:33 Hello May 14 07:25:15 SimonVT: but this answer tells me that i can do it like that: http://stackoverflow.com/a/14746744/1227714 May 14 07:25:22 I've been trying to include a YouTube video in my basic app by following this „How to”: http://www.androidhive.info/2014/12/how-to-play-youtube-video-in-android-app/ but I have a NullPointerException May 14 07:26:59 You can, but you shouldn't May 14 07:27:16 well it is not even working for me :D anyway, i am going to use the answer above May 14 07:28:19 I like how datalayer example doesnt work :D May 14 07:31:36 gordon_ what datalayer example ? May 14 07:32:16 Hi guys, is it possible to right usuall apps with NDK instead of SDK? The official doc says it's not recommended. But what is ndk for? May 14 07:32:39 gordon_ google tag manager ? May 14 07:33:05 CtrlC overcoming the 64mb memory limit May 14 07:33:17 mainly games, isnt it? May 14 07:34:23 Can someone please help with this codehttps://bpaste.net/show/1b0274f65752 causing NullPointerException ??? May 14 07:34:24 what do you mean ppklompolak? May 14 07:34:30 Can someone please help with this code https://bpaste.net/show/1b0274f65752 causing NullPointerException ??? May 14 07:34:50 which line, ppklomPolak May 14 07:34:52 CtrlC that youget OutOfMemoryException if you use more than about 64mb May 14 07:35:06 oh! May 14 07:35:07 styler2g0 Andoird Studio says: May 14 07:35:56 styler2go the 37th line May 14 07:36:10 super.onCreate ? May 14 07:36:27 What do you mean? May 14 07:36:33 paste your stacktrace pls May 14 07:36:48 ok May 14 07:37:33 please wait May 14 07:37:34 wait.. you aere setting the wrong contentview May 14 07:37:39 setContentView(R.layout.activity_main); May 14 07:37:48 shouldn tthis be .happenings ? May 14 07:38:31 i assume there is no yotuubeview in your activity_main May 14 07:39:58 styler2go Thank You! This was the most stupid mistake I done in a long time… However the problem now issss that the video doesn't play May 14 07:40:18 All I see is the image of the video May 14 07:40:18 "the video doesn't play" is a bit inaccurate :/ May 14 07:41:06 I mean only one scene from the video appears and nothing else May 14 07:41:18 *frame not scene May 14 07:41:33 Completely still May 14 07:41:37 player.setPlayerStyle(PlayerStyle.CHROMELESS); May 14 07:41:40 because of that? May 14 07:42:05 try it without that first maybe May 14 07:42:21 I'm not sure… This was in the tutorial because it apparently makes it have GUI controls May 14 07:42:35 but ok I'll try it as you say May 14 07:43:54 HAhaha! it plays! :D May 14 07:44:00 Maaagic! May 14 07:44:39 I'mso happy righ now thanks to You! May 14 07:44:47 np :) May 14 07:44:47 You're awesome! May 14 07:47:37 styler2go In case you are might want to do the same thing: http://www.androidhive.info/2014/12/how-to-play-youtube-video-in-android-app/ May 14 07:47:49 *You might want May 14 07:47:53 i already have that in my app :) May 14 07:48:04 thats why i knew some about it May 14 07:48:12 Hehe did You use the same tutorial? :D May 14 07:49:06 nah i amde it some years ago May 14 08:05:06 how do i get google play app translation promotion codes? :D May 14 08:05:31 Do you recommend translations offered by Google Play, or do you think that’s too expensive ? May 14 08:07:04 there's a range of prices May 14 08:07:20 I've tried for 4 languages, they are very good May 14 08:09:51 if i am using fragments.. can't i still use the "back" button to close a fragment again? May 14 08:10:11 it's best if you provide them with screenshots of the application, so that in your XML when you define the activity that the group of strings belong to, they can have context as to what the strings actually need to mean May 14 08:10:31 because some sentences don't make sense if you transliterate them, you have to actually translate them May 14 08:10:41 I don't think so, styler2go May 14 08:11:14 well you can put a fragment and give it a toolbar and setDisplayHomeAsUpEnabled on it May 14 08:11:20 i could fetch the button press and then fragmentmanager.replace i guess...? but.. do i want to do that.. May 14 08:11:31 and you can handle the back event happening, but the going back thing is for activities I guess May 14 08:11:38 hmm May 14 08:12:27 its too silly of a problem to be having May 14 08:14:23 Odaym: good point, thank you! May 14 08:15:01 they take the cost according to number of strings by the way; so if you have 4 languages, and 100 strings inside strings.xml, you have 400 strings May 14 08:15:07 or..words? May 14 08:15:14 no it's words May 14 08:15:26 wow, that would cost a considerable amount May 14 08:17:59 Odaym „there's a range of prices I've tried for 4 languages, they are very good” – What do you mean because Google Translate is free? Also I recommend not using it for professional apps becaue it is inaccurate May 14 08:18:47 Odaym: i think it is the number of words you mean, right? May 14 08:18:56 If you think it isss accurate just translate to any language and another and back to what you put in and you'll be shocked May 14 08:19:17 translationparty.com! :D May 14 08:19:21 at my app, translating 558 * 3 words (to 3 languages), would cost 130 USD May 14 08:19:47 I have a galaxy s5 that comes earbuds that have a remote May 14 08:20:09 this is NOT google translate May 14 08:21:07 long press on the button opens samnsung's useless voice command app. I would love to reassign this to Google Now voice commands instead May 14 08:21:14 ppklomPolak, well I honestly trust Google more than I trust some random person on the Internet telling me that some service is "inaccurate" May 14 08:21:17 unsigned_long aha! So what is it then? that seems expensive May 14 08:21:26 Odaym: i hardly can find any feedback / reviews on the service online May 14 08:21:31 is is just me, Odaym? May 14 08:21:38 like: "was it worth it?" May 14 08:21:38 0daym If you think it is accurate just translate to any language and another and back to what you put in and you'll be shocked May 14 08:21:51 review about the translation service?... I don't think you will find someone who reviewed it May 14 08:22:23 What language? May 14 08:22:37 Odaym: why not? :O May 14 08:22:43 who's gonna review something like that May 14 08:22:45 its rare May 14 08:22:51 That would be a typical entry for a android developer blog ;) May 14 08:22:56 yea good point May 14 08:23:00 would be great to read about it May 14 08:24:10 well, breaking it down, it results in 7 EUR ct per word, which seems fair to me for an everything-cared-about translation service May 14 08:24:28 its a cool experience anyways :P you feel official May 14 08:24:35 like you're building something that matters May 14 08:24:54 Odaym: did it have a significant impact on #downloads for your app? May 14 08:25:15 I imagine it depends on the market reach you already posess May 14 08:25:18 possess * May 14 08:25:19 hello. quick question: will android ever move forwards from 3.10 kernel in the future ? May 14 08:25:29 yes, it was from the 2 top non-US countries that I saw being the highest users May 14 08:25:33 Russia and Germany May 14 08:25:41 okay :) May 14 08:25:51 cause in the analytics they show you how to improve, they take the highest country suers and tell you translate to these languages May 14 08:26:08 its no bit deal - just curious b/c many arm devices linux support ends up being '3.10' only May 14 08:26:20 bit/big May 14 08:26:23 dreamcat4 Does it „move forwards” with new Android versions? May 14 08:26:25 yeah, that's exactly what I'm doing right now. For example, Hindi and Korean seem quite rigorous in the "education" label May 14 08:27:19 ppklomPolak: i think you are being too literal with your interpretation... it is clear i mean rebase to newer linux kernel. May 14 08:27:28 dreamcat4 If you care enough you'll probably compile newest kernel version for android May 14 08:28:03 ppklomPolak: or you could just say 'sorry, i don't know the answer to that' May 14 08:28:09 + May 14 08:28:11 he does that May 14 08:28:14 just move on May 14 08:28:30 probably not the channel for your question either, see #android-root May 14 08:28:38 Ii could say that I don't care too May 14 08:28:40 they know more about these things May 14 08:29:03 ok well nevermind then. thank you. May 14 08:29:13 either way, 3.0 is excellent May 14 08:29:24 people stayed on 2.6 for decades May 14 08:30:15 the state of the code in 3.0 is world class and acclaimed as best in the world I think May 14 08:30:28 some metric came out about it, about a year ago May 14 08:34:01 JesusFreke I tried the translationparty.com because of you: Hahahhaha http://translationparty.com/#12163066 May 14 08:35:14 Doesn't work :/ May 14 08:39:10 ppklomPolak: yeah, I noticed :( May 14 08:39:22 i've seen some pretty hilarious ones on there though May 14 08:55:09 guys, where can I find the little arrow, used in the list? is a default drawable? May 14 08:56:55 guys, im using a syncadapter but it runs twice at first launch May 14 08:57:00 whats wrong with it May 14 08:59:50 JesusFreke I don't know why but it works now… May 14 09:05:46 i don't get this error message.. anyone an idea? java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.youtube.player.YouTubePlayerView.a()' on a null object reference May 14 09:07:06 @Override public void onStart(){super.onStart(); May 14 09:07:09 in this line... May 14 09:11:37 I guess you had to do something before super.onStart() May 14 09:11:41 possibly in onCreate() May 14 09:11:53 like dunno... initialize youtube? May 14 09:15:02 Hi! I've learnt java from Mooc.Fi and now i want to go into the android development world. What free courses/ resources would you guys recommend ? May 14 09:15:40 I've already done the getting started from the developer.android.com May 14 09:16:50 go make an app May 14 09:17:23 or, keep reading stuff on d.android.com, there's LOTS more there May 14 09:18:29 wakelock: nah.. didnt help =( May 14 09:19:16 any good first app ideas to learn? May 14 09:19:46 no May 14 09:19:56 simple lists and fragments are a good way i think May 14 09:21:42 an app that would push everyday a motivational text notification ? May 14 09:21:52 FilipOMG, there's tons of code examples on d.android.com, as you go through it you should get an idea of what you want to make. but generally you don't just decide you "want to make an app" and then try to figure out what that app might be, normally first you notice the need for an app and then decide you want to make it May 14 09:22:08 and inside it a random quote generator May 14 09:23:20 hey dude, if that sounds good to you, then go for it May 14 09:23:25 don't ask others for opinions May 14 09:24:46 so it would be better to go through the developer.android.com sections and then build an app instead of following a course May 14 09:25:30 some people prefer one way, some another May 14 09:25:34 there is no "better" or "worse" way May 14 09:27:25 Hello. How can I set a margin for a dialog fragment? May 14 09:28:21 FilipOMG: just think about what could be usefull to you? May 14 09:28:28 what do you miss on your phone? May 14 09:28:32 and then just go for it May 14 09:30:07 vedu: margin for what ? May 14 09:30:08 what is the method in the listviewAdapter to highlight a selected item? May 14 09:30:29 ok, you guys conviced me. I'll just jump in and do an app, as i like learning by doing May 14 09:31:45 Unfortunately though playing the video requires that YouTube app is installed. How to do this without requring from the Enduser that s/he has YouTube app installed? May 14 09:32:14 as a sidenote, what would be the minimum api level to implement material design,21? May 14 09:32:37 FilipOMG there are implemntation for kitkat May 14 09:32:47 but thay might bee unofficial May 14 09:34:17 ok, i'll just do the motivation app May 14 09:34:24 going to school now May 14 09:34:28 thanks May 14 09:35:40 what's 110 as hex? simply 0x00000100? May 14 09:36:23 styler2g0 no May 14 09:36:26 styler2go no May 14 09:36:32 rekt... May 14 09:36:40 ? May 14 09:37:06 is that 110 binary or decimal? May 14 09:37:06 i am trying to find what my id 110 is... i had something liek setId(110) May 14 09:37:50 6D May 14 09:37:59 I think May 14 09:38:30 6E it is May 14 09:38:50 shouldn't 6E occur in R.java then? May 14 09:39:11 I don't know May 14 09:39:16 meh May 14 09:39:20 sorry May 14 09:39:33 no problem May 14 09:39:50 i am rebuilding my app right now, so much work on the YOuTubeApi thing May 14 09:40:07 Maybe there is a way without it? May 14 09:40:36 I wuld prefer to do without because not everyone has/wants/likes YouTube app May 14 09:40:43 *would May 14 09:40:54 it is an app for music videos so you NEED youtube May 14 09:40:58 MediaPLayer only plays youtube rtsp streams May 14 09:41:00 all videos are on youtube May 14 09:41:11 you could use Exoplayer May 14 09:42:31 styler2go PVStar app plays Youtube videos without requiring YouTube May 14 09:42:54 (example) http://www.amazon.com/ASBIT-CO-LTD-PVSTAR-YouTube/dp/B00EKA6MWG May 14 09:43:08 (I don't like it though) May 14 09:43:43 styler2go so I don't think that You really NEED Youtube app… May 14 09:44:31 wasn't this app kind of illegal? :P May 14 09:45:15 I don't really know… But it was on Play Store when I was still usinggg it May 14 09:45:18 playing in background without showing the video itself, no ads etc before the video etc? May 14 09:45:29 they banned it from the play store May 14 09:45:44 apparently it is not there anymore May 14 09:46:04 yeah May 14 09:46:05 „playing in background without showing the video itself, no ads etc before the video etc?” – Yes May 14 09:46:27 Butt maybe it was banned only because of ads in menu May 14 09:46:44 it's not allowed to play youtube videos withotu showing the video May 14 09:46:57 If it was not for profit then maybe it couldd have not got got banned..? May 14 09:46:59 try to use your YouTube player view with another view above it May 14 09:47:05 you'll get errors spammed May 14 09:47:39 I'm actually trying to not require YouTube from the Endusers May 14 09:47:58 i am ok with that for my enduser range :) May 14 09:48:08 But if it is too hard I'll delegate this task May 14 09:48:17 hehe :D May 14 09:48:20 most devices come with it installed anyway May 14 09:48:27 yeah May 14 09:48:32 and my app is kidn of mainstream May 14 09:49:03 shmooz I only had Samsung phones… I believe they never had it preinstallled May 14 09:49:21 AFAIK most (if not all) androids come with some sort of built-in video player May 14 09:49:43 my old htc came with it installed May 14 09:49:57 shmooz, samsung is often... "special" May 14 09:50:22 Currently the best Youtube replacement is TubeMate because it passes the direct URL to YouTube's video to your Video Player App and also lets You download May 14 09:50:33 they won't have many of the "standard" google apps installed because they need room for their own bloat, and anyway you can easily install them yourself from the play store May 14 09:50:39 but yes it is always better not to require that another app be installed May 14 09:53:27 what is the best way to highligth an element in a ListView using its adapter? May 14 09:54:32 icemanbp What EXACTLY do you mean by „highlight”? May 14 09:54:34 icemanbp: you compare the position param of getView to whatever and then highlight when it matches May 14 09:56:00 change the background color of the row May 14 09:56:17 What is the best way to show a YouTube channel? In the App or in the Browser? May 14 09:56:48 highlight the clicked element in a list by changing its background color May 14 09:57:14 icemanbp I'm not sure but maybe OnItemClick will work? May 14 09:57:37 ppklomPolak, you start an intent with the appropriately formed URL and let the user decide how to open ("complete") it May 14 09:57:50 ok, but if you click on all item they will become all highlitghted :D May 14 09:58:30 icemanbp, you should probably explain better what exactly are you trying to do May 14 09:59:10 a listview with an adapter, when you click on a row, I want to change its background color. Behavior of selction May 14 09:59:58 icemanp Then maybe unhighlight it after it loses "focus" May 14 10:00:00 selection should be done by long pressing, clicking should default to the most common action May 14 10:00:23 surely there's a way to do this with drawable states May 14 10:00:24 or you can use little checkboxes May 14 10:01:19 uhm... May 14 10:02:23 hi May 14 10:02:28 icemanbp: are you extending BaseAdapter ? May 14 10:02:30 find an app that has a similar functionality and see how they do it May 14 10:02:47 yes shmooz May 14 10:02:55 icemanbp: do you have a instance of the convertView in your getView ? May 14 10:02:59 I remember that there's a way by using it May 14 10:03:03 yes May 14 10:03:12 is there a method to block google map in area... so user can move outsie LatLng ? May 14 10:03:21 in the getView there's one May 14 10:04:39 Is it true that one can use camera only in landscape mode, on older phones ? May 14 10:05:19 ok so if View vi = convertView; then vi.setBackgroundColor(Color.rgb(255, 0, 0)); when position matches the var you set with click May 14 10:05:53 wakelock Thanks I've done this with startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.youtube.com/user/talithahalifax/videos"))); May 14 10:06:09 how can I retrive the position of clicked item? May 14 10:06:30 inside the BaseAdapter May 14 10:06:42 icemanbp look at my code May 14 10:06:54 where is your code? May 14 10:07:04 please wait May 14 10:07:18 oh ok, sorry :D May 14 10:07:29 https://bpaste.net/show/7472bbc8b9dd May 14 10:08:08 You can continue thiss code with case 1: case 2: and so on… May 14 10:08:42 icemanbp: list.setOnItemClickListener(... public void onItemClick(...) <- has a position as well May 14 10:09:29 yes shmooz, I can highlight in that method, but, when and where can I remove the hightlight? May 14 10:09:58 that's upto you May 14 10:10:05 eheheh :D ok May 14 10:10:16 what is the user supposed to do to remove the highlight ? May 14 10:10:30 click on another item May 14 10:10:47 it will do that already May 14 10:11:03 icemanbp what if s/he clicks again on same item? May 14 10:11:05 it will only highlight one at a time May 14 10:11:13 nothing, stay hightlighted May 14 10:11:28 onCameraChange is invoke only when user stop drag May 14 10:12:03 icemanbp, can't you just make a radiobutton list? May 14 10:12:07 seems way more standard May 14 10:12:17 no May 14 10:12:18 :( May 14 10:12:36 it's a list of categories May 14 10:13:00 based on the category selected I show some context in another frame May 14 10:13:45 I'm trying to set up debugging ActionBar on a possible bug I found at work. I believe I need the internal classes and have pulled them from the emulator -- just don't know how to use them without gradle trying to compile them. anyone willing to give a hint? May 14 10:14:12 icemanbp, ok, I still don't see why you can't do radiobuttons May 14 10:17:58 or checkboxes May 14 10:18:59 checkboxes would imply you can select multiple May 14 10:19:52 How to check if there is an app that can handle the intent ? I tried to figure out resolveActivity but I don't know… May 14 10:19:55 he'll probably change his mind and want multiple next anyway ;) May 14 10:20:18 lol May 14 10:32:03 maybe ArrayAdapter is better for this purpose... May 14 10:32:58 maybe it makes no difference :p May 14 10:33:19 I'm sure that there's a way :( May 14 10:39:10 I have an animation that I instantiate and add some custom code to the applyTransformation, after which I call .setDuration(1000) and then view.startAnimation(animation) May 14 10:39:25 got some reason applyTransformation) is never called May 14 10:41:26 http://pastebin.com/3w3wSrxQ May 14 10:47:53 where can i see default buttons for toolbar ? for example backbutton May 14 10:52:38 sci-fic, a list of possible button types or their visuals? May 14 10:53:10 Troffel:both would be good May 14 10:54:11 well the options are the same as with the actionable May 14 10:54:17 actionbar* May 14 10:57:45 Troffel, never worked with animations but the docs say you're supposed to do something with the transformation supplied... http://developer.android.com/reference/android/view/animation/Animation.html#applyTransformation%28float,%20android.view.animation.Transformation%29 May 14 10:58:35 well in my applyTransformation I never call the super May 14 10:58:42 Can someone help me with this? http://pastie.org/10188367 May 14 10:58:44 I just apply my own changes to the view May 14 10:59:13 http://pastie.org/10188369 here with logner stacktrace May 14 11:00:24 styler2go, after your YouTubePlayerSupportFragment youTubePlayerFragment = (YouTubePlayerSupportFragment) May 14 11:00:28 you're missing a ; May 14 11:00:41 thats one line :D May 14 11:00:52 ops, nvm May 14 11:00:57 ye just saw May 14 11:02:22 styler2go, http://stackoverflow.com/questions/25959531/youtubeplayersupportfragment-null-pointer-exception-at-initialize-method#answer-27625498 May 14 11:02:40 looks like your layout isn't inflated yet May 14 11:03:04 thus find fragment returns null May 14 11:03:16 and the error is from calling a method from a null-object May 14 11:04:03 try using the inflater that is passed in to inflate the correct layout of the fragment May 14 11:04:46 styler2go, inflater.inflate(R.layout.article_view, container, false); May 14 11:05:02 i already have that May 14 11:05:07 didnt copy all my oncreateview sorry May 14 11:05:21 hard to help then d: May 14 11:05:59 wait a sec i recreate May 14 11:07:09 http://pastebin.com/BN7zD5G3 here we go, the full onCreate (only Oninit removed) May 14 11:09:24 have you checked what the value of the youTubePlayerFragment is before .initialize() is called on it May 14 11:09:48 it looks like it's simply null, and then fails when you try to invoke a method on it May 14 11:10:31 well i assume it is null. what's best practice to check that? Log.d( .toString())? May 14 11:10:52 put a breakpoint May 14 11:11:03 wow May 14 11:11:05 at line 15 May 14 11:11:11 (from the pastern) May 14 11:11:13 Eclipse diidnt have breakpoints o.O May 14 11:11:20 yes it does May 14 11:12:00 alternatively: if(variable == null) log.i("myApp", "it's null"); May 14 11:12:14 ok it is not null May 14 11:12:17 it has some value May 14 11:12:55 if you put a breakpoint, you can see what kind of object it is May 14 11:13:05 YouTubePlayerSupportFragment{2e1d399f #0 id=0x7f0c00a3} May 14 11:15:48 can't think of much more aside from the syntax error on line 15, which I assume you've just removed. May 14 11:16:44 hmm May 14 11:16:45 might be you're using a support.v4 type fragment and it findes a non-support fragment. But that should produce a different error May 14 11:20:44 now i get another error May 14 11:21:11 http://pastebin.com/uXUcRnva on the line super.onStart(); May 14 11:24:27 It takes a few seconds to process just one intent… May 14 11:25:17 styler2go, not sure, never worked with the youtube player. best advice is to use breakpoints to pinpoint the null pointers, also some googlefu May 14 11:25:30 and it takes an eternity to buiild trust, ppklomPolak! :D May 14 11:25:51 Troffel: Got it fixed. it was really messed up because i had 2 youtubeviews and uhm May 14 11:26:00 anyway, it's fixed :D May 14 11:26:06 ok d: May 14 11:43:12 such a mess May 14 11:43:34 Code inspection in Android Studio says „declaration access can be weaker”. What to do??? May 14 11:44:29 GAH May 14 11:44:41 Anyone figured non-painful way of copying highlighted text from IDEA to keynote? May 14 11:45:00 ppklomPolak, there's a description next to it that's pretty helpful :) May 14 11:45:55 Mavrik but I don't understand what „ access modifier narrowed down” means May 14 11:46:21 narrowing public -> -> protected -> private May 14 11:46:31 widening private -> protected -> -> public May 14 11:46:43 aha so that is a bad thing May 14 11:46:46 it's telling you that your field or whatever doesn't have to be public or so widely accessible May 14 11:47:06 If all is public then it is better because less potential problems..? May 14 11:47:32 I'm scraed that I might have some errors because offf too narrow May 14 11:47:54 I'm a Java noob though May 14 11:54:13 I keep getting this „vb May 14 11:55:48 I keep getting this „Module 'app' sources do not depend on module 'YouTubeAndroidPlayerApi' sources” in code inspection so I remove it and I have to „invalidate caches restart” to fix can't resolve … errors which cause the same warning to appear again May 14 11:55:59 How to fix this? May 14 12:00:05 If all is public then it is better because less potential problems..? <--- that makes zero sense May 14 12:00:16 and is in fact a very bad strategy May 14 12:12:33 we don't really listen to him here May 14 12:12:42 just waiting on Simon to do something about him May 14 12:18:47 does someone know of a nice tutorial that shows how to use "Material" May 14 12:20:41 Hello folks! May 14 12:21:12 hello! May 14 12:21:21 I got an error and I am new on debugging code, could someone help me figure where should I look at my code please? : http://pastebin.com/0i5wPvDk May 14 12:22:23 ircfox: ur xml file line 11 for the MainActivity class May 14 12:22:45 com.example.addfragmentxml.MyFragment is not Fragment, did you subclass it? May 14 12:23:58 Sloth514: yes : public class MyFragment extends Fragment { May 14 12:24:25 is the com.example.addfragmentxml the correct path? May 14 12:24:53 yes May 14 12:25:19 did u implment the constructors? May 14 12:25:48 and what is at line 11? May 14 12:26:58 Trying to instantiate a class com.example.addfragmentxml.MyFragment that is not a Fragment.... that is your issue i think, whats in ur xml file? May 14 12:28:35 MyFragment : http://pastebin.com/0xFMMzfG May 14 12:29:20 MainActivity : http://pastebin.com/JP7kdPhY May 14 12:30:06 xml file? May 14 12:30:30 my_fragment : http://pastebin.com/EQUNL0Pp May 14 12:30:52 ur using a TextView tag May 14 12:31:30 line 11, change 'TextView' to "com.example.addfragmentxml.MyFragment" May 14 12:31:37 But this fragment is supposed to show a text message. May 14 12:32:08 then u put the textview in the fragment... May 14 12:32:39 but this is the fragment May 14 12:33:36 waht is ur my_fragment May 14 12:33:42 xml layout file May 14 12:33:58 this is the main_ativity.xml : http://pastebin.com/99QXbxsj May 14 12:34:14 my_fragment.xml : http://pastebin.com/EQUNL0Pp May 14 12:34:16 sry i was confused May 14 12:34:19 the main_activity.xml May 14 12:34:25 the tag is 'fragment' May 14 12:34:27 taht is wrong May 14 12:34:54 No, I can instantiate a fragment from xml file. May 14 12:34:59 yep May 14 12:35:12 you can not instantiate it, says so in the log May 14 12:35:32 cant convert fragment to Fragment May 14 12:36:39 I am following a tutorial from Lynda, I must be doing something wrong here. May 14 12:37:37 i usually define my fragments as 'com.example.addfragmentxml.MyFragment" not 'fragment' tag May 14 12:37:43 Strange is I did everything step-by-step just as the tutorial. May 14 12:39:11 but I did name it my_fragment.xml and MyFragment.java May 14 12:39:38 ... that might b it, ill check also May 14 12:40:12 has anyone written up or read a good overview of AppCompat theme styles and how they affect default views and components? May 14 12:47:05 fyi ur layout inflater code is commented out in the MyFragment May 14 12:48:40 guys, can anyone share with me their proguard section of the build.gradle? May 14 12:49:09 Sloth514: I did change it as a test. Didn't work. May 14 12:54:42 Sloth514: got it! I was importing : import android.support.v4.app.Fragment; and the correct is : import android.app.Fragment; May 14 12:54:57 Sloth514: thank you for your help man!!! May 14 12:55:40 np, gj of figuring it out, knew it was a wrong class somewhere, May 14 12:56:11 cant instantiate means wrong class somewhere May 14 12:56:19 or typo lol May 14 12:57:16 Sloth514: good to know. I have to learn how to read those logs. May 14 12:59:41 yea, i usually do it in my xml files sometimes. well good luck, enjoy May 14 13:00:46 how can I take a string and replace all spaces with %20 May 14 13:01:10 noahmg123: Google knows. May 14 13:01:27 string.replace(" ", "%20"); May 14 13:01:28 TacticalJoke: Yeah. I was checking in the BG. May 14 13:01:29 meh May 14 13:01:38 Odaym: tried that. crashes app. May 14 13:01:49 that line cannot crash the app unless the string is null May 14 13:02:00 when you're trying to parse the URL from that string, that's where the crash will happen May 14 13:02:36 although still, parse would not have allowed you to compile without handling the exception.. May 14 13:02:58 Odaym: OK. 1. How did you know I was using a URL? That was pretty cool. JK it was pretty easy. 2. How do I parse it as a URL? May 14 13:03:11 you do that the way you are doing it now May 14 13:03:19 just not after a replace like that May 14 13:03:31 use the proper parsing method that will take care of how to read the well formed URL for you May 14 13:03:39 and catch MalformedURLException May 14 13:03:58 Odaym: how would I do that? (I'm a beginner) May 14 13:04:33 why are you working with a constructed string that still has spaces that you need to take care of? May 14 13:04:52 Becuase it is a user input May 14 13:05:06 The user inputs something May 14 13:05:07 the user is inputting the final URL that you're going to be hitting? May 14 13:05:10 no May 14 13:05:12 part of it May 14 13:05:27 it's an API May 14 13:05:31 so the last part of it May 14 13:05:48 Odaym: Yeah, and somewhere in the middle May 14 13:06:08 why don't you make them presets May 14 13:06:17 and they just choose which one, no writing involved May 14 13:07:01 Becuase there are so many. They input two cities and then it calls the Google Distance Matrix API. May 14 13:07:07 here is my loadUrl: JSON.loadUrl("http://maps.googleapis.com/maps/api/distancematrix/json?origins=" + city1 + "&destinations=" + city2); May 14 13:07:11 but you're going to have to deal with regexes May 14 13:07:17 cause users can input absolutely anything May 14 13:07:32 unless you do edit text with input type May 14 13:08:05 Odaym: OK. But I'm still confused why it is not working. May 14 13:08:20 TacticalJoke: Hahaha "Fuck concurrency! Y'all can wait." May 14 13:08:26 And wait they shall. May 14 13:08:27 noahmg123: It's not possible to answer that question without seeing the code. May 14 13:08:30 ErnestG: :D May 14 13:08:31 OK May 14 13:08:41 see this http://stackoverflow.com/a/2593319/764897 May 14 13:08:48 I will post the code to pastebin May 14 13:11:12 Odaym, TacticalJoke: http://pastebin.com/Lht8RSvN May 14 13:12:33 you're trying to hit that URL and get back things from it? May 14 13:12:39 anyone encountered DFP ads that has a height (wrap content) before the ad is loaded? May 14 13:12:41 you are missing a ton of stuff May 14 13:13:05 see this for example https://gist.github.com/zvineyard/2012742 May 14 13:14:22 Odaym: I already have another method in mind to grab the JSON. I still do not see why it is crashing. May 14 13:15:12 Ive never heard of JSON.loadURL(String) May 14 13:15:25 noahmg123: Can you paste the stack trace? May 14 13:15:42 Odaym: That's just WebView.loadUrl. May 14 13:15:49 TacticalJoke: thanks May 14 13:15:56 TacticalJoke: I will May 14 13:16:23 oh god it's a web view called JSON May 14 13:16:25 lol May 14 13:16:25 :D May 14 13:18:20 TacticalJoke: I am running the app again with a log call that returns the two strings. Will post the stack trace soon. May 14 13:18:46 ok so I just sourced my images and need to make a (preferably zooomable) gallery. How to do this? May 14 13:20:02 TacticalJoke: OK, wait. how do I get the stack tace? May 14 13:20:26 It'll be visible in LogCat if the filters are not obstructing it. May 14 13:20:45 TacticalJoke: I just realized what I did wrong. May 14 13:21:25 TacticalJoke: I am coverting them to strings in the onCreate method. :P It was suposed to be in the onClickListener. May 14 13:21:49 :D May 14 13:23:19 I don't see why it's crashing, though, May 14 13:23:23 s/h,/h./ May 14 13:23:51 OK, still crashing. but at least now we've gotten a little ahaead. May 14 13:23:54 ahead. May 14 13:29:06 Hello, how can i manually start/stop a notificationlistenerservice? May 14 13:36:04 TacticalJoke: OK, it seems to be crashing before I thought. May 14 13:37:56 yea...please stop black magic May 14 13:37:59 it's not guessing May 14 13:38:51 Odaym: was that to me? May 14 13:38:56 yes May 14 13:39:19 what do you mean "black magic"? May 14 13:39:55 I mean it sounds like black magic, mysterious and no one knows why it happens May 14 13:40:11 you need to debug more effectively May 14 13:40:22 I'm looking for some feedback on my math game, anyone willing to give feedback? May 14 13:40:26 not like guessing when the crash happens before midnight or when the weather is cold May 14 13:40:47 Odaym: I am talking about when in the code it crashes May 14 13:40:57 Yeah, always look at LogCat when you get a crash. May 14 13:40:58 yes it's easy to find out where and why this is happening May 14 13:40:59 LogCat tells all. May 14 13:41:04 its not a guessing thing May 14 13:41:12 Meowser link to said game? May 14 13:41:19 LogCat did not say anything last time I checked May 14 13:41:27 ppklomPolak: sent you a pm May 14 13:41:30 It will say something every time you get a crash. May 14 13:41:37 Hmm.. did not see. May 14 13:41:42 use Monitor May 14 13:41:43 Filters might hide it in some cases. May 14 13:41:47 from the android tools May 14 13:42:01 Anyway it appears to not like one or both of these lines: May 14 13:42:03 city1 = City1.getText().toString(); May 14 13:42:05 city2 = City2.getText().toString(); May 14 13:42:10 noahmg123, what is the stack trace? May 14 13:42:18 ppklomPolak: we are working on an update based on user feedback. We want to see if there are any other suggestions we should throw in before we finalize the update May 14 13:42:44 noahmg123: Good programming is all about precision. You need to know *precisely* what is wrong. No guessing. May 14 13:42:45 TacticalJoke: Sorry. Again, how do I find that? May 14 13:42:58 In LogCat. May 14 13:43:18 OK May 14 13:43:24 If you can't see it, use "Log level: Error" and "No Filters". May 14 13:43:32 OK May 14 13:45:04 I am running it on an emulator to get as clean as a log as I can. May 14 13:47:22 The emulator is sowing down my computer a bit so I may take a little bit longer to respond May 14 13:47:57 You shouldn't need to use the emulator just to get a stack trace. May 14 13:48:08 Personally, I hate using the emulator. :D May 14 13:49:38 yeah. I just did not wang it up. I have o filters. I could not find ow to set the log level to error. May 14 13:49:47 ok. wow May 14 13:49:57 that came out all wrong. :P May 14 13:50:03 Anyway it is faster now May 14 13:54:18 OK. I will try again on my actual device. I could not find it. May 14 13:57:00 I am implementing AlarmManager on an onClick event but as soon as I click the button it triggers the alarm right away. It does not wait for the time provided. Can anybody point out what I may be missing? May 14 13:57:24 I know it's a very broad question but I can show the code if somebody would like to review it? May 14 14:01:30 anyone else willing to give feedback? May 14 14:02:14 What is the minimum version of Android you would recommend supporting for an App in the App-Store? May 14 14:02:19 It's too much effort asking you for the link and getting a PM. Just post it. May 14 14:02:29 I'm trying to decide between 2.3.3 and 4.0. May 14 14:02:35 barq: Using 15 or 16 is typical. May 14 14:02:38 Forget 2.3.3. May 14 14:02:47 That'll just be a world of pain for no good reason. May 14 14:03:03 barq: https://developer.android.com/about/dashboards/index.html May 14 14:03:11 Yep, that's what I am looking at. May 14 14:03:23 Gingerbread is 5.7% and dropping fairly quickly. May 14 14:03:27 So you would recommend 4.0 and above? May 14 14:03:52 I'd recommend 15 (4.0.3) or 16 (4.1), personally. May 14 14:04:11 is there something better than LocalBroadcastManager for the same purpose, which is not in the support library? Is this construct deprecated or something? May 14 14:04:42 What are the benefits of supporting 4.0.3. minimum as opposed to 2.3.3? May 14 14:05:47 There are so many that it's hard to list them and hard to remember them. May 14 14:05:51 what % of users have 2.3.3? May 14 14:05:58 Probably the best exercise is to talk to someone who has to support Gingerbread about their pain. May 14 14:06:05 Why support something that less than .0001% uses? May 14 14:06:33 TacticalJoke: I did it on my device. got the error. but then other erros from other parts of my device flooded in now thst the app had crashed. :P Now I am having trouble getting it to connect to my device :P :P I guess itś the emulator again. May 14 14:06:35 And if you don't support those 3 people who need to buy a new phone, are you missing out on anything? May 14 14:06:39 Meowser: 6% May 14 14:06:41 According to the dashboard it is still 5.7% on Gingerbread. May 14 14:06:49 ok, 6% May 14 14:06:56 5.7% and dropping. May 14 14:06:57 they need to buy new devices May 14 14:07:07 I wonder how many of those 5.7% will actually want to use your app. May 14 14:07:13 none May 14 14:07:18 That's a good point. May 14 14:07:33 Okay, here is the code: https://github.com/ZeeshanAK/AndroidDev/tree/master/AlarmNotif/src/com/zeeshanak/alarmnotif May 14 14:07:46 we support 4.0.3+ because of that May 14 14:07:56 How would you convince your boss, though? He doesn't care about personal pain. May 14 14:07:57 In some cases, for example, many of them will be from a country that isn't really targeted by your app. May 14 14:08:25 you show him how much time(money) needs to be spent supporting 6% of the population May 14 14:09:15 Yeah, that pain will transfer to him. May 14 14:09:24 Meowser: some of this people don't have enough money to buy new devices, it's not very nice of you stating they need to do something May 14 14:09:31 So, even if he's a selfish psychopath, pain is a factor. May 14 14:10:02 Not sure how to quantify the money spent though. May 14 14:10:14 True, icedp, but the same could be said about stuff like Windows XP. Supporting Windows XP is hard work in some cases, and it's often just not worth it. May 14 14:10:39 icedp: ok... if they want the use newer apps, they need to update, just like with everything in life May 14 14:10:50 want to go over 45mph? time to sell the horse May 14 14:10:53 Yeah, we're talking about new development here. May 14 14:11:01 Old apps will (I presume) continue to support Gingerbread. May 14 14:11:13 barq: do you get paid? May 14 14:11:30 Well, basically the question is whether to get rid of 2.3.3 support and set new minimum to 4.0. May 14 14:11:35 Meowser: Yes. May 14 14:11:54 TacticalJoke: OK I got the error. (Finally) May 14 14:12:10 barq: then tell him supporting 4.0 will take X hours to create/design/deploy. supporting 2.3.3 will take an additional Y hours. May 14 14:12:14 then he can do the math May 14 14:12:41 It's mostly maintenance, as the app is up and running, it's just maintenance. May 14 14:12:42 barq, what's your current 2.3 usage %? May 14 14:12:50 TacticalJoke: http://pastebin.com/0iuuqkta May 14 14:13:03 5.7% overall, don't know the usage of my App % May 14 14:13:13 overall statistic is useless May 14 14:13:24 check your app % and make decision on that May 14 14:13:32 Guys, anyone want to review my code? https://github.com/ZeeshanAK/AndroidDev/tree/master/AlarmNotif/src/com/zeeshanak/alarmnotif The alarm fires as soon as the button is clicked. It should fire at the time provided by the user but IDK what's going wrong. May 14 14:13:32 dont the stats tell you android version? May 14 14:13:34 TacticalJoke: Meowser: yeah, sure, I'm not saying it makes sense to support this devices when developing new apps. But there is a lot of legacy apps that work just fine on that devices and would do so for a couple of years May 14 14:13:41 noahmg123: The problem is that you never assign City2. May 14 14:13:43 Meowser, the stats tell you nothing about your demographic May 14 14:13:48 Meowser, because they're global May 14 14:13:58 TacticalJoke: hmm. let me see. May 14 14:13:58 Who can access the stats? May 14 14:14:10 and making decisions based on world average stats instead of your target demographic is moronic. May 14 14:14:25 Mavrik: good point May 14 14:14:28 True. May 14 14:14:29 TacticalJoke: [facepalm] May 14 14:14:37 Mavrik: unless it was 0%, then it is clear... May 14 14:14:47 (I still have an app with 18% of 2.3 devices and some with 2% of 2.3 devices) May 14 14:15:03 So do check yours :) May 14 14:15:04 How can you view the % of a specific app? May 14 14:15:10 icedp: I thought barq was making a new app, didnt know he was maintaining a legacy app May 14 14:15:11 barq, it's on play console. May 14 14:15:20 For new apps, it's API 15 or 16+ :) May 14 14:15:33 btw can you provide different apks for different versions on play sote? May 14 14:15:36 OK, so only for the owner. May 14 14:15:38 s//store May 14 14:15:43 If I start a service from an activity, and I don't want to hold a reference to the service in that activity. And I navigate to another activity, what would be the best way to cancel that Service thats still running? May 14 14:15:50 Another point on developing for older versions is that those peole have not updated, thus are probably not tech savy, thus probably do not even download apps. May 14 14:15:52 different Android versions I mean May 14 14:16:11 icedp, yes May 14 14:16:19 noahmg123: right, until their kid comes home for holiday and tells them to update their 5 year old phone May 14 14:16:23 icedp, you can easily distribute old version for old phones and update the new one May 14 14:16:43 noahmg123, maybe, maybe not May 14 14:16:51 as I said, do check target demographic :) May 14 14:17:11 Meowser: ok. yeah. but devices running that probably cannot even support the new version. May 14 14:18:01 So the version demographics for a specific app on play console are based on the downloads from a specific version? May 14 14:18:13 TacticalJoke: That was it. May 14 14:18:57 TacticalJoke: Now I am gonig to try it full on. May 14 14:19:01 Yeah, the question is totally different now that we know that barq is talking about an app that's already on the store. May 14 14:19:09 It sounded like he or she was asking about new development. May 14 14:20:11 The support of ancient Android can cause runtime errors May 14 14:21:04 Not sure if webclient sent this the first go around: "If I start a service from an activity, and I don't want to hold a reference to the service in that activity. And I navigate to another activity, what would be the best way to cancel that Service thats still running?" May 14 14:21:17 i believe it but if 99% of your users are using 2.3.3 devices, you need to support it May 14 14:21:36 so find out that info first May 14 14:21:41 OK, will do. Thank you. May 14 14:21:55 and remember what Mavrik said, it is global users May 14 14:22:02 yep. May 14 14:22:19 And as soon as you have that information, you'll be able to talk to your boss with more clout as well May 14 14:22:20 Meowser: You can spin data a lot of ways. Sure 99% may use 2.3.3 and up but 90% use 4.1 and up May 14 14:22:37 "We have only 0,5% users on 2.3 and supporting it will prevent us to add modern features" May 14 14:22:43 OK, so the discussion will probably be 4.0.3. or 4.1 next. May 14 14:23:14 noahmg123: yea I know, but he could specifically have 99% of his users using 2.3.3, maybe it is an education app and schools haven't bought new devices? May 14 14:23:15 barq: yeah it was 90.4% on 4.something and up May 14 14:23:39 What are the benefits of 4.1 as opposed to 4.0.3. apart from the usage %? May 14 14:23:58 Meowser: Well, unless they have not bought within 5 years yeah, but that is a big if. May 14 14:24:00 barq, the ones listed in the API changelog on developers site May 14 14:24:15 noahmg123: schools are poor... May 14 14:24:28 idk, but something he needs to look into May 14 14:24:47 Meowser: some are. But even super cheap tablets now run at least 3.something May 14 14:25:22 not a lot ran 3 May 14 14:25:39 google never really released it, it was more of a demo on the xoom than anything else May 14 14:26:06 Meowser: Plus if he sets the minimum at 2.3.3 he will loose a lot of features. May 14 14:26:27 noahmg123: this is for a legacy app though, he has no features now... :p May 14 14:26:29 I had (have, in a cupboard) what I think is the only device to get an official upgrade from 2 to 3 May 14 14:26:52 I think I have a live wall paper that supports 2.3.3+ lol May 14 14:26:57 :) May 14 14:27:03 guys, what is the attribute to put space between element in a gridLayout? May 14 14:27:04 i cant beleive people use those still May 14 14:27:18 dragorn, there's like 2 or 3 generations of Samsung crap that had it May 14 14:27:20 live wallpapers? yeah, not a great success May 14 14:27:22 and never got updated May 14 14:27:35 horrizontal and vertical space right? May 14 14:27:38 * Mavrik actually got a support request. May 14 14:27:48 Is there a simple way to get the PID of the current foreground application? There is a ton of documentation and it's all very messy. It seems the best method is this: http://stackoverflow.com/questions/2166961/determining-the-current-foreground-application-from-a-background-task-or-service (ActivityManager.getRunningTasks(1).get(0).topActivity.getPackageName()) but that gives me the process name, not the PID May 14 14:27:51 in which gradle file do i need to set the android library etc.? May 14 14:27:54 i got 30k downloads, better than all of my other apps haha May 14 14:28:06 styler2go build.gradle May 14 14:28:21 i have the problem that it can't find any adrnoid stuff anymore May 14 14:29:03 hmm it seems liek it doesnt recognize java at all.. May 14 14:29:06 * noahmg123 /me May 14 14:29:12 styler2go: Just look at what Android Studio does for a blank project. May 14 14:29:54 https://db.tt/8c3qxEqu that's what it looks for me right now May 14 14:30:17 * wakelock /me /me /me May 14 14:30:23 all about me May 14 14:30:33 :) May 14 14:31:33 I know I ased this before but I just want to run one line of javascript in a webview, and then take the output of that and put it in a variable to use in the main java class. May 14 14:31:37 saked* May 14 14:31:41 asked* May 14 14:32:05 assed* May 14 14:32:15 Google "webview javascript interface". May 14 14:33:35 TacticalJoke: Yeah. I understand that's what I need. I just have not been able to find how to use it for this exact function. May 14 14:38:02 $MODULE_DIR$ where is this defined? May 14 14:39:50 noahmg123: I think you can simply pass the value as a parameter to the Android code. May 14 14:41:20 TacticalJoke: That's what I was thinking but again I am just starting out. How would I do that? May 14 14:41:42 I am googling in the background as have found nothing so far May 14 14:45:42 Gotta just read and experiment. Explaining something like this to someone could easily take five hours. May 14 14:48:14 OK May 14 14:50:02 FWIW, it's often a big time-saver to google relevant StackOverflow questions. May 14 14:55:16 ormlite can't find raw folder but it appears inside res folder May 14 14:55:25 any idea ? May 14 15:12:12 in a fragment container I see the layout of previus fragment May 14 15:12:16 how to avoid it? May 14 15:12:40 I'm using beginTransaction with the fragment and the id of the container May 14 15:13:26 You mean that the new fragment appears on top of the old one? May 14 15:13:40 yes May 14 15:13:51 is a fragment to manage a gridView May 14 15:14:00 I see the old grid under the new one May 14 15:14:01 :D May 14 15:14:42 you want to do something like replace(R.id.container, , ) on a transactoin May 14 15:14:42 Is the first Fragment declared in XML or added in Java code? May 14 15:15:09 yes codapet__ May 14 15:15:20 added in Java May 14 15:15:39 Hello. I'm trying to make a chat application, and I'm having trouble havin get two random people talk. My problem is not technical, is conceptual. Anybody got a couple of free minutes to discuss this matter? Thanks :) May 14 15:16:00 I think I've find the way May 14 15:16:52 done, thanks codapet__ :D May 14 15:17:03 icemanbp: no problem :) May 14 15:17:25 fragment is like a jungle May 14 15:20:40 raresian: what is the conceptual problem? don't ask to ask May 14 15:24:18 zerowaitstate: I'm having trouble getting two random people to talk (something like Omegle or chatroulette). My app uses Parse to create at runtime a UserID that is being stored in Parse. May 14 15:24:30 Can I make an Activity action bar title bolded? May 14 15:25:41 zerowaitstate: I want to make my app search for a possible partner that is searching aswell for a partner, and put them in contact (create a new conversation). May 14 15:25:45 eghdk: If you are using Toolbar you can definitely create a custom TextView within it and any custom font May 14 15:26:07 Is the toolbar taller than the actionbar? May 14 15:26:36 eghdk: Example - http://stackoverflow.com/questions/26533510/android-toolbar-center-title-and-custom-font May 14 15:27:10 My toolbars are the standard action-bar size. May 14 15:27:21 zerowaitstate: Let's say my app finds a possible partner (using a query to Parse's Users table). How do I make that partner know he was selected ? May 14 15:27:23 Though they can be any size you want. May 14 15:27:27 eghdk: Its the same. Toolbars provide more customization. May 14 15:27:36 raresian: push notification May 14 15:29:32 raresian: i would recommend not exposing waiting partner id's to the client app, though. May 14 15:29:59 raresian: the query should return a single response only May 14 15:30:26 Any recommendations on where to find people who can translate / localise my strings.xml ? May 14 15:30:43 loadUrl("javascript:alert(JSON.parse(document.getElementsByTagName('pre')[0].innerHTML).rows[0].elements[0].distance.value)") does not display an alert May 14 15:30:52 zerowaitstate: And if let's say there is no available partner for now and I want to wait for about 30 seconds for a possible partner to enter online, how shuld I do that? May 14 15:32:21 zerowaitstate: It would be a good idea to make a Service that will send a query, let's say every two seconds or so, to Parse to search again for a partner? May 14 15:32:27 raresian: create a backend service on the device that polls. otherwise, you could also use push notification to notify both sides of the convo May 14 15:32:52 raresian: polling drains the battery May 14 15:33:59 the magic of google's builtin push notification is that the notifications are timed to come along with other network traffic. i.e., network traffic is "packaged" together to occur in volleys. May 14 15:34:21 that limits the amount of time the radio is working and conserves battery power May 14 15:35:19 you can do your own independent polling, but the more you can aggregate network pulls, the better off you are May 14 15:35:55 I am trying to run a javascript alert and it does not work: loadUrl("javascript:alert(JSON.parse(document.getElementsByTagName('pre')[0].innerHTML).rows[0].elements[0].distance.value)") May 14 15:36:04 zerowaitstate: I'm sorry, what does polling mean ? Can you give a synonym please ? May 14 15:36:20 sending the same query over and over May 14 15:42:16 I am trying to run a javascript alert and it does not work: loadUrl("javascript:alert(JSON.parse(document.getElementsByTagName('pre')[0].innerHTML).rows[0].elements[0].distance.value)") May 14 15:42:55 Hello? May 14 15:45:45 is no one here? May 14 15:47:44 javascript :o May 14 15:47:54 no one cares about javascript May 14 15:47:55 Oh hi May 14 15:48:02 I do. May 14 15:48:02 #javascript May 14 15:48:37 No. It's a java problem. I load the exact same url on a desktop browser and it works. May 14 15:49:01 noahmg123_, still asking about the same thing? May 14 15:49:08 probably best to figure it out on your own at this point May 14 15:49:16 WebView.loadUrl doesn't take everything a web-browser address bar takes. May 14 15:49:19 It takes a URL. May 14 15:49:51 noahmg123_: What are you ultimately trying to achieve? May 14 15:50:03 TacticalJoke strange...i;ve seen people using the JavaScript protocol in loadUrl a lot May 14 15:50:12 Just a momwnt May 14 15:50:27 hi May 14 15:50:41 i am now on my computer May 14 15:51:14 http://i.imgur.com/UPjaaz7.png May 14 15:51:37 noahmg123 simplify it. does loadUrl("javascript:alert("test alert")); work? May 14 15:51:39 i will keep a bitmap buffer, but I hear controversy about it May 14 15:51:49 TacticalJoke: So what I am doing. Is loading a page with json in it. Running a javascript function to extract data from it and put it into a java variable. And then making a textview display the text May 14 15:51:50 and the job the gpu does, like caching itself May 14 15:51:55 kants: will try May 14 15:52:35 So you're using a WebView to download a page just to get some data from it? May 14 15:52:47 Instead of sending a request to an HTTP server yourself. May 14 15:53:55 zerowaitstate: How about using Parse Cloud Code? Do you think it would be a viable solution? Like let Parse do the searching and the pairing, and just send the two clients the partner's ID. May 14 15:54:08 Hello, how can i manually start/stop a notificationlistenerservice? May 14 15:55:44 TacticalJoke: yes. I saw the other method that someone gave me. I might use it. But as of right now this one is actually simpler and requires less code. May 14 15:56:15 It's hugely wasteful to use a WebView to download data. May 14 15:56:26 The smart move would be to use OkHttp or similar. May 14 15:56:45 -or similar May 14 15:56:49 :D May 14 15:57:03 I added that only as a disclaimer. Yeah, I don't know of anything that compares. May 14 15:57:09 hmm... ok. would I still be able to use JS to parse and extract the data from the JSON? May 14 15:57:11 noahmg123_, does it *have* to be so complicated? can't you just fetch the json some other way and parse it in java? May 14 15:57:19 noahmg123: You wouldn't need to use JavaScript. May 14 15:57:37 just seems ridiculously inefficient and overbloated May 14 15:57:52 matthias_, https://developer.android.com/reference/android/service/notification/NotificationListenerService.html inherits from service, startService and stopService ... May 14 15:58:04 TacticalJoke: Well I looked it up and the java way of extracting data from JSON is much more complicated and much less inuitive May 14 15:58:13 kants: did not work May 14 15:58:23 noahmg123: The Java way is the only sensible way. May 14 15:58:27 Anything else is ridiculous. May 14 15:58:28 noahmg123_, it is infinitely more efficient though May 14 15:58:35 The particular RxJava thing I am facing is driving me bonkers, mostly because of I'm pulling in things based on results from previous observables, and combining them into objects i get in the 2 part of the observable chain: http://pastie.org/10188839 May 14 15:58:48 adq: tried that. when i enable in settings, that my app can read the notification, the listener gets started automaticly May 14 15:59:05 TacticalJoke: will I still be able to use something similar like: rows[0].elements[0].distance.value? May 14 15:59:18 you won't know until you try May 14 15:59:24 either way, that is the way to go May 14 15:59:29 wakelock: btw I am noahmg123 the noahmg123_ is on my tablet. May 14 15:59:43 matthias_, is it the expected behavior? May 14 15:59:47 I'm guessing you'll instead be using something such as Gson to extra that value. May 14 15:59:47 eh, I reference whoever my tab-complete completes May 14 15:59:51 What is the page you're requesting? May 14 15:59:53 (and you did not express this concern in your question) May 14 15:59:56 anyone familiar with retrofit? May 14 16:00:01 i am May 14 16:00:08 das is gut :-) May 14 16:00:12 ventura, avoid unnecessary meta-questions May 14 16:00:19 TacticalJoke: http://maps.googleapis.com/maps/api/distancematrix/json?origins=" + city1 + "&destinations=" + city2 May 14 16:00:23 We need a bot for the meta-question thing. May 14 16:00:44 TacticalJoke: example: https://maps.googleapis.com/maps/api/distancematrix/json?origins=Riverview+FL&destinations=Valrico+FL May 14 16:01:18 that json seems absurdely trivial to parse May 14 16:01:29 adq: at the moment i have the workaround that the settingspage opens and lets the user check the box and closes automaticly again. i'm using enabling/disabling it to start/stop the service but it requieres user interaction. it would be better if i gain my app the permissions one time and then start/stop the notificationlistenerservice like a normal service May 14 16:01:44 JakeWharton, if you start a GET operation from an activity/fragment GET that takes too long to complete. during the download another applications comes to context (caller for example) May 14 16:02:08 noahmg123_: That is text. How would the JavaScript thing even have worked? May 14 16:02:11 anyone willing to give feedback on my math game? May 14 16:02:27 matthias_, still, is it the expected behavior (that the service is auto-started when you enable in settings your app to read notif)? May 14 16:02:30 if the download finishes, the caller activity is not in context. so the result is lost and the GET operation must be redone or retrofit is capable of keep the result until the activity returns? May 14 16:02:48 noahmg123, at this point I simply can't believe you would want to use a whole entire webview just to process *that* May 14 16:02:56 adq: no, it should not autostart. i want to strart/stop it manually May 14 16:04:02 wakelock: Well I am a beginner. I am sorry this has taken so long. Is there a way where I can get that JSON into a java string without the webview? May 14 16:04:06 noahmg123: Here is an example of a OkHttp get call that receives the response. http://square.github.io/okhttp/ May 14 16:04:16 codepet__: thx May 14 16:04:33 noahmg123, dude... you have *just* been told how May 14 16:04:48 wakelock: I sent that before he sent it to me May 14 16:04:49 beginner or not, surely you can read? May 14 16:04:54 oh May 14 16:04:59 well then read up May 14 16:05:07 wakelock: I will May 14 16:05:16 noahmg123, http://www.javacodegeeks.com/2013/08/getting-started-with-google-gson.html May 14 16:05:18 noahmg123: when you've got the response (like in the example response.body().string() ) you can just throw it into a JSONObject(response). Which will parse it up and you'll be be able to access your JSON values. May 14 16:05:36 using a webview for that is like launching Excel to calculate 5 - 2 May 14 16:06:11 wakelock: ok. I just did not know about okhttp. May 14 16:06:38 noahmg123, why don't you use android native api for google maps? May 14 16:06:59 noahmg123, you don't have to, even the most basic built-in java http functionality would probably do May 14 16:07:16 ventura, because that's an overkill too if this is all he needs May 14 16:07:33 plus, then you end up depending on having gmaps installed on target device May 14 16:07:44 ventura: that question really has little to do with Retrofit and more to do with application design May 14 16:07:47 ventura: I am just building a basic app just to build it. May 14 16:07:48 NAMES #android-dev May 14 16:08:24 noahmg123, it's hardly basic if you're willing to introduce complex components for trivial tasks :p May 14 16:08:35 ventura: Retrofit is not responsible for keeping the result. If you want to retain it you'll need to do that yourself in a DB or file or even just a field May 14 16:08:36 JakeWharton, i know. imho i would use a service May 14 16:08:57 wakelock: I did not know going in it would be complex. May 14 16:09:08 :P May 14 16:09:22 Interacting with HTTP servers is not simple. May 14 16:09:29 In fact, it's hugely complex (under the hood). May 14 16:09:38 for long term tasks i always use a service or intent service, and when the result is ready i notify the observer activity May 14 16:10:01 java has built-in functionality to simplify it enough for a simple one-shot request May 14 16:10:22 TacticalJoke: :P May 14 16:10:40 wakelock: and what would that be? I am sorry for asking so many questions. May 14 16:11:09 asking questions is not a problem, so long as you've done your googling and research prior to asking May 14 16:11:16 doesn't look like you have though May 14 16:11:29 He's been too busy using a WebView as an HTTP downloader. :D May 14 16:11:37 That takes time. May 14 16:12:00 Hello. I just made a 3 by 3 small resolution image grid which causes OutOfMemoryException. The images require ~62MB of RAM. How to fix this? May 14 16:12:02 I actually have a little bit. May 14 16:12:03 JakeWharton, i was working on a code that communicate with a RESTful server, but all functions calls were at the main thread. so i was wondering if retrofit have some internal mechanism that deals with paused activities May 14 16:12:17 Retrofit knows nothing about Android May 14 16:12:21 "a little bit" amounts to nothing really May 14 16:12:33 Yeah.. srry. May 14 16:12:37 or if this is a job to the developer (just like an explicit HTTPConnect inside a runnable or AsyncTask) May 14 16:13:37 retrofit moves these calls on a background thread in its own executor, though, doesn’t it? May 14 16:13:44 it does, yes May 14 16:13:50 jaana, yes May 14 16:14:07 I am looking it up now and the ones i've found require a lot of code. Surely this could be done in only a few lines right? May 14 16:14:26 no May 14 16:14:47 wakelock: why not? May 14 16:14:48 jaana, my point is "if the executor finishes and there is nobody to listen, where does the result go to?" May 14 16:15:02 It's not that verbose if you're using Call.enqueue. May 14 16:15:02 Please help: I just made a 3 by 3 small resolution image grid which causes „OutOfMemoryException„. The images require ONLY ~62MB of RAM. How to fix this? May 14 16:15:23 there is the "right" and the "wrong" way to do things. right way does not necessarily mean the smallest amount of code. May 14 16:15:24 The main niggle would be fighting the Activity life-cycle. May 14 16:15:48 ventura: It’s not going to crash, it’s going to call into code which will do nothing (or crash if you don’t test that you’re still attached to an activity) May 14 16:16:10 wakelock: not saying it's right to use les code. I'm saying this sounds simple enough to be done in a few lines of code. May 14 16:16:21 All it does is make a http call May 14 16:16:30 Is there a good inbuilt method to convert HTML to text in Android? I tried Html.from(), still get tags in the output. May 14 16:16:33 I wouldn't trivialize it *that* much though May 14 16:16:43 it's not that simple May 14 16:17:07 wakelock: well it was pretty trivial using the webview. I just could not extract the js May 14 16:17:11 you probably think it is because you've depoloyed a whole internal browser which did everything for you May 14 16:17:34 exactly, which while it seems "simple" is actually the "wrong" way to do it May 14 16:17:51 ok May 14 16:17:59 I will look nto it more May 14 16:18:36 Help???? May 14 16:18:37 find a good example that makes a http connection and fetches data, I'm sure there are tons of those available (doesn't even have to be android-specific, this is JAVA BUILT-IN FUNCTIONALITY, remember) May 14 16:18:38 barq: Why do you want to convert HTML to (some kind of) text? That's another hugely complex task. May 14 16:19:04 ppklomPolak, ? May 14 16:19:06 barq, no there isn't May 14 16:19:18 If you need a web browser, you can use WebView (funnily enough). May 14 16:19:27 It's like noahmg123 and barq are polar opposites. :D May 14 16:19:39 noahmg123: WebView is an expensive object to create to just grab JSON. Although it may seem simple on the surface (just a few lines) its a waste and just very hacky way to do it. Learn the proper way to do things and it'll benefit you in the end when you start making more complex apps. May 14 16:19:41 ppklomPolak, 62MB is probably too much. just because your device has several hundred megs of RAM doesn't mean your app gets whatever it wants May 14 16:19:56 codepet__: ok. thx. May 14 16:20:15 TacticalJoke: who is barq? May 14 16:20:25 A guy looking to convert HTML to "text". May 14 16:20:28 codepet__, nah, he'll just build an entire app out of dozens of webviews :D May 14 16:20:31 TacticalJoke: I want to take an HTML text and give the user the option of sharing, i.e. by mail. If I do that the text contains all sorts of rubbish. May 14 16:20:42 I.e. tags etc. May 14 16:20:57 Sharing what? May 14 16:20:59 I know that the heapsize is too small but is there any solution other than remove some of the images? May 14 16:21:01 wakelock: hehe May 14 16:21:06 wakelock, like Brazilian e-banking apps for android May 14 16:21:20 wakelock: hahaha-no May 14 16:21:22 TacticalJoke: Sharing the HTML contents. May 14 16:21:26 ppklomPolak, yes, use lower res images May 14 16:21:37 barq, you can try pushing your text into clipboard May 14 16:22:06 ventura 9 small resolution images need about 62MB. Iss there any way to not annoy the heapsizelimit other than remove some images? May 14 16:22:36 barq: What is the contents of the following?

Paragraph one.

Paragraph two.

May 14 16:22:42 * wakelock is now starting to think the easiest way to have a pushbutton that starts an action on android is to make it into a web form and deploy a webview :p May 14 16:22:48 wakelock ok I'll do that Ihf I have to but iss there a different way than shrinking them? May 14 16:23:41 Paragraph one \n\n Paragraph two \n foo.jpg May 14 16:23:52 ppklomPolak, I don't see the point of not shrinking them. when it comes to images you should always be conservative and load at most the res that can actually fit on the screen May 14 16:24:04 wakelock: ok that's enough. May 14 16:24:05 ppklomPolak: agreed May 14 16:24:25 ok thank you guys May 14 16:24:48 barq: That's so complicated, though. What about tables, divs, styles, etc.? May 14 16:24:56 HTML doesn't reduce to simple text that easily. May 14 16:25:15 noahmg123, but what other way is there to have a button in my UI? May 14 16:25:27 ok ok, I'm done May 14 16:25:30 wakelock: an onclicklistener May 14 16:25:42 and a buttonview May 14 16:25:45 Well, it's mostly simple HTML such as hyperlinks and special characters. So no need to account for complicated cases. May 14 16:25:49 I'm not stupid May 14 16:26:30 good to know May 14 16:26:49 wakelock: thank you May 14 16:27:13 service.getTimeline().map((timeline)-> [service.getTimelineItem(item.id).map((timelineItem) -> service.getTimelineItemLikes(timelineItem.id).map((likes) -> timelineItem.setLikes(likes); return timelineItem) for item in timeline]) May 14 16:27:56 Or is there a way to send the mail as HTML to get rid of the parsing effort? May 14 16:28:05 barq: I'm not sure. If it's a fixed and simple format, you may be able to use regexes. But the slightest complexity and this approach will break down. May 14 16:28:24 noahmg123, you have to understand though, your idea with the webview really was so ridiculous that you'll have to accept people teasing and making jokes, possibly for longer than you might like May 14 16:28:38 OK. I understand May 14 16:29:41 I am surprised this does not work: http://developer.android.com/reference/android/text/Html.html#fromHtml%28java.lang.String%29 May 14 16:29:51 email in html format is a whole other bag of crap May 14 16:30:07 barq: That returns some kind of spannable string, right? But I think you're wanting plain text. May 14 16:30:37 barq, I am not, for I know what it takes to do what you want, and I know it is so much more complicated than you want to admit May 14 16:31:03 different people have different preferences of how to convert a formatted text to unformatted May 14 16:31:21 not to mention different use cases May 14 16:31:31 Would an option be to send an HTML mail given the HTML text? May 14 16:34:33 What's the best way to merge a list of observables? May 14 16:35:07 Oh May 14 16:37:22 I'm solving how to crop the images appropriately for the screen… May 14 16:38:47 noahmg123: https://www.udacity.com/course/developing-android-apps--ud853 May 14 16:39:12 noahmg123: it is a good place to start learning android. May 14 16:39:31 ventura: thx May 14 16:42:35 ventura wakelock I have an idea how to not resize the images and make it work: I'm assuming that the images use ARGB_8888 format (do they?) so I need to remove transparency support ( -> RGB_888. ) This should make images take up 25% less RAM. May 14 16:42:57 What do You think? May 14 16:44:59 ppklomPolak: do you need the images with a high resolution? like, are you seeing all images at the same time on a 4K display where you can zoom in all of them? if not, just compress the images and only load the high definition version on demand May 14 16:45:35 ppklomPolak: again, this is how I would do this. i am not saying this is the right way May 14 16:46:06 ppklomPolak: take a look at http://square.github.io/picasso/ May 14 16:50:37 if you are already going to spend CPU time to remove the alpha channel, why not compress it instead? :-) May 14 16:51:35 ventura thanks. What I currently have is this (I don't understand) https://bpaste.net/show/73a55d85ba1a May 14 16:52:42 ppklomPolak: it looks like you are not compressing the image, just resizing it May 14 16:54:41 Services and Binding. Anyone have experience with them? I'm trying to nail down what this excerpt means exactly from Big nerd ranch. May 14 16:54:44 ventura do you mean by „resizing” that the edges are being cut off to lower the resolution? May 14 16:54:49 "This pattern looks exciting. It is the only place in Android that enables one Android component to directly talk to another. We do not recommend it, though. Since services are effectively singletons, using them this way provides no major benefits over just using a singleton instead." May 14 16:55:24 becasue to me compression is making the same file as before unchanged but smaller on disk May 14 16:57:59 ppklomPolak: http://android-coding.blogspot.com.br/2012/07/resize-bitmap-bitmapcreatescaledbitmap.html May 14 17:02:41 How difficult is GCM? is it "advanced users"? May 14 17:03:37 fun http://phandroid.com/2015/05/14/samsung-artik/ May 14 17:04:07 hi, whats the best way to produce a day 24 hour view like a list of events for an agenda? I have found some plugins that do that but none of them supports the addition of buttons to the event rectangle. May 14 17:04:32 Hi. Is there any way in the Android APIs to allow me to enter an audio "critical section" (i.e. No other audio on any channel can play while my audio is playing?) May 14 17:05:05 joshumax: shouldn't this be the ringtone? May 14 17:05:32 when your phone rings music etc. stops, doesn't it? or, at least gets more quite May 14 17:06:05 is that STREAM_RING? May 14 17:06:16 I thought other audio can pause STREAM_RING May 14 17:06:38 http://developer.android.com/reference/android/media/RingtoneManager.html May 14 17:07:44 Will this prevent other audio channels from taking precedence? May 14 17:08:03 i am not sure. May 14 17:08:06 (If any other audio plays while my app is running, everything will explode) May 14 17:09:46 As it works by sending fluctuating voltages out of the audio jack connector May 14 17:12:20 The best workaround I could think of is muting all of the audio channels except the one I'm using and soft-lock the volume controls May 14 17:12:27 ventura I'm still reading the links… Does it matter that the 9 images are in 3*3 grid? May 14 17:12:29 audiofocus transient exclusive? May 14 17:13:28 yes audiofocus is the key May 14 17:13:41 Ah, looks like what I need May 14 17:13:53 ppklomPolak: I'm working on an app that deals with images. If I don't use subsampling (the BitmapFactory.Options.inSampleSize thing) then I get OutOfMemoryErrors all over the place. May 14 17:14:01 The problem is that uncompressed images can be enormous. May 14 17:14:01 that said, i’m pretty sure that you aren’t guaranteed to get audio focus if you ask for it May 14 17:14:02 there are just some problematic cases with audiofocus, when two applications "fight" for getting the token May 14 17:14:29 TacticalJoke: are you using a library for dealing with said images? May 14 17:14:31 ppklomPolak: Picasso, Glide, etc. will do all this for you. May 14 17:14:34 I'm not, no. May 14 17:14:35 How difficult is GCM? is it "advanced users"? May 14 17:14:42 don’t reinvent the wheel as far as images go May 14 17:14:47 you have to handle, anyway, AUDIOFOCUS_GAIN, AUDIOFOCUS_LOSS, AUDIOFOCUS_LOSS_TRANSIENT and AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK May 14 17:14:50 someone else went through the hell of dealing with bitmaps May 14 17:15:00 adq: Thanks May 14 17:15:02 I needed stuff the big libraries didn't bring (such as HTTP-download progress). May 14 17:15:13 joshumax, this is really straight-forward May 14 17:15:32 I'll just make all the audio channels exclusive to my app May 14 17:15:38 Also, my use case is very specific. May 14 17:16:01 joshumax, in what kind of application are you using audiofocus? (just curious) May 14 17:16:34 It's, er, well, as I sometimes describe it, a unidirectional file transfer protocol over audio May 14 17:16:48 ahah nice May 14 17:16:58 It works quite well already.. May 14 17:17:18 But I was afraid of interference from other apps May 14 17:17:29 so a notification sound would cause you to get rekt May 14 17:17:30 (there were some crazy POC of malware propagating from speakers to mic i can recall, other than that encoding data in audio is a well known concept) May 14 17:18:42 adq: Yeah, it's not a new concept, but it all started when I had to install Wine on an old Ubuntu 8.04 laptop without a wireless card and without a USB cable to attach my phone to ;P May 14 17:18:57 joshumax, for your volume issue, maybe look at how ppl encode data in audio, if everything is raw PCM (signal is between -1 and +1 in float (or between -128 and 127 in short) May 14 17:19:21 so by using a square-like signal, you don't care about the volume May 14 17:19:31 you just need to detect bipolar or unipolar values May 14 17:19:37 That's basically what I use already May 14 17:19:42 great May 14 17:20:17 Well, thanks again adq! May 14 17:20:20 np May 14 17:20:25 <3 DSP May 14 17:29:22 hello May 14 17:29:26 pls download my app May 14 17:29:52 paulo_ sounds shady May 14 17:31:07 ppklomPolak: sorry, did not understand your question May 14 17:31:26 it's not on the play store. and excuse all the permission requests May 14 17:31:33 and if your phone reboots, it's a feature. May 14 17:32:10 g00s: http://pastebin.com/9gvhV6jN May 14 17:32:15 That actually works. :D May 14 17:32:42 lol May 14 17:34:14 wakelock: if the activity containing the WebView is paused during the page content download, the OS manages the worker thread and download keeps running. unless you explicitly calls webView.onPause, right? May 14 17:37:20 anyone willing to give feedback on my math game? May 14 17:37:38 Meowser: Jeez, Louise. Just post the link already. May 14 17:38:37 sent you PM May 14 17:38:51 How are other people going to be able to give feedback? :p May 14 17:39:11 https://play.google.com/store/apps/details?id=com.kylbit.game.canyoumath May 14 17:39:27 venturafk, no idea May 14 17:40:50 venturafk the 9 images are in a „1 row per 3 images”–grid so I don't know how to use picasso (or anything else) to resize the images to fit May 14 17:45:02 hm, so i've been thinking about this a little - wish i could find some experienced rxjava smarty; my design is mix mvvm / mvp; i'm finding it easier to use Subjects between view / presenter, and cold observables with strict onError semantics between presenter and model May 14 17:45:51 can i get an Listener itself inside it's events? i have the LocationListener and i want to use it inside the onLocationChanged() function... May 14 17:46:49 I am trying to make a HTTP GET call, but android studio is giving me all kinds of errors and getting rid of tem and running crashes the app May 14 17:49:58 Meowser: Nice game. Fun, good idea, etc. Meh @ ads, locking to one portrait (I don't like that portait on my tablet), and Back going to the main menu rather than the Play menu. May 14 17:50:08 Without ads I'd really like it. :D May 14 17:51:28 I am trying to make a HTTP GET call, but android studio is giving me all kinds of errors and getting rid of tem and running crashes the app May 14 17:52:12 them* May 14 17:52:13 Meowser: Though I just hate ads in general. I'm probably unlike most of your user base. May 14 17:52:26 noahmg123 : Obvsly nobody can help with such a vague description. May 14 17:53:09 TacticalJoke: OK., here is a specific one: one of the error is "finally" without "try" May 14 17:53:19 errors* May 14 17:53:28 That's basic syntax, which you you really need to know before doing Android programming. May 14 17:53:31 -you May 14 17:53:33 and it crashes when getting the input stream May 14 17:53:52 TacticalJoke: I am copying straight from android May 14 17:54:10 TacticalJoke: straight from the documentation May 14 17:55:07 Did you ever properly learn Java, noahmg123? May 14 17:55:57 TacticalJoke: Somewhat. I took an android developing course. I have never taken an extensive java course though. May 14 17:56:34 The Oracle Java-language tutorial looks good. May 14 17:57:04 If you're gonna dive into Android development, though, why not start with something simple? May 14 17:57:15 An app that communicates with a web server is not simple. May 14 17:58:10 TacticalJoke: Unfortunately I thought it was. May 14 17:58:44 noahmg123: Is this your very first Android app? May 14 17:59:00 he's still here? May 14 17:59:19 Odaym: came back after doing some stuff myself May 14 17:59:26 cool May 14 17:59:38 TacticalJoke: 3rd. After two I did through tutorials. May 14 18:00:36 TacticalJoke: I used the first code bock frome here: http://developer.android.com/reference/java/net/HttpURLConnection.html and got the "finally" without "try" error. May 14 18:00:43 block* May 14 18:01:06 Yeah, they're missing a brace. Weird. May 14 18:01:40 Oh. OK. May 14 18:01:42 noahmg123: just place a '}' before finally May 14 18:01:49 codepet__: thx May 14 18:02:00 I've been trying to crop images for grid for two hours… May 14 18:02:06 Help? May 14 18:02:08 noahmg123: Start with something simpler. Networking is not even remotely beginner friendly, regardless of what libraries someone is or isn't using. May 14 18:02:47 is using searchview recomended over just inflating with edittext as action view in toolbar for implementing search box (on click of menu icon) in actionbar/toolbar? May 14 18:03:03 depends on your designer :P May 14 18:04:07 … May 14 18:04:21 May 14 18:04:26 TacticalJoke: I think I will try to finish this, unless it takes way to long. While I am a beginner Android progammer, I am not a beginner computer user. I have worked with code a little bit so I understand the basics. May 14 18:04:33 ppklomPolak: You gotta ask really specific questions, featuring all the needed details, to get help. May 14 18:04:52 otherwise you get rekt May 14 18:04:55 hohoho May 14 18:06:15 TacticalJoke is rekking anyone in here i guess :D May 14 18:06:34 I'm trying to have 9 images in a grid – cropped instead of just centering them May 14 18:06:44 Picasso can do that May 14 18:06:48 Picaco May 14 18:06:59 Picasso too maybe May 14 18:07:01 how many lines are we allowed to post here w/o pastebin? May 14 18:07:05 0daym I've been toldd that three times here alreeady… I have no diea how since almost towwww hours May 14 18:07:14 give up May 14 18:07:16 one, noahmg123 May 14 18:07:17 you aint cut out for this May 14 18:07:27 we should make a Picasso parody called Picatto May 14 18:07:30 0daym not funny. I have to do this for work May 14 18:07:41 it loads cat images into everything you try to load an image into May 14 18:07:44 Picatto May 14 18:07:45 lol May 14 18:07:54 lol May 14 18:08:02 Odaym: stop being a jerk May 14 18:08:05 best app ever. just load random cat images into grids May 14 18:08:12 I know how he behaves noahmg123 May 14 18:08:19 I'm really frustrated now… :/ May 14 18:08:21 he doesnt want answers, just trolls like this May 14 18:08:26 we tried with him before May 14 18:08:32 with who? May 14 18:08:38 ah May 14 18:08:38 0daym Ii want answers you want troll apparently May 14 18:08:39 oh May 14 18:08:53 ppklomPolak: then ask more exactly May 14 18:08:54 ppklomPolak: Figuring out how to use Picasso shouldn't take too long. May 14 18:09:01 0daym FYFI I'm not trying oto load hi-res images ANYMORE May 14 18:09:10 you could have :) May 14 18:09:10 just low res May 14 18:09:14 but you didnt want to so you stopped May 14 18:09:17 now you have mediocre app May 14 18:09:26 while it was so easy to load any res image May 14 18:09:27 :) May 14 18:09:34 so can you please stop trolling about that May 14 18:10:03 ppklomPolak: Why are you not using Picasso/Glide? They nicely cover so many use cases. May 14 18:10:16 I wish I could shove the hi-res images in your face so you would stop writing about them May 14 18:10:32 at least I'd get high May 14 18:10:38 TacticalJoke I want to use them but I can't figure out how to use them May 14 18:10:50 dafuq May 14 18:10:54 see May 14 18:11:12 It's just a one-liner with Pica$$o (censoring so that JW stops getting pinged :D). May 14 18:11:13 TacticalJoke I want to use them but I can't figure out how to use them WITH picasso May 14 18:11:37 and you got hired May 14 18:11:39 or with anything else May 14 18:11:57 ppklomPolak: So create a new project, download a simple image, figure out how it works. May 14 18:12:05 Everything is just a case of breaking down complexity. May 14 18:12:30 I only care about using them in a grid May 14 18:12:41 not otherwise May 14 18:13:08 maybe you could break it down for me then since teh last 2 hours only broke my nose? May 14 18:13:11 OK what am I doing wrong here: (all variables are previously defined) http://pastebin.com/dw0nBUH2. After this I run something that includes getInputStream(). No matter how I use it it crashes the app. May 14 18:13:15 ppklomPolak: The main page shows exactly how to do it. Picasso.with(context).into() May 14 18:14:06 Ii really wass staring at thisss line Picasso.with(context).into() for several minutes but I still don'tt know how tto use it with my grid May 14 18:14:11 noahmg123: For one thing, didn't you spend like an hour figuring out how to understand stack traces earlier? May 14 18:14:38 For another, if you have to ask such questions then just forget networking apps for now. You need to get the basics down before doing something advanced. May 14 18:15:02 ppklomPolak: ion has tiling for displaying high res images May 14 18:15:07 ppklomPolak: Each square in your grid is an ImageView? May 14 18:15:25 he doesn't even have an adapter written yet May 14 18:15:31 TacticalJoke: OK. I still want to do this though. If you do not want to help me that is fine. And that is not an insult. May 14 18:15:32 talking to him about imageviews.. :P May 14 18:15:34 codepet_ I reeeally couldn't understand how to use „ Picasso.with(context).into()” with my grid May 14 18:15:40 ... aaah ok May 14 18:15:42 Oh, is ppklomPolak the Java-mail guy? May 14 18:15:54 ppklomPolak: in the adapter's getview May 14 18:15:58 he's the "I want to load my images into RAM for better performance" guy May 14 18:16:02 TacticalJoke: that's why he answer question bout pica$$o and r3tr0f1t so fast? XD May 14 18:16:52 noahmg123: this being called on the main thread? May 14 18:17:10 codepet__ „Each square in your grid is an ImageView?” It is a „CustomImageView extends ImageView” May 14 18:17:15 if you look at your stack trace you might see "NetworkOnMainThreadException" May 14 18:18:30 noahmg123: If you're gonna continue this bodacious adventure, please use OkHttp instead of HttpURLConnection. And use `okHttpClient.newCall(request).enqueue(whatever);`. May 14 18:18:31 please man, please May 14 18:18:41 lasserix_: it is on the main class (if that is what you mean). It is within an onclicklistener May 14 18:18:43 2 people cannot keep this channel all tied up all day over questions like these May 14 18:18:46 this is not normal May 14 18:20:12 just make this deal, google twice every question you have and enter 5 links everytime you google, open 5 results in tabs and read them, 10 tabs in total May 14 18:20:53 ask here about what the google query should say because that's the most difficult part May 14 18:21:23 it's like we're in stackoverflow without the rules May 14 18:21:45 I am sorry May 14 18:22:00 wut May 14 18:22:00 Closed as non-constructive. May 14 18:22:07 This is noahmg123 on my tablet May 14 18:22:11 and you have to sit here and listen May 14 18:22:16 cant downvote cant upvote cant say shit May 14 18:23:01 even I cant ask what I want! May 14 18:23:03 0daym CAN TROLL May 14 18:23:22 this is not for hand holding! May 14 18:23:31 Odaym just ask May 14 18:23:45 I'm not tryign to pull your hand. I've been already trrying for more than two hours May 14 18:24:04 you were not included in what I was saying actually, you are lost cause May 14 18:25:15 ppklomPolak: I think the only reasonable response would be for you to try Picasso and then, if you get stuck, show the code you're trying along with error details. May 14 18:25:23 Outside of that, I agree with Odaym. This is crazy stuff. May 14 18:25:35 for 2 days we been like this May 14 18:25:52 no more quality things to read or learn from May 14 18:26:13 it's stackoverflow that's made for hand holding May 14 18:26:27 one punch answers, done, you close tab May 14 18:28:03 I wanted to ask if anyone has used more than say 10 libraries in their project and has proguard enabled if they could share the proguard section of their build.gradle? May 14 18:28:35 noahmg123: when you are not allowed to make network calls on the main thread, classes can run on any thread, unless you explicitly start it on a different thread, it's on the main thread May 14 18:28:47 that is why it crashes May 14 18:28:57 I've already tracked down the needed configs for about 6 libraries but there are maybe 5 more that I cannot find what to say to proguard about and I cant afford to have their code exempted or removed of course May 14 18:28:59 put it into an async task doInBackground or Runnable and pass it to a thread May 14 18:29:43 ppklomPolak: I agree with what TacticalJoke and Odaym says. Picasso has many example for you to look at as well. https://github.com/square/picasso/tree/master/picasso-sample/src/main/java/com/example/picasso. SampleGridViewActivity and SampleGridViewAdapter should be similar to what you want. May 14 18:30:44 you can say it till tomorrow, the guy keeps repeating that he is unable and couldn't understand, it's a brick wall with him, he's just like that and he's been here for 2 days and treats various topics like this May 14 18:31:12 answers with uninformative and misleading ways also, like earlier today "if you have all classes public it will reduce problems" May 14 18:31:25 has anyone wired Sqlbrite up to a CursorAdapter? May 14 18:31:41 brite? May 14 18:31:55 Odaym: https://github.com/square/sqlbrite May 14 18:31:57 ohh May 14 18:32:52 i think you mean "ohh daym" May 14 18:33:01 lol May 14 18:33:05 ohh daym! May 14 18:33:18 JakeWharton whats next for sqlbrite ? May 14 18:33:19 is this like what I hear about in .NET about wiring input to DB? May 14 18:33:22 which we don't have? May 14 18:33:32 g00s: ignoring it and working on other pressing problems May 14 18:33:36 lol May 14 18:33:44 probably object mappers May 14 18:34:16 the count object in the example could be used as parameter for setText in a field, you update and the UI will update May 14 18:34:25 that's the one I meant, this is it May 14 18:35:21 JakeWharton: I'm setting a subscription in my presenter with Sqlbrite.Query Observable that passes the cursor to my view, which does a changeCursor() on the CursorAdapter. Does this sound correct? May 14 18:35:23 nah it won't, that's crazy talk May 14 18:35:27 you have to call .get again May 14 18:37:31 I like this implementation, it's more manly than what ORM's do May 14 18:37:48 Odaym: Hibernate has ruined me on ORMs I think May 14 18:38:16 Hibernate is like heaven for the .NET people, with NHibernate May 14 18:38:22 this is what I used to hear from others May 14 18:39:33 Odaym: I used to be so pro ORM, I've since changed my tune. Just an Object Mapper like Jake mentioned, and maybe a less messy way of writing the sql in code. Tired of working around the ORM. May 14 18:40:14 I'm trying to think of how this can save us from notifying UI things that their data has changed May 14 18:40:16 lol May 14 18:40:23 you can't right? May 14 18:40:29 Odaym: Have you done any RxJava? May 14 18:40:39 Hai, groxx. Did you figure out that thing? (I was gonna test it but forgot, and I'm too lazy to test it if you've already figured it out. :D) May 14 18:40:54 no but everybody is talking about that and I have a friend pushing me to do this May 14 18:41:00 hmm guys.. i have a strange problem. i have an setOnItemLongClickListener and it will show an AlertDialog.Builder. but when i longpress it it will still fire the setOnItemClickListener too, not onlty the longclick May 14 18:41:06 I dont understand what it is yet May 14 18:41:15 TacticalJoke: just a repro and a workaround, I don't know the cause (as in, I can't point to the spec or how the VM works to say it's right or wrong) May 14 18:41:20 theblang: yewp May 14 18:41:21 -w May 14 18:41:22 Ah, okay. May 14 18:41:36 Odaym: I've recently dove into it, along with MVP. It freaking incredible, but yeah, has quite a learning curve at first. Definitely check out Dan Lew's Grokking Java series, as well as the Fragmented podcast on Rx. May 14 18:42:06 because I mean that's what we do with code already, we wait for things to happen and then do other things.. May 14 18:42:09 we already react.. May 14 18:42:16 Odaym: it is insane what you can do with it, RxAndroid, and Square's Retrofit and Sqlbrite. Like one freaking block of code to query your server and store it in the database. May 14 18:42:54 this is what I was using to understand it https://github.com/baconjs/bacon.js/wiki/Diagrams May 14 18:43:11 and I couldn't understand the diagram how it differed from what I can achieve in what I write everyday May 14 18:43:34 Odaym: Check this series out http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/ May 14 18:43:43 oh my.. a simple return true fixes it already May 14 18:44:08 styler2go, return true means you've got that listener handled, meaning dont let it get handled by the system May 14 18:44:18 meaning shut it off May 14 18:44:28 meaning it won't fire the itemclick May 14 18:44:33 yea May 14 18:44:43 i had return false for some reason :D May 14 18:44:45 Could someone help me figure why I cannot see my application top bar and menu please ? May 14 18:44:48 well no, meaning it wont behave as its own way when it knows this is an itemClick May 14 18:44:54 it will run whatever code you have before the true May 14 18:44:58 the code is liek 4 years old.. no idea what i did so many years ago xD May 14 18:45:08 your OWN way of doing it, but there is no escape from triggering it by SOMEONE, it's just a matter of who handles what happens May 14 18:45:23 theblang, Odaym: in MVP, do you need a presenter if you are using a content provider? because all data that comes from the model is automatically presented by the cursor adapter, right? May 14 18:45:44 sure of course May 14 18:47:01 ah, functional reactive? yet another keyword? May 14 18:47:09 I'm still trying! May 14 18:47:11 cause I know functional no problem :P May 14 18:47:47 ircfox check your theme May 14 18:48:00 that's like Otto May 14 18:48:07 lasserix_: on Manifest? May 14 18:48:08 subscribers and "emitters" May 14 18:48:09 ez May 14 18:48:15 in styles May 14 18:50:23 Odaym: i don't see a situation where it is required. it seems like the fragment would act like the presenter, and only would explicitly invoke things not related to load content (navigation flow, etc) May 14 18:50:25 ventura: I don't use ContentProviders May 14 18:50:49 groxx: I seem to be getting the same behaviour on my device (the non-synchronized method blocks as if it's synchronized). I don't, however, get this blocking if I use synchronized statements (with my own lock) instead of synchronized methods. May 14 18:50:56 groxx: The JLS says "For each class or interface C, there is a unique initialization lock LC. The mapping from C to LC is left to the discretion of the Java Virtual Machine implementation". May 14 18:51:00 theblang: why not? May 14 18:51:10 Maybe Android locks the class. May 14 18:51:28 ventura, I thought you were asking me that question because you were leading to talk about something concerning RxJava..so I went along to wait for the idea May 14 18:51:33 I didnt think you were asking to know May 14 18:52:13 I dont use ContentProviders, and theblang that's a really nice article it's easy to get what it does, it definitely is much much more clean that what we have to do to fulfil these eventful situations May 14 18:52:22 like hand-rolled listeners, for anything May 14 18:52:42 TacticalJoke: that seems to imply that class X could block while class Y initializes, not the behavior we're seeing May 14 18:53:07 TacticalJoke: synchronized(TheClass.class) solves it? I haven't tried much yet May 14 18:53:42 I would assume a `static final Object lock; synchronized(lock)` would fix it, but I haven't tried that either May 14 18:54:07 Locking on Foo.class doesn't fix it. Same problem here. May 14 18:54:19 But locking on my own private static lock does prevent the blocking of the non-sync method. May 14 18:54:30 Yeah. May 14 18:56:40 It seems that this is happening: lock (Foo.class) --> init --> call sync method --> unlock (Foo.class) --> call non-sync method May 14 18:57:28 Well, like that but a bit more complicated. May 14 18:58:53 says more: "The mapping from C to LC is left to the discretion of the Java Virtual Machine implementation. For example, LC could be the Class object for C, or the monitor associated with that Class object." May 14 18:59:35 I was just about to say that I was rethinking my interpretation, and was about to describe that exact thing :| May 14 18:59:50 should 5-star my own app? May 14 18:59:52 Odaym: Oh yeah. And the fact that libraries like Retrofit and Sqlbrite can return Rx Observables out of the box is awesome. May 14 18:59:54 literally typing it out when you pasted that. thanks for finding it though :) May 14 19:00:47 lol paulo_ you can May 14 19:01:42 TacticalJoke: I'll read that whole file, though superficially it doesn't seem like this describes "after initialization, lock still used like an initialization-lock" May 14 19:01:54 With my own private lock, the only block I get is from the init method (I have `Thread.sleep(1000);`). May 14 19:02:08 i.e. the fact that it's reusing the object shouldn't influence the behavior, which is why it's left up to the implementers May 14 19:02:34 s/init method/static initializer/ May 14 19:03:49 TacticalJoke: thanks for the feedback, when you say "back going to the main menu rahter than the play menu May 14 19:03:52 what do you mean May 14 19:04:40 From the game itself. If I press Back, I think I'd expect it to go to the sub-menu rather than the first menu. May 14 19:04:55 ah ok May 14 19:05:03 what about the colors? May 14 19:05:43 ads are annoying, but would you pay for the game? i doubt most people would :\ May 14 19:05:55 TacticalJoke: 5.5.10 seems to imply that post-init the lock is released and all threads are notified, which seems like it should let the non-synchronized method through (with some fuzz factor because threads) May 14 19:06:36 Meowser, value May 14 19:06:42 must provide value for money May 14 19:06:42 groxx: Yeah, that's the part I'm not sure about. :D May 14 19:06:48 same :| May 14 19:07:07 Meowser: The colours are good. Do you think it'd make sense for the rows that move down to have their own background colours? May 14 19:07:10 To delineate the rows more. May 14 19:07:20 Odaym: the value is the entertainment May 14 19:07:35 that's what it should be yes, but is it there :P May 14 19:07:41 instantly you can answer if they would pay or not May 14 19:07:48 well no you cant instantly answer, no May 14 19:07:53 I dont know May 14 19:07:54 TacticalJoke: we are looking into improving their clearity, maybe making the equation that needs to be answered bold May 14 19:07:57 I had to change the class from Activity to ActionBarActivity in order to be able to show the top bar. I also copy/paste the values from styles from a project extending Activity and showing the menu and it didn't solve the problem. May 14 19:08:18 maybe white text on colored background.. May 14 19:08:36 Odaym: i think most people will pass up a game if it is $1 May 14 19:08:45 Yeah, white text could be good. May 14 19:08:46 TacticalJoke: maybe I'll try it on a desktop jvm today too. though either way, either that part is unclear / actually unspecified, or someone's doing something wrong (even if it's everyone, because the spec exists) May 14 19:08:52 I don't think it's a problem; just thinking out loud. May 14 19:08:55 you need to take these decisions based on data May 14 19:09:01 not on what you guys think or heard or feel May 14 19:09:03 really May 14 19:09:06 I tried on the JVM last night and couldn't reproduce. May 14 19:09:11 Though I was tired and maybe doing it wrong. May 14 19:09:12 I suppose we could make two versions, one pay without ads, one free with May 14 19:09:21 or there's something elsewhere with synchronization and notify and whatnot that allows it. hooray definition synergies. May 14 19:09:30 Odaym: it is difficult to get that feedback though, so it is a lot of thinking and feeling May 14 19:09:30 Note that my device is running 4.1. May 14 19:09:32 is that common for games? isnt it for business apps more? May 14 19:09:42 For another data point. May 14 19:09:44 games have in-app purchases as the defacto model I think May 14 19:09:56 TacticalJoke: ah, great. thanks May 14 19:09:59 Odaym is right, and data shows in-app billing (freemium) is best model for revenue May 14 19:10:07 Odaym: we also thought about putting in the option to buy passes May 14 19:10:19 TacticalJoke: would you buy a pass? May 14 19:10:30 or a bundle of passes, 30.. May 14 19:10:45 you cant expect to hit with the first app/game man May 14 19:10:51 look at Developer Stories, see the one about Talking Tom May 14 19:10:59 8 apps before Talking Tom came out May 14 19:11:01 also educational games should be free and adless, imho :) May 14 19:11:06 they LEARNED what they need to do May 14 19:11:17 thats what im trying to do May 14 19:11:21 get feedback, make it better May 14 19:11:26 so make it stock full of analytics May 14 19:11:28 Sorry, what's a pass? And how much are we talking? May 14 19:11:36 To be honest, I don't download or buy anything on Android. :D May 14 19:11:38 Not anymore, anyway. May 14 19:11:41 then you can say "people love this, they hate that" May 14 19:11:43 no argument May 14 19:11:56 when you give a wrong answer, you have the option to use a pass and continue playing at your current score May 14 19:12:07 you can use the consensus feedback, grabbing your own data on this is like a drop in an ocean of feedback May 14 19:12:07 Oh. Hmm, I'd have to play more to be sure. May 14 19:12:08 now, players have to earn passes May 14 19:12:21 we thought about letting players buy them May 14 19:12:28 * wakelock thinks people love apps with ads May 14 19:12:32 don't ask for proof though May 14 19:12:38 lol May 14 19:12:51 Meowser: fwiw direct feedback isn't always (or even frequently?) the best source. only a teeny tiny subset of users (who all share this personality quirk) will ever provide it, which isn't necessarily a) a valuable subset, or b) the one you're interested in. May 14 19:13:09 I know, but we havent gotten any feedback May 14 19:13:09 Meowser: it's still (very!) valuable, but there's heavy bias May 14 19:13:12 Yeah, my feedback might represent very few people (perhaps a small set of nerds). May 14 19:13:26 don't monetize maths May 14 19:13:28 that's why you have to talk to all of them May 14 19:13:29 it's my feedback :) May 14 19:13:30 lol May 14 19:13:41 shame on you for that May 14 19:13:43 haha May 14 19:13:43 that's what Y Combinator and all of those hot shots say, you have to talk to all your users all the time May 14 19:13:45 it should be free and universal May 14 19:13:52 I think you can post to /r/androidapps. May 14 19:13:55 but you can sell a fart app May 14 19:13:58 i have nothing against that concept May 14 19:14:05 I think you have to say you're the dev, though. May 14 19:14:11 Can't remember whether you can post to /r/android (probably). May 14 19:14:22 I think we posted there but someone didnt like something about the post May 14 19:14:30 adq, good luck with that, I give my gas away for free :p May 14 19:14:33 ill check again May 14 19:14:37 reddit is not so bad for self promoting, at least it showed few peaks each time i did a post or so for android wear stuff May 14 19:14:59 on the contrary, even an article on androidpolice doesn't help much May 14 19:14:59 I'll post once we make an update May 14 19:15:03 it creates a one-day peak May 14 19:15:09 and pschiiiittt after May 14 19:15:13 "hero for a day" May 14 19:15:22 but i think it's specific to android wear May 14 19:15:27 ^ yeah, post it to some forums, at least then you'll get "crashes on X" at worst. and set up crash logging and analytics stuff if you can, because it's a way of "talk[ing] to all of them", and in a (relatively) unbiased way May 14 19:15:31 by the way Meowser, the situation where you ask the user to buy a pass is when they lose, it sort of means "would you like to pay to fake your way out of this or do you want to remain in your ditch?" May 14 19:15:57 Maybe call the app "Prank Gone Wrong Gone Sexual Math Game" and you'll get loads of downloads. May 14 19:16:14 lol May 14 19:16:25 strip math? May 14 19:16:35 call the app like this and you see "Prank Gone W..." May 14 19:16:37 Or something like "Taylor Swift Bikini Challenge". May 14 19:16:40 sexy free strip math. May 14 19:16:44 for android May 14 19:16:52 what is this app? May 14 19:16:57 whats it actually do May 14 19:17:02 well.. May 14 19:17:05 drose379: https://play.google.com/store/apps/details?id=com.kylbit.game.canyoumath May 14 19:17:11 there's Taylor Swift right May 14 19:17:22 numbers......you getting where Im going? May 14 19:17:24 Odaym, yes, and you have to count how many bikinis she's wearing May 14 19:17:42 (sssh but, still consedering making this slapapp, whatslap app :p) May 14 19:17:47 consid* May 14 19:18:04 Ive been dreaming about making the proper and long-awaited Agar.io clone May 14 19:18:10 just been busy elsewhere! May 14 19:18:21 you have the strangest dreams May 14 19:18:22 I even got into libgdx and everything May 14 19:18:25 people want that shit man! May 14 19:18:31 agar is amazing May 14 19:18:59 all the clones that are coming out are webviews that are being taken off next day or get 9000 1-stars May 14 19:19:27 * groxx waits for Agar.io to load, and wonders "wtf, petri dishes?" May 14 19:19:38 instaddiction, try it May 14 19:19:47 apparently the idea's been around for a long time May 14 19:19:47 lol May 14 19:19:52 but this guy..I dont know May 14 19:19:54 hosted it well May 14 19:19:54 fun game indeed May 14 19:19:57 lol http://cl.ly/image/3C0A212C022S May 14 19:20:02 and no mobile version! May 14 19:20:11 latency is problematic May 14 19:20:16 yes May 14 19:20:21 wait till you get really big May 14 19:20:22 * wakelock has never heard of it until now, loaded it, then closed the tab May 14 19:20:29 it's currently offline anyway May 14 19:20:31 unplayable May 14 19:21:28 i'm playing it a bit May 14 19:21:38 wouldn't you play on mobile? May 14 19:21:40 60 fps May 14 19:21:46 man, I wish I could do something like that May 14 19:22:05 right now I have a caveman and a dinosaur only May 14 19:22:20 you can move the caveman with your finger and detect collision on the dino May 14 19:22:23 CLOSE ENOUGH! May 14 19:24:28 wow it's a finite world May 14 19:24:31 i reach a border May 14 19:24:35 no there's bounds May 14 19:24:40 invisible May 14 19:25:13 when it first came out on HN there was no servers to choose from, but then it grew so much May 14 19:25:19 I think 2 weeks ago this happened May 14 19:25:34 I'm still trying!!! May 14 19:25:35 and just discover that "space" can clone your own cell May 14 19:25:38 man it's awesome May 14 19:25:47 yea you discover that when they eat you May 14 19:25:47 haha May 14 19:25:56 and you're just strolling around thinking he's too slow to catch up May 14 19:26:03 ahah May 14 19:32:15 Odaym: rxmarbles.com is better than that baconjs wiki May 14 19:32:24 groxx: This happens here only if the sync method is called first. Otherwise, the non-sync method doesn't block (other than the static initializer sleep thing). May 14 19:32:36 http://pastie.org/10189174 how would you do this? is there some easier or smaller way to do this? May 14 19:32:40 It's hard to make sense of in light of what the JLS says. Grr. May 14 19:32:40 alright I'll check that May 14 19:32:55 you can click on the things and move them! May 14 19:33:04 yea I saw, real nice May 14 19:33:20 switch padding-top doesn't do anything? May 14 19:33:30 almost 4 hours ..! May 14 19:34:22 TacticalJoke: kinda. not unambiguously though :\ May 14 19:34:27 wow, padding doesn't work on switches :/ May 14 19:34:28 wtf May 14 19:34:37 http://pastie.org/10189174 is there some easier or smaller way to do this? May 14 19:34:40 I hate not understanding stuff. Drives me insane. May 14 19:34:46 Even stuff I'll never care about. May 14 19:34:50 I'll still do a bug report, I think. it's undesirable regardless. May 14 19:34:57 Yeah, it's a bit weird. May 14 19:35:09 agar io is multiplayer osmosis May 14 19:35:21 might be fixed in android 6.0, which means we can target it in 2020 ;_; May 14 19:36:14 android wil probably be ddead by then May 14 19:36:31 ppklomPolak: nah, it'll just have mutated into skynet May 14 19:36:33 Unless it gets new management May 14 19:36:35 in 4 years? May 14 19:36:46 new management: ITSELF DX May 14 19:36:46 that's less than half of how long it has been around May 14 19:36:57 Could the following be happening? lock (class) --> notify waiting threads --> thread that shouldn't block springs to life --> lock isn't released yet --> unlock (class) --> sync method takes lock. May 14 19:37:15 Then later that lock is released and finally the non-blocking method runs. May 14 19:37:18 It either transforms into aa very different OS or it dies out May 14 19:37:25 anyone? can i somehow make this code smaller? http://pastebin.com/PpyXsppw May 14 19:37:37 non-blocking method shouldn't be affected by the sync method taking the lock though May 14 19:37:46 s/block/synchroniz/ May 14 19:38:02 my cat is using me as a climbing tree May 14 19:38:13 styler2go: @OnClick({R.id.button1, R.id.button2, R.id.button3, R.id.buton4}) void onButtonClick(View v) { purchase(v); } May 14 19:38:16 styler2go maybe using a „for” to have the same code but the values incremented May 14 19:38:22 But couldn't it still be locked on the init thing? May 14 19:38:27 with http://jakewharton.github.io/butterknife/ May 14 19:38:48 otherwise, create the listener once, store it in a local, and set it on all four views May 14 19:39:10 BAM May 14 19:39:15 you've just been solutioned May 14 19:39:19 oh yeah good idea JakeWharton May 14 19:39:25 anyone have a clue why setting an onclick listener on xml items I have do not work at all, not sure what is wrong May 14 19:39:32 Im parsing 3 csv files from the internet and displaying notification based on content. All this runs in background thru a service. My question is, should i split the three parses as per the time whn they should be updated? May 14 19:39:39 probably not passing the method a View, Lonesoldier728 May 14 19:40:38 Because one of them is updated every hour, and the other two need not be updated that often. May 14 19:40:42 On an Android Instrumentation Test, how can I count the number of elements in a Spinner, or if not possible, maybe select every item and check the value of it? May 14 19:40:57 I want to check that the data was associated with the Spinner. May 14 19:41:13 Sambarboz: assertj-android might have matchers for that May 14 19:41:30 TacticalJoke: since 5.5.10 says "... release LC, and complete this procedure normally.", I still interpret it as "no, it shouldn't be blocked on the init" May 14 19:41:31 What will be more preferable? May 14 19:41:36 This is what I mean: static init --> lock (class) --> notifyAll --> non-sync method still locked out --> unlock (class) --> sync method lucky enough to take lock --> sync method unlocks --> non-sync method finally gets going May 14 19:41:38 Those are custom matchers that can be used along with Espresso? May 14 19:41:44 The first option. May 14 19:42:07 TacticalJoke: lock(class) doesn't block non-synchronized methods though May 14 19:42:08 yep, just make sure you use androidTestCompile for it in your gradle May 14 19:42:29 I've been using assertj-android just fine in espresso tests May 14 19:42:30 so "still locked out" can't happen, in theory May 14 19:42:39 shekibobo: Thanks a lot, I will try. May 14 19:43:29 I guess I'm thinking the non-sync method is blocking simply because of the synchronized static-init thing. May 14 19:43:39 I am Odaym got to figure it out May 14 19:43:52 And the shared lock means that it just doesn't get going until after the sync methods (unless it gets lucky). May 14 19:43:54 what was it May 14 19:44:28 The problem being that the lock is too broad. It's synchronizing everything: static init and synchronized methods. May 14 19:44:39 In any case, it seems likely that private locks solve the problem. :D May 14 19:45:41 TacticalJoke: yeah. pfn mentioned "coalescing the init lock", which would describe that. but I'm still at "is this to spec, or not?" :) May 14 19:45:50 Right. May 14 19:45:54 ..! May 14 19:46:44 when you are alone in the project and you commit more than 20 files with 1 commit message http://media.giphy.com/media/U0pUd5JFBET1S/giphy.gif May 14 19:46:50 OK. I dithed the networing app. Now I have one with a simple textedit. Unfortunately it cannot be edited May 14 19:47:07 oops May 14 19:47:07 noahmg123: Congrats. May 14 19:47:11 nevermind May 14 19:47:18 I had set it to number May 14 19:47:23 groxx: Lemme know if you file the bug. :D May 14 19:48:05 TacticalJoke: will do :) May 14 19:48:42 is there a way to keep SlidingPaneLayout collapsed even when there is enough room for both? May 14 19:50:07 for example, left = 100 dp, right = 300 dp, screen = 600dp - but i just want the right pane unless its wiped to reveal the left one May 14 19:50:54 * g00s wonders if anyone even uses SlidingPaneLayout, i hardly ever see it May 14 19:51:48 TIL: SlidingPaneLayout is a thing in the SDK May 14 19:52:35 oh wait, support lib May 14 19:54:00 should have never been a public class May 14 19:54:17 too icky? May 14 19:54:44 too specialized May 14 19:55:07 at least it's in the support lib, not the core SDK. May 14 19:55:48 it seems like a good idea for responsive design, but seems to conflict in concept with nav drawer May 14 19:56:25 ok so for 4 hours I've been trying to solve how to use picasso with this: https://bpaste.net/show/f25740dc5c7e May 14 19:56:37 well, they are meant for different things, but if you want to use them together its weird May 14 19:57:16 g00s was that to me? May 14 19:57:29 ppklomPolak no May 14 19:57:40 :/ I need help May 14 20:00:44 Hey all - inherited a project: Can anyone think of a reason why my libs keep getting deleted after I build? May 14 20:00:59 Not all of them - just new ones I add May 14 20:01:46 What do you mean by 'deleted'? And which IDE are you using? May 14 20:03:09 Android Studio. And I mean they're actually removed from disk. I'm wondering if there's something clearing out all unlisted libraries - but haven't found any references to the existing ones yet May 14 20:06:26 I think it's my Android.mk file removing them; but haven't found an explicit reason to believe so yet May 14 20:06:38 But found references to two of the three libraries in there. May 14 20:07:29 TacticalJoke https://bpaste.net/show/f25740dc5c7e May 14 20:08:53 I don't know what that is. May 14 20:11:42 Yeah - think I got it. Just had to add my new library filename in there. Android.mk is for applications that use the NDK May 14 20:13:09 anyone help https://bpaste.net/show/f25740dc5c7e May 14 20:13:40 Tacticaljoke that is my code thaat I'm supposed to use picasso with May 14 20:13:48 TacticalJoke that is my code thaat I'm supposed to use picasso with May 14 20:13:55 ppklomPolak: Be more specific May 14 20:14:06 tjbiddle ok May 14 20:14:11 What's not working, what errors are you receiving, etc May 14 20:14:25 tjbiddle ok please wait May 14 20:14:40 is there anything wrong with using LocalBroadcasts? I'm wondering why such a useful feature is in the v4 support package May 14 20:14:55 tjbiddle I need to have 9 images in a 3 by 3 grid but I get OutOfMemoryException. May 14 20:14:59 because support is better than in framework May 14 20:15:09 using support-v4 is basically a requirement for every android app May 14 20:15:15 it is android version agnostic May 14 20:15:24 pfn, ah ok May 14 20:15:39 tjbiddle I need to have 9 images in a 3 by 3 grid but I get OutOfMemoryException. I've been told many times here to use picasso. The problem iss that for the laast four hours I couldn;t figure out how. May 14 20:15:50 use .fit() in picasso May 14 20:15:52 Hi, I'm trying to get a crop control, just for picking which part of the image inside the imageview I'm going to work with... May 14 20:15:58 is this what I'm looking for? May 14 20:16:00 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); May 14 20:16:39 JacobTabak thanks. I don't know where to put any picasso code. Please see https://bpaste.net/show/f25740dc5c7e May 14 20:17:59 I have many Item s and have no idea how to use picasso with them May 14 20:18:04 in getView() replace `picture.setImageResource(item.drawableId)` with `Picasso.with(Gallery.this).load(item.drawableId).fit().into(picture)` May 14 20:18:23 or Picasso.from() May 14 20:18:29 can't remember if its with or from May 14 20:22:51 what control should I use for picking an area of an image? May 14 20:24:19 JacobTabak I'm tryign to see if thsi workks I just need to include Picasso in Android Studio again… May 14 20:24:31 it'll work May 14 20:25:03 I hope so :D May 14 20:27:08 what does thast mean? Service Intent must be explicit: Intent May 14 20:27:17 and dont tell me that the service must be explicit :D May 14 20:27:45 styler2go: an explicit intent is one that has a package and component name specified May 14 20:27:47 sign it in your manifest May 14 20:28:12 refer to it by class or not May 14 20:28:33 ie are you firing off a broadcast to start it or just explicitly starting by class name? May 14 20:29:49 JacobTabak Thank You! it works! :D You are so amazing! it took me so much time and stress and You kenew it instantly! May 14 20:30:18 :D May 14 20:30:38 no problemo May 14 20:30:56 do you know why it didnt work May 14 20:30:58 I'm so happy right now May 14 20:30:59 when you tried it your way? May 14 20:32:13 JaocbTabak I don't even understand yet how it all coworks together enough to know more than a loose idea of what I should change May 14 20:32:35 But I've learned a lot by doing May 14 20:32:46 uncompressed bitmaps take a huge amount of memory. When you use `fit()`, Picasso waits until the view is measured and then uses BitmapFactory.Options.inSampleSize to sample down the image before loading it into memory. Your way was loading the entire bitmap into memory. May 14 20:33:00 JesusFreke: can you explain more? May 14 20:33:40 bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"), mServiceConn, Context.BIND_AUTO_CREATE); May 14 20:33:42 thats the code May 14 20:34:03 styler2go: right, that's an implicit intent May 14 20:34:12 because you're not specifying the component name May 14 20:34:18 JacobTabak that is a good approach. My original approach was to crop off what wouldn't fit in the space allocated by the grid May 14 20:34:56 But I've been told many times that I need picasso so I was trying hard to make it work with it May 14 20:35:05 JesusFreke: so what do i change? May 14 20:35:09 styler2go: either use the Intent(Context, Class) or Intent(String, Uri, Context, Class) constructor, or use setComponent() May 14 20:35:17 ppklomPolak you definitely don't *need* picasso May 14 20:35:18 ok May 14 20:35:26 you could use BitmapFacotry to load a scaled down bitmap without Picasso May 14 20:36:00 styler2go: http://developer.android.com/guide/components/intents-filters.html#ExampleExplicit May 14 20:36:57 JacobTabak I was already reading about that but I was ignoring it because I doubted that it could be used for that while at the same time I was being encouraged to use Picasso May 14 20:37:19 It's fine to use Picasso but you should have an understanding of what its doing behind the scenes. And you could do it yourself in 3 lines of code May 14 20:37:36 well, probably more than 3. like 15 to do it right. May 14 20:37:40 well.. except you'd be doing bitmap decoding on the main thread May 14 20:37:40 I wish I could May 14 20:37:43 but certainly reasonable May 14 20:37:57 thanks, JesusFreke May 14 20:38:04 I'm not saying he shouldn't use Picasso. I'm just saying he should build a foundation and understand what it's doing and why it works and his way didn't May 14 20:38:13 indeed May 14 20:38:54 I agree with You JacobTabak. I should understand it and I hope one day II will. May 14 20:39:19 as long as you understand that bitmaps are big and need to be scaled down before they're displayed, you're in good shape ofr now May 14 20:39:23 :) May 14 20:39:41 hehe I understood that since OutOdMemoryExxception appeared May 14 20:39:53 JesusFreke: ah, I don't know if you were around for the earlier stuff, but I have a minimal repro of my abnormally-blocking non-synchronized method call: https://github.com/Groxx/SynchronizedBug May 14 20:42:47 the commit message could be more explicit, but it seems to put this pretty clearly in either "I didn't know this is allowed in Java" or "the vm is not to spec", though I'm entirely unsure which it is :| May 14 20:44:15 TIL that San Andreas movie is *not* about GTA. May 14 20:44:56 hey so figured it out apparently my onclicklistener does not work because of the viewpager or my tabs May 14 20:45:06 PagerSlidingTabStrip May 14 20:45:15 is anyone aware of the issue or know a solution May 14 20:45:18 TacticalJoke: heh. though I wonder if GTA can support an uber-earthquake mod. May 14 20:45:34 :D May 14 20:45:45 probably caused by humpback whales. May 14 20:45:48 Hi guys, quick question- I need to run the Lollipop setup Wizard on my emulator (I'm building a custom AOSP rom, and need to grab the default assets), but of course factory resetting an emulator isn't the way to go (when I attempt this it no longer starts!) any ideas? May 14 20:46:48 jguffey Maybe ask on android-root ? May 14 20:47:06 ah, ok thank you ppklomPolak May 14 20:47:22 yeah, that's probably the right room May 14 20:47:58 jguffey why didddd you rejoin? May 14 20:48:16 Hello I have a servlet thats has some methods that are used by client with httpclient GET params. How should I make the class that handles the communication to the server? I need to use the same httpclient object for all servlet methods when user logged in May 14 20:48:44 ask in #java xelent May 14 20:49:28 Lonesoldier728 maybe comment out one or the other to see which one causes that? May 14 20:49:41 well PagerSlidingTabStrip uses pager May 14 20:49:49 to be setup https://github.com/astuetz/PagerSlidingTabStrip May 14 20:50:35 Lonesolder728 comment out means put // before th May 14 20:50:39 does anyone here use that lib May 14 20:50:39 Lonesolder728 comment out means put // before the lines of code May 14 20:50:54 I did comment out the tabs and viewpager and the onclicklistener works May 14 20:51:09 Lonesolder728 so comment out just one of them May 14 20:52:30 but when i uncomment them out since I want to use tabs on the same page, it does not register the click... and this is what the code looks like so I cant uncomment just pager or just tabs... http://pastebin.com/dPrjyMyX May 14 20:54:21 Thanks to everyone who helped. Goodnight May 14 20:55:11 Another satisfied customer. May 14 20:55:21 hahaha May 14 20:55:57 groxx, should be easily reproducible in jvm java if you wanted to try May 14 20:56:44 I am going to see if wrapping it in a layout helps May 14 20:57:06 pfn: TacticalJoke said they tried, but it didn't happen. I'll probably try making a unit test version :) May 14 20:57:20 groxx, indeed, behavior may be different May 14 20:57:56 which could still be undefined behavior instead of spec violation. haven't read the spec fully yet, work and life keeps intruding :) May 14 20:58:01 Yeah, I tried creating unit tests for it. May 14 20:58:06 Though I was half-asleep when I tried. May 14 20:58:47 it does at least strengthen the "it probably shouldn't do this" argument, though. May 14 21:00:33 How can i add those red boxes with numbers inside them in a NavigationDrawer? May 14 21:01:19 yep that was the trick putting it in a layout May 14 21:11:14 is the Launcher Icon Text only declared in AndroidManifest.xml? May 14 21:11:27 it shows something completly different than i declared... May 14 21:11:51 How to parse "^api^ string to split method ? Sample splitting with "^api^" gives me empty result May 14 21:14:18 what is the difference between ViewAnimator/ViewFlipper/ViewSwitcher? I don't get it... May 14 21:14:21 What are you splitting on, Narzew? Hard to tell what you mean. May 14 21:14:46 Solved issue with "\\^api\\^" string May 14 21:15:05 I got web response: "^api^response_code^api^ and i wanted to get response_code May 14 21:30:55 lostProgrammer: huh. those are kinda odd, yeah. as I read it: ViewAnimator is the bare minimum core. ViewFlipper (can) automatically switch between a set of views. ViewSwitcher is ViewAnimator with a helper factory, and it might let you dynamically add views as needed, rather than inserting them all at the beginning (not sure about that last bit though). May 14 21:31:20 so, relatively similar overall. might be code differences behind them that isn't documented though. May 14 21:31:44 thanks groxx May 14 21:38:36 groxx, yeah, I can't repro on jvm either May 14 21:38:52 groxx, as for spec violation, an edge-case like this doesn't really "matter" May 14 21:41:13 how can I debug input events? either, touchscreen or button press May 14 21:45:19 I am using some of commons io code and it uses a default buffer size of 4k. Should I change this? Has anyone tested what the optimal buffer size is for most Android devices? May 14 21:49:47 I've done a good thing today :P https://github.com/zxing/zxing/pull/389 May 14 22:03:59 hello May 14 22:04:08 mrmrscheese_, success May 14 22:04:19 much success May 14 22:04:34 not a fan of the underscore but what ever May 14 22:04:57 timemage, are you a god on here too? May 14 22:05:23 mrmrscheese_, should i have warned you? May 14 22:05:29 lol May 14 22:05:54 well i could have asked you before i came here May 14 22:06:15 so i just got a new ip camera/network tester May 14 22:06:26 it is a android based device May 14 22:08:28 it has a bunch of really cool features like testing fiber optic cables, calculating cable lengths based on latency response on copper cables, built in ethernet with poe, built in wifi, built in dns, ftp server, ect May 14 22:09:04 the only main issue i have with it is that when i connect a ip camera to it, it does not automatically pull its ip address May 14 22:09:34 with my old camera tester, i could just connect it to the camera and it would automatically pull up the video stream May 14 22:09:55 so i am trying to think of how i can make that happen with this new device May 14 22:11:31 any thoughts timemage? May 14 22:12:46 mrmrscheese_, multiple things going on. also may not be the best to answer. may ask some questions later assuming no one else helps. May 14 22:14:18 > mrmrscheese_: timemage, are you a god on here too? May 14 22:14:22 who are you timemage? May 14 22:14:44 I had the same thought rodly :D May 14 22:14:59 timemage, i was thinking of something along the lines of a app that just listens for arp calls, since the camera is the only device connected to the tester it would be easy to filter May 14 22:15:41 rodly, he can do this thing with his tongue that is just absolutely mind blowing May 14 22:15:55 how do action views work in toolbar? does it know to collapse or i need to inflate/deflate the action view manually on click? May 14 22:16:06 "deflate" -> collapse May 14 22:17:45 mrmrscheese_, do tell May 14 22:18:32 i am not using search view, my own edit text as action view May 14 22:21:10 So yeah I am actually having problems with the tab highlighting this is the code http://pastebin.com/QZLbthJu May 14 22:23:48 How do I contact Google to inform them that I am revoking their license to distribute my app? May 14 22:23:54 The support page does not list any contact: https://support.google.com/googleplay/android-developer/troubleshooter/3055196?hl=en&ref_topic=6075687#ts=3056520 May 14 22:26:17 kbwt, https://support.google.com/googleplay/android-developer/contact/dev_registration?extra.IssueType=cancel May 14 22:26:28 i think you need to delete your account for that though, but this should do it May 14 22:26:38 adq: Thank you. May 14 22:28:27 So I am not using fragments. I have an activity where one listview will take on 3 different adapters depending on which icon in the actionbar is clicked. What's the best way of managing this (without fragments), using seperate activities or is maintaining a view-mode state justified? May 14 22:29:16 how different are the adapters? can you just swap out data and keep adapter or are they not similar? May 14 22:29:20 lasserix_: Can you change the logic and only use one adapter? May 14 22:29:28 nop May 14 22:29:31 no May 14 22:29:44 well I could if i wanted to do like 6 different view types May 14 22:30:06 but i already built one of them and it's complicated enough as it is, so I'd rather just use single listview, multiple adapters May 14 22:30:11 that's not too bad.. But I would go with fragments May 14 22:31:24 I want to make a simple list view application. API 15 and higher. With one activity holding one fragment. Do I need a ListFragment or a ListActivity or both or none? May 14 22:31:41 I just use ListView. Simple and flexible. May 14 22:33:03 TacticalJoke: ListView widget right? In the Fragment layout? May 14 22:33:34 If it's just a single ListView you might not need a fragment May 14 22:34:07 surf2b1: I've made a listview with just an activity before, I'm moving onto activity with a fragment just for practice. May 14 22:34:23 surf2b1: no fragments May 14 22:34:25 eghdk: ListActivity just uses ListView under the hood. In fact, it's pretty thin. May 14 22:34:31 anyone able to help me figure out a plan of attack for my issue? May 14 22:34:45 eghdk: don't get in habit of using fragments. use custom views May 14 22:34:47 Just unsure of what to use. It seems like there a billion different activity classes to extend from now. I'm never sure which one to actually use. May 14 22:34:57 actionbaractivity yo May 14 22:35:02 Activity or AppCompatActivity May 14 22:35:06 Not anymore, lasserix_. :D May 14 22:35:21 See! Even you guys just gave me three answers! Hahaha May 14 22:35:26 btw, here is a link for the device: http://anyanda.en.alibaba.com/product/60154585305-220104977/Hottest_7_inch_touch_screen_IP_camera_cctv_tester_ipc_8600_ip_hd_sdi_camera_tester.html May 14 22:35:32 So wait, why Activity or AppCompatActivity? May 14 22:35:44 eghdk: ActionBarActivity is deprecated in favour of AppCompatActivity. May 14 22:36:00 Use AppCompatActivity if you want a material theme; use Activity otherwise. May 14 22:36:04 AppCompatActivity = ActionBarActivity. It is just there for legacy reasons May 14 22:36:09 TacticalJoke: not anymore? May 14 22:36:17 oh when did this happen? May 14 22:36:20 Do I need it if I want api 15 and higher? May 14 22:36:28 couple weeks ago May 14 22:36:50 lasserix_: https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/ May 14 22:37:51 Interesting. ActionBarActivity now just subclasses AppCompatActivity and has a Deprecated annotation. May 14 22:37:53 Quick question, can I get my registration fee back if I do not agree with the new developer agreement? May 14 22:37:58 Kind of a neat way to do it, I guess. May 14 22:38:03 Given the changes they must've made. May 14 22:38:17 nokx: I highly doubt it. May 14 22:38:30 good luck contacting google over $25 May 14 22:38:39 TacticalJoke: So ActionBarActivity or AppCompatActivity end up using the same thing... just one has @Depracated? May 14 22:38:51 yeah May 14 22:38:56 Yeah: https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java May 14 22:39:01 rodly, i misread his question. though had i read it the way it was written i might have said the same thing just to be funny. May 14 22:39:04 So just use AppCompatActivity....? May 14 22:39:04 surf2b1: More like good luck contacting Google at all May 14 22:39:19 yeah! May 14 22:39:40 ActionBarActivity didn't use to subclass AppCompatActivity. It used to be its own thing. But they changed stuff around and decided upon a new name. May 14 22:39:53 I much prefer the new name, especially in the age of Toolbar. May 14 22:40:24 TacticalJoke: But that needs a support lib right? Which version do I need to develop with AppCompatActivity? May 14 22:40:57 eghdk: You need appcompatv7. Usually it is added by default when you start a new project in Eclipse or Android Studio May 14 22:41:35 Okay. I thought maybe appcompatv4 or something I'm not good at knowing which version added what yet May 14 22:42:17 eghdk: v7 has v4 as a dependency but they should both be added when starting a new Android project with the wizard May 14 22:43:11 Oh one more good question TacticalJoke and surf2b1 If my project currently is using ActionBarActivity and it's not yelling at me that its depracated... what does that mean? I don't have the latest tools? or my project target is set too low? May 14 22:43:27 It's not deprecated till AppCompat 22.1. May 14 22:43:42 In app/build.gradle you can see which version you're using. May 14 22:43:46 it means google is trying to f,,k with your mind eghdk May 14 22:44:34 Okay I'm using compile 'com.android.support:appcompat-v7:21.0.3' May 14 22:44:43 It's worth updating to 22.1, FWIW. That brings material dialogs and other stuff. May 14 22:44:45 So if I update that... THEN it will complain May 14 22:44:51 Yeah. May 14 22:44:58 TacticalJoke whats up May 14 22:45:02 Hay. May 14 22:45:05 material dialogs wasn't a thing before 22.1? May 14 22:45:17 It needed an external library. May 14 22:45:17 Hey all, need some help with a layout issue May 14 22:45:19 TacticalJoke: oh i can finally dump the material dialog library? May 14 22:45:23 Yeah. May 14 22:45:40 TacticalJoke: was material dialog library a google lib? May 14 22:45:44 I've got my project available to look at on GitHub so people can see what I'm seeing too May 14 22:45:56 No, eghdk. May 14 22:46:39 TacticalJoke: Interesting. I've been out of the loop on material stuff. There seems to be so much of it... I haven't updated the target apis of any of my apps =( May 14 22:46:54 They're also gonna give us FABs, snackbars, etc. soon. May 14 22:46:54 I don't even know what theme I should be using anymore in my apps May 14 22:46:56 Basically I've made a fork of Roman Nurik's wizard. In my original branch, I just supported Lollipop devices and renamed the packages so it meant Roman couldn't merge my work with his. May 14 22:47:37 Do i need to donload Gradle for android studio or does come with it? May 14 22:47:39 Now, I'm trying to support a Material Design for all devices API 14+ and keeping the package names the same so Roman can merge it once I've got it working May 14 22:47:47 perlsyntax: Comes with it. May 14 22:48:23 TacticalJoke: I'm now using "Theme.AppCompat.Light.DarkActionBar" is that right? May 14 22:48:33 TacticalJoke,I must been read something differnt online then thanks. May 14 22:48:37 Or... what should I use for material design now? May 14 22:48:40 the support libraries just keep growing. I think just a hello world app has a dex method count of around 25k. in a couple years will everyone just use multi-dex by default. Lolz May 14 22:48:41 TacticalJoke: how about edit text? May 14 22:48:48 Yeah, lasserix_. Those changed too. May 14 22:48:54 The cursor is now tinte. May 14 22:48:55 tinted* May 14 22:48:57 so can dump material edit text May 14 22:49:00 ? May 14 22:49:02 Probably. May 14 22:49:07 perlsyntax: I don't think gradle came with AS a while ago, but it used to download during the install process or something afaik May 14 22:49:08 Can anyone explain to me how to get the next button to have the same color as the previous button? May 14 22:49:10 https://scontent-lhr.xx.fbcdn.net/hphotos-xft1/v/t34.0-12/11101102_10153309096282288_1134732818_n.jpg?oh=bb72f5f60ccb81cc53602c3f7c44db62&oe=555749CB May 14 22:49:44 eghdk: I guess. I use Toolbar and Theme.AppCompat.NoActionBar, personally. May 14 22:49:59 Here's the file containing the buttons: https://github.com/MarkOSullivan94/Android-Material-Wizard/blob/6ec4e8be8053bb24bf93fa2e62f975c1a999f13c/res/layout/activity_main.xml May 14 22:50:17 bah. I gotta go read up on this Toolbar business. Life was so simple with the actionbar. May 14 22:50:27 And my theme was just Theme.Holo May 14 22:51:05 Toolbar is more flexible since it's just a normal View. You can put it anywhere (e.g., top, bottom, left, right; even centre). May 14 22:51:36 Also, you don't have to use the horrible onCreateOptionsMenu/onOptionsItemSelected thing. May 14 22:51:41 TacticalJoke: Last question then for me before I get back to work... if I put Theme.AppCompat and Im using latest app compat... does that mean all of my api level 15 devices will look material design(ish) now? May 14 22:51:57 why is it horrible? May 14 22:52:24 Just kinda yucky. The whole switch thing, etc. May 14 22:52:41 Calling us back to get menu items... ugh. May 14 22:52:58 TacticalJoke: Damn!? really. that sounds like what actionbar should have been. May 14 22:53:07 eghdk: Everything down to API 7 will. May 14 22:53:09 doesn’t help that you can’t use the id in a switch in library projects May 14 22:53:22 Wait. whats wrong with callbacks for menu items? doesn't everything need a callback if its a button? May 14 22:53:47 Hi TacticalJoke would you be able to help me out or know someone who could? May 14 22:53:47 I'm still using onCreateOptionsMenu onOptionItemSelected with appcompat May 14 22:53:50 True, you still need callbacks for the click events. Just not for the "we need to inflate a menu" thing. May 14 22:54:10 eghdk: toolbar.inflateMenu(R.menu.main_menu); May 14 22:54:13 That's just anywhere. May 14 22:54:18 TacticalJoke: WHAT? It will theme everything down to 7. That's amazing! No holo everywhere library needed for material design? May 14 22:54:24 Yeah. May 14 22:54:40 surf2b1: very horrible, ever try to switch the way it looks dynamically? such a pain May 14 22:55:01 Thats insane. I'm still blown away by that. Holy shit. May 14 22:55:30 lasserix_: switch the way menuitem's look programmatically? May 14 22:55:46 With Toolbar you can say stuff like `custom:navigationIcon="?attr/homeAsUpIndicator"` in XML to get an Up button. May 14 22:55:48 Can anyone help please? May 14 22:56:21 (Though that's basically undocumented.) May 14 22:56:59 markyosullivan: I looked at the code and was expecting the button to have android:textColor="@color/some_color" but it doesn't. Then I searched your repo for "setTextColor" but nothing showed up. But you need to set the textColor for the button May 14 22:57:33 surf2b1: I did that, I set it the same color as the action bar May 14 22:57:40 Hi. I created a new project in Android Studio. It builds fine, but when I run it, I get the following output: http://pastebin.com/089uT44X DOes anyone know how to fix this? May 14 22:57:42 changing the menu never seemed hard to me. May 14 22:57:51 surf2b1: yet it still didn't work. I've never seen anything like this before. May 14 22:58:29 Damn. Thanks TacticalJoke you just gave me a quick update on holo to material. Hopefully it doesn't change too much after this point. May 14 22:58:35 surf2b1: I looked at the style in case there was some color settings there but it doesn't contain any color setting. May 14 22:59:05 srg: restart May 14 22:59:13 surf2b1: The strangest thing is, the previous button has basically identical code but it has the correct color and the next button doesn't. What's up with that :D May 14 22:59:15 I guess Material was the big change. I don't suppose we'll get anything major for a while. Though from what I've seen it pays to update stuff regularly (then it's just a little bit at a time rather than a lot at once). May 14 22:59:17 markyosullivan: this is my first time looking at "Android-Material-Wizard". Maybe it's here: https://github.com/MarkOSullivan94/Android-Material-Wizard/blob/6ec4e8be8053bb24bf93fa2e62f975c1a999f13c/res/layout/list_item_review.xml May 14 22:59:24 surf2b1: hmm you never had to mess with oncreate/onprepare/invaldiate with fragments and such? May 14 22:59:49 lasserix_: Ok, I'll try it now and report back. May 14 23:00:24 lasserix_: I did. I guess when Fragments were a new thing it was hell. Maybe I'm just use to it by now May 14 23:00:31 eghdk: I tend to be lazy and just reinstall Android Studio every time a major version comes out. Then I get the latest Android SDK and stuff. (Then I just test my app on the latest emulator image and set targetSdkVersion accordingly.) May 14 23:00:33 TacticalJoke: Yeah you're right. Damn though. Material design baked right into support library. All the way down to 7. It's a miracle. May 14 23:01:05 Note that it's not 100% "material". Some stuff is missing (IOW, some stuff will look different if the app runs on 5.0). But it's quite a few things, and we're getting more in time May 14 23:01:23 An example is ProgressBars: they aren't material below 5.0. May 14 23:01:49 surf2b1: list_item_review.xml is the layout used for the ReviewFragment at the end which summaries the users choice, so it's not it. Thanks for the suggestion. Any other ideas as to what it could be? May 14 23:01:51 That might change, though. (I hope it does, because my app uses them a lot, and I don't like the third-party things I'm seeing that much.) May 14 23:02:03 ripple is not there too iirc, but there are already some libs providing that (even if it costs cpu/gpu :p) May 14 23:02:22 Nice. Remember how getting that god awful blue tint to go away or change color was so freaking miserable. Loaded my app up with so many 9patches. Is that fixed now? I keep hearing tinting, but I thought that was only on individual imageviews May 14 23:02:37 The blut tint of the action bar? Or dialogs? May 14 23:03:36 Eh. I guess both? Probably dialogs mostly, but changing widget colors... like changing the color of a switch, I needed 9patches and a library to do that May 14 23:04:10 And changing the color of the action bar and tabs and shit required me to use that image generator (by roman nurik I think) May 14 23:04:11 Ah. I don't know about switches, but the blue has gone from action bars (AppCompat 21+) and dialogs (AppCompat 22.1+). May 14 23:04:24 Yeah, that was tedious. May 14 23:04:29 So much stuff for basic theming. May 14 23:04:57 Yeah. OH. Like edittext... it was always blue. I needed drawables for that... please tell me thats fixed now? May 14 23:05:17 lasserix_: I rebooted (starting only android-studio and ssh into my server for IRC), and same thing. It builds, the "CHoose a device" window comes up, but then I get the same error ("NAND: could not write file /tmp/android-srg/emulator-76Xdc4, Resource temporarily unavailable") May 14 23:05:25 Yeah, that's fixed. The colour is completely customizable, I think. May 14 23:05:56 From setting `colorAccent` (or whatever it is) and so on. May 14 23:06:18 Even if it's a gray color. I'll take it from the blue. If I had a green app, then I had to generate so many drawables for all that stuff. Gray at least was neutral. May 14 23:06:35 But setColorAccent sounds amazing. May 14 23:06:59 I'll have to watch the google io videos on design this year. SOunds like a lot changed even after 5.0 came out. May 14 23:07:03 Yeah, that was a problem with Holo. There was no getting away from that blue, really. May 14 23:07:40 markyosullivan: https://github.com/romannurik/Android-WizardPager/blob/c4442000ab5ed49453274fd7b4fc946f158b3095/src/com/example/android/wizardpager/MainActivity.java#171-186 maybe May 14 23:08:32 Anyone know how to change the cursor color for material edit text library? May 14 23:08:52 lasserix_: You can do it with AppCompat 22.1. May 14 23:09:06 TacticalJoke: i can hide the underline and change the cursor color? May 14 23:09:47 Oh, not sure whether you can hide the underline. May 14 23:09:53 But you can set the underline and cursor colour to anything. May 14 23:10:02 It takes `colorAccent`. May 14 23:10:10 yeah but that controls both right? May 14 23:10:16 Yeah. May 14 23:10:21 so i can't independently change the underline color to say, transparent and the cursor to whatever May 14 23:10:56 Hmm, not sure. May 14 23:10:59 lasserix_: Here is a hacky way to change the the cursor color on any view that extends EditText: http://pastebin.com/URbGPM4d May 14 23:11:28 How do you do that material design edit text hint, so when you click the edit text, the hint appears in little letters above the edit text? May 14 23:11:49 surf2b1: i like the solution but yeah, suppper hacky May 14 23:12:02 material edit text library eghdk May 14 23:12:09 https://github.com/rengwuxian/MaterialEditText May 14 23:12:19 https://github.com/rengwuxian/MaterialEditText May 14 23:12:51 yeah, materialedittext library is pretty reasonable May 14 23:12:52 I'm using it May 14 23:13:03 Is that library like a goto standard lib now? May 14 23:13:55 lasserix_: Oh you can hide the underline in that lib. isn't that what you wanted? May 14 23:18:12 yeah May 14 23:18:13 i am using it May 14 23:18:22 but if i dont have to id rather dump libariries then keep them May 14 23:18:32 but now that i know pfn uses it May 14 23:18:43 lasserix_, doesn't matter whether or not I use it May 14 23:18:48 what matters is whether it fits your needs May 14 23:19:46 TacticalJoke changed the colors up a bit from what I showed yesterday May 14 23:19:56 Also added something to the lesson tiles May 14 23:20:09 lasserix_: Does that mean my /tmp is too small? May 14 23:20:17 If you have time to check it out, LMK May 14 23:21:05 Do you have a screenshot? May 14 23:21:16 So what happens if I use latest version of appcompat v7 but my target sdk is like 15... do I still get material design? I always thought theme was dependent from the target sdk level. May 14 23:21:21 I'll take one TJ, yeah May 14 23:22:23 Gimme about 10 mins May 14 23:22:26 Ill ping you May 14 23:23:33 eghdk: should still get it but you should always set target to the latest sdk version May 14 23:24:12 I set target to 14, now its complaining it can't find a bunch of stuff May 14 23:24:33 Can't find "parent="android:TextAppearance.Material"" May 14 23:25:16 appcompat needs to be compiled against L for theme stuff May 14 23:26:12 fuck it, I will add rx to my app May 14 23:26:27 lol May 14 23:26:49 I can't be bothered to write up all this hookup code to connect my model to my UI May 14 23:26:56 so just gonna add rx to emit events on text change, etc May 14 23:27:41 surf2b1: But I should be able to turn appcompat down a few levels to get compatability if I wanted to right? May 14 23:27:53 I created a new project in Android Studio. It builds fine, but when I run it, I get the following output: http://pastebin.com/089uT44X Does anyone know how to fix this? I already tried rebooting. May 14 23:28:18 you can set your minSdk to 7 or higher but the target should be 22 May 14 23:29:37 surf2b1: Why do you think it's that line of code? May 14 23:29:49 surf2b1: Gotcha. And what if I wanted to actually have every device show its device specific theme... and not show material design? May 14 23:30:02 I could change my apps theme to ...? May 14 23:30:02 Then you wouldn't use AppCompat. May 14 23:30:23 TacticalJoke: Gotcha. So thats where appcompat really comes in and ties all that crap together. May 14 23:30:38 Okay. I think I get it now... hahah May 14 23:31:41 eghdeghdhttp://stackoverflow.com/questions/9832114/how-to-use-device-default-theme-for-app May 14 23:32:03 ugh, do rxscala and rxandroid not interop? fuckers May 14 23:32:43 markyosullivan: Just looked really quick for where next_button/prev_button is being used in code May 14 23:33:38 TactialJoke this view scrolls so part of it is cut off, but youll get the idea May 14 23:33:41 http://i.imgur.com/LLsp8hi.png May 14 23:34:00 surf2b1: and TacticalJoke Thanks. That's helpful. I guess I was just confused as to why Theme.AppCompat.Light doesn't mention Material. Ya know? Like why it wasn't named Theme.AppCompat.Material May 14 23:36:08 surf2b1: the id for the button is also used here -> build/intermediates/res/debug/layout/activity_main.xml May 14 23:36:24 surf2b1: but I can't see how that'd affect the color since that is auto generated May 14 23:37:22 With android studio can i git github project in the same project? May 14 23:38:13 Cool. May 14 23:38:31 Tj you like that better? May 14 23:39:04 Is the difference the tag list at the bottom? May 14 23:39:10 I take you can't May 14 23:39:14 Yeah and colors are brighter May 14 23:40:29 Try dif colors? May 14 23:41:50 pfn i think you'll have to add some proguard stuff for rxjava May 14 23:42:06 g00s, should not be necessary May 14 23:42:19 unless rxjava uses reflection... May 14 23:42:25 yeah it does May 14 23:42:36 Colours aren't bad, but the red and blue look really bright on here. May 14 23:42:41 g00s: it does? May 14 23:42:58 TJ the red is really bright.. I may tone it down May 14 23:43:04 And idk about the green either May 14 23:43:05 g00s, where? May 14 23:43:33 <_genuser_> hey d00dz May 14 23:43:40 pfn grep for AtomicReferenceFieldUpdater May 14 23:44:59 https://github.com/ReactiveX/RxJava/search?utf8=%E2%9C%93&q=atomicreferencefieldupdater May 14 23:45:04 no particular interesting usages May 14 23:46:46 hm, i donno. i see it everywhere, like OperatorObserveOn.java May 14 23:47:05 but i dont know much about proguard, so you'll figure it out May 14 23:48:29 pfn also https://groups.google.com/forum/#!topic/rxjava/_tRfKPeftIk , let me know what you dig up May 14 23:50:07 obviously all the FieldUpdaters, like AtomicIntegerFieldUpdater May 14 23:50:20 <_genuser_> ah, perfect, I've just jacked up my router by telling it to route everythign on port 80 to another server. May 14 23:50:34 <_genuser_> and no it's admin interface is crapping out 'coz it's trying to go to the other server. May 14 23:50:37 <_genuser_> great!! May 14 23:50:56 _genuser_ is there a resest button on it :D May 14 23:52:45 <_genuser_> g00s: yeah, but it's going to lose all my other port forwarding crap. May 14 23:54:15 WidgetObservable.text(title.textfield).subscribe((n: OnTextChangeEvent) => { May 14 23:54:15 model = model.copy(title = Option(n.text)) May 14 23:54:15 }) May 14 23:54:18 hmm, pretty reasonable May 14 23:55:56 pfn: Yeah it is, only constraint is that subscriptions need to happen on the main thread May 14 23:56:08 no it doesn't May 14 23:56:52 it's not changing UI state, nor reading UI state from the subscription May 14 23:56:56 so it does not need to subscribe on UI May 14 23:56:57 try it May 14 23:57:12 It’s not about the subscription, it’s how WidgetObsevable works May 14 23:57:21 I did, does the right thing May 14 23:58:09 Very weird, it required it last time I used it May 14 23:58:22 at least no complaints at runtime, yet May 15 00:00:01 https://gist.github.com/pfn/5b6c001db2b0b4cd3efc#file-entryeditfragment-scala-L74 May 15 00:00:04 now if only I could reduce boilerplate May 15 00:04:21 jaana what do you think? when i google proguard & rxjava i dont find anything special May 15 00:04:41 g00s: I have an app in production with Rx, didn’t need to do anything special May 15 00:04:52 the most painful ones were retrofit and butterknife, these need special rules May 15 00:05:05 but those problems mttkay had seem pretty devious 'sometimes missed notifications' O.O May 15 00:05:19 I don’t know what you are referring to May 15 00:05:19 like i would ever find that, probably not May 15 00:05:39 jaana https://groups.google.com/forum/#!topic/rxjava/_tRfKPeftIk May 15 00:06:24 So that’s not due to reflection but unused methods apparently May 15 00:06:34 hmm, how can I inject events into an observable such that it emits events when I need, hrm May 15 00:07:15 i.e. I want to push events into an observable May 15 00:07:26 Use a Subject? May 15 00:07:40 <_genuser_> g00s: dangit, now I"m hard resetting it, lol. May 15 00:07:46 Is there a preference to use synchronized over atomicstate? May 15 00:08:49 jaana, indeed, thanks May 15 00:12:51 https://gist.github.com/pfn/5b6c001db2b0b4cd3efc May 15 00:12:54 alright, time to hook it all up May 15 00:16:59 lasserix_: From what I read, no. (Assuming you're talking about AtomicBoolean and so on.) May 15 00:17:59 wish we could decorate xml files May 15 00:18:08 so many times have like a permutation on a row for a listview May 15 00:18:09 with what, xmas lights ? May 15 00:18:18 I was thinking Xmas lights. :D May 15 00:18:32 yes yes xmas lights as the divider lines May 15 00:18:43 :D May 15 00:19:33 ew RxAndroid May 15 00:20:05 JakeWharton, I'm lazy, what is your suggestion instead? write up observables by hand? May 15 00:20:14 I remember decorating my desktop with Xmas lights as a kid. May 15 00:20:24 As in on-screen lights. May 15 00:20:25 we'll fix RxAndroid soon enough May 15 00:20:31 it's gross-city right now May 15 00:25:59 Say I have a class with a long as an id. I want to make a hashmap for a simple cache to lookup by that id, some strings. May 15 00:26:12 I want to create a random username and random password and store it secure, where should I do this?, using KeyChain API or SharedPreferences with this data encrypted? May 15 00:26:16 Is it better to just use the object instead of its long, because of autoboxing, for the key? May 15 00:28:48 lasserix_, well, there is no "is it better", maps don't work on primitives, so you must use the boxed variant May 15 00:29:30 lasserix_: http://www.javacodegeeks.com/2012/07/android-performance-tweaking-parsearray.html May 15 00:29:43 i mean, if i avoid autoboxing by using the containing class as a key, is that better than the autoboxing firing off per use May 15 00:30:09 icdp thanks: i've used there is a library can't recall right now that gives you primitivie collections May 15 00:31:18 you can write a specialized library for primitive collections, but it's really not worth it May 15 00:31:29 they already did May 15 00:31:46 i was just asking about avoiding the autoboxing by using the container class instance as the key May 15 00:32:06 lasserix_: SparseArray was create to avoid autoboxing (docs say that at least). but there could be performance gotchas, for quite large N May 15 00:32:16 what is the relation of id to string? May 15 00:32:49 class GeographicUnit() { GeographicUnitType enumType; long id; long name; } May 15 00:33:10 <_genuser_> ugh, annoying but done. May 15 00:33:19 for nested geographic unit (continent -> country -> state) i need the names of the super regions May 15 00:33:42 ie what is the continent and country of city x May 15 00:33:56 i was thinking i could add those to the class, or their ids to do look up at that way May 15 00:34:03 but in the meantime a simple lookup is fast May 15 00:35:11 nebiros: depends on what you need. if it's to keep data secure from other apps: just store it in your local folders, the application sandbox will protect you. May 15 00:36:05 nebiros: if you need to be resistant to rooted devices, you can encrypt the data before putting it on disk. but ultimately you're pretty much screwed, because there's always a way to get around that if the device is rooted. May 15 00:36:22 lasserix_: Why not add the string to the class? I'm not understanding. May 15 00:37:05 keychain can work, but it requires your users to have a password / keypad entry to unlock their phone (no pattern / face / etc), which is pretty annoying. if that's a reasonable expectation, it's probably the "best" option. May 15 00:37:48 TacticalJoke: just wondering which overhead is worse May 15 00:37:59 adding two strings per object when there are a couple thousand May 15 00:38:02 or just making a cache May 15 00:38:05 see what i mean? May 15 00:39:39 What are we comparing? A list of GeographicUnits versus a Map of GeographicUnit->String? May 15 00:40:14 Adding a string field will take four bytes per instance, I think. May 15 00:41:54 what's that cursor.copyStringToBuffer thing? should I use it or just cursor.getString ? May 15 00:44:12 icedp, use it if you're using a buffer, duh May 15 00:47:35 icedp for high performance May 15 00:48:15 pfn: well, you can textView.setText via String or via a char buffer May 15 00:50:39 okay, from what I've googled it was useful for performance reasons prior to 2.3 May 15 00:52:00 icedp i guess you should use it then, for ravilov's sake May 15 00:52:08 i mean ravioli May 15 00:53:32 was ellipsize ever fixed for textviews? May 15 01:10:19 pfn: you said you used material edit text, do you know how to change cursor color? May 15 01:13:23 why not Textview :D May 15 01:16:52 not offhand May 15 01:17:29 color accent probably May 15 01:30:07 lasserix_: did you try the reflection call. Hasn't failed me. Noticed I didn't paste a method it is using though May 15 01:30:34 g00s oh not bad idea if ijust set it to editable May 15 01:30:39 derp May 15 01:30:49 pfn: hmm i am subclassing so maybe that is interfering with it, thanks tho May 15 01:31:02 surf2b1: i dont trust those in code im getting paid for ;p May 15 01:31:37 lasserix_: fair enough. Although if you look at appcompat or supportv4 they are using tons of reflection May 15 01:36:46 timemage, havent heard from anyone else yet May 15 01:37:31 mrmrscheese_, privmsg if you want. going to have to ask a bunch of questions. May 15 01:49:30 surf2b1: not about reflection, about standard May 15 01:49:50 if google is using reflection, then they know they can count on it until they deprecate it May 15 01:51:32 lasserix_: yeah. I checked and those fields have been there since API 1. So I know it's good from 1 to current. May 15 01:51:40 You can change the cursor in XML though. May 15 01:51:47 android:textCursorDrawable="@drawable/yourCursor" May 15 01:52:49 i wish i only had to eat like a small deer once a week May 15 01:53:05 MaterialEditText extends AppCompatEditText which I'm guessing extends EditText so it should work May 15 01:55:38 lasserix_, why subclass yuck May 15 02:01:06 pfn i had written a class long ago based on edittext to do instant / character by character searching with compound drawables etc etc May 15 02:01:46 but didn't do the things material et does, so i just figured i could subclass met instead of et for this since im mostly just doing compound drawable, text changed watcher and a callback for it May 15 02:28:11 MikeWallaceDev: where are you? where's your video! May 15 02:28:46 E/MessageQueue-JNI﹕ java.lang.IndexOutOfBoundsException: setSpan (-1 ... 0) starts before 0 May 15 02:28:47 at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:355) May 15 02:28:47 at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:77) May 15 02:28:48 at android.text.SpannableString.setSpan(SpannableString.java:46) May 15 02:28:52 just look at this! May 15 02:31:08 Is the idea behind the architecture of u2020 with Dagger possible if I'm developing with multiple modules? Doesn't seem that it would be quite so easy since each module can have it's own build flavor+type May 15 02:34:16 Anyone happen to know of the easiest way to highlight matching text for all textview's in a listview? May 15 02:35:09 yiati, every module would need it's own modules.java, OR if you play with override, I imagine you could do a common modules.java and then inject your overrides May 15 02:35:15 though I haven't done the latter May 15 02:35:41 anyone here implement swipe to dismiss on a recycler? May 15 02:36:48 I don't think i've actually combined dagger+build types+flavors, I just changed based on flavor. I'm pretty sure you can get something sane though. May 15 02:38:46 yiati: what is missing for that? May 15 02:39:06 I would assume that you would just have a module of the same name in each of the type's folders May 15 02:39:12 JakeWharton: Probably nothing, mostly my comprehension May 15 02:39:21 Understandable. That's a big part! May 15 02:40:17 Hmm so like dragorn suggested of having a Modules.java in each build type for each module? May 15 02:40:43 that's what it does currently May 15 02:40:55 ignore anything I said if Jake is awake :P May 15 02:41:10 Is this channel more rom dev or app dev? May 15 02:41:19 sk8rjess, app May 15 02:41:32 Wonderful. I found a community! May 15 02:41:49 dragorn: i'm always watching ◉_◉ May 15 02:41:52 ha, usually people are unhappy with that answer May 15 02:42:11 Glad I could be the odd one out haha May 15 02:42:13 JakeWharton, who knows what evil lurks in the code of men May 15 02:42:34 JakeWharton: right, why is there a Modules.java in production/ and internalDebug/ versus production/ and internal/ ? May 15 02:43:02 there's also one in internalRelease/, I believe May 15 02:43:24 huh yep May 15 02:43:37 so that covers all 4 May 15 02:43:53 productionDebug and productionRelease don't change code-wise May 15 02:44:42 burntcookie90, shouldn't it be automatic with swipe refresh layout? May 15 02:45:16 JakeWharton: Ah so the one in production/ can just be thought of as having the same one in both productionDebug/ and productionRelease/, I see May 15 02:45:23 yep! May 15 02:46:05 pfn: nah, that's just pull to refresh, i'm trying to do gmail/inbox style. May 15 02:46:53 i've got a touch listener type system going, based on nuriks old code, but ACTION_DOWN never gets called May 15 02:50:08 hey guys May 15 02:50:11 Any ROM devs here? May 15 02:51:00 WhoNeedszZz: #android-root May 15 02:51:31 ^lol May 15 02:52:01 I'm glad I'm not the only one who comes in here asking May 15 02:52:18 thanks May 15 02:53:23 Is it expected to raise an error if ButterKnife tries to inject an activity without any @InjectView annotations? May 15 02:53:33 no May 15 02:53:35 hmm May 15 02:55:30 and cleaning the project fixes it May 15 02:57:08 always the best idea to clean immediately when something gets weird **** ENDING LOGGING AT Fri May 15 02:59:58 2015