**** BEGIN LOGGING AT Wed Sep 12 02:59:59 2012 Sep 12 03:10:17 Anyone here with a SGS3? Non-rooted? I am wondering if I install one of the leaked JB beta's will I still receive the OTA? Sep 12 03:12:28 zfly9: This channel is for development discussion. Try #android. Sep 12 03:12:53 ah no response in there, but thanks Sep 12 03:16:09 zfly9 - no you wont gt ota Sep 12 03:16:26 but usually the offficials are avail as .zips shortly thereafter Sep 12 03:16:33 or you can revert Sep 12 03:18:10 hey guys, any python programmers? Sep 12 03:18:24 parco: mostly in #python? Sep 12 03:18:43 zfly9, try #android-root Sep 12 03:18:47 Leeds, haha Sep 12 03:19:10 i basically made this abstraction for SL4A Sep 12 03:19:12 regardless of "rooted" or not, same types of questions Sep 12 03:19:16 was hoping to get some interested users Sep 12 03:20:37 mrenouf thanks Sep 12 03:20:43 are you a sgs3 owner? Sep 12 03:20:57 nope, but i have every nexus device :-) Sep 12 03:21:23 even a Q? Sep 12 03:21:35 oh, not that. Sep 12 03:21:37 heh Sep 12 03:21:41 :P Sep 12 03:21:54 thought about it, but I'll wait till v2. Sep 12 03:22:07 if there is a v2... Sep 12 03:22:13 there will be Sep 12 03:22:39 actually going to set up my own HTPC/game/music/media thing based on an ARM dev board, running Android Sep 12 03:22:49 something like HardKernel Sep 12 03:23:00 odroidx is badass Sep 12 03:23:07 mrenouf I've got one on order Sep 12 03:23:18 I've got about 35 pandas at the office Sep 12 03:23:29 holy crap? Sep 12 03:23:32 for? Sep 12 03:23:36 r&d Sep 12 03:23:40 niiice Sep 12 03:23:58 we built our own hardware rooted in the ti 4460 Sep 12 03:24:24 I have to get the rom up and running and make sure our devs have something to dev against until custom hardware gets here Sep 12 03:24:40 parco: What did you make for SL4A? Sep 12 03:24:58 Kirotan: just another script manager Sep 12 03:25:06 https://play.google.com/store/apps/details?id=com.demarco.gearbox Sep 12 03:25:07 I see. Sep 12 03:25:15 I was at a company 3 yrs ago trying to build an out-of-home media player, advertising box. They were still stuck on intel SFF boxes running Linux. I was sooo saying we should go Android. But just a little early back then. Sep 12 03:25:39 Kirotan: im trying to make it easy so more people use it, and create scripts Sep 12 03:25:41 you can buy cheap Android TV boxes for nothing here Sep 12 03:26:54 I personally spent about 6 months customized Ubuntu down to a core, unattended install, etc. but Android is PERFECT. Ugh. Sep 12 03:27:20 ron_frown, what do you guys make? Sep 12 03:29:08 mrenouf is there a good tutorial out there for a noob like me to install the latest leak? Sep 12 03:30:07 industrial automation hardware Sep 12 03:30:10 and software Sep 12 03:30:27 can someone look at my logcat and tell me why my app keeps force closing Sep 12 03:30:28 You should totally automate over wifi :P Sep 12 03:30:40 uhh we used zigbee or whatever for some shit Sep 12 03:30:44 and I guess it turned out to be a nightmare Sep 12 03:30:47 that's good too :P Sep 12 03:30:48 before my time Sep 12 03:31:05 zfly9 xda-forums Sep 12 03:31:10 it's all a nightmare. Sep 12 03:33:11 porting android and hacking linux kernel for additional hardware etc has been awesome Sep 12 03:33:25 minus stuff like multitouch input drivers Sep 12 03:33:28 that dont already work Sep 12 03:34:32 http://pastebin.com/YAqYPasA Sep 12 03:38:58 ron_frown: why was zigbee a nightmare ? Sep 12 03:39:21 I was told that we were tying to push way too much data across the airwaves Sep 12 03:39:40 they are supposed to be used for remote sensor monitoring Sep 12 03:39:44 not a wifi replacement Sep 12 03:39:51 oh yeah, for sure Sep 12 03:48:56 github is tracking my bin file (specified to exlude in gitignore), what would be a command to rremove it from both local and github repositories Sep 12 03:48:58 ? Sep 12 03:50:20 git rm it and push. and don't add it back. Sep 12 03:51:57 thanks :), anyway for it to not be added when to do git add -A? I thought the .gitignore file would do that Sep 12 03:53:05 gitignore doesn't exclude files that are already added Sep 12 03:53:51 roll call Sep 12 03:53:59 you there, jf? Sep 12 03:54:25 JesusFreke: *yawn* Sep 12 03:54:37 anyway, what page do I visit to pwn my phn? Sep 12 03:54:43 galaxy nexus Sep 12 03:54:59 f2prateek, never use -A :-P Sep 12 03:55:26 you can do "git add foo/" to add everything under "foo/" Sep 12 03:55:39 cj: http://source.android.com/source/building-devices.html Sep 12 03:55:43 see "unlocking the bootloader" Sep 12 03:55:49 thank you sir. good to see you again. Sep 12 03:56:04 ron_frown, just put in my order for an ODROID. ;-) Sep 12 03:56:08 it seems they might have used some of my ideas for the new phone. Sep 12 03:56:14 mrenouf: yeah i gues, its just i'm changing only 5-6 files but 148 files show up coz of the bin Sep 12 03:56:19 looks like speech to text is done at least partially on the local device Sep 12 03:56:56 cj, yep ;-) Sep 12 03:57:01 thats new in JB Sep 12 03:57:24 using pocket sphinx? Sep 12 03:57:27 SimonVT: that would explain it, thanks Sep 12 03:58:08 has anyone ever faced a null pointer exception regarding a search view? Sep 12 03:58:10 man, I hate VZW's tweaks. Sep 12 03:58:18 I can tell which ones are theirs because they SUCK Sep 12 03:58:29 l0rdkadaj, stack traaaaace Sep 12 03:59:17 vity.InvestorSearchActivity}: java.lang.NullPointerException E/AndroidRuntime( 1515): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) E/AndroidRuntime( 1515): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) E/AndroidRuntime( 1515): at android.app.ActivityThread.access$1500(ActivityThread.java:117) E/AndroidRuntime( 1515): at android.app.ActivityThread$H.handleMessa Sep 12 03:59:31 pastebin Sep 12 03:59:39 oops... sorry Sep 12 04:00:10 man. I don't want to build my own. Do I have to? Have you published an image I can run, JF? Sep 12 04:00:46 maybe I should take this to #android Sep 12 04:01:58 http://pastebin.com/izjv2D66 Sep 12 04:02:20 here is my pastebin link... thanks a lot. Sep 12 04:02:49 E/AndroidRuntime( 1515): Caused by: java.lang.NullPointerException Sep 12 04:02:50 E/AndroidRuntime( 1515): at com.mhoandroid.fragment.InvestorSearchFragment.onCreateOptionsMenu(InvestorSearchFragment.java:71) Sep 12 04:04:04 yes, the search view is null... Sep 12 04:04:08 MenuItem searchItem = menu.findItem(R.id.menu_investor_search); mSearchView = (SearchView) searchItem.getActionView(); Sep 12 04:04:39 i tried to find the search action view using these two lines, still returns a null Sep 12 04:05:12 I love hunting NPEs. It's a game of logic and deduction figuring out which var was null in a complex multiple-method-call statement. Sep 12 04:05:25 i was working using https://github.com/inazaruk/abs-search-view Sep 12 04:06:01 your menu does not contain that item Sep 12 04:08:31 it actually does... with a proper id assigned to it. Sep 12 04:10:20 okay, I should just read the page and not complain. You're still awesome, JesusFreke Sep 12 04:12:07 hello all Sep 12 04:12:29 so I am trying to port a linux program to android, but am kinda new to this Sep 12 04:12:54 the thing is, the program uses scsi generic, a kernel module that is not available in android Sep 12 04:12:59 or so it seems Sep 12 04:13:26 this might be a bit of a basic question, but can I cross-compile the module and include it with the apk? Sep 12 04:13:43 and if so, does the target device have to be "rooted"? Sep 12 04:16:37 Do you guys think there's any difference in performance between comparing references types for equality vs primitives? e.g. if(view==someview) vs if(view.getId()==3)? Sep 12 04:18:05 sorry i dc'ed just now Sep 12 04:18:31 i think another guy suffered the same thing here. http://stackoverflow.com/questions/11276043/how-to-add-a-searchwidget-to-the-actionbar Sep 12 04:18:43 I doubt it matters, luxurymode :p Sep 12 04:18:58 ^^ Sep 12 04:19:01 hehe cool, just wondering Sep 12 04:20:07 hi. maybe a stupid question, but new to java dev. I have android app that displays date time. how do I get my app to update the time when the minute changes, without using the digital.clock widget. Sep 12 04:22:30 Find an open source project that already has a feature like that and see how they did it Sep 12 04:22:56 is honestly the best answer to most "how do I do X" questions Sep 12 04:23:40 I've been searching, just not sure if in the right places. Sep 12 04:24:15 have you tried anything? Sep 12 04:24:59 qkzoo19782, i believe you can register a broadcastreceiver for that actually Sep 12 04:25:30 http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK Sep 12 04:25:33 bingo Sep 12 04:26:19 why not use digital clock? Sep 12 04:26:22 ok, that is very helpful, at least now I have a direction, thank you! Sep 12 04:26:29 I don't get it -- you're going to be extending the textview class anyway Sep 12 04:27:00 digitalclock is too easy, I'm trying to make it difficult to learn the language. Sep 12 04:27:32 The variants of Galaxy Nexus that be used are the GSM/HSPA+ configuration "maguro" (only if it was originally sold with a "yakju" or "takju" operating system) and the VZW CDMA/LTE configuration "toro". On those devices, graphics and audio are functional, as well as WiFi, Bluetooth, and access to the respective cellular networks. The orientation sensors are functional. Sep 12 04:27:35 So DigitalClock does what you want.. DigitalClock is open source.. But you can't find an example of how to do it? Sep 12 04:27:38 oh noes. I got a tuna. Sep 12 04:27:39 am I fucked? Sep 12 04:28:38 wait, product = tuna, variant = toro Sep 12 04:28:43 I'm still with the win. Sep 12 04:28:51 qkzoo19782: why not make a class that does something cool with the digitalclock class Sep 12 04:29:34 load up an arraylist with digital clock instances set to different time zones Sep 12 04:29:47 make an app that lets you add/delete/modify the digital clocks Sep 12 04:29:58 that would be a better exercise than implementing your own clock Sep 12 04:30:10 which is not going to be fun, I promise Sep 12 04:30:16 you can format digital clock to look however you want, with or without seconds, etc.? I thought it was just a one size fits all shortcut, unacceptable. like I said, this is all new, trying to learn as I go... Sep 12 04:30:25 it is a textview Sep 12 04:30:45 so you can do anything to the digital clock that you can do to the textview Sep 12 04:30:51 this is a fundamental OO idea Sep 12 04:31:01 http://developer.android.com/reference/android/widget/DigitalClock.html Sep 12 04:31:06 methods inherited from class textview Sep 12 04:31:36 you could make it say "beer time" instead of "5:00 PM" Sep 12 04:31:38 for example Sep 12 04:32:13 awesome, thank you, I have some reading to do,! Sep 12 04:33:39 TextView.setText(String str) Sep 12 04:46:23 Is there any way to change the name that appears in app manager for an app? Sep 12 04:56:56 how do i place icons in certain spots on the actionbar? Sep 12 05:03:12 the height hdp, does that consider the entire device hieght(including status bar/combined bar)? Sep 12 05:04:50 Nope Sep 12 05:05:25 Read the docs, it explains it Sep 12 05:06:25 the one on this page? http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts? Sep 12 05:06:54 http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources Sep 12 05:06:56 The one on this Sep 12 05:07:13 Guess it says it there as well Sep 12 05:07:14 ahh thanks for pointing that out Sep 12 05:08:53 it also says added in API level 13, so older APIs would disregard any resources specified in this? Sep 12 05:09:54 Yeah Sep 12 05:11:11 thanks Sep 12 05:27:21 I wonder how many years it will be before they figure out the developer stats website Sep 12 05:29:30 ? Sep 12 05:31:22 Ologn: heh, yeah - its been like what, a week now ? Sep 12 05:31:39 if you mean "Stats not updating on Developer Console and Google Play" Sep 12 05:46:57 GL question... what's the general approach to handling input on objects rendered with OpenGL? Example, in a game where the player touches an object. How is that generally done if using OpenGL? Sep 12 05:48:36 since there's no object graph, it needs to be done manually right? Sep 12 05:48:56 possibly by tracing the view plane back through the scene and seeing which things it might intersect with? Sep 12 05:58:43 Are there any decent profiling tools for Android NDK? Sep 12 05:59:07 Especially ones that can show thread scheduling, cache misses, and function costs. Sep 12 06:16:30 Hello World! Sep 12 06:19:29 Hi, I have a series of titles followed by texts that I'd like to display on a screen. I have these in a LinearLayout using TextViews. However, I observe that the content is all bunched up starting from the top. Was wondering if there's any way to have the text vertically aligned - but left justified (instead of it starting from the top). This is what I have so far ---> http://pastebin.co Sep 12 06:19:29 m/VdZVhtx4. The 'android:layout_gravity=center_vertical" doesn't seem to be doing the trick. Any help would be greatly appreciated. Sep 12 06:21:37 android:layout_gravity="center_vertical" goes on children within a layout Sep 12 06:21:53 which you'd like to adjust their positioning within the parent Sep 12 06:23:26 mrenouf: Thank you for your suggestion. So should I be placing that lines inside the children, then? Sep 12 06:24:33 mrenouf: Hmm - moving that line into the children didn't make a difference. Perhaps there is something else I'm missing? Sep 12 06:27:24 Hey Guys, I want to cancel my indeterminate progress bar on actionbar when user clicks anywhere else Sep 12 06:27:25 aLearner, you also need to assign them a weight Sep 12 06:27:36 just set them both to android:layout_weight="1" Sep 12 06:27:39 how do I capture "everywhere else " easily Sep 12 06:28:10 because gravity without weight has no effect ;-) (technically, following the metaphor, it should have been "mass") Sep 12 06:28:50 and use android:gravity="center_vertical" Sep 12 06:29:17 I dont think you can vertical center two elements like that with just a linear layout Sep 12 06:29:35 but you can evenly distribute both their heights to fill, and center the text within them Sep 12 06:30:34 mrenouf: Thank you for your input. What should I be doing then? I have a list of items Title / Text combos for an About screen/ I Sep 12 06:30:40 Oops! Sep 12 06:30:55 aLearner, http://pastebin.com/q9zLswkk Sep 12 06:30:59 I'd like them left-justified but centered vertically Sep 12 06:31:17 oh, you want them all together, centered vertically? Sep 12 06:31:43 then make their container "wrap_content" Sep 12 06:31:56 and center IT vertically Sep 12 06:33:28 i dont' know aLearner, why its being so tough Sep 12 06:33:35 i have done this thing so many times Sep 12 06:33:50 texts, by default, keep left justified Sep 12 06:34:34 aLearner, perhaps like this: http://pastebin.com/DUqHxGcH Sep 12 06:34:41 mrenour: This is what I have currently ---> http://ge.tt/5TebaZN/v/0 - would like it left-justified but centered vertically. Thank you for your code. Am doing to try it out. Sep 12 06:34:52 mrenouf: I mean... Sep 12 06:34:56 also... use the layout editor. it's a HUGE help to understanding how layouts work Sep 12 06:35:04 rather than compiling and re-running Sep 12 06:35:12 (ADT, in Eclipse) Sep 12 06:35:13 you just need to put the TextViews inside a LinearLayout with vertical orientation and layout_gravity=centerVertical Sep 12 06:35:33 see my last paste, which is what I think you want Sep 12 06:36:11 use gravity to align contents of things, layout_gravity is a little different Sep 12 06:36:37 yea... layout_gravity deals with the positioning of children elements Sep 12 06:36:45 mrenouf: Looking at it -- thanks. Also noticed this line --> android:textStyle="@android:style/TextAppearance.Small - that's cool! Sep 12 06:36:58 Infernus: thank you for your input and suggestions too. Sep 12 06:37:52 anytime bro Sep 12 06:38:15 oh. that's just so I could view it without having your styles. it's probably better to do ?android:attr/textAppearanceSmall Sep 12 06:38:34 that way you can replace it within your theme if you want to adjust what "small text" is Sep 12 06:38:43 but thats a whole other topic Sep 12 06:38:48 how to add certificate in android app to allow it to work with servers. i was getting Not trusted server error ,so i have searched the problem and came to know that i need a certificate add it to my app .i have the certificate but don't know how i can add it to my app.can anyone help me please Sep 12 06:39:33 mrenouf: Thanks. Still understanding your code. :-) Sep 12 06:39:45 Android03, that's a very Google-able answer - http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/ Sep 12 06:42:32 mrenouf: Wow! That did do the trick very nicely. Thank you very much. Sep 12 06:42:49 next time Google first and save yourself some time ;-) Sep 12 06:42:52 (and ours) Sep 12 06:43:14 mrenouf: I did try that - but I was confused. Also, why did we add this line? ---> android:layout_height="0dp" Sep 12 06:43:41 it's an optimization. suggested by android lint. Sep 12 06:44:24 mrenouf : thanks i ll look into that Sep 12 06:44:43 aLearner, match_parent works as well, but 0dp is "better" Sep 12 06:45:32 mrenouf: Thank you. What was your suggestion regarding text sizes? I'd like like them to be large, medium or small. Right now I have them hard-coded in the dimens.xml file. So something like this for example --> 14sp. But is there a slicker / cooler way to doing this? Sep 12 06:45:47 mrenouf: Oh wow - thanks for the optimization and explanation Sep 12 06:46:13 there are pre-defined styles. defined by Android - the same styles that are in the system UI, and other built in apps Sep 12 06:46:27 they define several sizes. you might want to just reuse those Sep 12 06:46:44 there's small medium and large I beleive Sep 12 06:47:11 without getting into details, you can reference them with ?android:attr/textAppearanceSmall etc... Sep 12 06:47:37 that says "use the style referenced by the value of this theme attribute" Sep 12 06:48:07 mrenouf: Ah I see. But then this line is not actual code? This was just a placholder - right? ---> android:textSize="@android:style/TextAppearance.Medium". Sep 12 06:48:19 think of it like a pointer Sep 12 06:48:40 and it's style=" not textSize Sep 12 06:48:50 er... sorry. textAppearance Sep 12 06:49:21 android:textAppearance="?android:attr/textAppearanceMedium" Sep 12 06:49:25 mrenouf: Ah OK. Thank you. So, something like this --> android:textAppearance="?android:attr/textAppearanceSmall" - putting all the pieces togethr Sep 12 06:49:31 tada Sep 12 06:49:35 mrenouf: Ah OK :-) Sep 12 06:50:00 mrenouf: Wow! Thank you so much for your patient explanations and help. I really appreciate it very much! Sep 12 06:50:15 android styles, attributes, theming and all that is fairly wierd at first glance. but I found an article that explains it. Sep 12 06:50:16 mrenouf: I'll be sure to make the changes you suggested. Sep 12 06:50:30 no problem. Just bored... and procrastinating doing actual work Sep 12 06:50:34 mrenouf: I'd love to read that if you have it handy. Sep 12 06:50:54 google "android themes styles attributes" should give you useful stuff Sep 12 06:50:58 mrenouf: I've done the tutorials and read a book - but no one really goes into the details of how things piece together. Sep 12 06:51:28 because it's hard to explain. it's really tricky to put in words even. Sep 12 06:51:39 do you use Eclipse? Sep 12 06:51:57 mrenouf: Yes, I do. In regards to putting it down in words - your explanations are very clear! Sep 12 06:52:03 mrenouf :-) Sep 12 06:52:47 In Eclipse, using ADT, you should really try editing your layout XML using the built in editor Sep 12 06:53:11 you can see the effects of various changes in real-time. like changing the gravity, weight, etc Sep 12 06:53:26 even styles, themes, colors Sep 12 06:53:43 without it, I would have never learned any of this stuff Sep 12 06:53:54 or it wouldve taken me FAR longer Sep 12 06:54:24 mrenouf: Hmm - I hadn't realized it, really. The book I read did it all using code. Maybe I should look into this more. You mean the 'Graphical Layout' tab - right? Sep 12 06:55:25 mrenouf: Thanks for the pointer (no pun intended) ;-) Sep 12 06:56:44 yes! Sep 12 06:56:48 graphical layout Sep 12 06:57:22 it was mostly unusable when android first came out, so lots of people dismissed it. But it's become dramatically better in the past year or two. Sep 12 06:58:00 mrenouf: OK. Wow...I see. Thanks. I will have to spend some time on this, then. Thanks again for your help. I was in a fix. Sep 12 07:02:17 hello everybody Sep 12 07:03:21 i have a scrollview which consists of an edittext . I wan't the edittext to scroll full upwards while the keyboard comes up Sep 12 07:03:50 but while the keyboard comes up, it hides half of the edittext Sep 12 07:04:04 how can i scroll it up fully Sep 12 07:04:07 ?? Sep 12 07:04:25 i have kept the gravity of edittext as top Sep 12 07:04:41 since i need it to be starting from top Sep 12 07:07:27 sunny_slls: Do you have the Edittext request focus post-popup? Sep 12 07:08:49 Are there any decent profiling tools for Android NDK? Sep 12 07:08:49 Especially ones that can show thread scheduling, cache misses, and function costs. Sep 12 07:11:12 BadMrsFrosty - perhaps this - http://code.google.com/p/android-ndk-profiler/wiki/Usage Sep 12 07:12:20 I've used gprof outside of Android, but never with Android yet Sep 12 07:12:36 Thank you. Sep 12 07:17:39 Ologn: i think there is focus by default since i am not requesting focus for the edittext Sep 12 07:19:51 Ologn: focus is still there but half of the editext gets hidden by the keyboard, since the gravity set is on TOP Sep 12 07:19:53 sunny_slls, look into the various android:windowSoftInputMode modes. Like adjustPan etc. Sep 12 07:20:12 Ologn: ya its set to adjustresize Sep 12 07:20:21 Ologn: adjustPan hides the view Sep 12 07:21:21 bloody hell. android sdk for windows installer claims I don't have java jdk eventhough I have not only installed it but reinstalled and rebooted the computer. Sometimes I hate computers. Sep 12 07:22:14 s/computers/windows/ Sep 12 07:37:49 tneva82: I think you just have to click back and next again when it says that Sep 12 07:37:53 That used to be the case at least Sep 12 07:38:05 Or, simply just download the zip package and put it wherever Sep 12 07:38:09 And add stuff to path Sep 12 07:39:42 done that. I have also closed the installer and started again. I rebooted computer and started the installer. I went to administrator account and booted installer again. Sep 12 07:40:02 installer also claims java.exe at c:\windows\system32 does not exist but the file IS in there Sep 12 07:40:15 very weird Sep 12 08:03:21 hi dudes Sep 12 08:03:25 removing installation and installing older version of jdk didn't solve anything either. Sep 12 08:03:26 Humhum Sep 12 08:03:51 Get the zip package.. Sep 12 08:04:38 android sdk site automatically gives me the exe file. where to get the zip file then? Sep 12 08:04:50 nevamind Sep 12 08:15:44 hi Sep 12 08:27:02 why such a deadly silence??? Sep 12 08:27:22 Not a single dude hung in a glitch???? Sep 12 08:27:44 * Ivru hung in a glitch Sep 12 08:27:52 I don't even know what it mean Sep 12 08:28:02 the channel has gotten quieter; maybe people went to school Sep 12 08:28:28 Goos.... school??? :P Sep 12 08:28:41 uni Sep 12 08:29:27 one can hope Sep 12 08:29:39 also, the googlers haven't been around much, and this tends to have an impact here also Sep 12 08:29:56 hello Sep 12 08:31:16 I am having problems with bitmaps in honeycomb. if I call setpixels, nothing happends on screen. this happends only in honeycomb with hardware-acceleration enabled. it's pretty important for me to have the acceleration. any solutions/work-arounds for this? Sep 12 08:32:23 aksu: call prepareToDraw() after you're done calling setPixels Sep 12 08:32:58 why is animating an expandablelistview so hard to do :< anyone got any tips Sep 12 08:37:30 romainguy_: the problem still exists Sep 12 08:38:10 aksu: does it work on ICS + ? Sep 12 08:38:19 it does Sep 12 08:38:20 are you calling setPixels from Java or from native? Sep 12 08:38:25 java Sep 12 08:38:56 are you invalidating your view? Sep 12 08:39:07 yes Sep 12 08:39:14 the view itself, not a parent? Sep 12 08:39:22 the view Sep 12 08:39:33 then I don't know Sep 12 08:39:47 hc is only 2% ; screw it Sep 12 08:39:47 :/ Sep 12 08:39:56 also, what g00s said :) Sep 12 08:40:07 romainguy_: thanks for your help anyway Sep 12 08:40:21 :P Sep 12 08:40:42 I am afraid in our app there is more hc still around :/ Sep 12 08:41:28 Hi. I implemented an Activity using tabs in the ActionBar. Now if I rotate the screen the layout get's recreated but the Bundle does not store the information about the tabs (since they are no View objects). How do I store my tabs as well on screen rotation? Sep 12 08:41:39 instead of doing setPixels you could use the version of Canvas.drawBitmap that takes an int array Sep 12 08:42:41 lol now eclipse complains sdk platform tools missing eventhough I pointed it toward the folder where android sdk was unpacked Sep 12 08:42:41 btw, after setPixels() you can call getGenerationId() and see if the value has changed Sep 12 08:42:46 why this has to be so difficult Sep 12 08:42:49 if it changes, then the bug is somewhere else Sep 12 08:43:39 sdk manager doesn't seem to be doing anything either Sep 12 08:44:58 the image changes without hw-acceleration, so does checking the id make sense? Sep 12 08:45:40 yes Sep 12 08:46:12 (I kinda wrote the hardware acceleration backend ;-) Sep 12 08:46:48 that's what I've understood :) I was pretty glad you we're the first person to answer :P Sep 12 08:47:20 on what version of HC are you testing exactly btw? Sep 12 08:47:26 I think issue is that nothing has been installed via sdk manager but of course cause of THAT is that nothing happens when I try to run it. It just closes without error message Sep 12 08:47:42 hasn't android developers bothered to even add error messages if program fails to work? Sep 12 08:48:34 3.1 it's galaxy tab Sep 12 08:48:44 aksu: do you have a 3.2 device? Sep 12 08:49:04 I'll look around Sep 12 08:50:54 okay so I think I figured it out. It boils again down to the android sdk not detecting the installed java Sep 12 08:53:53 the problem exists in 3.2 too Sep 12 08:56:30 Hi. I defined the TabListener for my ActionBar tab layout according to the sdk sample with "private class TabListener implements ActionBar.TabListener {". Why do I need this in the definition? I can't see it being used anywhere. Here's the whole class: http://pastebin.com/6VDX6kfM Sep 12 09:03:00 anyone know of any web design rooms? Sep 12 09:11:50 wild idea: Could this issue stem from having 64bit windows 7? New computer and OS got changed as well. Is android sdk compatible with 64bit windows 7? Sep 12 09:11:59 oh romainguy_ your photography is lovely Sep 12 09:12:15 stork: thanks! Sep 12 09:14:01 tneva82: it works fine on 64bit windows 7.. Try and add java to your path Sep 12 09:14:46 Hi, I'm probably missing something but using NotificationCompat2, I add an action to the notification, but when I click on it, it does what I want but it doesn't close the notification bar. Sep 12 09:15:55 on the classic setContentIntent, it correctly closes the notification bar but not in a "addAction()" Sep 12 09:17:54 simon done that. now trying whether 32bit java would help Sep 12 09:18:18 do you know if it is possible to create floating custom keyboards ? Sep 12 09:18:42 I've searched a lot on google without results... Sep 12 09:20:34 that did it Sep 12 09:20:46 guess android sdk is compatible with 64 bit windows 7 but not with 64 bit java Sep 12 09:21:32 i still can't figure out how to animate the showing/hiding of views in a listview property Sep 12 09:23:02 i can't believe this problem is so hard to solve Sep 12 09:25:34 Hi I read somewhere that " you cannot change what happens on a long-press from a SDK application" Sep 12 09:25:42 is that true Sep 12 09:25:58 Long press of what Sep 12 09:26:05 home button Sep 12 09:26:10 That's right Sep 12 09:26:27 can that be handled through ndk? Sep 12 09:26:40 No, you have no control over the home button Sep 12 09:27:55 SimonVT: thanks Sep 12 09:29:28 Have one more query though. I have a custom screen lock activity that mimicks screen locking. When home button is long pressed, recent activites are shown. Sep 12 09:29:51 That is shown as an internal dialog Sep 12 09:30:22 is there a way for my activity to get notified of when the dialog is shown? Sep 12 09:32:10 I doubt it Sep 12 09:33:14 yes I tried all the listeners, activity lifecycle is not altered when that dialog is shown Sep 12 09:33:22 thanks anyway Sep 12 09:35:34 uniquesupri: onPause is not called ? wtf ? Sep 12 09:35:45 no its not called Sep 12 09:36:39 g00s: it would have been a big relief if onPause was called :) Sep 12 09:39:21 getWindowManager().getDefaultDisplay().getWidth() Sep 12 09:39:29 it says getWidth() is deprecated, what should I use instead? Sep 12 09:40:21 Pretty sure it says right in the javadoc Sep 12 09:41:49 right Sep 12 09:41:54 thanks Sep 12 09:43:57 ill stick with the deprecated, I need a later API requirement if i use getSize Sep 12 09:46:26 ok !!! thank you very much Sep 12 09:46:43 For NotificationCompat2, any idea why when I click on an action (added via addAction), the notification bar don't close? Sep 12 09:48:02 Naish: for version +> 13 Sep 12 09:48:11 you can use Display display = getWindowManager().getDefaultDisplay(); Sep 12 09:48:24 Point p = new Point(); Sep 12 09:48:29 display.getSize(p); Sep 12 09:48:40 deviceWidth = p.x; Sep 12 09:51:40 weird problem.. I started up a new avd, x86, and win7 bluescreened as soon as it started - okay, reboot Sep 12 09:52:03 but now AVD Manager and SDK Manager don't start at all Sep 12 09:52:40 just like this http://stackoverflow.com/questions/11023179/android-sdk-and-avd-manager-will-not-run Sep 12 09:52:48 have tried uninstalling/reinstalling Sep 12 09:53:07 it finds jdk fine and installs with no porblems, just can't run it Sep 12 09:54:17 by any chance you have 64bit java? Sep 12 09:54:37 had trouble installing android sdk today myself and it was solved by switching to 32bit java Sep 12 09:54:46 oh sorry Sep 12 09:54:52 can't be same issue if it finds the jdk Sep 12 09:55:50 IMO all works better in a nix machine Sep 12 09:56:12 I don't know, ubuntu has really messed up my eclipse install too Sep 12 09:57:04 I'm using xubuntu 12.04 and I don't found none problems either in notebook than in that VM hosted on a Windows OSs Sep 12 09:57:28 ubuntu really fails if you've used it for many years without doing a fresh intall, only upgrades Sep 12 09:57:34 every upgrade messes something up Sep 12 09:57:34 But I don't use Juno.... Sep 12 09:57:48 Indigo is enough for me Sep 12 09:57:52 I don't like the new ubuntu UI at all Sep 12 09:58:03 too confusing for my tastes Sep 12 09:58:05 me too unity is a .... better xubuntu Sep 12 09:58:10 who cares, fix my windows install :p Sep 12 09:58:12 overall is very light UI Sep 12 09:58:23 unity? light? Sep 12 09:58:32 no xfce of xubuntu Sep 12 09:58:38 unity is a s..t Sep 12 09:58:40 unity completely fails on focus follows mouse Sep 12 09:59:11 yeah... try xubuntu, works very very fine with android sdk, eclipse, and so on Sep 12 10:00:01 http://pastebin.com/jbLxX7MU Sep 12 10:00:35 I'm a Windows OSs programmer which begun to program android so at fist I've tried to work in w7 environment but after a while I'm passed to linuxmint12 and xubuntu after to android development Sep 12 10:00:56 I'm a "whatever the hell works" programmer and nothing really does :D Sep 12 10:01:02 we're going backwards! Sep 12 10:02:06 he he he... to compile an android kernel or rom is more simple in *nix for many reasons. Sep 12 10:03:16 also for me that I'm so old C++, Delphi programmer :) Sep 12 10:04:19 deleting my .android folder fixed it Sep 12 10:04:20 hoorah Sep 12 10:04:29 any idea why my galaxy nexus doesn't show up in adb anymore? Sep 12 10:04:31 nice Sep 12 10:04:40 it worked before, I didn't change anything Sep 12 10:04:44 mac os x Sep 12 10:04:47 nexus 7 still works Sep 12 10:04:52 you turned off usb debugging on the device? Sep 12 10:04:55 sure Sep 12 10:04:59 erm Sep 12 10:05:01 on, that is Sep 12 10:05:02 ;) Sep 12 10:05:20 it also says "USB debugging connected Sep 12 10:05:25 Actually now I'm developing in a vmWare virtual machine running xubuntu in a W7 host, at home I use my Mac OS (shame) with Eclipse and Android SDK or my notebook running xubuntu natively without any problems, but with W7 / XP I've got a lot of throubles... Sep 12 10:06:10 mathiasroth@Mathiass-iMac .../workspace/android-sdks/platform-tools % ./adb devices Sep 12 10:06:10 List of devices attached Sep 12 10:06:14 that's it :< Sep 12 10:06:17 adb kill-server Sep 12 10:06:20 adb start-server Sep 12 10:06:24 adb devices Sep 12 10:07:17 sometime services gones .... Sep 12 10:07:39 shineworld: still nothing :< Sep 12 10:08:07 could be a n7 problem... reboot it (sometime happens with my sony xperia) Sep 12 10:08:23 gn you mean, works fine with the n7 Sep 12 10:08:31 rebooting now Sep 12 10:08:54 can anyone help me out with this compass app? I have the line drawn to north correctly, and it rotates, I just can't figure out how to stick a N on the top of the line, it goes off the screen Sep 12 10:10:01 ok, reboot didn't help either Sep 12 10:11:31 ha Sep 12 10:11:37 started working randomly again! Sep 12 10:12:46 wish mine would :/ Sep 12 10:14:17 Hi all .. is two finger scroll is posssible in android ? Thanks Sep 12 10:14:28 you can make it so Sep 12 10:14:38 since it has multitouch, no? Sep 12 10:14:49 Hey Sep 12 10:15:13 :Tricknology Thanks Sep 12 10:15:25 to put it simply, detect when your surface is touched with two fingers and listen for a dragging motion in the net up or down component Sep 12 10:15:29 np :D Sep 12 10:15:41 idk if it has a built in one though, if that's what you're asking Sep 12 10:16:04 :tricknology idk ? Sep 12 10:16:11 i don't know Sep 12 10:16:56 :D Sep 12 10:17:17 I don't know if a function exists like event.isTwoFingerScroll(); you may have to create your own Sep 12 10:20:18 whatever you do, don't program any pinch to zoom stuff.. Sep 12 10:20:49 hoho Sep 12 10:20:55 i'm back! Sep 12 10:21:08 yo Sep 12 10:23:40 siiiiiiiiilence! Sep 12 10:23:51 is golden Sep 12 10:24:55 is killing Sep 12 10:24:55 i'm wondering the adjective form of DIAMOND to use for it Sep 12 10:25:22 diamond-like? Sep 12 10:25:27 Hey Sep 12 10:25:34 rtnpro: yo Sep 12 10:25:39 Ankhwatcher, are you an android pro? Sep 12 10:25:44 Ankhwatcher: Hi Sep 12 10:26:09 Clandestine: yes, I can turn them on AND off. Sep 12 10:26:13 I wanted to know if newlines should be escaped in Android i18n XML files Sep 12 10:26:31 or should they be kept as it is Sep 12 10:27:11 Ankhwatcher: ^^ Sep 12 10:27:26 rtnpro: no iea Sep 12 10:27:32 ^idea Sep 12 10:28:17 I'm trying to figure out how the default twopane names it's fragments and point it to a different source. Sep 12 10:30:53 rtnpro, i guess you're taking us into another territory Sep 12 10:31:06 let me check about this i18n thing Sep 12 10:34:42 Clandestine: Thanks :) please let me know if you find something useful Sep 12 10:38:01 guys, how to store files to cache directory? Sep 12 10:38:11 I need it for my downloads (for widget) Sep 12 10:38:25 and when I try to use: context.getCacheDir() - it = null :( Sep 12 10:38:44 I use "FileOutputStream fos = new FileOutputStream(file);" Sep 12 10:38:52 and how to set MODE_PRIVATE for it? :/ Sep 12 10:39:17 RandomAccessFile had more permission capabilities iirc Sep 12 10:39:44 so maybe don't use the file stream api, or get the stream from the RAF Sep 12 10:40:29 actually, there is no stream in the RAF. Sep 12 10:44:33 i m Sep 12 10:46:17 hey, I'm getting the URI to a rawcontact's display image like this: http://pastie.org/4707119 Sep 12 10:46:33 this works for 90% of the rawcontacts Sep 12 10:47:10 but for some, I get this: http://pastie.org/private/1kcil6x2gltk4b0qgwaelg Sep 12 10:47:40 Hey guys Are there any libs for svg formats on 2.3.*? Sep 12 10:49:10 i am adding certificate to my app to make it work with servers which is below android 2.2.I used the way suggested by http://nelenkov.blogspot.in/2011/12/using-custom-certificate-trust-store-on.html.Certificate was given by the client.they had given me .bks file.but i m geeting wrong version of keystore. dunno what it means? Sep 12 10:49:47 what was the keyshortcut to import missing libs Sep 12 10:49:50 in eclipse Sep 12 10:51:44 ctrl-shift-o / command-shift-o Sep 12 10:51:45 i'm so happy i've made my app less blue Sep 12 10:51:47 can anyone tell me what mistake i m making Sep 12 10:53:06 wabz, ty Sep 12 10:54:47 Yay! I figured it out! Sep 12 10:55:48 setListAdapter was automatically running the toString command on the data and showing the returned value in the list. Sep 12 11:02:40 can anyone help me with a ViewPager problem? =/ Sep 12 11:02:47 been fiddling with the same problem for 3 days straight Sep 12 11:04:59 balls..... can you tell something specific about your issue??? Sep 12 11:05:17 or is it that ViewPager is saying "No! i won't work!!! NOOO" Sep 12 11:08:52 Clandestine the problem is with the amount of Fragments the ViewPager saves Sep 12 11:09:27 balls2thewall: which is configurable, you can tell it to keep some number of fragments around the current page Sep 12 11:09:41 or set it to keep all of them, which is how I prefer it. The less lifecycles to deal with, the better :-p Sep 12 11:09:58 alankila i found a function that sets that limit, but i need that limit to be 0 Sep 12 11:10:09 what should that mean? Sep 12 11:10:13 i want to choose sort of a "path" in one fragment which determines what the next Fragment is going to be Sep 12 11:10:53 the problem is the first time i pick a path its saved as the next Fragment and even if i choose a different one the one already loaded doesnt disappear Sep 12 11:12:31 perhaps you should fork the relevant parts of the viewpager and modify them to suit your needs or something, in case the 0 doesn't eliminate all fragments save the currently visible one. I wonder if the fragmentpageradapter has some kind of 'refresh' method you can call that causes the viewpager to rebuild all fragments? Sep 12 11:12:55 just like in listadapter you can tell the list to update based on changes that occurred in adapter. Sep 12 11:12:55 thats what im looking for alankila, cant find it =/ Sep 12 11:13:08 "setOffscreenPageLimit" looks like what i need but it doesnt allow an offset of 0 Sep 12 11:14:00 Hmh. Well, I recommend an outright fork of the class, for now. Or you might use some other scrollable design, iirc viewpager is not the only possible way to achieve sideways shifting between pages Sep 12 11:14:36 there's AdapterViewFlipper, which might be useful Sep 12 11:14:56 haven't used it personally Sep 12 11:15:03 afaik Flippers just laod layouts, not functional like Fragments Sep 12 11:15:48 fyiWillBeAdvancedByHostKThx() Sep 12 11:15:53 what ... the ... fuck Sep 12 11:17:40 balls2thewall: sure, but viewpager also just "loads layouts". It just has adapter that allows using fragments, so some assembly may be required, but it should be possible Sep 12 11:18:53 the "allows using Fragments" is a big difference Sep 12 11:22:00 I just told you it's not. Anyway I recommend acquiring viewpager source for now, and checking out how it should be modified to allow what you want Sep 12 11:22:19 if you are unwilling to adjust the code to work without fragments, that is. Sep 12 11:22:29 =/ Sep 12 11:22:33 or don't want to frankenstein fragments into the flipper Sep 12 11:22:46 uniquesupri: Bit late, but thanks did find that out, but my test app im developing (testing just the API and getting head around Android) is supporting from version 8 onwards .. I guess it's only me testing it so doesn't really matter if i change the requirements Sep 12 11:22:54 but my point is, viewpager is not fragmentpager. It only just shifts between views. Sep 12 11:23:32 If this was an app I was releasing on the market, would there be a better way to address deprecated method usage for people using older APIs? Sep 12 11:23:52 the deprecated method works on all APIs so why bother change Sep 12 11:23:59 Naish: indeed. Sep 12 11:24:10 @SuppressWarnings("deprecated") may be what you want, just to shut it up Sep 12 11:24:51 True, eclipse did suggest that. Was just wondering if there was something the community did. Doing an if statement to check the SDK they are using to use two different function calls, when you can just use one seems like overkill Sep 12 11:24:57 I personally am not interested in fragments until it's possible to target 3.0 and above. The v4 support library is just too awful for my taste, but then again I'm a small-time operator and very lazy Sep 12 11:25:28 Naish: no point to do that work just to shut up a warning imho, especially as you end up adding that SuppressWarnings too Sep 12 11:25:40 Naish: the depricated method won't be supported in the future versions, or might not receive any upgradation.... so its better to migrate to the newer thing Sep 12 11:25:40 google promises forward compatibility for all android APIs. Sep 12 11:25:56 oh right, true, eclipse doesn't check the logic to see if there is a sdk check lol Sep 12 11:26:07 ah, good to know Sep 12 11:26:26 man, the android api is damn confusing, i thought i would be able to pick it up a lot quicker Sep 12 11:26:29 but if not interested in the upgradations, its totally fine to keep the deprecated ones in place, they won't harm Sep 12 11:27:04 Naish: Deprecated api's remain in the sdk for long Sep 12 11:27:27 so no need to worry if you intend to release updates to your app frequently Sep 12 11:28:21 and what if they stop support the deprecated function? The only option is to check the version they are using right? Sep 12 11:28:28 supporting* Sep 12 11:28:29 Your app will crash Sep 12 11:28:50 yeh, so i need a logic check, whether to use deprecated or new Sep 12 11:28:55 by checking version Sep 12 11:28:56 usually functions will be deprecated with a sane reason Sep 12 11:29:05 yes Sep 12 11:29:06 Look.... if you keep updating your app, you'll get it when they stop supporting and you upgrade your code Sep 12 11:29:08 ok cool Sep 12 11:29:44 unless it's on a screen in my app I don't visit often and don't realise Sep 12 11:29:51 ah wait, Eclipse would throw an error then Sep 12 11:29:54 in case you stop updating, Android market will gradually lower your app's position on their pages, so it will kind of die out.. Sep 12 11:29:56 so nvm Sep 12 11:29:56 you can can have a check if(Build.VERSION.SDK_INT => 13) Sep 12 11:30:10 right Sep 12 11:30:12 thanks Sep 12 11:30:27 yeah... that too... bute even for that you'll need to keep in touch with the code and app Sep 12 11:30:33 but* Sep 12 11:30:41 true Sep 12 11:31:10 tbh, atm im doing this for fun, something other than PHP dev (my job) Sep 12 11:31:16 No worries dude... deprecation is no big demon in androidosphere.... ;) Sep 12 11:32:11 how do you guys make https request in your android apps ? Sep 12 11:32:11 Clandestine: you should check package manager for deprecated methods that give nightmares to developers :) Sep 12 11:34:07 tagrudev: HttpsUrlConnection or the other httpclient? Sep 12 11:34:07 tagrudev: use classes you get from the following imports:import org.apache.http.HttpResponse; Sep 12 11:34:08 import org.apache.http.HttpStatus; Sep 12 11:34:08 import org.apache.http.client.*; Sep 12 11:34:08 import org.apache.http.client.methods.*; Sep 12 11:34:08 import org.apache.http.impl.client.DefaultHttpClient; Sep 12 11:35:31 HttpClient hc = new DefaultHttpClient(); Sep 12 11:35:32 HttpPost post = new HttpPost("http://www.yahoo.com"); Sep 12 11:35:32 HttpResponse rp = hc.execute(post); Sep 12 11:36:00 Apache http client has much overhead, if you want simple http connection use java Http client Sep 12 11:36:00 Clandestine, Sep 12 11:36:04 i am asking for a https Sep 12 11:36:27 Ow Sep 12 11:36:32 sowie Sep 12 11:37:12 http://android-developers.blogspot.hk/2011/09/androids-http-clients.html Sep 12 11:37:22 Is it somehow possible to add a slider to the actionbar menu? Sep 12 11:38:02 are there any problems with newest eclipse versions and android, as year ago with 3.6? Sep 12 11:38:03 come on httpS Sep 12 11:40:19 im craving the pub Sep 12 11:40:29 wrong chat Sep 12 11:40:43 right idea though Sep 12 11:41:46 Hehe yeh, it's been a while since I haven't had to work on a Thursday. Tonight the pub I used to go to when I was studying gets packed, be good to check it out again even though im getting old (turning 26 soon) Sep 12 11:41:57 tagrudev: perhaps this might work: http://stackoverflow.com/questions/7714993/https-connection-with-client-certificate-in-an-android-app Sep 12 11:42:14 can someone help me with this noob error? java.lang.IllegalArgumentException: File /data/data/com.sylon.myapp/cache/file.cache contains a path separator Sep 12 11:42:33 when i try to do getFileStreamPath(ABOVE_PATH) Sep 12 11:42:49 it makes no sense to me Sep 12 11:42:57 getting old for that pub* I meant, not to make anyone here feel old :) Sep 12 11:43:30 uniquesupri, for now it doesnt require client key and most of the examples are setting keys Sep 12 11:46:23 sylon: so what is 'above path' Sep 12 11:46:43 you mean you try to do context.getFileStreamPath("/data/data/blablah")"? Sep 12 11:47:36 tagrudev: it is out of my scope. Sorry :( Sep 12 11:47:54 uniquesupri, no prob thank you :) Sep 12 11:47:55 anybody use eclipse 4.2 with andoir without any difficulties? Sep 12 11:48:49 how do i get the height of a view that has it's visibility set to View.GONE? :x Sep 12 11:52:53 hi room Sep 12 11:53:19 i'm trying to animate changing a view from gone to visible, to do this it seems like i need the initial height of the view, which i don't have since it hasn't been rendered yet :( Sep 12 11:53:37 i need help in recycling gallery items. when i load more than 4 images to the gallery i get a "out of memory" exception.. does anyone know a good solution? Sep 12 11:54:17 tagrudev: have you tried simply making a HttpPost object with a "https://....." as a the HttpUriRequest Sep 12 11:54:42 This is the default implementation of Https in Apache classes Sep 12 11:54:52 http://stackoverflow.com/questions/2012497/accepting-a-certificate-for-https-on-android Sep 12 11:55:00 i think that's gonna make it Sep 12 11:55:34 Hi Sep 12 11:56:12 is it possible connect a spy camera to one samsung mobile ? Sep 12 11:56:49 under bluetooth for example Sep 12 11:57:54 Clandestine, https://gist.github.com/3706149 Sep 12 11:58:20 romainguy: could you please help? do you have created or do you know a good tutorial for recycling gallery items? when i load more than 4 images to the gallery i get a "out of memory" exception.. Sep 12 12:09:00 Hi, I'm trying to make my first app by following this tutorial: http://developer.android.com/training/basics/firstapp/running-app.html Sep 12 12:09:03 When I get to the Run stage (I want to run it on my phone) it doesn't seem to complete. I'm left with this: http://privatepaste.com/20e471bf58 - What should I do? Sep 12 12:37:11 Kottizen: Copying your manifest file would be more helpful Sep 12 12:38:57 is it possible to execute code if the running application is killed by the system? Sep 12 12:39:36 be more clean... Sep 12 12:40:04 would you be sure that a piece of code is running also if Android close background activity thread ? Sep 12 12:40:34 A service could go in right way for you ! Sep 12 12:40:59 Hello colleagues. I am having problem with Plurals and 'zero': even though I have a specific format for 'zero' it is rendered as 'other' Sep 12 12:41:35 yes, lets say this piece of code has to run. onDestroy() etc is not guaranteed to be executed Sep 12 12:42:18 onPause is however Sep 12 12:42:30 then chuck a if(isFinishing()) in that method Sep 12 12:42:40 to guarantee you will clean up code etc if it is killed by system Sep 12 12:43:02 onDestroy is called when GC actually destroy object.... Sep 12 12:43:16 you can't know and control WHEN that is done Sep 12 12:43:22 Mhm, no Sep 12 12:43:53 how do i safely close these : Sep 12 12:43:54 OutputStream file = new FileOutputStream(cacheFilePath); Sep 12 12:43:54 OutputStream buffer = new BufferedOutputStream(file); Sep 12 12:43:55 output = new ObjectOutputStream(buffer); Sep 12 12:43:59 obviously onDestroy I mean class finalization Sep 12 12:44:00 If the system is running low on memory and wants to kill your activity, then onPause() is guaranteed to be called before your process is killed. Sep 12 12:44:01 Can anyone here suggest how to design a nice registration form? (and perhaps any tutorials or articles on this) Sep 12 12:44:16 is output.close(); enough? or do i also need to close the stream Sep 12 12:44:32 yes but if onPause is called on an activity, it does not say that de whole application is ended? it only means that for the activity, doesn't? Sep 12 12:44:37 If the system is reclaiming your process, your application is already in the background Sep 12 12:45:01 So from onPause until it's reclaimed quite some time can pass Sep 12 12:45:48 tondo, when onPause is called, it may or may not be because of a finish() on the activity. and even if an activity is finished, the app is may not be finished. Sep 12 12:45:50 tondo: There's not really any way to do this Sep 12 12:46:01 What are you trying to do anyway? Sep 12 12:46:33 Actually, I guess onSaveInstanceState is called Sep 12 12:47:31 yes sinaa, thats what i meant :) that calling onPause() etc does not indicate that the application has been killed Sep 12 12:47:44 i am storing some information in SharedPreferences Sep 12 12:48:05 Store them as they change Sep 12 12:48:09 and i want to delete them if the application killed by the system Sep 12 12:48:30 tondo, you dont control the application lifetime (you better not to). put whatever you want to do on onDestroy. Sep 12 12:48:30 Eh Sep 12 12:48:40 Just don't save them in sharedpreferences? Sep 12 12:48:55 tondo, if you launch activities on top of it, put it in the parent activity. Sep 12 12:49:13 and sharedprefrences is persistant. use variables if you want them to be removed Sep 12 12:49:27 ^ Sep 12 12:49:38 there was a very similar question to this on stackoverflow I remember. Sep 12 12:49:42 sinaa: Why do it onDestroy when that is not guaranteed to be called? Sep 12 12:49:53 sinaa: Why not in onPause and check if it is finishing Sep 12 12:50:15 unless you want to restore them onResume, thats another option Sep 12 12:50:23 If you don't want your variables to persist.. Don't use persistent storage Sep 12 12:50:50 you simply want variables here. you want them for the lifetime of the class Sep 12 12:51:09 @simonVT, ok sounds quite logic Sep 12 12:51:27 http://www.skill-guru.com/blog/wp-content/uploads/2011/01/Android_Logcat-Activity-Starts.jpg Sep 12 12:51:47 Can anyone here suggest how to design a nice registration form? (and perhaps any tutorials or articles on this) (sorry for repeating) Sep 12 12:53:07 ok, thanks for the help guys/girls. i will restructure the code, so that it will not use sharedPrefs Sep 12 12:54:02 Naish: onDestroy is only not guaranteed since android just kills your app Sep 12 12:54:37 If isFinishing is true, it means something has actually called finish().. You can count on ondestroy to be called then Sep 12 12:55:03 You usually use it when you need to clean stuff up when your activity is no longer needed Sep 12 12:56:17 If you need to persist data, you shouldn't only do it when isFinishing is true.. That's not reliable Sep 12 12:58:02 is the email/password bit used here http://media.idownloadblog.com/wp-content/uploads/2012/06/Facebook-phone-concept-image-002.jpg any kind of existing layout/interface? seen it in quite a few apps, but dont know how they make it... Sep 12 13:00:29 That's kind of ios-y Sep 12 13:01:19 I dont know how people design in android. its unbelievable with xml layouts (coming with years of web development background) Sep 12 13:02:33 isn't that just a basic list view with an image, two input fields and a button? Sep 12 13:03:02 plilq, it is. I mean the input bit Sep 12 13:03:16 Clandestine, uniquesupri turns out that rapidssl is not trusted by android Sep 12 13:03:18 :D Sep 12 13:03:55 well, reading the input fields with a button callback is one way Sep 12 13:04:01 and the rest is not really android specific Sep 12 13:04:33 or button listener I mean Sep 12 13:04:36 hi all Sep 12 13:05:06 pililq, I mean the interface of it. not the backend of it. I can do the backend. its just how to design something nice for android Sep 12 13:05:26 maybe I don't quite follow then :) Sep 12 13:05:27 tagrudev, while you're at it, can you try to see if positivessl is trusted? Sep 12 13:06:04 sinaa: take a look at the drawables part of the documentation. You can very easily throw something like that together. Sep 12 13:06:10 just output an image and a few input fields and a button, or is there more you need? Sep 12 13:06:35 is it the merged input field look your after or something? Sep 12 13:06:39 Is there a way to make Choice-Format-Like with String resources? Since Plurals are useless... Sep 12 13:06:42 you are Sep 12 13:06:49 Lachezar: huh? Sep 12 13:08:39 pililq, yeah, looking for the merged input fields Sep 12 13:09:40 lov: I'd like to do something like: There are {0,choice,0#no files|1#one file|1<{0,number} files} Sep 12 13:09:52 sinaa, no idea after 5 hours of trying to make a request it turns out that Sep 12 13:10:28 lov: Android makes weird decision to support a subset of numeric forms, which makes using plurals ineffective. Sep 12 13:11:18 Lachezar: ah, I understand Sep 12 13:11:19 yeah Sep 12 13:11:30 then you throw in translations and it's like ">:(" Sep 12 13:11:37 because different languages have different ways of doing this Sep 12 13:11:39 Lachezar: write a function that accepts integer value and 3 string constants and chooses between them based on the value? Sep 12 13:12:20 chinese is apparently quite weird when it comes to dealing with numbers Sep 12 13:12:27 alankila: you can easily do it yourself by having 3 extra strings to use for substitution, I'm assuming he just wants to have something that Just Works Sep 12 13:13:10 But again there's the issue of translation :p Sep 12 13:13:23 well, his proposed form looks pretty odd to me, to be honest. Is that MessageFormat syntax? Sep 12 13:14:06 alankila, lov: I am currently doing it with three different texts, but that cuts-off translators' hands when it comes to which forms they need. Sep 12 13:14:07 if it is, a pro can easily just do MessageFormat.format(getString(R.string.x), n) and leave it at that, translations be damned. Sep 12 13:14:19 hi, how can i write loginfo from libwebcore.so ?? i put an __android_log_print() at the beginning of JNI_OnLoad() but nothing is printed in logcat. is there a way to get log-info from libwebcore.so ? Sep 12 13:14:24 sinaa: this might be your best bet: http://developer.android.com/guide/topics/ui/custom-components.html Sep 12 13:14:42 but it'll require some work Sep 12 13:14:43 SimonVT: I reject that! If the code does not allow the translator to do his job, then the code is wrong, not the translator! Sep 12 13:15:31 but you might be right that someone has implemented it in some common support library Sep 12 13:16:09 SimonVT: I suspect there is no programmer, that knows the numeric forms in all languages... Sep 12 13:16:37 sinaa: I was first thinking of maybe just changing the background image but I'm not sure if there is support for that Sep 12 13:16:42 It seems I'll have to do a MessageFormat from a String format :-/. Well... if it works... Sep 12 13:16:53 plilq, but I'm wondering how so many people are using a similar design. Sep 12 13:17:12 or it may be a linearlayout with rounded corners with 2 inputs in it! hmm Sep 12 13:18:05 sinaa: http://androidforums.com/developer-101/194627-creating-text-boxes-rounded-edges.html Sep 12 13:18:12 Steve Jobs kills a kitten every time you use ios-like ui elements on Android Sep 12 13:18:17 it would be so much easier if everyone spoke english and used a single number and date format. Grr. Sep 12 13:19:17 computers should be tools of format imperialism. Sep 12 13:19:53 alankila: I see you don't have much experience with translators. Sep 12 13:19:59 We still can't get ours to fucking escape their apostrophes Sep 12 13:20:17 SimonVT: do you think he has allocated a fund that continues paying kitten assassins long after his death? Sep 12 13:20:35 plilq, looking at this right now http://stackoverflow.com/questions/1683185/android-listview-with-rounded-corners Sep 12 13:21:11 yeah, same code in the link above, but shows how to do it for one corner only Sep 12 13:21:19 plilq: What do you think tim cook was hired for? Sep 12 13:21:30 tim cook's homemade kitten pasta Sep 12 13:21:41 gross. Sep 12 13:21:53 It's called the iPhone 5 because it's 5% kitten Sep 12 13:22:05 tim, 3 letters, half-life 3 confirmed... only cook remains... half-life 3 spam = copypasta.... kitty pasta.... damn, you are right Sep 12 13:22:09 Had to step it up from 4 because of Samsung Sep 12 13:22:58 for every kitten samsung doesn't kill, someone has to :( Sep 12 13:23:29 hi, does anybody know how i can read loginfo from libwebcore.so ?? i put an __android_log_print() at the beginning of JNI_OnLoad() but nothing is printed in logcat. is there a way to get log-info from libwebcore.so ? Sep 12 13:24:56 result: E yyyy-MM-dd\'\'\n({0,choice,0#TODAY|1#tomorrow|1< after {0,number} days})\'\' Sep 12 13:25:20 As awful as it comes: three types of escapes! Sep 12 13:25:39 android's use of XML is sort of fail Sep 12 13:25:50 minilanguages within XML attributes and text nodes. Ew. Sep 12 13:25:54 Why is this giving me a NullPointerException at if(startService....? Sep 12 13:25:54 anyone familiar with IntelliJ and emulators? Sep 12 13:26:05 http://pastebin.com/gWLTcYQw Sep 12 13:26:11 I can't use my Intel emulator in IntelliJ Sep 12 13:26:29 and I can't see why, the Android SDK versions match Sep 12 13:26:44 Start the emulator first Sep 12 13:26:55 alankila: Not really... Maybe if I put it in CDATA, but the worse here is that I need to escape a few symbols, that are used by getString(), and then there are escapes for the MessageFormat ('' for a single quote)... Sep 12 13:27:36 Snoxie: why don't you paste your stacktrace? Sep 12 13:27:49 Hi. Trying to install the ADT Plugin on eclipse, I get this error: http://pastebin.com/mZZPyPnc Sep 12 13:28:28 asanchez1987: you might want to pop over to #eclipse, the root cause is an eclipse UI element Sep 12 13:28:33 yeah the CDATA would help for the < but nothing else Sep 12 13:28:36 Oh sorry lov.. Here: http://pastebin.com/n27hwyk4 Sep 12 13:28:40 asanchez1987: Usingg Sep 12 13:28:49 asanchez1987: Using Juno? Sep 12 13:28:55 Lachezar Helio Sep 12 13:29:08 try downloading the newest eclipse classic Sep 12 13:29:16 Version: 3.6.1 Sep 12 13:29:16 Build id: M20100909-0800 Sep 12 13:29:27 i had the same issue.. i just installed the hole eclipse and it worked Sep 12 13:29:29 well, your error says it needs 3.6.2 Sep 12 13:29:47 ok I installed it from the Centos 6.3 official repositories Sep 12 13:29:48 Lachezar: what I really disliked about the android xml is that there's some special hackery for newlines and stuffl ike that. It's not just string but there's some minilanguages there Sep 12 13:30:03 download it from the offical homepage Sep 12 13:30:05 is there a way to update it from Eclipse or should I uninstall this one, and download the newest from the page? Sep 12 13:30:10 asanchez1987: get it directly from eclipse's site, centos probably has an old version Sep 12 13:30:15 so when you have string.xml there's internal structure in the strings that isn't expressed in xml Sep 12 13:30:46 a bit like the attributes can have ?attr/ or @+id/ or such crap Sep 12 13:30:59 ok, I'll give it a try Sep 12 13:31:00 thanks Sep 12 13:31:14 alankila: Ahhh... Now I get it! Sep 12 13:31:18 especially the @+id annoys me because it's so incredibly unnecessary conceptually Sep 12 13:31:39 asanchez1987: there is also help->check for updates, but I'd not mess with it if it's originally been installed through a package manager Sep 12 13:31:41 alankila: I very much like the @+id. It sames me the trouble to manually manage IDs. Sep 12 13:32:14 Lachezar: really. Perhaps you have no taste. Tell me, what is wrong with xml-esque ? why does android require ? Sep 12 13:32:18 asanchez1987: I would advise STRONGLY agains using eclipse from any repository. Download and install manually. Sep 12 13:32:58 alankila: Because there is : id="@android/id/text" and id="@+android/id/text", that have different meanings. Sep 12 13:33:09 Lachezar plilq but if I install it directly from the webpage package, the files are not distributed throughout my tree structure, instead it will be all inside an eclipse folder in my home right? Sep 12 13:33:26 asanchez1987: Right! Best way to use Eclipse. Sep 12 13:33:30 asanchez1987: where ever you deploy it Sep 12 13:33:37 okay Sep 12 13:33:38 hi, how can i write loginfo from libwebcore.so ?? i put an __android_log_print() at the beginning of JNI_OnLoad() but nothing is printed in logcat. is there a way to get log-info from libwebcore.so ? Sep 12 13:33:38 Lachezar: the latter form likely doesn't work, since I imagine that implies regenerating android.R Sep 12 13:33:39 asanchez1987: I have 8 of those :):):) Sep 12 13:33:41 thank you guyas Sep 12 13:33:45 guys* Sep 12 13:33:55 Code: http://pastebin.com/gWLTcYQw - Stacktrace: http://pastebin.com/n27hwyk4 Sep 12 13:33:55 so going to uninstall the centos one first Sep 12 13:34:07 and the workspace created under my /home/myuser/workspace Sep 12 13:34:49 alankila: OK, but I have (in reality!): id="@+id:scanSurface" and layout_below="@id:scanSurface" Sep 12 13:34:56 Lachezar: I've usually always got Eclipse from their site and have had a few different ones installed for Android, Java EE, C++ stuff so they would not mess with eachother, but on this machine I got eclipse from Arch Linux's package manager and it's been fine Sep 12 13:35:01 alankila: But I suppose you're right... Sep 12 13:35:08 Lachezar: what is wrong with just saying id="scanSurface" and layout_below="scanSurface"? Sep 12 13:36:00 I just don't like the id-related minilanguage. There IS a problem regarding differentiating your own IDs vs. android's IDs, though. But that could be solved in other ways, perhaps. It wouldn't occur very often. Sep 12 13:36:19 plilq so for android the recommended one is the newest classic version right Sep 12 13:36:28 yeah Sep 12 13:36:32 alankila: Well... On occasion I have to export some of the IDs (when doing libraries). Then I have a file with exported IDs, and I don't use @+id: in the layouts. Sep 12 13:36:34 java is fine too Sep 12 13:36:42 but if you can choose, just grab the newest classic Sep 12 13:37:17 Lachezar: correct. But I'm pretty sure that you are describing artifacts that arose from the existing design, rather than thinking about a clean-room implementation. Sep 12 13:37:34 asanchez1987: I always start with classic, but that is a personal preference. You can start with 'For Java Developers'. Sep 12 13:38:00 alankila: For the time being... I can see no other way around it... Sep 12 13:38:11 but with classic I can start developing java right? Sep 12 13:38:16 today, it's obvoius that @+id and @id crap is what you have to live with. The design is already entrenched. I'm just complaining about what an ugly solution it is. Sep 12 13:38:25 asanchez1987: yes Sep 12 13:38:33 woops, seems I had the Google API 4.0.3 selected instead of the Android 4.0.3 Sep 12 13:38:40 mostly the different versions just have different views and tools Sep 12 13:38:45 after setting it it to vanilla it showed up Sep 12 13:38:48 and you can add stuff later Sep 12 13:38:55 asanchez1987: Yes, but you will also be able to do that with 'For Java Developers' too. Classic means you can write Eclipse plugins too. Sep 12 13:39:39 to be honest I'd rather use strings as ids anyway. :-/ I'm not convinced that android's games with flags as integers and so on are really necessary even for performance reasons, and finding views by strings could be quite fast as well. If you think ids are too slow as strings, then I ask you why android uses Bundles, which are based on hashmaps with string keys anyway Sep 12 13:40:09 either be consistent about utmost efficiency, or don't do half of shit one way and the other half differently Sep 12 13:40:47 alankila: I do not want to argue over that. You're point is well seen, and has good ground. Sep 12 13:41:05 Lachezar so the basic difference is that Classic="For Java Devs" + ability to write eclipse plugins Sep 12 13:41:58 int-flags are annoying in that it's hard to know what flags apply to what arguments. You may have a Notification and it takes some flags and then you random around if those integer constants are from Notification or NotificationManager or Context or what. :-/ I'm pretty sure application programmers make a lot of bugs because of this. Sep 12 13:42:51 asanchez1987: precisely! The Classic contains sources and documentation for the Eclipse RCP/Platform/SDK. Sep 12 13:43:13 alankila: erm .. in all the years i've seen flags being used, i have never seen that be an issue Sep 12 13:43:21 anyone know if it's possible to get an x86 image that is 1:1 with the latest Google API ? Sep 12 13:43:22 and strings are horrendously slow for that sort of thing Sep 12 13:43:39 (eg I saw tuts for adding Maps API, but I guess that's only part of it) Sep 12 13:43:47 I agree with alankila, only for the sake of readability Sep 12 13:43:48 belgianguy: http://www.android-x86.org/ ??? Sep 12 13:43:49 571512 Sep 12 13:43:51 what does that mean? Sep 12 13:43:57 and there's no reason that strings would be more readable or correct than constants Sep 12 13:44:01 welp, time to get out the calculator in programmer mode, look at bit flag, and go hunting. Sep 12 13:44:33 oGMo: there might be a confusion. For flags, I'd like to use the enums that were practically invented for this. Sep 12 13:44:38 not strings Sep 12 13:44:39 I mean it's totally worth it for efficiency's sake but you really have to be stellar as far as documentation so that it's very easy to figure out what maps to what. Sep 12 13:45:00 and my grounds for disliking the int-flags is that java has a better way, where you can't pass in wrong constants by mistake Sep 12 13:45:33 lov: if you have an issue understanding a number as a dev, time for a new job :P Sep 12 13:45:45 of course, IDK what java's version of FLAG_X |FLAG_Y would look like. Perhaps nothing worse than or(Flag.X, Flag.Y), but even then I don't like it Sep 12 13:46:05 there's EnumSet iirc but it looked a bit cumbersome also Sep 12 13:46:42 oGMo: it's good that you never make mistakes. The rest of us like to be reminded occasionally what goes where, and like compile-time type safety also. Sep 12 13:46:49 enums can't be bitwise ORed? Sep 12 13:47:01 oGMo: hmm... IDK. I don't think they can. Sep 12 13:47:30 there's ordinal() method on every enum, but that would also require the ordinals to be arranged in some nice way. And the person suggesting Flag.X.intValue() will be shot. Sep 12 13:47:33 The only way to replace flags is with a Set, which is even slower than Strings. Sep 12 13:48:01 I might be wrong though, since I don't use EnumSet. Sep 12 13:48:45 now getting this new error with fresh new Juno eclipse version: Sep 12 13:48:48 dunno, though it looks like you can use an enum to make OR-able constants, you probably can't actually specify the flag parameter as the enum, but it's unclear Sep 12 13:48:53 INFO: I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server download.eclipse.org failed to respond Sep 12, 2012 3:45:56 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry Sep 12 13:49:12 regardless, if you can't handle the basics, :P Sep 12 13:49:43 oGMo: I think you misunderstand me. Sep 12 13:49:52 I CAN translate from bitflags to reasonable values Sep 12 13:49:56 but it takes valuable time to do so Sep 12 13:50:07 I CAN do it but I don't WANT to do it, when there are better ways Sep 12 13:50:12 oGMo: you should really consider that every bit of difficulty faced by your average programmer reduces the platform's attractiveness and its value. There are good reasons to try to make everything as simple and bulletproof as possible. Sep 12 13:50:56 "average programmer" heh Sep 12 13:51:12 Some one has said: Programs are written to be read by humans, and occasionally run on computers... Sep 12 13:51:18 I'd much rather just get some class whose toString is gently formatted to provide the relevant information; this way I can see "ah, so it had FLAG_CLEAR and FLAG_DESTROY" at a glance, instead of going "ok, so 16 is what again?" Sep 12 13:51:18 compile-time type checking is quite useful because it sort of manages some of the complexity for you. Even then, it's of course a balancing affair between having too many types to deal with, and too few, and about what level of OO modeling makes sense to begin with Sep 12 13:51:25 regardless, if you're that paranoid, i'm sure you can write a validate() routine that looks at the bits in a flag and complains if they're not correct Sep 12 13:52:10 hmm, does any constructor exist for Paint in which I can set the color? Eclipse is bitching at me for allocating a Paint object in onDraw but if I make it a static member I have no good way to initialize it Sep 12 13:52:11 also lov's point is valid. I really like the fact that java's enums have stringifications. Sep 12 13:52:59 you never write the routine that takes a flag and prints its string value out because you don't need such a function. Yet, C code tends to have these mapping functions all the time. In the worst case, they are bidirectional, from string to int (because it's read from config file!) and back to string Sep 12 13:53:00 Hodapp: Thought about using Paint.setColor? Sep 12 13:53:19 SimonVT: Can I do that statically? Sep 12 13:53:19 if only you could simply call a routine that reversed the bitflags and told you what they were in human-readable form :P Sep 12 13:53:56 Hi, I want to add a widget with three sliders to an android menu. I tried to write my own implemenation of the abstract ActionProviderClass, but my layout of three sliders is too big for the action bar, so I would like to have a overflowing layout that pops up if I tap my action. Is this possible? Sep 12 13:54:07 As in, is setColor a static method? no.. Sep 12 13:55:25 I noticed that the ActionProvider can have sub menus, but I guess it's not possible to put in sliders in the sub menus. Sep 12 13:55:37 SimonVT: Instantiating Paint inside on onDraw supposedly is bad, so I'm trying to find a way to do this _as a static member_. Sep 12 13:55:52 or something to that effect. Sep 12 13:56:01 Just make it a member variable? Sep 12 13:56:05 Instantate it in the constructor Sep 12 13:56:20 anyway, these things are really just minor annoyances. You run into needing to decode these flags manually occasionally and that's that. Sometimes you might pass in wrong constants by mistake because you didn't know which object's FLAG_FOO is required and the javadoc documentation doesn't always make it clear. Sep 12 13:57:13 I have a simple project that displays the date and time. The time is android digitalclock widget and updates auto. The date however would not, say, if it went from 1159 pm to.1200 am. Any suggestions for a noon? Sep 12 13:57:24 Noob Sep 12 14:03:12 qkzoo1978: when your program starts up and creates the view, you can post an invalidation that occurs at midnight, I guess. Sep 12 14:03:15 ...on how to get my app to update the date, or check the time and update when the hour changes... Sep 12 14:03:18 SimonVT: I'm inheriting; there are enough constructors that this is rather ugly. Sep 12 14:03:36 qkzoo1978: or which occurs every next full hour, if that is what you need Sep 12 14:04:31 to calculate when the next full hour is, you can just take a Calendar.getInstance(), set minutes, seconds and milliseconds to zero and add one hour and then use getTime() to get the unixtime for the next full hour, and then calculate the appropriate sleep for postinvalidate Sep 12 14:04:37 That could work. I'm just confused where to start. Sep 12 14:06:14 qkzoo1978: I imagine where you create the view is the place to set up the update hook Sep 12 14:06:40 anyone know why my getString(R.id.number_items, 5); isn't working? ah ok ! but i did add textviews to it! Sep 12 14:22:30 piliq if i create an object, does that create a new iunstance of my service? Sep 12 14:22:39 no, you didn't. Sep 12 14:22:50 uniquesupri: they probably also supply a web api that you can communicate with Sep 12 14:22:51 you failed on the first iteration of the loop because ADAPTER IS NULL Sep 12 14:23:04 superlinux-hp: learn how to use the debugger, learn how to examine stacktraces. Sep 12 14:23:22 ok Sep 12 14:23:25 Chronos_: well, if you are trying to stop a service, you probably want to call stop from that service's object Sep 12 14:23:42 instead of creating a new service object to stop Sep 12 14:24:08 ok, well how do i get a handler for a service that is alreader running? Sep 12 14:24:33 i have something like this Intent notificationIntent = new Intent(this, serviceBluetoothConnection.killService()); Sep 12 14:25:02 plilq: something for Oauth2 without the overhead of SDK? Sep 12 14:25:22 what are you i dont even Sep 12 14:26:10 Chronos_: you can stop a running service by calling stopService(intent to the service) Sep 12 14:26:48 ok, how do i call that from within a notification Sep 12 14:27:07 do i create a class which al it will do is kill my service? Sep 12 14:27:15 yeah basically. Sep 12 14:27:31 you need context to send intent from Sep 12 14:28:02 you can send the intent to the service as a pending intent to your notification Sep 12 14:28:38 *not sure about pending intent though Sep 12 14:28:51 this sounds terrible complex considering Sep 12 14:29:40 Pardon my interfering in the middle, I didn't get your question completely Sep 12 14:29:55 I just read your question as how to stop a service Sep 12 14:30:09 basically, i have an application with a notification Sep 12 14:30:29 and a service Sep 12 14:30:44 i want to kill the service from the notification Sep 12 14:31:20 do you want to kill service when the notification is cliked? Sep 12 14:31:20 well, you could probably add a static method to your service that returns the active instance, and then get the instance in your notification intent and cancel it through it Sep 12 14:32:04 if reaching the service object is your problem Sep 12 14:33:12 hmm Sep 12 14:33:56 uniquesupri: sorry I don't know about the fb thing more specifically... I just remember they might have had a simple send POST request and receive confirmation interface... but last time I checked was years ago Sep 12 14:34:48 plilq: no problem. Thanks for the info. I will dig on that Sep 12 14:35:33 Chronos: you can do this Sep 12 14:36:04 PendingIntent pi = PendingIntent.getService(); Sep 12 14:36:23 inside the pending intent you can add a flag as intent extra Sep 12 14:36:36 to indicate that it is launched from notification Sep 12 14:36:54 so which method do i catch the extra from? Sep 12 14:37:00 start your service again, this time onStart in your service is called Sep 12 14:37:04 not the oncreate Sep 12 14:37:15 inside onStart or onstartCommand Sep 12 14:37:16 ok Sep 12 14:37:21 catch the intent extra Sep 12 14:37:41 if extra is there, run stopSelf() Sep 12 14:37:57 does a intent instantiate again? Sep 12 14:38:08 or will it grab a hold of one lying about Sep 12 14:38:17 sorry for being pedantic Sep 12 14:38:26 if the service is running already Sep 12 14:38:43 intent will call onStart Sep 12 14:38:47 ok Sep 12 14:38:53 it will not create a new instance of the service Sep 12 14:38:54 that sounds reasonable Sep 12 14:39:05 and purely hypothetically Sep 12 14:39:12 if i wanted a second instance Sep 12 14:39:21 how would i intent that? Sep 12 14:41:41 hmm haven't thought about it. Why do you need two services that do the same thing? Sep 12 14:42:12 (You can refer on startService() here: http://developer.android.com/reference/android/content/Context.html#startService%28android.content.Intent%29) Sep 12 14:42:49 hi Sep 12 14:43:00 is there a way of creating DLC's for the application, or an application without an icon in the menu? Sep 12 14:43:13 well never mind, Sep 12 14:43:34 just trying to wrap my head around instantiation and all this stuff Sep 12 14:43:35 Chronos_: I guess you can start another instance from onStartCommand() method of the service Sep 12 14:43:44 Denommus: uh Sep 12 14:43:47 maybe you can start two runnables in the start function Sep 12 14:43:47 thank you very much btw Sep 12 14:43:55 1) Yes, use in-app payments, download your content yourself. Sep 12 14:43:58 if you encapsulate it like that Sep 12 14:44:05 2) I'm not really sure what you mean by "an application without an icon in the menu" Sep 12 14:44:11 Becareful, this may end up in an infinite loop :) Sep 12 14:44:12 do you mean without an activity that's exposed to the launcher? Sep 12 14:44:15 lov: I need the DLC's to be in Google Play :-/ Sep 12 14:44:35 At present I'm not sure that it's possible. Read up on the docs. Sep 12 14:45:07 lov: yup. I have a "main application", and I want the user to download additional activities in Google Play, but I don't want the user to directly open these additional activities Sep 12 14:45:10 Denommus: could you replace your existing app with a DLC+app application? Sep 12 14:45:31 plilq: no. There will be lots of DLC's, and the user may have more than one Sep 12 14:45:32 .... Sep 12 14:45:59 Denommus: A) no, you can't add additional activities in this way. You can have multiple applications that users could buy separately. Take a look at how svox does this. Sep 12 14:46:13 B) I think you need to understand how android actually works before you go any further. Sep 12 14:46:39 you're using a lot of really bogus terminology and don't even understand what activities are. Sep 12 14:46:48 I keep thinking lov is the comic book guy from the simpsons because his every answer starts with "uh" or "..." or something :p Sep 12 14:47:26 lov: yup, I'm basically a newbie, and I'm not even sure how to express what we are trying to do Sep 12 14:47:34 plilq: AD&D was clearly the best edition Sep 12 14:47:36 * lov pops a zit Sep 12 14:47:39 :) Sep 12 14:48:40 lov: trying to be more clear, I have an app that has some downloadable add-ons. Each add-on works basically as a separate application, but the user can't open them directly, only through the app Sep 12 14:48:42 I'm having some issues with using a webview for a login flow. Everything works fine if the user simply enters his information on the initially opened page. I get a callback to onPageFinished and I extract a token from the URL and proceed from there. But if on that initially opened page, the user clicks to use facebook to login, then they are redirected to facebook's login page and I seem to even receieve the callback i Sep 12 14:48:42 onPageFinished that this URL loaded. However, other asynchronous calls that I'm then doing in onPageFinished will not execute if the user navigated to FB in this way. If they just immediately enter their login credentials, everything is good. With FB, everything just sort of stops. No relevant logs, no crashes of any kind. Here's some pseudocode as to what this all looks like: https://gist.github.com/3707104 Sep 12 14:49:22 lov: am I clear enough? Sep 12 14:49:24 Denommus: this is possible albiet an awkward experience for the user. Sep 12 14:49:48 lov: I may agree with you, but that's what the client is asking Sep 12 14:50:00 Denommus: Activities that are visible in the launcher are only visible in the launcher because they have an intent filter for ACTION_MAIN. You can simply not have any activities that have that filter. Sep 12 14:50:17 You can have your "main" app and have extra apps that the user purchases separately Sep 12 14:50:28 bear in mind, you WILL have users who purchase the add-ons, get confused, and refund. Sep 12 14:51:03 Additionally, instead of having your add-on apps use activities and such, I'd recommend having them just be wrappers for resources, etc that are extracted as appropriate when your base app is present. Sep 12 14:51:05 lov: again, I agree with you. But the client is asking for this Sep 12 14:51:22 well, it's possible, I'd just recommend that you learn android before you do it :P Sep 12 14:52:17 lov: resources are not enough. Each add-on will have its own internal logic. And don't worry, I'm not a one-man team, I'm actually new in the company. Making mistakes will be understandable Sep 12 14:53:03 Denommus: alright, it's your show. Sep 12 14:53:07 Denommus: you could embed all the logic in the main app and just trigger them or extract resources or something with your add ons Sep 12 14:53:20 just throwing ideas Sep 12 14:53:44 plilq: don't think it's viable. The client may want to create its own add-ons in the future Sep 12 14:54:44 I guess your application becomes a more complex launcher project if it has to be really modular :p Sep 12 14:55:50 plilq: probably. But I'm just one of the members of the team, the others will think about something, probably. We're collecting research data right now Sep 12 14:56:33 Denommus: maybe it could search for installed activities that match certain criteria and present them as a list that you could use to launch them... and the dlc apps themselves would not have ACTION_MAIN set Sep 12 14:56:35 have fun then :p Sep 12 14:57:09 plilq: thank you Sep 12 15:03:07 Denommus: Just make sure that all of the applications in the family are signed with the same certificate and have the same sharedUser Sep 12 15:03:11 that will make things dramatically easier. Sep 12 15:03:39 Hey all, I've written up a detailed question about a problem I'm experiencing here http://stackoverflow.com/questions/12391149/problems-implementing-a-login-flow-using-webview I'd appreciate it if anyone can take a look. Sep 12 15:04:10 happy programmers day (http://en.wikipedia.org/wiki/Programmers'_Day) Sep 12 15:10:28 Any Twitter API expert here? Sep 12 15:11:02 Can I get list of accounts who has authorized my twitter application? Sep 12 15:15:52 sacdroid, we haven't found Sep 12 15:16:02 not searched a lot Sep 12 15:16:52 sacdroid, we have sent them an email to know how much we got atm for the 200% limit Sep 12 15:17:14 Vins: I did but could not find one. Do you know if there twitter dev irc channel ? Sep 12 15:17:36 sacdroid, don't know for the irc chanel Sep 12 15:17:53 Vins, ok Sep 12 15:18:07 sacdroid, if you find anything let me know :) Sep 12 15:18:16 Vins, sure :) Sep 12 15:21:02 Vins: looks like answer is NO, ref: https://groups.google.com/forum/?fromgroups=#!topic/twitter-development-talk/8XOznHWS9eM Sep 12 15:21:31 Vins: but its 2 yrs old thread. Sep 12 15:22:33 sacdroid, haha thanks :) Sep 12 15:23:27 sacdroid, the problem with their "solution" is that you can't know if someone release the link with your application by their site web Sep 12 15:24:16 and if they say that your reached your 200% user limit, you have nothing to verify that it's real Sep 12 15:24:30 sacdroid: hmm Sep 12 15:24:41 Vins: yes Sep 12 15:25:05 so developers for twitter are now blind... Sep 12 15:25:16 3rd party apps Sep 12 16:02:52 no Sep 12 16:03:27 Since the backstack manages fragment precedence, should the up carot/home button be used or not in conjuction? Sep 12 16:04:35 Or I guess I mean, should the home button be enabled for the ActionBar if the fragment manager backstack handles the exact same thing? Sep 12 16:08:20 er Sep 12 16:08:35 the home/up button is different than navigating the back stack Sep 12 16:09:02 I have this setup of fragment flow: home->browse->content Sep 12 16:09:16 I change the ab for each since they have different functions, Sep 12 16:09:36 but since pressing back will move content->browse, should I enable home/up for content fragment? Sep 12 16:09:52 yes Sep 12 16:09:55 Which I thought was the motivation for the up button? Sep 12 16:10:04 Even though both do the same thing? Sep 12 16:10:34 my app is parsing some xml and inserting into a db, it takes about 8 seconds to do this on a desire. should i use an async inside my activity or an async in a service? Sep 12 16:11:00 Yeah I guess that makes sense, just checking because my content ab custom view has next/last buttons that could be confusing since <> is the same as <. thanks evan Sep 12 16:11:42 brx_ why would you want to use an entire service to do something you can do with one simple async task? Sep 12 16:12:03 if the back button is pressed on the activity their is no guarentee that the async will complete Sep 12 16:12:05 afaik Sep 12 16:12:07 lasserix: Sep 12 16:12:45 Oh this is when the app initializes for the first time? Sep 12 16:12:50 * starts Sep 12 16:13:00 yes its a one-off time Sep 12 16:13:01 brx_: the async will not be terminated despite that Sep 12 16:13:05 initial run Sep 12 16:13:10 really alankila ? Sep 12 16:13:31 I think I saw some SO posts on handling just that brx_ Sep 12 16:13:41 really. Well, there is a small risk, I guess, that if user isn't seeing any part of your app and android needs memory that it will decide to kill the process Sep 12 16:14:01 which is why some people run dummy services that do nothing other than defeat the android task-killing for the duration of their asynctasks Sep 12 16:14:10 ok i will take your suggestion Sep 12 16:14:34 thanks, i was hoping i woldnt hav to start putting another service in anyway :D Sep 12 16:19:30 does anyone have some good, usable examples on calendarcontract attendees? Sep 12 16:19:48 the only thing I could find was the android calendar application Sep 12 16:19:56 and it's overly complicated D; Sep 12 16:21:56 any recommendations for a brute force tool to recover a keystore password? Sep 12 16:22:14 I guess technically a background importing process should also acquire a wakelock to ensure that it can complete if user shutdowns the screen. Maybe it doesn't matter for short durations, but in principle it's pretty complicated. For instance, one can run IntentService to do background processing, only to discover that it halts without a wakelock Sep 12 16:22:19 f2prateek: a supercomputer Sep 12 16:23:22 :( Sep 12 16:25:05 gonna leave my computer up with this one http://code.google.com/p/android-keystore-password-recover/wiki/HowTo, hopefully when I'm back from school it'll be done! Sep 12 16:26:02 os if you really want to do something lengthy one-time-initialization-like, you need a service to stop the task killer, and a wakelock, and asynctask to perform the work, and a notification (maybe) to indicate the progress. That's really getting pretty boiler-platey. And then there's all the code to check if your initial run stuff has run yet, or if it aborted halfway through and needs restarting. Sep 12 16:27:36 oh, and the code to detect that it is in fact still running. :-/ Sep 12 16:27:40 f2prateek: take a look around for power which can give you graphic card Sep 12 16:28:01 f2pratek: regarding that kind of attacks Sep 12 16:28:56 neixetis: that kinda went right over my head :/ Sep 12 16:29:01 argh, i hate it how difficult it is to actually load data over the network in an Activity/Fragment Sep 12 16:29:33 hrnt: how are you currently trying to do it? Sep 12 16:29:38 neixetis: you mean redirect gpu processing for the brute force? Sep 12 16:29:39 alankila: Loaders Sep 12 16:29:45 oh. ew. Sep 12 16:29:49 indeed Sep 12 16:30:02 AsyncTask is pretty stupid class - you need to juggle it during the activity restarts Sep 12 16:30:07 f2prateek: yep Sep 12 16:30:22 basically it looks like it was designed by somebody who didn't know anything about the android activity lifecycle Sep 12 16:30:25 hrnt: which is why you don't hand an activity to it but fragment, and retainInstance all those buggers Sep 12 16:30:41 Loaders have a strange API and pretty weird limitations Sep 12 16:30:42 f2prateek: for couple hundred bucks you can achieve something equivalent to 1kk$ machine Sep 12 16:30:53 such as "you can't commit fragment transactions in onLoadFinished" Sep 12 16:30:57 hrnt: still have to be carefuly about calling getActivity, as the fragment could be detached from activity I guess Sep 12 16:31:33 alankila: yeah, i guess i'll try that next Sep 12 16:31:33 neixetis: cool idea, but i'm hoping i'll remmeber the password after just this once :) Sep 12 16:31:48 oh, speaking of weird limitations Sep 12 16:31:57 you cannot commit fragment transactions after Activity has saved on instance state Sep 12 16:32:26 hrnt: also you can just forget about loaders if you think they suck. I personally don't really see what benefit they bring compared to just having a thread do the work to get the data and massage it in convenient form after which you just feed it to some adapter Sep 12 16:32:36 when does activity save its instance state? before onPause, after onPause or never. Sep 12 16:32:42 so basically it can save its instance state anytime Sep 12 16:32:45 asynctask contained in a fragment should be pretty good for that sort of purpose. Sep 12 16:32:54 so you have no guarantees at all if you can commit a fragment transaction or not :P Sep 12 16:33:20 alankila: tbh i think i'll just start running the damn things in my Application subclass :P Sep 12 16:34:34 hi, i run the android emulator on ubuntu. i have writen a small java server on the local machine and a small app on the emulator. I try to send a string to the server and give it back to the emulator. But the network communication doesnt work. Sep 12 16:35:38 on the emulator i can browse the web, the network in this way works Sep 12 16:35:56 anyone? Sep 12 16:37:39 makk: how do you try to access the java server? by the network ip of the machine, or by 127.0.0.1, or what? Sep 12 16:38:15 i use 10.0.2.2 int the app on the emulator Sep 12 16:38:35 makk: I'm afraid there could be a limitation on the NAT of the emulator that prevents it from accessing any service running on the host. I've seen this sort of problems with the emu-NATs and have solved the issue by using bridged networking, which works more logically. However, don't think android supports it... Sep 12 16:39:36 or at least I've not seen a way to enable bridged networking for the android emulator, even if the qemu itself probably supports it Sep 12 16:42:37 there are people running things like the android for eeepc in virtualbox, which could work. Alternatively there might be some other solution. Nothing useful came up when I googled for a bit. Sep 12 16:43:15 does android work with the java.net class? Sep 12 16:49:05 ok i found the problem, i need the in the manifest :-) Sep 12 16:59:15 hello, Sep 12 16:59:21 from a layout xml Sep 12 16:59:32 how do i tell the onclick to look in a particular class Sep 12 16:59:35 ? Sep 12 16:59:56 i recommend setting your event listeners programatically Sep 12 17:00:18 i have a buton looking in the wrong class which does not have the method Sep 12 17:00:35 what do you mean- catching onclick listener? Sep 12 17:00:55 define your UI in XML, but leave the logic to java Sep 12 17:01:28 so you are saying dont set onclick in xml? Sep 12 17:01:29 UI by itself does nothing, code by itself looks like nothing Sep 12 17:01:50 chronos - correst, i am saying set in in java Sep 12 17:01:53 so there is a reason to separate them :) Sep 12 17:02:13 1] what is a use case for why its better Sep 12 17:02:18 1) everything Sep 12 17:02:20 separation Sep 12 17:02:33 separate logic from presentation Sep 12 17:02:49 2] is there a work around in the meantime to Sep 12 17:02:55 seriously, declaring event listeners in XML is like coding javascript into Sep 12 17:03:02 look at a class? Sep 12 17:03:03 ^^ Sep 12 17:03:46 Chronos doing it in java is so easy, you're better off doing that than working around the issue Sep 12 17:04:23 Chronos_: i suggest you read up on events and listeners; try to understand what they do before you just blindly copy-paste something into your code without actually *knowing* what it does :P Sep 12 17:04:50 "black boxes" like that are a coder's worst enemy Sep 12 17:05:44 in your activity onCreate()... Button someButton = (Button) findViewById(R.id.....someButton); someButton.setOnClickListener(new View.onClickListener() { public void onClick(View v) { //button click stuff here or call the method you want } }); Sep 12 17:05:48 ok, well is there a workaround i can use for the next 30min before i have time to read up? Sep 12 17:07:37 grr. just do it right. it's that simp;le Sep 12 17:08:17 ha, well my code is not right- and wont be until i decide to refactor it. big hack job right now Sep 12 17:08:22 but thanks Sep 12 17:08:45 started programmicing in android and java on thursday... Sep 12 17:09:08 its going to be awhile before i think i 'get' the paradigm Sep 12 17:15:34 chronos_ you can in your xml in the button add android:onClick="myClickFunction" and then in your activity define a function public void myClickFunction(View view) Sep 12 17:15:55 which will wire the two together, but take the advice above or you won't get tooo far Sep 12 17:16:38 lasserix: I agree, since you only save a line of code with that but won't be able to customize much, but Chronos already parted :p Sep 12 17:18:00 fucking asshat. i can't stand when people argue best practice because it doesn't align with how they expected to do it Sep 12 17:18:16 Woops he did! I just remember what it was like when I first ventured in and it was frustrating as counting out the numberline in binary to get anything working Sep 12 17:18:31 "i'm new to this and don't know what i'm doing but i'll keep re-askign the question until i hear what i want" Sep 12 17:18:40 so, now there are 500 million androids... Sep 12 17:18:51 That's when you rephrase what they said and ask it back to them as a question speakingcode Sep 12 17:19:42 haha yeah, who has time though. i gave him the code skeleton, all he would need to do is fill the blank and he says "well that would be so much yadda yadda" Sep 12 17:20:35 Meh, when folks ask the wrong question like that just give them enough rope to hang themselves Sep 12 17:20:45 one could take 5 million onclicks out of xml in 2 seconds with a regex and it wouldn't be much more to paste in all the java setters instead Sep 12 17:21:06 but hey, what do you expect, mobile development is now what html would have been in 99, and imagine the support channels then.... Sep 12 17:21:11 maybe we need a #android-dev-friendly Sep 12 17:21:12 if you're not willing to spend a little time to figure out/understand the recommended practice and solution you shouldn't be programming at all, cause you're stuff is gonna suck Sep 12 17:21:32 you don't learn by sticking to the non working way, you struggle and learn the right way Sep 12 17:21:47 everybody wants in but the hill to climb is a bit steep in one day Sep 12 17:22:46 pay me now or pay later with interest. the 15 seconds he might save figuring out his onclick xml workaround is likely to cost him more time in the long run Sep 12 17:22:54 I've set up my new developer phone up in rules.d, the nexus s 4g and it still won't show up. My other testing devices do however and I'm thinking it might be the cord I'm using to connect it to my workstation. Anyone else have any other suggestions? Sep 12 17:23:29 have you tried another cord? Sep 12 17:23:33 Poesghost: did you set it with the samsung vendor id? Sep 12 17:23:34 speakingcode: some people only learn from mistakes .. then again, some people make mistakes and it's someone else learning from them :P Sep 12 17:24:07 Left it at home, at the studio right now. But why would the cord make a difference, just saying, it seems odd but one thing that came to my mind. Sep 12 17:24:08 (so, what saik0 said) Sep 12 17:24:16 plilq: yes Sep 12 17:24:33 shouldn't be the cord if it works for your other devices Sep 12 17:24:47 oGMo true, and maybe i'm being bitter because i've encountered a TON of this nonsense in user groups lately, but ya know... there's "learning the hard way" in an effective manner, and there is just making things hard and useless Sep 12 17:25:07 That's what I was thinking too. Sep 12 17:25:25 speakingcode: pretty much Sep 12 17:26:03 Poesghost: and you turned on usb debugging on the phone? Sep 12 17:26:38 plilq: yup just got done double checking that. It's turned on. Sep 12 17:26:41 and I take your rules-file is already executable if you have other devices Sep 12 17:26:50 yes Sep 12 17:26:57 and i hate to say it but if writing an inline anonymous class as a functino parameter seems hard and confusing, one needs to step back to some general java education before diving into android development Sep 12 17:27:11 can't think of other things of the top of my head, sorry... gotta go make food :) -> Sep 12 17:27:19 cause that is one of the easier parts of it Sep 12 17:27:22 okay, thanks plilq Sep 12 17:28:00 Poesghost u might try, oh what's it called, dmesg?? (sorry heh) to see if the system is recognizing the usb device at all Sep 12 17:28:45 dmesg | grep usb or something maybe Sep 12 17:29:18 okay thanks, speakingcode Sep 12 17:32:00 it's not showing up, back to the drawing board. Sep 12 17:32:25 I'll sort it out. Can't be anything too complex. The other testing devices were easy to get working. Sep 12 17:37:13 yeah. might even try rebooting with it plugged in Sep 12 17:37:24 i dunno what distro you're on but sometimes that seems to work with some devices for me Sep 12 17:42:15 Arch Sep 12 17:42:37 when I get home I'll try it on another workstation running Ubuntu Sep 12 17:42:55 I have two buttons both aligned left to the parent relative layout. button1 is hidden under button2. How can switch them in depth? Sep 12 17:43:10 switch them in depth? Sep 12 17:43:21 napster you mean you want under the other? Sep 12 17:43:52 one under the other* Sep 12 17:44:36 napster by the order in wich they are listed in xml or the order you add them Sep 12 17:44:47 I dont think you can change the z ordering dynamically though Sep 12 17:45:47 yeah z order is set by order listedn in xml, if thats what he means. in that case i would enclose them in a framelayout and list the one on top after the one on bottom, but two buttons like that doesnt make any sense from a usability perspectie Sep 12 17:46:19 unless he's swapping them for some reason? but then why not just use one button and change function/text... Sep 12 17:47:23 ifswapping i would sit one hidden, then the other, but yeah that seems weird anyway Sep 12 17:47:41 heh Sep 12 17:47:49 thanks for clarifying!!!!! ughghgher;kerjkjhkjk Sep 12 17:48:10 hehe\ Sep 12 17:48:14 evening Sep 12 17:48:18 You know what would make the greatest app? Sep 12 17:48:29 An app that comes up with new apps! Sep 12 17:49:31 *app ideas, I mean. Sep 12 17:50:36 Idk everytime I mention this is what i do with my free time the rest of the conversation inevitably becomes dominated by the proposition... "(to measure the temperature of your coffee so you don't burn yourself) that would make a great app!" Sep 12 17:50:37 "fart soundboard. 3d fart soundboard. user-content fart soundboard. " Sep 12 17:50:46 I'm sorry that I got disconnected, did anyone answered to my question when I was away? Sep 12 17:50:56 napster, what do you mean by change in depth? Sep 12 17:51:05 we speculated but would like some clarification Sep 12 17:51:19 speakingcode: I want button1 on top of button2 Sep 12 17:51:31 why? Sep 12 17:51:43 that seems like a horrible usability idea Sep 12 17:52:27 the short answer is that the z-order is determined by which the views are added in code or by the order of how they are listed in xml, I do not believe you can use some function to swap z-orders on the views themselves Sep 12 17:52:29 but, you could enclose the two buttons in a framelayout. list the one you want on the bottom first in the xml, then list the one you want on top. obviously it will have to be slightly smaller , use padding to align it how you want Sep 12 17:52:31 speakingcode: not exactly, I was trying to simplify the question. Actually one view is a spinner and the other is progressbar. Sep 12 17:53:18 ohhh. well in that case they aren't buttons so i misunderstood your question Sep 12 17:53:41 Hey gang, in an OnItemClickListener(), it gives you the view arg. In my case, it's a list row. If I have a textfield in that list row, how to i get the text from it? Sep 12 17:53:50 speakingcode: ok, so in the XML the one I list first, goes on top, right? Sep 12 17:53:54 faking: view.findviewbyid Sep 12 17:54:03 use the view from the param args Sep 12 17:54:07 ^^ Sep 12 17:54:08 i thought i'd do view.findByViewId(R.id.my_textfield).getText() Sep 12 17:54:12 lasserix: ^^ Sep 12 17:54:16 napsterno the one you list first goes on bottom Sep 12 17:54:26 Yeah that should work, at least that's why I do Sep 12 17:54:29 *what Sep 12 17:54:51 speakingcode: ok, may be I should play a bit with it. let me experiment. Thanks a lot. Sep 12 17:55:03 np Sep 12 17:55:29 lasserix: it's not giving me .getText() as a method to call on it Sep 12 17:55:57 are you casting it? Sep 12 17:56:02 i'm logging out the textview toString() and it's saying android.widget.TextView, so it's got the right thing there Sep 12 17:56:25 mListItemClickSourceTextView = (TextView) view.findViewById(R.id.tv_row_text); String text = mListItemClickSourceTextView.getText().toString(); Sep 12 17:56:33 lasserix: this is what I got right now: view.findViewById(R.id.discussion_index_row_title) Sep 12 17:56:37 no... not that Sep 12 17:56:48 Toast.makeText( Sep 12 17:56:48 DiscussionIndexActivity.this, Sep 12 17:56:49 view.findViewById(R.id.discussion_index_row_title), Toast.LENGTH_LONG).show(); Sep 12 17:56:57 That (sorry for the wrap / code paste) Sep 12 17:57:23 i obvously need to add something to the end of that textview in the 2nd param Sep 12 17:57:26 Yeah Sep 12 17:57:28 but .getText() isn't there Sep 12 17:57:37 then you should cast it Sep 12 17:57:38 Try casting it first? Sep 12 17:58:20 if i drop (TextView) before it, still doesn't give me the .getText() method Sep 12 17:58:48 Try getting the text before the toast, just to see if it is still hustling you? Sep 12 17:58:56 put extra brackets around it Sep 12 17:59:07 and then call getText() Sep 12 17:59:13 ++snuffel's solution Sep 12 17:59:23 lasserix: same deal Sep 12 17:59:26 this is turining into a java class Sep 12 17:59:46 Umm maybe post your OnItemSelected code up? Sep 12 17:59:47 ((TextView)blabla).getText() Sep 12 17:59:53 Snuffel: that did it, thanks! Sep 12 17:59:57 lasserix++ Sep 12 18:00:00 Snuffel++ Sep 12 18:00:04 not sure if this room does karma Sep 12 18:00:12 hehe Sep 12 18:00:47 karmirc irc client now with karma! Sep 12 18:04:04 I need to include sub-pictures inside a picture at specific position offsets. Since the first picture's size change depending on the screen, I also need subpictures size and position offset change depending on the parent. What would be the best way to do this? Using getwidth and such returns the width of the ImageView, never the actual image width Sep 12 18:06:35 BAHAHAHAHA Emperor Palpatine ‏@LordPalpatine - Introducing the new Death Star - Now a bit taller. Sep 12 18:07:21 storm troopers will love it Sep 12 18:08:43 i'm gonna call apple fanboys stormtroopers now on. nice g00s Sep 12 18:09:24 but it is cool the new ipod touch has gps Sep 12 18:09:49 i would just get that + skype and call it a day Sep 12 18:12:01 its usually best to wait a few days for everything to settle, then read a recap of the apple stuff :) Sep 12 18:12:38 jellybean/galaxy nexus seems days ahead of iphone5 Sep 12 18:13:23 didn't really pay much attention but i'm not hearing any "wow" reports Sep 12 18:14:38 ios is getting kinda boring looking; its looks the same as it did when it came out (to me anyhow). another reason why i'm pretty excited ms did something very different and took risks. i'm also glad that android has moved away from skeuomorphic design; its nice and clean in that way except maybe for launcher icons Sep 12 18:15:20 The only risk MS took is being 5 years behind everyone else as usual. Sep 12 18:15:39 and apparently it still isn't done Sep 12 18:16:13 apple used to focus on their software now it's all about the physical gadget? Sep 12 18:16:15 Having tried Win8, I'm just not too convinced that what they did is 'different' in any appreciable sense. Sep 12 18:16:33 lasserix: Err, Apple has basically always focused on the whole experience Sep 12 18:16:37 lasserix: I'm running Arch and have a nexus s, but did not need anything special or even a reboot, but tell me how it works out Sep 12 18:17:05 Hodapp goto point Sep 12 18:17:07 lasserix: well they do sell physical gadgets at great profit :P as opposed to amazon, which more or less sells service Sep 12 18:17:09 plilq I have no idea Sep 12 18:17:36 *Hodapp good point i mean Sep 12 18:18:07 Once a new hardware is established then it becomes about software? Sep 12 18:18:34 I mean how are you really going to improve on the physical device itself (of a tablet) besides making it sleeker, crisper, more memory Sep 12 18:19:37 lasserix: It's more like, "Once you have customers, keep them customers." Sep 12 18:19:43 more sensors Sep 12 18:19:47 lasserix: There's not much value in trying to say it's 'about' hardware or 'about' software. Sep 12 18:20:29 mutable touch screen (there is existing technology for tactile buttons that "grow" on demand on touch screens and morph away when done), resizable mutable screens (there's tech for that too) Sep 12 18:20:41 Hodapp yeah i guess I was just being optimistic for the sake of technology not a company per say Sep 12 18:22:09 speakingcode although that sounds cool growing and shrinking buttons might be more of a gimmiky nuisance > Sep 12 18:22:24 anyways i gota go hustle some chess see you folks later Sep 12 18:22:28 One could argue that smartphones themselves are basically gimicky nuisances. Sep 12 18:23:24 you could argue the same thing about all computers with the advent of facebook ;p Sep 12 18:23:43 Bump: http://stackoverflow.com/questions/12379423/how-to-tell-location-of-status-bar Sep 12 18:24:00 But being able to learn how to speak a different language via a device that fits into my pocket, that's not so gimmicky anyways great points Hodapp Sep 12 18:24:00 Hodappapparently i' not seeing your messages.. Sep 12 18:24:10 I'm totally stumped on how to find the location of the status bar. On some tablets it's on the top, and on some tablets it's not. I was looking for a general solution, but I haven't been able to figure one out so far. Sep 12 18:24:21 speakingcode: Probably because you ignore me the other day after you threw a tantrum, doofus. Sep 12 18:24:22 09-12 11:20:52.380: D/SlidingMenu(1007): Window Top: 0, 0, 0, 0 Sep 12 18:24:23 09-12 11:20:52.380: D/SlidingMenu(1007): Decor View Dimensions0 0 800 1216 Sep 12 18:24:52 ^ Those are what i've gotten from my view outputs which doesn't seem to be helping because _at least one_ of the views should have accounted for the height of the status bar. Sep 12 18:29:14 hmm. participate in amazons free-app-of-the-day: yay or nay? Sep 12 18:29:32 i've just gotten an invitation. Sep 12 18:29:38 why not Sep 12 18:29:46 it's free. you don't _have_ to use it Sep 12 18:30:04 well, i'd be giving away 150k copies of my game for free Sep 12 18:30:22 ohhhh Sep 12 18:30:24 RobinB: i remeber reading some bad experiences about that Sep 12 18:30:27 i thought you meant as a consumer Sep 12 18:30:35 speakingcode: yeah, no, the other way round :) Sep 12 18:30:36 what are the daily figures? do 150k people actually download the app usually? Sep 12 18:30:44 yeah, i think that's realistic Sep 12 18:30:50 could be a huge promo opportunity Sep 12 18:31:00 actually, my game was featured before - and back then it was around 95k Sep 12 18:31:10 do you have in app purchases or can you put an add supported free version out or something Sep 12 18:31:11 yeah, I think those are not the 150k who would find it and buy it Sep 12 18:31:15 RobinB, Sharing is good Sep 12 18:31:20 but if it get's any attention for your game, it's good Sep 12 18:31:20 i got some revenue because people downloaded it just after midnight - thus paying for it :D Sep 12 18:31:24 I forgot to add, this is my attempt so far: https://gist.github.com/3708896 Sep 12 18:31:44 plilq: yeah, i tend to agree Sep 12 18:32:34 yeah. if you do it, strategize how you can get conversions out of it Sep 12 18:32:36 RobinB: what are your monthly downloads like without promos? how big of a boost in visibility would this be? Sep 12 18:33:04 it wouldn't be bad. on amazon it's kinda low, maybe 10 sales a week Sep 12 18:33:07 speakingcode: if they don't tell their friends or people who saw it in the promo don't return later, maybe at least someone will buy a sequel or something :p Sep 12 18:33:16 on play it's about 50/day Sep 12 18:33:18 RobinB: I say go for it then Sep 12 18:33:41 yeah. maybe i should upload a bugfixed version first :D Sep 12 18:33:43 either ad revenue, a promo offer, time-lock it or reduce it to so many levels, at the very least be like "find more at..." Sep 12 18:34:21 speakingcode: ad revenue is a given, but I don't think amazon would look kindly on him switching the featured item to a limited one during the promo Sep 12 18:34:28 limited in features I mean, like a demo Sep 12 18:34:56 yea ultimately it all depends on their expectations terms and conditions, and the time you have to submit Sep 12 18:35:17 nah, they specifically asked for the "full" version, i got a demo Sep 12 18:35:26 i'd say do it though. that big exposure in one day is worth more than the "lost" revenue you probably wouldn't get anyway Sep 12 18:35:34 agreed Sep 12 18:35:35 yep Sep 12 18:35:49 cool, thanks for reinforcing my gut feeling guys :D Sep 12 18:36:04 oh that was your gut feeling? don't do it it's a horrible idea!!!! ;-p Sep 12 18:36:07 or starting your slow doom >:) Sep 12 18:36:16 eheh Sep 12 18:37:35 hwrd|work, The root view has the layout properties mLeft, ... -- Where your app is not, the statusbar should be Sep 12 18:38:01 joel135: root view… hmmm… i'll try out Sep 12 18:38:56 hwrd|work, I'm not sure what I mean by "root view" to be honest :P But it's the third from the left as seen in "hierarchyviewer" Sep 12 18:39:33 joel135: I don't think the status bar lives in DecorView though, so I'm unsure about how to proceed. Sep 12 18:41:21 joel135: I'll play around with the ChildCount and see if I can get anything useful. Sep 12 18:43:28 Or I may just at +100 rep to that SO question tomrorow Sep 12 18:45:53 hwrd|work: did you get a solution yet? Sep 12 18:46:02 f2prateek_: No :-( Sep 12 18:47:10 could you measure the view height, and make an assumption based on that? Sep 12 18:47:24 since status bar or combined bar have fixed height on all devices right? Sep 12 18:49:02 f2prateek_: joel135 : I don't think so. Sep 12 18:49:13 Apparently hackbod says there is no way: https://groups.google.com/d/msg/android-developers/E0qiNhMjFh0/J3Ckmp9uU6EJ Sep 12 18:49:30 But, then again, that's what she usually says when you do something undocumented. Sep 12 18:49:59 there should be though right? how does the platform decide which device gets the bar? Sep 12 18:51:23 f2prateek_: I agree -- there should be. I'm going to try and find out how deep I can go with DecorView's parents. Sep 12 18:51:27 Do any of you first plan how the app would work, or you just code something initially and then move the code around to make it do more? Sep 12 18:52:16 f2prateek_: er, not that far. DecorView's parent is null. Sep 12 18:52:38 diki: I do some basic design on paper. Then I try to mimic that in the app Sep 12 18:52:50 hwrd|work: i would try to figure out how the platform decides which device gets split bars and which device gets a combined status bar, and then just mimic that to determine the status Sep 12 18:53:20 f2prateek_: Great idea. Going to dive into the source. Sep 12 18:53:48 f2prateek, What is a combined status bar? Sep 12 18:53:58 the one on lrge tablets, at the bottom Sep 12 18:54:01 *large Sep 12 18:54:18 ok Sep 12 18:54:46 hwrd|work: lso i would look at how hybrid ROMs work, obviously something like parandroid changes something that allows combined bars on gnex, so one of those identifiers is something you might be looking for Sep 12 18:54:48 Some tablets have a notification bar at top, some tablets don't. Don't know how to tell between the two. Figure the status bar is the correct way. Sep 12 18:54:50 *also Sep 12 18:55:56 hwrd|work, Why do you need to know where the status bar is anyway? Sep 12 18:57:07 joel135: I'm making a SlidingMenu that slides ActionBar. However, sometimes my menu gets obscured by the status bar unless I offset it correctly. On tablets, the status bar is **usually** at the bottom, but when it's at the top I need to know to offset my menu view. Sep 12 18:57:42 hwrd|work: something like the sliding menu drawer in google plus/spotify? Sep 12 18:58:02 SimonVT has a library that does that on github Sep 12 18:58:24 f2prateek_: Ye. Sep 12 18:58:27 *yes Sep 12 18:58:38 SimonVT could be to the rescue today... Sep 12 18:58:53 http://bit.ly/Pcn20J Sep 12 19:03:17 joel:I did not mean layouts, but code. Sep 12 19:07:40 So, I'm noticing something strange. On Nexus 7, I'm getting weird results when trying to use a BroadcastReceiver to determine the bluetooth headset state. Sep 12 19:08:07 When the bluetooth headset CONNECTS, my ACTION_CONNECTION_STATE_CHANGED receiver will get a Connecting, and then a Disconnected broadcast. Sep 12 19:08:16 I will get NO broadcasts when my headset actually DISCONNECTS. Sep 12 19:08:39 This is happening for both BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED and BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED Sep 12 19:08:58 shit, i wonder if that happens on rfcomm also Sep 12 19:09:07 i dont have one to test on Sep 12 19:09:16 still waiting for the emu to get BT support Sep 12 19:09:26 bleh Sep 12 19:11:22 just sat in the most useless and pointless webinar about HTML5 vs Hybrid vs Native app development and enterprise mobile strategy... when are these people gonna learn throwing buzzwords around along with the same high level points like "embrace change" and "support multiple platforms and devices" is not a strategy Sep 12 19:11:59 probably when you learn that webinars are universally wastes of time for developers Sep 12 19:12:07 what about tools? frameworks? code management? cross platform solutions? etc etc Sep 12 19:12:42 yeah, they are. coems with the territory working for a big enterprise. so much time, resource and money wasted in this garbage Sep 12 19:12:56 well, to be totally fair, you're not really the target audience. Sep 12 19:13:19 probably for the enterprise architects Sep 12 19:13:31 who have to determine mobile strategy, etc Sep 12 19:13:40 well this was setup by a corporate partnet and they specifically set it up for my team (mobile development) Sep 12 19:13:47 partner* Sep 12 19:14:22 oh. Sep 12 19:14:29 well, that's unfortunate. Sep 12 19:14:48 and the title was "HTML5 vs Native vs Hybrid - Comparing Development Approaches in the Mobile Space" or something Sep 12 19:15:09 yeah Sep 12 19:15:16 guess what: you were a fantastic way to make some money Sep 12 19:15:23 speakingcode: was it written by mikedg ? Sep 12 19:15:27 :D Sep 12 19:15:29 haha Sep 12 19:15:31 you should probably tell your management that this was a waste of time and not to use those partners anymore Sep 12 19:16:04 was free i guess (well, i'm sure theres millions of dollars exchanging within the whole partnership between us and them, but this didn't have a driect cost, other than time wasted) Sep 12 19:17:15 haha yeah i will. and he will tell his boss, who will tell his, and up afew levels maybe it will reach a vp who has a 7+figure argument of why we should keep that partner ;-) Sep 12 19:18:25 but, i digress. comes with the territory. i can only assume though that this webinar is repeated for a lot of their partnets, and you would _think_ that they would have at least one actual developer review this stuff before they start this campaign Sep 12 19:19:02 "we're gonna be doing this with several groups over the next few months. is it a complete trash waste of their time?" ya know, sanity check Sep 12 19:19:17 ok. Sep 12 19:26:34 Can someone help me display an array in a ListFragment? Sep 12 19:28:00 Anyone? Sep 12 19:32:02 Come on anyone? This chat is dead :( Sep 12 19:32:26 Snwspeckle: https://github.com/JakeWharton/ActionBarSherlock/blob/master/samples/fragments/src/com/actionbarsherlock/sample/fragments/FragmentListArraySupport.java Sep 12 19:32:37 theres one in the apidemos as well Sep 12 19:32:42 under fragments Sep 12 19:33:09 I have looked over that but I am using a custom library Sep 12 19:33:16 that is doing it differently Sep 12 19:33:50 to display an array in a list fragment, create an adapter that takes in your array in the constructor with a context and then creates the appropriate views Sep 12 19:34:17 you're connecting too many things at once Sep 12 19:34:18 y Sep 12 19:34:28 you should be looking how to create an adapter for an array Sep 12 19:34:33 I am using the SlidingView library if your familiar with it Jake Sep 12 19:34:41 there's a million of them Sep 12 19:34:58 and i'm not familiar with it, because I abhor the pattern Sep 12 19:35:01 He directly supports ABS, one second Sep 12 19:35:14 https://github.com/jfeinstein10/SlidingMenu Sep 12 19:35:30 all of those things are orthogonal to your goal Sep 12 19:35:59 There is no easy way though to integrate the pull view navigation Sep 12 19:38:29 i'm not seeing how that has anything to do with creating an adapter backed by an array Sep 12 19:39:20 Thee's also an example in github for that specific project Sep 12 19:39:35 it shouldnt be different from anything else though Sep 12 19:40:59 f2prateek, I am basing my current app on the SampleListFragment but two problems I have right now is that the ArrayAdapter is created in another method and the list generated is displaying in both the pulled out view and the default starting view Sep 12 19:41:31 if it's created in another method, assign it to a variable with higher scope Sep 12 19:41:41 or pass it along Sep 12 19:44:00 seems like you would want it assigned to a member tho, so you can make calls on it like notifyDataSetChanged() etc Sep 12 19:45:08 Yea similar, this code, String[] sidearms = new String[] { "G17", "M9", "M9 SD", "Makarov PM", "PDW", "M1911", "Revolver"}; ----- How would I iterate through this array to display it in a new row? Sep 12 19:45:17 for (String sidearms : sidearms) ? Sep 12 19:45:19 create an adapter Sep 12 19:45:41 Making some kind of DayZ App? Sep 12 19:45:54 This is my adapter: adapter.add(new SampleItem(sidearms, android.R.drawable.btn_star)); ---- And yes Knossos Sep 12 19:46:08 Nice catch on ;) Sep 12 19:46:12 Cool Sep 12 19:48:17 in a for loop you can't name your item variable the same as yoru collection Sep 12 19:48:36 of course not; they're both in scope Sep 12 19:48:53 well he has String sidearms : sidearms Sep 12 19:49:03 Then rename one of them Sep 12 19:49:05 right right Sep 12 19:49:12 Ah Sep 12 19:49:17 i was just chiming in Sep 12 19:49:22 speakingcode != Snwspeckle Sep 12 19:49:33 for (String s : sidearms) .... Sep 12 19:49:35 e.g. Sep 12 19:49:38 Snwspeckle_ you can't name your item var the same as your collection in the for eeach loop Sep 12 19:50:13 do... for (String sidearm : sidearms) or String s : sidearms are @ctate mentioned Sep 12 19:50:59 there we go Sep 12 19:51:04 I keep getting kicked -.- Sep 12 19:51:14 But I saw your comments and I fixed it Sep 12 19:51:39 Thank you, what would I do without you guys lol. Now I gotta work on SQLite support Sep 12 19:51:41 cool Sep 12 19:52:12 f2prateek is bugged to, it wouldnt disconnect his null Sep 12 19:52:19 Admin kick his null for him Sep 12 19:53:04 haha kick his null for him. sounds funny Sep 12 19:53:15 what's the nick of the one to kick? f2prateek? Sep 12 19:53:26 speakingcode: If your looking at that library for the slidingview, any idea how to seperate the listfragment displayed in the default view and the pulled out view? Sep 12 19:53:38 actually won't help; i can kick him from the channel but not disconnect that user Sep 12 19:53:51 Thats what ghosting is for Sep 12 19:53:55 heys sorry, not looking. kinda busy at work but i'll see if i can jump away in a minute Sep 12 19:53:56 you can get rid of ghosts through nickserv Sep 12 19:54:01 This server supports ghost doesnt it? Sep 12 19:54:11 maybe; ask nickserv for help Sep 12 19:54:14 OH you can Sep 12 19:54:16 ok cool Sep 12 19:58:39 How can I get the size of a the bitmap image loaded inside an ImageView? Sep 12 19:59:18 What I mean is, not the size of the drawable but the size it uses when loaded inside the ImageView. Since it's set to fill it, theres space on top. Sep 12 19:59:19 dimensions? Sep 12 19:59:46 hmm Sep 12 19:59:52 Like { | this is image | } Sep 12 20:00:10 theres space on left and right .. so getting the size of the image view doesnt return what i want Sep 12 20:00:27 and getDrawable returns the size before any resizing so not it either Sep 12 20:00:59 Views have padding Sep 12 20:01:55 ctate: so just the getXXXPaddingOffset() would return that? Sep 12 20:03:02 Anyone got the SlidingView library open? Sep 12 20:03:50 f2prateek just do the nickserv to overrule the ghost Sep 12 20:07:13 hello all Sep 12 20:07:19 hello you Sep 12 20:08:34 Why cant I convert from ListViewFragmen to Fragment? Sep 12 20:08:55 Activites: A and B. starting A next B need to start A again without B destroying but with destroing A Sep 12 20:09:19 from stack Activities Sep 12 20:09:31 how to do that? Sep 12 20:18:26 I am creating a preferences screen(on gingerbread, so no fragments)... but it doesnt seem to save/show what I had entered do I need to getDefaultSharedPreferences and populate the values in the layout? Sep 12 20:19:34 if I don't leave the preferences screen then it stays in there, but if I go back to my main screen via the back button, and go back to the preferences screen, the values are blank Sep 12 20:22:44 what differents in Serializable and Parcelable? Sep 12 20:22:47 Gahh another issue with ListFragments, great.... Sep 12 20:23:17 Serializable is a generic Java facility for marshalling generic objects to an externalizable cross-platform format Sep 12 20:23:52 Parcelable is a fast, lightweight Android facility for marshalling Parcelable objects for passage through Binder RPCs Sep 12 20:24:06 Parcelable is not externalizable nor is it cross-platform Sep 12 20:24:20 OTOH it is fast and lightweight; Serializable is neither Sep 12 20:24:36 ...that's a really good answer Sep 12 20:24:57 @ctate: Any idea why I would get this error thrown, Type mismatch: cannot convert from NavigationListFragment to ListFragment? Sep 12 20:25:12 Snwspeckle: it seems pretty self evident. Sep 12 20:25:29 lov: How? Sep 12 20:25:32 Does NavigationListFragment extend ListFragment? Sep 12 20:25:35 (Check!) Sep 12 20:25:39 yes Sep 12 20:25:49 .... nevermind! Sep 12 20:26:02 Lol, thats why I am confffused Sep 12 20:26:24 ctate better way for incapsulating class data container in intent its Serializable? Sep 12 20:26:45 fixed it, I was using the wrong support import Sep 12 20:27:09 and Parcelable more best for the network? Sep 12 20:28:45 bingels: as a general rule in Android Sep 12 20:28:51 never, ever use Serializable. Ever. Sep 12 20:29:28 (the whole Serializable infrastructure is widely viewed as a big pile of crap, and that's *outside* the Android world) Sep 12 20:29:58 this is a serious statement Sep 12 20:30:36 ctate is a serious person Sep 12 20:30:46 how can store ex. HashMap on my sdcard? Sep 12 20:30:50 aha! Sep 12 20:30:51 save Sep 12 20:31:03 Serialization ca Sep 12 20:31:04 if you are externalizing data, then using Parcel / Parcelable is not appropriate Sep 12 20:31:08 *can do this Sep 12 20:31:14 i did say so earlier :) Sep 12 20:31:18 exist some external camera for samsung? Sep 12 20:32:05 you mean Serializable is not that correct for using? Sep 12 20:32:16 via Intents Sep 12 20:32:20 correct Sep 12 20:32:51 like i said: as a general guideline, when working withe Android framework, never use Serializable Sep 12 20:33:26 except in cases like writing to external storage, where you need guarantees about the forward compatibility of the data format Sep 12 20:34:04 personally, for the limited number of kinds of objects that i ever need to store on disk, i write my own marshalling code in a known format Sep 12 20:34:19 it still winds up being less code size and MUCH faster than using Serializable Sep 12 20:34:43 if you have to work with externalizing complex data, then I imagine Serializable is a win Sep 12 20:37:48 dang, IntelliJ 12 even also has a GUI builder Sep 12 20:37:53 and I was impressed by 11 Sep 12 20:37:57 Hey guys, im getting "java.lang.String cannot be cast to org.json.JSONObject" when i do (JSONObject) jsonAPIResponse.get("discussion"). I see the JSON getting returned back from the server, there's definately a "discussion" key in there Sep 12 20:37:59 coming from Eclipse Sep 12 20:38:09 but it is easier with Serializable Sep 12 20:38:30 Parcelable always need implements his methods Sep 12 20:41:56 Quick questions, I want to make my navigation menu have some Preferance Categories but how do I add the different sections into those categories? Sep 12 20:45:31 Activities: A and B. starting A next B need to start A again without B destroying but with destroing A from stack Activities Sep 12 20:45:55 what flags need add to Intent? Sep 12 20:46:48 brought last A to front Sep 12 21:02:35 wait a minute; the new iPod nano looks like a nokia lumia! those fuckers ! Sep 12 21:03:15 so, when i want to call from C > Java, and I'm on a different thread to main UI, I need to AttachCurrentTHread(), then DetachCurrentTHread(), that right? Sep 12 21:06:56 g00s: yeah i noticed that Sep 12 21:08:47 g00s: http://ww4.sinaimg.cn/large/538cd592gw1dvbjxxsnw2j.jpg :) Sep 12 21:10:35 hm, ok . found another picture http://i.imgur.com/6tPJ3.jpg Sep 12 21:12:52 bingles, use startActivityForResult? Sep 12 21:13:38 no Sep 12 21:13:38 it will keep B alive and destroy A when it's finished Sep 12 21:13:51 then I'm not sure what you're asking? Sep 12 21:13:54 anyone know much about calling C > Java, across threads? Sep 12 21:13:56 cant using startActivity Sep 12 21:14:03 only simple startActivity Sep 12 21:14:18 need to destroy A activity Sep 12 21:14:19 what are you trying to do? I'm confused Sep 12 21:14:22 then call finish Sep 12 21:14:32 now B on front Sep 12 21:14:46 in B calling startActivity new A activity Sep 12 21:15:25 but when return to B and press no need A activity Sep 12 21:16:11 cant finish Sep 12 21:16:19 call Sep 12 21:16:26 arch, i'll try again later.... Sep 12 21:16:42 so B is in front, you start A from B and you need to destroy A? your sentences are all messed up man, I can't tell what you're trying to do Sep 12 21:16:54 "anyone know much about calling C > Java, across threads?" ? Sep 12 21:17:13 C? Sep 12 21:17:17 omg.. Sep 12 21:17:20 C language? Sep 12 21:17:28 MrQwak: well, your JNIEnv* is thread local, which poses some problems Sep 12 21:18:05 I'm getting JNIEnv from JavaVM Sep 12 21:18:14 g_JVM->AttachCurrentThread(&env,0); Sep 12 21:18:18 remove from activites stack identical activity Sep 12 21:18:31 you have to call finish() Sep 12 21:18:35 bingles Sep 12 21:18:42 omg Sep 12 21:18:53 later i was using g_JVM->DetachCurrentThread(); Sep 12 21:19:12 it turns out the detach was causing problems Sep 12 21:19:23 A again Activity can start from Notification Pending Activity Sep 12 21:19:39 ok, if you select no then call finish Sep 12 21:19:42 when A -> B -> Notification Pending Activity starts Activity Sep 12 21:19:50 * Notification Pending Activity starts A Activity Sep 12 21:20:03 Hodapp I only have one thread (that isn't the main UI thread), can i just attach it once, then not detach it at all? Sep 12 21:20:20 which do you want to destroy? Sep 12 21:20:21 I am buying a Galaxy S3 for work... I wonder if it'll make any difference if I get the international version or not Sep 12 21:20:24 is that safe? Sep 12 21:20:26 first A Sep 12 21:20:27 given that it will likely be used wifi-only Sep 12 21:20:47 when the notification pending activity starts? Sep 12 21:20:51 yes Sep 12 21:20:55 NPA starts activity A again? Sep 12 21:20:59 MrQwak: Your C code runs only in one thread? Sep 12 21:21:05 only one activity Sep 12 21:21:09 Hodapp: in theory it will not Sep 12 21:21:12 yes, pretty much Sep 12 21:21:13 A Sep 12 21:21:20 (not the main UI thread) Sep 12 21:21:37 if A in front refresh or do nothing Sep 12 21:21:59 when do you need to kill the activity and which? Sep 12 21:22:09 MrQwak: then attach from that thread and only do your JNI calls there Sep 12 21:22:25 always when starts A activity Sep 12 21:22:36 kills others A activites Sep 12 21:22:40 automatically Sep 12 21:22:41 when A starts then kill other A's? Sep 12 21:22:47 yes Sep 12 21:22:56 Hodapp Thanks. That is okay then, to keep the thread attached throughout the apps lifetime? No bad side-effects? Sep 12 21:23:12 you keep a reference to it Sep 12 21:23:23 passed along through intents if possible Sep 12 21:23:30 and when you need to kill it call finish Sep 12 21:23:43 A.finish() Sep 12 21:24:01 where i can call A.finish()? Sep 12 21:24:03 MrQwak: once control is back to Java, it doesn't matter. Sep 12 21:24:12 that depends on when you want to finish it Sep 12 21:24:14 in PendingIntent Sep 12 21:24:15 ? Sep 12 21:24:34 MrQwak: you only need to bother with detaching/attaching, as far as I know, when you are calling something in C that requires that JNIEnv* variable. Sep 12 21:25:28 well I would use startActivityForResult Sep 12 21:25:39 then in onActivityResult I would call finish(); Sep 12 21:25:47 I can run two seperate queries with the same cursor correct? Sep 12 21:25:54 but without seeing your code it's really hard to get any idea of what you're trying to do Sep 12 21:26:03 Hodapp Sure, I think it's when my C code is calling back to Java (and it's not on the same thread). Just wondering if it's safe to keep my C thread permanently attached to the main UI thread? Sep 12 21:26:33 All, I just got bounces from the Android-developers google group, citing configuration errors on the Google groups side of things. Has anyone else seen this? Sep 12 21:26:40 omg startActivityForResult and finish() its cr*p Sep 12 21:26:56 sorry but its fact Sep 12 21:27:04 ... Sep 12 21:27:10 well what are you trying to do exactly Sep 12 21:27:20 Intent can have flags FLAG_.... Sep 12 21:27:27 i need code of a crystal clear Sep 12 21:27:35 or a crystal clear explaination Sep 12 21:27:47 but you can pass a string, no? Sep 12 21:28:01 or the integer value of the flag Sep 12 21:28:10 FLAG_… is just an int Sep 12 21:28:42 if i = FLAG_… do something Sep 12 21:28:54 you get i from extras or something Sep 12 21:29:40 MrQwak: it should be fine. Sep 12 21:30:02 MrQwak: I don't think the JVM cares, as long as you're not making cross-thread calls to it without detaching and attaching again. Sep 12 21:30:36 Tricknology its hard way Sep 12 21:30:43 Hodapp, that's what I was thinking, just attach the once, then can make lots of calls in to Java? Sep 12 21:30:44 very hard way Sep 12 21:31:13 I'm going to need to see code or i can't help you. you're asking my to explain something you can do many ways Sep 12 21:34:15 I have not code for an example Sep 12 21:35:35 well I'm sorry :? Sep 12 21:35:46 me too Sep 12 21:36:10 it's the simple things here do not need to complicate Sep 12 21:37:02 maybe this wil lhelp Sep 12 21:37:04 http://stackoverflow.com/questions/2590581/activities-stack Sep 12 21:38:51 grab the activity off the stack and call finish Sep 12 21:39:06 you'll have to do some comparison to see which one to kiill Sep 12 21:39:24 but I have a hunch you're going about it in a very wrong way, and without seeing your code I can't help you further. Sep 12 21:40:17 "call finish" you hit me... Sep 12 21:41:23 how can I get rid of a custom title feature after i've set it? is there a way? Sep 12 21:44:45 ahoy Sep 12 21:45:00 bingels: FLAG_ACTIVITY_REORDER_TO_FRONT might be what you want set on your notification's PendingIntent Sep 12 21:45:04 http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT Sep 12 21:45:20 but I am guessing at what you want, so it might not be :) Sep 12 21:45:27 is it possible to remove a View from a ViewGroup and add it to another? Do I have to take special measures? Sep 12 21:45:38 i didn't find anything in the docs Sep 12 21:46:25 Really quick when using preferences, how do I make it so that when a user clicks a preference, it will start an acitivty? Sep 12 21:49:22 is there a threshold for when one should consider database I/O instead of file I/O in Android? Sep 12 21:49:25 Snwspeckle: http://developer.android.com/guide/topics/ui/settings.html#Intents Sep 12 21:49:50 I want to store some values each day, and make reports out of them Sep 12 21:49:57 bingles ^^ what he said Sep 12 21:50:36 Tricknology who? Sep 12 21:50:49 doc_savage Sep 12 21:51:04 oh i see Sep 12 21:51:05 belgianguy you could go either way but with an internal database you could garuntee consistency? Sep 12 21:51:06 :) now Sep 12 21:51:10 thx Sep 12 21:51:27 FLAG_ACTIVITY_REORDER_TO_FRONT used Sep 12 21:51:49 lasserix: ah yeah, I was leaning towards database, but is there a bigger performance penalty than file I/O? Sep 12 21:51:58 but when returning from A to B and again back A remains Sep 12 21:52:14 are you using the back button? Sep 12 21:52:22 of course Sep 12 21:52:29 that's how android works, no? the activity will remain until you call finish() or the system needs to destroy it Sep 12 21:52:45 belgianguy have not benched it or seen reports, but i imagine its trivial ... current app is calling all kinds of queries and even on my low end tester phone there's no preference issue Sep 12 21:53:03 snwspeckle, what are you pressing? is it a button? Sep 12 21:53:18 Tricknology: I actually have to go now but I will be back later Sep 12 21:53:24 look at onclick Sep 12 21:53:29 A - B -(there need Intent's flag maybe for auto destroyng first A activity and start this Activty -> ) A Sep 12 21:53:31 start activity in your onClick Sep 12 21:53:43 *performance Sep 12 21:54:03 finish() not garantee now calling onDestroy() Sep 12 21:54:06 lasserix: great :) that's what I needed to hear, thanks for the info Sep 12 21:54:18 db it is Sep 12 21:54:36 Once you get to use them they are very convient Sep 12 21:54:58 *get used man do I need a nap Sep 12 21:55:19 call finish after startActivity Sep 12 21:55:22 like here http://stackoverflow.com/questions/2550099/how-to-kill-an-android-activity-when-leaving-it-so-that-it-cannot-be-accessed-fr Sep 12 21:56:08 or look into android:noHistory="true" in your manifest under that activity Sep 12 21:56:28 it will prevent using the back button to navigate to it.. thus "destroying it" Sep 12 21:56:48 but I think you are just confused about the lifecycle of actifities Sep 12 21:57:00 activitie* Sep 12 21:57:04 … whatever Sep 12 22:01:47 ok, first app, http://pastebin.com/y9DmWHVB if someone could tell me a really shouldn't do X, I would appreciate it! Constructive feedback, in other words... Sep 12 22:07:23 haven't been paying attnetion. but hmmm, if you have an action that starts a new activity, say a button click. then you click back on that new activity, then click thebutton again, etc. - does the isntance of the second activity get reused, does it get gc'd, or do instances hang around till the system kills em? Sep 12 22:08:18 speakingcode: my money's on 'new', If I heard your scenario correctly Sep 12 22:08:58 just a general backstack detail i have forgotten Sep 12 22:10:21 "When the user presses the Back button, the current activity is popped from the top of the stack (the activity is destroyed) " Sep 12 22:10:29 easy find Sep 12 22:14:21 Anyone willing to review my simple app, give me constructive criticism? http://pastebin.com/y9DmWHVB Sep 12 22:15:01 qkzoo1978 remove the title bar via manifest Sep 12 22:15:20 looks cleaner on bootup since you don't have a title bar "disappearing" Sep 12 22:15:21 I'm new at android/ Sep 12 22:15:34 yeah I heard you, I was just offering constructive critisicm ;p Sep 12 22:15:59 Thank you :) Sep 12 22:16:31 The handlers looked okay? Sep 12 22:16:38 Handler Sep 12 22:17:03 Yeah, you should check into recycling messages if you pass them often, because if you do they can cause gc pauses Sep 12 22:17:34 i can't remember exactly but i believe instead of instantiating a new message you use obtain() Sep 12 22:18:49 It's been a while too but you can just implement runnable Sep 12 22:19:06 Because of the non-garuntees of the activity life cycle managing threads can be a pain Sep 12 22:19:11 _can be_ Sep 12 22:19:54 I'm absorbing. Didnt I use a runnable? Sep 12 22:20:40 I'm not expert, but you can just your activity implement runnable Sep 12 22:21:07 so instead of instancing a thread you just override run Sep 12 22:23:32 When you said recylce messages, thought after being related to the andler that they were removed, which is why you can make messages sticky, or am i wrong? Sep 12 22:24:44 I'm not totally sure I just know I had problems with messages causes GC pauses but that was when I had a handler sending messages 60/sec Sep 12 22:25:51 * sending 60messages/sec Sep 12 22:26:26 But look into it, doesn't seem like a problem but is better design Sep 12 22:26:28 Thats a lot, lol Sep 12 22:30:03 is there any way to load image from url in android gallery? Sep 12 22:35:13 does android have any tmp dir that you can store something and get wiped after every boot? like /tmp/ Sep 12 22:35:53 what's boot? Sep 12 22:37:19 well looks like it has getCacheDir(). Sep 12 22:43:20 cache dir does not get wiped on boot Sep 12 22:43:25 that's app specific Sep 12 22:43:31 and can persist across boots Sep 12 22:44:37 offhand i can't think of any wiped-at-boot / tmpfs type thing on typical Android devices Sep 12 22:45:13 @ctate, hmm. I'm not gonna use it anyway as I dont really want to add another permission request to the app Sep 12 22:45:54 one think I really dont like about android is not being specific on permissions. it should really at least give a chance to developers to explain Sep 12 22:47:15 sinaa: err, what cache dir are you talking about? Sep 12 22:47:51 basically this is what I wanted to do. I have a webview and want to open images in the actual gallery Sep 12 22:48:01 gallery wont take URLs and it has to be a local url Sep 12 22:48:18 the location returend by Context.getCacheDir() does not require permissions to access Sep 12 22:48:21 so I would have to store it locally before calling gallery Sep 12 22:48:34 yeah but writing to it will require permission, right? Sep 12 22:48:40 no Sep 12 22:48:51 it's just part of your app's ordinary private data file system Sep 12 22:49:01 nobody else can read it, mind you Sep 12 22:49:13 is this the same as getExternalCacheDir() ? Sep 12 22:49:20 permission wise Sep 12 22:49:22 no Sep 12 22:49:57 so for the sd card, I would need a permission? Sep 12 22:50:00 getExternalCacheDir() is, as described, a location in *external* storage, i.e. on SD card or equivalent, and is world read/writeable Sep 12 22:50:21 and to access that location your app does indeed need to declare the appropriate READ or WRITE_EXTERNAL_STORAGE permission Sep 12 22:50:34 but it's a different location with different semantics Sep 12 22:51:10 I'm processing a couple of images with async task. the docs say it should be used for short operations (couple of seconds at most). Why is that? Sep 12 22:51:14 yeah. I wont be working on getCacheDir and actually need ExternalCacheDir. as the app is a social network kind of thing and dont want to put a massive amount of cache on phone for no reason Sep 12 22:51:36 hi Sep 12 22:52:12 @ctate, thanks for the info on externalcachedir. didnt notice that on the docs. :) Sep 12 22:53:07 f2prateek: because for stuff that runs longer than that, you really need to deal with the possibility of e.g. the user bailling out of your app and back etc while it's running Sep 12 22:53:28 I want to write a file to the storage of the device and use mWriter = new PrintWriter(new FileWriter(new File(getExternalFilesDir(null), "test.txt"))); but I get the exception: /test.txt: open failed: EROFS (Read-only file system) the root directory ("/") shouldn't be returned, should it? I'd like to have the path of the SD card Sep 12 22:53:29 mostly the note is to discourage people from trying to use it as a permanently-running worker thread Sep 12 22:53:32 which it is really not suitable for Sep 12 22:55:29 ctate: thanks Sep 12 22:57:07 ctate: so i'm actually fairly new to threads and the likes. what should i be looking at for operations that will take longer. just a regular thread? Sep 12 23:08:29 neXyon: do you have the WRITE_EXTERNAL_STORAGE permission? have you confirmed getExternalFilesDir(null) is returning "/" and not null and new File(null, "test.txt") isn't assuming "/test.txt" ? Sep 12 23:13:52 doc_savage: thanks, solved it meanwhile :D Sep 12 23:14:11 :) Sep 12 23:14:46 doc_savage: what I really wanted was Environment.getExternalStorageDirectory() - and with that returning the correct path but still not working I noticed the missing permission ;) Sep 12 23:15:54 neXyon: I soon got into the habbit of "why isn't this working? is there a permission missing?" :) Sep 12 23:16:08 doc_savage: ^^ Sep 12 23:16:21 it's interesting that I don't need a permission to read sensor data ^^ Sep 12 23:16:40 What is the best way to pass a callback function? I have an async network task that I would like to call a passed method of an activity once the task is complete. Sep 12 23:22:45 Hello, any parse.com users? Sep 12 23:23:24 is there any way to receive pushes instantly, when i got connection? at this moment, they comes sometimes just after sending them, but sometimes it takes minutes to deliver them Sep 12 23:23:48 it's not server-side problem, because pushes can be seen immediately in parse console. Sep 12 23:23:56 they are just not delivered to phone, sometimes Sep 12 23:26:09 is there an accesible SharedPreferences from the onCreate of a PreferenceActivity? (gingerbread) Sep 12 23:47:36 a preferenceactivity is a subclass of activity Sep 12 23:48:13 so you can use PreferenceManager.getDefaultPreferences(this); or whatever you would normally use to get your preferences Sep 12 23:48:23 getDefaultSharedPreferences() Sep 12 23:48:27 I tried Sep 12 23:48:34 but upon a setSUmmary it crashes Sep 12 23:49:09 how i dislike this romainguy... what is he doing here? Sep 12 23:49:11 getting those shared preferences wont load them into your prefs Sep 12 23:49:26 you need to use addPreferencesFromXml() Sep 12 23:49:40 or loadPreferencesFromXml() i forget the method Sep 12 23:49:58 http://pastebin.ca/2203676 Sep 12 23:50:23 it get's the right value, but I can't set the summary Sep 12 23:50:23 addPreferencesFromResource(R.xml.my_preferences); Sep 12 23:50:36 look at the paste Sep 12 23:50:52 shoot Sep 12 23:50:57 I missed a commented call Sep 12 23:51:20 i was gonna say, thats not doing any setSummary Sep 12 23:51:37 http://pastebin.ca/2203677 Sep 12 23:52:06 maybe prefNickName is null Sep 12 23:52:25 lemme check.. Sep 12 23:53:08 hrmm... why is it null... Sep 12 23:53:13 thanks... Sep 12 23:54:04 an upper that should be a lowercase, heh Sep 12 23:54:38 I think I should use @strings more than public static final's Sep 12 23:55:18 yup, worked, thanks Sep 13 00:10:26 is there any way to design a fancy button on android? (or any existing tutorial pointing to a good design) Sep 13 00:11:24 need help in displaying multiple images with a gallery like widget, without out of memory exception Sep 13 00:11:31 sinaa: http://developer.android.com/tools/help/draw9patch.html Sep 13 00:11:46 gallery is deprecated, so what the alternative? Sep 13 00:12:01 marcab, thats not fancy though... Sep 13 00:12:22 lol Sep 13 00:13:03 sinaa: perhaps you have a technical question? Sep 13 00:13:29 marcab, apparently not many people do much designing here Sep 13 00:15:24 I dont think it would be long before a native html5 view would appear (other than webview) Sep 13 00:20:13 f2prateek: Jic you were wondering: http://stackoverflow.com/questions/12379423/figure-out-whether-status-bar-is-at-top-or-bottom/12397405#12397405 Sep 13 00:21:24 my adb daemon is super flaky about figuring out what devices are attached. even for emulators. has anyone else noticed this? Sep 13 00:21:55 tophyr: Sometimes. But restarting usually does the trick. Sep 13 00:22:49 yeah, restarting it always solves the problem, but i'm trying to set up CI testing and seeing as how adb needs to run as root, the build process can't really reliably kill/restart it Sep 13 00:24:28 what's more frustrating is i don't even know what makes it flake out Sep 13 00:26:03 hwrd|work: Glad you got it working. I'm not too familiar with those specifc methods, but I'll look it up. Sep 13 00:35:31 if I want to add a drawable, should I put it in all 4 drawable folders (different screen density ones) Sep 13 00:35:44 or should I create a separate drawable folder? Sep 13 00:36:08 sinaa: er, what? Sep 13 00:36:43 the default eclipse project comes with 4 drawable folders under /res/ Sep 13 00:37:02 if you're adding just one drawable and it needs to be scaled, put it in drawable/ Sep 13 00:37:03 and yes I know it sounds stupid Sep 13 00:37:11 if you don't want it scaled, put it in drawable-nodpi/ Sep 13 00:37:29 if you have it pre-scaled for the other resolutions, put it in each folder as appropriate Sep 13 00:37:57 evancharlton, cool. thats all I wanted to know :) thanks Sep 13 00:38:54 is it better to put a fragment in the layout file or add itp rogramatically? Sep 13 00:39:10 or well, is there a best practice around that Sep 13 00:45:39 layout file if it's always going to be there, just cus it's easy Sep 13 00:50:27 whos the custom widget guru here/ Sep 13 00:51:22 ah, and just use alternate layout for different screen sizes Sep 13 00:51:52 whats ur question ron_frown ? i'm no guru but i'll try n help if i know anything about it Sep 13 00:52:39 ron_frown: don't take polls - you'll get more help by asking questions Sep 13 00:53:46 http://img716.imageshack.us/img716/7200/drag12.png Sep 13 00:53:50 I built that datagrid Sep 13 00:53:57 now I am looking to re-write to clean it up and optimize Sep 13 00:54:38 I'd like to solicit feedback on how to draw the underlying cells Sep 13 00:54:46 I've tried rendering/caching the views as one view Sep 13 00:55:24 tried having a datarow object which contained datacells hoping that android would optimize drawing of invisible cells Sep 13 00:56:02 I plan on opensourcing the control and would like to know how people would feel the most natural in using it Sep 13 00:56:17 currently I set a dataadapter, and on that adapter I call setData() Sep 13 00:56:29 dataadapter has .getColumnHeader(index) Sep 13 00:56:36 ah, probably a bit beyond me at the moment Sep 13 00:56:42 looks good though, btw Sep 13 00:57:08 thanks Sep 13 00:57:12 it genreally works good Sep 13 00:57:26 I want but I want to build it better from the ground up Sep 13 00:57:28 and get it out there Sep 13 00:57:40 for a drawable, is it necessary to put padding for each direction? or can I just give top and bottom paddings? Sep 13 00:57:53 up to you sinaa Sep 13 00:58:09 you can do padding, padding top, padding bottom, padding left, padding right Sep 13 00:58:12 for example: android:left="integer" android:top="integer" android:right="integer" android:bottom="integer" . is it like css that would add it as default if its missing ? Sep 13 00:58:31 missing = 0 Sep 13 00:58:31 pastebin is ur friend Sep 13 00:58:46 yeah. cool. at least its intuitive here :D Sep 13 00:58:57 padnig = all sides, or do any combination of sides you need Sep 13 00:59:14 well shitballs Sep 13 00:59:20 this has been my problem thusfar =) Sep 13 00:59:35 two birds one stone?? Sep 13 00:59:50 as far as how to optimize the drawing, only person that was really involved in it was romain Sep 13 00:59:57 and i guess hes a super super busy guy =) Sep 13 01:00:13 can someone tell me is there a Navigation api? Sep 13 01:01:20 ron_frown do you have code up? i woudln't mind giving it a peak, one thing is i have not done a lot of android stuff above like 2.3 and even then somewhat limited, so i don't know how much your working with is custom and how much is part of the sdk Sep 13 01:01:29 like the cells and row stuff, etc Sep 13 01:01:41 ADB Y U SO UNRELIABLE Sep 13 01:01:53 tophyr umad? ;-p Sep 13 01:02:01 YARLY Sep 13 01:02:20 I am targeting 2.2+ Sep 13 01:03:01 extending the dataadapter with whatever was necessary to handle drag/drop Sep 13 01:04:12 so theres is no way to use Google Naviation in my apps? Sep 13 01:07:44 There are some things I wish I could do using a Binder from my Service, but actually binding takes too much time and I need to do some things very quickly in onResume of my Activity Sep 13 01:07:49 anybody know the source for these device frames https://github.com/JakeWharton/Android-ViewPagerIndicator (ones not available in Device Frame Generator) Sep 13 01:08:12 it's the device frame generator Sep 13 01:08:19 ask JakeWharton directly? :) Sep 13 01:08:21 [timing] Sep 13 01:08:35 http://android-ui-utils.googlecode.com/hg/asset-studio/dist/device-frames.html Sep 13 01:08:39 even the htc ones? thats not there Sep 13 01:08:45 oh wait it is Sep 13 01:08:48 thanks Sep 13 01:10:29 also if I'm looking for even more ones....any place i could find some? Sep 13 01:11:17 make them yourself? Sep 13 01:11:48 I tried, but I'm horrible at this. Tried making a pebble blue version of the galaxy s3 Sep 13 01:12:51 what is the best input type for usernames? text? Sep 13 01:14:56 jake your animation stuff fixes property animation in pre 3.0, right? if so, is that a jar or library project Sep 13 01:25:24 Hey guys how do I properly add a PreferenceFragment to an Activity because atm I am getting erors Sep 13 01:25:29 errors* Sep 13 01:27:34 preferencefragments are for preferenceactivities Sep 13 01:28:14 So I shouldnt use the fragment version? Sep 13 01:30:40 Not in an activity, no Sep 13 01:33:15 The method addPreferencesFromResource(int) from the type PreferenceActivity is deprecated -- I get that error when using PreferanceActivity...' Sep 13 01:38:47 I can get my prefereance fragment to work tho Sep 13 01:46:45 Can anyone help me with setting up my preference fragment? Sep 13 01:53:48 Can someone help me briefly, pleaaase Sep 13 02:07:21 Come on anyone -.- I am getting a not applicable error. Sep 13 02:08:12 hey guys, any ideas on how i can replace the home button with a custom view in actionbarsherlock? Sep 13 02:08:27 just say your problem Snwspeckle Sep 13 02:09:44 Snwspeckle: look at the api demos Sep 13 02:09:48 there's an example there Sep 13 02:09:53 Why cant I create a transaction with my fragment Sep 13 02:10:02 I have f2, none of the examples code have worked Sep 13 02:10:44 you're probably using it wrong, the samples are defintely correct Sep 13 02:10:55 *definitely Sep 13 02:11:41 I am going word by word, its the same,, Sep 13 02:14:15 if i have an adapter, or well any object, whatis the recommended way to access it from multiple activitieso r fragments? staic singleton? Sep 13 02:14:39 serializing it and passing ni intents wouldn't be ideal as its a pretty large structure, tree with sseveral thousand object Sep 13 02:14:45 objects* Sep 13 02:17:19 i know of extending application class for "globals" but that seems knida yucky Sep 13 02:19:51 http://pastebin.com/EdeJu0VX --- Thats EXACTLY from the API example, I still get an error on replace.... Sep 13 02:21:33 whats the error? Sep 13 02:21:48 The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, NavigationPreferenceFragment) Sep 13 02:22:40 hmm Sep 13 02:22:49 There's no support version of PreferenceFragment Sep 13 02:22:57 it takes a fragment as the 2nd argument Sep 13 02:22:57 You sure Sep 13 02:23:11 And PreferenceActivity manages your PreferenceFragments for you.. You don't have to do this manually Sep 13 02:23:12 either NavPreferenceFragment doesn't extend it, or youre using a supportl ibrary that doesn't have it Sep 13 02:23:32  Sep 13 02:23:33 i thought preference fragment isnt support in the support library Sep 13 02:23:44 *supported Sep 13 02:23:55 I dont extend PreferenceActivity in this activity Sep 13 02:24:06 and there is a support for PreferenceFragment Sep 13 02:24:20 cc Sep 13 02:24:24 oops Sep 13 02:24:26 There isn't Sep 13 02:24:31  Sep 13 02:24:43 ahh something is going on in my termnial Sep 13 02:24:45 import android.support.v4.app.FragmentManager; --- Yes there is mate... Sep 13 02:25:00 For Fragments, yes.. Not PreferenceFragment Sep 13 02:25:05 Snwspeckle: how does that line show support for preferencefragment? Sep 13 02:25:19 PreferenceFragment is only available on api11+ Sep 13 02:26:32 Well if I dont use getSupportFragmentManager, my app breaks.. Sep 13 02:26:39 that was not pleasant Sep 13 02:27:24 support library is to provide comptaibility for some stuff Sep 13 02:27:55 So why cant this transaction work, why am I getting thrown errors Sep 13 02:28:30 because PreferenceFragment isnt in the support library Sep 13 02:28:39 Any way around this? Sep 13 02:28:39 Because the support version expects an android.support.v4.app.Fragment .. PreferenceFragment extends android.app.Fragment Sep 13 02:29:10 Yeah, don't use it Sep 13 02:29:14 does a fragments layout have to have a layout element as its root as activities do? Sep 13 02:29:34 Then how do I call my preferences for my navigation menu? Sep 13 02:30:08 Open up a preferenceactivity Sep 13 02:30:10 use preferenceActivity Sep 13 02:30:21 yes, speakingcode Sep 13 02:30:31 Do I need to do a transaction witht he preferenceactivity? Sep 13 02:30:36 no Sep 13 02:30:37 thank you SimonVT Sep 13 02:30:41 its jsut opening a new activity Sep 13 02:30:43 *just Sep 13 02:30:45 with an intent Sep 13 02:31:34 How do I call that activity then?' Sep 13 02:31:50 with an intent Sep 13 02:32:00 I am just partially confused because of a library I am basing this all on Sep 13 02:32:20 i'm sure it will start an activity the exact same way Sep 13 02:36:34 lets pray it works Sep 13 02:37:21 partially but very flawed Sep 13 02:38:23 with qualifers for screen size, if one is missing what will it default too? for instance, will na xlarge defautl to large if i dont provide an xlarge resource? Sep 13 02:38:32 (for layout) Sep 13 02:38:55 Broke it :( Sep 13 02:39:14 Yes, speakingcode Sep 13 02:39:33 so it defaults to the next closest? Sep 13 02:39:48 Best match Sep 13 02:39:56 thanks SimonVT , you are rockin it tonite! Sep 13 02:40:07 layout-large is a better match than layout for a xlarge screen Sep 13 02:41:48 now i have a little better question... i've got fragments, they are each basically list views, each one level deeper in a tree structure Sep 13 02:42:36 initially nothing is selected for the outermost, so i want the sublevels to default to some "empty" view (in case of tablet when they are visible) Sep 13 02:42:58 Gah my app is totally broke now :( Sep 13 02:42:59 hmm. nm. i can just use the empty view for the listViews Sep 13 02:43:15 Snwspeckle pastebin it Sep 13 02:44:01 Its not that simple, I am using a library that creates a Sliding View similar to Facebook and now I cant view the sliding view Sep 13 02:45:05 slide to refresh? Sep 13 02:45:22 Slide to navigate, like the new YouTube app, spotify' Sep 13 02:45:53 Snwspeckle: is this SimonVT's library? Sep 13 02:46:16 No jfeinstein10 Sep 13 02:47:34 if i'm using a support library to use fragments in 2.x, will the err. will the element cause any issues with building? Sep 13 02:48:32 Nope Sep 13 02:48:45 is that because i'm using a newer build target? Sep 13 02:49:38 or does adding the support library patch up the build system Sep 13 02:49:51 Nah, you can put whatever tag you want Sep 13 02:50:30 sure but for it to be processed into objects by the build, somethnig has to make sense of it Sep 13 02:50:40 just curious how that is implemented Sep 13 02:50:52 It's just a string Sep 13 02:51:21 Unless you put a package, the inflater just checks android.view/android.widget Sep 13 02:51:45 With tags, the activity overrides the inflaters behavior and does it manually Sep 13 02:51:53 ah Sep 13 02:52:13 nifty Sep 13 02:52:33 i guess setContentView is where that gets triggered? Sep 13 02:52:41 You can try and put in your xml.. Pretty sure it'll tell you that it can't find android.[view|widget].Speakingcode Sep 13 02:53:50 setContentView just calls through to Window.setContentView which uses a LayoutInflater (like you would manually) to do the work Sep 13 02:53:50 SimonVT: I am looking over some code and if I dont do a fragment transaction, the library breaks Sep 13 02:53:55 ah, but if i do and that clss exists and extends view, it'll work? Sep 13 02:54:01 I cant use PreferenceActivity... Sep 13 02:54:15 What are you trying to do, Snwspeckle Sep 13 02:54:19 speakingcode: yep Sep 13 02:54:27 nice Sep 13 02:54:45 I am trying to make it so that when the user swipes to the navigation_menu, I will load a PreferenceFragment Sep 13 02:54:55 What if I made the fragment static inside the activity? Sep 13 02:55:05 PreferenceFragment is only available on api11+ Sep 13 02:55:12 SimonVT that just hit me with an astounding thump of revelation ;-) Sep 13 02:55:15 I imagine, since you're using the support library, you support So you can't use preferencefragment Sep 13 02:55:54 So when the nav menu is selected to, I call my PreferenceActivity with a static subclass PreferenceFragment? Sep 13 02:56:18 When you start a preferenceactivity, you're starting a completely new activity.. One that doesn't have a sliding menu Sep 13 02:56:37 the issue isn't that it's static. Sep 13 02:56:41 Gahh this library is notttt easy to work with Sep 13 02:56:58 it's that the class you are trying to use, PreferenceActivity, doesn't exist Sep 13 02:57:06 You seem to be lacking some basic understanding about android and activities Sep 13 02:57:12 say if I enabled scrollbars on a custom views, and added other views to it Sep 13 02:57:31 No its this library, the way it manipulates fragments etc is making it impossible... Sep 13 02:57:34 if I enabled scrollbars on a custom views, and added other views to it Sep 13 02:58:13 If I dont use PreferenceFragment I cant set it to the behindview which I need to do Sep 13 02:58:19 does android automatically handle not drawing views that exist outside the view offscreen due to scrolling Sep 13 02:59:01 not sure ron_frown but i know with listview (or i think anyway) it recycles views so off screen isn't drawn Sep 13 02:59:49 ron_frown: I'd just test it if I was you.. A lot has changed in how android handles this Sep 13 02:59:59 not sure what happens with scrollview. you could probably use that layout view tool to find out **** ENDING LOGGING AT Thu Sep 13 03:00:00 2012