**** BEGIN LOGGING AT Tue Aug 20 02:59:59 2013 Aug 20 03:00:38 JakeWharton: I'd guess you might know.. :) Aug 20 03:02:36 hello to all Aug 20 03:02:51 does anyone know why I cant run more than 2 tests in android junit testing? Aug 20 03:02:56 g00s, why go fullscreen, just go some multiple of your maximum desired with Aug 20 03:03:03 I usually want 80 or 132 columns at most for my code Aug 20 03:03:07 (mostly 80) Aug 20 03:04:24 java requires 400 columns at least Aug 20 03:04:45 i mean, when you have your abstractfactorycreatorofabstractfacorycreators Aug 20 03:05:02 so break it down by whatever means necessary Aug 20 03:05:04 break on . Aug 20 03:05:19 create factories for creating your factories so that you don't have to spell out the rhs Aug 20 03:05:25 hehe Aug 20 03:05:55 or just switch to a language that has type inference Aug 20 03:06:22 how do i make my button red? i tried this and my button is pink. b.getBackground().setColorFilter(new LightingColorFilter(Color.WHITE, Color.RED)); Aug 20 03:07:50 pfn actually, i just had 3 columns with ragel grammars in them. i'm using AS for java Aug 20 03:18:23 Figured out my other problem if anyone cared about it Aug 20 03:48:32 how do I prevent background anr's from killing my app while debugging? Aug 20 03:52:17 there's an option in developer options "Show App Not Responding dialogue for background apps" Aug 20 03:52:46 presumably that lets you wait or something? I've never used it so not sure Aug 20 03:53:09 i thought that only happened if the debugger took too long to connect to the process Aug 20 03:53:41 yeah, I'l,l try checking that again Aug 20 03:55:28 do people implement seperate, optimized REST APIs for mobile apps? When I say "optimized", I mean an API that gives you only as much data as you need and does so in as few round trips as possible. Aug 20 03:57:18 * pfn makes another qicr release Aug 20 03:57:19 ugh Aug 20 03:57:42 awesome, intellij hung Aug 20 03:57:50 pfn are you using the play beta stuff yet ? Aug 20 03:57:54 no Aug 20 03:58:06 nocturne777: yes Aug 20 03:58:54 in particular, it's sometimes beneficial to fetch more data than required for the current stuff Aug 20 03:59:04 because firing up the 3g radio is expensive and slow Aug 20 03:59:22 wabz: then they have to deal with the overhead of maintaning multiple similiar APIs. Aug 20 03:59:29 correct Aug 20 03:59:32 meeting, back later Aug 20 04:01:36 g00s, betas and stuff for pro use, it's all internal QA off jenkins and stuff Aug 20 04:01:44 nocturne777 this maybe relevant. honestly, i haven't heard of mobile-specific versions of a rest api, but i'm not the best on this : http://www.infoq.com/news/2013/02/netflix-api-optimization Aug 20 04:01:45 my own stuff, I don't care about beta Aug 20 04:01:56 k Aug 20 04:02:32 g00s: I think it makes sense. Aug 20 04:03:04 in our web app, we make multiple requests to get the resources we want Aug 20 04:03:18 oh, then you will like the netflix article Aug 20 04:03:27 they talk about how they coalesce those Aug 20 04:03:46 but its not specifically /because/ of mobile Aug 20 04:04:03 but for a mobile app, firing 60 requests to display results may not make sense. Aug 20 04:04:09 g00s, got yourself a non - shitty device yet? Aug 20 04:05:01 pfn no, my laptop battery is dying, trackpad is dead, and now my mouse id going - i need to buy a mouse soon. and my truck is dying. i probably won't have a non shitty device for a while Aug 20 04:05:02 so many awesome qicr changes today Aug 20 04:05:50 yeah, as soon as i get a device i would like to check it out Aug 20 04:06:14 one of the things that pisses me off about textual is that i can't split the window to see multiple channels at the same time Aug 20 04:06:25 hydrairc even let you merge arbitrary channels Aug 20 04:06:30 ok pfn, so i'll give it to you. technically it was a lifecycle problem Aug 20 04:06:40 i was premeturely killing the service Aug 20 04:07:07 i tell you what guys, i have written some sweet code today Aug 20 04:07:24 a service which checks a manifest online, downloads and installs database updates, verifies via a checksum Aug 20 04:07:28 adn this UI Aug 20 04:07:39 https://lh6.googleusercontent.com/-At8uNB8h6T0/UhK_vcBG4YI/AAAAAAAAAjg/cFQVNnomqSE/w483-h859-no/Screenshot_2013-08-19-17-59-41.png Aug 20 04:08:32 https://plus.google.com/111751695436781052143/posts/4BcCCxCb8Q7 Aug 20 04:08:45 I got this done today Aug 20 04:08:52 nice Aug 20 04:09:07 your graphics area alitte fuzzy Aug 20 04:09:15 are they in the correct resolution folder? Aug 20 04:09:57 those are stock android resources Aug 20 04:10:07 from framework Aug 20 04:10:30 oh Aug 20 04:10:49 i recently switched to Android Studio Aug 20 04:11:00 oh my god. I can't tell you how good it feels to have dropped Eclipse Aug 20 04:11:06 I'm no fan of coming up with my own resources Aug 20 04:11:08 even on windows Aug 20 04:11:16 I can't wait for intellij 13 Aug 20 04:11:21 what's new in it? Aug 20 04:11:28 android studio is a waste of time for me Aug 20 04:11:31 do your resources in xml then with shapes Aug 20 04:11:39 all the features of android studio Aug 20 04:12:00 the thing is, before android studio I never bothered hard enough to get my dependencies all set up Aug 20 04:12:00 my resources are in xml for whatever can be Aug 20 04:12:14 there is quite a steep learning curve of dependency management when switching Aug 20 04:12:22 eg my widget buttons rider and background are xml Aug 20 04:12:28 eclipse is actually pretty good about duplicate resources, etc Aug 20 04:12:31 sbt gen-idea Aug 20 04:12:44 is how I generate projects to load in intellij Aug 20 04:12:57 sbt? Aug 20 04:14:10 AS is a dog on my machine; dunno if its just subjectivity on my part (haven't benchmarked anything) Aug 20 04:14:28 maybe the gradle stuff is eating up cpu cycles Aug 20 04:14:58 s Aug 20 04:15:04 b Aug 20 04:15:13 probablylost, sbt => best build s Aug 20 04:15:15 tool Aug 20 04:15:37 gradle doesn't eat cpu unless it's running Aug 20 04:16:35 oh Aug 20 04:19:45 my machine kinda sucks anyhow Aug 20 04:22:59 pfn did you add the javascript scripting stuff ? Aug 20 04:23:14 not yet, no Aug 20 04:23:27 I have too much to keep myself busy with to bother adding scripting right now Aug 20 04:23:45 especially when I don't have users asking for it Aug 20 04:24:05 yeah, i bet its also a support headache Aug 20 04:24:51 if people do start using it, they'll want more stuff exposed, or this to behave differently, or questions about how to do xxx .. Aug 20 04:27:49 yeah, it's ok, by then, I'll have open sourced, and my answer will be to rtfs Aug 20 04:32:59 of course, the source isn't very comprehensible ;-) Aug 20 04:33:35 https://gist.github.com/pfn/6258977 Aug 20 04:33:47 added a shitload of boilerplate for the WidgetChatActivity Aug 20 04:34:17 at least it's re-used by the notification Aug 20 05:15:04 so quiet tonight. Aug 20 05:16:34 morning Aug 20 05:18:09 evening Aug 20 05:18:27 i'd love to know what everyone is working on Aug 20 05:18:38 Hello. Should i use a 'started' or 'bound' service for a media player application? Aug 20 05:21:59 startForeground Aug 20 05:22:29 startForeground has a high priority and won't be killed by android Aug 20 05:22:47 a bound service will be killed when the last activity unbinds, so that's no good Aug 20 05:22:53 +johnq Aug 20 05:28:00 start foreground when the last activity unbinds Aug 20 05:28:41 otherwise you get that stupid. notification while your app is running Aug 20 05:29:55 good. that's supposed to be there Aug 20 05:30:05 i'm so sick of developers abusing startForeground Aug 20 05:30:30 just use it how it's meant to be used. you're going to need a notification anyway for playback extending controls or information Aug 20 05:30:35 and it's unnecessary while you have a foreground. activity running Aug 20 05:30:56 no. service != activity Aug 20 05:31:07 and you don't want to give that impression Aug 20 05:31:17 the abuse has been disabled as of4.3 anyway Aug 20 05:31:46 never conflated them Aug 20 05:32:14 just don't startForeground while you have an activity bound Aug 20 05:32:33 becaus then you'll have a useless notification Aug 20 05:33:13 ok. i'm reading startForeground. But it doesnt answer my question: in a started or a bound service? Aug 20 05:36:57 it's a started service Aug 20 05:37:12 but i disagree. keep it as startForeground Aug 20 05:37:25 you'll be higher priority and will need a notification Aug 20 05:37:50 if you just startService, then android may kill you when it likes. far less chance than with startForeground Aug 20 05:38:03 you're the one application type that should use it without guilt :-) Aug 20 05:38:36 android will never kill you if you have a foreground activity Aug 20 05:38:39 also, return START_STICKY Aug 20 05:38:51 that's not true Aug 20 05:38:54 that depends on what you need Aug 20 05:38:57 and anyway, it may not always be on the background Aug 20 05:39:02 and yes, it's true Aug 20 05:39:15 if your activity has been backgrounded, then yes, android can kill your service whenever it lieks Aug 20 05:39:20 likes^ Aug 20 05:39:30 that's not a foreground activity Aug 20 05:39:38 i'm talking about a foregroundService Aug 20 05:39:47 this has nothing to do with activities Aug 20 05:39:54 Hi all Aug 20 05:40:19 your service will not be killed if you have any foreground activities, period Aug 20 05:40:24 for some reason, while trying to use Volley for my connections, I get a NoSuchFieldException Aug 20 05:40:26 dude Aug 20 05:40:33 in mannagedConn Aug 20 05:40:34 what if your activity is not in the foreground Aug 20 05:40:41 anyone know WTF?! Aug 20 05:40:44 like a music player Aug 20 05:40:51 and start sticky just requests a service restart on kill Aug 20 05:41:19 My activity is a music player. Aug 20 05:41:24 wrong pfn Aug 20 05:41:25 probablylost, no shit, that's why you start foreground when your activity gets backgrounded Aug 20 05:41:29 "So if you use START_ STICKY then the service will not be considered for reclaiming. Aug 20 05:41:29 " Aug 20 05:41:44 it'll still get reclaimed anyway Aug 20 05:41:47 booya Aug 20 05:41:57 all it does is request a restart when it dies Aug 20 05:42:02 much less likely to Aug 20 05:42:06 no it doesn't dude Aug 20 05:42:08 that's from the docs Aug 20 05:43:30 actually you may be right pfn on the start_sticky Aug 20 05:43:52 but for sure, android is categorically more likely to kill services under low memory not started with startForeground Aug 20 05:44:00 of course I'm right Aug 20 05:44:10 It says that all over the services documentation page Aug 20 05:44:30 it cannot and will not kill services that are running in the same process with a foreground activity Aug 20 05:44:33 period Aug 20 05:44:43 what are you talking about a foreground activity for? Aug 20 05:44:44 really? Aug 20 05:45:08 pretend there is one activity and it was onDestroyed or something Aug 20 05:45:17 or it has gone through the lifecycle in the background Aug 20 05:45:18 because half the time, you are interacting with a media Aye Aug 20 05:45:23 lol Aug 20 05:45:27 player through a foreground acticity Aug 20 05:45:28 that's ridiculous Aug 20 05:45:53 you should preapre for the worst, not the best Aug 20 05:45:56 that's why you start foreground when your activity is no longer foreground the Aug 20 05:46:01 dug Aug 20 05:46:05 duh Aug 20 05:46:15 that's kind of a shitty way to code Aug 20 05:46:20 in my opinion Aug 20 05:46:36 and will probably result in unreliable behaviour Aug 20 05:46:39 says the one with service life cycle problems :p Aug 20 05:46:52 I FORGOT TO CALL STOPSELF Aug 20 05:46:59 not to mention, every Google app with a service behaves this way Aug 20 05:47:08 e. g music, play, etc Aug 20 05:47:08 how do you know? Aug 20 05:47:29 how? look at the notification Aug 20 05:47:47 no notification whole foreground activity is running Aug 20 05:47:50 lol Aug 20 05:48:03 that's because they are almost certainly using private notification APIs Aug 20 05:48:06 not your little hack Aug 20 05:48:14 no, they're not Aug 20 05:48:31 prove it Aug 20 05:49:03 there are posts on Google groups from android team members regarding this usage Aug 20 05:49:08 search them Aug 20 05:49:24 I don't really care about defending this position Aug 20 05:49:47 if your clients are willing to accept your useless notification, more power to you Aug 20 05:50:02 well duh, for things like a MUSIC APP Aug 20 05:50:34 the google team are insistant that long running services should have a notification Aug 20 05:50:36 to warn users Aug 20 05:50:47 that's exactly why they added this behavour into 4.3 Aug 20 05:51:07 it only has a notification when there is no activity on foreground Aug 20 05:51:18 Trying to circumvent the rules is only going to end up with more restrictive APIs in time Aug 20 05:51:19 and they didn't add this behavior, they fixed a bug Aug 20 05:51:24 thanks to devs doing stuff like this Aug 20 05:51:30 like what Aug 20 05:51:44 running persistant services without a notification Aug 20 05:51:48 using malformed notifications is irrelevant to what I was saying Aug 20 05:52:14 they didn't just fix a bug, because it would have broken a lot of apps Aug 20 05:52:25 so they added this notification to kind of warn developers Aug 20 05:52:27 read the blog entry Aug 20 05:52:40 while you have a foreground activity, any service running in the same process cannot be killed, period Aug 20 05:52:48 yes, they fixed the bug Aug 20 05:52:59 WHAT IF YOUR APP WAS BACKGROUNDED Aug 20 05:53:07 the malformed notification no longer results in no notification Aug 20 05:53:21 do you honestly think people are playing around with their music apps for 4 hours? Aug 20 05:53:24 you really have a problem with reading comprehension, don't you Aug 20 05:53:39 no, they put the phones in the pocket and the activity gets backgrounded Aug 20 05:53:41 jesus christ Aug 20 05:54:04 as soon as your ducking activity is no longer in the foreground, you start foreground on your service... Aug 20 05:54:14 really, is that so hard to understand Aug 20 05:54:19 that's a dumb hack Aug 20 05:54:35 it's trying to get around the rules Aug 20 05:54:36 dumb hack? that's how it's meant to be used Aug 20 05:54:40 no it's not Aug 20 05:54:47 wow, you really are stupid Aug 20 05:54:50 you're kind of meant to start a service how you mean to go on Aug 20 05:55:07 ^ the guy that has been wrong about pretty much everything Aug 20 05:55:33 you're pointing at youra l Aug 20 05:55:35 self Aug 20 05:56:37 By default services are background, meaning that if the system needs to kill them to reclaim more memory (such as to display a large page in a web browser), they can be killed without too much harm. You can set this flag if killing your service would be disruptive to the user, such as if your service is performing background music playback, so the user would notice if their music stopped playing. Aug 20 05:57:27 TLDR; If you don't want us to fuck with your shit, and if this is important, use setForeground Aug 20 05:57:38 it's really not that hard to understand Aug 20 05:58:52 if you don't understand how processes and Java and dalvik work, don't talk Aug 20 05:59:07 lol Aug 20 05:59:18 ok man.. whatever you say Aug 20 06:52:13 hi - i have an android project which has a class not dependig on android - and i want to run its test through junit. this doesnt run through eclupse.... Aug 20 06:57:58 Anyone know why Eclipse won't pick up a custom class that extends a WebView? Getting an error when it's attempting to inflate it. I've added the class for the new type etc. Seems a bit weird Aug 20 07:04:43 in the layout xml, did you reference the class with its full package name? Aug 20 07:05:13 Yep Aug 20 07:06:26 Seems really strange; no compile errors, names and types match etc. For some reason Eclipse isn't linking the class to the XML resource though (it seems). Aug 20 07:08:25 Meh I can get round it I guess. Only needed to implement a listener to catch scrolling and reset the scroll position. I'll just manually set the position X times per second in a thread :) Aug 20 07:49:17 Hey!, I'm using drag and drop feature in my application. While draggin view ( TextView ) I have drawn shadow of my textviews. My question is, is there any way to change content ( text ) of my textView while dragging item ? Aug 20 07:54:14 Hi all, can somebody know a good tutorial how to handle the lifecycle of my fragment & activities? I'm using a singleton pattern class to to remember some settings Aug 20 07:55:05 Smashcat: clean, build, rinse repeat Aug 20 07:55:25 Smashcat: also update project from the android tools Aug 20 07:55:49 cff: Yep I cleaned it in the end, and it worked, so... :) Aug 20 08:31:02 is there a way to detect if sync is disabled on a phone? Aug 20 08:31:12 like in the S3 from the top bar Aug 20 08:40:06 anyone out there setup the v7 support library using maven / intellij? Aug 20 08:40:15 don't really want to switch to gradle just for this Aug 20 08:44:16 Hi, guys I have a question check this one out https://github.com/JoanZapata/android-iconify Aug 20 08:44:35 new IconDrawable(this, IconValue.icon_share_alt) .colorRes(R.color.ab_icon).actionBarSize()); Aug 20 08:44:44 this one IconValue is a enum Aug 20 08:44:54 i want to dynamically set the icon_share_alt value Aug 20 08:45:50 does anybody know how ? Aug 20 08:51:50 Is it just me, or is the recently released Google API 18 emulator image really unstable? Aug 20 08:56:54 does somebody have experience with the lifecycle (acitivy & fragments)? Aug 20 09:01:07 tagrudev, you can use enums just like any other value Aug 20 09:02:12 alex_PP, yes I found that out the thing I need was IconValue.valueOf(string) Aug 20 09:06:57 hi all Aug 20 09:07:03 I am trying to figure out if SL4A any practical to create Android apps... Aug 20 09:07:18 Should end-user download anything special if the Android app created using SL4A and available via Google Play application repository? Aug 20 09:13:18 i have actually need to automatically simulate the onclick for items in a listview Aug 20 09:13:35 can anyone throw some light Aug 20 09:17:07 is there a way to take rapid fire pictures through the sdk? Aug 20 09:17:41 for example, five quick pictures in a row, to capture action shots of someone scoring a goal Aug 20 09:18:48 I remember the guys from Ericson giving us a talk about that sort of thing awhile back. It would constatly be taking pictures so you could pick which one you liked best when you actually decided to take a picture Aug 20 09:18:54 think it had like 9 frames Aug 20 09:19:12 This was done at a lower level than the SDK though Aug 20 09:26:17 Just started using Android Studio : as soon as I add a com.google.android.gms:play-services:3.1.36+ dependency, I get a Manifest Merging failed error. SDK Manager components are all up to date. Any ideas ? Aug 20 09:52:20 I want to have a normal looking Text input, but have the search symbol show on the keyboard while typing into it Aug 20 09:53:02 can I tell android to treat a normal EditText as a SearchView or make a searchview not have SearchView formatting? Aug 20 09:58:20 do you know an app that can record the desktop of the tablet or mobile directly like the tutorials? Aug 20 09:58:49 such an application will eventually keep my laptop cold. Aug 20 10:07:56 if you add a crash logger to your OSS app, you need to consider that people will take your code and send in horrible crashes from their development efforts Aug 20 10:09:21 ha Aug 20 10:09:38 Ankhwatcher, tried inputType ? Aug 20 10:10:09 https://developer.android.com/reference/android/widget/SearchView.html#attr_android:inputType Aug 20 10:10:36 alex_PP: will that remove the search icon? Aug 20 10:10:51 [from the input] Aug 20 10:10:54 or rather, imeOptions Aug 20 10:10:54 https://developer.android.com/reference/android/widget/SearchView.html#attr_android:imeOptions Aug 20 10:11:07 set that to somthing that isn't actionSearch Aug 20 10:12:22 hah okay Aug 20 10:12:28 I'll give that a go Aug 20 10:13:01 it's funny because I just tried the opposite, setting ime to actionsearch in an edittext Aug 20 10:13:22 it didn't seem to do anything Aug 20 10:14:12 the IME options should affect what the enter/next/search bitton on the keyboard does / looks like Aug 20 10:15:08 is it possible to programmatically trigger the animation for the loading of a video of the youtube or default android video player? Aug 20 10:30:01 hi there, i want to use the navigation drawer for my menu, and i wonder how i can fill the list view with some spacers. just insert empty items or is there an other practicable method? Aug 20 10:30:21 i use and array adapter to fill the listView as stated in the android docs Aug 20 10:31:23 hello all. Aug 20 10:50:01 alex_PP: I got it working, thanks Aug 20 10:51:05 is there a way to get android studio to do more refactoring of XML? I want it to always sort the attributes in the same order. Aug 20 10:54:00 no worries Aug 20 11:25:32 again me with the same json problem: http://pastebin.com/QD64s3A6 Aug 20 11:25:33 at line 48. I get the error: Aug 20 11:25:33 The method getJSONObject(int) in the type JSONArray is not applicable for the arguments (String) Aug 20 11:25:37 who can help me? Aug 20 11:28:16 dot8: you're getting objects (string-keyed) and arrays (int-indexed) mixed up Aug 20 11:28:48 things like "jArray = new JSONObject(result);" probably don't help... Aug 20 11:31:02 Leeds: ok, I have a look at it Aug 20 11:31:15 dot8: what type is openbuli? Aug 20 11:32:15 dot8: ? Aug 20 11:32:49 Leeds: JSONArray openbuli = json.getJSONArray("matchdata"); Aug 20 11:33:48 and rather than quoting your code at me... a one word answer? Aug 20 11:34:49 Leeds: oh I am sorry. not realy good in writing english Aug 20 11:35:07 how do i use fragments with the navigation drawer properly? cause every entry of the navigation list hast to provide another fragment (class) Aug 20 11:35:17 dot8: easy question Aug 20 11:35:33 dot8: is openbuli a String? Aug 20 11:35:42 is it ok if i add if/else to check which position is clicked and then create there a new instance of the suitable fragment class? Aug 20 11:35:59 i can't rly find examples to that Aug 20 11:36:04 Leeds: no Aug 20 11:36:11 dot8: is it an integer? Aug 20 11:36:21 hello guys any idea on how to remove/change http://www.grokkingandroid.com/wordpress/wp-content/uploads/2013/01/detail_actionbar_android_2.2-300x45.png Aug 20 11:36:21 Leeds: no Aug 20 11:36:24 the left arrow Aug 20 11:36:28 ? Aug 20 11:36:39 dot8: how about... a Context, is it a Context? Aug 20 11:36:58 Leeds: no, nothing Aug 20 11:37:20 dot8: so... what type is openbuli? Aug 20 11:38:49 Leeds: ok, I do not know Aug 20 11:38:56 then you need to find out Aug 20 11:39:26 because if you don't know what type your own variables are... you know nothing, Jon Snow Aug 20 11:40:24 Leeds: I do not define openbuli as variable Aug 20 11:40:42 um... yes you do Aug 20 11:40:51 you quoted the line where you do it Aug 20 11:41:22 Leeds: ok. true Aug 20 11:41:41 yes, but it's not a Boolean :P Aug 20 11:41:58 meh, I'm done, good luck Aug 20 11:45:01 hello, can anyone help me with an issue please? Aug 20 11:45:28 amir-dev: have you tried turning it off and on again? Aug 20 11:45:32 lol Aug 20 11:45:41 im trying to build a live wallpaper Aug 20 11:45:50 are u familiar with the public void onOffsetsChanged method? Aug 20 11:47:14 nope Aug 20 11:47:22 hmmm, anyone else? Aug 20 11:47:56 or you could just ask your actual question Aug 20 11:49:13 well, im having problem with that particular method Aug 20 11:49:42 cannot find any answers on google to it.. the method allways returns value 0 Aug 20 11:49:46 and only being called twice Aug 20 11:50:00 where is suppose to be called as many times as i slide my android homepage Aug 20 11:50:13 its a method to help you get parralax scrolling to your live wallpaper Aug 20 11:52:04 isn't it a callback? Aug 20 11:53:40 im not sure, its an Engine class method and the system calls it Aug 20 11:53:49 argh Aug 20 11:55:43 hey Leeds, thanks anyway Aug 20 11:55:46 have a good one Aug 20 12:02:52 Morning Aug 20 12:28:48 how do i get the quick settings panel in the emulator? Aug 20 12:31:57 http://stackoverflow.com/questions/18324584/android-bluetooth-sco-with-nissan-car-radio <-- if anybody has experience with this type of bluetooth, help would be greatly appreciated Aug 20 12:32:04 oauth i hate you! Aug 20 12:33:42 is anyone familiar with the navigation drawer? i just wanted to know if it's like that: if i use the navigation drawer, all my screens consist of fragments that change by selecting the right items in the navigation or can it still be activities? Aug 20 12:34:31 im just curios, if the navigation is still there if the screens are activities Aug 20 12:39:13 cause fragments don't really make sense in my project Aug 20 12:41:33 you can do whatever you want, it might be weird Aug 20 12:41:43 and it doesnt make sense for fragments ot not make sense in your project Aug 20 12:41:48 Hi guys, I need some help with dialogs. I'm using showDialog method and the onCreateDialog activity method.In the onCreateDialog I'm creating a dialog and adding an editText to it buildersetView() method, everything works fine except when the user rotates the scrren, at that point the dialog rotates, but the contents of the editText is lost. Any ideas how can I handle this? I know that I could use fragments but I prefer to solve t Aug 20 12:43:06 ang1: override onsaveinstancestate to save the state Aug 20 12:45:19 and perhaps use a dialogfragment instead? Aug 20 12:46:49 mmathis, this means I need to keep track of the dialogs state, i.e. track if the dialog is visible and have a reference to the editText isntance so I can use on the onsaveinstancestate. then onCreate I need to get the previous edittext's value from bundle, put it in a variable and then again onCreateDialog method check if the variable is populated and use that one instead. Is a but cumbersome and I thought that there must be a bet Aug 20 12:46:56 ang1: to manage the old dialogs, you need to use the deprecated onCreateDialog Aug 20 12:47:45 the better way is to use dialogFragment instead ang1 Aug 20 12:47:50 The activity will get destroyed and the dialog will get recreated because onCreateDialog will manage the dialog like a DialogFragment. It's strongly recommended to use DialogFragments as a solution rather than the deprecated way Aug 20 12:49:58 I see, I was hoping for an easier solution... :( Aug 20 12:50:14 the easy solution uses functionality deprecated 2 years ago Aug 20 12:50:51 onCreateDialog is your easy solution and hasn't been maintained since API13 early to mid 2011 Aug 20 12:52:08 ok.. thanks, I'll change them to fragments Aug 20 12:53:37 hi there. Why the onLocationChanged() event doesn't work if I use the 3G connection? Aug 20 12:54:00 it only works after a brief connection to a wifi network Aug 20 12:56:08 jewels: what location provider are you using? Aug 20 12:56:45 seitensei, I've not set it up Aug 20 12:57:18 I got the locationManager using getSystemService(Context.LOCATION_SERVICE) Aug 20 12:58:01 Are you using NETWORK_PROVIDER? Aug 20 12:58:32 If not, that make make a difference. Aug 20 13:01:18 having trouble exchanging oatuh code for a token :/ Aug 20 13:01:49 GoogleAuthUtil? Aug 20 13:01:57 mikedg: You should test in oauth2playground first. Aug 20 13:02:10 yeah, i did, i know the code I'm getting is correct Aug 20 13:02:18 because im able to use that code there Aug 20 13:02:41 so what are you doing then since it fails you in your app? Aug 20 13:02:53 (or server app, I have no idea..) Aug 20 13:03:26 getting an io exception, bad request Aug 20 13:03:32 it's andorid app Aug 20 13:04:05 AuthorizationCodeTokenRequest a = new AuthorizationCodeTokenRequest(new NetHttpTransport(), new JacksonFactory(), new GenericUrl("https://accounts.google.com/o/oauth2/token"), code) .setRedirectUri("http://localhost/oauth2") Aug 20 13:04:05 .setClientAuthentication( new BasicAuthentication(CLIENT_ID, CLIENT_SECRET)); Aug 20 13:04:14 io exception? That sounds like network related, no oauth2... Aug 20 13:08:42 mikedg: You're calling execute as well on that, right? Aug 20 13:08:56 yeah, i get the error after execute Aug 20 13:09:07 i broke it up just to see fi anything looked wrong in the request data Aug 20 13:09:18 Duh. Aug 20 13:09:45 You're sure your redirect to localhost works? Aug 20 13:11:18 Do you know if that redirecturl is an actual browser redirect (which should typically work), or if it's a return address that the google server tries to post to (which will not work of course)? Aug 20 13:12:09 If it's a "callback" style address, localhost is something else seen from Google's side. ;-) Aug 20 13:12:57 seitensei, so It could be used without difference with wifi and 3G? Aug 20 13:14:04 i thought it was an actual browser redirect Aug 20 13:14:12 i could be wrong i guess Aug 20 13:14:26 ill start trying to figure that out Aug 20 13:15:24 mikedg: But you're not in a browser when you make that request? If it's an actual redirect, you'll get some headers back which you need to interpret, but I think it's actually a "callback", i.e. where Google will post the result of your call. That needs to be routable (as seen from Google's side), and localhost isn't. Aug 20 13:18:44 I wanted to know how you add a background to a Plain Text? Aug 20 13:20:52 how do u add an image background to a plain text box?????? Aug 20 13:21:16 hi i'm trying to use the youtube api, and I want to pause the player immediatly after it has been started... i try to call pause() in the onLoaded() callback of the playbackstatechangelistener, but the video just plays... isnt it possible to load a video without immediately starting it? Aug 20 13:23:36 nobody??? Aug 20 13:28:44 datandroiddude: android:background="@drawable/image" Aug 20 13:29:02 i tried that but the image doesnt show when i run it Aug 20 13:29:15 datandroiddude: what kind of textbox? Aug 20 13:29:25 Plain Aug 20 13:29:52 ? Aug 20 13:30:02 datandroiddude: setBackground Aug 20 13:30:08 TextBox sounds cool Aug 20 13:30:28 can't we not change or add a new allowed keystore for an app update in the market? Aug 20 13:30:48 correct, you cannot change or allow new Aug 20 13:30:58 I meant is it a TextView or an EditText Aug 20 13:30:59 nseidm1 : In My JAVA File? Aug 20 13:31:16 yes in your java file Aug 20 13:31:23 k ill trry itt Aug 20 13:34:31 how do i define a Text Field Inside of my JAVA File? Aug 20 13:34:56 nseidm1 Aug 20 13:36:04 TextView textView = (TextView) findViewById(R.id.yourtextview); Aug 20 13:37:31 a text field, a text box, this is a whole new level for me Aug 20 13:38:27 nseidm1: how do I make my text bag grow dyanmically when I put more wordforms in it? Aug 20 13:38:40 layout_height="wrap_content" Aug 20 13:38:49 textual healing Aug 20 13:39:15 i neeed some textualllll healinggggggg Aug 20 13:39:23 should be a song Aug 20 13:42:28 why is my widget so slow.... Aug 20 13:42:32 * pfn headscratches a bit Aug 20 13:42:40 too much ham Aug 20 13:43:01 it's chewing off more than what's good for him Aug 20 13:43:44 all it's rendering is textviews on a transparent background Aug 20 13:43:59 (in a listview) Aug 20 13:44:10 maybe your widget host is slow Aug 20 13:44:30 https://gist.github.com/pfn/6258977#file-widgets-scala-L335 Aug 20 13:44:39 https://gist.github.com/pfn/6258977#file-widgets-scala-L391 Aug 20 13:44:46 there and there, stupid adapter is so simple.... Aug 20 13:45:01 is that French? Aug 20 13:46:15 hm.. EditText.clearFocus does not seem to actually *clear* the focus Aug 20 13:47:06 ok, lets try scrollingCache="true" and cacheColorHint=#00000000 Aug 20 13:47:10 those seem to be universal answers Aug 20 13:47:35 mikedg, it's not java :p Aug 20 13:47:59 is that vbscript? Aug 20 13:48:09 vbscripters wish they could do that Aug 20 13:52:50 No it didnt work...the problem is that when im developing it shows it but when i run it theres no image..CONFUSED Aug 20 13:53:45 Any solutions??? PLEASE HELP?! Aug 20 13:53:47 datandroiddude: What? Aug 20 13:53:51 dude... Aug 20 13:53:52 What's the problem? Aug 20 13:53:57 go do some learning before spamming Aug 20 13:54:50 I'm having the same issue as this guy, http://stackoverflow.com/questions/15106471/android-disable-auto-scroll-in-expandable-list-view . There's tons of info on how to make expandableListView scroll to make the group on top, but not so much for disabling the scroll. Aug 20 13:56:04 this is odd.. I see the video playing but the player returns false on isPlaying()... is the youtubeplayer api very buggy? Aug 20 13:58:03 interesting, my widget just gradually slows down, I wonder why Aug 20 13:58:05 Good morning, is it possible load Activity from external jar? Aug 20 13:58:17 funkbox: Good morning, is it possible load Activity from external jar? Aug 20 13:58:25 Leeds: Good morning, is it possible load Activity from external jar? Aug 20 13:58:28 Hi everyone. How do I get a password text view not to display the last typed character? Aug 20 13:58:32 Normando: nope Aug 20 13:58:39 Normando: you asked this yesterday, nothing changed since then Aug 20 13:58:52 Kottizen: out in the .xml file android:password='true' Aug 20 13:59:52 hrm, how do I specify background padding in a shape drawable? like 9patch has the padding regions Aug 20 13:59:59 Leeds and funkbox but I know how to run Activity from external jar, but the application has to be installed on device Aug 20 14:00:02 Normando: It's a password text view already, but when I type something I see the last character for half a second, before it turns to a dot. I want to change that behaviour. Aug 20 14:00:19 Kottizen, why? it's normal behavior, and users can change it from settings Aug 20 14:00:39 Settings -> Security -> Make passwords visible Aug 20 14:01:03 Kottizen: I never try to change this, you try to search yeat? Aug 20 14:01:47 pfn: Ah, thanks! I'm making an NFC based card system for purchasing in my school's cafeteria, and I'm going to put up a Nexus 7 to allow people to touch their cards + entering their PIN codes. I don't want the PIN codes to be exposed, basically. Aug 20 14:01:51 But that solves it, thanks! Aug 20 14:01:55 Normando: I have tried to search Aug 20 14:02:24 as for entering pin codes, I'd consider using custom buttons and drawing dots if I had time, for pin entry ;-) Aug 20 14:02:26 Normando: so how do you run an activity from a jar file then? Aug 20 14:02:38 you cannot run an activity from a jar file Aug 20 14:03:10 well, you can if you register it in your manifest Aug 20 14:03:15 but you can't run any arbitrary activity Aug 20 14:03:39 pfn: which is why I'm asking Normando, who has apparently found a way to do it... Aug 20 14:04:05 "application has to be installed on device" Aug 20 14:04:14 presumably he means startActivity(package/activity) Aug 20 14:04:24 exceot applications aren't jar files Aug 20 14:04:33 Hey, I've problems with some custom view right now. It works fine on Android 4.2 but the view somehow gets too big on a 2.2 7" Tablet from Samsung. Does anyone of you know about changes between those versions that could cause this behaviour? I'm setting a certain dp value in the layout xml, btw.. Aug 20 14:04:37 pfn: That was the original idea, but then I realised the inputType="numberPassword" did the same thing: http://pola.org/IMAG4319.jpg Aug 20 14:04:52 Leeds: I discovered today that I could run because the application was installed on my device, I just use DexClassLoader to load class, setClassName(classLoaded.getPackage().getName(), classLoaded.getName()); Aug 20 14:05:09 that's not running an activity Aug 20 14:05:12 that's just loading it Aug 20 14:05:30 ansgarm: i believe the original galaxy tablet lies about some of its display metrics to make a "nicer" looker display Aug 20 14:05:33 you can setup a contextwrapper and wrap the activity, but... well, that's a lot of pain Aug 20 14:06:07 so I need to loading some Activitys in my application Aug 20 14:06:08 and by too big I mean it doesn't get displayed properly. just some color for the rest of the screen which I haven't even defined anywhere Aug 20 14:06:23 ansgarm, hierarchyviewer Aug 20 14:06:25 use it and love it Aug 20 14:06:43 thanks, i'll try my luck Aug 20 14:09:36 pfn: when i declare a Activity in AndroidManifest.xml of my application from my external .jar got error, saying that it´s not declared on my Manifest.xml Aug 20 14:09:41 pfn: why? Aug 20 14:09:49 huh Aug 20 14:10:02 you just made no sense Aug 20 14:10:52 pfn: you don´t understand? Aug 20 14:11:02 pfn: sorry my english Aug 20 14:12:56 pfn: I have the following problem, I need to initiate some Activities from external .jar's because my application will support other people, how to load an Activity from external .jar? Aug 20 14:13:11 you don't Aug 20 14:13:15 period Aug 20 14:13:26 write your own plugin api Aug 20 14:13:29 and don't make it an activity Aug 20 14:13:54 but I need to draw a Activity on my application Aug 20 14:14:10 too bad, you don't get to Aug 20 14:14:25 have people expose fragments Aug 20 14:14:27 not activities Aug 20 14:14:55 so whey I can load Activity from external .jar, If the external .jar was installed on my device? Aug 20 14:15:20 no, you can't Aug 20 14:15:25 *why Aug 20 14:15:26 sorry Aug 20 14:15:33 I can Aug 20 14:15:33 you k eep saying you can, but you can't Aug 20 14:15:35 I test this Aug 20 14:15:37 there is no such thing as installing a jar on Android Aug 20 14:15:51 you test what Aug 20 14:15:59 you keep saying Aug 20 14:16:00 you no showing Aug 20 14:16:34 I made some tests and I can load activity from external .jar, but have some restrictions, I need to have been installed the .apk from external .jar Aug 20 14:16:54 File fileJar = getFileStreamPath("test.jar"); Aug 20 14:17:20 don't type in english, show what you've done, what you've observed, and what you expect Aug 20 14:17:20 how can I do in order to ensure that an AsyncTask is completely termineted? Aug 20 14:17:35 jewels, you can't, you have your asynctask watch a flag that it exits using Aug 20 14:17:39 e.g. isCanceled() Aug 20 14:18:21 pfn, my async task only returns an object calling a method (in particular it downloads an xml file from my web server) Aug 20 14:18:32 if (fileJar.exists()) { final String libPath = fileJar.getAbsolutePath(); final File tmpDir = getDir("dex", 0); final DexClassLoader classloader = new DexClassLoader(libPath, tmpDir.getAbsolutePath(), null, this.getClass().getClassLoader()); final Class classToLoad = (Class) classloader.loadClass("com.test.MainActivity"); Aug 20 14:18:34 jewels, then you can't cancel it Aug 20 14:18:43 Normando, so? you can't run it Aug 20 14:19:05 jewels, find ways to break the method down into components so that it is interruptible Aug 20 14:19:06 itTest.setClassName(classToLoad.getPackage().getName(), classToLoad.getName()); startActivity(itTest); } else { Log.i("ERROR", "File not exist"); } Aug 20 14:19:11 Normando, do not paste in channel Aug 20 14:19:17 sorry Aug 20 14:19:26 pfn, I just want to interrupt it when the download was finished Aug 20 14:19:30 nothing more... Aug 20 14:19:42 what's to interrupt then, it finished Aug 20 14:19:56 anyway, check a cancel flag Aug 20 14:21:05 the download is finished, gui is updated but I still can see the async task in the debugger Aug 20 14:21:07 What's the difference between ?android:attr/TextAppearanceLarge and @android:style/TextAppearance.Large? Aug 20 14:21:23 pfn: I can not run if the application has not installed on my device, but if I can normally perform the activity of. jar Aug 20 14:21:28 so it's not finished... Aug 20 14:21:39 wtf is normally perform activity Aug 20 14:21:52 and wtf is itTest Aug 20 14:22:09 jewels, what do you m ean you can still see the asynctask in the debugger Aug 20 14:22:31 Ankhwatcher, style/ is a Theme Aug 20 14:22:37 final Intent itTest = new Intent(); Aug 20 14:22:48 Normando, not registered in manifest, CANNOT BE RUN LIKE YOU WANT Aug 20 14:22:51 you know, there are all the running threads in the debugging view of eclipse and I can see the AsyncTask in it... Aug 20 14:23:01 jewels, that doesn't mean it's running, async tasks use a threadpool Aug 20 14:23:03 pfn: but it's a default theme? So does it mean the same thing? Aug 20 14:23:08 Ankhwatcher, no Aug 20 14:23:21 Ankhwatcher, attr/ means an attribute set in the current Theme Aug 20 14:23:31 pfn, can you explain me that? Aug 20 14:23:36 pfn, what do you mean? Aug 20 14:23:37 okay Aug 20 14:23:40 thanks Aug 20 14:23:41 e.g. if you're in Holo.Light, it'll use "android:textAppearanceLarge" from Holo.Light Aug 20 14:23:47 if you're in Holo.Dark, it'll use the value defined in .Dark Aug 20 14:24:07 ah so it's making a reference to the theme set in the manifest? Aug 20 14:24:09 jewels, the thread never exits because thread creation is expensive Aug 20 14:24:15 Ankhwatcher, pretty much, yes Aug 20 14:24:29 in manifest, in code, on the view, wherever Aug 20 14:24:48 pfn okay cool Aug 20 14:25:14 jewels, it sits around waiting for another async task; use the thread-view to look at the stack of the asynctask thread, it's sitting there waiting for more work Aug 20 14:26:19 cpu time in debug monitor is ms, right? Aug 20 14:27:14 pfn: have some way to install an .apk file in dashboard and the user can not see that the application is installed on the device Aug 20 14:27:29 Normando, what you ask is not possible, period Aug 20 14:27:31 stop asking Aug 20 14:27:50 puff Aug 20 14:28:01 or at least, stop highlighting my nick, thanks Aug 20 14:28:06 you don´t know what you say Aug 20 14:29:04 you say I can´t and not even know what I want Aug 20 14:29:22 Leeds: you saw my solution? Aug 20 14:29:51 you never even said what you want Aug 20 14:30:06 I can only assume you want startActivity(somerandomassactivityfromyourjar) Aug 20 14:30:09 won't work Aug 20 14:30:10 period Aug 20 14:30:29 I have architecture based on plugins Aug 20 14:30:38 your architecture sucks Aug 20 14:30:40 need to import external jars and load them Aug 20 14:30:43 your plugin api is incorrect Aug 20 14:30:52 activities are not plugins Aug 20 14:32:54 you told me I can´t run Activity from external jar, but I can if the application was installed on device, but I do not want to install .apk, because if I made this, I will see the app on my dashboard device Aug 20 14:33:07 because you aren't running from the external jar Aug 20 14:33:11 you're telling the system to launch it Aug 20 14:33:21 to launch an installed app Aug 20 14:33:35 Hi ... if I put an activity inside an other package within my project ... it can't seem to find the resources as the R.drawable.blabla has it's R underlined red in eclipse ... anyone knows what I mean? Aug 20 14:33:40 with DexClassLoader? no Aug 20 14:33:45 not at all Aug 20 14:33:50 you're not executing the class directly Aug 20 14:33:57 all you did was take the class name, and send it to startActivity Aug 20 14:34:00 not the code Aug 20 14:35:53 I saw in logcat, DexOpt: --- BEGIN 'test.jar' (bootstrap=0) --- DexOpt: --- END 'test.jar' (success) DEX prep '/data/data/com.example.projecttest/files/test.jar':unzip in 4ms, rewrite 534ms ... Aug 20 14:36:12 so? Aug 20 14:36:26 It´s means I load from external .jar Aug 20 14:36:38 no, it doesn't Aug 20 14:36:47 it just means you ran DexClassLoader on it Aug 20 14:40:41 so what you recommend? Aug 20 14:40:48 to solve my problem Aug 20 14:41:33 not using activities as a plugin api Aug 20 14:42:12 What is the function that is called when you click on the home button on the ActionBar when you have setDisplayHomeAsUpEnabled(true)? Aug 20 14:43:39 is it possible to make api to draw components of Android on my activity? Aug 20 14:43:47 hello, i'm trying to implement notification in my application and i succed but notification is persistant, i cant remove it by drag to left/right like other ones. any idea ? Aug 20 14:44:26 Normando, fragments are one way Aug 20 14:44:55 tomek550: .setOngoing(false); Aug 20 14:45:54 !!!! ty m8 Aug 20 14:46:06 np Aug 20 14:46:18 so let´s suppose you development a plugin to my applicaion, I can just run your onCreate() method to execute everything your draw? Aug 20 14:46:23 i wish i came here earlier xD .. was searching internet for hours Aug 20 14:46:53 Hello Aug 20 14:47:06 I have a tablet and everytime I go to an app that needs me to sign in it takes me to a page that cannot be displayed. Is there a way around this Aug 20 14:47:16 LLckfan, not here Aug 20 14:47:26 Normando, no Aug 20 14:47:37 prn then where Aug 20 14:47:40 Normando, yeah, if you're gonna write a plugin api, you need to do a lot more studying Aug 20 14:47:46 LLckfan, anywherfe that does user support for your app Aug 20 14:47:54 I'm Investing $117K in 1 Stock. This company is growing faster than Apple, Amazon and Google combined. Aug 20 14:49:31 pfn I have tried Aug 20 14:49:46 LLckfan, good, now wait, because #android-dev is not user support Aug 20 14:49:57 pfn: yes or no? Aug 20 14:50:30 Normando, already said no, onCreate is not how you'd have them draw Aug 20 14:50:53 ok Aug 20 14:52:11 pfn No help Aug 20 14:52:19 pfn I have waited ALL noight Aug 20 14:52:26 you're offtopic here Aug 20 14:52:30 you're gonna wait all year here Aug 20 14:53:16 LLckfan, for one we don't know what the app is, and for 2 no one here (unless you get lucky and one of the devs is in here) knows how their system works, so coming and asking a vague question here about an app will not be answered Aug 20 14:53:47 it is a support question not a development question, this is not the place for the question, and is also a place where even if you were to get an answer would be nothing more than educated guesses Aug 20 14:53:59 were even* Aug 20 14:54:16 nevermind I had it right the first time, just didn't reread the entire thing Aug 20 14:55:36 LLckfan: hmm Aug 20 14:55:40 i've had the same problem Aug 20 14:55:43 i had to buy a new router Aug 20 14:56:15 lucky you, I had to buy a whole new pc, and monitor, and tablet, and phone Aug 20 14:56:26 Dice with Buddies and Words with Friends Aug 20 14:56:27 damn Aug 20 14:56:45 * pfn headscratches Aug 20 14:56:46 you sure you didnt download the cam app versions of them? Aug 20 14:56:50 ok, my widget is making my launcher slow as shit now Aug 20 14:56:57 I don't understand why Aug 20 14:57:02 I know a lot of people got hacked and shit broke on their tablets cause they downloaded Dicks with Buddies Aug 20 14:57:07 lol Aug 20 14:57:07 my app has no cpu time usage at all Aug 20 14:57:35 I downloaded the apps Aug 20 14:57:56 It open asking if I want to play though Facebook email or play as guest Aug 20 14:58:06 Can anyone tell me if i'm doing this correctly or how the best practise is: I coded a remote control app. For the connection, i create a service, create a Thread with handles all the communication and do the startForeground. Is this a good approach? Aug 20 14:58:25 LLckfan: You won't get help here. There is no help here. This is for people who make software. Aug 20 14:58:53 So I logged in to Google using an oauth2 url in a webview, now whenever I try to show that same URL, it winds up logging me in automatically, i'm assuming it's a cookie thing Aug 20 14:59:11 LLckfan: Seeing as your games are not IDE's, I don't even think these guys even know how to use them. Aug 20 14:59:16 Heh. Aug 20 15:00:51 how can I make a button do the same thing as android.R.id.home? Aug 20 15:01:03 look up launch home intent Aug 20 15:01:32 every time LLckfan asks a stupid question I roll my ten sided die and if it lands on 0 I kill a coworker Aug 20 15:01:50 i have already shoved 2 people in the closet Aug 20 15:02:08 No one wants to help Aug 20 15:02:16 noone can help Aug 20 15:02:27 half of us don't even have android phones Aug 20 15:02:40 'now the numbers have rubbed off the die I just guess what number it landed on' Aug 20 15:02:40 we mostly use iphones cause they are the better gaming devices Aug 20 15:02:48 andorid is jsut good for dev cause theres so many devices Aug 20 15:03:27 mikedg: have you been an andorid developer for long? Aug 20 15:03:33 yes Aug 20 15:09:08 I intended on getting an android until I started android dev, yeah I decided on an iphone Aug 20 15:17:36 debugging, when I start an AsyncTask is associated to it a Binder. What's it? Aug 20 15:17:55 ? Aug 20 15:18:22 now that's a weird English sentence ;) Aug 20 15:18:43 people should probably just use google translate for chatting Aug 20 15:18:47 it'd be more comprehensible Aug 20 15:19:41 in the debugging view there are, with the AsyncTask thread, some other threads called Binder. What are they? Aug 20 15:22:38 remote services that android uses Aug 20 15:26:06 pfn, I want to solve this problem: when I close my application (it's no more available in the background application's list) the thread which executes the location tracking is still available. how does it is possible? Aug 20 15:26:19 *is it Aug 20 15:26:43 "the thread which executes" how are you sure it's available Aug 20 15:26:46 it's not running Aug 20 15:27:07 jewels, google.com/translate -- maybe type your italian in there, and paste the english ;-) Aug 20 15:27:53 I continue receiving the toast messages that are printed in the background async task Aug 20 15:28:04 then stop your background async task Aug 20 15:28:09 you never said anything about that... Aug 20 15:29:19 but this messages are printed, in particular, in onLocationChanged() method Aug 20 15:31:21 So unregister your listener Aug 20 15:32:52 if you don't stop the location provider, how do you expect it to stop Aug 20 15:34:36 goddamn animation. i need to swap two views and it swaps them in one direction just fine but in the other it does nothing except wait until the duration and then pop them back in Aug 20 15:38:34 SimonVT, pfn, thank you. I've fixed the problem Aug 20 15:39:02 funkbox: I assume you're using ObjectAnimator and AnimatorSet Aug 20 15:39:15 nseidm1: nope, i really should change it to use that Aug 20 16:01:50 https://plus.google.com/111751695436781052143/posts/cwRycgkCzpn Aug 20 16:01:50 :) Aug 20 16:04:04 Hello there. Aug 20 16:06:33 I just noticed how extremely easy it is to export multiple images from the gallery to any app that can handle the images. But the opposite way of having an app ask for images seems to be impossible. I'd like to create an app that does something with images, however, what should I do when the user taps "create new set"? Display a dialog "you have to do this backwards, open the gallery and share some pictures with this app to creat Aug 20 16:06:34 e a new set"? Is there a better way? Aug 20 16:06:34 pfn: :D Aug 20 16:06:59 RedNifre, use the image picker intent... Aug 20 16:07:10 there's an accepts multiple flag/extra you can set Aug 20 16:11:46 I'm surprised by how few images I have in my gallery. seems like all image editing apps I tested keep their image files hidden somewhere :/ Aug 20 16:13:32 What I'd like is to have a complete workflow on the phone: draw an image with any app, then import it to my app. Guess I'll have to test some drawing apps and recommend one to the user instead of optimistically telling them to just draw something and import it :/ Aug 20 16:13:38 RedNifre: They stick them in an appdata folder.. Aug 20 16:14:32 Doesn't that delete all the images when the app gets uninstalled? Seems odd for a content creation app... Aug 20 16:14:56 so, appdata folders have an implied .nomedia? Aug 20 16:16:31 RedNifre: Use 'adb shell' and go through your device looking for where they stick them.. I'd look in '/tmp/' and up the appdata trees. Aug 20 16:16:55 ooh, I wonder if my widget performance woes are because of mismatching item ids Aug 20 16:17:56 pfn: Do your widgets have the fidgets? Aug 20 16:18:25 no, but the views get redrawn too often and the widget moves like molasses Aug 20 16:19:34 hello Aug 20 16:19:46 i need some help Aug 20 16:20:00 i wanna ask about some subjects Aug 20 16:20:01 pfn: dunno what to tell you other than toss in a delay loop and update every 100ms? Aug 20 16:20:07 if it's with android you came to the right place Aug 20 16:20:08 I need help also, gastrointestinal issues Aug 20 16:20:10 like what xyz87 Aug 20 16:20:23 * SpeedEvil gives nseidm1 a faecal transplant. Aug 20 16:20:24 xyz87: So do I but my shrink gave up.. Aug 20 16:20:28 i have gastritis too from too much daily celebrex Aug 20 16:20:34 Bleeptech, that's not the problem, the widget isn't getting updated Aug 20 16:20:38 it's reading from a remoteadapter Aug 20 16:20:42 I want to do an app that retreive data from a server like a speeding ticket Aug 20 16:20:56 then alow user to pay directly from the app Aug 20 16:21:02 xyz87: do you have permission to access said server Aug 20 16:21:23 yes actually we have access to the e-service Aug 20 16:21:27 and information Aug 20 16:21:35 do they have a json api? Aug 20 16:21:35 is hasStableIds an optimization? Aug 20 16:21:51 sounds feasible. I guess all your app would need is the network permission in the manifest? Aug 20 16:22:03 when I resume my application, how can I reconnect my LocationClient? Aug 20 16:22:04 Everything else sounds like pure java. Aug 20 16:22:06 hmmm, looks like it's for multi-selection only Aug 20 16:22:59 can we talk in private Aug 20 16:23:02 ? Aug 20 16:23:32 Why? This app doesn't sound like it would need security by obscurity. Aug 20 16:23:54 cze im lost here Aug 20 16:24:01 that's not a good start Aug 20 16:24:12 Did you already sign the contract? :) Aug 20 16:24:17 hella complex app you're envisionsing, especially if the server doesn't have a json api Aug 20 16:24:26 i want to ask several question Aug 20 16:24:40 what is a json api Aug 20 16:24:49 we have them as a web based Aug 20 16:24:50 yeah, good luck Aug 20 16:24:52 heh Aug 20 16:24:55 The good news is that your app sounds like something that requires good Java knowledge, but maybe not that much android knowledge. Aug 20 16:25:23 we want to port them to an android app Aug 20 16:25:24 he's got neither Aug 20 16:25:26 how's that help? Aug 20 16:25:43 i have a java knowledge Aug 20 16:25:54 Oh, you have a web app? Never wrote one of those, I guess you can't really "port" that to android... Aug 20 16:26:05 but this is the first time that I would use e-services and e-payment and database apps Aug 20 16:26:06 I have two java knowledge Aug 20 16:26:09 unless you cheat and have the app show a webview with a mobile version of your webapp Aug 20 16:26:27 that's terrible Aug 20 16:26:33 webview apps are so garbage :( Aug 20 16:26:39 we cant we have to do every thing from zero Aug 20 16:26:47 yes, you do Aug 20 16:26:48 but we have access to the server Aug 20 16:27:00 via the e-service Aug 20 16:27:24 Sure they are not really good... but it might depend on the contract and how to finish this ;) Aug 20 16:27:39 didnt understand Aug 20 16:27:48 If you want to build a native Android app it sounds like you have absolutely nothing and it will be a lot of work. Aug 20 16:27:56 what's your situation exactly? Aug 20 16:28:04 no problem Aug 20 16:28:18 ddo u know the e-service ?? Aug 20 16:28:19 situation is a server with no web services Aug 20 16:28:42 ddooo you k now the muuffffinnnn maaananan??? Aug 20 16:28:59 the muffin man cannnnnnnnn Aug 20 16:29:34 unrelated: I wonder if I should get a paid github account to host my hobby app there (and also have my documentation and issues there, neatly in one place). Is this a good idea? How do you manage your one man app projects? Aug 20 16:30:07 if it's a one-map app, why host on github? Aug 20 16:30:16 and it's not open source Aug 20 16:30:23 just keep it in a local repo Aug 20 16:30:27 and dropbox sync Aug 20 16:30:27 (For me it's currently a mess, repo on my NAS, specs in markdown documents in my dropbox, issues partly in google keep, partly in tracks...) Aug 20 16:30:30 or anything Aug 20 16:30:46 I was wondering about all the other nice things that github offers. Aug 20 16:31:03 I already use github for one of my open source projects and I like the lightweight issues and wiki. Aug 20 16:31:07 * pfn shrugs Aug 20 16:31:10 just setup a VirtualBox vm with Debian for an svn server Aug 20 16:31:14 well, github is worth paying for Aug 20 16:31:16 svn server? Aug 20 16:31:18 did you just say that Aug 20 16:31:19 heh Aug 20 16:31:25 I tried to do it privately first, tested Jira, but that is total overkill. Aug 20 16:31:26 I like svn mannnnnnnn Aug 20 16:31:34 jira sucks, imo Aug 20 16:31:40 it's what you use when you have a big company Aug 20 16:31:43 but everyone does it wrong Aug 20 16:31:46 and it sucks Aug 20 16:31:53 That's my experience as well. Aug 20 16:32:05 it's the same as Eclipse, people get stuck using what they've used for years Aug 20 16:32:14 I don't :p Aug 20 16:32:16 I use what's best Aug 20 16:32:18 It LOOKS like it could work really well, if it was setup perfectly though. Aug 20 16:32:26 vim for the longest while, then intellij since ideavim is pretty awesome Aug 20 16:32:38 RedNifre, it's too slow, and the UI just isn't ergonomic Aug 20 16:32:48 pfn is on a whole next level kinda thang Aug 20 16:32:52 I pay $10 a month for a repository hosting account Aug 20 16:32:56 I want to try android studio for the project I'm currently starting... Aug 20 16:32:59 got his code all scala'd out and whatnot Aug 20 16:33:31 well, I'm not considering github for the repo itself (though that is probably more reliable than my NAS), I like it for all the fluff I can do around it. Aug 20 16:33:50 you can install git in a local debian vm Aug 20 16:33:56 (I'm the type who likes to has everything written down neatly) Aug 20 16:34:22 it's not about git, it's about wiki, issues, planning etc for me. Aug 20 16:34:39 you don't even need to install git :p Aug 20 16:34:43 just git push to a file:/// url Aug 20 16:34:49 and git pull from there Aug 20 16:35:03 Wikimedia for the wiki Aug 20 16:35:17 I'm lazy, I don't want to set anything up. Aug 20 16:35:25 And supporting github might be a nice thing to do. Aug 20 16:35:43 ...but I digressed. xyz87, is the app done yet? Aug 20 16:35:51 lol Aug 20 16:37:19 well, I think github should be pretty affordable Aug 20 16:38:15 * pfn tries using stable ids to see if it helps with his widget performance Aug 20 16:38:58 that's some bot lol right thurrr Aug 20 16:40:03 RedNifre: Did you find your jpegs? Aug 20 16:40:22 hey there - anybody seen this crash in android.view.GLES20RecordingCanvas? Aug 20 16:40:22 http://stackoverflow.com/questions/18340296/nullpointerexception-in-android-view-gles20recordingcanvas Aug 20 16:41:22 Yes, indeed I did! Looks like they are burried behind a lot of Android Java clutter code, like so often with Android :/ Aug 20 16:41:30 anybody really good with Views? Aug 20 16:41:47 how do you get the coordinates of a Button that you used a drawable? Aug 20 16:42:08 ...and if I want to create a dialog that also allows other sources of images (i.e. take a picture with the camera) it seems I have to create my own dialog that merges different intents. Hmpf... Aug 20 16:42:11 Why are some of the apps keep on restarting itself after I used a memory booster app? Aug 20 16:42:38 ReGiStRaS: because it's impossible to kill an app, buy an iPhone Aug 20 16:42:51 Aren't memory booster apps a bad idea? Aug 20 16:42:55 very Aug 20 16:42:56 RedNifre: yes Aug 20 16:44:04 ReGiStRaS: let me ask you a questions, why you do want an app to not run? Aug 20 16:44:25 you installed an app, you expect it to work as described, yet you don't want it to run Aug 20 16:44:27 RedNifre: Yeah, They lead to neural degradation and the next thing you know your higher brain functions start to go.. LOL Aug 20 16:46:34 Is it possible to throw a configured widget onto the launcher from within my app? Like, the user selects an item in my app, taps the "create shortcut" button and the next time he presses home he'll find a tiny 1x1 widget that leads him to the item he tapped in the app? (I've never seen something like that in the apps I used) Aug 20 16:47:23 I'm asking because I have the impression that widget creation is a mystery to most users. And it might be a more sensible way to do it anyways. Aug 20 16:47:47 technically it can be a disabled launcher component that the app just enables Aug 20 16:48:21 The awesome way to do it would be to long press the item in my app, which causes a switch to the launcher with a widget that looks like the item attached to the user's finger, so he gets the impression of drag & dropping items from the app onto his launch screen :) Aug 20 16:49:07 A disabled launcher component? Never heard of it. Aug 20 16:50:24 hello sorry i get disconnected Aug 20 16:51:03 I was asking about some help Aug 20 16:51:13 Neat, just noticed that google chrome allows you to send bookmarks to the home screen as a widget. I'm in a good mood now :) Aug 20 16:51:23 whats the general consensus on importing "R.string" rather than just "R" Aug 20 16:51:28 I feel like I could help people build native apps to pay for tickets! Aug 20 16:51:50 ? Aug 20 16:52:18 Is a consensus needed? I never look at imports and just let the IDE handle it. Is that bad? Aug 20 16:53:08 xyz87 what is your situation and question? Aug 20 16:53:29 the question is how to use e-service on android Aug 20 16:53:43 and how to use e-payment Aug 20 16:53:45 canadiancow, I say do eet Aug 20 16:54:02 well it seems like my project has exactly one class that does it Aug 20 16:54:08 everything else just imports R Aug 20 16:54:11 canadiancow, see, if you had the popup bubble, you could ask this while in another app ;-) Aug 20 16:54:17 LOL Aug 20 16:54:23 canadiancow, it's probably nice if you want to import resources from multiple places Aug 20 16:54:33 R.id from one thing, R.string from another Aug 20 16:54:37 oh god Aug 20 16:54:42 when would you ever do that Aug 20 16:54:43 xyz87 Wikipedia claims that "e-service" is just providing service over the internet. Do you mean something else? Aug 20 16:54:51 all library project resources are re-packaged into your own R.java Aug 20 16:54:54 dunno Aug 20 16:55:00 thats it Aug 20 16:55:06 damnit, my appwidget is still slow Aug 20 16:55:09 * pfn headscratches some more Aug 20 16:55:16 Actually e-service is a service that a server give Aug 20 16:55:35 does it give that service electronically? Aug 20 16:55:36 like for example lets say you check a ticket Aug 20 16:55:48 the erver return that you should pay ... Aug 20 16:56:04 What's that thing called that juggles the fragments in an activity again? Aug 20 16:56:18 fragmentmanager? Aug 20 16:57:14 Was it fragment pager? Is it possible to show a dialog that itself has tabs that contain fragments? I mean, you can't have nested tabs because of the fragmentmanager... would the dialog have its own fragment manager or would it share the same as the activity? Aug 20 16:57:29 i have a nexus 7 that dropped, the screen cracked and the touch screen is dead; i have usb-debugging turned ona lready and am wondering if i can somehow use the android SDK (or some other means) to get in there and access oen of the apps Aug 20 16:57:35 ok sorry guys...what I meant was Aug 20 16:57:52 gdoteof, access in what manne Aug 20 16:57:57 adb reboot bootloader Aug 20 16:57:57 is there default services that ICS need to run? Aug 20 16:58:03 fastboot boot twrp-recovery.img Aug 20 16:58:14 adb shell Aug 20 16:58:14 pfn: basically "use it".. like interact with one of the apps Aug 20 16:58:16 cd /data/data Aug 20 16:58:18 ... Aug 20 16:58:33 xyz87 this sounds like a problem that might have something to do with exchanging data over the internet. Hopefully nobody patented that. Aug 20 16:58:57 didnt got it Aug 20 16:59:06 On a more serious note: On Android, you should have all the freedom you need to implement this in any way you like. Aug 20 16:59:13 like when I used the RAM booster...I saw some running services restarting itself. Like Google Play Services, Google Services, SimContacts Aug 20 16:59:15 How many developers do you have for this project? Aug 20 16:59:24 and Android Keyboard Aug 20 16:59:43 well, android keyboard needs to be running all the time to speed up keyboard input Aug 20 16:59:52 google services needs to run all the time to sync with google stuff Aug 20 16:59:56 what are you expecting Aug 20 17:00:08 *needs* to run? depends on what you call need Aug 20 17:00:09 so thise services that restarts itself are default services that is needed to be running at all times? Aug 20 17:00:17 no Aug 20 17:00:23 that depends on what you call need Aug 20 17:00:27 ok Aug 20 17:00:29 if you don't need google services, just uninstall them Aug 20 17:00:34 Do you NEED them NOT to run? Aug 20 17:01:03 cause my pathetic Android phone only had got 512MB of RAM (of which only 384 is usuable) Aug 20 17:01:03 *ähem*, isn't uninstalling google services such a bad idea that it's actually not possible? Aug 20 17:01:15 htc wildfire, is that you? Aug 20 17:01:27 iNO One Plus actually Aug 20 17:01:30 just remove all of your google accounts Aug 20 17:01:36 ReGiStRaS: don't use "memory boosters", period. Aug 20 17:01:38 google services are pretty much useless without a google account Aug 20 17:01:47 and I'm playing Ingress on this pathetic phone Aug 20 17:02:14 which Ingress is a app that needs lots of RAM Aug 20 17:02:21 oh, right! I wanted to try that one while on vacation... is it still somewhat closed beta? How quickly can I get an account? Aug 20 17:02:41 I can get u a invite code if u want Aug 20 17:02:50 That would be nice. Aug 20 17:02:51 I've got 5 invited unused Aug 20 17:03:00 u have a gmail? Aug 20 17:03:44 doesn't every android user have gmail? Aug 20 17:03:52 opps...yeah Aug 20 17:04:06 wats your gmail? i can do it instantly Aug 20 17:04:16 how does the invite code look like? is it characters I can type into the app? or something more complex? Aug 20 17:04:43 just a bunch of characters Aug 20 17:05:11 there might be a window in your irc client where I send you a message somewher. Aug 20 17:05:17 replied Aug 20 17:09:08 ok, so ends today's productivity... I'll go outside to play ingress now ;) Aug 20 17:10:30 Hey guys, hope you can help me. I have five buttons on the screen (I used drawable images) and I want to draw Regions on top of them so that I can use onTouchListener with region.Contains() but I am having trouble getting the right coordinates of the buttons so that I can make the regions? How does one get the coordinates of an ImageButton or Button? Aug 20 17:16:24 newbieto: getTop() and getLeft()? Aug 20 17:16:53 Thanks evanc will try and see Aug 20 17:17:24 evanc, why would an appwidget's remoteadapter be slow? Aug 20 17:17:34 evanc, my widget just keeps getting slower and slower and slower without reason Aug 20 17:17:38 it's dragging my launcher into hell Aug 20 17:17:49 pfn: is your adapter doing work on the UI thread? Aug 20 17:17:57 my adapter does next to no work Aug 20 17:18:05 Heya guys, quick question - is there any sort of cross-platform library for charts? Aug 20 17:18:19 I am developing a cross-platform application and require the charts to look identical on both iOS and Android Aug 20 17:18:30 but coding charts from the ground up is a tremendous task Aug 20 17:18:46 evanc, https://gist.github.com/pfn/6258977#file-widgets-scala-L354 Aug 20 17:18:59 what is this moon language? Aug 20 17:18:59 Tee_Pee javascript maybe :D Aug 20 17:19:00 oops, wrong one Aug 20 17:19:01 https://gist.github.com/pfn/6258977#file-widgets-scala-L403 Aug 20 17:19:20 or javascript.... Aug 20 17:20:11 anyway, running through traceview doesn't show any hotspots in my code Aug 20 17:20:14 pfn: I have no idea how to read this so I'm just going to say it's slow because scala. Hope that helps! Aug 20 17:20:16 everything runs in <100ms Aug 20 17:20:25 lol Aug 20 17:20:36 * pfn shrugs Aug 20 17:20:37 100ms is a pretty long time to block the UI thread, pfn Aug 20 17:20:41 no Aug 20 17:20:43 *everything* Aug 20 17:20:51 I mean, all app processing over 10+ seconds takes under 100ms Aug 20 17:21:11 but the widget just hangs and blocks Aug 20 17:21:23 same behavior of multiple devices? Aug 20 17:21:28 *on Aug 20 17:21:28 just testing on my n7 Aug 20 17:21:33 haven't bothered elsewhere yet Aug 20 17:21:34 gotta try another device Aug 20 17:21:40 what iffffff Aug 20 17:22:12 the other weirdness is that the widget slows down over time Aug 20 17:22:22 it starts off very fast, but it just starts to slow down gradually Aug 20 17:22:31 no memory change in my app, it's consistently at an 11mb heap Aug 20 17:22:35 stock launcher? Aug 20 17:22:53 yes Aug 20 17:22:54 pfn: I have no clue what's going on here, but it looks like you're storing your remoteviews as a member variable? Aug 20 17:23:08 evanc, only a single remote view for the adapter Aug 20 17:23:20 rather than re-constructing it every getView Aug 20 17:23:36 tried it without storing locally, it didn't help the situation Aug 20 17:23:50 hm Aug 20 17:24:15 does `items` grow without bound? (not that that would really slow it down, but just asking) Aug 20 17:24:20 the slowness sounds like something I experienced with a progress bar in a notification. You tried recreating the remote views each time? Aug 20 17:24:34 and it's not leaking? Aug 20 17:24:50 no, items is restricted to MAX_LINES Aug 20 17:25:03 I can try re-creating again, I don't remember it being faster before Aug 20 17:25:24 evanc, takeRight(MAX_LINES) takes the last MAX_LINES from my ringbuffer Aug 20 17:25:28 degrading performance is likely different than just slow performance Aug 20 17:25:43 yeah, it degrades rapidly Aug 20 17:25:51 slow performance may be launcher related, degrading performance sounds memory related Aug 20 17:25:54 hit the mat Aug 20 17:25:56 on initial widget load, it zips around, but within seconds, it just starts slowing down Aug 20 17:26:06 not a memory issue, heapsize is 11mb and doesn't grow Aug 20 17:26:20 uggg, wait it wouldn't be the heap of the app Aug 20 17:27:00 the remote views are managed and executed by the launcher? Aug 20 17:27:03 yeah, can't debug launcher Aug 20 17:27:21 buggers Aug 20 17:31:21 cool, karl weigers software requirements 3e is 50% of today on oreilly. its just out. other eds were great Aug 20 17:31:47 great if you actually have to like, gather requirements from people ;) Aug 20 17:33:39 but yeah, the widget only shows a maximum of 32 messages at once, of variable size Aug 20 17:34:44 how many dp wide is a typical 4" phone screen? Aug 20 17:35:47 3.6*1.5 Aug 20 17:35:49 Err Aug 20 17:35:57 Wrong window Aug 20 17:36:35 pfn: Just calc it for nexus s, that was 4" Aug 20 17:38:13 well, 320dp is a good dialog size, gonna go with that Aug 20 17:38:45 I wonder if the widget listview is unhappy that my textviews are of varying heights Aug 20 17:39:17 It shouldn't be, it's still just a listview Aug 20 17:39:50 something is destroying my widget's listview scrolling performance, but I can't work out what it is Aug 20 17:39:58 or is it unhappy if I have spannables in there... Aug 20 17:40:48 I have an OnClickSpan in there Aug 20 17:41:01 clickablespan Aug 20 17:41:48 is there a TestFlight equivalent for android beta distributing? Aug 20 17:42:09 there's testflight Aug 20 17:42:23 there's beta channel support through G+ and the Play Store Aug 20 17:42:25 And play store Aug 20 17:42:32 or there's just distributing apks... Aug 20 17:42:52 beta channel support is no good for paid apps... not if you want to give free betas Aug 20 17:44:54 my app is free Aug 20 17:45:06 well will be when i'm done building it Aug 20 17:45:13 i want to use scala, unheard of? Aug 20 17:45:32 Pretty much Aug 20 17:45:52 what's scala? Aug 20 17:46:06 heh Aug 20 17:46:07 It has like 1 user Aug 20 17:46:23 SimonVT: and he's in this channel! Aug 20 17:46:28 scala is what i've built my rest services on Aug 20 17:46:37 so, it's like, the cloud? Aug 20 17:46:40 so i figured it would be easier to build the client app Aug 20 17:46:48 in the same language, but i guess not :/ Aug 20 17:46:55 evanc: \o/ Aug 20 17:47:40 tpayne: it can be done, but that doesn't mean it's easier Aug 20 17:48:12 tpayne heard of polyglot ? :P Aug 20 17:48:20 no Aug 20 17:49:04 * pfn goes back to looking at why his widget just starts working like utter shit Aug 20 17:49:37 even my ClickableSpan shouldn't have anything to do with it Aug 20 17:50:05 intellij is the best polyglot IDE Aug 20 17:50:23 hmm, maybe it has a reference to my MessageAdapter Aug 20 17:50:24 * pfn moves it out Aug 20 17:50:42 i can't remember if camel interfaces with java as well as scala Aug 20 17:51:04 maybe i'll just re-learn Java, which pretty much means, learn java Aug 20 17:51:11 and to answer you, scala works fine on android Aug 20 17:51:12 anyone know what kernel features are required for fstrim to work? I'm just finding a minimum kernel version of 2.6.33 and it's not working on my stable 2.6.39 kernel. It does however work on 3.1.10 kernel but it is unstable and unfinished so I was hoping to figure out how to backport the functionality to the stable 2.6.39 kernel. defconfig comaprison isn't very revealing would changes be to /fs/ext4 or elsewhere? Aug 20 17:51:14 quite easil Aug 20 17:51:15 y Aug 20 17:51:39 intellij + sbt + sbt-idea + android-sdk-plugin Aug 20 17:52:03 hmm i use command line + SublimeText Aug 20 17:52:13 well, just sbt + android-sdk-plugin then Aug 20 17:52:26 cool Aug 20 17:53:39 pfn: no interface builder? Aug 20 17:53:58 well, if you want an interface builder, use an ide Aug 20 17:54:08 and it's a previewer more than a builder Aug 20 17:54:24 so i guess you define controls using XML? Aug 20 17:54:28 yes Aug 20 17:56:43 is device testing as bad as they say? Or is that just the result of poor programming? Aug 20 17:56:59 depends on what you're doing Aug 20 17:57:05 oftentimes, poor programming Aug 20 17:57:22 it also depends on the number of 3rd party libraries you use Aug 20 17:58:02 i just need to communicate with a rest service, and a custom ui/ux experience Aug 20 17:58:05 there is an issue with the facebook sdk crashing on an old motorola phone, the fix is to modify the sdk to catch an exception Aug 20 17:58:13 oh shit, and Facebook sdk Aug 20 17:59:23 but i guess i don't need an sdk to do that Aug 20 17:59:27 just graph api Aug 20 18:00:12 cool thanks for the info Aug 20 18:07:25 what's the point of getViewTypeCount in RemoteViewsFactory if there's no way to return a different viewtype from getView? Aug 20 18:07:42 or does it auto-detect based on RemoteViews layoutId? Aug 20 18:08:36 How would I save an Address object to shared preferences? Aug 20 18:09:27 stringify it Aug 20 18:09:53 and how would I do that? Just join all the address lines with commas? Aug 20 18:10:10 that works if your address lines don't have commas in them Aug 20 18:10:15 come up with some safe way to do it Aug 20 18:10:20 I often use json out of laziness Aug 20 18:10:58 I wonder if it is really re-using my remoteviews that is causing this slowness Aug 20 18:11:00 interesting Aug 20 18:12:11 pfn, the user's entering it as text, so should I just store it like that? Aug 20 18:12:33 although what I really need is the address's longitude and latitude, so maybe I should just store those? Aug 20 18:12:35 store it 1 per line then Aug 20 18:13:50 I'll just store the latitude and longitude... That way I don't have to run it through the geocoder every time I load it Aug 20 18:13:56 Allou! I have an accessibility service that records what apps somebody is using. How can I check once a day whether it is still running and restart it if it is not? Aug 20 18:14:23 why would you check it once per day? Aug 20 18:14:26 just start it sticky Aug 20 18:14:31 and if it gets killed, it gets restarted Aug 20 18:16:00 ok, I think my performance problem in my widget might be related to caching my remoteviews Aug 20 18:16:07 that's really stupid if true... Aug 20 18:18:15 nseidm1, thanks for that tip, I guess--I thought I had that enabled before and also had a perf issue Aug 20 18:21:54 i have a list view that shows an item list but it shows only the first 6 elements and when keep going down, shows again the first one.. I print the order of the element getView in the adapter class receives, and the items are being got as expected.. as soon as i scroll down the item order number increases.. but in the view i see it moves only from one to six.. what could be wrong? Aug 20 18:22:16 you gone done it wrong Aug 20 18:25:11 Anyone used the captive or poor_link info here https://developer.android.com/reference/android/net/NetworkInfo.DetailedState.html - is it reliable. Or should I just do a https get to my server in order check for certain that the network is in a proper safe state? Aug 20 18:25:42 detailed state isn't really useful Aug 20 18:25:56 State is most useful Aug 20 18:26:06 State.CONNECTED Aug 20 18:27:01 if mState != State.CONNECTED ? keep user busy with coloring books : feed user pudding; Aug 20 18:27:17 nseidm1: in a captive portal (Hotel Wifi) this will return CONNECTED I believe Aug 20 18:27:37 then it's pudding timeeeeeeeee Aug 20 18:28:55 yay, my widget is fast Aug 20 18:29:05 I think, I'll let it run all day and see if it's any bettter Aug 20 18:29:10 in the meantime, new update to play, heh ;-) Aug 20 18:29:10 Well, if you have a xml file and you want to show that layout, You just do setcontent in your activity Aug 20 18:29:24 But, say you have this xml layout and you got a button in it, you put onclick attribute Aug 20 18:29:30 With say "sendMessage" Aug 20 18:29:48 Now IN WHICH Activity sendMessage is defined Aug 20 18:29:51 How it will know that? Aug 20 18:29:59 Is there any relation between them? Aug 20 18:30:00 The activity that inflates that layout Aug 20 18:30:05 Gotcha Aug 20 18:30:11 It uses reflection to look it up at runtime Aug 20 18:30:16 I see. Aug 20 18:30:21 Also, don't use android:onClick Aug 20 18:30:26 No? Aug 20 18:30:28 Then? Aug 20 18:30:37 Set the listener in code Aug 20 18:30:41 Took reference of it from Getting Started http://developer.android.com/training/basics/firstapp/starting-activity.html#BuildIntent Aug 20 18:30:50 View#setOnClickListener(OnClickListener) Aug 20 18:30:52 Well, setting the listener and using inner class gave me a little problem. Aug 20 18:31:00 android:onClick is not maintainable Aug 20 18:31:06 I see Aug 20 18:31:11 Why? If I may ask. Aug 20 18:31:25 because it fails at runtime, not compaile-time Aug 20 18:31:33 compile-time* Aug 20 18:31:33 For one, the method HAS to be defined in the activity Aug 20 18:31:36 Makes it useless with fragments Aug 20 18:31:43 Ah Aug 20 18:32:18 The problem I am facing with is kinda like this, http://ideone.com/UzN5QR Aug 20 18:32:35 Line 6 intent's first argument this , gives me problem Aug 20 18:32:56 nseidm1: found code in Android where they check for exactly what I'm after - http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/net/wifi/WifiWatchdogStateMachine.java#WifiWatchdogStateMachine.isWalledGardenConnection%28%29 Aug 20 18:33:14 as "this" in this cane isn't pointing to Activity and in the end not at View. Aug 20 18:33:21 err s/view/Context Aug 20 18:33:27 'this' refers to the inner class, the click listener.. You need to use OuterClass.this Aug 20 18:33:35 Aye. Aug 20 18:33:43 Ok, so its "OuterClass" Aug 20 18:33:44 Thanks Aug 20 18:33:51 Was searching for it long time Aug 20 18:33:52 xD Aug 20 18:34:05 Not literally OuterClass.. Unless the outer class is called OuterClass Aug 20 18:34:14 Gotcha ;] Aug 20 18:34:27 I have never really used Java as much as I have used C++ and there is no concept of innerclass in C++ so was a bit confused. Aug 20 18:34:36 but now I am understanding. Aug 20 18:34:40 snowpong: looks like a ping Aug 20 18:34:49 Either way, thanks to both, SimonVT and evanc Aug 20 18:36:22 nseidm1: jupp, I'll just modify to my own server endpoint, then I know the server is alive and the connection is fine Aug 20 18:36:51 a ping is far superior to checking network connectivity state Aug 20 18:39:00 Well, I am trying to develop a reminder application, that will support from Gingerbread to Jelly Bean 4.3 ... so Is it good idea to use Tabhost? Aug 20 18:39:05 I heard its depreciated. Aug 20 18:39:27 tabhost is never a good idea Aug 20 18:39:39 I would have used ActionBar but it isn't present in Older API's and to support Gingerbread I have to skip that. Aug 20 18:39:44 appcompat-v7 Aug 20 18:39:48 you don't have to skip that Aug 20 18:39:52 hmm? Aug 20 18:39:58 Helper library? Aug 20 18:40:06 support library Aug 20 18:40:06 or actionbarsherlock Aug 20 18:40:52 But then, I have to deploy that support library with application as well, That increases dependency :( Aug 20 18:41:25 almost every high quality app uses the support library Aug 20 18:42:08 Ah Aug 20 18:42:30 Was trying to make this little reminder app as lightweight as I can Aug 20 18:43:38 And last question, To make reminder app work always forever (background service), like service in windows or daemon in linux Aug 20 18:43:42 What are my options? Aug 20 18:44:11 Even though user cleans all the apps from cleaner, My app should restart itself, I've seen apps like, swype keyboard doing it. Aug 20 18:44:23 specify your service runs sticky Aug 20 18:44:25 Why does it need to run forever? Aug 20 18:44:30 and schedule things in alarmmanager Aug 20 18:44:51 SimonVT, How else do you plan to check your reminders against time. Aug 20 18:44:58 Constant updates. Aug 20 18:45:16 Schedule alarms Aug 20 18:45:25 ARGH!.. Aug 20 18:45:33 If you know when to remind, have alarmmanager show a notification at that time Aug 20 18:45:34 RemoteViewsFactory should document that you shouldn't return a cached RemoteViews from getViewAt Aug 20 18:45:39 it makes your performance eat shit fast Aug 20 18:45:41 * Bleeptech beats his head against the wall.. Aug 20 18:45:49 SimonVT, I see. Aug 20 18:46:11 New update for Android studio broke something.. :( Aug 20 18:46:17 SimonVT, I downloaded half broken Reminder app from playstore, It is sticky... Aug 20 18:46:25 Thought thats the only way to go in android :D Aug 20 18:46:36 But thanks for naming Schedule alarm. Aug 20 18:47:04 No, that's just wasteful Aug 20 18:47:09 Aye. Aug 20 18:47:19 Told you, its a half broken app Aug 20 18:47:24 Its interface is weird too. Aug 20 18:47:51 while(true) if (!hasUpdate()) { Thread.sleep(1000)} - what's wrong with that? Aug 20 18:48:02 theelfismike, evewrything Aug 20 18:48:05 lol Aug 20 18:48:05 Thats why I am creating my own reminder app... That way I can get into android development for fun as well as get a decent reminder app for myself Aug 20 18:48:07 and hah Aug 20 18:48:08 Intents scheduled in alarmmanager are completely managed by the OS Aug 20 18:48:16 oh. Aug 20 18:48:18 Don't have to worry about your app getting killed Aug 20 18:48:24 Gotcha. Aug 20 18:48:30 Its like GC eh :P Aug 20 18:49:00 Completely managed by runtime, no need to worry about invalid pointers hah Aug 20 18:49:05 pfn I never start the service manually. Aug 20 18:49:26 marrrk, but you have an onStartCommand Aug 20 18:49:29 override it Aug 20 18:49:36 in the manifest? Aug 20 18:49:41 no Aug 20 18:49:44 in your service Aug 20 18:49:44 in the service Aug 20 18:49:45 yeah sorry Aug 20 18:50:34 So I add a sticky flag to the intent there and pass that to super? Aug 20 18:50:51 just return it Aug 20 18:51:59 What "it"? It returns an Int Aug 20 18:52:06 my favorite is: while(cursor.moveToFirst()) Aug 20 18:52:23 What happens with it? Aug 20 18:52:43 marrrk, it returns an int, what is start_sticky Aug 20 18:52:51 return Service.START_STICKY Aug 20 18:52:58 Oh okay, I see Aug 20 18:53:00 thanks Aug 20 18:53:06 which is default Aug 20 18:53:10 if you don't override onStartCommand Aug 20 18:53:36 haha, very good Aug 20 18:54:30 is it now, I forget Aug 20 18:55:47 Either way a service that doesn't override onStartCommand get's a big-o question mark Aug 20 18:55:58 for usefulness Aug 20 18:56:21 Sometimes very rarely my app isn't responding for quite a long time. I don't know why, because it does not crash. I just noticed that at one point my AS wasn't running anymore. I wonder how that could happen. Aug 20 18:57:13 Anybody know how to get to a real error log in android studio? Aug 20 18:57:14 dunno what an AS is, but if your AS is in a Service, that service may or may not be running. If it's not it's scheduled to be restarted by the system if it's a sticky service. Aug 20 18:58:55 By AS I meant AccessibilityService Aug 20 19:00:39 AS is a pain in the ass Aug 20 19:01:38 I agree Aug 20 19:01:39 If your using AS to respond to notifications it's a pain in the arse which is why the technique has been mostly deprecated by the introduction of: http://developer.android.com/reference/android/service/notification/NotificationListenerService.html Aug 20 19:01:54 It responds to window changes. Aug 20 19:02:12 speaking of NLS, does lightflow use it yet? Aug 20 19:02:46 doubt it, such a small 4.3 userbase Aug 20 19:02:50 oh, but my phone is still 4.2.2 Aug 20 19:02:51 meh Aug 20 19:02:54 pos Aug 20 19:04:17 does android support this? Aug 20 19:04:19 http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html Aug 20 19:04:26 Hey, does debug.sf.showfps show true fps or just current screen refresh fps ? Aug 20 19:05:00 Maybe once 6.0 is out, using that NotificationListenerService thing is a worthwhile option. Aug 20 19:11:56 That's the nature of Android dev, you don't get to use the fun stuff for two years ;-) Aug 20 19:19:31 nahhh, just code 18+ and wait 2 years for a userbase Aug 20 19:19:34 that's the better approach Aug 20 19:23:01 are there plans for Android to support java 1.7 or 1.8? Aug 20 19:33:58 Hey guys, I think I am doing something wrong when trying to access gui objects in my apps. Eveytime I try and run one I get a null pointer on any line similar to "private final Switch torchSwitch = (Switch) findViewById(R.id.torchSwitch);" in my Main Activity. Is there something obvious I am doing wrong or haven't checked? or am I just going about it in the wrong way Aug 20 19:36:17 JamoBox: Perhaps try accessing the Switch in your oncreate method or other appropriate methods Aug 20 19:36:46 JamoBox Aug 20 19:36:56 are you calling find…() after setContentView() ? Aug 20 19:37:31 Ahhh Aug 20 19:37:33 that makes sense Aug 20 19:37:33 I don't believe he is.. Aug 20 19:37:45 I'm declaring it at the top of he class Aug 20 19:38:13 yeah, you have to do that after setContentView, otherwise the system doesn't know what to look up Aug 20 19:38:15 Just do something like this, private Switch torchSwitch, then in an appropriate method like onCreate, this.torchSwitch = (Switch) findViewById(R.id.torchSwitch); Aug 20 19:38:55 Awesome, thanks guys, was something I completely overlooked. had a headache ovr it for ages Aug 20 19:39:08 your welcome :) Aug 20 19:39:51 these custom list adapters are kicking my ass Aug 20 19:39:59 still new to android and have nooo idea. Aug 20 19:42:11 BaseAdapter, sometimes a simple ArrayAdapter. Not quite sure how useful anything else is. Aug 20 19:43:27 I'm trying to make an adapter for a cards ui im makinb Aug 20 19:43:28 making* Aug 20 19:45:38 hi, this motionEvent when calling getX(), it is 0 for top left ? if so if i want 0 to be center if screen i need to do xPos -= (-width / 2) ? Aug 20 19:46:50 Yes, 0 is left Aug 20 19:47:27 yes ok then i need to get width and height somehow :) Aug 20 20:07:17 hey folks. After the latest Android Studio update, the IDE is showing that R is missing, but I can still build and deploy without issue. Any ideas how to correct this? Aug 20 20:08:13 Pushnell_ build from the command line :) Aug 20 20:08:25 g00s: that doesn't fix my IDE :) Aug 20 20:08:56 Like I said, the actual build process works fine. But the code editor is showing hundreds of errors. Aug 20 20:09:03 oh, misread. thought you said 'can't' build and deploy Aug 20 20:11:37 Pushnell_: I fixed that by Build > Make project Aug 20 20:11:51 Pushnell_: And restarting a couple of times Aug 20 20:12:40 desmin88: yeah, I've tried Rebuild and restart several times. usually that fixes weirdness, but no luck today. Aug 20 20:12:57 How does one get experience as a programmer if everyone requires experience Aug 20 20:12:58 :( Aug 20 20:13:13 CocoStorm: you don't need permission to write code. Just write some code. Aug 20 20:13:28 Pushnell_: No I mean, applying for jobs Aug 20 20:14:04 CocoStorm: most employers worth working for are willing to look at your work vs. your work experience. Write some utilities or games, release them to the store. Bonus points if you link to your github. Aug 20 20:14:21 Either write some code, or go to college and get internships. Aug 20 20:14:23 Pushnell_: I've already got an app in the market Aug 20 20:14:44 CocoStorm: sounds like you've got some experience! Talk it up on your resume. Aug 20 20:15:11 pfn: Hey dude, you told me that´s impossible to install .apk and not show in list of apps on dashboard device, so you wrong Aug 20 20:15:36 Yeah, I could I guess. it's just every position requires 2-3 years experience which I assume means work experience but I guess I'll just apply anyway Aug 20 20:15:42 pfn: just to advice Aug 20 20:16:06 CocoStorm: startups are a good way to go. Low pay, high intensity work experience. Aug 20 20:16:33 CocoStorm: also, usually higher responsibility than normal. trial by fire is always a good experience. Aug 20 20:16:51 Yeah I was looking for startups Aug 20 20:17:21 Pushnell_: You can try to invalidate caches, synchronize, then restart. Aug 20 20:17:31 Also apply to entry-level jobs Aug 20 20:17:56 And then sync the gradle files Aug 20 20:17:59 CocoStorm apply regardless of the requirements Aug 20 20:18:03 CocoStorm: or, get involved with something open sourc. "Community developer for file i/o subsystem of MongoDB" or similar looks great on a resume. Aug 20 20:18:10 there's a good market for devs right now Aug 20 20:18:26 they might be able to work something out even if you don't have a full X years Aug 20 20:18:41 Pushnell_: Tools > Android > Sync gradle files., File > Synchronize/Invalidate caches Aug 20 20:18:51 running all those usually fixes my problems Aug 20 20:18:59 I'm trying to run a mount command as su in my app, and the command is running and returns with exit status of 0, but it isn't working Aug 20 20:19:32 Thanks for the support, will give some a shot :D Aug 20 20:19:52 this is what I am doing http://pastebin.com/ETPPfYZm Aug 20 20:20:01 running that command as su in adb shell works fine Aug 20 20:20:13 I have no idea why it doesn't work in my app Aug 20 20:20:17 any ideas, anyone? Aug 20 20:20:50 CocoStorm, a lot of jobs that say 2-3 years of experience are considered entry level and they will be hire people who have recently graduated as long as they can show some work Aug 20 20:21:01 Normando: If your app doesn't have a launcher icon, then the user can't really launch it Aug 20 20:21:13 If the user can't launch it, it'll always be in the stopped state Aug 20 20:21:21 If it's in the stopped state, it can't do anything Aug 20 20:21:26 desmin88: no luck :-/ I had tried Synchronize previously, and Invalidate worked for a moment until it rebuilt the caches. Aug 20 20:21:35 Pushnell_: Hmm. Aug 20 20:21:37 jonc: Oh I see, I've always thought 2 - 3 years work experience after graduating Aug 20 20:22:00 i mean, that's probably what they *want* Aug 20 20:22:05 ^ Aug 20 20:22:17 but if you're hanging out around here, you might be able to talk your way in the door :P Aug 20 20:22:38 but if you can show them things you've done outside of class and are passionate / fit in with the group you would be working with you have a decent chance Aug 20 20:23:01 ^ Aug 20 20:23:24 CocoStorm: the biggest thing is to just show that you can write code. A lot of recent graduates cannot. So really, anything you can do to show a code base will usually get you in the door. Github is your resume. Aug 20 20:23:54 Pushnell_: You could try just deleting the entire build folder while AS is not open, then let it rebuild it Aug 20 20:23:57 Pushnell_: I see, thanks! Aug 20 20:24:18 no one has any ideas? :/ Aug 20 20:24:48 Another big part is selling yourself and networking. Aug 20 20:25:41 I was approached by a startup and we had a discussion but they then told me they weren't considering international _junior_ candidates until next spring Aug 20 20:25:54 jonc: yeah for sure Aug 20 20:26:03 SimonVT: in my case yes, he can Aug 20 20:26:39 SimonVT: other android application call the activity from external jar Aug 20 20:27:03 Is there any methods similiar to DPAPI, but on Android? Aug 20 20:29:01 Pushnell_: And then make sure build/res/r isnt being excluded Aug 20 20:30:00 android studio is so finnicky Aug 20 20:30:59 Normando, installing without showing up in launcher is still installing Aug 20 20:31:13 Hi folks, I have quite a complex app to develop which has several significant and distinct components to it. Reading the developer docs indicates the best way to present this interface is using a DrawerLayout and I've been playing with this and it seems to suite quite well. The only problem is that the example given simply changes an existing layout fragment to show a new pic in the planet, rather than to instantiate a new class with an activit Aug 20 20:31:56 desmin88: where would it be excluded? Aug 20 20:31:56 lovethang_: wat. Aug 20 20:32:46 Pushnell_: Project Structure, ignore the popup. Go to Modules, and then the module containing your application, not the overall project. Aug 20 20:33:21 Pushnell_: Find build folder on the right side, expand, make sure res and source are not red, Aug 20 20:34:50 if they are, highlight them and then click 'excluded' to toggle them back to be included Aug 20 20:36:35 brb Aug 20 20:37:26 desmin88: I didn't have anything excluded, but I did find a different build error Aug 20 20:37:36 Pushnell_, What is the error? Aug 20 20:37:44 desmin88: I'm including Play Services in my build.grade via compile "com.google.android.gms:play-services:3.1.36" Aug 20 20:38:18 okay. Aug 20 20:38:28 which creates a link to build/exploded-bundles/ComGoogleANdroidGmsPlayServices316.aar/classes.jar Aug 20 20:38:37 and I had an error about "Invalid classes root" for that module Aug 20 20:39:12 hmm Aug 20 20:39:14 but …. I think that was a red herring. I waited 5 minutes and now that error is gone, but R is still missing in the IDE Aug 20 20:39:35 dammit Android Studio, stop failing in weird ways Aug 20 20:39:55 is there atleast an R file in build/res/r ? Aug 20 20:40:47 actually, my R is in build/source/r/myflavorname/debug/my/package/path/R Aug 20 20:41:01 Yeah thats where it should be Aug 20 20:41:25 and btw, I tried blowing away build/ outside of AR to no avail Aug 20 20:41:30 er, AS Aug 20 20:41:42 and also btw, thanks for trying :) Aug 20 20:41:49 hmm. Aug 20 20:43:48 Update the sdk tools and sdk build-tools, (tools > android > sdk manager) Aug 20 20:45:21 also the platform tools Aug 20 20:46:16 then follow standard procedure of rebuilding, syncing gradle, etc. Aug 20 20:47:11 also if you're importing Android.R on accident, that can mess things up to. Aug 20 20:48:14 Pushnell_: ^ Aug 20 20:48:45 desmin88: yeah, I actually upgraded my SDK shortly before upgrading AS Aug 20 20:49:23 oh :( Aug 20 20:49:41 pfn: yeah, but I asked and you told that´s not possible Aug 20 20:51:33 Pushnell_: Looks like were SOL, i have no clue. Aug 20 20:53:59 desmin88: thanks for trying :-/ Aug 20 20:54:25 yw... you could try a manual gradle clean thru the cmd line, but thats about it from bag of tricks with android studio Aug 20 20:55:27 Pushnell_: Are you sure it looks like this? http://gyazo.com/9b1c9d7189bdcda4d453dbc455a24534 with res and source not excluded Aug 20 20:56:20 desmin88: yep, exactly like that Aug 20 20:57:20 Try re-importing it Aug 20 20:57:23 Remove all ide files Aug 20 20:57:39 It probably just messed up its source folders Aug 20 20:57:52 Could also just add the folder manually Aug 20 20:57:56 desmin88: http://snag.gy/ZPyr6.jpg Aug 20 20:58:52 try what simon says Aug 20 20:58:53 hehe Aug 20 21:10:10 SimonVT: which IDE files should I remove? idea/* Aug 20 21:11:29 Yeah, .idea/ Aug 20 21:11:30 And uh.. Aug 20 21:11:32 iml files? Aug 20 21:11:34 Pushnell_ did you try "invalidating caches / restart" first ? Aug 20 21:11:39 Don't remember what they're called Aug 20 21:11:45 g00s: yep Aug 20 21:21:36 can i boot my device to recovery with adb? Aug 20 21:23:14 ok got it Aug 20 21:24:09 adb reboot recovery Aug 20 21:24:19 is there a way to have a url with a title through xml and clickable? Aug 20 21:28:34 logcat in eclipse has got broken. i can access through adb logcat but the view in eclipse is always blank Aug 20 21:28:37 Linkandzelda: http://stackoverflow.com/questions/2734270/how-do-i-make-links-in-a-textview-clickable Aug 20 21:28:45 bitkiller: have you restarted eclipse? Aug 20 21:28:47 tried restarting eclipse, restarting adb server Aug 20 21:29:28 eventually it returned to work, but then stopped again Aug 20 21:30:40 oh wait. Click the device's name in the DDMS view. Aug 20 21:31:33 i've already done that. Aug 20 21:32:19 this last restart, logcat view got filled. but then got blank. it seems it was after i tried editing a filter Aug 20 21:33:22 here we go again Aug 20 21:33:30 logcat being updated Aug 20 21:42:21 a lot of "Unhandled event loop exception" Aug 20 21:42:34 I'm blanking. What widget is a NumberPicker, but for strings Aug 20 21:45:36 yiati: Spinner? Aug 20 21:46:12 RyanM: Mmmm, spinner is just a drop down. I want a full dialog Aug 20 21:49:43 NumberPicker isn't a dialog either Aug 20 21:52:09 NumberPicker can display strings Aug 20 22:02:26 well, it only works if i delete all custom filters. then the "All messages" goes fine, but useless Aug 20 22:11:15 Normando, I said it's impossible to do it without installing Aug 20 22:11:38 Normando, i.e. you cannot startActivity(someintent) without installing an apk that declares that intent Aug 20 22:12:52 man, really, I can't believe recycling RemoteViews objects would result in widget fail... Aug 20 22:12:58 how fucked up is that Aug 20 22:19:29 pfn: not very Aug 20 22:19:42 on a scale of 0 to touchwiz it's a 3 Aug 20 22:21:44 hey guys, how do I fix a java.lang.NoClassDefFoundError? I've added the file to gradle.build and its inside the libs folder, yet this exception s raised on opening the app. Aug 20 22:22:01 make sure that the class is in the app Aug 20 22:22:12 and/or that you're targeting the correct API level etc.. Aug 20 22:22:21 Linkandzelda: android studio or eclipse? Aug 20 22:22:26 androdi studio Aug 20 22:22:30 anyone have google maps loading tiles with the debug key? Aug 20 22:22:31 googleanalyticsv2 Aug 20 22:22:51 it seems it doesent work without release key Aug 20 22:23:12 Linkandzelda: Tools > Android > Sync gradle files fixed that for me last time. Aug 20 22:23:48 papachan did you add your debug keystore to the maps api console? Aug 20 22:24:12 yep Aug 20 22:24:19 i add the sha 1 Aug 20 22:24:24 and my namespace Aug 20 22:25:53 desmin88: I swear I did that but thanks, it worked :) Aug 20 22:26:03 Linkandzelda: You're welcome! Aug 20 22:39:36 one question, for now i have two buttons one for zoom in and zoom out, i use this for scaling world matrix, but i want also zoom in on double tap, so if im correct i can use SimpleOnGestureListener, onDoubleTap(), am i correct ? ... and is it possible to do this scale in projection matrix instead of world matrix, or i can only change boundaries with projection matrix ? Aug 20 22:54:07 $ javah -jni JNIFoo Aug 20 22:54:11 That's a handy command Aug 20 22:54:23 And to think I was generating these headers by hand... Aug 20 23:05:43 so ... formatting of text in TextViews ... is there a simple way to get some basic formatting to work like
and

?? Aug 20 23:08:41 robin_sz: You can use newlines for that Aug 20 23:08:54 textView.setText("Text with\nnewlines"); Aug 20 23:09:10 for more advanced formatting, TextViews do support some limited HTML Aug 20 23:09:30 you can define it in your strings.xml or use Html.fromHtml Aug 20 23:09:39 mmm, I forgot to mention I have auto linkify set Aug 20 23:09:55 the \n doesnt work aftter that Aug 20 23:10:22 ok, so just wrap it in a CDATA[] block? Aug 20 23:12:18 robin_sz: If you use CData you'll have to use Html.fromHtml Aug 20 23:12:38 hmm Aug 20 23:13:19 http://ideone.com/JCmslQ what is wrong the scale dont work :S Aug 20 23:14:51 it was al nicely formatted with breaks from newlines, then when I set android:autoLink="all" it went into a single mess of text Aug 20 23:20:53 best frameworks for data persistence in local db? e.g., hitting a RESTful API on app start up and creating a local repo to query against to get objects Aug 20 23:25:03 for some strange reason, logcat config was being corrupted. I copied the confs from monitor prefs to the eclipse confs, and i think the problem is solved Aug 20 23:28:54 forget what i've said ^^^ Aug 21 00:10:53 Its finally coming together! https://gyazo.com/history Aug 21 00:10:55 fail. Aug 21 00:10:59 http://gyazo.com/f6d1657d1cd88a621f8c0ab85250738a Aug 21 00:12:37 took me forever to get this cards ui thing Aug 21 00:12:59 i still don't understand cards Aug 21 00:13:17 to be honest, i dont either Aug 21 00:13:38 they seem faddish Aug 21 00:13:58 i wouldnt be so sure Aug 21 00:14:04 its getting implemented in a lot of google apps Aug 21 00:14:11 the new youtube v5 forexample Aug 21 00:14:15 google makes mistakes Aug 21 00:14:25 umm Aug 21 00:14:37 but whose to say this is a mistake Aug 21 00:14:56 cards was pretty crap when it was how WAP did it Aug 21 00:15:14 remember thos WAP apps that never caught on? Aug 21 00:15:19 desmin88, your corners are rounded Aug 21 00:15:24 they shouldn't be :P Aug 21 00:15:44 canadiancow does the card design language call for square corners :P Aug 21 00:15:53 android seems to be all about square corners Aug 21 00:15:58 i thought it was rounded corners.. Aug 21 00:16:04 desmin88's screenshot makes me think of iOS Aug 21 00:16:12 canadiancow it all goes back to star wars, droids. etc :) Aug 21 00:16:16 the new youtube app employs rounded corners on its cards ui Aug 21 00:16:21 oh you know what Aug 21 00:16:29 although they are too round, ill reduce it Aug 21 00:16:30 i think its just because the density of my monitor is so low Aug 21 00:16:43 so im seeing a much bigger radius than you actually have Aug 21 00:16:49 it was 2dip Aug 21 00:16:53 but it still feels iOS'y to me Aug 21 00:16:56 imgoing to try 1 Aug 21 00:17:11 it looks like Now rounds the corners too Aug 21 00:17:14 ever so slightly Aug 21 00:17:23 yeah i believe its 1 dip, rather than 2. Aug 21 00:17:42 what about this? Aug 21 00:17:43 http://gyazo.com/e3d4502afa3660ece342dedeb3dd594a Aug 21 00:18:17 i like the corners more Aug 21 00:18:22 still not sure about the inside of the card though Aug 21 00:18:24 i dont like the line Aug 21 00:18:35 but im also not a UX person Aug 21 00:18:44 don't listen to what i have to say ;) Aug 21 00:18:56 lol. it was more of just a POC that i can get this to work Aug 21 00:19:02 still super new to android development Aug 21 00:20:06 if you can write a good getView() method, you're better than 95% Aug 21 00:21:19 just implemented the holder pattern Aug 21 00:23:11 curiously, i dont see cards in the design guidelines anywhere yet Aug 21 00:23:24 i thought they would be under building blocks or something Aug 21 00:28:10 hopefully google releases an official cards librarty Aug 21 00:28:19 library* and incorporates it int othe design guidelines Aug 21 00:28:34 desmin88 would would a cards library do? Aug 21 00:28:46 ? Aug 21 00:28:54 i mean, if you were to explain a card to your mom, … ELI5 Aug 21 00:29:31 i just mean a standardized way of implementing the cards ui functionality rather than various libraries or listview implementations Aug 21 00:32:31 see, i dont have a modern android device to run the slickest new apps. i mostly use the emu, so i haven't played with this idiom yet. i see screenshots, they just look like layouts with extra padding. so, maybe someday i'll understand what these really do Aug 21 00:33:03 oh Aug 21 00:33:12 well essentially they are just layouts with extra padding Aug 21 00:33:28 I have a strange case involving a relativelayout. I have two imageviews in which I render one centered ontop of the other (think thumbnail and 'play' button). It renders fine on Samsung Galaxy S3 and Motorola Droid X but for some reason on the Panasonic ToughPad it renders the 'button' imageview to the right of the thumbnail.. I'm using layout_centerInParent="true" to achieve the centering effect. Is there a better way? Aug 21 00:35:02 g00s: i just think they're cool ways to display information or other things to a user Aug 21 00:35:44 huh, if i specify a style for my progress spinner, it seems to revert to the old style spinner on newer devices Aug 21 00:35:50 to me they seem like chrome; thats ok if it justifies itself. i just haven't heard a good justification yet Aug 21 00:36:16 we've always had layouts with padding. why a library for that ? Aug 21 00:36:23 * g00s still doesn't get it Aug 21 00:36:51 make it standard? so each app doesn't have to implement the same thing their own way, or keep cards consistent through applications? Aug 21 00:37:11 desmin88 i'm not busting your chops. i'm waiting for google to explain Aug 21 00:37:16 oh Aug 21 00:37:24 either way i just think theyre cool Aug 21 00:37:35 are they timeless ? Aug 21 00:37:47 will they become boring ? Aug 21 00:38:02 in 2 years, will we say cards are so 2013 ? Aug 21 00:38:15 all design patterns eventually can get replaced by new ones Aug 21 00:38:39 but i think since google has been implementing cards into a lot of their apps, it will be here to stay Aug 21 00:39:14 not all. typography, grid layouts, color theory - these are not changing. eras come and go , fonts change, but the principles of typography generally dont change Aug 21 00:39:28 the way humans perceive colors won't change Aug 21 00:39:41 visual mass, hierarchy, this won't change Aug 21 00:39:48 but rounded rectanges ? Aug 21 00:39:53 well not all design patterns if we want to get technical Aug 21 00:40:26 but no, cards wont last forever. but why ask that question in the first place, what is the signifance of how long it lasts Aug 21 00:40:38 real quick, has anyonce noticed odd behavior when specifying a style for a progressbar? When no style is specified, it looks like the proper indeterminate progressbar for what ever OS version its on. But once you specify a style, it looks like same on all OSs Aug 21 00:40:59 style as in, small, small.inverse ect Aug 21 00:41:02 desmin88 i posit , its just bling Aug 21 00:41:06 thats like going on vacation and being sad and grumpy the entire time because you know you have to go home eventually. just enjoy the the experience Aug 21 00:42:17 chrome that serves no purpose (and maybe this does? i'm waiting for google to say) is just noise, puts an expiration date on the UI, and distracts from the content Aug 21 00:42:26 if the chrome provides some affordance, thats great Aug 21 00:42:30 * g00s hopes to hear from google Aug 21 00:42:54 how does it distract from the content? Aug 21 00:43:08 have you used the Google app, or the new youtube? or any app that employs a cards ui? Aug 21 00:44:18 the new youtube, no Aug 21 00:44:55 i've only heard cards describes as layout with padding Aug 21 00:45:18 its more though Aug 21 01:06:03 nav drawer, cards, and inline overflow menus Aug 21 01:06:21 the pinnacle of lazy design veiled as minimalism Aug 21 01:06:52 If you do inline overflow menus, though, PLEASE make the touch targets reasonably sized. Aug 21 01:07:14 I don't have super large fingers and I still can't consistently hit half of them without a stylus. Aug 21 01:07:52 I think Google Music actually listed "made touch targets bigger" in their changelog after they released a version with microscopic ones. Aug 21 01:09:33 JakeWharton: are you saying its a bad design? Aug 21 01:09:56 if you can call it design Aug 21 01:10:22 whats a better design Aug 21 01:10:45 genuine question Aug 21 01:10:47 desmin88: you're making the assumption that there's one "design" which works for everything Aug 21 01:11:29 i just don't see how a homogenous item list necessitates cards to differentiate and an overflow on each for quick access to things that should probably be action items on the detail view for said item Aug 21 01:16:37 umm Aug 21 01:16:38 yeah Aug 21 01:18:27 So I updated my phone to a rom based off of Android 4.3 and now my application is having some really weird memory issues Aug 21 01:18:28 Anyone else encounter memory issues similar? Aug 21 01:18:32 i understanded what some of that meant Aug 21 01:18:59 I'm using ashmem and mmap to create memory mirrors and it seems to be causing issues :/ Aug 21 01:22:33 hi Aug 21 01:22:55 hi Aug 21 01:22:57 Hey guys, what's the best way to run a task and notify another activity of the change? I have two activities: one with a list and another to edit the items in the first one. I want to save data on the server from the edit activity and return to the list and refresh the list when the network operation finishes. AsyncTask? Thread? Service? Aug 21 01:23:29 async task Aug 21 01:23:32 is what i would use Aug 21 01:25:20 desmin88, Even if the edit activity dies while the AsyncTask is running? I'm going to start the task and finish() the activity right after Aug 21 01:26:15 you said return to the list when the operation finishes Aug 21 01:26:43 not right after you run the async task Aug 21 01:26:56 i am struggling with my google maps apikey Aug 21 01:27:07 nothing i can do it make it work Aug 21 01:27:43 Oops, I accidentally some words. English's not my primary language :/ This was two parts: (save data to server and return to the list) and (refresh the list when the saving is complete) Aug 21 01:28:21 Max-P it can be a simple async-task Aug 21 01:28:54 Ahh, i see then. I would still use async task.. who cares if the edit activity dies? the task is still running and will refresh the list when done. Aug 21 01:30:56 I will try that then, maybe it will work. I've seen some cases where rotating the screen when running an AsyncTask caused the app to crash due to leaked window. I'll just stick a good ol' ProgressDialog for now if it doesn't work. Aug 21 01:36:44 What is implied when an apk has -2 appended to the end of it? When you update an app and look at the logs it tries to read stuff from apk-name-2.apk, while when you first install it, its just apk-name-1.apk Aug 21 01:37:08 it copies it to a new file, installs -2.apk, then removes -1.apk Aug 21 01:37:09 we have an app that is facing a native library load issue, and all of the reports are showing an attempted read from app-name-2.apk Aug 21 01:37:16 Pyuruku, it's just a copied name Aug 21 01:37:29 in case anything goes wrong with the installation (e.g. signature), the original won't be deleted Aug 21 01:37:33 is there some article or documentation on teh whole update process? Aug 21 01:37:41 Pyuruku: android.googlesource.com Aug 21 01:37:48 what evanc said Aug 21 01:38:17 evanc: that would make sense, but these are crash reports, meaning the app was updated or installed and they launnched it Aug 21 01:38:25 at that point, -1 should have been replaced right? Aug 21 01:39:04 Pyuruku: I'm pretty sure they don't rename -2 back to -1 after the installation Aug 21 01:39:19 so then another update would be -3?... Aug 21 01:39:20 when you install again and -2 is on the disk, it'll rename the new apk to -1 and do the same process Aug 21 01:39:28 oh Aug 21 01:39:30 hmm Aug 21 01:39:41 so if I install an app for the very first time, is it -2 still? or -1? Aug 21 01:40:09 I would guess it's -1, if anything Aug 21 01:40:40 does google play do delta updates? Aug 21 01:40:55 or is it the full apk downloaded from anew? Aug 21 01:41:20 it does delta updates Aug 21 01:41:42 is there any information on what is included in that delta update? Aug 21 01:41:49 or is it a blind hash check Aug 21 01:42:09 and does the delta update merge into the existing data directory or does it replace it? :/ Aug 21 01:42:25 "merge into the existing data directory" ? Aug 21 01:42:42 as in it only replaces the files present in the delta update and keeps everything else in tact Aug 21 01:42:58 Pyuruku: I assume the delta is just a bindiff (maybe with some smarts) between the two APKs Aug 21 01:43:24 nothing in the data directory is updated Aug 21 01:43:39 so say I have an app with native libraries Aug 21 01:43:40 it's just the on-disk APK Aug 21 01:43:56 i install it for the first time, i get the libraries extracted to app-name/libs/ Aug 21 01:44:04 so then when i recieve an update Aug 21 01:44:17 youre saying app-name/libs/ is not touched unless one of the libraries changed? Aug 21 01:45:32 the process is likely: take existing APK, A, and delta, D. Combine the two and create a new APK, B (= A + D). Hand B to PackageManager#installPackage(..). Normal installation processes take over from there. Aug 21 01:45:42 * pfn checks out this new YouTube app Aug 21 01:46:17 pfn it Aug 21 01:46:18 evanc: ok that makes sense Aug 21 01:46:32 pfn it's kinda wierd =\ Aug 21 01:46:41 evanc: im asking these weird questions because we have a bunch of users who get "UnsatisfiedLinkError" Aug 21 01:46:55 we cant reproduce it, but we did some diagnostics Aug 21 01:46:57 Pyuruku: my point simply being that I doubt the play store does any APK inspection to figure out what to do. Just builds a new APK and hands it to PackageManager who then does its thing Aug 21 01:47:16 people who receive the error dont have any libs extracted to the libs directory Aug 21 01:47:24 having such a hard time with this damn xml Aug 21 01:47:30 so im wondering if this was at the fault of an update or just from the first install Aug 21 01:47:54 we actually have a user we reached out to that said the app worked just fine but after an update he got the error over and over Aug 21 01:48:01 which led me to an update problem Aug 21 01:54:19 then i found bug reports where native libraries were not included in updated apks for whatever reason Aug 21 01:54:32 but that was from last year and google apparently fixed it Aug 21 01:54:33 :| Aug 21 01:56:15 bug report im referring to: https://code.google.com/p/android/issues/detail?id=35962 Aug 21 01:56:37 if anyone has information on "UnsatisfiedLinkError" or the installation process and its bugs please let me know (pms are welcome) Aug 21 01:56:51 ive been googling the issue for well over a month now Aug 21 01:56:58 there is little to no information on it really Aug 21 01:57:58 Pyuruku: http://stackoverflow.com/questions/11183182/some-customers-get-a-java-lang-unsatisfiedlinkerror-when-upgrading-my-android-ap ? Aug 21 01:58:08 thats posted by my coworker :-) Aug 21 01:58:15 haha Aug 21 01:58:17 oh not that one Aug 21 01:58:21 but we have a so post up Aug 21 01:58:25 also ive seen that Aug 21 01:58:28 does not apply Aug 21 01:58:31 hm Aug 21 01:58:34 we compile for both arm and arm 7 Aug 21 01:58:42 http://stackoverflow.com/questions/18111739/why-do-some-android-phones-cause-our-app-to-throw-an-java-lang-unsatisfiedlinker?noredirect=1#comment26517852_18111739 Aug 21 01:58:44 is our so post Aug 21 02:51:55 What's the best approach to write a shell utility that I can call from 'adb shell'? I just need a command line utility, not an actual Android UI front-end. Aug 21 02:52:10 Possible to do this using the NDK? **** ENDING LOGGING AT Wed Aug 21 02:59:58 2013