**** BEGIN LOGGING AT Sun Jul 05 02:59:58 2015 Jul 05 03:58:41 All I have is a Note 4 but I need to develop for smaller screens, any suggestions? Jul 05 03:59:15 Should I just go out and buy cheap prepaid phones, and just not activate them? Jul 05 04:01:58 <__equinox> hey guys, I am currently looking for an intermediate level android developers for freelance work who can start right away Jul 05 04:02:02 <__equinox> ping me if you are interested Jul 05 04:02:25 RudyValencia maybe a Moto E or G ? Jul 05 04:02:39 OK Jul 05 04:02:54 so should I just do what I'm thinking (buy prepaid and not activate it)? Jul 05 04:04:00 but genymotion works well for just testing screen size stuff Jul 05 04:04:40 it relies on virtualbox, which doesn't work well with VMware (which I have for other things) Jul 05 04:05:50 I'm using an AMD PC to develop, which is incompatible with the Intel HAXM accelerator Jul 05 04:05:54 so I can't use an AVD Jul 05 04:17:46 RudyValencia: you in the uS? Jul 05 04:17:51 yes Jul 05 04:18:00 if you goto walmart or target, look for virgin mobile (prepaid no contract) Jul 05 04:18:12 they have one 4.1 kyrocera event, like 20-30 bucks Jul 05 04:18:21 and 4.4 lg something or other, 45 Jul 05 04:18:32 good for low end testing device against too Jul 05 04:18:45 ah Jul 05 04:19:22 are there reflash images for them in the event I mess something up? Jul 05 04:19:34 i believe the 4.4 lg one has Jul 05 04:19:38 not sure about th event Jul 05 04:28:43 anyone used Osmidroid or Mapbox sdk? Jul 05 04:30:00 also is there a way i can load the sdk into as so i can browse the source in an editor or something like that? Jul 05 04:35:14 What is the delay time of bluetooth pairing request system dialog? Jul 05 04:41:10 so what API level does the Google Maps API work in? Jul 05 04:46:25 think all you care about Jul 05 04:53:09 We should be getting a public reddit statement Monday: https://np.reddit.com/r/Blackout2015/comments/3c4x6h/leaked_conversation_from_kn0thing_and_the/cssj58v?context=1 Jul 05 04:54:34 TacticalJoke: did you ever release your app, out of interest? Jul 05 04:54:41 Not yet. Jul 05 04:55:03 there might be no reddit left by the time you do! Jul 05 04:57:42 Yeah, it'd be a shame if that happened. Jul 05 04:58:30 TacticalJoke lol why -53 points for that Jul 05 04:58:41 internet is retarded Jul 05 04:59:54 * capella soylent internet .... "It's People !!! PEOPLE !!!!" Jul 05 05:00:18 anyone got a sec to look at a piece of code i got and see if they can figure out what the problem is.. its related to sharedprefs? Jul 05 05:00:20 I'm still not sure whether the people on the Internet are real. Jul 05 05:00:57 i'm not that bright, but i have learned one thing in the past few years of mobile dev: make sure your users are educated and smart Jul 05 05:01:14 How do you make sure of that? Jul 05 05:01:23 target that audience, not the hoi polloi Jul 05 05:01:54 You won't get a lot of downloads given the size of that audience Jul 05 05:01:59 bynarie: Depends. What kinda code we talkin'? Jul 05 05:02:02 CedricBeust lucky for me i'm interested in scientific applications Jul 05 05:02:14 so all the people i deal with are researchers, etc Jul 05 05:02:17 basic java code for android Jul 05 05:02:21 TacticalJoke, Jul 05 05:02:49 Depends on what kinda Java we talkin'. Jul 05 05:03:24 bynarie: just post t include the stacktrace Jul 05 05:03:55 sorry im fairly new to android prog, how do i get a stacktrace? Jul 05 05:03:56 g00s how about adding like the test google goggles does or something? Jul 05 05:03:57 ;p Jul 05 05:04:29 bynarie: when it crashes (if it crashes) click Android tab (at the bottom) that should open up Logcat viewer ( astream of messages), find the stuff in red Jul 05 05:04:57 well.. its not crashing or failing to build.. its just not doing what i think it should be doing Jul 05 05:04:57 Yeah, I guess an app could refuse to function normally unless the user completes an IQ challenge. Jul 05 05:04:58 one sec Jul 05 05:05:10 bynarie: pastebin the code, don't ask for permission :) Jul 05 05:05:16 ok one sec Jul 05 05:06:50 Imagine the outrage if a popular app received an update whereby it refused to function unless the user proved that they were smart enough to be considered valuable. Jul 05 05:07:34 TacticalJoke lol, no of course not. you have to look for market segments Jul 05 05:09:17 problems that smart people have :) Jul 05 05:09:21 solve those Jul 05 05:09:33 wait, why wouldn't you want the most users possible again? Jul 05 05:09:39 Yeah, that's an interesting idea. I always just assume that clueless users are a fact of life. Jul 05 05:10:40 user quantity doesn't equate to quality ... nor to payment streams :p Jul 05 05:11:16 bynarie: for future reference: http://postimg.org/image/wc4rpsf0n/ Jul 05 05:11:17 for example, if you are focusing on medical. you will be dealing with a certain demographic Jul 05 05:11:36 I love banking ... they used to actually pay me XD Jul 05 05:11:39 I like the challenge of making my apps usable by as many users as possible Jul 05 05:12:01 I guess that computer users make up (as you might say) a bimodal distribution. :D There're the cluebies and the nerd overlords. Jul 05 05:12:01 http://pastebin.com/knfdtyX1 - these are the main "snippets" of code im concerned with.. the point is that when the app loads, the prefs do not seem to be getting pulled in correctly or the values are not being saved Jul 05 05:12:07 You just hope the users will rise to expecations Jul 05 05:12:13 CedricBeust: Yeah, same here. Jul 05 05:12:16 bynarie: for future reference: http://postimg.org/image/wc4rpsf0n/ Jul 05 05:12:19 lasserix, so basically just a simple logcat? also ^ Jul 05 05:12:26 thx for the link Jul 05 05:12:44 when it crashes there's a stack trace showing you what crashed and how Jul 05 05:12:46 hey guys, right now I use parse and I love it, has anyone used google app engine? how is it compared to parse? Jul 05 05:13:08 you might add a button and do something like Object o; o.hashCode(); and see what happens in logcat Jul 05 05:13:41 bynarie: you must apply or commit your edits once you are done Jul 05 05:14:00 oh nevermind Jul 05 05:14:04 =] Jul 05 05:14:11 i need to switch to glasses Jul 05 05:14:43 bynarie: you can probably switch to apply Jul 05 05:14:45 lol Jul 05 05:14:46 fyi Jul 05 05:14:49 ok Jul 05 05:15:01 but that wouldnt change the outcome of my values being saved would it? Jul 05 05:15:05 bynarie: So what is the value of `checked`? And are you sure you're reading it *after* writing it? Jul 05 05:15:32 bynarie: apply will write it to memory, writing to disk something shortly thereafter. commit forces it to write immediatly Jul 05 05:16:10 bynarie: this code snippet is useless Jul 05 05:16:37 unless this is part of one method Jul 05 05:16:54 yes, all of this is under the main method Jul 05 05:17:14 the oncreate() Jul 05 05:17:56 bynarie: well Jul 05 05:18:04 how well do you know java? Jul 05 05:18:07 == != .equals Jul 05 05:18:12 for strings, you must use .equals Jul 05 05:18:23 for equality, but why don't you put a boolean value in the shared preferences? Jul 05 05:18:46 True, but I suspect that it works in this case because of string-literal interning. Jul 05 05:18:50 really? you cant use if (string=="blah") Jul 05 05:19:29 i could use a bool, but i dont think that would change anything, unless like u said, i need to use .equals Jul 05 05:20:03 bynarie: Try `Log.d("init.d", "checked = " + checked);`. Jul 05 05:20:16 maybe thats why it keeps highlighting the == Jul 05 05:20:18 bynarie: Yeah, you should be using String.equals. Jul 05 05:20:20 ok good idea Jul 05 05:20:32 i bet thats the problem Jul 05 05:21:03 I doubt it, because string literals are interned. Jul 05 05:21:15 Though in other cases it'd definitely be problematic. Jul 05 05:21:43 bynarie: http://pastebin.com/RD19fWAP Jul 05 05:22:02 i used to do a lot of c# programming and i just assumed since the syntax is identical stuff would work the same, as far as == != etc etc Jul 05 05:23:27 so, don't assume the syntax is identical, since it isn't Jul 05 05:23:51 "close" Jul 05 05:23:58 bad assumption Jul 05 05:23:58 bynarie: http://pastebin.com/xMTMDZN2 Jul 05 05:24:01 "i just assumed since the syntax is identical" Jul 05 05:25:11 Probably the biggest gotcha for C# illumni coming to Java is the need to use String.equals over the equality operator. Jul 05 05:25:13 lasserix, thx for the heads up Jul 05 05:25:23 Alumni, rather. :D Jul 05 05:25:27 lol Jul 05 05:25:29 yea Jul 05 05:25:33 well it is just a lot easier to read that way Jul 05 05:25:48 and doesn't take > 48 dozen lines Jul 05 05:26:53 holy shit Jul 05 05:27:06 that dam .equals fixed the problem Jul 05 05:27:19 you should use boolean not string here, Jul 05 05:27:21 bynarie: http://pastebin.com/xMTMDZN2 Jul 05 05:27:38 yea i seen it Jul 05 05:27:42 im going to rewrite it Jul 05 05:28:06 lasserix, TacticalJoke, thanks for your suggestions and help Jul 05 05:28:15 Should also use SharedPreferences.Editor.apply instead of SharedPreferences.Editor.commit. Jul 05 05:28:20 no problem Jul 05 05:28:24 TacticalJoke: hehehe Jul 05 05:28:27 right Jul 05 05:28:36 I know lasserix knows. Just had to add. :D Jul 05 05:28:48 .apply does in bg and commit does instantly, correct> Jul 05 05:28:49 ? Jul 05 05:29:15 so it could possibly lag/freeze/block the app if it was a bunch of stuff? Jul 05 05:29:21 yeah Jul 05 05:29:26 that is the idea anyways Jul 05 05:30:27 I'm not sure why using String.equals fixed this. Shouldn't the interning allow `==` in this case (even though it's not a great idea, of course). Jul 05 05:32:24 At what point do you want to start using a sparsearray over a hashmap? Jul 05 05:32:41 TacticalJoke: seems that would be replying on internal/compiler behaviour rather than correct syntax Jul 05 05:32:43 (no clue??) but i assure it, it works flawlessly now.. but i am going to switch to a bool value Jul 05 05:34:09 ive been lazy for far too long. time to update my apps. 30k downloads in total almost and they stink :P Jul 05 05:34:18 lasserix " It is generally slower than a traditional HashMap, since lookups require a binary search and adds and removes require inserting and deleting entries in the array. For containers holding up to hundreds of items, the performance difference is not significant, less than 50%." Jul 05 05:34:34 well you don't use it for performance, its for memory i guess? Jul 05 05:34:52 so that is, always use unless your map has > 100s of items? or do i have that backwards Jul 05 05:35:12 Yeah, to avoid the int boxing and the MapEntry (or whatever) instantiation. Jul 05 05:35:19 Map.Entry* Jul 05 05:37:39 lasserix: I leanred more about that class from reading the code than from reading the documentation. Jul 05 05:37:40 hehe "android.util.SparseArray space time complexity properties" Jul 05 05:37:46 learned* Jul 05 05:37:48 Leeds i wonder what happens when you put a Samsung Galaxy Beam inside a Pizza Hut projector box :D Jul 05 05:38:06 g00s: pure awesomeness Jul 05 05:38:31 Leeds wonder if somebody made a disco ball app for that thing ;D Jul 05 05:38:52 TacticalJoke: ah also because the autoboxing of hashmaps, by using sprasearrays you'll avoid more gc calls Jul 05 05:38:59 Yah. Jul 05 05:39:02 hmm Jul 05 05:39:10 The autoboxing of the primitive key. Jul 05 05:39:11 i wonder if anyone has an AS plugin to convert hashmaps to sparsearrays Jul 05 05:39:11 I suspect it was a really limited promotion here - I don't recall it being local news at all Jul 05 05:41:48 wow, there is a phone with a square screen : Motorola Flipout Jul 05 05:42:44 oh that was 2010, thank goodness Jul 05 05:43:55 I had a coffee yesterday with a young lady who works for Blackberry... she was carrying both a Passport and an iPhone :) When I mentioned Venice, she said it wasn't her product, nothing to say... Jul 05 05:47:16 Leeds i wonder if their device occupies the same space as Silent Circle Jul 05 05:48:20 the only android phone that i find interesting is the blackphone Jul 05 05:48:22 you mean, while being credible to 'enterprise'? Jul 05 05:49:46 yeah, since IT already has experience using BB platform - unless they forgot :D been a few years since they were dominant Jul 05 05:51:16 their MDM stuff is still relatively well-respected, I think Jul 05 05:51:44 eh, we know - they should have made a bulletproof Android platform 3 years ago, rather than wasting time on BB10 Jul 05 05:54:04 Hi, I have a question regarding GCM Jul 05 05:54:19 when sending upstream xmpp messages to my app server using the same client Jul 05 05:54:34 the gcm token I get (in the from: of the messages), are different Jul 05 05:54:47 they all have the same prefix, (11 chars) Jul 05 05:55:02 but the rest of the tokens differ Jul 05 05:55:10 is this how it's supposed to be? Jul 05 05:56:12 these are two tokens I get from the same client: Jul 05 05:56:19 djrWhYFOLtE:APA91bHLqazSKrZGUUEPvMkIKdtWCVIxhdYILfPLeguPR_yDUrProRsCfeP3LQiFzR1o0-Ha-BUMor6pTxKuWmUr9zpE6hIZGEkDV2pcQDJSZUKH3DX91wE Jul 05 05:56:26 djrWhYFOLtE:APA91bHAROejFamp-8qwFddOKmUl_EYc_A9HdwnB8ojkUIRX-5kFCjHsnIDQIFa-kWMOdE3NpqU643nTrQnzPFcswTFgd7wBo0KnAub29EEyGP3R01njxz8', u'message_id': u'kjukkhujgbvhhooisccsgdydufgf Jul 05 05:56:58 hax Jul 05 05:57:22 is it possible that some devices are be supported by adb (android debug bridge)? Jul 05 05:57:36 are not supported** Jul 05 05:57:52 exoloastic: something is wrong with your driver or device Jul 05 05:57:54 majority no Jul 05 05:58:07 exoloastic: anything is possible, but any mainstream device must support it - it's a requirement for shipping google apps Jul 05 05:58:28 exoloastic: what device? Jul 05 05:58:59 lasserix: phone, Advan S4H (local brand) Jul 05 05:59:18 does it have google apps? Jul 05 05:59:23 you have legit drivers? Jul 05 05:59:52 Leeds: google apps? Jul 05 06:00:14 play store, youtube, maps, chrome, etc etc etc Jul 05 06:00:18 lasserix: I've installed drivers given by this phone Jul 05 06:00:46 Leeds: Yes, It has all those. Jul 05 06:01:15 exoloastic: I actually wanted to double-check with you... I asked you the other day if you got a USB debug notification when you plugged it in, and you said yes - but later you were talking about a USB connection type notification, which isn't the same thing Jul 05 06:01:19 how can i add a tablayout to this https://github.com/chrisbanes/cheesesquare/blob/master/app/src/main/res/layout/activity_detail.xml ? Jul 05 06:02:22 pick an insertion point and insert Jul 05 06:02:29 :) Jul 05 06:02:58 i wish it was that was that easy, but the tabs disappear Jul 05 06:03:33 then your insertion was malformed Jul 05 06:05:13 i tried inserting it after the collapsing layout, it wasn't malformed but it doesn't show Jul 05 06:06:26 show your inserted layout Jul 05 06:06:32 Leeds: every time my phone connected, there is a notification says "USB debugging connected", an also there is another notification which if I tap on it, it will show me "USB computer connection" to choose (1) USB storage (2) MTP (3) PTP (4) Installer CD Jul 05 06:06:36 don't remove a bunch of stuff because you think we'll steal your layout either Jul 05 06:06:48 exoloastic: ok, that's good Jul 05 06:06:52 exoloastic: did you try each of those options and see if it worked? Jul 05 06:06:55 well, blame windows then Jul 05 06:08:13 lasserix: yes, I've tried all those options, still adb won't work Jul 05 06:08:41 well as leeds said, blame windoze Jul 05 06:10:36 Hi. Anyone here has experience with NfcAdapter? Jul 05 06:11:57 exoloastic, you haven't installed adb drivers, so of course it wont worj Jul 05 06:12:11 maybe I should reinstall my windows (+app +driver etc) which would take very long time to do it. Jul 05 06:12:33 did u turn usb debugging on to begin with? Jul 05 06:12:39 install adb drivers or gtfo Jul 05 06:13:04 pfn: I have installed it, windows device manager has detected my phone Jul 05 06:13:16 no it hasn't Jul 05 06:13:19 but did u turn usb debugging on Jul 05 06:13:32 bynarie: yes i did turn it on Jul 05 06:13:34 screenshot to prove it or gtfo Jul 05 06:13:50 pfn: screenshot of device manager? Jul 05 06:13:54 yes Jul 05 06:13:56 u sure u got the right drivers installed Jul 05 06:13:58 ok Jul 05 06:14:14 got on a linux box and see if it works Jul 05 06:14:28 *get Jul 05 06:17:34 http://pastebin.com/jeFZFSCi Jul 05 06:18:08 pfn: here isits screenshot http://i.imgur.com/IRaMsim.png Jul 05 06:18:40 exoloastic, then adb kill-server and then adb devices Jul 05 06:18:58 bynarie: I've tried many drivers, including driver given by this phone Jul 05 06:19:40 pfn: I've killed adb before Jul 05 06:20:00 so, humor me Jul 05 06:20:39 pfn: the list is always empty Jul 05 06:20:51 exoloastic, perhaps try revoking all usb permissions, unplug and replug and do adb devices Jul 05 06:21:05 then something else is capturing the device, like a. VirtualBox vm Jul 05 06:21:48 hmm... did/do you get the adb permission dialog on the phone? Jul 05 06:23:29 bynarie: I've tried unplug & replug too. I also have tried to use USBDeview (tool for removing all usb driver installed) Jul 05 06:24:05 have u verified adbd is running on your phone? Jul 05 06:24:20 pfn: I have not tried via virtualbox, perhaps should try it too before reinstall my windows. Jul 05 06:24:47 no dont do that Jul 05 06:25:03 Leeds: no, I did not get adb permission dialog on the phone Jul 05 06:25:37 exoloastic, do u have a terminal installed on your phone? goto terminal and type ps adbd Jul 05 06:25:47 bynarie: how do I verify adbd running on my phone? Jul 05 06:26:01 ^ Jul 05 06:26:10 doesnt sound like adbd is running Jul 05 06:27:31 bynarie: i dont have terminal installed on my phone Jul 05 06:28:17 adb devices shows no devices? Jul 05 06:28:36 canvs2321:yes, no devices Jul 05 06:28:43 you have to atleast accept the rsa notification on device Jul 05 06:28:47 exoloastic, install terminal Jul 05 06:28:48 lasserix this is the layout http://pastebin.com/jeFZFSCi Jul 05 06:28:52 do you get a prompt at all on your device? Jul 05 06:29:36 exoloastic, and do the "ps adbd" - u need to start off with the basics first.. is ADBD even installed Jul 05 06:30:10 bynarie: what is its name? im going to seach it on playstore Jul 05 06:30:52 canvs2321:a prompt? im sorry i dont understand. my first language is not english. Jul 05 06:30:59 get the terminal emulator by jack palevich Jul 05 06:31:20 I normally recommend JuiceSSH nowadays Jul 05 06:31:37 bynarie: should my phone be rooted first? Jul 05 06:31:44 no it doesnt matter Jul 05 06:31:44 exoloastic, since jellybean or kitkat your have to allow and accept the usb connection from a pc for it to do/allow adb Jul 05 06:32:16 oh your tab needs to go into the toolbar area Jul 05 06:32:21 canvs2321, weve been thru all this already.. it seem as he dont even have adbd on the device Jul 05 06:33:43 canvs2321: usb connection is fine Jul 05 06:34:59 i forgot to say that my phone is not rooted. Jul 05 06:35:27 are u going to get this terminal or not Jul 05 06:36:18 exoloastic still trying to get adb devices working on chinese phone ?!? Jul 05 06:36:25 bynarie: yes, im searching it. internet connection is a bit slow here Jul 05 06:36:29 ok Jul 05 06:37:23 joroci: http://blog.stylingandroid.com/design-library-part-3/ Jul 05 06:37:40 bynarie: ok, now its installed already Jul 05 06:37:50 capella: yes :) Jul 05 06:38:12 run ps adbd Jul 05 06:38:17 and tell me the output Jul 05 06:40:43 * capella watches http://i.imgur.com/TEqv0.gif Jul 05 06:40:48 sometimes I wonder if exoloastic is passing stuff onto someone else, maybe someone who doesn't speak English, hence the slow response Jul 05 06:41:12 bynarie: i'll screenshoot it Jul 05 06:41:17 Hello o/. How do you edit an instance variable with a button click without it telling you that you can't edit any variable from an inner class? Jul 05 06:41:21 ok Jul 05 06:41:28 from within an inner class Jul 05 06:41:29 * Jul 05 06:41:38 joroci: did you see that link? you had your tab layout in wrong place Jul 05 06:42:05 Leeds: no, I only chat here. Jul 05 06:44:10 lasserix: saw it now, the link doesn't contain an image with parallax Jul 05 06:44:50 Lorenz9: I think you want a field, not a local variable. Jul 05 06:45:21 bynarie:here is its screenshoot: http://i.imgur.com/iAQUJJB.png Jul 05 06:46:17 ok, so u do have adbd running and on yuor device Jul 05 06:46:26 TacticalJoke, you mean like encapsulating the variables into a class? Jul 05 06:46:30 capella interesting , seems moz full ahead with webassembly (reading their gaming blog) Jul 05 06:46:46 they probably realize FFOS needs good games too :) Jul 05 06:46:54 https://blog.mozilla.org/futurereleases/2015/07/02/mozilla-games-technology-roadmap/ Jul 05 06:47:30 bynarie: maybe I should try to reinstall my windows Jul 05 06:48:05 Declaring it at the class level, yeah. A field is a (class) member variable. Jul 05 06:48:18 i would recommend trying a liveusb of linux and see if it works on that Jul 05 06:49:07 I'm probably making a fool of myself but anyways: but it is instanced, it all happens inside one function in Main.java Jul 05 06:49:34 It all happens inside an OnActivityResult Jul 05 06:49:50 onActivityResult* Jul 05 06:50:06 Oh, sorry, I misread. Hmm, is it a static nested class? Jul 05 06:50:19 If not, I guess you simply have to fully qualify: OuterClass.variable = whatever; Jul 05 06:50:26 Leeds: I'm sorry for slow my response, first because English is not my first language (need more time think), and also I'm still newbie in Android world (need more time operate it) Jul 05 06:50:35 g00s: yah heavy firepower behind it, not just moz http://techcrunch.com/2015/06/17/google-microsoft-mozilla-and-others-team-up-to-launch-webassembly-a-new-binary-format-for-the-web Jul 05 06:50:44 joroci: read the article Jul 05 06:50:44 Oops, `Outerclass.this.variable`. Jul 05 06:50:56 C* Jul 05 06:51:11 Lorenz9: It's probably easier to post the code. Jul 05 06:51:14 capella i'm reading we should see tangible results 1-2 years from now though Jul 05 06:51:27 Soon! Jul 05 06:51:50 bynarie: ok, I'll try to use ubuntu first, its being downloaded Jul 05 06:52:13 exoloastic, that would be a good first choice.. are you familiar with linux? Jul 05 06:53:21 bynarie: yes, i used to use it in my computer Jul 05 06:53:52 ok' Jul 05 06:54:21 O-okay but don't laugh :D It happens in line 33 https://gist.github.com/LoreReut/4593419a7e021fe621dc TacticalJoke Jul 05 06:55:25 Line 33 shows `@Override`. Jul 05 06:55:44 sorry I meant starting at line 33 Jul 05 06:56:02 it's 38 Jul 05 06:56:51 it's monsterName & monsterMaxHP the variables that I'm trying to get here Jul 05 06:57:21 I guess it's because they're not `final`. Jul 05 06:58:17 I can't remember right now what made me not make them final Jul 05 06:58:29 but if that's it I'm gonna kick myself in the face, be right back Jul 05 07:00:03 exoloastic, sudo apt-get install android-tools-adb android-tools-fastboot - should get u what u need Jul 05 07:00:10 in linux Jul 05 07:04:17 bynarie: ok noted. thanks. Jul 05 07:07:16 I'll try ubuntu tomorrow, I only have unlimited internet at night Jul 05 07:07:48 hi Jul 05 07:08:08 I want to change the dim setting in an android project is there a way? Jul 05 07:08:51 Dim setting? Jul 05 07:09:14 \o/ No errors! God damnit Tactical, thanks for uncovering my stupidity, sometimes we can't see a problem when it's right in front of our nose Jul 05 07:10:08 Lorenz9: On a side note, consider the "extract method" refactoring: . The code you posted was practically begging for methods to be extract, IMO. :D Jul 05 07:10:27 TacticalJoke: yes i want to control the brightness from script Jul 05 07:11:51 Thanks for the protip, will do Jul 05 07:12:02 Happy July 4th! soo excited for a new year. whats everyones resolution? Jul 05 07:13:27 drink moar beer? Jul 05 07:13:38 new year starts July 4 ? Jul 05 07:13:55 if you drink moar beer ;) Jul 05 07:14:50 markfknight: https://www.google.com/search?q=android+screen+brightness+site:stackoverflow.com Jul 05 07:14:52 so, g00s, yah, getting involved w/webasm now is like from the start ... after two years we'd be gods Jul 05 07:16:03 I like that nick, markmarkmark, same sound my stupid dog makes Jul 05 07:17:49 TacticalJoke: Didn't know the "site:" trick. Wow, so simple yet so wonderful. :) Jul 05 07:25:58 May I have opinions on http://dl.dropbox.com/u/28606789/AppOnDevice.png ? it's the UI for a prescription savings program app I'm developing Jul 05 07:27:08 "my" lord, it says "my" a lot Jul 05 07:27:18 RudyValencia looks like some Android 2 app Jul 05 07:27:23 lasserix i'm not sure you understand my problem, i'm trying to have a collapsing toolbar layout with parllax image and tablayout Jul 05 07:28:06 what can I do to make it better? :) Jul 05 07:28:56 should I replace the icons with flat ones? Jul 05 07:29:07 perhaps from fontawesome? Jul 05 07:30:47 the 'dashboard' pattern is considered to be pretty old-fashioned Jul 05 07:31:28 more recent recommendations are to launch straight into the most commonly-used section of the app, and use a menu or something similar to let the user navigate elsewhere Jul 05 07:31:47 I could do something like USAA does with their app Jul 05 07:32:01 the first time you launch it the side menu opens allowing you to select a section Jul 05 07:32:08 also, cartoony icons are pretty unpopular Jul 05 07:32:23 you can change a setting on it to open in a specific section every time, after you log in Jul 05 07:33:10 Leeds: where can I get better icons that I can scale as needed? Jul 05 07:34:10 https://www.google.com/design/icons/ Is usually a good start Jul 05 07:34:28 you should get rid of that dashboard completely though Jul 05 07:34:41 yeah that 6 pack is old stuff Jul 05 07:34:58 I am Jul 05 07:35:12 it was pretty common, I guess 3 years ago or so Jul 05 07:35:18 I should also redesign the app's logo Jul 05 07:36:27 are you a designer? Jul 05 07:36:41 Sorta but I'm not all that great Jul 05 07:38:38 I'm working with a pharmacy savings program that's trying to get back in the game and they want a nice Android app Jul 05 07:39:40 RudyValencia: you can dump the side drawer completly, just make Drug Pricing My Rx Cards My Profile three tabs Jul 05 07:39:46 they might want to consider paying a not not all that great designer... Jul 05 07:39:50 put contact my savings and settings inside my profile Jul 05 07:40:16 have it launch into my rx cards first each time Jul 05 07:40:40 we want users to find their drug prices without having to log in Jul 05 07:41:21 the program is for people who can barely afford the medicine at full price Jul 05 07:41:42 every medicine i've tried to look up on one of those programs was full price anyhow :( Jul 05 07:42:34 this organization is actually the originator of the savings program concept Jul 05 07:42:53 i had a PS Card at one time Jul 05 07:43:01 RudyValencia: they can Jul 05 07:43:02 i think thats what it was called. never got used Jul 05 07:43:06 they don't need to log in Jul 05 07:43:24 but if it goes into 'my cards' how are they going to be able to view the pricing info? Jul 05 07:43:26 just put three tabs at the top, and collapse settings, savings and contact into user Jul 05 07:43:34 no Jul 05 07:43:35 three tabs Jul 05 07:43:38 RudyValencia why would anyone have more than one card ? Jul 05 07:43:48 My Rx Cards / Drug Pricing / User Profile Jul 05 07:43:52 family members maybe? Jul 05 07:44:09 user profile can have my savings / settings and settings can have info / contact us Jul 05 07:44:25 oh, it asks you to log in first, but if you touch 'drug pricing' it lets you search? Jul 05 07:44:28 since My Rx Cards and Drug Pricing will ultimatly be used the most Jul 05 07:44:44 or you can do My Rx Cards and Drug Pricing, then make a user icon and put it the action bar Jul 05 07:44:58 good idea Jul 05 07:44:59 you can make settings a seperate icon (overflow or not) with contact us in the settings Jul 05 07:45:11 I'll see what I can do with that Jul 05 07:45:13 since the primary are my rx cards and drug prciving, it's easy Jul 05 07:45:50 as far as the logo... what should I do? Jul 05 07:46:24 just the outline in black/dark-grey on the white background perhaps? Jul 05 07:46:27 what do you mean? Jul 05 07:46:46 should I make the mortar/pestle outline-only, like the Google icons? Jul 05 07:46:54 probably Jul 05 07:47:12 if you get a decent icon you can perhaps make a collapsying toolbar and put it in their Jul 05 07:48:25 does anyone what i need to add to the manifest to disable tablets from downloading? Jul 05 07:52:31 I think it's this: http://developer.android.com/guide/practices/screens-distribution.html#FilteringHandsetApps Jul 05 07:52:47 But AFAIK by default, if you don't show a tablet-size screenshot, it'll show "Designed for phones" to tablet users. Jul 05 07:54:08 AFAIR* Jul 05 07:54:33 thanks Jul 05 08:27:45 test Jul 05 08:28:37 BOOOM Jul 05 08:34:36 anybody know how to get around this? 07-05 08:53:51.167: I/Unity(7498): AndroidJavaException: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Jul 05 08:35:42 Anybody familiar with working on the Canvas Jul 05 08:38:20 Is it possible to, on android, create and save a bitmap image which is larger than the screen size using canvas or OpenGL ES? Jul 05 08:39:49 is it possible to call an activity from the Application class? Jul 05 08:40:09 scriptal: why? Jul 05 08:40:47 scriptal: if you are in opengl, you could "screen shot" each region that is larger than the window, then crop it down Jul 05 08:40:51 using framebuffers Jul 05 08:42:29 I'm wanting to draw a graph using one of these tools that will be downloadable so that the user can insert it into a paper (like a word document) and be the same size regardless of device Jul 05 08:43:12 I mean, they could resize an image from a 4 inch screen to fit the width of a document but I don't think that would look very good Jul 05 08:43:54 scriptal: like i said, take the center right? put four rectangles Jul 05 08:44:06 with bottom left, bottom right, top left top right Jul 05 08:44:14 using a framebuffer, you can dump it Jul 05 08:44:27 then composte it, and cut it down to size Jul 05 08:44:59 i am guessing you can do the same without opengl, just be sure to keep track of where you are in the canvas translations Jul 05 08:46:35 Well, I'm wanting the user to see the whole graph (it's a number line) on their device such that there wouldn't be anything "off screen." Jul 05 08:47:43 But from my understanding of what you're saying, I could do some translations to make it as large as I need it to be (larger or smaller) and download THAT Jul 05 08:47:51 using framebuffers Jul 05 08:54:55 Can I start an activity from Application context? Jul 05 08:59:07 context.startActivity( intentActivityYouWannaStart ); Jul 05 08:59:55 So I believe the answer is yes Jul 05 09:00:43 scriptal that works only with the activity context, not with the application context, am i wrong? Jul 05 09:01:17 I’ll give it a try Jul 05 09:02:00 no it doesn’t work.... Jul 05 09:31:11 hello Jul 05 09:32:24 I've found this: https://github.com/Hashcode/i2c-tools Jul 05 09:34:52 I don't understand how to install this Jul 05 09:35:03 I can clone the repo by git Jul 05 09:35:49 but if I compile it on a computer I can't use make install, anyway Jul 05 09:36:05 How to solve? Any ideas? Jul 05 09:45:49 My service stops when I swipe away the app from recent apps. You can find more about my issue here http://stackoverflow.com/questions/28543569/paho-mqtt-android-service-issue and here http://stackoverflow.com/questions/28142000/paho-mqtt-android-service-wake-up-activity. Any tips? Jul 05 10:00:06 My service stops when I swipe away the app from recent apps. You can find more about my issue here http://stackoverflow.com/questions/28543569/paho-mqtt-android-service-issue and here http://stackoverflow.com/questions/28142000/paho-mqtt-android-service-wake-up-activity. Any tips? Jul 05 10:01:38 demahum: please, don't repeat every X minutes Jul 05 10:05:30 I have a while loop that lasts 10 seconds Jul 05 10:05:45 (in bash) I want to print logcat for those 10 seconds Jul 05 10:06:32 is there like a logcat.next() or something Jul 05 10:06:32 what.. Jul 05 10:06:39 what is in that loop man Jul 05 10:06:45 for it to take 10 seconds Jul 05 10:06:57 no, the loop is designed to last 10 seconds Jul 05 10:06:58 javnut: you can use logcat -c Jul 05 10:07:01 ahn Jul 05 10:07:13 end=$((SECONDS+10)) Jul 05 10:07:13 anybody unity3d devs here Jul 05 10:07:13 while [ $SECONDS -lt $end ]; do Jul 05 10:07:13 to clear the previous log Jul 05 10:07:37 cristian_c: I know that, but how does that help? Jul 05 10:07:40 and then ctrl+c Jul 05 10:07:56 ah, ok Jul 05 10:09:10 demahum: run your service in aseperate process Jul 05 10:09:17 anybody help with this error ? AndroidJavaException: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Jul 05 10:09:32 make sure you start it manually, indepdently of binding (and as a result, you must explicitly stop it) Jul 05 10:09:53 lasserix: At the point when I start it, to run it in a separate process? Jul 05 10:10:02 you put it in the manifest Jul 05 10:10:15 lasserix: It is in manifest and I already start it manually. Jul 05 10:10:31 Jul 05 10:10:40 no but define it as a seperate process Jul 05 10:11:32 hmm also seems to be a bug in 4.4 http://stackoverflow.com/questions/20677781/in-android-4-4-swiping-app-out-of-recent-tasks-permanently-kills-application-wi Jul 05 10:12:07 lasserix: I see. :/ Jul 05 10:12:25 *you may not need to do seperate process Jul 05 10:12:31 what intent are you returning for start of service? Jul 05 10:12:43 and are you just trying to handle an edge case here? Jul 05 10:13:53 ahh nm using a seperate process won't help Jul 05 10:13:57 you need to handle onTaskRemoved Jul 05 10:14:07 lasserix: The service is for receiving messages (mqtt). Jul 05 10:14:21 http://android.stackexchange.com/a/20663 Jul 05 10:14:42 shouldn't you start it with boot loader intent tho? Jul 05 10:15:16 lasserix: So I should implement onTaskRemoved inside my service? Jul 05 10:15:53 markpollard: you are calling a method that should be run on the UI thread from a background thread. Jul 05 10:16:48 surf2b1: i am running this from a unity3d plugin.... i believe i am on the wrong thread Jul 05 10:17:18 demahum: yeah youmust Jul 05 10:17:27 lasserix: Thanks. :) Jul 05 10:17:28 that callback is specifically for when app is swiped Jul 05 10:17:36 you don't need a seperate process either Jul 05 10:17:45 and it wont help you if you use one Jul 05 10:18:54 surf2b1: how would i call this on the correct thread? Jul 05 10:19:32 Use a handler or Activity#runOnUiThread(Runnable) Jul 05 10:19:50 surf2b1: here is my code http://pastebin.com/XLrN2WEZ Jul 05 10:21:48 i call it from unity like so http://pastebin.com/h8arFd9N Jul 05 10:22:12 markpollard: post the full stacktrace and/or full code. I'm heading to bed though. 3:22 AM here. Jul 05 10:22:31 Also, I haven't done anything with Unity. Sorry Jul 05 10:22:46 i just want to dim the screen Jul 05 10:22:52 from code Jul 05 10:23:09 seams easy task made hard Jul 05 10:23:24 surf2b1: my code is really just that Jul 05 10:23:40 the unity code just calls that function in the java Jul 05 10:24:10 it will dim the screen but i have to stop the app and go back in and the screen is dimmed.. Jul 05 10:24:30 it needs to set the bigness on the fly instead Jul 05 10:25:09 markpollard: try UnityPlayer.currentActivity.runOnUiThread(new Runnable() { /* your code here */ }); Jul 05 10:25:54 surf2b1: /* your code here */ .... as in what ? Jul 05 10:26:02 Dim() Jul 05 10:26:13 ok 1 sec Jul 05 10:27:18 in unity ? Jul 05 10:28:10 surf2b1: sorry in unity or ? Jul 05 10:29:16 markpollard: I believe so. Again, I haven't used Unity but I got the answer from here: http://answers.unity3d.com/questions/59897/android-accessing-thread-of-the-original-activitys.html Jul 05 10:32:35 hmm not sure Jul 05 10:33:54 surf2b1: i think this is a android method runOnUiThread Jul 05 10:34:09 sure is Jul 05 10:34:51 off to bed. hopefully someone else can help or some more google searching will yield better results. Night Jul 05 10:35:45 ok ty Jul 05 11:06:07 is there a way to put the device to sleep in code ? Jul 05 11:09:43 hi Jul 05 11:15:20 i want to put the device to sleep like using the power button.... i want to do this in code .. Any ideas Jul 05 11:22:39 hi, im trying to create swipeable layout here is my codes http://paste.ubuntu.com/11825624/ and i get this error http://paste.ubuntu.com/11825628/ Jul 05 11:23:07 i dont know how to use this, can somebody guide me ? or any other suggestion to create swipe-to-dismiss lay Jul 05 12:17:24 how do i make the android device goto sleep from code ? Jul 05 12:17:39 like the power button has been pressed Jul 05 12:23:05 markpollard you can't, reliably Jul 05 12:23:47 Chainfire: really.. what about putting the screen blank Jul 05 12:24:41 its not something you're supposed to be able to do :) Jul 05 12:24:50 of course, you could do a full screen black activity Jul 05 12:24:56 but that's just weird Jul 05 12:26:07 you can request device admin priviliges and use the lockNow call, which may or may not turn the screen off depending on the lock screen in use (and as such, is thus not completely reliable), or if you have full control over the firmware you can use power manager's goToSleep call, but a normal app can't call that Jul 05 12:28:08 Chainfire: do you know how to play a sound from the devices ear speaker like on a phone for example ? Jul 05 12:29:32 This is my code for the sleep but it doesn't work http://pastebin.com/dmS4UmZa Jul 05 12:32:02 in CollapsingToolbarLayout is it possible for the title to be a a view instead of a string? Jul 05 13:56:06 h Jul 05 14:05:12 Hello all, I am facing problems in getting an AVD running on AndroidStudio, deployed on Debian Jessie amd64. I downloaded two SystemImages x86_64, but both of them "look like they wanted to run on 32-bit mode" Jul 05 14:05:52 I've also installed qemu-kvm, and tried to use it as Additional Command when launching the VirtualDevice Jul 05 14:06:16 hello Jul 05 14:06:32 hi Jul 05 14:07:18 The problem is that even if I am able to get a step further with force-32bit, then the system will complain on libGL.so.1, and if I symlink the amd64 version, ELF won't be considered right, if I symlink i386, the driver is then amd64 and will fail on some symbols... Jul 05 14:08:25 i am learning to use the gridview by creating a menu screen where icons and its text labels are arrange in a grid. I notice that the last item (most right) in the grid has the largest column and was wondering if there is a way to make the cells of equal width Jul 05 14:09:11 Hi, I have made a layout using a navigationdrawer where I have my fram layout. Can I use a swipe action only on the framlayout? Jul 05 14:10:11 here is a the xml layout : http://pastie.org/10274231 Jul 05 14:13:51 is this real Jul 05 14:13:52 The overlay planes have another important role: they're the only way to display DRM content. DRM-protected buffers cannot be accessed by SurfaceFlinger or the GLES driver, which means that your video will disappear if HWC switches to GLES composition. Jul 05 14:16:37 kenalex: might this be of any help? http://developer.android.com/reference/android/widget/GridView.html#attr_android:stretchMode Jul 05 14:18:54 Hello. Jul 05 14:19:31 Is there any reason to switch from eclipse adt to android studio? I mean, except this single fact that it is made by google and eclipse adt seems opensource now Jul 05 14:27:00 webczat, in my experience AS is much more intelligent than eclipse. Jul 05 14:27:13 webczat, I'm confortable writting in AS Jul 05 14:28:49 for example? Jul 05 14:28:53 f843d0: i realised my problem Jul 05 14:29:04 f843d0: I was using grid layout instead of grid view Jul 05 14:29:09 *GridView Jul 05 14:29:28 f843d0:thanks for the heads up Jul 05 14:29:33 kenalex: nice, yw Jul 05 14:29:35 webczat, writting in xml goes faster. it gives you options and hints very very fast. you almost need to write the first letter and enter enter enter Jul 05 14:29:55 i guess i have no control over surfaceflinger Jul 05 14:30:05 its up to google to enter the vr market Jul 05 14:30:17 webczat, but the 'help' and hint text in method is better in Eclipse Jul 05 14:30:28 can I fix android studio's heinous performance? :P Jul 05 14:30:38 it locks up every time gradle wakes up, which is very often Jul 05 14:30:47 Peyam: so it goes like use what you like more? there is nothing that you just really cannot do in eclipse as of yet? Jul 05 14:31:38 webczat, no. everything is the same but faster och more intelligence. I like the theme and styles, options.. Jul 05 14:31:47 webczat, Google recommand AS Jul 05 14:31:56 especially that I heard that adt is given to eclipse foundation, so it may be nice even after some features are added if eclipse will follow Jul 05 14:33:26 Peyam: and for java itself oracle recommends netbeans. I am actually unable to use netbeans nor idea, and as is idea isn't it? and also idea has a difference between community and enterprise or whatever edition, other ides are fully opensource I believe. Jul 05 14:34:37 the reason preventing me from using idea or netbeans is basically that I am blind and eclipse is the only accessible IDE for java, and the most accessible IDE in general that I know. Jul 05 14:34:45 webczat, I mean AS in android optimized Intelj IDE. and Intellij has full support for Java och other things. I believe there is a opensource version of it too Jul 05 14:35:02 yes, Google, please http://192.73.235.239/sc/b08c82f6_1436106817.png Jul 05 14:35:21 webczat, Eclipse is awesome. I change it to AS just becouse I found it pretty and now I like it more and more Jul 05 14:36:33 Peyam: I like eclipse, I still have no choice, so I have to use eclipse or command line Jul 05 14:36:57 webczat, good idea :) Jul 05 14:38:41 how can i center the title in collapsingToolbarLayout? Jul 05 14:38:59 I do not write for android at all for now, I just have tried once, but you know, you suddenly get info that your only option is gone. so I am glad it is opensource instead Jul 05 14:46:17 I was trying to add Google In app billing system to remove ads from my app. But getting error "Authentication is required. You need to sign into your Google Account". Any clue why? Jul 05 14:46:40 I have also added email id to alpha tester group Jul 05 15:18:18 is there a way to modify appearance of AlertDialog - shown in http://developer.android.com/guide/topics/ui/dialogs.html#Checkboxes ? Jul 05 15:18:45 i was trying http://developer.android.com/guide/topics/ui/dialogs.html#CustomLayout Jul 05 15:19:05 but it creates separate part within existing Dialog Jul 05 15:20:13 hi Jul 05 15:20:20 I need to change backgroud of whole dialog, leave Title with its own background Jul 05 15:20:49 and change positive and Nefative buton color Jul 05 15:21:07 changing color of theme preset color of checked choices would be + Jul 05 15:21:27 is there a way to set the home button(the samsung phone model button in the middle) to not quit out of the apps ? Jul 05 15:21:45 markpollard: basically, no Jul 05 15:21:53 not even inside my app Jul 05 15:22:27 that button isn't inside your app Jul 05 15:23:49 i am creating a script that gets physical button presses ... i have all the buttons mapped except the power and home button... basically they show on the screen they have been pressed. I can't with the power and home as they quit the apps when you press them Jul 05 15:24:10 pointing to any manual or help page would be suffitient Jul 05 15:27:29 Leeds: so theres no way? Jul 05 15:27:40 there *should* be no way Jul 05 15:27:54 ok Jul 05 15:28:02 it's not something you should be wanting to do, except under pretty specific circumstances Jul 05 15:28:24 its for a testing software Jul 05 15:28:34 to test the buttons Jul 05 15:29:18 ok another question Jul 05 15:29:28 you mean you're doing hardware diagnostics? Jul 05 15:29:37 yes Jul 05 15:30:22 I want to play a sound out of the ear speaker Jul 05 15:30:32 yes, you've said that many times Jul 05 15:30:43 yes and i still want to do it Jul 05 16:30:58 to play a sound file i need to put the file in the folder res/raw? Jul 05 16:31:52 sure why not? Jul 05 16:32:29 i get the error 07-05 17:30:20.991: I/Unity(5251): AndroidJavaException: java.lang.NoClassDefFoundError: com.knowhow.androidapplication.R$raw Jul 05 16:33:11 lemg_mx: mPlayer = MediaPlayer.create(UnityPlayer.currentActivity, R.raw.sound); Jul 05 16:33:36 and this to play is mPlayer.start(); Jul 05 16:33:45 but no sound only that error Jul 05 17:04:06 Hi, I want to use a mediaplayer to play a video and everytime user swipe the screen it's gonna play next video. anyone has a clue how to do that? Jul 05 17:07:34 you attach a ontouchevent listener Jul 05 17:07:45 and you detect the swipe inside the ontouchevent listener. Jul 05 17:08:10 lemg_mx, do you have any tutorials Jul 05 17:08:12 on that Jul 05 17:08:29 http://stackoverflow.com/questions/6645537/how-to-detect-the-swipe-left-or-right-in-android Jul 05 17:10:29 lemg_mx, one quick question. where do you usually place videos? fragments? surfaceview?... Jul 05 17:11:10 local videos or streaming? Jul 05 17:12:42 streamin Jul 05 17:14:01 SurfaceView would be a good place to start. Jul 05 17:14:54 Peyam, Surface or Texture view Jul 05 17:16:01 thanks Jul 05 17:19:10 I've built an app that fetches some data from a web service. I have various classes that need access to that data, but I don't want to store it in a database. (it's not a lot of data). At the moment I'm using a List on my main activity... where/how should I do this? Jul 05 17:20:00 Make a module that handles all the data and store it there as a field Jul 05 17:20:32 Try not to mix business logic (stuff that handles and manipulates data) and presentation logic (stuff that displays information - activities, etc.) Jul 05 17:20:43 sounds good. Jul 05 17:21:21 Are there any naming conventions? Calling it "Data" etc? Jul 05 17:21:27 *shrug* Jul 05 17:21:46 "CustomerDataHandler" or "CustomerDataModule", etc. Jul 05 17:21:54 "Data" doesn't say anything about what it does or what it holds Jul 05 17:22:07 +1 Jul 05 17:24:04 arbitraryuser: What is the data you're fetching? Jul 05 17:25:55 TacticalJoke: Launch schedules for commercial rocket launches. Jul 05 17:27:37 how to setup a list and a searchView to show filtered items? Jul 05 17:28:10 wait found it Jul 05 17:28:51 arbitraryuser: as I see it you users potentially can use your app in the field w/o good internet connection. and then surprise comes: you apps show nothing. You should always cache response from a server. in db or otherwise Jul 05 17:32:45 arbitraryuser: if reply from a service is a json, just save it to a file. Jul 05 17:40:09 icedp: yeah, I think I'll just store the json... good idea. Jul 05 17:40:55 How are you downloading the JSON? Just curious. Jul 05 17:44:36 Interesting -- reddit seems to be forcing HTTPS now: https://www.reddit.com/r/redditdev/comments/39zje0/reddit_will_soon_only_be_available_over_https/ Jul 05 17:45:40 TacticalJoke thats good right? Jul 05 17:47:33 reading this https://plus.google.com/+AndroidDevelopers/posts/AV2ooBWY1iy Jul 05 17:47:49 is there anything here not in the docs? if so, why not just put it in the docs (why does this post exist) Jul 05 17:48:35 TacticalJoke: http://pastebin.com/aa6Ja4z2 Jul 05 18:00:24 So I've got an alarm receiver that needs to call an async task (fetching some json from a webserver) and then it needs to update a ListView, which means I need the activity so that I can activity.runOnUiThread()... My question is, how do I get that activity from alarm receiver? Jul 05 18:01:18 or perhaps I'm doing it completely wrong... how does an Alarm receiver task update the UI? Jul 05 18:47:27 g00s: Yeah, the HTTPS thing is good. Jul 05 18:47:43 arbitraryuser: If you use OkHttp, you get disk caching for free. Jul 05 18:47:55 Plus you get a better HTTP library. Jul 05 18:50:43 That's it for today's HTTP round-up. Back to the studio. Jul 05 18:50:50 arbitraryuser: what's the size of that json object anyway? Jul 05 19:19:25 any idea on styling? I am using "import android.support.v7.app.AppCompatActivity;" Jul 05 19:19:45 this http://pastebin.com/FY5ztsAs is my alternative to https://developer.android.com/training/basics/actionbar/styling.html#CustomBackground11 Jul 05 19:20:20 but AndroidStudio does not suggest anything as parent for "MyActionBar" Jul 05 19:22:47 actually it does not suggest on "CustomActionBarTheme" neither - I have just set "@style/Theme.AppCompat.Light.DarkActionBar" according to error ".IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity." I received on different parent settings Jul 05 19:24:02 is anyone here using "android.support.v7.app.AppCompatActivity;" in his application? Jul 05 19:26:13 any idea how what parent should i adress to change "actionBarStyle" ? Jul 05 19:31:35 are those questions that badly asked or that hard to answer? Or simply nobody cares? Jul 05 19:37:45 Does anyone have a clue what "Error:(45, 10) error: processFinish(String) in Landing cannot implement processFinish(String) in AsyncResponse attempting to assign weaker access privileges; was public" actually means? I'm trying to use an interface from an asynctask, but it's giving me that issue. Jul 05 20:01:17 hi Jul 05 20:01:24 is it possible to use fragments inside fragments ? Jul 05 20:02:16 I need one fragment for my navigation bar and one for the rest of the activity, but in the rest of the activity I want to still be able to use fragments Jul 05 20:09:44 In fact i want to create a fixed navigation bar atop all my activities Jul 05 20:09:55 g00s are these the same book? http://www.amazon.com/The-Innovators-Dilemma-Revolutionary-Business/dp/0062060244 or http://www.amazon.com/gp/product/142219602X/ref=pd_lpo_sbs_dp_ss_2?pf_rd_p=1944687562&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0062060244&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=0QCDRH1PJS651Q5AEJ83 Jul 05 20:10:04 and when i switch activities there is a bad transition that make the navigation bar spawn again Jul 05 20:10:11 shp, navigation bar - what about ActionBar? Jul 05 20:10:42 shp, thats default behaviour. if you want a seemless transition you need to use one activity for every screen and use fragments Jul 05 20:10:47 btw - what the **** Jul 05 20:10:59 http://stackoverflow.com/questions/23155637/change-background-color-of-the-action-bar-using-appcompat Jul 05 20:11:10 danijoo: i already use fragments in the rest of my application and fragments in fragments are not comptaible for API < 17 Jul 05 20:11:27 shp, they are Jul 05 20:11:28 bolovanos: are actionBar completely customizable ? I have a very specific layout with radiobuttons Jul 05 20:11:31 at least support fragments are Jul 05 20:11:44 danijoo: fragments in fragments ? really ? i read the opposite on stackoverflow :( Jul 05 20:11:48 how is it even possible that https://developer.android.com/training/basics/actionbar/styling.html#CustomBackground11 this differ that much from reality? Jul 05 20:12:05 shp,tbh im not sure. :p but I thought support frags have an implementation for that Jul 05 20:12:10 shp, that's what am I doing right now, and that's why am I so beep of Jul 05 20:13:48 I'm not sure ActionBar is fitted for my problem Jul 05 20:13:51 as I see it - one side of the world is fancy manual from google that says something and it does not work, and othre side is hackig and enchantment Jul 05 20:14:45 bolovanos, :D awesome description Jul 05 20:16:41 bolovanos, a lot of the docs arent updated to api 21 unfortunatly :/ Jul 05 20:18:06 danijoo, i would be pleased if it worked for older at least 5 versions back Jul 05 20:18:47 NateRiver yeah, but the blue one is newer edition or something Jul 05 20:19:10 NateRiver and the library will have that , so you can just get it from there Jul 05 20:21:10 this kind of obstacles that google constantly makes to people trying to use his dev environment is unbelievable, i just dont get it Jul 05 20:21:15 NateRiver and then after that you can read 'the innovator's dna' - library will have that too Jul 05 20:21:48 i have idea of an application, but instead of developing, I am fighting with API Jul 05 20:21:55 bolovanos yeah its kinda weird that even now, there is still talk about split action bars / etc in the main docs. i just laugh these days Jul 05 20:22:09 i like to laugh at android, its the best response Jul 05 20:25:27 feeling like Don Quixote riding on his mule through cursed, rotten Android valley Jul 05 20:27:27 how can i add a subtitle to the collapsing toolbar layout? Jul 05 20:29:13 you mean a subtitle to the title in the toolbar? Jul 05 20:29:46 no on the layout itself so it will animate Jul 05 20:30:14 like in Whatsapp app Jul 05 20:31:46 no idea what you mean Jul 05 20:32:13 do you have whatsapp? Jul 05 20:32:57 yup Jul 05 20:33:46 but cant see any subtitles Jul 05 20:34:41 go in to user profile or group Jul 05 20:35:47 suppose to say created by... for group or user status Jul 05 20:36:04 make a sketch/screenshot Jul 05 20:36:10 sec Jul 05 20:39:07 http://postimg.org/image/strvf80cb/ Jul 05 20:40:24 The idea and created by scrolls up and down Jul 05 20:40:57 thats nothing special Jul 05 20:41:05 just 2 textviews Jul 05 20:41:34 looks like linearlayout but how do you this with the design library Jul 05 20:41:51 or any other way Jul 05 20:42:57 the animate part Jul 05 20:43:35 joroci, http://android-developers.blogspot.de/2015_05_01_archive.html Jul 05 20:43:49 somewhere in the middle of the article is the ewxplanation Jul 05 20:50:46 not sure what do you mean, how will it animate Jul 05 20:52:04 oull add your linearlayout or whatever to the appbarlayout Jul 05 20:52:24 if you wish more animation then just collapsing, its up to you to add that Jul 05 20:55:22 just to confirm where will i do the animation in onDependentViewChanged()? Jul 05 21:05:47 danijoo? Jul 05 21:13:44 arbitraryuser: Google it. It's really simple (and you'll find countless results that explain it from every imaginable direction). Jul 05 21:14:10 Including why Java has this design, etc. Jul 05 21:34:37 joroci, i dont now sorry Jul 05 22:08:47 i have read that one should force garbage collection before heap dumping. What do you say about that? Jul 05 22:20:25 Hello, I anticipate users of an app to not have internet connectivity when using the app. Is there a preferred way to sync data later when the device has connectivity? Jul 05 22:22:03 adsr: it will make heap dump smaller, make things faster, but anyway as long you filter out soft/weak references you will get the same result Jul 05 22:22:07 adkins1: Jul 05 22:22:25 adsr, depends on what kind of data it is and how often does it have to be synced. Jul 05 22:25:27 Mavrik: A mix of text and images. Is it reasonable to write records of these data to a sqlite db and then periodically try to upload them when the device has connectivity? Jul 05 22:25:52 Yes. Jul 05 22:26:09 adsr, usually how it's done is that you perpare "pending" upload task Jul 05 22:26:19 and then start a service that tries to execute all upload tasks waiting Jul 05 22:27:11 which if it fails, does exponential backup to retry (e.g. delay retry for 3 minutes, 6 minutes, 12 minutes, 24 minutes, ... until some reasonable max. value) Jul 05 22:28:04 you can use JobScheduler on never APIs which makes this process a bit more battery friendly (e.g. you tell it that you need wifi and it won't even try to start the service until wifi is available) Jul 05 22:31:25 Mavrik: Great info. Thank you! Jul 05 22:32:06 And yes, using SQLite to store waiting tasks / data is reasonable. Just don't put acual image in DB :) Jul 05 22:32:32 :) Jul 05 22:37:34 adsr: also there is ConnectivityManager.CONNECTIVITY_ACTION broadcast which you can receive when internet connection changes and check if it's changed to available. Thus you won't wake up phone when there is no sense to do it, also you won't miss the moment. Jul 05 22:38:54 the recommended Google way is to use SyncAdapter which won't fire if there is not internet and which can be configures to run periodically. A lot of people won't advice you to use it because of large boilerplate. However it's mostly matter of copy and pasting and changing of a few lines :) Jul 05 23:12:53 SyncAdapter is for periodic syncing, not so much for exponential backoff Jul 05 23:17:43 Anyone have an exp with using Osmnidroid or MapBox sdk? Jul 05 23:43:23 I'm now to android studio. I'm trying to import another package into mine so I can access it's methods.... How do I? Jul 05 23:52:29 Mavrik: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.0_r1/com/android/server/content/SyncManager.java#1090 Jul 05 23:52:36 TinFury: you can use Project Structure window (ctrl+alt+shift+s) Jul 06 00:03:13 Which type of activity do I need for a tabbed UI? Jul 06 00:03:25 the default one Jul 06 00:03:34 Blank Activity? Jul 06 00:05:16 it doesnt really matter what you chose in android studio Jul 06 00:05:21 those are just scaffolds Jul 06 00:08:40 you need to edit them anyways Jul 06 00:11:07 Guys having trouble with a new Android Studio install Jul 06 00:11:31 "Failed to find target with hash string 'android 22'" Jul 06 00:11:44 With "Failed to sync Gradle" Jul 06 00:12:05 Anyone heard of this? Jul 06 00:15:30 drose379, have you installed the 22 sdk? Jul 06 00:16:27 danijoo "Android SDK Platform Tools" rev.22 is installed Jul 06 00:16:38 drose379, thats not the sdk Jul 06 00:17:02 Im in my SDK manager, where can I check if I have the 22 sdk Jul 06 00:17:31 under the api 22 subsection Jul 06 00:17:53 :) Jul 06 00:17:54 thanks Jul 06 00:18:29 Android 5.1.1 (API22) -> SDK Platform Jul 06 00:18:44 Got it Jul 06 00:18:46 thanks Jul 06 00:19:52 you need that for every sdk level you want use use Jul 06 00:20:09 checking sources might be helpful too (fopr strg+B :) ) Jul 06 00:24:12 So I'm trying to put Toolbar into my app in place of the default ActionBar, but I can't figure out what to replace the deprecated ActionBarActivity with Jul 06 00:24:35 AppCompatActivity Jul 06 00:25:05 Note that Google would've told you this: https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html Jul 06 00:26:05 RudyValencia, http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html Jul 06 00:26:38 I guess I can't do tabbed UI then? Jul 06 00:26:57 why not Jul 06 00:27:08 tabs have nothing to do with toolbar Jul 06 00:27:31 for tabs, you need TabLayout (design support library) and ViewPager Jul 06 00:56:25 Anyone use the imgur api? Jul 06 00:56:42 I have it all working but I don't userstand the basics... Like when files upload... where are they? Jul 06 00:56:50 I can't find them on my account. Jul 06 01:02:46 try #imgur Jul 06 01:46:33 RudyValencia: there is more Jul 06 01:47:03 RudyValencia: http://blog.stylingandroid.com/design-library-part-3/ Jul 06 01:47:23 will explain how to use all the new stuff for a genuine material tab exp Jul 06 01:48:17 So I'm working with robert_ and we have mostly figured out how to get a tabbed view with viewpager working :D Jul 06 01:48:39 this is our start into Android app dev Jul 06 01:54:32 Guys coffee is a drug, im so fucked up after having two cups Jul 06 01:54:37 Its like how i thought meth would be Jul 06 01:54:51 just so hyper and all i can do is work on stuff Jul 06 02:00:18 lol Jul 06 02:04:02 * g00s is worried about NateRiver Jul 06 02:06:37 It'd be cool to make my app integrate with this somehow: http://redditlist.com/ Jul 06 02:06:39 Such a good site. Jul 06 02:06:59 I'm assuming that reddit doesn't die, of course. Jul 06 02:08:19 TacticalJoke why not integrate those stats into your app Jul 06 02:09:00 Hmm, I wonder how easy it is to get those stats. Jul 06 02:13:29 NateRiver: you should either try sipping, not gulping. enjoy the flavor. Jul 06 02:13:32 or drink cold coffee Jul 06 02:15:18 TacticalJoke: reddit wont die Jul 06 02:15:21 not this time anyways Jul 06 02:15:43 Yeah, I presume not. The co-creator is being fairly reasonable (and he's gonna probably post something appeasing tomorrow). Jul 06 02:15:54 I wonder how long it will last, though. Jul 06 02:16:07 until someone creates an app that does it better Jul 06 02:16:24 there's too much casual dedication amongst the reddit users Jul 06 02:20:45 sad to think of what aarom shartz would think of all of it tho Jul 06 02:21:52 Yeah. Jul 06 02:22:56 thats how google + could get their sh!t together Jul 06 02:23:09 just make some kind of thread posting roll for its users Jul 06 02:27:38 This is how reddit used to be: https://i.imgur.com/4FMhV67.jpg Jul 06 02:29:19 hello Jul 06 02:29:39 how can I forcibly pause the execution of an android application? Jul 06 02:30:05 What do you mean by 'pause'? What are you trying to achieve? Jul 06 02:30:18 I have a hook where I want to show a dialog - so I call builder.show(); but execution continues to finish(); - and the dialog disappears as quickly as it appears Jul 06 02:30:53 why is it when i use my personal phone to test apps on the logcat runs and runs super fast? even after an error crash it keeps running and i cant see wtf happened to make it crash Jul 06 02:31:00 you are showing a dialog in onpause or something? Jul 06 02:31:09 NateRiver: use proper filters Jul 06 02:31:27 lasserix, no - let me put something on pastebin as it's hard to explain Jul 06 02:31:28 NateRiver maybe your logcat had too much cafeine also Jul 06 02:32:35 http://pastebin.com/c6DwMJby Jul 06 02:33:48 If the activity finishes, the dialog goes down. Jul 06 02:34:13 yeah Jul 06 02:34:24 so I need to find a way to pause the execution so finish doesn't get called Jul 06 02:35:53 TacticalJoke i guess the 2015 version of that wedding photo would have Jaws instead of Mr Beluga whale Jul 06 02:36:09 hi, i am using opencv android and everything works fine, except when I try to use filters, the video gets lagged to much, I am not sure how I should do it so that there is not lagging. Maybe threading? but the frames are like 20 to 30 every sec. Jul 06 02:36:12 ir7466: I don't think you can make the dialog-show thing blocking. Jul 06 02:37:06 hmm okay Jul 06 02:37:25 the only other thing I can think of is to pass to a new activity from within the hook Jul 06 02:37:40 and actually handle the dialog within the new activity Jul 06 02:38:58 can anyone look at this http://pastebin.com/NziGAEfF Jul 06 02:39:11 ir7466: How about modifying that class you can't modify? :D Jul 06 02:39:16 Seems kinda weirdly specific. Jul 06 02:39:35 After that object is created i can see it in debug but I can NOT access link via response.link can anyone tell me why? Jul 06 02:40:41 TinFury: I guess (since you haven't stated what `response` is) because `link` is not a member of ImageResponse. Jul 06 02:41:23 Isn't link a String within ImageResponse? Jul 06 02:41:45 ir7466: oh thats easy Jul 06 02:41:47 It's a field of UploadedImage (which happens to be a nested class of ImageResponse). Jul 06 02:41:55 just call finish in your dialog OKAY or cancel or backpressed Jul 06 02:42:21 I can't touch the existing finish(); though Jul 06 02:42:24 thats the problem Jul 06 02:42:29 you dont need to Jul 06 02:42:32 pos neg button Jul 06 02:42:34 call finish Jul 06 02:42:36 from those Jul 06 02:42:52 ImageResponse.UploadedImage image = new ImageResponse.UploadedImage(); image.link; Jul 06 02:42:56 Ahhhhhh i seee. I didn't see that before Jul 06 02:43:01 Thanks so much. Jul 06 02:43:11 lasserix: but i'll still have the // Finish this activity finish(); Jul 06 02:43:15 lasserix: He can't edit the code that calls `finish();`. Jul 06 02:43:25 which will get called as soon as builder.show(); finishes executing Jul 06 02:43:29 why not? Jul 06 02:43:32 I think he should anyway. That sounds like horrible design. Jul 06 02:43:43 why cant you modify that? Jul 06 02:43:47 that's in the *core* part of the application Jul 06 02:43:54 what app? Jul 06 02:43:55 i'm building on top of that and only have access to the hooks Jul 06 02:43:56 yours? Jul 06 02:44:03 subclass the class Jul 06 02:44:03 the companies Jul 06 02:44:12 override clickreturn Jul 06 02:44:47 ir7466: if you absolutely cannot modify it, then yeah the only way to fix that is launch an activity from bookbeforefinish Jul 06 02:46:52 TacticalJoke, How do I access the variable response.UploadedImage.link? Jul 06 02:47:22 From where? Jul 06 02:48:01 Why is UploadedImage even a nested class? Jul 06 02:48:08 It's hard to understand what you're doing. Jul 06 02:48:56 It's someone elses code. it's an api I'm trying to understand what they have done. Jul 06 02:50:25 BTW, there's no `response.UploadedImage.link` variable. You can basically consider UploadedImage just a normal class. Jul 06 02:50:42 Imagine if UploadedImage were defined elsewhere: you'd simply access `response.data.whatever`. Jul 06 02:51:05 https://android.googlesource.com/platform/hardware/libhardware_legacy/+/45a038b5d6d8155e577a72febb71822599c37c59/audio/AudioPolicyManagerBase.cpp#997 Jul 06 02:51:25 :((( All your mic belongs to "OK Google" Jul 06 02:51:37 Oh. ok I think i see. Thanks let me try Jul 06 02:51:58 adq OK NSA! Jul 06 02:52:11 i'm so frustrated right now lol Jul 06 02:52:27 2015, one input source Jul 06 02:53:17 2015 we still have wires lack of jetpacks Jul 06 02:53:27 wheres the ****ing flying cars for that matter? Jul 06 02:53:34 I was about to say that. :) Jul 06 02:53:45 lasserix you got 140 characters instead ! Jul 06 02:53:51 * adq throws a car at lasserix (see, a flying car) Jul 06 02:54:02 wow adq is strong Jul 06 02:54:13 oh yeah i forgot i can tweet a link to an image of the pastery i ate at the cafe today Jul 06 02:54:15 ohhhh yeah Jul 06 02:54:32 Don't forget selfie sticks. State-of-the-art technology. Jul 06 02:54:38 i had a friend who posted the same piece of pizza on his FB account, changing the wording just a little, for two months. Jul 06 02:54:42 he lost friends because of it Jul 06 02:54:54 i guess my only ressort is to loop until mic is released :x Jul 06 02:54:56 *friends irl Jul 06 02:55:09 adq what are you doing? Jul 06 02:55:18 just capture audio Jul 06 02:55:50 though i'm going to take a nap Jul 06 02:56:00 yeah looks like it Jul 06 02:56:25 lasserix, https://vid.me/1EFN Jul 06 02:56:38 ahhh Jul 06 02:56:43 it's a prototype, the scanner sweep should not be there Jul 06 02:56:51 just make a cool dampenning interpolation animation Jul 06 02:57:06 it's less fun than using real time audio Jul 06 02:57:14 the scanner sweep should not be there when the speaking blob is? Jul 06 02:57:27 ir7466: you won't get a better answer than what lasserix already told you http://stackoverflow.com/questions/31237013/pause-android-app-flow :P Jul 06 02:57:40 it's just a different part i forgot to remove Jul 06 02:57:58 TacticalJoke, That really helped me understand... thank you Jul 06 02:58:09 anyway, i'm screwed. :D Jul 06 02:58:15 adq what's the deal? Jul 06 02:58:17 I love how that guy's solution is "comment stuff out". :D Jul 06 02:58:27 so they use the mic, and then they stop, and when the stop what do you need to happen? Jul 06 02:58:35 TinFury: No worries. There's more info here if you're interested: https://docs.oracle.com/javase/tutorial/java/javaOO/nested.html Jul 06 02:59:23 lasserix, when ok google appears, just before the OS open an audio recording session, preventing me to also start an audio record session, simply Jul 06 02:59:47 the bug is not triggered in the vid above, it's all about timing **** ENDING LOGGING AT Mon Jul 06 02:59:59 2015