**** BEGIN LOGGING AT Mon Jan 20 02:59:59 2014 Jan 20 03:04:29 Hey guys! I'm wondering what is the best approach to make a login activity flux through my app... I'm using Google+ Sign-in integration. Jan 20 03:04:30 I mean... Start the Main activity, and check if I need to call the Login activity? Or the inverse way? Jan 20 03:18:50 CocoStorm: anyway, seriously learn about proper database programming and protection against SQLi and similar... Jan 20 03:41:23 always start the main activity first Jan 20 03:41:30 and you're gone Jan 20 03:52:02 is there a dropdown spinner that actually drops down? or it only pops up a popup for selection ? Jan 20 03:53:17 I'd rather use a dropdown spinner to select categories of lists, rather than tabs or pager, its easier to use Jan 20 03:55:22 and setting the background color seems not that simple for ContextMenu popup, or dropdown popup, I have to create styles.xml and all this stuff, instead of just .setBackgroundColor(... Jan 20 03:56:55 if I was Obama I would make it illegal to use white background, along with the other energy saving laws, like phasing out of incadescent light bulbs Jan 20 03:57:37 then he'd really get accused with racism ;) Jan 20 03:57:45 haha Jan 20 03:58:52 Do white backgrounds still make a difference? We aren't using cathode tubes anymore Jan 20 03:59:21 it's about as smart as staring into the sun Jan 20 04:01:03 I would think white backgrounds still burn through battery a lot faster Jan 20 04:03:12 ok something funky is going on, i made a change to some code and my app barfs on a null pointer. undid the change and its still barfing Jan 20 04:03:31 clean Jan 20 04:03:38 its breaking on my mview.invalidate() which suggests that mview is not valid Jan 20 04:04:06 my onREsume has mview = findViewById(R.Id.mapView); Jan 20 04:04:19 so why is mview.invalidate() a null pointer exception? Jan 20 04:04:35 I440r: did you clean ? Jan 20 04:04:43 there is no make clean in intellij Jan 20 04:04:54 it rebuilds all on debug Jan 20 04:05:00 oh Jan 20 04:05:01 or i can just say "build all" Jan 20 04:05:47 if doing it caused it, undoing it should fix it Jan 20 04:06:12 actually gimme a sec i might know wtf Jan 20 04:06:18 nope still doing it Jan 20 04:06:29 intelij idea keeps creating new debug profiles randomly Jan 20 04:07:14 but anyway. rebuild project followed by debug project did not resolve the null pointer Jan 20 04:07:26 why is a pointer i know im initializing null by the time i try use it Jan 20 04:08:02 or maybe theres something inside mview thats null now? Jan 20 04:08:05 not mview itself? Jan 20 04:08:41 no idea Jan 20 04:12:27 ok this is freeking WEIRD Jan 20 04:12:50 if(null != mview) { mview.invalidate(); } Jan 20 04:13:00 well. the invalidate is now happening and NOT null pointer Jan 20 04:13:14 if i remove the if part and just invalidate it null pointers Jan 20 04:13:36 shouldn't it be if(mview != null) ??? Jan 20 04:13:44 no Jan 20 04:13:49 its a safeguard thing Jan 20 04:13:59 if(q = 1) always returns true Jan 20 04:14:09 if(q == 1) is what you mean Jan 20 04:14:10 so by doing Jan 20 04:14:18 ok Jan 20 04:14:28 if(1 == q) if you forget the double equals it halts compilation Jan 20 04:14:36 if(1 = q) oopts thi wont work Jan 20 04:15:03 its something experienced c coders have done for a long time. NOWADAYS if you do if(q = 1) the compiler warns you about it Jan 20 04:15:19 so its not a big deal so much any more - but good habits die hard Jan 20 04:15:31 unless its a boolean op in it, like boolean u; if(u = true) doWhatever(); it will always run Jan 20 04:15:31 that might be the first time I'm seeing null on the left side Jan 20 04:15:50 only failure in type safe and avoiding assignment error Jan 20 04:15:58 xxcoder good point Jan 20 04:16:11 easy to avoid, be lazier and use if(u) doWhatever(); Jan 20 04:16:15 if(true = u) will always fail Jan 20 04:16:49 i avoid that because its overly terse. i prefer to be SLIGHTLY more verbose in this case Jan 20 04:17:02 something is nullifying my mview pointer Jan 20 04:17:06 and its not me Jan 20 04:17:21 i know thats happening because NOW my view is no longer being invalidated Jan 20 04:17:25 it was at first but now its not Jan 20 04:17:41 who would nullify my views pointer and why?" Jan 20 04:17:44 its not me Jan 20 04:21:19 actually my mview is null - the invalidates im getting happen every 3 or 4 seconds so android is invalidating the view every now and then for me Jan 20 04:21:57 my only invalidate call for this view is wrapped inside an if(null) and it IS null - even though the view itself exists. the reference to it is being nullified Jan 20 04:22:01 srsly. wtf over? Jan 20 04:23:18 why is my screen full of I440r's rantings ... Jan 20 04:23:20 mview is a reference to an instance of a mapView class. the class exists bcause i can SEE the image associated with it being updated Jan 20 04:23:38 why are you being a dick? Jan 20 04:23:50 catfight Jan 20 04:24:23 no not really. but im not spamming this channel im giving information about whats happening and asking for possible answers as to WHY it would happen Jan 20 04:24:35 if bankai_ has anything positive and helpful to say it would be appreciated Jan 20 04:24:42 i can't see any useful information - can you show us some code or a ST or something ? Jan 20 04:24:54 no i can not show you any code. whats an ST? Jan 20 04:25:23 ST - stacktrace Jan 20 04:26:51 its null throwing a null pointer exception on mview.invalidate(). ie between my onResume() where i init mview and the first invalidate the reference is being nullified Jan 20 04:27:01 the view is not be destroyed Jan 20 04:27:07 just its reference Jan 20 04:27:30 did you try turning it on and off again ? Jan 20 04:27:36 ? Jan 20 04:27:38 what is 'mview' ? Jan 20 04:27:56 an instance of a mapView class Jan 20 04:28:04 which is a custom view specified in my layout Jan 20 04:28:26 mview = findViewById(R.Id.mapView); Jan 20 04:28:49 i do that in my onResume. by the time i do an invalidate the mview reference to the view is NULL Jan 20 04:28:56 and im not nullifying it Jan 20 04:32:25 need to see some code Jan 20 04:32:58 findViewById(R.id.mapView).invalidate() is also throwing a null pointer exceptoion Jan 20 04:33:07 therefor SOMETHING is destroying the view Jan 20 04:33:18 and thers no logcat of anything causing that Jan 20 04:38:18 I440r: bankai_ is right, if you want help you should show the code, we can't speculate the unknown Jan 20 04:38:31 this code does not get shared lol Jan 20 04:38:45 im not asking "what did this" im asking "what COULD do this" Jan 20 04:39:21 your Custom View Jan 20 04:39:40 which i did not change and was working before. i undid the change i made yet the breakage stayed Jan 20 04:40:22 wait till you find that missing semicolon Jan 20 04:40:35 which the compiler would have warned me about :P Jan 20 04:40:41 erm the ide Jan 20 04:40:58 try using a real ide, throw away that eclipse crap your using and install intellij idea Jan 20 04:41:18 I did install AS at least Jan 20 04:41:19 even google thinks eclipse is a pile of crap which is why they are moving towards idea Jan 20 04:41:26 AS? Jan 20 04:41:27 I'm still new kindof Jan 20 04:41:38 oh Jan 20 04:41:40 android studio Jan 20 04:41:42 thats good Jan 20 04:41:44 thats IDEA Jan 20 04:41:49 I know Jan 20 04:42:18 at times like these the best way to solve the problem is to Jan 20 04:42:22 1: close the IDE Jan 20 04:42:25 2: open youtube Jan 20 04:42:30 3: open a bottle of JD Jan 20 04:42:34 4: watch a movie and get drunk Jan 20 04:42:36 I started android dev just before AS was out Jan 20 04:42:37 5: sleep on it Jan 20 04:42:54 im not exactly an expert at android dev :) Jan 20 04:43:16 still a beginner in eclipse, but I am more comfortable in eclipse still Jan 20 04:43:24 but thus far, with less than " <--- this much knowledge about NDK development... i think im the leading expert on it in here lol Jan 20 04:43:39 or else all the real experts are letting me flop around Jan 20 04:44:02 shmooz, do yourself a HUGE favor. UNINSTALL eclipse Jan 20 04:44:09 just rm -rf * inside its directory Jan 20 04:44:20 no way, I love my Juno Jan 20 04:44:23 get rid of it, stumble around in the dark of AS/IDEA till you get used to it Jan 20 04:44:35 your pain will never end Jan 20 04:44:44 I hacked it to have the dark theme Jan 20 04:44:54 felt like a hack anyway Jan 20 04:45:03 i downloaded a sublime text theme for intellij idea Jan 20 04:45:22 I use Darkula on AS Jan 20 04:45:34 that was easier than getting Eclipse to be dark background Jan 20 04:45:35 you HAVE to hack it to theme it and you cannot totally theme it Jan 20 04:45:42 and you cannot turn off folding Jan 20 04:45:44 at all Jan 20 04:45:53 well. you can turn it off for ONE FILE AT A TIME Jan 20 04:45:59 well I got the widgets a dark gray and the text area all black Jan 20 04:46:00 close that file and open it again and folding is enabled again Jan 20 04:46:02 good enough Jan 20 04:46:16 have you seen sublime text? Jan 20 04:46:26 no Jan 20 04:46:30 download it and check it out. its default color theme is about the best ive ever seen Jan 20 04:46:38 and now i have it in ST and IDEA Jan 20 04:47:33 hmmm Jan 20 04:48:20 yeah it does look nice Jan 20 04:48:59 is there an ST plugin for Eclipse too ? Jan 20 04:49:17 if you want to be totally blown away by that editors features Jan 20 04:49:27 click on the support tab in is web page Jan 20 04:49:44 and watch the "perfect workflow" vids linked there Jan 20 04:51:21 Hey guys Jan 20 04:51:54 I'm about to get an android phone to have along-side my iPhone which can be used for dev purposes Jan 20 04:52:18 I'm wondering if theres any benefit of one android over another for this purpose, I can't decide which to purchase Jan 20 04:52:23 Money is of no concern Jan 20 04:53:48 AllTuna: depends what you're doing really. can't go wrong with a nexus though Jan 20 04:53:51 depending on exactly what you're planning to develop, it doesn't really make all that much difference Jan 20 04:54:33 You want a phone specifically for dev? You're going to want to add a minimum phone to that list. A really cheap one to test on older devices Jan 20 04:54:38 it's possible - but not certain - you could find issues in the differences between vendor builds Jan 20 04:54:51 (like samsung) Jan 20 04:55:37 I don't really understand the whole android system ATM, vendors bring out their own firmware? Jan 20 04:55:41 I'm currently using and developing on the nexus 5. Straight from Google, pretty powerful, little bloat, and up to date Jan 20 04:56:27 Android is open source. Anyone can do... Uh... Anything before loading it on a device, right? Isn't that what Samsung does? Jan 20 04:56:32 What about screen-size, is there a benefit to having, 'the most popular size', how do you test on other sizes? Jan 20 04:56:33 AllTuna: companies take the google source code, add drivers for their device, add rubbish, then release Jan 20 04:56:48 if you're REALLY lucky you'll get a carrier branded, manufacturer branded, which is shit on shit :) Jan 20 04:57:54 The most popular size is difficult. Not only do the sizes vary greatly, but so do the resolutions and dpis. Remember, some people have Andriod on their watch, some on their TV Jan 20 04:58:15 AllTuna: you need to have a bit of a read of some of the developer docs, to work out how things like screen sizes work Jan 20 04:59:01 But will it affect my purchase? Jan 20 04:59:13 if you're only going to get 'one' device, then of course Jan 20 04:59:17 it depends partly on what you're planning to develop Jan 20 05:00:15 AllTuna: don't forget, there's always the android emulator. While it's rather painfully slow, it does allow to do things like see how you app looks in different screen sizes Jan 20 05:00:19 Well I'd want to hit as many devices as possible, do you guys have multiple sized devices to test on, is this required? Jan 20 05:00:22 You can emulate several devices, but this is slow. Idk guys, would that be a good way to go? Get the most popular size then just emulate 1:1 to check the rest and make sure it looks fine? Jan 20 05:00:24 in particular, it's probably more important if you're thinking games or other performance/media/custom-UI stuff... if it's a front-end for an existing network service, say, and you're going to use native widgets, it's less of an issue Jan 20 05:00:52 AllTuna: you can use the emulator for different sizes Jan 20 05:01:29 Also, is it a bad time to get a phone, should I be waiting Jan 20 05:01:38 many releases come around feb dont they? Jan 20 05:01:39 I'd get a Nexus 5 if I were you to start and then a old gingerbread 2.3 phone Jan 20 05:01:49 it's always a good/bad time to get a phone... if it's just for dev, it won't matter that much Jan 20 05:01:51 2.3? :S Jan 20 05:02:03 still at 21% Jan 20 05:02:11 Leeds, if I prefer it to my iPhone, It'll also become my dominant phone Jan 20 05:02:19 AllTuna: what sort of development? Jan 20 05:02:47 All sorts of app dev, app dev company startup Jan 20 05:02:58 I send shmooz, unless you specifically want a tablet Jan 20 05:03:25 Second * Jan 20 05:04:21 I have a HTC Panache 2.3 (canadian MyTouch 4G clone) phone with a Nexus 7 tablet myself, perfect :) Jan 20 05:04:38 Hows the G2>? Jan 20 05:05:51 Not too powerful. Can't run some Snes games in emulation that the s3 can, if that helps put perspective on it Jan 20 05:06:20 Hmm, but the HTC One can? Jan 20 05:06:55 HTC one of a pretty competent phone Jan 20 05:07:50 Geez, none of these phones are particularly beautiful.. Jan 20 05:07:53 Anyone here have experience with monodevelop without unity for Android development? Recommended or no? Jan 20 05:08:11 * bankai_ shudders at the thought Jan 20 05:09:15 QQuixotic: you'd like HuaWei Ascend P6, it looks like an iPhone Jan 20 05:09:32 or sorry that was to AllTuna Jan 20 05:10:20 that's probably the nicest huawei phone i've ever seen Jan 20 05:10:41 yeah it is nice Jan 20 05:11:00 I'm not going to be able to decide this.. Jan 20 05:11:40 AllTuna: you'd also like Sony Experia Z because its thin and waterproof Jan 20 05:11:50 Huge though Jan 20 05:12:37 oh ok then you want the Moto X Jan 20 05:12:58 damn I should work for T-Mobile or something Jan 20 05:13:20 What are your thought on the S4 Jan 20 05:13:41 get the google play edition Jan 20 05:13:45 i would highly highly discourage anyone buying a samsung :) Jan 20 05:14:10 bankai_, why Jan 20 05:14:10 Powerful, but a lot of bloat. Like... Just the most. Some of the features are rather nice, though Jan 20 05:14:19 haaan?/? Jan 20 05:14:55 AllTuna: they are just f'ing weird, back button is in a weird place, shit UI, but yeah as shmooz said go for the google play edition if you want one of those, less crud. Hardware is alright Jan 20 05:15:35 Not an option in Australia Jan 20 05:15:52 S4 is probebly the nicest design, and it helps that its so popular Jan 20 05:15:53 they don't have them in our store? meh go with a nexus 5 then Jan 20 05:16:14 in a fragment transaction the container argument in replace(R.id.container, new_fragment) is that container replaced, or the contents of it, leaving the container intact? Jan 20 05:16:59 Don't really like the look of the 5. I think for me its between S4, G2, HTC One Jan 20 05:17:12 In terms of screen res and performance how do they compare Jan 20 05:17:39 zzxx: just basic thing i know is that fragments are used to replace contents not the containers Jan 20 05:17:49 AllTuna: what about Moto X ? Jan 20 05:17:51 jaami-win: ok thanks! Jan 20 05:17:54 AllTuna: http://www.gsmarena.com/ use this site it'll give you a run down Jan 20 05:18:45 find page is nice of that site Jan 20 05:19:22 Ooh theres a dual sim HTC One, wish I could get that here Jan 20 05:19:34 check kogan Jan 20 05:19:48 I've gotta get this on a plan Jan 20 05:19:54 thats why money isn't an issue Jan 20 05:20:09 does anyone have any suggestions as to why getView() - called from within a fragment, and after onCreateView has finished executing - would always return null? Jan 20 05:20:10 (even though there should be a view tree available) Jan 20 05:20:14 well all i had to do to fix the null pointer was CLOSE THE EMU grrr Jan 20 05:20:18 and fire it up again Jan 20 05:20:21 stupid google Jan 20 05:20:45 AllTuna: Moto X is closest to Nexus and has more useful additions than Samsung, like waking up the phone while driving by talking to it Jan 20 05:20:51 Idk about Australia, but here in the US the cost they add to your monthly bill for phones virtually always is MUCH more than the unlocked phone Jan 20 05:21:08 QQuixotic, oh, I know, my parents are paying though haha Jan 20 05:22:20 Whats the learning curve of android development. I wonder if I should get it before or after releasing my iPhone app Jan 20 05:22:42 big one if you're coming from iOS ;) Jan 20 05:23:01 is ios easier, or just different? Jan 20 05:23:24 just different, some stuff easier, some stuff harder Jan 20 05:23:25 i found android easier than ios Jan 20 05:24:04 but really i have no experience of developing IOs app Jan 20 05:26:57 learn anything but not damn sencha Jan 20 05:27:04 i hate sencha Jan 20 05:29:52 i'm a newbie, isn't "setOnClickListener" an interface? Jan 20 05:30:55 OnClickListener is Jan 20 05:33:54 Has anyone else here had issues transitioning to Android Studio and getting an import error saying that Gradle 1.8 and higher is supported? I'm positive that my Eclipse and its ADT plugin is fully updated, I'm not sure where the issue is Jan 20 05:34:20 guifa: lots of people have that issue Jan 20 05:35:04 So long story short, skip out on AS for now til it's more stable? Or is there a quick fix? Jan 20 05:36:08 so whats the easy way to do sqlite? ormlite? Jan 20 05:37:08 guifa: check out http://tools.android.com/knownissues i think that explains it Jan 20 05:39:13 hehe, gotta love typos: "Note: You must use Gradle 1.9 with Gradle 0.4.0." Jan 20 05:39:34 can someone tell me what happens when the user clicks somewhere in the main_activity (supposing we've implemented onClick() ) actually i want to know what the role of setOnClickListener is. Jan 20 05:40:59 levo1: isn't it kind of self explanitory ? Jan 20 05:43:27 bankai_: what i don't get is this: when we click on the screen who detects the clicked coordinate? and then what button.setOnClickListener(l) means. i looked the documentation but wasn't much helpful Jan 20 05:45:25 setOnClickListener sets onClick handler for that view, in this case a button Jan 20 05:49:14 levo1: I'll take a stab at it: When a button is pressed. The button is able to let other classes in your program know this. It could be any class at all. However, the button is not going to go around and tell every single class in your program that it was clicked. 99% of the time the class will no care and it will be a waste of resources to do so.... Jan 20 05:49:52 Therefore, if a clas is interested in knowing whether or not a button was clicked, it can let the button know by registering itself with the button Jan 20 05:50:04 this is the setOnClickListener Jan 20 05:50:18 it is like telling the button that you want to know when it is clicked. Jan 20 05:53:18 zzxx: so it informs its own activity (button.setOnClickListener(this) ) why OnClick() gets loaded? i mean how the activity class knows it should run the OnClick() ? Jan 20 05:56:54 When the button is clicked, it goes through the list of all the objects that have called to setOnClickListener(View.OnClickListener) and calls the OnClick(View) function in them Jan 20 05:57:25 each class that wants to be called by the button when it is clicked must implement the View.OnClickListener Interface Jan 20 05:58:26 another clarification, the Activity class does not call the onclick method, the button does Jan 20 05:58:49 levo1: What ide are you using? Jan 20 05:58:56 zzxx: eclipse Jan 20 05:59:00 ADT bundle Jan 20 06:00:00 ah, ok, I was going to suggest somehting, but I do not know if it works in eclipse ADT. only Android studio :/ Jan 20 06:00:47 zzxx: i have some college c++ knowledge, and this way of doing things seems little odd to me. can you suggest something to study which helps me understand the concepts? Jan 20 06:01:05 d.android.com Jan 20 06:01:08 zzxx: because in Android books they don't tell such things Jan 20 06:01:30 zzxx: d.android.com doesn't explain the process, does it? Jan 20 06:02:13 levo1: youtube has live examples Jan 20 06:02:24 http://en.wikipedia.org/wiki/Observer_pattern Jan 20 06:03:02 i cant say for sure, but im pretty sure if you start at the beginning and work your way through, d.android.com should help you understand it. Jan 20 06:03:30 also shmooz has a good point. look it up on youtube Jan 20 06:08:38 zzxx: thank you very much for your helpful response Jan 20 06:09:43 levo1: no prob Jan 20 06:56:17 Why do I have to hit the run button twice in ADT/Eclipse? Jan 20 06:56:27 if I do it once, then it just runs the previous build Jan 20 06:57:44 anybody experience the same problem? Jan 20 06:58:05 not me Jan 20 07:00:41 happens with 3 different versions of ADT with 3 different PCs, so I'm guessing it's an issue with the phone Jan 20 07:00:50 but it's Galaxy Nexus :/ Jan 20 07:12:25 hmm Jan 20 07:13:08 it's coz eclipse is shit and probably fires off the cached pre-built copy it has Jan 20 07:31:12 Can I create AudioTrack with sample rate that's different from the native output sample rate? Jan 20 07:31:24 I don't want to bother converting Jan 20 07:31:59 What's the worst thing that could happen? Jan 20 07:34:35 You could destroy the universe Jan 20 07:35:17 sweet Jan 20 07:35:47 or create an audio file that regardless of source sounds like mickey mouse or satan Jan 20 07:40:34 What is the fastest/efficient method to abort an http request? Jan 20 07:40:58 I wish the documentation on AudioTrack was clearer... Jan 20 07:41:12 The least they could do is give sample code, but no... Jan 20 07:42:15 napster probably close the socket Jan 20 07:42:33 whacking it with a hammer is faster Jan 20 07:43:00 shmooz: how about using a Kalashnikov? :) Jan 20 07:43:06 System.exit(0); Jan 20 07:43:18 napster: even better Jan 20 07:43:27 lurkerzero, what's unclear about it? Jan 20 07:43:30 shoot the phone ;) Jan 20 07:43:54 g00s: Heres a use case. I have a view pager, and the user swiping around fragments randomly. Jan 20 07:44:11 Zharf: if I create AudioTrack with sample rate that's different from native sample rate, what happens? Jan 20 07:44:34 Does AudioTrack do the upconvert/downconvert automatically, or does it fail entirely? Jan 20 07:44:36 I need to abort an http request, as fast as possible when a fragment is out of view Jan 20 07:44:58 each fragment in the view pager triggers an http request Jan 20 07:45:08 in the onCreateView() Jan 20 07:45:52 it would also be fine to abort it, when the user "begins to swipe" Jan 20 07:46:21 lurkerzero, resampling happens Jan 20 07:46:22 it should happen as early as possible, for the upcoming fragment to fire a new request Jan 20 07:46:56 lurkerzero, the documentation says it supports from 1Hz to 2*native sampling rate, I have my doubts about 1Hz but it's been working fine for me in all cases Jan 20 07:47:48 napster i dont use http actually; so i'm not to familiar with what the libs do there, but i would imagine you would fire off a concurrent request and just ignore the original one Jan 20 07:48:07 Zharf: Oh yeah I see it under setPlaybackRate() function description Jan 20 07:48:13 that's good Jan 20 07:48:22 thanks :) Jan 20 07:48:33 g00s: hmm, that is what I currently have. But, in my observation, that eats up bandwidth. Jan 20 07:48:47 lurkerzero, no problem Jan 20 07:48:58 g00s: The http libs have two methods Jan 20 07:49:08 either abort the connection from the client object Jan 20 07:49:18 or close the request object. Jan 20 07:50:11 The earlier one uses the Connection Manager's abort() method Jan 20 07:50:36 napster seems like basic lazy loading stuff to me, i think there are livbs out there for that like retrofit ? Jan 20 07:50:44 x/abort()/shutdown() Jan 20 07:51:05 g00s: ok, let me check retrofit Jan 20 07:51:31 i thought one of the square libraries was for this and had a cache Jan 20 07:52:22 oh that was probably picasso Jan 20 07:52:36 g00s: Does volley have something? Jan 20 07:52:45 anyhow this isn't my area, yeah maybe look at that too Jan 20 07:52:55 napster: http://stackoverflow.com/questions/7007731/how-to-cancel-defaulhttpclient-execution-process-in-multithread Jan 20 07:53:15 shmooz: ok Jan 20 07:53:47 maybe its okhttp Jan 20 07:53:49 shmooz: I have infact came across almost all questions related to this on SOF Jan 20 07:54:06 ConnectionManager.shutdown() is somewhat slow in practice. Jan 20 07:54:14 I don't think it releases the connection properly Jan 20 07:55:00 g00s: ok looks like square does have some good stuff Jan 20 07:55:12 napster: he says later on that he solved it with AsyncTask's cancel() which calls onCancelled and he puts abort() in there Jan 20 07:55:32 shmooz: I used abort as well. :) Jan 20 07:55:52 in onCancelled ? Jan 20 07:55:54 I was just thinking if there exists a higher performance method or not Jan 20 07:56:25 well, abort() or shutdown(), all should be called from an onCancelled Jan 20 07:56:38 network on mainhtread is excepted from 4.0+ or something Jan 20 07:58:12 I came across this one yesterday : http://android-developers.blogspot.in/2010/07/multithreading-for-performance.html Jan 20 07:58:29 this is specifically for image loading in a listview Jan 20 07:58:48 but it does have some intuitive stuff in it. Jan 20 08:46:55 bankai_ reading another great UI book Jan 20 08:47:17 http://shop.oreilly.com/product/0636920032496.do Jan 20 08:54:56 Hi guys Jan 20 09:19:13 is there a simple way to get the GMT+x ID out of a TimeZone? Jan 20 09:21:43 Good morning. Anyone knows why my devices tend to show offline 90% of time. I have to reboot my pc/phones to get them working. I'm running debian linux. They used to work all the time on my laptop, but this pc is having problems. Jan 20 09:25:13 just restart adb service Jan 20 09:25:27 or if you haven't updated adb in a while do so Jan 20 09:32:11 lemonxah : I have restarted countless times, and it's up to date. Jan 20 09:32:29 Have tried most of I can think of and find in google Jan 20 09:33:15 did you install adb on debian? or are you using adb that comes with the sdk? Jan 20 09:33:32 First time I encountered "offline" problem, usualy it's just not detected or no permissions with "??????????" Jan 20 09:33:33 cause there is an adb package in debian but its outdated Jan 20 09:34:30 check your adb version Jan 20 09:34:35 with "adb version" Jan 20 09:34:38 It can also show as offline if the device was connected before unlocking the device (if you have a PIN lock on) Jan 20 09:34:44 lemonxah, I'm not using deb package. My version is "Android Debug Bridge version 1.0.31" Jan 20 09:34:52 hmm Jan 20 09:35:11 Or if you have Adb-over-wifi enabled Jan 20 09:35:16 On the device Jan 20 09:35:25 I have it on one of devices Jan 20 09:35:50 JuiceSSH, I'll try to remove see how it goes. Jan 20 09:36:10 How can I get both CET and GMT-1 if I get the available IDs from TimeZone.getAvailableIDs(int offsetMillis) Jan 20 09:36:20 that's not supposed to happen... Jan 20 09:36:24 imho... Jan 20 09:36:46 why? Jan 20 09:36:58 because CET is GMT+1 Jan 20 09:37:02 oh yeah, right Jan 20 09:37:16 JuiceSSH, no luck with that Jan 20 09:37:18 I subconsciously added the extra line there Jan 20 09:38:39 it gives me like 20 entries for africa, one for the atlantic, one for the arctic!, CET and Etc/GMT-1 Jan 20 09:38:40 Well it's not the end of the world. 2 out of 3 phones work (with reconnecting few times) and my VM works as well, but still kinda annoying Jan 20 09:38:41 ... Jan 20 09:40:47 ls Jan 20 09:41:01 ls: command not found Jan 20 09:41:29 ... is it possible that android handles GMT inverted internally? Jan 20 09:42:21 because honolulu which is GMT-10 is listed as ETC/GMT+10 Jan 20 09:43:17 that stuff is so confusing, i think everyone in the world should use the same timezone Jan 20 09:43:27 are you sure you're not just reading the offset backwards? Jan 20 09:43:34 and not more DST ! Jan 20 09:43:38 :P Jan 20 09:44:54 there are well over 1 billion people in UTC+8 with no DST :D Jan 20 09:45:04 Leeds I'm just printing whatever I get from TimeZone.getAvailableIDs(int offsetMillis) Jan 20 09:45:36 I mean.. maybe I could invert the offset Jan 20 09:45:54 but... CET is GMT+1, not -1 Jan 20 09:46:29 and when I set my phone to honolulu it even says it's -10, but when I print the time it's +10 Jan 20 09:47:36 How manage floating point data introduction and save in file where country uses ',' how decimal separator instead of '.' ? I'm developing a project in which using Italian like main language the decimal separator is ',' but in soft keyboard only '.' works. Overall when I do String.format("%f", x) I get 123,456 so ALL is a NIGHTMARE ... Jan 20 09:49:10 if i have a view in my xml and i have given the view a margin on the left will the margin area be counted as part of the overall width of the view? Jan 20 09:53:21 Hi all, whats the difference between fragmentTransaction remove fragment and fragmentmanager.popupbackstack? Jan 20 09:54:30 shineworld save floats in binary format ? Jan 20 09:54:48 string Jan 20 09:54:51 in XML format Jan 20 09:59:25 Save them in one format, always. Display using user Locale. Jan 20 10:02:56 shineworld so ime type is numeric but only '.' works in the soft keyboard ? Jan 20 10:04:25 shineworld i think you better store it in xml the right way ;) http://www.w3.org/TR/xmlschema-2/#float Jan 20 10:04:40 lexical rep: For example, -1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF are all legal literals for float. Jan 20 10:06:29 yes only . works ... I'm using: android:inputType="numberDecimal|numberSigned" Jan 20 10:06:56 I edit floating points without exponential so only "-123.456" Jan 20 10:07:22 man, i think android is buggy but … i find that hard to believe ! so if your phone is localized to italy, you can't type 123,456 ? Jan 20 10:07:33 Could someone please point me to tutorial or doc on how to create custom component that uses xml to define it's visuals. Jan 20 10:07:39 I've just now found that i can add "Locale.US" to format go get always floating points strings using '.' instead of country dependent char Jan 20 10:07:58 String.format(Locale.US, "%." + String.valueOf(decimal) + "f", v); Jan 20 10:08:13 in this way I can modify my software to use always US way Jan 20 10:09:39 My phone is localized "Italy" and when I use android:inputType="numberDecimal|numberSigned" I can enter only . and not ,... Jan 20 10:09:58 4.2.2 AOSP (almost AOSP because is a rockchip tablet) Jan 20 10:12:21 I guess the thing I'm looking for is "Compound Views" ? Jan 20 10:31:18 I'm using a relative layout to ensure that my ImageView is the same height as the layout, but then the width (using wrap_content) remains the same as the unscaled image width. The image is square, so how can I make the ImageView's width the same as the height? Jan 20 10:31:58 subclass imageview, override on measure, call super, call setMeasuredDimension(getMeasuredHeight(), getMeasuredHeight() Jan 20 10:32:51 jeez, I really have to subclass? Thanks Jake Jan 20 10:36:04 it's the easiest way Jan 20 10:36:12 only like 5 lines of code Jan 20 10:36:58 how far back does in app billing work? i cant seem to find that ibnfo Jan 20 10:37:07 info* Jan 20 10:38:48 stupid fucking android java bullshit. x += (y >> 1) where both x and y are integers and if y 1 odd, x is ROUNDED UP Jan 20 10:39:09 srsly wtf over? Jan 20 10:39:22 brx_: http://developer.android.com/google/play/billing/versions.html Jan 20 10:39:29 its a fucking INTEGER why is the y.5 rounded up! Jan 20 10:39:38 thanks karlsve Jan 20 10:39:40 because its an integer? Jan 20 10:39:49 what .5 <--- Jan 20 10:39:55 integers dont have fractional parts Jan 20 10:40:01 right Jan 20 10:40:16 11 >> 1 = 5 NOT 6 Jan 20 10:40:24 y.5 should be y not y+1 Jan 20 10:40:26 except in java where it = 6 Jan 20 10:40:41 I440r: thats what you mean right? Jan 20 10:40:59 i get 5 Jan 20 10:41:05 me too Jan 20 10:41:17 are you compiling to java 1.7? Jan 20 10:41:38 int x = 1; y = 5; x += (y >> 1); gives you what ? (thats not exactly the values im using) Jan 20 10:42:09 no im using java 6 i have no idea what 1.7 is Jan 20 10:42:17 its 7 Jan 20 10:42:19 why we have to have two sets of numbers for a java version i dont know Jan 20 10:42:20 it's java 6 rounded up Jan 20 10:42:25 hahahaha Jan 20 10:42:33 so java 6 is stupid Jan 20 10:42:34 got it Jan 20 10:42:44 fyi i got 5 as well doing 11 > 1 Jan 20 10:42:46 at one point they stopped using a completely new java version so its still version 1 but revision 7 Jan 20 10:43:55 so before i do y >>= 1 i have to first test for oddness and decrement the result of the shift it it was odd Jan 20 10:43:57 awesome Jan 20 10:44:15 /facepalm Jan 20 10:44:31 i got 3 for x = 1; y = 5; x+= (y >> 1) Jan 20 10:44:42 CallumTaylor, using which java Jan 20 10:44:46 1.6 Jan 20 10:44:55 on nexus 5 Jan 20 10:45:03 running ART on 4.4 Jan 20 10:45:14 got 3 too Jan 20 10:45:16 im not using art Jan 20 10:45:18 hang on Jan 20 10:45:22 4.4 is java 7 Jan 20 10:45:28 let me get the REAL values Jan 20 10:45:32 oh is it? I'm still compiling for 1.6 Jan 20 10:45:39 but the runtime is 7 Jan 20 10:45:46 ok Jan 20 10:45:47 the bytecode for shifting is exactly the same Jan 20 10:45:49 lol Jan 20 10:45:53 and 100% guarantee it's not broken Jan 20 10:45:55 yeah i wouldn't expect it to change Jan 20 10:46:24 maybe if you don't observe the value it won't change Jan 20 10:46:30 subclass ImageView isn't working for me, not sure what I'm doing wrong yet Jan 20 10:46:33 it doesnt really matter that much if you use art or not, just depends on the jre you build it upon Jan 20 10:46:37 gimme a min i have to move to the right location in the game for the values Jan 20 10:46:50 karlsve: no it matters what you run it on Jan 20 10:47:04 not really since the code didnt change Jan 20 10:47:15 it still uses the same baseline Jan 20 10:47:52 what? it's going to compile to ishr (int shift right) byte code whether you build with Java 1.0 or Java 1.8 Jan 20 10:47:54 karlsve: then what's the point of the java vm? Jan 20 10:48:02 what matters is how the runtime executes that bytecode Jan 20 10:48:04 I440r are you trying to optimize div by 2 or something ? Jan 20 10:48:24 g00s kinda. Jan 20 10:48:26 which is dumb, because the runtime will do that for you. you should just write / 2 Jan 20 10:48:32 yeah Jan 20 10:48:32 blah >> 1 is blah / 2 Jan 20 10:48:47 why would i use a divide instead of a shift? Jan 20 10:48:58 because the runtime will do a shift no matter what Jan 20 10:49:36 so you say use a div to make the sources more readable to others? Jan 20 10:49:55 the jit will optimize it to shifts / adds anyhow Jan 20 10:49:56 yeah, when it conveys what you are actually wanting to do Jan 20 10:49:58 that's all a high level language is you know Jan 20 10:50:05 i mean, sometimes you actually want a shift because you are doing a bunch of shifts Jan 20 10:50:20 in that case it's semantically more clear Jan 20 10:50:26 the real question is: why wouldn't you use a division? Jan 20 10:50:30 i spent 25 years of doing >> instead of /2 because im a LOW level coder Jan 20 10:50:38 when i see foo >>= 1 i see foo /= 2 Jan 20 10:51:30 ok HERES my code - x1 = (map.mapX << 4) - (vWidth >> 1) Jan 20 10:52:02 mapX is in 16x16 blocks. so to find the tile X coord of the block i multiply by 16 Jan 20 10:52:20 well if you are a low level coder you should know that any java runtime is going to delegate down to a native shift operation on a value. actually breaking that would require a lot of effort and explicit decisions Jan 20 10:52:52 i subtract from that half the width of the view. if the result is < 0 i clip to 0. if the result of x1 + vWidth is > the map width i set x1 = map with - view width Jan 20 10:53:25 what im doing is im setting up a source and destination rectangle Jan 20 10:53:32 based on my players location. Jan 20 10:53:52 if you want to multiply by 16 Jan 20 10:53:55 you multiply by 16 Jan 20 10:54:03 as i move right the part of the map i see moves left. except its not supposed to move left unless it HAS to Jan 20 10:54:07 such optimization is handled by the JVM Jan 20 10:54:24 well its saying theres no more room to display to the right of the player when thers still about 1/3 of the space available Jan 20 10:55:26 leaving optimizations like that "to mommy who kindly holds your hand" is bad form - java may do it but then you go code c or some other language and mommy doesnt always hold your hand to the same extent Jan 20 10:55:51 oh man Jan 20 10:56:04 does it work when you use normal mathematical operations? Jan 20 10:56:07 to think you've spent 25 years of your life on this and _nothing else_ Jan 20 10:56:11 im about to test Jan 20 10:56:19 have you ever done SQL? Jan 20 10:56:22 that's so unhealthy Jan 20 10:56:43 zaba wants to have any positive non bullshit flame input here? Jan 20 10:57:13 nobody can be better than you at the 'bullshit' part anyway Jan 20 10:59:21 I don't have an android runtime here right now, but both java6 and java7 on my workstation return 5 for 11 >> 1 Jan 20 10:59:54 fyi, zaba ill probably be developing this game for the next year or 2 before i can release it. Jan 20 11:00:42 you will never get anywhere if you'll be so preoccupied with irrelevant things Jan 20 11:00:54 right Jan 20 11:01:01 like your comments you mean Jan 20 11:01:02 got it Jan 20 11:02:33 you've spent at least 20 minutes on bit shifts and divison instead of writing proper code in the first place before I even started saying anything Jan 20 11:03:10 but yeah, my fault I guess Jan 20 11:03:49 where i come from shifting IS proper code and anyone who cant see see a divide by 2 when they see >> is a moron and shouldnt be coding Jan 20 11:04:27 Did it work with real math? Jan 20 11:04:34 no same result Jan 20 11:04:54 but i question my understanding of whats causing that result Jan 20 11:04:59 Stand back, I'm going to try REAL math. Jan 20 11:06:27 and what part of shifting isnt real math? your division does shifting for ALL divisors not just powers of 2 Jan 20 11:07:05 It's real math because it would have just saved me 20 minutes of my life from having this conversation. Jan 20 11:07:23 yet it didnt fix the bug so it was not ME that wasted your time Jan 20 11:07:34 It was. Jan 20 11:07:50 Now if you'll excise me, I need to bitshift my way into bed. Jan 20 11:07:54 http://persephonemagazine.com/wp-content/uploads/2012/10/kingofpopcorn1.gif Jan 20 11:07:55 then dont respond to anything i say and then YOU wont be wasting YOUR time Jan 20 11:08:14 Next TIME then i WONT Jan 20 11:08:35 non help and flames arent helping anyway so k Jan 20 11:08:56 you don't need help anyway, you know everything better than everybody here Jan 20 11:09:12 You came in guns blazing, pointing fingers at things someone whose spent 25 years writing bitshifts should clearly know is not at fault. Jan 20 11:09:33 Wow. Such funny. Much bitshift. Jan 20 11:09:43 lol Jan 20 11:09:52 wow much not help Jan 20 11:15:04 " At least one refrigerator was used to create a botnet that sent spam." Jan 20 11:16:02 Number of spam messages just increased by one Jan 20 11:16:18 lol Jan 20 11:16:35 why would Jan 20 11:16:42 a fridge have the functionality of an smtp server Jan 20 11:17:01 anyone using jenkins as ci? Jan 20 11:17:13 lemonxah: yup Jan 20 11:17:29 i am having the hardest time to tell jenkins where my android SDK is Jan 20 11:17:43 SimonVT you bust be part of the botnet :) Jan 20 11:17:44 my android-sdk-linux folder is in /opt Jan 20 11:17:52 You've got a couple of options: Jan 20 11:18:11 ANDROID_HOME, usually Jan 20 11:18:31 but when configuring jenkins when pointing it to /opt/android-sdk-linux it just says that doesn't look like a valid SDK root dir Jan 20 11:18:59 ANDROID_HOME points to android-sdk-linux/platforms iirc Jan 20 11:19:04 1) Install the Android plugin (easiest). Go to Manage -> Configure system. Add a global variable to ANDROID_HOME pointing to the SDK. Jan 20 11:19:18 mine points to : Jan 20 11:19:18 /var/lib/jenkins/tools/android-sdk Jan 20 11:19:47 kk thnx desarun Jan 20 11:19:57 Or add a global variable to the Jenkins's user's bash profile. Jan 20 11:19:58 let me try move it Jan 20 11:21:13 True, I wonder why mine points to platforms/. Jan 20 11:22:05 Hey, anyone have any idea why gradle has made this mess (and what to do about it)? http://picpaste.com/Q2j8HbAr.png Jan 20 11:23:16 wow, never saw anything like that before Jan 20 11:23:22 Ankhwatcher build from the command line ? Jan 20 11:23:33 do a import / refresh ? Jan 20 11:23:55 maybe shutdown as and rm .gradle or something Jan 20 11:25:36 I'm going to delete the build folder and re-open Jan 20 11:26:02 what's worse than all the errors is that the application builds and runs on the device Jan 20 11:26:10 shows google maps and everything Jan 20 11:27:17 dealing with small screens - how do Jan 20 11:29:35 Desarun, thnx now i just need to find out how to set ANDROID_HOME in jenkins Jan 20 11:29:43 or a global ANDROID_HOME in centos Jan 20 11:30:29 I'd go for global. When you come to troubleshoot builds on your CI machine, it helps if all the SDK tools are available in the terminal. Jan 20 11:31:18 Ankhwatcher also try 'gradle dependencies' i think Jan 20 11:31:59 can i add ANDROID_HOME to jenkins global env vars? Jan 20 11:32:06 But if you just want it in Jenkins, then append '/configure' to Jenkin's web page. You're looking for Gloabl Properties Jan 20 11:32:07 i have to go back to eclipse for an old project wish my luck Jan 20 11:32:14 ok win Jan 20 11:32:20 :) thnx Desarun Jan 20 11:35:10 Desarun, sry one more question .. how can i set my key.store.password from jenkins? Jan 20 11:36:30 CallumTaylor i did too the other day; i found it much faster than AS / gradle Jan 20 11:36:53 TimeZone.getDefault().getRawOffset(); includes UTC? Jan 20 11:36:56 developing android apps is all fun and games until somebody pulls out a galaxy ace Jan 20 11:37:16 lemonxah: At work we've got a custom build.xml file, which has an entry pointing to the keystore access details, such as cert location & keystore password. Jan 20 11:37:19 g00s: heathen Jan 20 11:37:47 maybe i should just setup a local.properties file withthe values :/ kk thnx Jan 20 11:38:13 just hoped there could be some jenkins plugin / tool hehe .. new to jenkins <-- dont know if you noticed hehe .. used to TeamCity Jan 20 11:38:18 lemonxah: but to be honest, release builds are done so infrequently I've just got scripts that do it all for me. SCP the file over to the system, run the script, SCP it back. Jan 20 11:38:48 lemonxah: https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin Jan 20 11:38:56 thnx Jan 20 11:43:34 hello guys Jan 20 11:44:06 I have a problem with characters on andorid app (Polish character). They aren't displayed properly Jan 20 11:44:44 how can I fix it ? Jan 20 11:55:58 i do know that there is a tabWidget/tabHost class where i can add tabs but the tab content needs to be an Intent. i do have a view which i want as content. THerefore i inherited from tabContentFactory and overrode the createTabContent method. Jan 20 11:56:24 how can i get the tab to recall that method (and get the new view variable this way) now? Jan 20 12:00:24 hi, im looking for a good library that can connect two to four devices with eachother for a turn-based game. How can i do this? Jan 20 12:00:49 would i always need to run a server for this? Jan 20 12:02:57 If they're all connected to the same WiFi, you could run some sort of UPNP server on one of the devices to coordinate between the other devices Jan 20 12:04:48 isn't that exactly what wifi direct is for? Jan 20 12:06:07 I know about wifi, i actualy came across alljoyn.. but i actualy want over internet Jan 20 12:06:23 its not for a realtime multiplayer game, but a turn based game Jan 20 12:07:04 issnt it possible that one player hosts a server on his device that others can connect? Jan 20 12:07:20 (well some kind of server) Jan 20 12:08:46 have a read: Jan 20 12:08:47 https://developer.android.com/google/gcm/index.html Jan 20 12:10:36 even more to the point: https://developers.google.com/games/services/android/turnbasedMultiplayer Jan 20 12:12:45 Leeds : what connection is that using? Jan 20 12:13:28 it's part of the play services, so it runs through Google's servers Jan 20 12:14:05 Christ, that pretty much does everything for you... Jan 20 12:14:41 Leeds : cool but what about the costs? Jan 20 12:14:50 free Jan 20 12:14:55 :O Jan 20 12:14:56 AFAIK... Jan 20 12:15:17 well, thank you :) Jan 20 12:15:25 ill give it a try. Jan 20 12:16:11 good luck Jan 20 12:16:27 if you fancy, let us know how it goes - I don't think many people here have experimented with that stuff Jan 20 12:18:02 yeah i will try to remember your name:) Jan 20 12:33:42 can i somehow force the tabhost to re-call createTabContent (tabContentFactory) to update the view? Jan 20 12:41:13 PatrickBic: you could remove a tab and add it again right? Jan 20 12:47:15 can someone help me fix this for DST? http://pastie.org/private/cvx1y2okyzr9z2vmikbja Jan 20 12:47:54 for some reason the if is never true Jan 20 12:55:34 I have the problem that daylight saving is already included in that utc offset, so I end up checking for the wrong timezone, but only if it's DST in the timezone I want to check Jan 20 13:07:34 I just need to find out if something saved as GMT+2 is actually GMT+2 or GMT+1 +DST Jan 20 13:12:38 Syzygy, use Calendar ;-) Jan 20 13:12:52 it has calendarVariable.get(Calendar.DST_OFFSET); Jan 20 13:13:05 either 0 or 360000 (1 hour)... Jan 20 13:21:02 Hey Leeds still there? Jan 20 13:21:07 yup Jan 20 13:21:35 I was thinking, is there a min sdk requirement for the google play game services? Jan 20 13:21:43 cant find anything about it.. Jan 20 13:22:21 API10, I think Jan 20 13:22:39 so you might have to skip the oldest 2.5% or so of devices :) Jan 20 13:22:57 "Devices running Android 2.3 or higher that have the Google Play Store app will automatically receive updates to Google Play services." Jan 20 13:23:53 aah cool Jan 20 13:23:56 thanks :) Jan 20 13:30:12 Hello, I have trouble setting up unit test using robolectric, I'm getting "java.lang.RuntimeException: Stub!" error. Here is my gradle build file https://gist.github.com/anonymous/cbcd861cf90bdf8f2283. Could someone help me, pls ? Jan 20 13:39:19 So I've imported a project to AS, and it's giving me a ton of errors due to duplicate classes because, well, there are, but they're supposed to be in different build targets/modules. This is code I downloaded directly from Google's source, and Eclipse/ADT wanted absolutely nothing to do with it (it recognizes that a project exists, but clicking finish to import is nonresponsive) Jan 20 13:40:17 ok so I am uploading a picture to the server-side and am using bitmap to convert it then into a byte array followed by converting it into base 64 and then plugging it into a json object and send it to the server Jan 20 13:40:24 problem it takes a longggg time Jan 20 13:40:34 those of y'all with kindle support, is there a way to use device identifiers for things like strings? so something like strings-kindle Jan 20 13:40:35 and 4 g's needed to describe the longness Jan 20 13:43:10 LoneSoldier728: sounds like you could either upload the raw bytes and have the server do base64 conversion, or put the upload in a service so the user doesn't notice the lag Jan 20 13:43:14 or more likely do both Jan 20 13:45:32 PatrickBic, so does TimeZone Jan 20 14:28:25 @TRomeo but I am trying to send it as a JSON Jan 20 14:30:06 LoneSoldier728: do you have any control over that? JSON is not the best format for an image... Jan 20 14:36:16 hey, is this a proper place to ask for android app development? Jan 20 14:37:15 I can transfer it as something else but not sure how to implement it Jan 20 14:37:48 hey, is this a proper place to ask specyfic questions about andr. app development? Jan 20 14:37:58 groundnuty: yes Jan 20 14:38:18 I using android sdk 3.6 with java 6. Trying to use the SessionLoginSample in the SDK and get this error Jan 20 14:38:19 and specifically how to accept it, because when I accept pictures from the website I use req.files Jan 20 14:38:19 https://gist.github.com/bubuzzz/88d931422209dea0d39d Jan 20 14:38:35 has anyone have the same problem ? Jan 20 14:39:22 I need to write an aplication, that would divide a tablet/monitor screen into 3 parts and play different movie/display piece of text in each Jan 20 14:39:42 bubuzzz: looks like it has something to do with your layout/fragment having a broken reference Jan 20 14:39:45 can anyone point me to some libs, examples, resources that might help? Jan 20 14:40:06 Hey guys, I'm getting an IllegalStateException: Fragment FilesTab not attached to activity. I have an TabsPagerAdapter extends FragmentPagerAdapter with getItem(0): return new FilesTab(); and I add the tabs with actionBar.addTab(actionBar.newTab().setTabListener(this)), how can I fix this? Jan 20 14:42:26 LoneSoldier728: I would look into using the apache HttpComponents library, particularly the MultipartEntity class Jan 20 14:53:03 Even onAttach is called (while and onDetach hasn't been called yet) and it crashes with that exception... Jan 20 14:55:58 I've added a TabContentFactory as a tab-content, but the createTabContent method gets only called once. How can i force an update? Jan 20 14:59:03 TRomeo I was trying to use Multipart class but it keeps showing as Jan 20 14:59:24 if it cannot be imported for some reason? Or do I need to include files or something for it to work Jan 20 15:01:23 LoneSoldier728You'll have to download and include the HttpComponents library on your classpath Jan 20 15:02:42 ah ok, do you have a link to it by chance Jan 20 15:04:02 LoneSoldier728 http://hc.apache.org/downloads.cgi Jan 20 15:04:04 Does anyone here have experience with the Android AccountManager? I have a best practices question about handling activities that depend upon the result of an AccountAuthenticatorActivity. Jan 20 15:05:18 Then ask the question Jan 20 15:08:22 Okay, I'd like my main activity to depend upon having the token, but I don't want to start loading everything into my activity before I have the token from my AccountAuthenticatorActivity. What's the best pattern to handle this? Someone suggested I should return and finish within onCreate but that makes the app closed when the user returns from authentication. Jan 20 15:10:39 How do I attach an activity to a fragment? Jan 20 15:11:04 CasW, you don't Jan 20 15:11:12 you attach a fragment to an activity Jan 20 15:11:25 http://developer.android.com/guide/components/fragments.html#Adding Jan 20 15:11:47 Ah, thanks, I'll read that thoroughly Jan 20 15:11:49 CasW: You can either add the fragment or replace a UI layout with the fragment Jan 20 15:12:03 CasW: or you can also add it to the layout XML Jan 20 15:16:02 Hmm, maybe I should load a dumb activity first and use it to pass the result of the AccountAuthenticatorActivity to the real activity? Loading my main activity is slowing down my AccountAuthenticatorActivity when it tries to run both at once. Jan 20 15:21:57 Any reason why a GestureDetector would only be triggered by swipes in the y direction and not x direction Jan 20 15:22:00 ? Jan 20 15:25:19 Ah it's my ViewPager intercepting them Jan 20 15:25:26 kthxbai Jan 20 15:27:25 !slap PatrickBic Jan 20 15:27:31 du auch heir? :P Jan 20 15:27:35 nein. ;-) Jan 20 15:28:08 livinskull, hilf mir lieber ;-) Jan 20 15:30:24 notifydatasetchanged? Jan 20 15:30:33 jein, das geht ja nicht Jan 20 15:30:33 @PatrickBic Jan 20 15:33:34 ich nutze ja eine TabContentFactory aus genau dem Zweck das ich das unter Laufzeit aendere.. aber scheinbar geht das so nicht Jan 20 15:33:47 kp noch nie mit dem tab zeugs gearbeitet Jan 20 15:35:36 hello there. anyone has an insight how the values defined in xml files are accessed by the running application? Jan 20 15:36:06 basically, the class(es) responsible for painting the layouts use resources themselves or..? Jan 20 15:37:12 soo, LayoutInflater perhaps Jan 20 15:39:22 or are those values even compiled into the layouts during the build process.. Jan 20 15:41:25 what would be the safest way to store user credentials on a device so a user doesn't have to log in every time they launch the app Jan 20 15:42:39 depends on how sensitive/valuable the credentials are Jan 20 15:44:06 ICBM launch credentials vs bank account login vs virtual fluffy bunny game login Jan 20 15:44:34 right, yeah, nothing absolutely vital, but I like to be secure regardless Jan 20 15:44:35 does some bank's application allow credential saving? :D Jan 20 15:44:42 :DDD Jan 20 15:44:46 yeah lol that would be terrible Jan 20 15:45:03 Just save to e.g. shared prefs Jan 20 15:45:07 I suppose if someones device is compromised they've got bigger things to worry about anyways Jan 20 15:45:11 SimonVT: just plaintext? Jan 20 15:45:14 As long as it's internal storage Jan 20 15:45:19 okey dokey Jan 20 15:45:38 Unless you can get a token from the server, just plaintext Jan 20 15:45:59 windy: https://developer.android.com/reference/android/accounts/AccountManager.html Jan 20 15:46:09 Otherwise you'd have to hardcode some hashing scheme into your app.. That'd offer 0 extra security Jan 20 15:46:22 SimonVT: i'm writing the backend too, I was thinking about generating a request token but that would only really complicate things and not really solve anything Jan 20 15:46:37 if someone gets the token they can still make requests to the server anyways Jan 20 15:47:33 You can invalidate tokens Jan 20 15:47:38 you can revoke... right, that :) Jan 20 15:47:38 windy: You can use the built-in Android AccountManager, but the docs can be somewhat painful. I'm working through it myself. Jan 20 15:47:38 And they wouldn't have the password then Jan 20 15:47:46 well... revoking token is cleaner. Jan 20 15:47:51 and easier. Jan 20 15:48:02 if you invalidate user's password, they can't create a new token. Jan 20 15:48:13 Google, facebook, etc.. All uses tokens.. Password isn't saved on device Jan 20 15:48:13 but user with secret password can create a new token, if revoked. Jan 20 15:48:18 windy: here's a good blog on letting the Android OS manage tokens and passwords for you: http://udinic.wordpress.com/2013/04/24/write-your-own-android-authenticator/ Jan 20 15:48:22 for example, if used from two countries at the same time etc. Jan 20 15:48:31 so... using access tokens really solves something. Jan 20 15:48:34 whats the best way to generate a token server-side Jan 20 15:48:53 windy: That's not an Android problem. Jan 20 15:49:17 windy: You can use OAuth 2.0. It seems to be the standard these days. Jan 20 15:49:20 ColinTheShots: the article also suggests AccountManages, as I did. Jan 20 15:49:52 a token can literally be anything you like Jan 20 15:49:57 the auth check is done server side Jan 20 15:50:52 Authentication is a large topic.. You need to do some research if you're implementing it yourself Jan 20 15:51:00 windy: Pick your favorite server language... PHP, rails, Java, etc. There will be docs and libraries for writing an authenticator on the server side. Jan 20 15:51:11 I think the basic advice is don't do it yourself, use google login or something like it Jan 20 15:52:44 the most common is twitter/facebook Jan 20 15:55:12 Hmm, I still get IllegalStateException, even while I instantiate the Fragment with Fragment.instantiate(Context mContext, String info.clss.getName(), Bundle info.args) Jan 20 15:55:43 And the onAttach is called, and it even attaches the right activity... Jan 20 15:56:04 CasW: Is the fragment in your xml layout or are you using a fragmenttransaction? Jan 20 15:56:22 Er, neither Jan 20 15:56:53 CasW: Sounds like you need to read the docs... You shouldn't probably be calling .instantiate... that's not how it's done. Jan 20 15:57:09 I'll look further Jan 20 15:57:23 Calling instantiate wouldn't cause issues Jan 20 15:58:48 yes, but he it sounds like he isn't including the fragment properly Jan 20 16:03:57 hello, is there a way to use android:largeHeap on manifest with API lvl 8 ? Jan 20 16:05:33 nope Jan 20 16:05:54 You can add it, it just wont do anything Jan 20 16:07:53 so there isnt any other way to increase heap size ? :/ Jan 20 16:08:16 No Jan 20 16:08:19 Just use less memory Jan 20 16:08:24 yeah :p Jan 20 16:08:33 but was looking for wuick fix Jan 20 16:08:37 quick* Jan 20 16:08:48 while doing the big fix Jan 20 16:08:51 nvm then Jan 20 16:22:37 Say I have an ImageView and I want to start off zoomed into a sub-rectangle within it. How would I go about animating movement from the starting rectangle to another rectangular part of the image that scales and transforms to fit the rectangle to the screen? Jan 20 16:23:24 guys, what is the best way to check particular preference in onSharedPreferenceChanged? I can do key.equals(STRING_HERE) but it looks ugly as I'd have to hardcode key value in there Jan 20 16:25:16 Groan... I went from no activity attached to activity already attached... What am I doing wrong? http://pastebin.com/QUUPad2Q The addTab method is called exactly once per tab in TABS Jan 20 16:26:40 <_genuser_> heya devs, anybody here signed up for dev account for play store? Jan 20 16:27:36 CaptainFarrell I usually keep a Constants class with public static final strings for my preferences keys Jan 20 16:27:39 prevents hard coding Jan 20 16:28:46 TRomeo, obviously..silly me. Cheers! Jan 20 16:29:05 cheers! Jan 20 16:33:04 what is the difference between a geofence and a proximity? Jan 20 16:36:17 How to test the Application Licencing when application is in draft? Jan 20 16:36:46 I've been used to head geofencing mostly in gps applications while proximity could be networks like wifi, bluetooth, cellular or in some cases nfc etc. Jan 20 16:36:57 zquad: not an expert, just guessing. Jan 20 16:37:30 thanks hokkaido, I dont know if its just a terminology thing of if there is a difference Jan 20 16:38:23 yeah. well, there might be an intended difference, but people are using them wrong :) Jan 20 16:38:27 I believe it's basically the same thing, geofences are just managed by play services Jan 20 16:38:30 More battery efficient Jan 20 16:40:12 Thanks Simon Jan 20 16:40:16 (I think) Jan 20 16:40:21 Isn't proximity just a distance from an arbitrary point? Whereas geofences are arbitrary polygon? I've not used them but that's the impression I got Jan 20 16:40:52 hmmm you might be right guifa, one is a single point, one is a polygon Jan 20 16:43:12 I believe geofence is still just a point and a radius Jan 20 16:45:25 Does it forget proximity alerts if your process is killed? Jan 20 16:46:36 android heap isnt supposed to be limited to 64mb ? Jan 20 16:47:16 because i got a 64mb heap size on galaxy s3 and 70mb on galaxy s4 Jan 20 16:47:16 The heap can vary based on device and android version Jan 20 16:47:22 for same android version Jan 20 16:47:27 oh ok Jan 20 16:47:56 There's a method to get heap size somewhere Jan 20 16:48:35 im using heap tab on eclipse for that Jan 20 16:48:38 I guess heap is mostly based on display resolution Jan 20 16:48:48 it, after all, controls the sizes of assets you deal with Jan 20 16:49:44 Yeah Jan 20 16:50:34 I think it's 192 MB on n4 and n5 running kitkat Jan 20 16:51:05 it's in android.os.Debug Jan 20 16:51:17 Debug.getNativeHeapAllocatedSize() Jan 20 16:51:23 and so forth Jan 20 16:51:37 getNativeHeapFreeSize()... Jan 20 16:52:05 use ALL the heap! Jan 20 16:52:10 all the heap! Jan 20 16:52:11 then OOM Jan 20 16:52:30 There's also ActivityManager#getMemoryClass Jan 20 16:52:36 Returns heap in MB Jan 20 16:52:54 theres also and Runtime.getRuntime().totalMemory() Jan 20 16:52:57 then there's new Random().nextInt() to get how much memory you have allocated for your app Jan 20 16:53:07 and maxMemory and freeMemory Jan 20 16:53:09 / return 4 Jan 20 16:53:22 ooh Callum I'll use that one next Jan 20 16:53:49 lol SimonVT Jan 20 16:53:59 how the hell does random.nextint get the memory for your app? lol Jan 20 16:54:07 chosen at random by fair dice roll Jan 20 16:54:19 i understood that reference Jan 20 16:54:33 ^_^ Jan 20 16:54:37 Q__Q Jan 20 16:54:42 you understand xkcd. this is good. Jan 20 16:54:56 i am a smart man Jan 20 16:55:14 and well read too, obvs Jan 20 16:55:18 i'm not Jan 20 16:55:21 I was looking for ideas on my final year Android project, and I happened to find an ideas list on some obscure corner of the interwebz. (Ok, not that obscure). One idea that caught my eye was fake currency recognition. It got me thinking...apart from the obvious requirement of a camera and an image processing algorithm, hypothetically, how would I go about it? Jan 20 16:55:59 how would you go about what exactly? recognizing fake currency? like counterfeited? Jan 20 16:56:17 pictures of cats - for marketing. and meowing. Jan 20 16:56:19 nebs: yep Jan 20 16:56:24 I'm sure there's an emacs command for that Jan 20 16:56:41 a team of lawyers, to ensure you don't get sued when your app doesn't work and somebody accepts take money Jan 20 16:56:59 storkme: Very tongue in cheek. Jan 20 16:57:02 But noted. Jan 20 16:58:30 Hey all Jan 20 16:58:38 VaticanCameos: if it is monopoly money, show "fake!". if it is not, say "not monopoly money!" Jan 20 16:58:44 helo: lol Jan 20 16:59:16 Can you suggest me best android book for animation? Jan 20 16:59:18 You'd need more than just a camera to detect if it's fake Jan 20 16:59:18 I guess that project idea's a no-go then. Jan 20 16:59:19 that app sounds better in every way. Jan 20 16:59:31 you can't really tell by just looking, so expecting software to do it visually is kind of unrealistic Jan 20 16:59:32 SimonVT: I just realized that. Jan 20 16:59:42 you should make an app that detects sarcasm Jan 20 17:00:17 CallumTaylor: That would be a favourite now, wouldn't it? Jan 20 17:00:39 yeah, totally Jan 20 17:08:44 I'm out of ideas. What would be a realistic idea to implement (atleast partially) in 5 months time? ._. Jan 20 17:08:50 anyone know how to delete a Module in Android Studio? I delete it from the file system and it comes back. I removed it from Project Structure and its still there. WTF? Jan 20 17:13:07 n/m i found it. manually edit modules.xml in /.idea folder Jan 20 17:21:25 that shouldn't be necessary... Jan 20 17:21:31 guys ftp or multipart entity transfer for images? Jan 20 17:21:36 just hit - on the module and ok the dialog and it goes away... Jan 20 17:21:43 LoneSoldier728, depends on your service interface Jan 20 17:21:55 ftp isn't really suitable for most things Jan 20 17:22:53 hm, ok pfn can you look at this and tell me how to improve it Jan 20 17:22:59 noi Jan 20 17:23:00 http://stackoverflow.com/questions/21235715/how-to-upload-a-picture-in-android-through-json-my-current-method-takes-a-long?noredirect=1#comment31990307_21235715 Jan 20 17:23:22 I have images uploaded to server via base64 but it takes 30 sec plus Jan 20 17:23:27 im trying to make it faster Jan 20 17:24:28 is it your own server? Jan 20 17:24:33 LoneSoldier728: why do you do base64 encoding? Jan 20 17:24:44 to turn it into a string Jan 20 17:24:49 err.. why Jan 20 17:24:50 base64 an image and then uploading will cause a mountain of issues Jan 20 17:24:51 so I can put it into a JSON Object Jan 20 17:24:57 mainly OOM Jan 20 17:25:15 well I am up to a better suggestion Jan 20 17:25:24 I need to just send the info and the image together Jan 20 17:25:35 in the same post Jan 20 17:25:36 you post the image on its own using form data and streams Jan 20 17:26:03 i don't think you can mix content types in a single post request Jan 20 17:26:17 one can of course send a mime part that is json and another that is binary data Jan 20 17:26:22 the server just has to know what to expect Jan 20 17:26:22 yeah Jan 20 17:26:48 well yeah, I am saying the server needs to accept both at the same time so it can know the image belongs to the following info Jan 20 17:28:20 is multipartentity builder Jan 20 17:28:23 a better solution? Jan 20 17:28:28 anyway with smart usage of good APIs it would be possible to encode a base64 string without using much memory Jan 20 17:29:47 you'd just send the part of the request before the json, then in a loop read part of the file and then spit out the base64 version, and then send the rest of it Jan 20 17:30:00 but most APIs are not designed like this because that would be pretty cumbersome Jan 20 17:30:16 http://stackoverflow.com/questions/18964288/upload-a-file-through-an-http-form-via-multipartentitybuilder-with-a-progress Jan 20 17:30:20 is something like this better? Jan 20 17:35:01 did anyone else see their javadoc hover stop working then get it fixed in eclipse? Jan 20 17:35:21 What's causing the IllegalStateException: Fragment already added exception in http://pastebin.com/BfBGbaca? Jan 20 17:36:20 You adding fragments manually Jan 20 17:36:30 That's handled by FragmentPagerAdapter Jan 20 17:37:18 Is it possible to implement biometric recognition by touch in an Android device? Or is it dicey? Jan 20 17:37:25 Ah, that sounds logical. Jan 20 17:37:52 VaticanCameos: still trying to think of a project? Jan 20 17:38:01 CallumTaylor: Well yes. Jan 20 17:38:04 what about Jan 20 17:38:06 now this isn't pratical Jan 20 17:38:13 but an app that sends messages via light Jan 20 17:38:18 and the other receives it via the camera Jan 20 17:38:19 Like morse code? Jan 20 17:38:21 yeah Jan 20 17:38:27 Hmmm Jan 20 17:38:38 That sounds kinda cool. Jan 20 17:39:46 Hah, that'd be fun Jan 20 17:40:01 shit Jan 20 17:40:07 I could put a finger on the camera sensor and shift it away, repeat ad nauseam, to generate morse code. Jan 20 17:40:08 Make a chat app where the two clients communicate via flash/camera Jan 20 17:40:10 i should have kept it for myself Jan 20 17:40:19 Kinda useless, but fun Jan 20 17:40:20 Now everything works perfectly :-D To think that I wasted so much time on that... Jan 20 17:40:42 well uni projects aren't really supposed to be practical Jan 20 17:40:46 Does anyone know how to set an ImageView to constantly bounce up and down? Jan 20 17:40:49 Yeah Jan 20 17:40:51 SimonVT: Practically it isn't of much use Jan 20 17:40:52 they just have to follow and show off a set of stuff Jan 20 17:41:04 CallumTaylor: You got that absolutely right. Jan 20 17:41:17 as long as you do that you could make anything Jan 20 17:41:23 If this becomes the next big thing, I'm going to log this IRC chat in the app's About section. Jan 20 17:41:24 you could make your own language like brainfuck if you wanted Jan 20 17:41:33 remember to put my name in the footnotes Jan 20 17:41:39 Absolutely. Jan 20 17:42:21 Already saved the chat :D Jan 20 17:42:31 and a link to my website http://callumtaylor.net ;) Jan 20 17:43:06 Holy shit. Jan 20 17:43:09 That is an awesome CV. Jan 20 17:43:15 heh thanks Jan 20 17:43:24 do you guys bother to support Gingerbread in your apps? I see the market share is at ~21%, which isn't insignificant. Jan 20 17:43:30 yeah :/ Jan 20 17:43:41 once its down to 5% we'll drop support Jan 20 17:43:51 i keep trying to push it based off our app stats rather than the dashboard stats Jan 20 17:43:55 our own stats its more at 13% Jan 20 17:44:39 If you're releasing now, don't bother Jan 20 17:44:44 thanks. I'm looking into using the Search widget which isn't supported prior to v3. Jan 20 17:44:46 i really wish i could Jan 20 17:44:52 If you already support it, look at your own stats, like CallumTaylor, and make a decision based on that Jan 20 17:44:59 at least I'm on AS now which is a step forward Jan 20 17:45:15 I'm still targetting eclair Jan 20 17:45:24 wow Jan 20 17:45:27 It would seem that Gingerbread usage would consist of less savvy users or a demographic that doesn't want to pay up somehow. Jan 20 17:45:56 at least for the type of app I'm building... if you're cool w/ gingerbread, you probably wouldn't buy my app to begin with Jan 20 17:46:09 but thats just a gut feeling. no stats. Jan 20 17:46:12 CallumTaylor: Nice stock photos. Jan 20 17:46:16 :) Jan 20 17:46:18 Especially Santa spanking a naughty girl. Jan 20 17:47:31 One more thing. I could implement a Morse code recognition engine which works by light *and* by sound. Jan 20 17:48:03 that'd be cool Jan 20 17:48:07 Innit? Jan 20 17:48:21 you could implement your own serialisation to send small files somehow also Jan 20 17:48:24 using sound Jan 20 17:48:40 mixture of pitch, frequency etc Jan 20 17:48:53 but I'm talking like < 1k Jan 20 17:48:56 Serializing sound? Jan 20 17:49:06 no serialising a file into sound Jan 20 17:49:08 CallumTaylor, you mean like a .... modem? :P Jan 20 17:49:09 or some data Jan 20 17:49:09 o.O Jan 20 17:49:14 yeah exactly Jan 20 17:49:58 damn been so long since i've had to use a modem, completely forgot we even had to use theme Jan 20 17:50:04 s/theme/them Jan 20 17:50:13 VaticanCameos: I'm interested in this Jan 20 17:50:20 really interested Jan 20 17:50:29 So..uhh...I could write stuff in a file, and convert it into equivalent Morse sound Jan 20 17:50:57 File encoding/format depends. Like you said. Jan 20 17:51:23 I'm having a geekgasm. Damn. Jan 20 17:51:32 one cool thing i made ages ago, converting a file into an image: http://callumtaylor.net/#/software-portfolio/Byte%20Converter/ Jan 20 17:52:00 burmat: It doesn't have a lot of practical use though. Jan 20 17:52:08 the command line tutorial is much better though because it uses threads Jan 20 17:52:23 Unless one implements it as a personal safety system or something...in trouble, use morse code and broadcast the message. Jan 20 17:55:34 wow pfn scala turned 10 today (depending on how one dates it) Jan 20 17:56:21 How practical would a personal safety system be which uses Morse code? Jan 20 17:56:28 It sounds exciting but would it be practical? Jan 20 17:56:52 is practicability one of the requirements? Jan 20 17:57:13 CallumTaylor: Not really. But we do have some thickheads here, especially the head of department. Jan 20 17:58:23 I was just wondering if the system is capable of being extended into something really useful. Jan 20 18:01:27 home time, good luck with your project hunt Jan 20 18:02:42 CallumTaylor: Thanks for the heads up Jan 20 18:22:11 are the google guys on vacation today? Jan 20 18:22:19 Okay, so here's a good one; I keep getting a VerifyError (http://pastebin.com/BvjM1wry) in the constructor of HttpHandler (http://pastebin.com/r3K4T158) even before the first command of the constructor is called! (Or actually, after the command directly before constructing an HttpHandler) Jan 20 18:25:52 hi . where are new localisations developed? i cannot (don't know how) search in android-review.googlesource.com and i do not see a language in https://android.googlesource.com/platform/packages/apps/Settings/+/master/res/ Jan 20 18:27:17 CasW: What api level are you on? Jan 20 18:27:35 API level 10, Gingerbread Jan 20 18:27:46 Makes sense Jan 20 18:27:53 Pray, do tell! Jan 20 18:28:02 NetworkOnMainThreadException doesn't exist on api level 10, so it can't resolve it Jan 20 18:28:31 Looks like that causes an anonymous inner class of ItemLister to be evicted Jan 20 18:28:33 why would you.... Jan 20 18:28:37 want to do that Jan 20 18:28:50 Ah, that indeed does make sense! I think I know what the problem is, then. Somebody else added it somewhere, a catch. Jan 20 18:28:51 But yeah, why catch NetworkOnMainThreadException Jan 20 18:28:57 Just don't do networking on the main thread Jan 20 18:29:09 If you accidentally do you want it to fail fast Jan 20 18:29:22 The dirty fix for a problem I made earlier, he thought he'd quickly fix that... Jan 20 18:29:42 I know, I misplaced the call on the callback and that caused some problems when I was away Jan 20 18:31:21 But thanks a lot, it fixed my problem! (Now onto other errors...) Jan 20 18:32:53 And you learned how to read verify errors :) Jan 20 18:33:39 Jup, I did :-) Jan 20 18:33:44 g00s, indeed, it's not like it's a young language Jan 20 18:34:33 SimonVT, eh? but it does... Jan 20 18:34:41 SimonVT, it exists since api9... I thought Jan 20 18:35:26 Now a practices question; what's the best way to change a view from another thread? (I'm getting an android.view.ViewRoot.CalledFromWrongThreadException...) Jan 20 18:35:30 Nope Jan 20 18:35:53 Network on main thread doesn't actually crash in gingerbread Jan 20 18:36:03 But if your targetSdk is 10 it will crash on api11+ Jan 20 18:36:18 CasW, call it on the right thread Jan 20 18:36:32 Yeah, I got that far, but how? Jan 20 18:36:37 hmm, I don't remember that behavior Jan 20 18:37:25 I tested it once, and as far as I remember that's how it works Jan 20 18:37:47 (This was by default btw, dunno if you can change that by calling some StrictMode methods Jan 20 18:38:05 hi . where are new localisations developed? i cannot (don't know how) search in android-review.googlesource.com and i do not see a language in https://android.googlesource.com/platform/packages/apps/Settings/+/master/res/ Jan 20 18:38:18 SimonVT, yeah, I just saw that it was added in api11, weird Jan 20 18:41:17 Seems there's a detectNetwork() method since api 9 Jan 20 18:41:48 they say that tatar localisation is almost ready . why it is not in https://android.googlesource.com/platform/packages/apps/Settings/+/master/res/ ? Jan 20 18:44:42 Android isn't developed in the open, it's pushed there when new versions are released Jan 20 18:49:08 in my app, the navigation bar icons are collapsing to dots after a few seconds of disuse, and the client doesn't want this, but I can't find what's causing the behavior. anyone got any ideas? Jan 20 18:51:01 JimmyThickNThin1, are you using SYSTEM_UI_FLAG_LOW_PROFILE? Jan 20 18:51:02 can anyone on here help me with my local_manifest? Jan 20 18:51:27 thundar97, paste it and post the link Jan 20 18:51:48 https://www.irccloud.com/pastebin/oANnPjAU Jan 20 18:52:17 I get : error cannot fetch for all the repsitories i included. Jan 20 18:52:32 and also get a message saying that none of the repos can be found... Jan 20 18:53:46 thing is if I take the "name" value, and paste it into the github url, I find the appropriate repo... Jan 20 18:55:14 EPG, I think that's it, thanks, testing now Jan 20 18:55:22 does the link work EPG? sometimes they do not... Jan 20 18:56:01 thundar97, I think #android-root is the right place for your issue Jan 20 18:56:46 http://stackoverflow.com/questions/21241335/custom-actionbar-font?noredirect=1#comment31998028_21241335 Jan 20 18:57:45 i'll ask... Jan 20 18:57:50 thanks EPG Jan 20 18:57:54 nvm Jan 20 18:58:02 MrMeTooo, maybe http://stackoverflow.com/questions/8607707/how-to-set-a-custom-font-in-the-actionbar-title ? Jan 20 18:58:07 nvm what? Jan 20 18:59:00 thundar97, in response to "thanks EPG" Jan 20 18:59:29 EPG, does it have to be a min version? my min version is sdk 11 Jan 20 18:59:58 that was another i tried to implement Jan 20 19:01:45 MrMeTooo, does the solution I linked not work for 11? Jan 20 19:03:33 Im going to ty that one again I tried it earlier this morning Jan 20 19:04:12 ok, if you have errors, please paste the corresponding logcat output somewhere Jan 20 19:08:48 EPG, Will do Jan 20 19:23:13 Hi! I'm working on an app that is have a auth system based on google+ sign in... But I don't know how to manage the flow between checks and activities. By now, I have created a login activity that checks if the user is logged in to redirect to the main activity. Jan 20 19:24:28 <_genuser_> anybody done the dev registration for play store? Jan 20 19:26:49 _genuser_ yes? Jan 20 19:27:37 <_genuser_> TRomeo: I have made a payment online. I saw a $1 charge in my credit card transactions. Then it was reversed. But the $25 hasn't been charged yet. Jan 20 19:28:05 _genuser_ how long ago did you make the payment? Jan 20 19:28:07 tuliohmendes see how the iosched app does it Jan 20 19:28:08 <_genuser_> TRomeo: curious, if you know why the $1 then reversal. And why not just charge the fee. And doe sit really take 48 hours like the site says? Jan 20 19:28:18 <_genuser_> TRomeo: payment was made 3-4hrs ago. Jan 20 19:28:43 g00s: I will take a look (: Jan 20 19:28:46 thanks Jan 20 19:28:55 credit card billing can be a little weird, I wouldn't worry about it unless the charge is still missing after 2 days Jan 20 19:29:31 <_genuser_> TRomeo: alrighty. guess I was "eager" to upload my apk. leave it to google to make you eager to pay money Jan 20 19:29:36 also you should have at least some of the dev features immediately (like google play games) so you won't have to wait 48 hours for everything Jan 20 19:29:43 you can try uploading an apk, it may work Jan 20 19:29:55 <_genuser_> yeah, it says you can upload it, etc. but you cannot publish it just yet. Jan 20 19:30:23 yep, you'll have to wait. Sorry _genuser_ :( Jan 20 19:30:59 <_genuser_> it's alright. :) I was just curious if anyone else had seen the $1 charge, then reversal before an actual charge. Jan 20 19:32:19 https://www.irccloud.com/pastebin/5dNsdcR8 Jan 20 19:35:51 EPG, I am not getting any errors but its not using the selcted font Jan 20 19:36:01 http://stackoverflow.com/questions/21241335/custom-actionbar-font?noredirect=1#comment31998028_21241335 Jan 20 19:44:48 hi guyes Jan 20 19:44:56 was wondering if you could help me figure out what's going on with my layout Jan 20 19:45:02 hi, need to turn off timeout of emulator, how to do it? Jan 20 19:45:18 the xml: http://hastebin.com/wiwajamope.xml Jan 20 19:45:45 jaami-win: http://stackoverflow.com/questions/8207589/application-failed-on-emulator-to-launch-due-to-time-out Jan 20 19:46:11 thanks Jan 20 19:46:17 rager: what's the issue? Jan 20 19:46:39 well, I can't seem to find a layout that gives me both the HListView and the ViewPager on the screen and usable at once Jan 20 19:47:02 what I want to have is the ViewPager taking up must of the available screen Jan 20 19:47:09 with the HListView right below it Jan 20 19:47:14 *most of Jan 20 19:47:31 I tried putting them in a LinearLayout with vertical orientation and using layout weights to handle the mess Jan 20 19:48:02 but I can't seem to make the LinearLayout that holds the HListView go to the bottom of the screen Jan 20 19:48:03 well first thing, your linearlayout has a horizontal orientation Jan 20 19:48:11 that one does because it's supposed to Jan 20 19:48:21 it's a "+" sign to the left of the horizontal list view Jan 20 19:48:49 I'm saying that I tried wrapping everything in a vertical linearlayout, but the items still ended up stacked Jan 20 19:50:16 hello all i have a question related to account-authenticator not working Jan 20 19:50:18 maybe change the preview LinearLayout to have alignParentTop="true instead of bottom? Jan 20 19:50:32 TRomeo: that wouldn't send it to the bottom, though, would it? Jan 20 19:50:34 and then align the top of your viewpage to the bottom of your preview layout Jan 20 19:51:00 alignParentTop aligns the top of your view with the top of the parent layout Jan 20 19:51:00 I can't put the viewpager below the hlistview Jan 20 19:51:10 yeah Jan 20 19:51:17 which is the exact opposite of my stated intentions Jan 20 19:51:23 rager: if i want to completely turn off timeout then what i should do ? set 999999 is not enough Jan 20 19:51:28 can you msPaint me what you want? I'm a bit confused haha Jan 20 19:52:10 i think there is bug with timeout because 999999 still break connection in 15 minutes almost Jan 20 19:52:40 I wish I could just set up the layout with the list view placed above the viewpager Jan 20 19:53:17 is that possible timeout is never checked ? Jan 20 19:53:54 jaami-win: to be quite honest, I never use the emulator because it's sofa king bad Jan 20 19:54:10 hmm, i have no other choice Jan 20 19:54:55 If you want one view above another you just use a vertical linearlayout Jan 20 19:55:17 jaami-win: that's approximately 16 minutes you told it to timeout on Jan 20 19:55:41 SimonVT: I'll try that one... again Jan 20 19:55:41 ic :) Jan 20 19:56:19 on one of my projects im trying to implement an account authenticator the error in xml i get is invalid start tag account-authenticator ive pasted my xml here can ne1 assist http://pastebin.com/c4mBxdJg Jan 20 19:56:22 jaami-win: is the emulator already running when you try to do this stuff? Jan 20 19:56:36 rager: yes, Jan 20 19:57:00 rager: have to close emulator first? Jan 20 19:57:23 jaami-win: if your emulator is already running, and it times out with a 16.6667min timeout Jan 20 19:57:32 I can't say that increasing the timeout will give you any different results Jan 20 19:57:37 well, I can't say for sure Jan 20 19:57:46 ahh Jan 20 19:58:12 let me try anyway, Jan 20 19:59:57 SimonVT: when I try to do that, the ViewPager ends up flattened Jan 20 20:00:03 and the HListView takes up the entire pane Jan 20 20:00:23 rager: max can be 999999999 otherwise int error is shown. i will let you know if it work out Jan 20 20:00:44 That's because you told HListView to take up all the space then Jan 20 20:01:13 I even previewed it with a view that android's able to make a preview of in AS Jan 20 20:01:13 http://hastebin.com/kujavunuri.xml Jan 20 20:02:57 let me SS Jan 20 20:03:12 Then wrap_content resolves to the entire height Jan 20 20:03:44 oh, bother Jan 20 20:03:54 Either use a fixed size or weight if you want more control of its size Jan 20 20:03:55 so I'll have to just set its size explicitly, then? Jan 20 20:04:00 ok Jan 20 20:04:11 Right now you're just letting the listview use as much as it wants, since the viewpager doesn't initially take up any space Jan 20 20:04:46 I'll have to read up more on wrap_content Jan 20 20:04:49 thanks, as always, SimonVT Jan 20 20:05:30 wrap_content just tells it to measure its children and deliver back a size Jan 20 20:05:49 It usually comes with a max size for it to occupy Jan 20 20:06:00 measure its children/measure its content Jan 20 20:06:49 The linearlayout knows its size beforehand, so it just tells the listview "I have this much space available, how much do you want?" Jan 20 20:07:12 Then your listview says "I want all of it" for some reason Jan 20 20:07:27 Then linearlayout tells viewpager "sorry dude, can't display you" Jan 20 20:09:14 Does anyone know broadcast receiver which fired when application uninstall from the device? Jan 20 20:09:35 hey guyz i came here for help... Jan 20 20:09:45 ive come after looking all over stackoverflow Jan 20 20:10:27 basically...an app im making creates an activity and then immediately dispatches camera intent..and after user takes a picture, it uses an asynctask to upload pic to server Jan 20 20:10:47 im using bitmaps Jan 20 20:10:59 and ive gone through to compress the bitmap from 30mb to 7 Jan 20 20:15:28 hulq cool story :) Jan 20 20:16:52 <|0xD34D|> TGMCians: try listening for http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED Jan 20 20:17:55 which is faster: string.equals() or Integer.valueOf(string)== Jan 20 20:18:06 Does this work always Even I installed my application from other sources not Google Play? Jan 20 20:18:33 damccull: almost certainly string.equals(), because it can short circuit the comparison (i.e. not have to check every character) Jan 20 20:18:44 but Integer.valueOf(string) has to read the whole string every time Jan 20 20:18:49 interesting. Jan 20 20:18:59 but a native int == int would be faster right? Jan 20 20:19:07 if id din't have to convert Jan 20 20:19:16 yes. but it's the process of converting the string to an int that would be slow, in that case Jan 20 20:19:26 <|0xD34D|> TGMCians: provided you have a BroadcastReceiver setup with the appropriate filter to listen for that broadcast, it should work just fine Jan 20 20:19:35 <|0xD34D|> regardless of how it was installed Jan 20 20:19:39 lame. Stupid ListPreference won't let me store an int so I'm forced to use strings :( Jan 20 20:20:10 Keep in mind, this is one of those things that almost certainly doesn't matter except for really tight optimized loops :) Jan 20 20:20:19 Okay Thanks Jan 20 20:21:10 Does anyone know if MediaExtractor/MediaCodec use hardware accelerated decoding? Jan 20 20:21:16 In general, I would go with whichever is cleaner/more convenient for your use-case Jan 20 20:23:12 Well it's cleaner to use the string directly, since it's already there :( Jan 20 20:23:14 damccull: Could you not just manually save the selected value from the preference? Jan 20 20:23:52 Don't give it a key, set a preference change listener, save as int Jan 20 20:24:06 SimonVT: Tried to override persistString to store an int instead, and getPersistedString to translate back to string. Reasoning was that way it only gets translated on the preferences screen and I can use native int everywhere else...but kept getting cast exceptions Jan 20 20:24:40 Or just show a regular Preference in the list, display an AlertDialog when clicked.. Retain value yourself Jan 20 20:24:52 not a bad idea Jan 20 20:25:05 i'll look into that later. this works for now, however much i don't like it :) Jan 20 20:25:08 must move on Jan 20 20:25:17 Some extra code in preferences, easier usage everywhere else Jan 20 20:26:42 .. Jan 20 20:26:45 umm so Jan 20 20:27:00 when i go to settings and check the memory usage of my process Jan 20 20:27:11 my app jumps fromm 4mb Jan 20 20:27:14 to 40mb Jan 20 20:27:23 after starting an asynctask Jan 20 20:27:27 is this normal? Jan 20 20:27:37 im dealing with scaled down bitmaps using inSampleSize Jan 20 20:27:43 bitmap is about 8mb Jan 20 20:28:12 Just starting an activity should use a whole lot more than 4 MB.. Probably just display bug Jan 20 20:28:15 basicaly my asynctask starts after someone takes a picture using a camera..and the asynctask uploads it to a server Jan 20 20:28:48 umm well as soon as my actiivty starts, it doesnt display anything it just starts up the existing camera Jan 20 20:29:25 as soon as the pic is taken, it comes back to my activity which starts an asynctask to upload the picture and also displays the taken picture in an ImageView using a scaled down bitmap Jan 20 20:29:56 on devices with 1gb RAM my app crashes with an OutofMemory exception Jan 20 20:30:40 im doing everything i can using bitmap.recycle()...scalind down bitmap Jan 20 20:30:48 i even tried System.gc() Jan 20 20:32:25 should i set largeHeap = true in my manifest? Jan 20 20:33:25 No, figure out what's using so much memory Jan 20 20:33:50 Do a heap dump and use MAT or something Jan 20 20:34:57 Also, neither of those methods are going to help you.. recycle just clears reference to what is backing the bitmap so it can be gc'd.. System.gc just tells the system to gc.. Neither immediately lowers clears memory Jan 20 20:35:40 And while the device might have 1gb memory, your app doesn't have access to that much Jan 20 20:35:57 You probably have 64 mb or something like that Jan 20 20:36:11 right Jan 20 20:36:37 so it is abnormal for a jump from 4mb to a jump to 40mb? Jan 20 20:37:19 Depends what you're doing Jan 20 20:37:22 pictures are big Jan 20 20:37:31 If 36mb of data is being loaded into memory then it's not abnormal Jan 20 20:37:34 If I want to do a series of ScaleAnimations zooming in on an image, do I need to make sure that the fromX field is set to the current zoom factor, or would it always be 1 Jan 20 20:38:01 well Jan 20 20:38:03 using DDMS Jan 20 20:38:16 i see that my heap starts off at like 15mb Jan 20 20:38:23 and grows to aound 30 Jan 20 20:38:56 and its almost always 90%+ used Jan 20 20:39:06 Bitmaps are large, 4 byte per pixel Jan 20 20:39:10 right Jan 20 20:39:19 but i use inSampleSize to scale it down Jan 20 20:39:24 to 8mb Jan 20 20:39:38 should i be using RGB 565 config? Jan 20 20:39:52 only you know the answer to that Jan 20 20:39:58 it's subjective Jan 20 20:40:03 well i want decent quality Jan 20 20:40:13 but im not sure how bad the quality gets using RGB 565 Jan 20 20:40:15 Starting an activity and loading a 8 mb bitmap isn't going to cause an oom exception Jan 20 20:40:23 ok Jan 20 20:40:27 so its something else then Jan 20 20:40:30 You're doing more than that Jan 20 20:40:46 alright...then i'll have to look more into it Jan 20 20:44:55 Can I somehow change the Typeface.DEFAULT for an activity (loading it from assets) ? Jan 20 20:45:13 I was thinking of creating a custom theme but it appears that only works with built-in fonts. Jan 20 20:51:33 have you guys noticed AS using in-process gradle builds seems to have a memory leak? each build causes it to take up more memory, and it never seems to stop at any limit Jan 20 21:00:51 nope Jan 20 21:00:54 never noticed ;-) Jan 20 21:03:31 g00s: I noticed AS getting progressively slower and slower with more and more bg processes and moved back to intellij. No idea what it was. Jan 20 21:04:22 any reason to use support libraries if we're not supporting Gingerbread? Jan 20 21:04:33 doesn't pretty much everything else have ActionBar, etc? Jan 20 21:04:53 correct Jan 20 21:05:17 so I've been dragging around this turd of a library for Gingerbread? Thats gotta go! Jan 20 21:05:39 cigarshark, no Jan 20 21:05:45 cigarshark, lots of reasons to use support libraries Jan 20 21:05:52 1) fragment libraries are always up-to-date Jan 20 21:06:02 2) lots of views/components come with support lib and not framework Jan 20 21:06:33 pfn, so do you think most apps that do not intend to support Gingerbread are using support libs? Jan 20 21:06:38 there's others but that comes to mind now Jan 20 21:06:43 cigarshark, of course Jan 20 21:06:55 oh, I didn't know that Jan 20 21:07:30 using support fragments isn't necessary Jan 20 21:07:44 but you aren't gonna get ViewPager or ViewDragHelper in framework, unless you're gonna copypasta them in yourself Jan 20 21:07:44 ok, I'd hate to figure out I needed something from support libs down the road, and have to tear up my code. I guess I'll keep them, but it feels dirty. Jan 20 21:07:54 only use the parts you need Jan 20 21:07:57 what feels dirty about that... Jan 20 21:08:07 nothing to tear up either Jan 20 21:08:09 I use the support lib in a minsdk 16 app Jan 20 21:08:21 SimonVT: why? Jan 20 21:08:22 I just decided I don't care about Gingerbread, but I want the kitchen sink for all versions >= 4 Jan 20 21:08:24 Just for fragments Jan 20 21:08:28 tuliohmendes, do you have to ask why... Jan 20 21:08:32 when reasons were already outlined Jan 20 21:08:41 cigarshark, it isn't the kitchen sink Jan 20 21:08:56 3) the support lib is relatively small, 4) if you're worried about bloat, proguard Jan 20 21:10:00 pfn: the reasons doesn't seen to be reasonable :x Jan 20 21:10:20 so you said 'lots of views/components come w/ support lib but not framework'.... what are some of those? Jan 20 21:10:24 that's too bad Jan 20 21:10:28 you're not reasonable Jan 20 21:10:35 i already enumerated 2 Jan 20 21:10:38 people can't read Jan 20 21:10:52 i am reading online that fragments were introduced in 3.0+ Jan 20 21:11:50 pfn: I read what you said, man... Jan 20 21:12:07 I'm not being rude Jan 20 21:12:23 I'm just trying to understand... Jan 20 21:12:32 my concern is... I want anything that exists in the most recent 4.x versions to function in earlier 4.x versions, and it sounds like the support libs will accomplish that Jan 20 21:12:42 if i'm hearing you correctly Jan 20 21:12:48 hmm Jan 20 21:13:12 pfn, cigarshark is right? Jan 20 21:13:30 Is that what you are saying? Jan 20 21:13:48 He's saying: Jan 20 21:13:54 22:05 1) fragment libraries are always up-to-date Jan 20 21:13:54 22:06 2) lots of views/components come with support lib and not framework Jan 20 21:14:23 SimonVT... The point 2) is a problem? Jan 20 21:14:31 and perhaps it will allow me to incorporate future built-in components ? For example, if they add something new to a 5.x android version, I can just update my support lib, and get the new stuff on 4.x devices. Jan 20 21:14:53 A problem? No Jan 20 21:14:53 Good good.. Jan 20 21:14:54 Just a fact Jan 20 21:15:04 not without some work, but the dependency would already be set up and I would just tweak it. Jan 20 21:16:05 And no, they aren't going to backport every 5.x feature to 4.x Jan 20 21:16:22 Some features might be backported, some might end up in another support library Jan 20 21:16:25 Some you wont see at all Jan 20 21:17:17 is anyone here NOT using a support lib? Jan 20 21:17:27 well I'm not but maybe I should be :p Jan 20 21:18:20 Same here... Jan 20 21:23:25 seems like NavigationDrawer, Fragments, and ActionBar are good to go on any 4.x device, but not Gingerbread. I'm unable to find a component that justifies using the support lib on 4.x devices. If you know of some, please let me know. Jan 20 21:25:09 DrawerLayout is part of the support library Jan 20 21:26:31 thx simonvt, gonna research that out now. If I find even one thing that deps on the support lib, I'm going to retain it. Jan 20 21:26:57 <|0xD34D|> well the nav drawer depends on DrawerLayout which depends on support lib :P Jan 20 21:27:31 so you're saying that Nav Drawer is not possible on a 4.x device w/o support lib? Jan 20 21:28:27 checking on it. if its true, thats a huge reason to use support lib. Jan 20 21:28:48 huh? Jan 20 21:28:55 NavigationDrawer isn't in 4.0 Jan 20 21:28:57 what are you talking about Jan 20 21:30:31 #spring is sooo dead. anyone here try to get spring reactor working on android ? Jan 20 21:30:35 also, fragments. Jan 20 21:30:43 wise using support lib for those Jan 20 21:32:36 haven't really encountered any fragment bugs that I want to drop back to support lib for Jan 20 21:33:43 in what api was recursive fragments added? Jan 20 21:33:54 hi, is it possible to use PagerTitleStrip in LinearLayout? Jan 20 21:33:57 i guess if you want that, support lib Jan 20 21:34:32 deanrock0, why not Jan 20 21:34:57 java.lang.IllegalStateException: PagerTitleStrip must be a direct child of a ViewPager. Jan 20 21:36:48 ok, I cannot find anything that indicates Navigation Drawer is possible without the support library despite this answer on stackexchange -> http://stackoverflow.com/questions/18682460/androids-navigationdrawer-without-appcompat Jan 20 21:37:32 appcompat is a different support library Jan 20 21:37:43 Not the one the drawer is in Jan 20 21:39:15 There are 5 support libraries.. "the support library" usually refers to the first one they made available, the one that has fragments Jan 20 21:39:48 deanrock0: I think you just answered your own question Jan 20 21:40:06 yeah, i fixed it, nevermind :) Jan 20 21:48:31 there's support-v4, v13, appcompat-v7, there's 5? what are the other 2 Jan 20 21:49:12 oh, I guess there's gridlayout and mediarouter Jan 20 21:49:13 GridLayout and some media crap Jan 20 21:49:16 never used 'em Jan 20 21:55:41 Navigation Drawer is a huge feature, and as SimonVT mentioned, it seems to require a support lib even if you're using the latest API. Jan 20 22:01:06 the nav drawer is only part of the support lib, yes Jan 20 22:02:04 anyone have any opinion on ORMLite? Jan 20 22:18:56 cigarshark: I use GreenDAO and love it Jan 20 22:19:02 never tried ORMLite though Jan 20 22:25:58 i saw greendao out there Jan 20 22:26:30 what I'd really like is a code generator that does all the boilerplate and then gets out of the way Jan 20 22:28:05 I value automatic schema generation and reduced boilerplate when populating objects. Jan 20 22:28:08 cigarshark: that's mostly what GreenDAO does. you can edit the code after it is generated. just use .setKeepSections() or something like that Jan 20 22:28:11 is there a standard way to find an array within an array (byte arrays)? Jan 20 22:28:44 you mean an array of byte arrays? Jan 20 22:28:57 no, a subsequence Jan 20 22:29:06 sorry Jan 20 22:29:30 ok, you mean find a subsequence of bytes within a byte array? Jan 20 22:29:51 yes, that is returning good google results now :) Jan 20 22:32:52 someone mentions Java's ByteVector indexOf(byte[] b) from a lib Jan 20 22:33:09 ByteVector classes floating around out there that seem to do it Jan 20 22:34:26 knuth-morris-pratt for geek cred :-) Jan 20 22:34:57 i saw that SO post, kbs Jan 20 22:35:50 new String(foo, ISO88591).contains(new String(bar, ISO88591)) for lazy engineer cred Jan 20 22:35:58 given that KMP has been around for about 40 years, i'm sure the thought has occurred to many people :-) Jan 20 22:36:06 oh wait it wasn't contains but indexOf(...) != -1 Jan 20 22:41:44 +1 alankila :-) Jan 20 22:45:14 anyway this solution is perfectly fine provided the strings aren't long, and the operations aren't that frequent and all that. Sometimes you don't need a fine hammer for a job, just a piece of rock. Jan 20 22:54:55 alankila, was able to convert to string like you suggested but it works without specifying a charset :) Jan 20 22:55:23 I suppose I should specify UTF8 or something anyways Jan 20 22:55:39 Is it possible to associate more than one account type with a particular sync adapter? Jan 20 22:58:15 if I run anything in /system/xbin on my phone using adb, it drops me into a root shell Jan 20 22:58:39 is my phone hacked? Jan 20 22:58:58 mmarklar: not to my understanding anyway. However, it's fairly straightforward to have the service simply return the same (or a new instance of) the actual adapter Jan 20 22:59:13 e.g. I run $ /system/xbin/fsck Jan 20 22:59:25 in adb, and it executes su Jan 20 23:00:04 has anyone seen that behavior before? Jan 20 23:00:20 no. i wonder if it happens only from adb Jan 20 23:00:48 kbs: thanks, I hadn't thought about that Jan 20 23:01:21 SuD: I'll try on a terminal on the phone.. Jan 20 23:01:44 i never seen that happen before Jan 20 23:02:29 mmarklar: as you no know by now :-) the whole thing is rather clunky and under-documented - I had to do much trial-and-error coding myself; good luck and do pass on any interesting tips you discover Jan 20 23:02:43 s/no know/know Jan 20 23:03:02 kbs: haha yes, thanks, will do :) Jan 20 23:04:16 ok, same thing happens on a terminal on the phone Jan 20 23:04:26 run anything in xbin, it executes su Jan 20 23:05:11 does it ask for root permissions or just root shell? Jan 20 23:05:52 I have SuperUser installed, and the permissions dialog came up Jan 20 23:06:20 now it shows the notification on each execution Jan 20 23:06:37 when I was on adb it didn't show a notification, but i was dropped into a root shell Jan 20 23:07:25 I'm thinking it may be the way that SuperUser is trying to hook in and hand off the command to su Jan 20 23:08:23 Do android phones generally support multiple opengl context? Jan 20 23:09:12 Eg have gameplay thread have one with shared resources for dealing with loading vbo pbo data Jan 20 23:10:13 hi guys !! i cant download appliactions from Google app !! Error 191 !!!! waht's it ??????????,, Jan 20 23:10:27 It seems sensible on desktop but i dont know on android Jan 20 23:10:54 I know i can on ios Jan 20 23:11:41 Sorry its 919 Error !!! is any one can help me here !!! Jan 20 23:15:35 alankila, you're my hero! It actually wasn't working correctly with UTF-8, so I tried ISO88591 and BAM :) Jan 21 00:00:42 how do i set up a local copy of my project's maven dependencies? i can't figure out how to actually grab the dependency. Jan 21 00:20:47 Hi, settext in other words is rest of EditText or there is difference? Jan 21 00:21:23 setText("") *** Jan 21 00:22:32 when i do ET.setText("") the hint text is not shown on mobile Jan 21 00:26:35 or may be there is someother reason of hint text disappearing on mobile. on emulator it is no issue Jan 21 00:33:14 Hello all, my company is planning to give free Android tablets to a public school. Is it possible to create an App that blocks the tablet until the kids watch a tutorial on how to use it? Jan 21 00:34:11 tutorial or advertisement :) Jan 21 00:34:23 How can they use it to watch the app? Jan 21 00:34:24 kids may already know how to use tablet Jan 21 00:35:05 jaami-win, it's a government requirement after acquiring a License. The government is also asking for local "training" Jan 21 00:35:25 you 'may' have to make a custom launcher Jan 21 00:35:26 apocn: yes, a way I've done this before is install a launcher with a higher priority that uninstalls itself once something has happened Jan 21 00:35:28 and they want to find a way to do this interactively instead of looking for human resources Jan 21 00:35:31 ic, sorry , i did not know Jan 21 00:35:43 mmarklar, ok Jan 21 00:35:52 what's the recommended way of creating a 'test notification' button from the preferences xml ? Jan 21 00:36:20 what is such a button supposed to do Jan 21 00:36:30 test the notification settings that have been set Jan 21 00:36:41 ringtone, vibration length Jan 21 00:46:37 SirLagz: you can listen for that preference item in onPreferenceTreeClicked Jan 21 00:47:09 durka42: and then just use notifiction builder on the onclick ? Jan 21 00:48:20 yeah, sure Jan 21 00:48:46 cool thanks Jan 21 00:50:51 argh I hate layouts Jan 21 00:51:01 why is layout_centerVertical="true" invalid in a LinearLayout? Jan 21 00:54:24 I see layout_gravity="center_vertical" is the magic incantation Jan 21 00:54:45 durka42: what would you expect it to do ? Jan 21 00:54:53 uh Jan 21 00:54:56 to center it vertically Jan 21 00:55:12 are there children taller than the view you want to center ? Jan 21 00:55:28 no Jan 21 00:55:32 also, developer options, show layout bounds Jan 21 00:55:34 the LinearLayout is the only child Jan 21 00:55:46 I'm doing this layout in ecipse Jan 21 00:55:48 eclipse* Jan 21 00:56:57 which may be my first mistake Jan 21 00:56:58 durka42: layout_centerVertical is an attribute of RelativeLayout.LayoutParams where layout_gravity is an attribute of LinearLayout.LayoutParams Jan 21 00:57:29 I know that now, my beef is the arbitrariness and unhelpfulness of the error message :) Jan 21 00:57:48 ah, thought you were wondering why it was the magic incantation Jan 21 00:58:03 there's also this gem http://hintslibrary.blogspot.com/2012/08/error-invalid-layout-param-in.html Jan 21 00:58:09 "the solution is to take out the setting" Jan 21 00:58:11 that's not a solution! Jan 21 00:58:35 "doc, it hurts when I breathe" Jan 21 00:58:37 "okay don't breathe" Jan 21 00:58:49 well, thats not a valid layout attribute for a linear layout Jan 21 00:58:55 what would you expect the solution to be? Jan 21 00:59:14 well I'm just whining Jan 21 00:59:17 but it's user-hostile Jan 21 00:59:20 ah, carry on then :) Jan 21 00:59:28 given that it's entirely obvious I meant "center this vertically" Jan 21 00:59:52 I'm sure it makes 200% sense if you wrote the layout classes Jan 21 00:59:55 but, you know, I didn't Jan 21 01:13:49 more whining: in a TextView, android:textAlignment="center" does nothing. android:gravity="center" is the spell to center-align the text Jan 21 01:14:05 how does that make any sense? Jan 21 01:14:44 why would it be android:textAlignment Jan 21 01:14:47 learn to read documents Jan 21 01:15:25 how does it make sense? all views have android:gravity which sets their alignment Jan 21 01:16:15 whereas, textalignment would be a special-case for textview only Jan 21 01:16:58 arbitrary? the error message is clear Jan 21 01:17:03 you specified an illegal attribute Jan 21 01:17:25 again, it boils down to a filure to read documentation Jan 21 01:18:12 actually there was no error message in this one Jan 21 01:18:17 you're right, I didn't think to look it up Jan 21 01:18:28 because I thought textAlignment was such a blindingly obvious way to set the alignment of the text Jan 21 01:18:37 it's non-obvious Jan 21 01:18:39 only obvious to you Jan 21 01:18:41 why even have it as a property if it doesn't do anything Jan 21 01:18:51 why don't you read the docs to see what it actually does Jan 21 01:19:32 well, the docs say it sets the alignment of the text Jan 21 01:19:35 which in my experience it doesn't do Jan 21 01:19:37 so Jan 21 01:19:38 yeah Jan 21 01:19:45 Hello Jan 21 01:19:47 or maybe it's a bug in the eclipse layout renderer Jan 21 01:19:55 Isn't there any splash screen for android apps? Jan 21 01:19:59 durka42, nope Jan 21 01:20:08 you see, there's 2 different alignments at play Jan 21 01:20:13 there's paragraph alignment, and view alignment Jan 21 01:20:24 okay Jan 21 01:20:31 well the textview has two lines of text in them Jan 21 01:20:34 I wanted them centered Jan 21 01:20:37 isn't that paragraph alignment? Jan 21 01:20:55 if you want it centered, you'll get it centered, but on the left of the view, by default, by using textAlignment Jan 21 01:21:20 "centered on the left" Jan 21 01:21:23 I don't understand this Jan 21 01:21:29 because you're dumb Jan 21 01:21:33 there's paragraph alignment Jan 21 01:21:35 and view alignment Jan 21 01:21:42 you said that before Jan 21 01:21:47 if it's aligned to the left Jan 21 01:21:49 it's not centered Jan 21 01:21:53 how can it be both Jan 21 01:21:57 but it is centered, according to paragraph alignment Jan 21 01:22:01 it's not centered in the view Jan 21 01:22:06 it's centered with respect to the paragraph Jan 21 01:22:38 is each line of text its own paragraph then? Jan 21 01:22:48 if you're breaking it up by newlines, yes Jan 21 01:22:54 each line is its own paragraph Jan 21 01:23:16 I see Jan 21 01:23:55 yeah the docs for textAlignment could mention that Jan 21 01:42:33 hi, how to hide hint text on focus? Jan 21 01:46:15 jaami-win: hint behavior should be all handled "for free" Jan 21 01:46:22 that is, if you set a hint on a TextView, it disappears when appropriate Jan 21 01:46:43 it does not disappea in emulator Jan 21 01:46:55 does it disappear when you type? Jan 21 01:46:56 and it does not show in mobile Jan 21 01:47:06 yes it appear while typing Jan 21 01:47:18 and it does not appear at all on mobile Jan 21 01:47:49 oops, sorry Jan 21 01:48:00 on emulator it deasappear Jan 21 01:48:19 i think i did not see carefully may be Jan 21 01:48:28 it seems like you need to read up on how the hints work, somewhat Jan 21 01:48:34 I know I do Jan 21 01:48:59 yes, i will read **** ENDING LOGGING AT Tue Jan 21 02:59:59 2014