**** BEGIN LOGGING AT Mon Aug 20 02:59:59 2012 Aug 20 03:13:14 canadiancow I do it out of love. Aug 20 03:13:22 My love of tipping cows Aug 20 03:27:13 anyone around/awake with a nexus 7, preferably US model? Aug 20 03:29:06 yeah Aug 20 03:29:12 marginally (awake) Aug 20 03:29:36 I just got mine delivered from the US to Hong Kong... and I suspect I've been sold an Asian model, not a US one... mind if I pm you? Aug 20 03:29:58 sure Aug 20 03:30:18 is it because of the asian input apps? Aug 20 03:30:26 b/c those are on mine which afaik is a US model Aug 20 03:30:28 that's one reason, yes Aug 20 03:30:47 I ordered to the US from the market at launch, have pinyin and something else, can't uninstall Aug 20 03:30:49 that was on my galaxy nexus Aug 20 03:30:55 also, blank homescreen - just the gapps - while all the reviews say the homescreen on theirs came with a bunch of Play Store widgets installed Aug 20 03:31:12 I don't honestly remember what the original home screen was on mine Aug 20 03:31:20 I pretty quickly set it to my own shit Aug 20 03:32:04 and for the play store credit - I wasn't necessarily expecting to be able to get it to work, but there's no mention anywhere on/in the box, in the quick-start, or, as far as I can see, anywhere in the software Aug 20 03:32:08 model ME370T Aug 20 03:32:27 when i activated the market on mine I got some sort of popup alert Aug 20 03:32:29 about the credit Aug 20 03:32:37 ah, that was it? Aug 20 03:32:45 yeah iirc Aug 20 03:32:46 or a gmail Aug 20 03:33:09 got an email saying welcome to nexus 7 - no mention there either Aug 20 03:35:00 looks like i deleted the email Aug 20 03:36:33 eh, even paying shipping from New York to Hong Kong (shipped Friday evening HK time, delivered Monday morning, can't complain) it's still cheaper than the rumoured HK retail price, if they ever get around to releasing it here Aug 20 03:36:52 i have chinese, korean, and japanese inputs on mine Aug 20 03:37:07 is there a way to see what region it thinks you're in for the market? Aug 20 03:37:19 easiest way is to see what currency it prices in Aug 20 03:37:48 and for me, that's HKD Aug 20 03:38:01 hm not sure there; on my galnex from .eu it prices in USD Aug 20 03:38:07 but views the EU market view Aug 20 03:38:15 (afaik; it's not in this room right now) Aug 20 03:39:18 maybe i'm misremembering Aug 20 03:40:26 anyway, time to go a bit mad installing and configuring stuff - thanks for the help :) Aug 20 03:41:31 TelephonyManager.EXTRA_INCOMING_NUMBER whats used to read outgoing number Aug 20 03:49:29 Hi all. I'm trying to program a *very* basic program, and I'm getting an error. Can you tell me why? Here is my xml code: Aug 20 03:49:30 http://pastebin.com/TJ6XtHe3 Aug 20 03:51:26 what's the error? Aug 20 03:52:13 my best guest related to @string/edit_message ? Aug 20 03:52:22 my best guess related to @string/edit_message ? Aug 20 03:54:07 bankai_, where do I look for the error? In the console or in the LogCat? Aug 20 03:54:13 funky81, how do I fix it? Aug 20 03:55:16 if you say "i'm getting an error", shouldn't you already know? (p.s i didn't look at your link coz of your sketchy explanation ) Aug 20 03:55:51 @Etale => what's the error... Aug 20 03:55:54 when the error? Aug 20 03:55:59 bankai_, I'm very new at this. I'm trying to follow the Android website's explanation for programming my first program. Aug 20 03:57:16 This is what appears in my logcat: Aug 20 03:57:16 http://pastebin.com/EupYFtEG Aug 20 03:58:10 maybe you should read the error then, it tells you how to fix it Aug 20 03:58:29 here you go, it's very clearly write in you logcat Aug 20 03:58:31 bankai_, I'm new at this. I don't understand the syntax of the language yet. Aug 20 03:58:38 08-19 23:37:28.510: E/AndroidRuntime(717): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mysecondapp/com.example.mysecondapp.MainActivity}: java.lang.RuntimeException: Binary XML file line #7: You must supply a layout_width attribute. Aug 20 03:58:39 english ? Aug 20 03:59:07 it's in english bro...and cleary states the error Aug 20 03:59:16 So. I should write layout_width= what? Aug 20 04:00:30 which tutorial are you following? Aug 20 04:00:50 Except he does have layout_width set in his layout Aug 20 04:01:13 Not so clear anymore that error Aug 20 04:01:17 http://developer.android.com/training/basics/firstapp/building-ui.html#LinearLayout Aug 20 04:05:44 So this stuff isn't standard? Aug 20 04:16:04 i don't understand what's going on there - is that your whole XML file ? Aug 20 04:16:40 Yes. Aug 20 04:16:53 Apparently I was missing: Aug 20 04:16:57 But it's still not working. Aug 20 04:17:17 Is there a difference between > and /> ? Aug 20 04:17:23 uhh yes Aug 20 04:17:37 where as Aug 20 04:17:44 umm /> closes the xml tag then and there Aug 20 04:18:00 otherwise you need > Aug 20 04:18:21 Gotcha. Aug 20 04:19:09 So... This should work? http://pastebin.com/ZHM9B0ZJ Aug 20 04:19:29 It says there's an error at the line android:hint="@string/edit_message" /> Aug 20 04:22:23 you have to define edit_message in your strings file Aug 20 04:22:52 How do I do that, funky81? Aug 20 04:23:33 http://developer.android.com/guide/topics/resources/string-resource.html Aug 20 04:25:31 TelephonyManager.EXTRA_INCOMING_NUMBER whats used to read outgoing number Aug 20 04:26:17 Hm... Okay. Reading material. Will read. By the by, what books/tutorials/etc. for Android development would you recommend for an intelligent boy who doesn't know how to program for Android? Aug 20 04:27:09 I used to program in QBasic, Pascal, C, Assembly, some robot programming language whose name I forgot, and some other -- but those were all a long time ago. Aug 20 04:27:39 (I know a minimal amount of Python...) Aug 20 04:33:39 Etale: start by learning Java Aug 20 04:33:51 don't know about any good books for that Aug 20 04:33:58 Okay. Aug 20 04:34:02 also get a hang of Java Concurrency Aug 20 04:34:42 Okay. Aug 20 04:36:26 p_l: maybe head first java + effective java 2e + java concurrency in practice Aug 20 04:36:32 oops, Etale :) Aug 20 04:36:37 (in that order) Aug 20 04:37:11 g00s, these are names of books? Aug 20 04:37:26 then... hmmm... not sure about Android books anymore. There was one with aborigine(?) on cover, I think it was called "Unlocking Android" which was quite good, but the version I've read is quite dated now Aug 20 04:37:32 yeah, err wait, i always get the head first ones confused Aug 20 04:37:51 p_l: yeah, they are working on the 3e of that Aug 20 04:38:10 for android specifically, retos' 3e i guess Aug 20 04:38:25 s/head first/thinking in java Aug 20 04:38:34 or Core Java Aug 20 04:39:17 I like bruce eckel books Aug 20 04:39:21 very highly recommended imo Aug 20 04:39:37 heard conflicting opinions about them, really Aug 20 04:39:57 the latest TIJ is print only; the online one is like java 1.4 or something Aug 20 04:40:03 * p_l is at a point where he can't pinpoint just where did he learn java, and his knowledge is pretty spotty too Aug 20 04:42:29 does anyone know off hand where in an activities lifecycle is onActivityResult() is called? I mean before onCreate() ? After onResume()? Aug 20 04:43:39 heh, yeah in real life its different than the docs Aug 20 04:43:46 i think before onStart Aug 20 04:44:18 the timing may have changed in later versions of android though Aug 20 04:44:32 joy Aug 20 04:44:37 :) Aug 20 05:01:19 I would expect between oncreate and onresume Aug 20 05:01:35 honestly I wouldnt expect oncreate to fire again after you start activityForResult Aug 20 05:01:45 but I guess with androids activity management, and memory management Aug 20 05:01:47 I suppose it coudl Aug 20 05:04:18 Whether it's before onStart or onResume is pretty easy to test Aug 20 05:05:57 hey fellers. how can i get the total vertical size of a scalable view? Everything I've found so far only gives me the size of the view occupying the screen. Aug 20 05:10:32 big bear Aug 20 05:15:36 can someone tell me where i can learn how to use AudioRecord class? the documentation doesnt give an example for it. on the mediarecorder. Aug 20 05:26:01 anyone know of widgets or controls that are for displaying object graphs, or flow charts? Aug 20 05:30:30 what does getLocationOnScreen() return in x and y? Isn't x and y supposed to be 0,0 always because the top and left of the view is always 0,0? Aug 20 05:31:14 Isn't it supposed to return the x,y of the top left corner of the view on the screen? Aug 20 05:31:25 It'd only be 0,0 if the view is in the top left corner of the screen in that case. Aug 20 05:34:43 RazielZ: ok Aug 20 05:35:14 RazielZ: you mean if a button is placed at 20,30 it would return 20,30? Aug 20 05:35:48 If both are the same type of coordinates, it should Aug 20 05:38:09 RazielZ: wb Aug 20 05:38:16 Thanks Aug 20 05:38:20 Had to restart to check something Aug 20 05:43:09 man I wish I could see a couple nuggets in google now Aug 20 05:43:15 I wonder how they do x, and y and z Aug 20 05:44:20 can someone tell me why you wouldn't want to use Fragments? Aug 20 05:44:37 besides the obvious, < 1.6 API answer Aug 20 05:49:02 honestly they add a bit of confusion, there are lifecycle issues that arent immediately obvious, but once you iron out those gotchas, no... no reason Aug 20 05:51:26 ron_frown: well for my app i'm trying to write, i'm trying to have a slide-in menu from the left, ala Evernote and G+ Aug 20 05:51:40 but i'm also going to add a slide-in screen from the right Aug 20 05:51:42 RazielZ: do you think view.getLeft(), view.getTop() or view.getLocationOnScreen() will somehow give wrong results if the main view containing these views is scrolled to a different x,y? Aug 20 05:51:50 WHAT?! Aug 20 05:51:58 haha Aug 20 05:51:59 how many menus we need Aug 20 05:52:01 It should return the location on screen Aug 20 05:52:07 ron_frown: it's not a menu Aug 20 05:52:07 Well Aug 20 05:52:13 getLocationOnScreen should Aug 20 05:52:26 So even if it's scrolled it will return the location relative to 0,0 of your screen Aug 20 05:52:35 Not of your parent view or similar Aug 20 05:52:43 Or, at least I think it should Aug 20 05:52:44 ron_frown: left side is a menu, right side is the shopping cart Aug 20 05:52:49 RazielZ: I am using a code which breaks if the main view is scrolled, so trying to find out which part of it is making it break Aug 20 05:53:00 would like user to be able to access both from whereever they are in the app Aug 20 05:53:02 Hmmmm Aug 20 05:53:14 HorizonXP I happen to know somone building something that sounds eerily similar to you Aug 20 05:53:28 I wish evernote wouldnt have chosen to use thrift protocol Aug 20 05:53:29 getLeft and getTop return positions relative to parent, not screen Aug 20 05:53:38 ron_frown: it could be the same thing... Aug 20 05:53:39 So those might give you a wrong result depending on what you're trying to achieve Aug 20 05:53:48 same person? Aug 20 05:53:53 possibly Aug 20 05:54:16 RazielZ: it is a code that lets me click multiple Buttons at the same time (multitouch) but if the main view is scrolled, multitouch breaks Aug 20 05:54:24 HorizonXP - are you in the us? Aug 20 05:54:30 Hmmmm Aug 20 05:54:32 ron_frown: i'm in Canada Aug 20 05:54:36 ron_frown: but.... Aug 20 05:54:37 not same person Aug 20 05:54:40 this is US related Aug 20 05:54:42 And you're using both getLeft+getTop and getLocationOnScreen? Aug 20 05:54:56 ron_frown: why not thrift? (no idea, just asking) Aug 20 05:55:31 RazielZ: let me paste it and give you a link Aug 20 05:55:47 I like universal binary serialization stuff like protobuffers Aug 20 05:56:05 but honestly thrift controls binary serialziation *AND* the services on the end Aug 20 05:56:08 Mmmk Aug 20 05:56:20 makes for a bitch of custom home brew integration Aug 20 05:56:30 evernote integration basically requires a client lib they wrote Aug 20 05:57:40 RazielZ: here http://pastebin.com/DSgC0a6q Aug 20 05:57:44 can someone help me with the audiorecorder class? Aug 20 05:57:54 please? the documentation doesnt get any examples Aug 20 05:58:15 i understand everything up untill the read function. Aug 20 05:58:16 maybe so but I bet there are no less than 200 examples that come up immediately on google Aug 20 05:58:20 how can i tell if a scrollable view has reached the bottom? Aug 20 05:58:25 RazielZ: this function perhaps adds the touched Buttons (Views) into the touchedViews ArrayList Aug 20 05:58:35 mmhmm Aug 20 05:58:38 im reading them, but they are very vauge Aug 20 05:58:44 it doesnt explain the buffer concept at all Aug 20 05:58:51 or what happenes when you fill one up Aug 20 05:58:55 im so confused. Aug 20 05:59:18 read function returns an int. what is this int? Aug 20 05:59:23 is it a byte of sound data? Aug 20 05:59:38 RazielZ: which part of this code might be breaking it when the main parent is scrolled to a different x,y? multitouch breaks Aug 20 05:59:46 Can you add a breakpoint at the for and manually look at the contents of possibleViews? Aug 20 06:00:02 i guess i shouldnt expect anyone to help me with this one. Aug 20 06:00:25 ill come back in the morning when all the pro's are here Aug 20 06:00:33 kingargon, I'm new too :[ Aug 20 06:00:48 if the god damn new project wizard worked well, it'd be a very welcome addition to adt, but the fact that its a little horse banging skank really rubs me the wrong way Aug 20 06:01:12 RazielZ: i am using ant :( Aug 20 06:01:12 MUST.... BUILD... this scc provider for intelij Aug 20 06:01:27 mintt, if you add all of the views in that arraylist, including the ones not currently visible, then try to get their location on screen, it might break Aug 20 06:01:29 But I'm not sure Aug 20 06:02:38 this line seems to be the culprit Aug 20 06:02:38 if (((view.getHeight() + location[1] + moveGap >= y)                         & (view.getWidth() + location[0] + moveGap >= x)                         & (view.getLeft() - moveGap <= x) & (view.getTop()                         - moveGap <= y))                         || view instanceof FrameLayout) Aug 20 06:04:46 Uh Aug 20 06:04:51 Is & not supposed to me &&? Aug 20 06:04:58 be* Aug 20 06:04:59 not me Aug 20 06:05:16 Razielz: its cool, i think it just dawned on me. Aug 20 06:05:53 *USUALLY* & and && do the same thing outside of bitwise, one just shortcircuits evalution as soon as logic is met Aug 20 06:06:11 bitwise logic with two bits, I dont know if it really varies Aug 20 06:06:35 Ah, I see Aug 20 06:06:37 * RazielZ came from C++ Aug 20 06:06:38 XD Aug 20 06:07:44 what would c++ do if you only specified one ampersand, treat it a a reference? Aug 20 06:08:31 In an if? Aug 20 06:09:12 hmm Aug 20 06:16:45 Apparently it works with & as well Aug 20 06:16:49 Eh well Aug 20 06:27:30 wtf Aug 20 06:27:42 adt new project dosnt even provide projects that build and run out of the box now Aug 20 06:40:03 https://dl.dropbox.com/u/36259099/fl_layoutproblem.png why is there a space between the actionbar and the imageview? how can i get rid of it? heres my code http://pastebin.com/UYr8qdDw Aug 20 06:41:17 08-19 23:39:21.197: D/speech(16554): result f*** Aug 20 06:41:20 classic Aug 20 06:44:18 eSatsu, looks centered to me Aug 20 06:44:37 add a gravity Aug 20 06:44:48 ahh thanks Aug 20 06:45:15 so this is the first app I'm really allowing for screen rotation etc Aug 20 06:45:27 whats the trick to prevent exceptions on rotation in the context of fragments? Aug 20 06:46:03 its initializing a fragment with a static initializer, which sets constructor arguments to bundle parameters and restore those onCreate/onResume? Aug 20 06:47:13 er Aug 20 06:47:17 adding a gravity did nothing Aug 20 07:03:24 if im forced to save login credentials on the application side Aug 20 07:03:31 how should i do it Aug 20 07:04:01 need some better way to do it than sharedpreferences Aug 20 07:05:24 uhh is it autenticating with a service you control? Aug 20 07:05:44 yes/no Aug 20 07:06:39 the session expires pretty fast and need to do another POST call with the credentials to renew the cookie Aug 20 07:08:03 storing creds is not a fantastic idea, but sometimes you dont really have control Aug 20 07:08:49 of course im letting the user decide whether to do it or not, their other option is to fill out the login form again every few days Aug 20 07:09:12 but anyway if im going to store the creds where should I store them? Aug 20 07:09:12 well a lot of services have methods of renewing a token wiht existing token Aug 20 07:09:28 hm Aug 20 07:09:49 need to ask the server guys if they could add something like that Aug 20 07:09:54 I know googles oauth will send token expiration headers on responses when token is going to exprire Aug 20 07:10:18 all you'd have to do is check on rsponses for "new-token" and replace what you currently have store Aug 20 07:10:34 yes, there is a potential for user to not login with the overlap period, and ultimately have to retype their credentials Aug 20 07:11:45 ah okay, ill try to go with that instead Aug 20 07:12:36 well it depends on the service provider Aug 20 07:12:49 ie, if you are using typical forms auth, and not some homebrew solution Aug 20 07:12:57 you may not be able to easily add that stuff in there Aug 20 07:13:27 in api's I've built, I've added the ability to do that, its great for rolling over tokens fairly regularly and not affecting regular users Aug 20 07:13:44 already confirmed its okay Aug 20 07:13:47 thanks for thte help Aug 20 07:13:50 np Aug 20 07:14:15 tokens are always gonna be better then creds... I think storing in shared prefs, or binary serialize encrpted data to fs, or db Aug 20 07:14:38 would have all been fine, but just the fact creds are there could be compromised Aug 20 07:14:41 I dunno Aug 20 07:34:10 can you guys recommend a good book where i can read up on fragments Aug 20 07:37:39 hey guys I'm updating a UI view from background service using messanger Aug 20 07:38:03 it works well but, when the front activity loses focus and comes back again the update doesn't work Aug 20 07:38:12 any ideas why this might be happening ? Aug 20 07:40:00 hemanshu: erm, does the service have a reference to a Handler which no longer exists? Aug 20 07:40:35 yes Aug 20 07:40:49 UI context goes away Aug 20 07:41:05 you could use a OrderedBroadcastIntent to try and handle some of it Aug 20 07:41:12 depending on what you are truing to do Aug 20 07:42:03 Leeds: The Activity is not dead, its stopped. The callbacks are still working and I still gets the progress updates Aug 20 07:42:41 Leeds: to answer your question I guess yes, It still holds the messanger object I passed with instance Aug 20 07:43:48 ron_frown: I'm updating a progress bar in a view, won't messangers work for my use case ? Aug 20 07:44:12 I have no idea what messangers are Aug 20 07:44:39 honestly services should communicate via intents or the aidl interface shit Aug 20 07:45:05 basically your ui should register for an intent, or register the aidl interface and tap into interface methods Aug 20 07:46:30 ron_frown: hmm.. I look in it Aug 20 07:46:32 register for an intent = register a BroadcastListener Aug 20 07:46:41 btw http://developer.android.com/reference/android/os/Messenger.html Aug 20 07:47:13 not the way you want to communicate from a service to ui Aug 20 07:47:39 I think thats more for cross thread communication Aug 20 07:47:56 eg, you have a downloader in regular activity and you want to post updates to update progress bar Aug 20 08:48:00 Button button = new Button ( this, null, R.style.ButtonStyle ); Aug 20 08:48:14 wat am i doing wrong? the style is not getting applied Aug 20 08:48:42 is there some better way to accessing resources from subpackages then importing main package's R in each class? Aug 20 08:54:02 lil_Worker: does that style work if you apply it separately? Aug 20 08:55:38 yeh, if i just create a button with style attribute set to that, it's fine Aug 20 08:56:09 but i have to create the dynamically, and inflating it isn't a preferable solution Aug 20 09:05:21 Is there a toolkit for profiling android sqlite3 databases ? Aug 20 09:20:34 hello, I have an image view and start an translation animation on this view. I found that this is quite laggy on my phone. The image view is full screen. I doubt that it may relate to that android need to redraw the screen every time. But, I don't know how to deal with this problem. Aug 20 09:39:26 http://pastebin.com/xiqQsWKz Aug 20 09:39:51 can i somehow make it so i don't have to pass Boo.class to createIntent? Aug 20 09:47:20 lil_Worker: don't think so Aug 20 09:47:45 not cool, looks dirty Aug 20 10:03:25 what's the difference between android:textAppearance="?android:attr/textappearance..." and style="?android:attr/textApperance..." ?? Aug 20 10:04:06 Turn wifi off when I lock my phone, turn it on when I unlock my phone. Will that anyway save my battery? Aug 20 10:04:54 honestly i doesn't make a difference to me Aug 20 10:04:58 its constantly on Aug 20 10:05:20 dunno what it does but it doesn't seem to drain my battery, have tried with on off Aug 20 10:05:37 Ravenheart, if there is a processing hearing for that signal, it might even drain more? Aug 20 10:05:59 well i'd assume it does listen for new wifi signals Aug 20 10:06:15 but again i've tried with my phone having it off all day then on all day Aug 20 10:06:21 don't see a difference Aug 20 10:06:32 depends on the phone? Aug 20 10:07:02 galaxy s2 Aug 20 10:07:31 Galaxsy S advance here Aug 20 10:16:59 JakeWharton: how come you used 1px nine-patch drawables for the hansel&gretel dividers and not an xml file? Aug 20 10:27:46 anybody helps? Aug 20 10:27:46 hello, I have an image view and start an translation animation on this view. I found that this is quite laggy on my phone. The image view is full screen. I doubt that it may relate to that android need to redraw the screen every time. But, I don't know how to deal with this problem. Aug 20 10:32:54 native vs HTML5 which will you vote and why? Aug 20 10:34:14 hemanth: that is kinda like vi vs emacs :) Aug 20 10:34:24 for the best UX, usually native Aug 20 10:34:46 so both are equally strong Aug 20 10:35:01 say for example getting geolocation Aug 20 10:35:03 depends on what are you writing and if you can stomach JS Aug 20 10:35:11 it's so easy with HTML5 API Aug 20 10:35:30 funktronic, I can stomach so much of JS Aug 20 10:36:19 the android browser sucked at html 5 until very recently anyhow Aug 20 10:36:43 can you get jitted js in webviews? Aug 20 10:37:08 funktronic: and js is slow on mobile devices too :) Aug 20 10:37:35 i personally wouldn't touch JS for mobile with a condom-wrapped 10 ft pole Aug 20 10:37:46 i'm not even happy with perfomance w/o it Aug 20 10:38:01 can't even imagine non-multithreaded Aug 20 10:41:15 hemanth: http://martinfowler.com/articles/multiMobile/ Aug 20 10:41:33 i also like mono Aug 20 10:45:09 funktronic: i wonder if wp8 will allow f# Aug 20 10:45:25 c#, c++ a given, never hear anything about f# Aug 20 10:45:26 g00s: don't see why not Aug 20 10:45:41 i doubt they'd do UI toolkit integration Aug 20 10:45:53 the story has always been "UI in C#, backend in F#" Aug 20 10:46:06 hmm Aug 20 10:46:08 plus WP8 is pretty much win 8 Aug 20 10:46:11 with a different shell Aug 20 10:46:24 i'm pretty excited about it Aug 20 10:46:35 win8 or wp8? :) Aug 20 10:46:39 i could get a wp8 Aug 20 10:46:44 i'm excited too, i'm going to //build Aug 20 10:46:44 both, but more wp8 Aug 20 10:46:51 i am running windows 8 on my imac right now Aug 20 10:46:52 hopefully with them new quad krait chips Aug 20 10:48:13 g00s, :) Aug 20 10:48:27 i think one mistake they made was not having opengl for wp8, though Aug 20 10:48:48 g00s: eh, it's a competitor Aug 20 10:48:51 and extra work Aug 20 10:49:13 extra work for devs to port w/o it :) Aug 20 10:49:47 i'm no expert but opengl -> directx is simple if you're not using the old opengl apis Aug 20 10:53:52 g00s: i find F# unwieldy for non highly computational tasks Aug 20 10:54:48 i have only been curious about it Aug 20 10:55:21 looking at c# i'm sure i'll be pretty happy with that Aug 20 11:00:18 hi Aug 20 11:01:58 on a jelly bean powered device, I noticed readlink("/proc/self/exe") gives " /storage/sdcard0/foo" with a whitespace before the first '/' character Aug 20 11:02:09 anyone ever encountered this? Aug 20 11:05:28 its too early :( Aug 20 11:10:44 canadiancow: did you wake up because someone tried to tip you over ? Aug 20 11:10:53 lol Aug 20 11:10:55 no i ahve to leave at 2 Aug 20 11:10:57 so... yea Aug 20 11:12:18 today is an energy drink day Aug 20 11:12:21 by necessity Aug 20 11:19:26 oh look. no open issues. Aug 20 11:19:35 so im here really early, and theres nothing "important" to do Aug 20 11:19:56 bummer Aug 20 11:20:29 canadiancow: release a new product this weekend ? Aug 20 11:20:39 not afaik Aug 20 11:21:11 we generally dont release on days where we wont have people in the office that day plus the next day Aug 20 11:21:22 oh, i thought maybe you got into work to support a new product launch or something Aug 20 11:21:32 no i just have to leave really early today Aug 20 11:21:50 and certain people get pissy when im not in the office for 8 hours a day Aug 20 11:21:56 regardless of total time worked for the week Aug 20 11:22:31 morning Aug 20 11:23:12 i have a multi-view layout i've made, and i'm intercepting touch events from the parent… is there a reason my ACTION_POINTER_DOWN event won't trigger when other events will? Aug 20 11:30:46 okay who will try my calculator and give me his opinion. Aug 20 11:30:55 (qr-code) Aug 20 11:31:46 if you linked to it someone might :P Aug 20 11:35:03 http://qr.kaywa.com/img.php?s=8&d=http%3A%2F%2Fwww.turboirc.com%2Ftemp%2Fcom.turboirc.tc.ActMain.apk Aug 20 11:35:27 portrait testing only, landscape buttons still in progress Aug 20 11:35:51 i love these comments: // Figure out a gameid or not Aug 20 11:36:48 WindowsNT i dont like the "read phone status and identity" permission Aug 20 11:37:22 i also like your definition of "simple" :) Aug 20 11:37:43 i think you should use Theme.Holo though (on devices that support it) Aug 20 11:38:11 because i dont like the menu button and gingerbread-styled dialogs Aug 20 11:38:28 oh fuck that sound Aug 20 11:38:41 need a way to turn off the sound Aug 20 11:38:47 it's in preferences Aug 20 11:38:51 ah Aug 20 11:39:06 im not sure i'd have tools->preferneces Aug 20 11:39:11 considering there's only one thing under "tools" Aug 20 11:39:14 i added those permissions so paypal donation can work Aug 20 11:39:21 yes I might change that as well Aug 20 11:39:43 it started by default with the scientific mode, yes? Aug 20 11:39:57 oh well it said it was "simple Aug 20 11:40:06 but it looked scientific Aug 20 11:40:13 hmmm let me check that :) Aug 20 11:40:13 ah yea it was not simple Aug 20 11:40:21 anyway i need to get back to work Aug 20 11:40:23 ok Aug 20 11:40:25 thx for trying Aug 20 11:41:51 Hello everyone. I'm just curious what would you use as a backend data storage in case you'd have a service serving your asynchronous data requests for UI that should display those data. Some data caching and data change notification mechanisms are needed. My number one is SQLite database + on change listeners for now since content providers are quite heavy weight for this task, but there might be something better? Aug 20 11:44:55 in other words: I have an UI (e.g. a ListView), I have a service that accepts asyncrhonous request and returns results as broadcasts and I need to connect them with some caching data manager that would serve me some (probably old) data instantly and update UI when actualized data arrives. Aug 20 11:56:24 hello all Aug 20 11:57:18 one question - I have a sqlite db file (downloaded from the web) and I'd like to know the name that this db has - the filename don't seems to be the actual db name. Aug 20 11:57:30 can someone help me with that ? Aug 20 11:58:09 Pinas, on a computer: use the sqlite (or sqlite3) command to open the file Aug 20 11:59:08 EPG - ok and how do I get the actual name ? Aug 20 11:59:55 dunno, type help Aug 20 12:01:54 Pinas: .schema displays you table names and colums, but I don't think that SQLite databases has names Aug 20 12:03:34 ok then its .databases command .help will give you help on other commands Aug 20 12:48:29 anyone know why Aug 20 12:48:29 SCALE = (double) (wm.getDefaultDisplay().getWidth() / 480); keeps being set to 1?, i cant figure it out, it should be 1.6, the width is 800 Aug 20 12:48:55 i had that same bug recently :) Aug 20 12:49:06 canadiancow, :) any suggestions? xd Aug 20 12:49:18 getWidth() returns an int Aug 20 12:49:22 so you're doing int divided by int Aug 20 12:49:24 which returns an int Aug 20 12:49:25 ahh Aug 20 12:49:27 and is THEN cast to double Aug 20 12:50:05 so cast the int to double first? Aug 20 12:50:12 i think if you just take off the brackets you should be good Aug 20 12:50:25 or make it "480d" instad of "480" Aug 20 12:51:08 ohh whaat you can do that? :O Aug 20 12:51:11 * Bear10 feels so nub Aug 20 12:51:22 oh wait nvm Aug 20 12:51:24 i got that haha Aug 20 12:51:27 i thought i read dp Aug 20 12:52:54 canadiancow, what did you do it for? a game? Aug 20 12:54:41 yea Aug 20 12:56:00 TelephonyManager.EXTRA_INCOMING_NUMBER whats used to read outgoing number i cant find it Aug 20 12:57:41 http://stackoverflow.com/questions/6324771/how-to-get-outgoing-call-number-in-android Aug 20 12:58:29 Snuffel: i will look thankyou Aug 20 12:58:41 i googled that Aug 20 12:59:02 canadiancow, how do you do the aspect ratio? do you letter box it, or do you fill the whole screen? Aug 20 12:59:19 * Bear10 is working on his first game Aug 20 12:59:36 well that depends on the game Aug 20 12:59:44 i dont letterbox Aug 20 12:59:46 i never letterbox Aug 20 12:59:55 but the actual behaviour depends Aug 20 13:00:19 i was looking in the docs for it ' Aug 20 13:01:05 canadiancow, so you stretch the pixels based on screenWidth/baseWidth or something? Aug 20 13:01:08 and same for height? Aug 20 13:01:12 no Aug 20 13:01:14 i never stretch Aug 20 13:01:20 so what do you do? Aug 20 13:01:25 you must be awful sore Aug 20 13:01:32 ooc Aug 20 13:02:12 in https://play.google.com/store/apps/details?id=com.zynga.hanging the background scrolls vertically, so i just adjust the amount visible on the screen at one time Aug 20 13:02:28 in https://play.google.com/store/apps/details?id=com.zynga.scramble i just center the board in the space, possibly shrinking it down to fit Aug 20 13:02:49 ah Aug 20 13:03:04 so it really depends on the game Aug 20 13:03:15 gotcha, im trying to make a tower defense as my first attempt Aug 20 13:03:41 i'd say try to avoid letterboxing and stretching the graphics Aug 20 13:03:50 but depending on the game, you might have to make compromises Aug 20 13:06:47 lol at app hacking attempt with crash report (on app launch): java.io.FileNotFoundException: res/layout/screen_simple.xml. The app does'nt have such layout at all. Aug 20 13:07:10 o.O Aug 20 13:08:10 wonder how many of this incomprehensible crash report comes from hacking, with occasional "android.content.res.Resources$NotFoundException: Resource ID..." crashes that make no sense otherwise Aug 20 13:09:27 how can that ever happen: "java.lang.IndexOutOfBoundsException Aug 20 13:09:27 at android.content.res.StringBlock.nativeGetString(Native Method)" Aug 20 13:09:27 does it make sense that your app would be hacked? Aug 20 13:09:37 like is it something someone would want to hack Aug 20 13:09:38 What is the best alterntive for a image gallery? Gallery.java is deprecated? Aug 20 13:10:05 canadiancow: yes Aug 20 13:10:49 canadiacow: plus you have all these automated crack program that may repackage your app with custom stuff on start (like a toast) Aug 20 13:11:07 "cracked by l33t hacker" Aug 20 13:11:17 lol Aug 20 13:11:26 my apps are free Aug 20 13:11:30 so ive never really had that problem Aug 20 13:11:41 screen_simple is a framework resource iirc :p Aug 20 13:11:49 ah Aug 20 13:11:53 although ive seen some cracked games ive done at work Aug 20 13:12:56 Why is output = null when i do this? http://pastebin.com/jHVTVN7A Aug 20 13:13:21 ok dont do == for string comparison Aug 20 13:13:22 I have an System.out.println that says that DataSize = kb Aug 20 13:13:28 do "mb".equals(DataSize) Aug 20 13:13:35 also why are you storing a size like that Aug 20 13:13:43 dont use System.out.println Aug 20 13:13:48 Its for settings. Aug 20 13:14:07 ok well, read my remark about string comparison Aug 20 13:14:08 thats why Aug 20 13:14:09 jeebus Aug 20 13:14:17 flood of stars on my new GitHub repo Aug 20 13:14:19 EddieRingle|MBP y u no update github Aug 20 13:14:38 canadiancow: just started working on it again Aug 20 13:14:51 canadiancow: was stuck awhile back and needed a break Aug 20 13:15:12 https://github.com/eddieringle/android-undergarment Aug 20 13:15:14 dem stars Aug 20 13:16:34 It's the JakeWharton effect Aug 20 13:16:41 Once he stars, they all follow Aug 20 13:16:46 I guess Aug 20 13:17:19 lol Aug 20 13:18:18 cool EddieRingle|MBP Aug 20 13:18:29 i'd consider that in my own apps if they were big enough to make it worthwhile Aug 20 13:18:42 canadiancow: I'm considering it for Hubroid Aug 20 13:18:53 would differentiate from the other two apps that are crowding the space now Aug 20 13:30:05 canadiancow, you work for zynga?? Aug 20 13:30:45 they look successful Aug 20 13:31:03 Bear10: less so every day (lawl stock price) Aug 20 13:31:08 lol Aug 20 13:31:09 lol Aug 20 13:31:16 stock doesn't indicate much though, look at facebook Aug 20 13:31:19 they've dropped 50% since IPO Aug 20 13:31:54 i don't consider FB successful either, interms of generating revenue Aug 20 13:31:58 all that means is they're overvalued Aug 20 13:32:06 or they were overvalued Aug 20 13:32:09 but yes, i work for zynga Aug 20 13:32:16 but i've given my notice, and i leave september 7 Aug 20 13:32:19 for a journey to another land Aug 20 13:32:23 (and company) Aug 20 13:32:44 wow nice Aug 20 13:32:46 welcome to America! ;) Aug 20 13:32:53 lol Aug 20 13:33:00 /nick americancow Aug 20 13:34:06 i like how no one every thoughtj that loading 10MB of assets when 9MB of them are already in RAM was a bad idea Aug 20 13:34:15 s/no one/one specific person/ Aug 20 13:35:08 welcome to the department of redundancy department Aug 20 13:35:21 lol that is bad Aug 20 13:35:42 yo dawg, i heard you like loading assets Aug 20 13:37:12 i dont know whether i should log my work under "memory" or "performance" Aug 20 13:37:28 maybe i'll do both and make it loook like i worked 25 hours today Aug 20 13:38:02 your "above and beyond" commitment will be missed Aug 20 13:38:44 :D Aug 20 13:38:55 I was going to re-explain the problem, but I guess it's more easily explained here: http://stackoverflow.com/questions/12038737/1-app-handling-all-nfc-request-or-lots-of-apps Aug 20 13:43:41 how important is using try/catch with motion events? should i be getting exceptions? Aug 20 13:44:04 mikemike, take a look at other apps Aug 20 13:44:16 i use NFC Task Launcher Aug 20 13:44:19 it has a shitload of permissions Aug 20 13:44:25 even though all i ever use it for is silent mode and wifi Aug 20 13:44:42 also, it lets me write my own tasks to nfc tags Aug 20 13:44:54 yeah, that is a different sort of audience though - this is for people who probably don't even know what NFC is Aug 20 13:45:01 ah hmm Aug 20 13:45:06 well i'd still go with one app Aug 20 13:45:27 everyone thinks i just have a sticker on my work laptop Aug 20 13:45:31 :) Aug 20 13:45:57 i remember back before nfc was popular Aug 20 13:46:01 I can, of course, explain why the other permissions are there in the description. This is my first 'droid app (done lots of iOS before) though, so I am airing on the side of caution Aug 20 13:46:30 i had an nfc reader in the expresscard slot of my laptop, so i could unlock my laptop with my keychain by jsut dangling it over Aug 20 13:46:36 now everyone and their mom has nfc Aug 20 13:47:03 I really need to get around to finishing building the nfc sniffer board I've got :P Aug 20 13:47:25 It's fairly un-subtle of course Aug 20 13:47:29 If you have a SO account, could you upvote the question - assuming you think it's worthy, of course :) Aug 20 13:47:30 heh Aug 20 13:47:37 i dont mikemike :P Aug 20 13:47:41 although i could answer it Aug 20 13:47:44 and get points Aug 20 13:47:55 go for it Aug 20 13:47:59 lol Aug 20 13:48:04 rep whore Aug 20 13:48:04 :P Aug 20 13:49:27 i basically took what isaid here and added punctuation :P Aug 20 13:49:41 wazap Aug 20 13:50:31 telepMngr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); why does getSystemService throw an error :/ in have the telephony impoted Aug 20 13:50:45 I don't know, why does it? Aug 20 13:50:50 What is the error? Aug 20 13:51:02 Does the device have telephony? Aug 20 13:51:15 what do you mean "throw an error" Aug 20 13:51:17 Are you getting a NPE because there's no telephony manager and you're trying to make calls on it? Aug 20 13:51:25 you talk about it being "imported" Aug 20 13:51:29 $5 on NPE due to a shitty tablet or something Aug 20 13:51:29 which would be a compile-time error Aug 20 13:51:31 for a buttons.xml, where would you put the selector xml code? Aug 20 13:51:32 not a "thrown" error Aug 20 13:51:34 "Context cannot be resolved" Aug 20 13:51:36 In drawable? Aug 20 13:51:39 SimonVT: +1 Aug 20 13:51:52 you always make me giggle Aug 20 13:52:04 like a little girl? Aug 20 13:52:14 i think you just lost man points ;) Aug 20 13:52:46 Where does the button selector code go? Aug 20 13:53:04 i cant believe this dumbass guy going on about rape pregnancies Aug 20 13:53:11 The reason, Freind said, is that the traumatic experience of rape causes a woman to "secrete a certain secretion" that tends to kill sperm. Aug 20 13:53:24 wtf Aug 20 13:53:27 Aug 20 13:53:56 not... really relevant to #android-dev canadiancow :| Aug 20 13:54:09 [09:53:27] Aug 20 13:54:20 im moving to the US for an ANDROID DEV job Aug 20 13:54:28 this is important to know about politicians in the country Aug 20 13:54:32 therefore relevant Aug 20 13:54:39 :) Aug 20 13:54:41 #android-canadiancow Aug 20 13:55:57 lol: "Java.lang.NullPointerException at android.app.Activity.onStop(Activity.java:1301)" Aug 20 13:56:05 i can i make a grid of buttons without using nested weights in a linear layout? Aug 20 13:56:17 bubbleguuum, it's possible you set something to null somewhere Aug 20 13:56:21 :S Aug 20 13:56:28 i know i had a nasty listview bug once Aug 20 13:56:33 a NPE so deep inside ListView Aug 20 13:56:41 because somewhere in my adapter something was returning null Aug 20 13:56:57 nope, it is a known (to me) error happening on device using BOARD="rk29sdk". Another clown version of Android Aug 20 13:57:59 ah Aug 20 13:58:23 as far as im concerned, if you have even like 1000 users of your app, and an error only happens once, like... whatever Aug 20 13:58:46 oh gee cyanogenmod 10 alpha 1 on most_locked_down_device_ever crashed? what a surprise Aug 20 13:59:29 Hi Aug 20 13:59:47 Is possible to run an app in fullscreen in android ICS (4.0)? Aug 20 13:59:55 there's a lot of custom fails in the framework on custom ROMs of Android or SDK Aug 20 14:00:37 There's also a lot of fails in some manufacturers roms :p Aug 20 14:00:54 yes there is fail everywhere. Aug 20 14:01:03 droid-seeker: sure, it's just a style Aug 20 14:01:19 we're knee deep in fail Aug 20 14:01:19 An unknown fail in the LVL that get on some devices that seems ICS only: "java.lang.NullPointerException at com.android.vending.licensing.n.a(Unknown Source)" Aug 20 14:01:36 alankila: In tablets/ Aug 20 14:01:38 ? Aug 20 14:01:54 umm... I think so, there was some way to disable the keys Aug 20 14:02:56 Android is so awesome for throwing undocumented RuntimeException's in every possible area of the framework... Aug 20 14:03:53 I know this is a simple question, but if I make a button.xml for the drawable folder, which drawable folder does it go in? Aug 20 14:03:56 Doesi t matter? Aug 20 14:04:06 alankila: I tried setting the style to hide the status bar. Only dimming works here Aug 20 14:04:38 Tracks: xml's usually just go in drawable/ Aug 20 14:04:46 ok Aug 20 14:04:56 well, I haven't tried a tablet yet but I recently wrote a little fullscreen app myself, or still developing it rather, and I just selected the theme with no title bar and fullscreen or something and that did it Aug 20 14:05:38 alankila: Yeah, this works in android 2.3 for me also Aug 20 14:05:53 I don't remember the specifics, but you can't always hide the status bar Aug 20 14:06:01 I don't have adrawable, i have drawble-hdpi etc. in bin/res and drawable-hdpi etc. in /res Aug 20 14:06:07 blargh: "java.lang.NullPointerException at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:385)" Aug 20 14:07:01 Tracks: Guess what you gotta do then Aug 20 14:07:08 make a drawable Aug 20 14:07:28 No, make a folder called drawable Aug 20 14:07:32 what's the difference between android:textAppearance="?android:attr/textappearance..." and style="?android:attr/textApperance..." ?? Aug 20 14:07:33 thats what i meant thanks Aug 20 14:09:46 if i'm tracking ACTION_POINTER_DOWN, setting a boolean to true, then using GetY(1) if that boolean is true, how is it possible i could get a pointer index out of range exception? Aug 20 14:12:38 Hi. A ListView is for items that share the same views but with different data right? What if I'm looking for something similar but with different views (for each item). My suggestion is to make a layout (eg: LinearLayout) with dividers between. ANy better practice? Aug 20 14:13:10 johanhar: listview can handle multiple types of items too. Aug 20 14:13:14 ListView supports that Aug 20 14:13:17 but if you have a distinct item type per item, maybe you shouldn't use listview Aug 20 14:13:24 that's what I have Aug 20 14:13:51 custom adapter Aug 20 14:13:55 or well, nothing prevents constructing the views from scratch in the adapter Aug 20 14:14:04 assuming they are constructable by some algorithm Aug 20 14:14:46 I just want something like a table-row functionality where each row wraps a certain number of views. ListView can do this but to me it seemed that each row had to share the same set of views. Aug 20 14:14:47 It's just that the performance will be quite bad, since listview's optimizations rely on the views to be the same. If you don't have a lot of items, it's best to just addView them to a LinearLayout. Aug 20 14:15:07 Ok, well guess I'll do that :) Aug 20 14:15:17 If you do have a lot of items, I guess you could cache the views somehow but that would be somewhat complicated. Aug 20 14:15:28 No no, just 4 items. Aug 20 14:15:53 ListView's performance wouldn't be any worse than LinearLayout... you just pay the cost upfront with LinearLayout Aug 20 14:16:30 wongk: yes, which usually provides the best user experience. Aug 20 14:16:55 you could in theory create all your ListView views upfront as well Aug 20 14:17:15 just depends on which ViewGroup really makes sense Aug 20 14:17:21 E.g one of them have a label: "Notification", and below the label another label (by label I mean TextView) to show which sound is chosen. By clicking the parent (the row or item or whatever) I want to provide a dialog to choose music/sounds. The next item/row also opens a dialog when clicking the parent which consists of 3 labels. Aug 20 14:18:19 Eh, I wouldn't count on a linearlayout with 50 items offering the same performance as a listview with 50 items.. At least not on older devices, where they don't do as many optimizations in the layout phase Aug 20 14:19:26 Inflating a layout is pretty expensive, though 50 items is probably past the point where a hacked list adapter might work better. Aug 20 14:20:10 My next question. Is it possible to make a selector for different states triggered by the parent? E.g I want to change the textcolor of all my labels when the parent LinearLayout is in pressed state. Aug 20 14:20:28 Sorry I keep saying labels, I mean TextView Aug 20 14:20:36 Hm there's this duplicateparentstate thingy I think, let me look. Aug 20 14:21:03 http://developer.android.com/reference/android/view/View.html#attr_android:duplicateParentState might do the trick Aug 20 14:21:10 Thanks :) Aug 20 14:23:08 Is this a rip-off btw? http://www.androidicons.com/ Aug 20 14:23:53 Sure looks like it Aug 20 14:23:57 Probably Aug 20 14:23:59 you can see the icons and the price, do you find it to a be a rip off? Aug 20 14:24:12 They're the free icons, as far as I can tell. Aug 20 14:24:29 http://developer.android.com/design/downloads/index.html action bar icon pack Aug 20 14:24:34 You're probably never going to use 90% of the icons, and you'll always be missing some Aug 20 14:24:38 I've been using some utility from google to make icons for holo (dark and light). They only have so-so many icons to choose from. $25 is a lot for some icons that mostly can be found for free Aug 20 14:24:44 thanks EuroTrash Aug 20 14:25:05 Maybe there's some new ones in there, but most of them seem to be in the free package. Aug 20 14:25:12 Might as well learn enough photoshop/inkscape/whatever to make action item icons Aug 20 14:25:30 when it comes to graphic are, $25 is nothing... but a lot of these are the same as the stock icons Aug 20 14:25:32 I dunno, I doubt I could do that for $25. Aug 20 14:25:35 graphic art Aug 20 14:25:48 That's what I did after getting tired of looking for icon packs that suited my needs Aug 20 14:26:50 i paid someone to design me some custom icons that look very similar to ones google use Aug 20 14:26:54 just because they are not in AOSP Aug 20 14:27:09 EuroTrash: 200 icons, for your average app you can throw away 190 or more of them Aug 20 14:27:34 True, but even making one or 2 is a stretch for $25. Aug 20 14:27:36 Then, as I said, there most likely will be some missing you'll have to do yourself/find elsewhere Aug 20 14:27:59 Considering my photoshop skills, opportunity costs, etc. Aug 20 14:28:30 Hm ok, that set has different colors. Not that bad a ripoff as I initially thought. Aug 20 14:29:01 Action item icons are single color.. You can change it in paint :p Aug 20 14:29:05 Well, it's up to you, you make a real or fictitious $x an hour, can you make them for less than $25? THat's the question. Aug 20 14:29:35 To set a price for one customer and one job is not the same tho Aug 20 14:29:39 I wonder if Imagemagick does tinting Aug 20 14:29:42 This is a sale Aug 20 14:29:50 You dont set the same price for a sale as you do for a job Aug 20 14:29:55 Can I make 200 icons for $25? No.. Can I get all the icons I need from a $25 pack? No Aug 20 14:30:42 Can you make the ones you need for $25? :) Aug 20 14:31:36 Can I get the ones I need for $25 anywhere? Aug 20 14:31:54 Can you find them quick enough? :P Aug 20 14:33:25 My point is that I find icon packs useless, I still have to get the rest of the icons elsewhere Aug 20 14:33:27 My favorite method for icon design, when I've had to do it, is to look through few pages of google images, select one, and manipulate it in some ways that make it not obviously stolen. Like flip it, change color scheme, or redraw some compression artifacts away. Fairly quickly it looks like original work. Aug 20 14:33:53 there's also lots of free-for-commecial-use icon packs that have lots of icons in same theme, often easy to manipulate Aug 20 14:34:46 the former method is not exactly legal, I suppose, but results are ambiguous enough to pass for real Aug 20 14:35:13 wish I could draw properly, though. I just don't have the practice for it. Aug 20 14:35:35 From a quick look I can use about 8 of the icons in that pack, all of which are in AOSP Aug 20 14:36:18 Good thing we're all making the same app :P Aug 20 14:37:14 the fun thing is, nobody but actual artists care about the icons. For instance, one set had different shadows under them and I thought it looked like shit but nobody cared. Aug 20 14:37:58 I guess subconsciously it doesn't look polished, though. Aug 20 14:38:39 I don't care about the icons specifically, but they add to the overall feel Aug 20 14:39:19 the ultimate funniest application I ever saw had some fantasy-rpg-guy's self-drawn icons and thematic graphics on every page of the application. The man had reimplemented windows controls for it too, I guess because his programming language of choice did not have things like text input fields. Aug 20 14:39:49 the window decorations were self-drawn too. It looked kooky as hell and was mission critical to that company Aug 20 14:40:17 telepMngr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); why does getSystemService throw an error :/ in have the telephony impoted Aug 20 14:40:28 the decorations on pages were stuff like french guillotines for "delete" action Aug 20 14:41:04 I was not allowed to take screenshots of it, because I would have dailywtf'd the shit for sure Aug 20 14:41:45 I never saw the code either, but someone else who did said that it read quite as original as the UI looked Aug 20 14:42:10 Sounds like an awesome app :p Aug 20 14:42:48 droidbuster: What is the error.. Pretty sure you were asked this last time Aug 20 14:43:11 I am trying to remember what it was written in... maybe object pascale Aug 20 14:43:21 something that doesn't have GUI support ordinarily at all or something Aug 20 14:43:22 just doesnt know what getsystemservice is Aug 20 14:43:34 or can just provide some rectangular canvas to draw stuff in Aug 20 14:43:44 in eclipse its underlined in red ill pastebin it Aug 20 14:43:44 getSystemService is a method of Context Aug 20 14:43:50 Are you call it from Context, or a subclass? Aug 20 14:43:59 *sigh* time to go shopping Aug 20 14:44:00 ohhhh let me import that once duh Aug 20 14:44:11 context Aug 20 14:44:21 You need to call it on a context Aug 20 14:44:26 Not just import Context Aug 20 14:49:22 droidbuster: you may wish to learn Java before you continue. Aug 20 14:49:30 SimonVT: just a mockup http://pastebin.com/phnM75hf Aug 20 14:49:33 SimonVT, time to unstar then... Aug 20 14:49:39 droidbuster: I'd recommend learning at least http://docs.oracle.com/javase/tutorial/java/index.html Aug 20 14:49:58 JakeWharton: haha Aug 20 14:50:11 droidbuster: in particular, when someone says "getSystemService is a method of Context" you should know what that means. Aug 20 14:50:36 I only care about it since i'm obligated to follow what's popular in Android, despite how awful and abrasive the UI patterns may be Aug 20 14:50:54 i know Aug 20 14:50:56 that actionbar Aug 20 14:50:57 like wow Aug 20 14:51:00 worst. pattern. ever. Aug 20 14:52:27 canadiancow: you should make it your first task to go through all the android apps and rip out the action bars Aug 20 14:52:51 replace the action bars with candy bars Aug 20 14:54:33 hello i have a small question. My app depends on tcpdump so I want to bring the binary of tcpdump (arm version of course) with my app. How can I put tcpdump into the apk an copy it to some destination when the app is first started ? Aug 20 14:54:50 Pinas: put it in assets Aug 20 14:54:55 ^^ Aug 20 14:55:04 Pinas: then copy it to your app files directory and make it +x (you'll ahve to execute chmod to achieve this) Aug 20 14:55:21 don't forget to check if it already exists, so that you don't just keep re-extracting it (that's wasteful!) Aug 20 14:55:28 Pinas: Also you'll want/need to include a copy for each platform and detect it with Build.CPU_ABI Aug 20 14:55:33 yes, this too Aug 20 14:56:09 I use a build script around ndk-build and title each binary w/ the ABI when I copy it out, so I can just get the abi and see if an asset exists, w/ no future logic for new platforms Aug 20 14:57:19 hmm the different platforms could be a problem ? Aug 20 14:57:32 only if you care. Aug 20 14:57:41 You can always set what platforms you support in the manifest Aug 20 14:57:43 if you don't compile binaries for each cpu platform? Yes, they'd definitely be a problem if anyone tried to run your code on, say, a mips tablet, or an intel device Aug 20 14:57:50 (or by including dummy shared libs in libs/) Aug 20 14:58:08 considering once you have it building in ndk it's trivial to compile for all platforms, you probably should just do it the right way Aug 20 14:58:19 tho since you're using tcpdump this implies you're requiring root, which is going to limit your audience anyhow Aug 20 14:59:40 hmm I think that I'll be lazy for now and stick to arm :D Aug 20 15:00:24 YO Aug 20 15:00:43 I'm having problems in setting my app to fullscreen in android ICS (4.0) Aug 20 15:00:48 Pinas: also beware executing bins under android is... weird. Aug 20 15:00:56 in a tablet Aug 20 15:01:41 dragorn - well I don't know how else I could sniff network traffic. Of course I could use libpcap but tcpdump is much easier :D Aug 20 15:01:48 Pinas: The normal java methods are generally considered unsafe - dalvik apparently doesn't really like the timing issues involved when you fork. I wrote my own jni wrapper that does a fork-exec in a single call Aug 20 15:02:08 you can't use libpcap; while you could write jni bindings for it, you can't elevate the dalvik/java/android side of your app to root Aug 20 15:02:32 Is it possible to run an app in fullscreen with android 4.0 (ICS) in a tablet? Aug 20 15:02:58 dragorn: oha ok - well so tcpdump seems to be the only possiblity Aug 20 15:03:41 I wrote a jni wrapper that does a pipe, fork, dup2 to map the stdout of the child into the pipe, then generates a java/io/FileDescriptor object to let the android side read the stdout cleanly Aug 20 15:03:41 droid-seeker: probably. Aug 20 15:04:06 Pinas: yes. if you keep reading you'll see i'm trying to tell you the solution (or one of them). Aug 20 15:04:07 droid-seeker: bear in mind that it's a dangerous thing to enable fullscreen on a device which doesn't have hardware buttons. Aug 20 15:04:27 define "full-screen" Aug 20 15:04:46 lov: is that possible? I thought the softbuttons were immutable, tehy'll just shrink to dots Aug 20 15:04:51 i think on sw720dp devices, you can only dim the system bar Aug 20 15:04:59 below that, you can totally hide it, but a touch will show it Aug 20 15:05:08 dargorn: oha ok. I just start the tcpdump and pipe it's output to a file - later I parse this file. Not as elegant as your solution but seems to work for me :) Aug 20 15:05:13 yeah, I think canadiancow is right Aug 20 15:05:23 Pinas: if you don't need realtime results that's fine Aug 20 15:06:12 Pinas: you may still have problems if you do a naive exec Aug 20 15:07:03 lov: =/ Aug 20 15:07:28 hmm dragorn I'll try it out. Thank you very much :) Aug 20 15:13:39 guys, im getting this error http://www.fpaste.org/LneF/, for this code http://www.fpaste.org/Qr5m/ , im not able to understand where exactly i assigned two parents :/ Aug 20 15:15:50 View v = inflater.inflate(R.layout.contact_layout, group, true); Aug 20 15:15:55 Read up on what the last parameter is Aug 20 15:15:58 taljurf: pass false for the 3rd argument to inflater.inflate Aug 20 15:16:01 And why it should be false Aug 20 15:16:12 Simon's answer is better :P Aug 20 15:16:45 ^_^ Aug 20 15:16:46 why would you ever pass a non-null second param and not want to set it to true? Aug 20 15:16:53 * canadiancow hopes he's remembering properly Aug 20 15:17:01 hey peoples. does anyone know how to track the 'progress' of a scrollable view relative to the whole document? How can I determine when a user has reached the bottom of the page? I can't find it either as a pixel count or as a percentage, and either would work Aug 20 15:17:36 there must be some way to do it because you can use pageDown(true) or fullScroll() to scroll directly to the bottom Aug 20 15:17:40 Because, if you pass a non-null second parameter it will use the right type of layoutparams Aug 20 15:17:42 because sometimes android adds it to the ViewGroup for you Aug 20 15:17:59 If you pass null, once it's added to the parent, default layoutparams are used Aug 20 15:18:29 SimonVT, wongk, canadiancow: i love SimonVT's teacher attitude :) Aug 20 15:18:42 it's the way to be Aug 20 15:19:40 oh yea i see Aug 20 15:19:46 in fragments you'd have int, non-null, false Aug 20 15:19:50 err in oncreateView Aug 20 15:19:53 Yep Aug 20 15:20:03 but i also have many view classes where it's int, this, true Aug 20 15:20:10 and that's what i was thinking of Aug 20 15:20:11 :) Aug 20 15:20:18 like layouts Aug 20 15:20:28 Can someone confirm that rs_script_call is completely broken in every way? Aug 20 15:20:31 Sure, you generally only use false if the framework takes care of adding it to the parent Aug 20 15:20:44 can i fill a listView with my own designs, or does it have to be filled using an adapter? Aug 20 15:20:48 ListViews being another example Aug 20 15:20:54 ^ Aug 20 15:21:17 sonOfRa: an adapter is how it is filled Aug 20 15:21:26 alright, so i would define my own adapter? Aug 20 15:21:34 yes Aug 20 15:21:35 mListView.addView(view) :) Aug 20 15:21:40 (don't do that) Aug 20 15:21:42 good, thanks Aug 20 15:21:44 hah Aug 20 15:23:12 "Gives bad advice - tells you not to follow it" - Good guy canadiancow Aug 20 15:23:25 lol Aug 20 15:29:08 is there any way to make a textview always do the marquee scrolling thing even when the content isn't larger than the bounds Aug 20 15:29:37 the correct way to save / restore fragments on orientation change is by using getFragmentManager().putFragment and getFragmentManager().getFragment, right? Aug 20 15:29:44 wat Aug 20 15:29:49 they are auto-restored Aug 20 15:30:01 canadiancow: not if they are added in code Aug 20 15:30:06 yes they are Aug 20 15:30:09 at least that does not work here Aug 20 15:30:24 it works everywhere else ;) Aug 20 15:30:24 Like with activities, override onSaveInstanceState/onRestoreInstanceState Aug 20 15:30:32 Also, they need to have a tag Aug 20 15:30:40 And be added to the activity Aug 20 15:30:52 SimonVT: i did and i used a tag to add them in my fragment transaction Aug 20 15:31:18 You're doing something wrong somewhere Aug 20 15:31:36 SimonVT: should i get the same instance (object wise) when i work like this Aug 20 15:31:39 ? Aug 20 15:31:43 no Aug 20 15:32:08 It works like activities Aug 20 15:32:15 Old one destroyed, new one created Aug 20 15:32:17 state restored Aug 20 15:32:33 If you want the exact same object, make the fragment retained Aug 20 15:32:35 ok, thanks. i have always used getFragment and putFragment in my Activity that stores / restores the fragment (before). i will try it without that now Aug 20 15:32:38 thanks Aug 20 15:33:24 well retaining fragments has some nasty side effekts, i'd rather not do that. i was just asking a general question, because the documentation is very unclear (at least the one of putFragment / getFragment) Aug 20 15:34:46 Retrieve the current Fragment instance for a reference previously placed with putFragment(Bundle, String, Fragment). <-- for me, that sounds like it retrieves the same instance, but it doesn't. anyway, thanks guys Aug 20 15:35:54 current fragment instance for a reference, implying the instance can change :p Aug 20 15:36:18 still confusing to me ;) Aug 20 15:40:35 getFragment/putFragment is useful in some cases, e.g. if you want to override the default behavior of re-adding fragments to the layout Aug 20 15:41:02 FragmentStatePagerAdapter does this Aug 20 15:46:08 whats the difference between "Utility.mFacebook = new Facebook(APP_ID);" and "Facebook fb = new Facebook(APP_ID);" ? Aug 20 15:46:47 ancanta: set a member vs. set a local variable Aug 20 15:46:50 learn basic java. Aug 20 15:46:59 ^^^ Aug 20 15:47:19 I'm guessing Utility.mFacebook is a static variable Aug 20 15:47:26 In which case you should name it sFacebook :p Aug 20 15:47:27 should be, by naming Aug 20 15:47:39 lol, yea, or a badly named variable Aug 20 15:47:50 thnx alankila Aug 20 15:48:03 I let my IDE color locals and members differently, and convention actually dictates it should be Utility.FACEBOOK or something Aug 20 15:48:25 Nah Aug 20 15:48:26 that is for constants, not static Aug 20 15:48:28 FACEBOOK if it's static final Aug 20 15:48:31 m is in fact an error as you correctly pointed out. I was just looking it as far as 'Utility' being a class name Aug 20 15:48:36 a likely class name even Aug 20 15:48:43 SimonVT: oh? Well, you're right Aug 20 15:48:45 *shame* Aug 20 15:48:47 * Jug6ernaut agree's with SimonVT Aug 20 15:48:58 What _is_ the correct naming for a static that isn't hungarian and not final? Aug 20 15:49:06 is it poor practice to have the activity thread reading and writing to the db? If so, how should I do it ? Aug 20 15:49:19 I guess I never use non-static finals Aug 20 15:49:35 or almost never. I actually name them just like any other member. Aug 20 15:49:50 :o Aug 20 15:49:52 sVariable is the naming convention in Android Aug 20 15:49:54 a static that is not final? Aug 20 15:49:58 sYeaWhatSimonSaid Aug 20 15:50:04 do I really need to extend DialogFragment just to show a dialog? (I just want the old AlertDialog.Builder) type functionality to display a simple message Aug 20 15:50:15 ah... but you don't really have to follow android naming conventions in your own applications Aug 20 15:50:23 If i'm already drawing on a bitmap for my canvas and then rendering it, is it quicker to draw on one bitmap, or go from smaller to bigger, lets say maybe i have tiles render it to one bitmap, then i have a menu bitmap, and then put it all together on the final bitmap before rendering on canvas Aug 20 15:50:25 not sure what happened with the () there ... Aug 20 15:50:26 at least I don't; it's pointless when IDE already hints their type otherwise Aug 20 15:50:27 Sure, you can call them whatever Aug 20 15:50:43 if you dont use proper naming convention your app will crash on nexus devices Aug 20 15:50:45 doc_savage: if you use a fragment, android will recreate it automagically on an orientation change Aug 20 15:50:49 It's only convention after all Aug 20 15:51:15 But for me at least, it makes it easier to read in random pastebins when people ar elooking for help Aug 20 15:51:25 plus the mFoo and sFoo is a convention that reminds me of tblTable and fldField in SQL :-p Aug 20 15:51:33 wongk: ok thanks, it just seems a bit overkill to say "well done" :) Aug 20 15:51:34 lol Aug 20 15:51:41 haha Aug 20 15:51:58 buttonButton Aug 20 15:52:03 doc_savage: create a reusable alert fragment class Aug 20 15:52:04 iInt, bBool, uiUnsignedInt Aug 20 15:52:16 the so-called retarded version of hungarian notion where you just redundantly repeat information otherwise also available, whereas hungarian notation was meant to convey units originally, like this variable measures bytes, this measures chars, so it's bFoo vs. cFoo Aug 20 15:52:20 then you can use it everywhere Aug 20 15:52:27 so you don't mix them up, because bFoo + cFoo doesn't mean anything sensible Aug 20 15:52:44 wongk: yeah, that's what I was looking at on d.android.com which had me thinking there must be something built-in I'm missing, I'll get to it, thanks again Aug 20 15:57:32 hmm fuck... some mails don't get delivered into my inbox. WTF. Aug 20 15:57:53 guys, does it make sense to change the layout when choosing an item from a spinner? the spinner is inside that layout Aug 20 15:58:25 alankila: u could kindly use "*" for sensoring :) Aug 20 15:58:54 I don't see the point. Aug 20 15:59:07 alankila: ok forget it Aug 20 16:00:21 Look, I'll consider it. I just don't understand what the point is because everyone substitutes the missing vowel correctly, and people here are all like 20 years or older, and whatnot. Sorry. Aug 20 16:00:23 i didnt mean forget my question :) Aug 20 16:01:26 alankila: i beleive it should be not only a matter of age but of respect :) nm Aug 20 16:01:52 guys, does it make sense to change the layout when choosing an item from a spinner? the spinner is inside that layout Aug 20 16:01:55 What is the textViewID in the ArrayAdapter constructor used for? I'm trying to create my own arrayAdapter, but I am not sure if I need to substitute it, or what to do with it, considering I will not only have textViews inside of the listView. How would I change this to reflect my needs? Aug 20 16:02:21 sonOfRa: Imo, if you want to make a custom adapter, just extend BaseAdapter Aug 20 16:02:50 I only find the built in adapters useful if you can use them unmodified Aug 20 16:02:57 (except cursoradapter) Aug 20 16:03:35 SimonVT: does it make sense to change the layout when choosing an item from a spinner? if the spinner is inside that layout Aug 20 16:03:38 :) Aug 20 16:03:43 I have no idea what that means Aug 20 16:04:39 SimonVT: OK, i have a layout, the layout has a spinner, on the choice of item#X in that spinner, the same layout would change Aug 20 16:04:45 does it make sense? Aug 20 16:05:06 layout change is quite a broad term Aug 20 16:05:14 adding anything, even a textview changes the layout Aug 20 16:05:18 So your spinner is some kind of navigation dropdown? Aug 20 16:05:49 Anyway, yeah, sure, change the layout Aug 20 16:05:55 * SimonVT is afk Aug 20 16:06:16 sonOfRa, SimonVT: i meant "inflate" , and no its not a navigational spinner, its part of the layout Aug 20 16:06:44 ok, ill go for it, nm all Aug 20 16:07:45 *sigh* Mail.app has decided that all gmail.com originated mail is spam Aug 20 16:07:48 so that's why Aug 20 16:11:26 what would I use as a default textResourceID when creating an arrayAdapter? I don't quite understand the need for that parameter in the constructor Aug 20 16:12:09 Does it create the textViews it generates all with the same ID?! Aug 20 16:15:55 hello people Aug 20 16:16:41 How can I remove the drop shadow from a widget? By default my widget has a giant shadow behind it Aug 20 16:17:39 Im not sure if that's controlled by the widget layout or the device's homescreen or what Aug 20 16:17:47 but it looks hideous for my widget Aug 20 16:20:36 any way to have a fragment's onSaveInstanceState only get called in onStop and not in onPause? Aug 20 16:24:48 luxurymode: there's no guarantee that onStop will be called Aug 20 16:24:59 im aware Aug 20 16:25:24 so how about avoiding onSaveInstanceState when onPause is called? Aug 20 16:25:42 just call it yourself in onStop Aug 20 16:26:09 luxurymode: onSaveInstanceState will be called once during the lifecycle of the fragment Aug 20 16:26:25 luxurymode: it is its own callback, it isn't triggered by onPause or on Stop Aug 20 16:27:16 anyone know how to remove the shadow behind a widget on my homescreen? Aug 20 16:27:26 ?hm where on the file system do I find executables that I put in assets ? Aug 20 16:28:34 Pinas: assets aren't extracted automatically. You have to reference them manually yourself and do something with them. Aug 20 16:29:33 lov I tried it but android says that the file can not be extracted via a AssetFiledescriptor Aug 20 16:36:32 http://www.xda-developers.com/android/gui-for-managing-jelly-beans-unfinished-multi-account-feature/ Aug 20 16:40:20 Wonder how much breaks :p Aug 20 16:54:06 would a layout similar to this one be done with a tableLayout? https://dl.dropbox.com/u/47991161/Uni/Android/history.png I don't seem to be able to specifically set the alignments of text, width of the columns, and alignment of the text inside the cells. Aug 20 16:56:27 does balsamiq have more mobile like features now? Aug 20 16:56:35 i haven't used it in a while Aug 20 16:56:50 i don't know, i wasn't the guy creating the mockups Aug 20 16:56:55 ah Aug 20 16:57:12 im the guy dealing with making the real thing look like the mockups >.< Aug 20 16:58:14 this type of thing is usually accomplised with ListView Aug 20 16:58:30 i don't know that i can think of any apps that use column headers in a listr Aug 20 16:59:36 oh, so i would do a listview actually? I was thinking about that, but went back to using a tablelayout Aug 20 17:00:34 if you do, you should find out if the headers are a necessity Aug 20 17:01:05 they seem self explanatory to me, but I don't know if the designing guys are okay with omitting them Aug 20 17:03:41 for the header i was thinking about using a textview with small text and putting it in the first row Aug 20 17:04:35 http://developer.android.com/reference/android/widget/ListView.html#addHeaderView(android.view.View) Aug 20 17:05:47 mh Aug 20 17:12:59 main problem i was having with listview is getting the inputs into a proper format Aug 20 17:13:20 and drawing the border between the values, which is definitely wanted by the designers Aug 20 17:14:10 Simple match_parent 1px wide view with a background should do the trick. Aug 20 17:14:23 Just have to have a sane system to guarantee the same width. Aug 20 17:14:42 So probably percentage weights. Aug 20 17:15:12 Or fix the width on the right column if you can be reasonably sure of its width. Aug 20 17:15:58 About the inputs... wtf inputs? I don't see inputs :P Aug 20 17:18:33 Rethink the whole border thing, not sure it'll look good Aug 20 17:19:50 Heh, so let's rethink it. Aug 20 17:19:57 What the... Aug 20 17:20:18 It's a table Aug 20 17:22:00 it feels like you want a table layout Aug 20 17:22:06 rather than a linear layout? Aug 20 17:22:49 can someone suggest a library for progressive audio playback and caching? http://stackoverflow.com/questions/12041994/progressive-audio-caching-library-for-android Aug 20 17:23:15 It is not a LinearLayout, robb_www . Aug 20 17:23:39 The inputs are serialized json strings, EuroTrash Aug 20 17:24:01 the values date and result come from the objects in those strings Aug 20 17:24:50 Oh ok Aug 20 17:24:58 Jackson ftw Aug 20 17:25:13 sonOfRa, I assume ListView uses LinearLayout internally Aug 20 17:25:15 TableLayout is not that strong on Android, I don't think it even has borders. Aug 20 17:27:19 i found a way to do the borders, really messy though Aug 20 17:27:27 define the backgroundcolor on the tablelayout Aug 20 17:27:34 and a different color on the tablerows Aug 20 17:28:34 please someone help me with my question http://stackoverflow.com/questions/12041994/progressive-audio-caching-library-for-android Aug 20 17:29:32 I would probably just use horizontal linearlayouts with, in order, a 1px wide view with the border color as background, the date content (weight 0.75 or so, or 1 if the result column is fixed width), another 1px wide view, the result textview, another 1px view. Aug 20 17:29:48 Stack 'em, either in a container layout or a listview, and you're almost there. Aug 20 17:31:44 yeah, i think that might work out Aug 20 17:33:03 A background xml drawable with a stroke might take care of the outer border, come to think of it. Aug 20 17:37:40 Is there any way to get the Build.Model constant without writing an app? Aug 20 17:37:45 Like through adb shell? Aug 20 17:40:53 Probably adb shell getprop something Aug 20 17:41:20 SimonVT: Good thinking, thanks! Aug 20 17:41:35 I believe that's where all the information is from anyway Aug 20 17:43:33 pfn you around? Aug 20 17:50:59 what exactly makes google play a "trusted source"?  What/where is the security mechanism that makes it different from 3rd party application stores? Aug 20 17:53:25 GeKKo1: I imagine it's the URL where the service lives. Aug 20 17:53:33 SimonVT: Yeah, that's where everything was. Aug 20 17:53:36 the market application is most likely hardcoded to look up data from the play store. Aug 20 17:54:57 GeKKo1: the actual applications are then encrypted with keys protected by certificates given by google Aug 20 17:55:21 IIRC these certificates were introduced somewhere to android, which makes them "trusted" Aug 20 17:55:32 I mean, it's basically a PKI Aug 20 17:56:13 I imagine there are some intents or such you can send to packagemanager that works only if the application is signed by trusted certificate or you have unchecked the box that says you only want signed apps Aug 20 17:56:26 and all these protections are circumvented also if you just manually copy the app file over at /data/app Aug 20 17:56:40 at least I have never had trouble that way I think, whether signed or not Aug 20 17:56:57 come to think of it, that does sound a bit scary Aug 20 17:58:08 Let's see what the android source says on this topic. I suddenly got curious. Aug 20 17:59:53 alankila: thx, i've been looking through ICS source to find what makes google play the trusted source… I have not found it yet… only a flag that is checked to see if the device is allowed to install from untrusted sources Aug 20 18:00:56 Oh lovely, this is such giant spaghetti Aug 20 18:01:08 It's signed with the system certificate Aug 20 18:01:09 luxurymode, sup? Aug 20 18:01:23 hey pfn, pm'd you Aug 20 18:02:09 SimonVT: is that done in the google play apk or the android source? Aug 20 18:04:37 Something has to be done to both Aug 20 18:05:35 Not exactly sure they're signed with the same certificate, but iirc the packagemanager checks if the app is signed with a trusted certificate Aug 20 18:05:50 PackageManagerService more exactly Aug 20 18:06:07 That's why you can't just build an app against the android source and use the private APIs to install apps without user intervention Aug 20 18:06:09 it has got likw 10 places that check signatures. I am getting too fed up following it Aug 20 18:07:32 but I recommend reading it if you want to see the sort of gory shit android forces you to work with. I am particularly amused by the fact that places that user service there need to check if (mBound) and if not, queue up work to do later, or else invoke the work immediately. They are bitten by the same clumsiness of android services than I am Aug 20 18:07:38 I piss on your design Aug 20 18:07:47 than=as Aug 20 18:07:50 does anyone know how to track the 'progress' of a scrollable view relative to the whole document? How can I determine when a user has reached the bottom of the page? I can't find it either as a pixel count or as a percentage, and either would work Aug 20 18:09:10 do you know of any documentation on how corporations add internal android application stores? I'm assuming their internal stores are trusted solutions and therefore have to go through all the checks that a normal google play application goes through Aug 20 18:09:15 if i could find the total size of the view, that would do it. all the functions i've found so far only return the size (in pixels) of the size the view occupies on the screen Aug 20 18:10:06 GeKKo1, do you mean a separate store e.g. amazon, or android play billing within an app? Aug 20 18:10:08 thebishop: You have to get the size of the content of the scrollable view Aug 20 18:10:34 SimonVT, i'm dealing with a webview right now Aug 20 18:10:39 Oh, no idea Aug 20 18:10:50 SimonVT, but they have many of the same functions Aug 20 18:11:03 GeKKo1: I guess you need an implementation of market and phones that agree to install applications signed with your own certificates. Aug 20 18:11:22 SimonVT, what function does it with scrollableView? Aug 20 18:11:52 ScrollView only has one child. So you can just get the height of that Aug 20 18:11:56 And do math Aug 20 18:13:01 Any 3rd ad-network guys inhere? Aug 20 18:13:09 3rd party Aug 20 18:13:36 Just put an app on play store, they'll contact you Aug 20 18:14:09 Most of them have a big customer who specifically requested to advertise in your apps Aug 20 18:14:42 SimonVT, do you know the difference between measuredHeight and Height? maybe measuredHeight is what i need? Aug 20 18:15:16 measuredHeight is the height the views own onMeasure returned Aug 20 18:15:28 height is the actual height as laid out on screen Aug 20 18:15:36 I doubt that's what you need Aug 20 18:15:50 As I said, you need the height of the content .. I don't know how you'll get that Aug 20 18:18:16 SimonVT, so there's no function that can return the scroll status as a percentage? that seems like a no-brainer Aug 20 18:18:29 if you wanted to scroll down 20% of the page Aug 20 18:18:37 or determine what % the user has currently scrolled Aug 20 18:18:41 I don't think so Aug 20 18:19:47 SimonVT, on a separate, maybe related issue: is there a way to scroll such that lines of text are not cut off? Aug 20 18:20:27 like if i did a page-down, it should end cleanly between lines of text Aug 20 18:21:03 I have no idea if there's something like that in the api Aug 20 18:21:35 ok Aug 20 19:03:29 Hello. I'm making a game which draws bitmaps to a surfaceview. I have nice images with smooth gradients, but... If I force RGBA_8888 mode for window, surface and bitmaps, I get a huge fps drop on older devices which don't have this mode by default, if I don't do that I get gradient color problems on such devices, but fps is ok. What should I do? Provide good images with gradients for devices that have rgba_8888 by default and different imag Aug 20 19:03:29 es without gradients for those which don't? Aug 20 19:08:07 akls: how are you generating these bitmaps? Would it help to move to GL and use a GLSurfaceView? Aug 20 19:09:06 sounds like dithering could be the answer Aug 20 19:09:23 although dithering requires you not to scale these gradients Aug 20 19:10:07 well, dithering is not going to give a perfect result anyway Aug 20 19:10:10 the fundamental problem is that the bitmaps and destinations tend to be RGB565 on many devices. When loading a bitmap, it's possible to configure it to dither it, so that might be something worth trying also. Aug 20 19:10:40 alankila, but they cannot be 565 if they have alpha channel, right? Aug 20 19:10:47 well, in that case not Aug 20 19:11:56 so, as far as I can understand right now - I cannot force to argb8888 mode because of fps problems and I cannot stick with the current color mode because bitmaps are not going to look right anyway Aug 20 19:12:21 well you can try dithering. It should give the right color on rgb565 in aggregate Aug 20 19:12:21 so providing two different images for devices that have argb8888 by default and for these that don't is a right solution? Aug 20 19:12:39 considering that one variant of the images don't have gradients at all Aug 20 19:13:14 alankila, I have dithering enabled when loading bitmaps and dithering enable in a window Aug 20 19:13:39 okay. I would have expected that to mitigate the problem somewhat. Aug 20 19:14:01 I've tried applying noise in photoshop to my images Aug 20 19:14:06 and it worked, for a while Aug 20 19:14:13 until I tried it out on a tablet Aug 20 19:14:30 and noticed that these color waves persist on larger resolutions Aug 20 19:14:48 + the images now are really big (~ 750 kbs because of noise) Aug 20 19:15:01 hmm... you are predithering them Aug 20 19:15:11 I rather thought you should enable dithering in the BitmapFactory Aug 20 19:15:26 alankila, I have it enabled anyway Aug 20 19:15:51 akls: again, is there a reason that you're not using GL to do your drawing if you're making a game? Aug 20 19:16:34 lov, well, my game is very simple.. I thought about using GL and seems like I'd have to move to GL anyway Aug 20 19:16:51 I have to agree though. OpenGL is the way, on android. Much as I loathe it for being so boneheadedly verbose and alien to java Aug 20 19:16:54 akls, but for now I want to release a quick update Aug 20 19:16:54 * lov shrugs Aug 20 19:17:00 is there a gyroscope example that deals with drift over time Aug 20 19:17:07 you don't HAVE to, but you likely should, especially if you're concerned about framerates on multiple devices Aug 20 19:17:28 alright Aug 20 19:17:35 thank you guys, this was really helpful Aug 20 19:17:48 now I have to go, bye :) Aug 20 19:17:56 * alankila should implement a GLSurfaceView soon and isn't looking forwards to dealing with it again Aug 20 19:18:41 my opengl applications must be the weirdest, they are basically 2d and I do coordinate projections in software. One day, I swear, I'll use a projection matrix. :-p Aug 20 19:21:02 in fact I should use 3d for this, because it will actually have textures in space and they will not be interpolated correctly in 2d, and I don't look forwards to tesselating them manually. *sigh* Aug 20 19:23:45 A list of over 30 000 developer accounts has been published online. Is this legal? Aug 20 19:24:14 why wouldn't it be Aug 20 19:24:23 Is there any info on it that isn't otherwise public? Aug 20 19:24:24 just wondering.. Aug 20 19:24:50 sounds like a compliation of readily available information to me Aug 20 19:24:59 sounds like the spam I've been getting for the last year Aug 20 19:25:02 it would be available anyway yep Aug 20 19:27:48 lov: ? Aug 20 19:27:59 Annoying but probably legal, then :/ Aug 20 19:30:12 spobat: DEAR YOUR APP LOOKS REALLY NEAT! I'M WITH THE J. RANDOM JAGOFF GROUP WHO MAKES APP ANALYTICS FOR APPS, MAYBE YOU'D LIKE TO INCLUDE OUR SDK INTO OUR APP???? Aug 20 19:30:28 no! Aug 20 19:30:35 :} Aug 20 19:30:46 I actually never respond to thus.. Aug 20 19:30:56 well neither do I but I'm annoyed that I get them at all Aug 20 19:48:16 wongk: my access! D: Aug 20 19:48:26 lol Aug 20 19:48:37 im surprised it sent you a notification :P Aug 20 19:49:21 i know you were checking daily for updates too Aug 20 19:49:55 how to download android 2.2 source using git ..?? Aug 20 19:50:08 aagam94: source.android.com Aug 20 19:50:09 git clone Aug 20 19:50:12 2.2 is a branch Aug 20 19:50:21 see the instructions that tell you how to check out certain branches Aug 20 19:50:23 *repo clone Aug 20 19:50:30 Now do that for each git repo Aug 20 19:50:31 which isn't even right Aug 20 19:50:32 Or use repo Aug 20 19:50:48 repo init face-melting-amount-of-repos Aug 20 19:50:59 repo init ALL-the-repos Aug 20 19:51:13 hey oktora please don't randomly message people Aug 20 19:51:17 it would of around how much size? Aug 20 19:51:28 several gb? Aug 20 19:51:40 gbs around?? Aug 20 19:51:49 gigabytes? Aug 20 19:52:11 ya i know but will be of around 10 gb or more? Aug 20 19:52:33 Like 8 or something, isn't it? Aug 20 19:52:44 the uncompiled source is around 6 last time I checked Aug 20 19:53:42 ok Aug 20 20:54:00 guys, why does this code throw nullpointerexception, http://www.fpaste.org/54Wz/ , check lines 79-85 Aug 20 20:54:15 i cant see where the mistake is :/ Aug 20 20:55:23 taljurf: findViewById returns null Aug 20 20:55:37 why are you calling findViewById on the activity instead of the infalted view Aug 20 20:55:53 wongk: oh shi* Aug 20 20:55:55 thanks Aug 20 20:56:00 ... Aug 20 20:56:03 yeah that too Aug 20 21:37:00 man, dealing with multiple library projects and version control is quite annoying Aug 20 22:10:49 hey guys i wanted to make a app that would share internet connection from wifi to bluetooth. can someone tell me where to start? Aug 20 22:11:04 i know the bluetooth api Aug 20 22:11:27 and the wifi api doesnt seem to be too indepth Aug 20 22:24:00 hello. is there some simple way to add the grey overlay to an activity that appears, for example, when you start a dialog? i can't seem to remember this (afair) simple thing :S Aug 20 22:44:18 can someone help me. Using intellij I built my project for release. Afterwords I went in to make a quick change to take some screenshots. Now every time it push out the the emulator it seems like the class files won't update. anything I change in /res updates but nothing in /src. Anyone have an ideas what is up? Aug 20 23:08:42 is there an android study guide? Aug 20 23:09:09 what is a "study guide" ? Aug 20 23:09:28 if you gotta ask you don't know Aug 20 23:09:45 you're probably right Aug 20 23:09:46 http://www.certkey.eu/Android.html Aug 20 23:10:20 Detergentizer: that doesn't exactly look reputable. Aug 20 23:10:35 specifically the part about "The Android certification can prove your capacity of the Android Android" Aug 20 23:10:47 haha Aug 20 23:11:07 seems legit to me 'may success be with you' Aug 20 23:11:29 lol Aug 20 23:11:35 I just want to pass the test Aug 20 23:11:41 i don't care about legit Aug 20 23:12:36 are there any free websites for this? Aug 20 23:14:31 i write android apps now but if i need to know something I look it up... Aug 20 23:14:45 i figure doing a certification will help me get the manual into my head Aug 20 23:15:13 d.android.com has basically everything you need Aug 20 23:15:35 to give you a headache/career change Aug 20 23:16:00 anyways, how consistent are the android emulators with the actual way the device functions? Aug 20 23:16:01 how quaint the remodeled the web site … it is so beautiful!!!! Aug 20 23:16:05 it's pretty Aug 20 23:16:23 and how do you update your emulator with phone manufactururer specific firmware/etc. Aug 20 23:16:48 dogarrhea2: is that a test question? Aug 20 23:17:00 test/development Aug 20 23:17:37 you can copy the rom from device Aug 20 23:17:48 and place it into emulator folder Aug 20 23:18:05 I don't think it even requires root Aug 20 23:18:12 will it use the same networking stuff? Aug 20 23:18:49 it doesn[t have to … it will use whatever lib dllyou place there Aug 20 23:19:02 so, use emulators network if you want Aug 20 23:19:19 but i am unsure exactly Aug 20 23:25:57 I'm almost certain that everything you just said is wrong. Aug 20 23:26:36 too funny Aug 20 23:29:54 alright people who have helped me get this app completed, it's time to see what you have all contributed to ;D Aug 20 23:30:13 here's the systems administration app I've been working on for ..well, a long time Aug 20 23:30:14 https://play.google.com/store/apps/details?id=com.cura&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5jdXJhIl0. Aug 20 23:31:09 most memorable help was from g00s, ctate, alankila and SimonVT Aug 20 23:36:16 Sicp: you did good despite of me, not because of me :) Aug 20 23:36:36 the small tips and tricks here and there matter in apps like this Aug 20 23:36:40 I got performance tricks here Aug 20 23:36:47 preventing thread racing and whatnot Aug 20 23:36:56 knowing when to asynctask and when not to, etc.. Aug 20 23:37:09 thank you guys :) Aug 20 23:38:13 g00s is pretty much useless in the USEFUL advice dept Aug 20 23:38:21 :) Aug 20 23:38:48 definitely Aug 20 23:39:15 Did g00s help you with the ui? ;d Aug 20 23:39:33 no that was my brother actually Aug 20 23:39:46 well, for the first screen only, and the idea of having a Tabview Aug 20 23:39:57 the stuff inside each tab was our (my partner and I)'s effort alone Aug 20 23:40:01 it still looks primitive Aug 20 23:40:24 It was a joke :p g00s probably got it Aug 20 23:40:36 You should read the design guidelines Aug 20 23:40:53 I know it's pretty extensive, but we fell into the "get things working first, then tweak" trap Aug 20 23:41:00 where you never actually go back to tweak :P 4 Aug 20 23:41:03 -4 Aug 20 23:43:04 i remember reading the prag programmer like, 10 years ago or something - and i liked their advice of 'do the most difficult stuff first'. to minimize risk, etc. but its also seemingly at ods with interaction design; without ID concurrently / first you run the risk of producing a UI structured the way the apps's architecture is; which usually isn't right Aug 20 23:43:16 but graphics design - yeah, that can wait for later Aug 20 23:43:46 10 years ago? Aug 20 23:43:53 I read it a year ago, tops Aug 20 23:44:01 isn't that when pragprog came out :P Aug 20 23:44:01 you are old. Aug 20 23:44:10 :) Aug 20 23:45:21 g00s: I wouldn't take that single piece of wisdom to too great an extreme. Aug 20 23:45:48 wisdom knows when wisdom should not be followed : Aug 20 23:45:50 :) Aug 20 23:45:59 For sub-tasks it makes a lot of sense though. If you have to do 5 things, and one of them has unknown duration, it should probably get attention first. Aug 20 23:46:33 That's where the XP "Spike Solution" comes in, I think. Drive all the way through the layers with some throwaway code to find out what it will eventually look like. Aug 20 23:56:38 I dont have a particular paradigm I follow, but I've got my process down pat Aug 20 23:56:56 let me guess: chaos and confusion Aug 20 23:56:59 XD Aug 20 23:57:03 ehe Aug 20 23:57:18 nah, I determine wild cards and build proof of concepts for thos ethings first... Aug 20 23:57:36 then once I've proven those things can be done, start with the core concepts one by one Aug 20 23:57:36 So I have a lon/lat feed that updates every second or so. I have made that into a GeoPoint, and added a custom overlay to the a MapViews overlays... but what is the best way to update this overlay with a new GeoPoint/Location?? Aug 20 23:57:42 then polish the shit out of it Aug 20 23:57:45 or maybe not update it Aug 20 23:57:49 but redraw the map on update Aug 20 23:57:56 I am/was using mapview.postInvalidate() ... but I am not sure if that is a best practice here Aug 20 23:58:01 I am wondering what a MyLocationOverlay does to "redraw" itself when a a users location changes Aug 20 23:58:13 anyone know the best practice here? Aug 20 23:58:34 s/redraw the map/redraw the overlay/ Aug 21 00:15:32 any of you wankers have apple hardware? Aug 21 00:16:13 evening Aug 21 00:17:05 i'm wondering what direction to go… i want to make my own buttons and other controls… do i make a new class simply extending view? i don't want the original android buttons at all, but i want to implement on click, etc Aug 21 00:17:29 and i don't want to use any bitmaps, just vector drawing Aug 21 00:21:52 hey i'm trying to create my own custom layout Aug 21 00:22:06 i want this layout to have a stack of fragments that i can slide in and out like a menu Aug 21 00:22:18 HorizonXP do it Aug 21 00:22:22 similar to the Google+ app and what Prixing does with theres Aug 21 00:22:25 * theirs Aug 21 00:22:48 in my onLayout function, what do I need to call to draw the child fragments correctly? Aug 21 00:23:07 right now i have a for loop that goes through the chidren and calls their layout() functions Aug 21 00:23:15 and? Aug 21 00:23:17 which worked for View-based objects like TextView Aug 21 00:23:25 but for fragments, not seeing anything Aug 21 00:24:18 fragments are funny like that Aug 21 00:24:20 wait Aug 21 00:24:24 i think i know why Aug 21 00:24:29 dev error :P Aug 21 00:26:13 nope, that wasn't it Aug 21 00:26:21 i'll pastebin my code Aug 21 00:26:49 Fragments aren't funny like that Aug 21 00:27:09 The FragmentManager will add the fragments view to the container id you pass Aug 21 00:27:10 doesnt seem like you can just treat a fragment like it was a view Aug 21 00:27:53 But you don't touch the fragment Aug 21 00:28:02 no, they're somewhere between fragments and views. Aug 21 00:28:11 You add it via the fragmentmanager, and it calls addView on the container id you pass Aug 21 00:28:18 errr Aug 21 00:28:22 It's a view with a lifecycle. But not necessarily even has to have a view Aug 21 00:28:26 i don't have a fragment manager Aug 21 00:28:30 so maybe i'm doing something wrong Aug 21 00:28:57 SDK version 11+ or use android-support-v4 and extend from FragmentActivity Aug 21 00:29:01 getFragmentManager().beginTransaction().add(container, fragment, tag) ... ring a bell? Aug 21 00:29:29 it does not Aug 21 00:29:30 sorry, I meant API Level Aug 21 00:29:35 i just added the fragment to my XML Aug 21 00:29:58 Okay, so that also adds the fragments view to your viewgroup Aug 21 00:30:41 SimonVT: that's what I figured Aug 21 00:30:45 here's the XML: http://pastebin.com/9HPdK8yX Aug 21 00:31:06 And what exactly is the issue Aug 21 00:31:33 SimonVT: here is RootView.java http://pastebin.com/1kUm6B1i Aug 21 00:31:50 SimonVT: all i get is a blank screen Aug 21 00:31:58 the fragment should be a list Aug 21 00:32:02 but.... not seeing the list Aug 21 00:32:47 however, i'm willing to concede that i may not be creating the list properly Aug 21 00:32:53 see MenuFragment.java http://pastebin.com/Qdv4SbBY Aug 21 00:34:09 actually, i think that's exactly it Aug 21 00:34:13 Any idea how creating the Ultimate Rotation app is possible? Does it create a transparent overly that controls rotation? Aug 21 00:34:24 Well, try with a simple textview or something first Aug 21 00:34:35 You might have to override onmeasure and measure the view first, not sure Aug 21 00:37:05 And yeah, make sure your fragment actually works Aug 21 00:38:39 SimonVT: ok, so made changes, fragment works, tested it in a RelativeLayout Aug 21 00:38:48 so now back to my RootView Aug 21 00:39:04 so you're saying i may have to override measure too? Aug 21 00:40:23 You usually do Aug 21 00:42:18 SimonVT: ok, so in onLayout, simply calling each child's layout function should be sufficient right? Aug 21 00:42:31 and in onMeasure, could I simply call super.onMeasure(300, 300) for now? Aug 21 00:42:52 listItems.add("Item " + Integer.toString(i + 1)); Aug 21 00:42:56 just loop i from 1 to 10 Aug 21 00:43:13 Yeah Aug 21 00:43:23 minor, but meh Aug 21 00:43:27 speakingcode: this is really just dummy code, not sure that nitpicking on my for loop is going to accomplish much, LOL Aug 21 00:43:27 Eh, not sure about super.onMeasure Aug 21 00:43:31 I doubt that Aug 21 00:43:49 yeah i know, just something that always grinds me a bit Aug 21 00:43:58 Look at some of the framework classes Aug 21 00:44:04 FrameLayout is very simple Aug 21 00:44:09 hello, im using this "FancyAdapter" class technique to populate and display a customized ListView; but how to just show a few data in ListView and carry on more data to display onClick an item? thanks in advance Aug 21 00:44:11 A good place to start Aug 21 00:44:33 You can see how it takes care of childs width/height, paddings, margins, etc Aug 21 00:44:39 SimonVT: docs say that I need to call setMeasuredDimension(int, int) and that superclass' onMeasure(int, int) is a valid use Aug 21 00:44:59 SimonVT: that's a good suggestion, since my end goal is likely very much like FrameLayout Aug 21 00:45:17 Yeah, you probably dont need it to measure your view Aug 21 00:45:26 But still gotta measure the child views I believe Aug 21 00:46:17 Anyway, framelayout Aug 21 00:47:04 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/FrameLayout.java#FrameLayout.onLayout%28boolean%2Cint%2Cint%2Cint%2Cint%29 Aug 21 00:47:17 not too complicated or different than mine i suppose Aug 21 00:49:03 Nah, half that code is taking care of gravity Aug 21 00:49:11 If you don't need that, don't bother Aug 21 00:49:15 gravity is a SOB Aug 21 00:49:25 makes us stick to the ground Aug 21 00:49:36 SimonVT: yeah that's what I figured Aug 21 00:49:47 The framework classes work for a hell of a lot of cases Aug 21 00:49:49 this weeks project, anti gravity app Aug 21 00:50:17 speakingcode: too bad you can't really make apps in Python, otherwise it'd be really easy. Aug 21 00:50:38 i thnk you can make apps in python Aug 21 00:51:26 speakingcode: Hence why I said "you can't really" - you sort of can, but it won't really be pleasant Aug 21 00:51:52 ryanm, speakingcode, i'm gonna get flamed for this, but you cna write apps in Python for PlayBook/BB10 natively, out of the box. Aug 21 00:52:16 nice Aug 21 00:52:27 i gave up on bb when their sdk sucked forever Aug 21 00:52:33 HorizonXP: as someone who's not a BB dev, I'm curious. What language(s) do they support natively? Aug 21 00:52:38 its lot easier with java Aug 21 00:52:47 speakingcode: yeah, the old school BBOS dev sucked donkey balls Aug 21 00:53:02 I dont get python honestly... I mean I've written some stuff, some python, some django etc Aug 21 00:53:04 speakingcode: things have changed with PlayBook and BB10 Aug 21 00:53:05 i thnik bb's latest supports python and such, but the platform is dead, i don't see them coming back Aug 21 00:53:07 python is easier to write, it just crashes more than at runtime Aug 21 00:53:13 -than Aug 21 00:53:26 ryanm: they support C/C++, Adobe AIR, HTML5, and Android Java Aug 21 00:53:27 supports html5/javascript* Aug 21 00:53:31 Python is not official, but it's there Aug 21 00:53:32 I think languages with the super obvious object oriented class library etc Aug 21 00:53:37 and yeah it can run android apps Aug 21 00:54:09 speakingcode does that actually work? I heard they were working on it, never seen it work Aug 21 00:54:17 ron_frow_: yes it does Aug 21 00:54:23 I played with th eplaybook about 8mo before it was released Aug 21 00:54:31 ron_frow_: they just added hardware acceleration for android apps Aug 21 00:54:34 it was pretty rudimentary Aug 21 00:55:21 anyway, join us in #BlackBerryDev if you really care Aug 21 00:55:22 funny python came up, i'm actually sitting in a python user group right now. flask, mongo, and heroku app engine Aug 21 00:55:26 the topic is OT for here Aug 21 00:55:27 Yeah, android apps run.. pretty bad.. Or at least last time I checked Aug 21 00:55:51 SimonVT: when did you last try? apparently it's pretty good now Aug 21 00:56:03 Eh, months ago Aug 21 00:56:27 yeah one of my coworkers ran our app in bb and showed me, was like , shrug Aug 21 00:56:28 i think they're aiming for ICS support soon Aug 21 00:56:31 not sure tho Aug 21 00:56:34 same with kindle fire i guess Aug 21 00:56:37 one of those books Aug 21 00:57:14 "save trees - mine and process precious metals" Aug 21 00:57:45 if bb lives long enough to make another single software release Aug 21 00:59:16 ron_frow_: they will Aug 21 00:59:23 ron_frow_: it's not cash they need Aug 21 00:59:28 they'll keep on making life painful Aug 21 00:59:31 ron_frow_: it's to release the damn thing, and market it well Aug 21 00:59:41 its a lost cause Aug 21 00:59:57 ron_frow_: i want to know why, but again, I feel it's OT for #android-dev Aug 21 01:00:30 natural emerging conversatino can be off topic, imo Aug 21 01:00:49 speakingcode: it's not my channel, so if you're cool with it, we can go with it... Aug 21 01:00:54 i don't mind Aug 21 01:00:58 i just don't wanna piss ppl off Aug 21 01:01:19 basically they are desperately grasping at straws trying anything to stay relevant Aug 21 01:01:20 if someone comes in here all " HEY GUYZ CAN U HELP ME WIH MY BLAKBURRY APP I CANT UNDERSTAND HOW 2 PROGRRAM"... Aug 21 01:01:47 then we can blast em about topic ;) Aug 21 01:01:56 speakingcode: fair enough Aug 21 01:01:58 they wanted to do anything BUT go with android... but since iphone android started doing the enterprise thing... bb's place, or their niche per say has been well... deprecated Aug 21 01:02:12 ron_frow_: i vehemently disagree Aug 21 01:02:32 we can agree to disagree, but that is pretty much fact Aug 21 01:02:34 ron_frow_: you have to understand how architecturally different QNX OS is from iOS's Mach kernel or the Linux kernel Aug 21 01:02:44 I am intimately familliar with qnx Aug 21 01:02:48 ron_frow_: your opinion is not fact. Aug 21 01:03:04 and I cannot understand how your previous statement could ever be proven to be factual Aug 21 01:03:30 qnx rtos is significantly better than android in a lot of diff areas... but the fact of the matter is no matter how good it is, they should just give up Aug 21 01:03:42 ron_frow_: and then what? Aug 21 01:03:48 ron_frow_: leave 3rd place for Microsoft? Aug 21 01:03:49 quit, walk away Aug 21 01:03:57 right Aug 21 01:03:57 ms is doing the exact same shit Aug 21 01:03:59 haha Aug 21 01:04:04 they should just drop the name blackberry Aug 21 01:04:17 ignore the market until it was way too late, bundle up a superior technology stack with a shit user interface Aug 21 01:04:18 because every company should just quit while they're down Aug 21 01:04:31 and charge licensing fees hand over foot Aug 21 01:04:35 if they drop that obnoxios blackberry tname Aug 21 01:04:39 give that up Aug 21 01:04:43 HorizonXP - if someone is gonna innovate, more power to them Aug 21 01:04:53 and come back with a decent product, then they could be relevant again Aug 21 01:05:13 speakingcode: i don't understand how dropping the blackberry name would help them any Aug 21 01:05:13 but bb seems to me like they are doing what iphone, nokia, and bb are doing... Aug 21 01:05:23 speakingcode: it's a strong brand, especialy around the world Aug 21 01:05:28 and that is trying to play catch up, instead of trying to innovate Aug 21 01:05:29 speakingcode: it can be rebuilt Aug 21 01:05:30 windows8 metro is nice, i gotta say as a m$ hater i'm impressed. so what they were late? they are addressing a lot of common pains from a user a dev perspective Aug 21 01:05:39 speakingcode: if RIM's marketing gets their head outta their ss Aug 21 01:05:41 * ass Aug 21 01:05:50 yeah Aug 21 01:05:50 they were saying they want to license blackberry os to other hardware oems Aug 21 01:05:50 Hey hey hey, speakingcode - you can't call it metro! Aug 21 01:05:55 but who would choose to license it Aug 21 01:05:56 haha Aug 21 01:05:58 i say drop the bb name because of marketing Aug 21 01:06:05 it just leaves a bad taste in developers mouths Aug 21 01:06:18 android, and meego are vastly superior Aug 21 01:06:20 they are offering money to developers to develop for it, and still can't muster up a community Aug 21 01:06:24 speakingcode: i don't devs are stupid Aug 21 01:06:27 and I doubt they could license the qnx variant of their os Aug 21 01:06:39 speakingcode: calling blackberry a different name won't pull the wool over anyone's eyes. Aug 21 01:06:59 i agree, but i think it's one piece of a bigger strategy they need to wise up to, fast Aug 21 01:07:01 they gave me 150$ in cash to participate in a dev focus group Aug 21 01:07:11 I was honest and subjective Aug 21 01:07:14 objective Aug 21 01:07:17 lol Aug 21 01:07:20 haha Aug 21 01:07:21 fruedian slip Aug 21 01:07:47 I am a tech evangelist, I'd like to see them cash in and change their ways Aug 21 01:07:55 but their hardware is lackluster, and their software is too Aug 21 01:07:59 bbem sucks Aug 21 01:07:59 hello, im using this "FancyAdapter" class technique to populate and display a customized ListView; but how to just show a few data in ListView and carry on more data to display onClick an item? Aug 21 01:08:01 thanks in advance Aug 21 01:08:02 can I show you a blog post? Aug 21 01:08:07 I mean its a shit shit shit situation =) Aug 21 01:08:09 sure thing Aug 21 01:08:12 ron_frow_: http://blog.taab.co/2012/08/15/how-were-building-taab-for-blackberry-10/ Aug 21 01:08:52 ron_frow_: and then you can watch this fluffy go lucky video - http://www.youtube.com/watch?v=0cDEnh1h9ME Aug 21 01:09:23 speakingcode: you should check those out too Aug 21 01:09:42 I am very very familliar with qnx, I was building apps for qnx neutrino ages ago Aug 21 01:10:04 ron_frow_: did you read it all? Aug 21 01:11:08 yep Aug 21 01:11:12 k Aug 21 01:11:21 so obviously that posts talks about more than just QNX Aug 21 01:11:34 but yeah, QNX is the basis of the supporting points in that post Aug 21 01:12:02 I am quite fond of qnx, just think bb's business strategy is shit Aug 21 01:12:19 i don't think we even know what their strategy is Aug 21 01:12:33 they dont even know Aug 21 01:12:35 all we know is that RIM is "supposedly" a different RIM than last year Aug 21 01:12:45 So is nokia Aug 21 01:12:51 right Aug 21 01:13:02 my point is that RIM has all the pieces in place to create a killer platform Aug 21 01:13:10 hardware, software, and aparently, UI/UX Aug 21 01:13:16 it all boils down to marketing though Aug 21 01:13:22 they better get that shit right Aug 21 01:13:33 or yeah, they'll be relegated to the likes of Palm Aug 21 01:13:53 really I think palm had HUGE potential Aug 21 01:13:56 the had ui down pat Aug 21 01:14:13 but I think dev community just blew because the whole primary platform was html+js Aug 21 01:14:20 right Aug 21 01:14:25 which is not the case with RIM this time Aug 21 01:14:32 they're supporting native C/C++ from the get go Aug 21 01:14:35 not objective C Aug 21 01:14:39 not Java like before Aug 21 01:14:45 straight C/C++ and heck, Qt Aug 21 01:14:54 i don't know many devs that hate Qt Aug 21 01:14:57 except for moc Aug 21 01:14:58 I was basically paid to develop software for palm my a high level exec Aug 21 01:14:59 fuck moc Aug 21 01:15:07 by Aug 21 01:15:13 they were awesome Aug 21 01:15:22 must have got like 10 free phones just by mentioning it Aug 21 01:15:33 and I dont know how they were activated, but never had any coverage limits or anything Aug 21 01:16:22 ron_frow_: did you happen to take a look at the video? Aug 21 01:16:30 and where did speakingcode go? lol Aug 21 01:17:44 aww. both my free phones, I had to but sims for. Aug 21 01:17:46 buy Aug 21 01:18:00 * SpeedEvil looks at his n950. Aug 21 01:19:05 im actually sad that nokia is bombing as much as they are Aug 21 01:19:09 I think the hardware is nice Aug 21 01:19:20 meego was bitchin... I think it was just scrapped too soon Aug 21 01:19:27 indeed. Aug 21 01:19:40 950 is awesome hw. Aug 21 01:19:57 I LOVE .net and wpf etc etc etc, but I dont have highest hopes for win rt Aug 21 01:20:18 win phone... Aug 21 01:20:35 weird http://www.cbc.ca/news/technology/story/2012/08/20/sci-tech-mobile-usage-in-canada.html Aug 21 01:20:38 guess you didn't watch the video then Aug 21 01:20:59 HorizonXP - I dont need to watch advertisements for your software =) Aug 21 01:21:14 ron_frow_: it's for my startup, but ok Aug 21 01:21:20 * HorizonXP is a one-man show Aug 21 01:21:54 this is some of the shit I built in android Aug 21 01:21:56 * ron_frow_ thrusts Aug 21 01:21:56 http://img560.imageshack.us/img560/2002/overviewm.png Aug 21 01:22:02 no snazzy video Aug 21 01:22:23 but too busy building custom android variants for our hardware Aug 21 01:22:37 ron_frow_: :P I had to make the video as part of my submission to the MintChip Challenge Aug 21 01:23:29 wasnt bashing, just saying Aug 21 01:23:46 ron_frow_: wasn't saying you were Aug 21 01:23:50 k Aug 21 01:24:04 I am good at building stuff... not so great at coming up with ideas Aug 21 01:24:47 not so great at bringing ideas to fruition Aug 21 01:24:51 too much second guessing Aug 21 01:25:17 is it possible to use AssetManager to access files outside the assets folder for example AndroidManifest.xml? Aug 21 01:26:05 well at runtime androidmanifest is "compiled xml" Aug 21 01:26:42 but there are some methods in place to allow you to get at the same information thats in the manifest Aug 21 01:26:54 i don't need the manifest it was an example Aug 21 01:26:59 or something in the root of the APK Aug 21 01:27:02 of* Aug 21 01:27:33 AssetManager.list("/") lists the files in the root of the APK Aug 21 01:27:39 bahblah: you can use the PackageManager to get all the info from your manifest Aug 21 01:27:57 perhaps it'd be usefull to know exactly what you are looking for Aug 21 01:28:30 I just have files packaged in a directory named extensions which resides in the root of the APK Aug 21 01:28:44 i would like to see if there's a way to access it without moving it inside the assets folder Aug 21 01:29:16 bahblah: yes Aug 21 01:29:33 bahblah: you can get the location of your apk file using the PackageManager and then open it using the zip streams Aug 21 01:29:40 you can then extract any file you like Aug 21 01:30:22 Seems easier to just use assets.. Then you don't have to customize the build system either Aug 21 01:31:04 thanks, i think i'll just use assets Aug 21 01:31:10 or raw Aug 21 01:31:19 You can have subfolders in assets if that's your concern Aug 21 01:31:20 raw? Aug 21 01:31:31 yes Aug 21 01:31:35 res\raw Aug 21 01:31:53 bahblah: http://developer.android.com/reference/android/content/res/Resources.html#openRawResource%28int,%20android.util.TypedValue%29 Aug 21 01:32:07 SimonVT: no i'm modifying an existing project and want to get the desired effect without modifying the way things are too much Aug 21 01:33:30 As said, either assets or raw is probably the way to go Aug 21 01:35:02 thanks guys i'll go with assets Aug 21 01:35:36 Hello, can I request the hight from a TextView? Aug 21 01:36:19 sukramTM: yes and no, what are you trying to achieve? Aug 21 01:36:33 Sorry Aug 21 01:36:54 I mean height from a RelativeLayout Aug 21 01:37:27 sukramTM: call getLayoutParams() on it, then look at the width/height that way? Aug 21 01:37:28 The User can customize a part from the layout Aug 21 01:37:55 HorizonXP: I will try Aug 21 01:38:23 sukramTM: i dont believe that is what you are looking for Aug 21 01:38:28 View.getHeight Aug 21 01:38:37 But gotta wait until after the layout phase Aug 21 01:38:56 And no, layoutparams are probably not what you want Aug 21 01:39:25 If it's wrap_content or match_parent you wont get the height that way Aug 21 01:41:03 The User can add items to a part of the layout, and I have to know the height, because a popup should be displayed under this part Aug 21 01:42:44 the RelativeLayout, which is the part, where the user can make changes have the attr: wrap_content Aug 21 01:44:47 the popup comes with a onClick event, so the layout phase should be done or? Aug 21 01:45:42 Well, if you want the height, you have to wait until the view is measured and laid out Aug 21 01:46:58 Well, probably just until it's measured Aug 21 01:47:11 But then it's getMeasuredHeight Aug 21 01:51:11 Ok getHeight works Aug 21 01:51:17 thx Aug 21 01:55:42 anyone know what the pink hat toggle is in AOKP? Aug 21 01:56:39 You click it and it tells you to go to #android-root Aug 21 02:10:29 SimonVT thanks for the not hel[ Aug 21 02:11:11 I always aim to not hel[ Aug 21 02:11:35 isn't getHeight like API 8+ ? Aug 21 02:11:44 or even higher? Aug 21 02:12:22 My apps would break if it was :p Aug 21 02:12:35 hrm Aug 21 02:12:40 wonder why I thought that Aug 21 02:40:14 hello, im using this "FancyAdapter" class technique to populate and display a customized ListView; but how to just show a few data in ListView and carry on more data to display onClick an item? thanks in advance. Aug 21 02:40:49 this is the class using the FancyAdapter technique i mention: http://pastebin.com/SXHKhMm2 Aug 21 02:42:47 I'm amazed that isn't crashing and burning on you balr0g Aug 21 02:43:01 since you're trying to do network comms on the main thread Aug 21 02:43:23 then again, your network comms are surrounded by an empty catch all black Aug 21 02:43:24 block Aug 21 02:43:33 so it's probably crashing and burning and you have no idea Aug 21 02:43:55 t0mless, sorry, you mean for using inner classes and so? i saw this on YouTube man... i need to populate and displat customized ListView, and when clickcing display additional completed info Aug 21 02:44:13 coding by youtube.... win Aug 21 02:44:29 Just add the data to the list backing the adapter and call notifydatasetchanged on it Aug 21 02:44:37 t0mless, im sorry man.. i was in a hurry that day Aug 21 02:45:00 so you seem to be populating your adapter, although poorly doing so Aug 21 02:45:09 so you just need to implement the onListItemClicked() method Aug 21 02:45:23 to display a dialog or new activity (or fragment!) with the extra data you want to show Aug 21 02:48:17 t0mless, yes, can you see line 146 here? http://pastebin.com/SXHKhMm2 Aug 21 02:48:40 Right Aug 21 02:48:46 Halo, I asked a question yesterday but seems nobody answer me. Thus, I ask it again here. I made a image view which is occupying the whole screen. Then I made a translation animation on it. I find it is quite laggy when doing that animation. I think it is related to that the screen needs some times to redraw the whole screen. But how can I deal with it? Aug 21 02:48:52 you get the listview and set the adapter. Good work. Aug 21 02:49:10 but your entire onListItemClick is commented out Aug 21 02:49:26 that's where you need to figure out what row was clicked, and then display the extra data for that row Aug 21 02:49:34 using a dialog, activity, or fragment Aug 21 02:49:39 preferably the lattert Aug 21 02:49:42 latter* Aug 21 02:50:13 edwinkcw don't animate a full screen image view without using the GPU? Aug 21 02:51:08 t0mless: I didn't enable hardware accelerate as I need to support android 2.2+ devices as well Aug 21 02:51:32 use openGL instead? Aug 21 02:52:00 t0mless: sounds lot to do? need to rewrite the image view using openGL? Aug 21 02:52:27 only way to get hardware accelleration for that animation on 2.2 Aug 21 02:52:52 and you can enable hardware accelerration in xml and it will just be ignored on pre HC devices Aug 21 02:52:57 t0mless: how about surfaceview? Aug 21 02:53:09 surfaceview uses OpenGL Aug 21 02:53:28 t0mless, ok, im working... give 1 min please Aug 21 02:53:45 that's coo, I'm gunna go eat foods Aug 21 02:53:50 t0mless: reli? Aug 21 02:54:01 t0mless: I think surface view is using canvas Aug 21 02:54:41 There's GLSurfaceView Aug 21 02:54:48 oh crap, that's right Aug 21 02:54:55 you use GLSurfaceView Aug 21 02:55:08 whose parent is.... SurfaceView! Aug 21 02:55:13 ok, let me think how can i do that Aug 21 02:55:36 I realized that there are lots of 2.x devices in the market : ( Aug 21 02:57:13 How big are the bitmaps you're animating? Aug 21 02:57:29 960x680px Aug 21 02:57:33 in png format Aug 21 02:57:47 Not that large Aug 21 02:58:04 I dunno, might help to scale them to the exact size of the view Aug 21 02:58:07 in onMeasure, what does setMeasuredDimension actually do? Aug 21 02:58:21 could i set a fixed size of 300x300 for my custom layout in there? Aug 21 02:58:23 or no? Aug 21 02:58:31 You can Aug 21 02:58:40 SimonVT: umm..but different device has different view size. Aug 21 02:58:46 It sets the measured size of the view Aug 21 02:58:58 edwinkcw: Yeah, do it when you load the image Aug 21 02:59:44 SimonVT: umm, let see if it helps to improve the performance **** ENDING LOGGING AT Tue Aug 21 02:59:58 2012